From 67565b767de660e4d6dcb623db86b7235386746b Mon Sep 17 00:00:00 2001 From: Moiz Haidry Date: Mon, 24 Feb 2020 21:33:48 -0800 Subject: [PATCH 01/19] CallCredentials debug string API --- BUILD | 1 + BUILD.gn | 1 + CMakeLists.txt | 18 ++- Makefile | 55 +++++--- build.yaml | 4 +- build_config.rb | 2 +- config.m4 | 17 +++ config.w32 | 19 +++ gRPC-C++.podspec | 1 + gRPC-Core.podspec | 1 + grpc.gemspec | 31 +++++ grpc.gyp | 1 + include/grpc/grpc_security.h | 5 + include/grpcpp/security/credentials_impl.h | 5 + package.xml | 31 +++++ .../composite/composite_credentials.cc | 16 +++ .../composite/composite_credentials.h | 3 + .../lib/security/credentials/credentials.h | 4 + .../credentials/fake/fake_credentials.h | 6 + .../credentials/iam/iam_credentials.cc | 9 +- .../credentials/iam/iam_credentials.h | 4 + .../credentials/jwt/jwt_credentials.cc | 1 - .../credentials/jwt/jwt_credentials.h | 12 ++ .../credentials/oauth2/oauth2_credentials.cc | 31 ++++- .../credentials/oauth2/oauth2_credentials.h | 9 ++ .../credentials/plugin/plugin_credentials.cc | 10 ++ .../credentials/plugin/plugin_credentials.h | 2 + src/core/lib/surface/version.cc | 2 +- src/cpp/client/secure_credentials.cc | 11 ++ src/cpp/client/secure_credentials.h | 5 + src/objective-c/tests/version.h | 2 +- src/python/grpcio/grpc_core_dependencies.py | 15 +++ test/core/security/credentials_test.cc | 102 ++++++++++++++- test/cpp/end2end/end2end_test.cc | 121 +++++++++++++++--- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 36 files changed, 507 insertions(+), 54 deletions(-) diff --git a/BUILD b/BUILD index 19d4c81f554..f646c2a655c 100644 --- a/BUILD +++ b/BUILD @@ -559,6 +559,7 @@ grpc_cc_library( "absl/memory", "absl/strings", "absl/strings:str_format", + "absl/time:time", ], language = "c++", public_hdrs = GPR_PUBLIC_HDRS, diff --git a/BUILD.gn b/BUILD.gn index f821a9e1cdc..122c579bd5b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -166,6 +166,7 @@ config("grpc_config") { ":absl/strings:str_format", ":absl/strings:strings", ":absl/types:optional", + ":absl/time:time", ] public_configs = [ diff --git a/CMakeLists.txt b/CMakeLists.txt index a01abb00b85..5535b943c0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,8 +26,8 @@ cmake_minimum_required(VERSION 3.5.1) set(PACKAGE_NAME "grpc") set(PACKAGE_VERSION "1.28.0-dev") -set(gRPC_CORE_VERSION "9.0.0") -set(gRPC_CORE_SOVERSION "9") +set(gRPC_CORE_VERSION "10.0.0") +set(gRPC_CORE_SOVERSION "10") set(gRPC_CPP_VERSION "1.28.0-dev") set(gRPC_CPP_SOVERSION "1") set(gRPC_CSHARP_VERSION "2.28.0-dev") @@ -105,6 +105,7 @@ set(gRPC_ABSL_USED_TARGETS absl_base absl_base_internal absl_bits + absl_civil_time absl_compressed_tuple absl_config absl_core_headers @@ -124,6 +125,8 @@ set(gRPC_ABSL_USED_TARGETS absl_strings absl_strings_internal absl_throw_delegate + absl_time + absl_time_zone absl_type_traits absl_utility absl_meta @@ -1445,6 +1448,7 @@ target_link_libraries(gpr absl::str_format absl::strings absl::optional + absl::time ) if(_gRPC_PLATFORM_ANDROID) target_link_libraries(gpr @@ -18575,7 +18579,7 @@ generate_pkgconfig( "gRPC platform support library" "${gRPC_CORE_VERSION}" "" - "-lgpr -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" + "-lgpr -labsl_time -labsl_time_zone -labsl_civil_time -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" "" "gpr.pc") @@ -18585,7 +18589,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_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" + "-lgrpc -laddress_sorting -lupb -lcares -lz -labsl_time -labsl_time_zone -labsl_civil_time -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" "" "grpc.pc") @@ -18595,7 +18599,7 @@ generate_pkgconfig( "high performance general RPC framework without SSL" "${gRPC_CORE_VERSION}" "gpr" - "-lgrpc_unsecure -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" + "-lgrpc_unsecure -labsl_time -labsl_time_zone -labsl_civil_time -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" "" "grpc_unsecure.pc") @@ -18605,7 +18609,7 @@ generate_pkgconfig( "C++ wrapper for gRPC" "${PACKAGE_VERSION}" "grpc" - "-lgrpc++ -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" + "-lgrpc++ -labsl_time -labsl_time_zone -labsl_civil_time -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" "" "grpc++.pc") @@ -18615,6 +18619,6 @@ generate_pkgconfig( "C++ wrapper for gRPC without SSL" "${PACKAGE_VERSION}" "grpc_unsecure" - "-lgrpc++_unsecure -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" + "-lgrpc++_unsecure -labsl_time -labsl_time_zone -labsl_civil_time -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" "" "grpc++_unsecure.pc") diff --git a/Makefile b/Makefile index 25481e07ce6..79a05177383 100644 --- a/Makefile +++ b/Makefile @@ -469,7 +469,7 @@ E = @echo Q = @ endif -CORE_VERSION = 9.0.0 +CORE_VERSION = 10.0.0 CPP_VERSION = 1.28.0-dev CSHARP_VERSION = 2.28.0-dev @@ -519,7 +519,7 @@ SHARED_EXT_CORE = dll SHARED_EXT_CPP = dll SHARED_EXT_CSHARP = dll SHARED_PREFIX = -SHARED_VERSION_CORE = -9 +SHARED_VERSION_CORE = -10 SHARED_VERSION_CPP = -1 SHARED_VERSION_CSHARP = -2 else ifeq ($(SYSTEM),Darwin) @@ -3266,7 +3266,7 @@ install-shared_c: shared_c strip-shared_c install-pkg-config_c ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libaddress_sorting.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libaddress_sorting.so.9 + $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libaddress_sorting.so.10 $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libaddress_sorting.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" @@ -3275,7 +3275,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libgpr.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgpr.so.9 + $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgpr.so.10 $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgpr.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" @@ -3284,7 +3284,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libgrpc.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc.so.9 + $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc.so.10 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" @@ -3293,7 +3293,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libgrpc_cronet.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_cronet.so.9 + $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_cronet.so.10 $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_cronet.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" @@ -3302,7 +3302,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libgrpc_unsecure.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_unsecure.so.9 + $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_unsecure.so.10 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_unsecure.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" @@ -3311,7 +3311,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libupb.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libupb.so.9 + $(Q) ln -sf $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libupb.so.10 $(Q) ln -sf $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libupb.so endif ifneq ($(SYSTEM),MINGW32) @@ -3481,8 +3481,8 @@ $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): 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) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libaddress_sorting.so.9 -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) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so.9 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libaddress_sorting.so.10 -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) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so.10 $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so endif endif @@ -3967,8 +3967,8 @@ $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGPR_OB 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) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.9 -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) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so.9 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.10 -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) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so.10 $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so endif endif @@ -4438,8 +4438,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_ 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)/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.9 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.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.9 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.10 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.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.10 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so endif endif @@ -4830,8 +4830,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(L ifeq ($(SYSTEM),Darwin) $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.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_cronet.so.9 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.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_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so.9 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.10 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.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_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so.10 $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so endif endif @@ -5869,8 +5869,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $ 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)/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.9 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.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.9 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.10 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.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.10 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so endif endif @@ -8630,8 +8630,8 @@ $(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBUPB_OB 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) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb.so.9 -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) ln -sf $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).so.9 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb.so.10 -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) ln -sf $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).so.10 $(Q) ln -sf $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).so endif endif @@ -9103,6 +9103,21 @@ LIBGRPC_ABSEIL_SRC = \ third_party/abseil-cpp/absl/strings/str_split.cc \ third_party/abseil-cpp/absl/strings/string_view.cc \ third_party/abseil-cpp/absl/strings/substitute.cc \ + third_party/abseil-cpp/absl/time/civil_time.cc \ + third_party/abseil-cpp/absl/time/clock.cc \ + third_party/abseil-cpp/absl/time/duration.cc \ + third_party/abseil-cpp/absl/time/format.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc \ + third_party/abseil-cpp/absl/time/time.cc \ third_party/abseil-cpp/absl/types/bad_optional_access.cc \ diff --git a/build.yaml b/build.yaml index 0339328c36a..371d6809674 100644 --- a/build.yaml +++ b/build.yaml @@ -12,7 +12,7 @@ settings: '#08': Use "-preN" suffixes to identify pre-release versions '#09': Per-language overrides are possible with (eg) ruby_version tag here '#10': See the expand_version.py for all the quirks here - core_version: 9.0.0 + core_version: 10.0.0 csharp_major_version: 2 g_stands_for: galactic version: 1.28.0-dev @@ -275,6 +275,8 @@ filegroups: - absl/strings:str_format - absl/strings:strings - absl/types:optional + - absl/time:time + - absl/strings:str_format uses: - gpr_base_headers - name: gpr_base_headers diff --git a/build_config.rb b/build_config.rb index 46cb53f4516..bbbf04812b2 100644 --- a/build_config.rb +++ b/build_config.rb @@ -13,5 +13,5 @@ # limitations under the License. module GrpcBuildConfig - CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-9.dll' + CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-10.dll' end diff --git a/config.m4 b/config.m4 index 549854690b6..336b402e162 100644 --- a/config.m4 +++ b/config.m4 @@ -503,6 +503,21 @@ if test "$PHP_GRPC" != "no"; then third_party/abseil-cpp/absl/strings/str_split.cc \ third_party/abseil-cpp/absl/strings/string_view.cc \ third_party/abseil-cpp/absl/strings/substitute.cc \ + third_party/abseil-cpp/absl/time/civil_time.cc \ + third_party/abseil-cpp/absl/time/clock.cc \ + third_party/abseil-cpp/absl/time/duration.cc \ + third_party/abseil-cpp/absl/time/format.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc \ + third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc \ + third_party/abseil-cpp/absl/time/time.cc \ third_party/abseil-cpp/absl/types/bad_optional_access.cc \ third_party/address_sorting/address_sorting.c \ third_party/address_sorting/address_sorting_posix.c \ @@ -889,6 +904,8 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/strings) PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/strings/internal) PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/strings/internal/str_format) + PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/time) + PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/time/internal/cctz/src) PHP_ADD_BUILD_DIR($ext_builddir/third_party/abseil-cpp/absl/types) PHP_ADD_BUILD_DIR($ext_builddir/third_party/address_sorting) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel) diff --git a/config.w32 b/config.w32 index 09d57424f7e..e81a813af8f 100644 --- a/config.w32 +++ b/config.w32 @@ -472,6 +472,21 @@ if (PHP_GRPC != "no") { "third_party\\abseil-cpp\\absl\\strings\\str_split.cc " + "third_party\\abseil-cpp\\absl\\strings\\string_view.cc " + "third_party\\abseil-cpp\\absl\\strings\\substitute.cc " + + "third_party\\abseil-cpp\\absl\\time\\civil_time.cc " + + "third_party\\abseil-cpp\\absl\\time\\clock.cc " + + "third_party\\abseil-cpp\\absl\\time\\duration.cc " + + "third_party\\abseil-cpp\\absl\\time\\format.cc " + + "third_party\\abseil-cpp\\absl\\time\\internal\\cctz\\src\\civil_time_detail.cc " + + "third_party\\abseil-cpp\\absl\\time\\internal\\cctz\\src\\time_zone_fixed.cc " + + "third_party\\abseil-cpp\\absl\\time\\internal\\cctz\\src\\time_zone_format.cc " + + "third_party\\abseil-cpp\\absl\\time\\internal\\cctz\\src\\time_zone_if.cc " + + "third_party\\abseil-cpp\\absl\\time\\internal\\cctz\\src\\time_zone_impl.cc " + + "third_party\\abseil-cpp\\absl\\time\\internal\\cctz\\src\\time_zone_info.cc " + + "third_party\\abseil-cpp\\absl\\time\\internal\\cctz\\src\\time_zone_libc.cc " + + "third_party\\abseil-cpp\\absl\\time\\internal\\cctz\\src\\time_zone_lookup.cc " + + "third_party\\abseil-cpp\\absl\\time\\internal\\cctz\\src\\time_zone_posix.cc " + + "third_party\\abseil-cpp\\absl\\time\\internal\\cctz\\src\\zone_info_source.cc " + + "third_party\\abseil-cpp\\absl\\time\\time.cc " + "third_party\\abseil-cpp\\absl\\types\\bad_optional_access.cc " + "third_party\\address_sorting\\address_sorting.c " + "third_party\\address_sorting\\address_sorting_posix.c " + @@ -923,6 +938,10 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\strings"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\strings\\internal"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\strings\\internal\\str_format"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\time"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\time\\internal"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\time\\internal\\cctz"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\time\\internal\\cctz\\src"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\abseil-cpp\\absl\\types"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\address_sorting"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index e8bfc85d55f..efbc7b37ce9 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -218,6 +218,7 @@ Pod::Spec.new do |s| ss.dependency 'abseil/memory/memory', abseil_version ss.dependency 'abseil/strings/str_format', abseil_version ss.dependency 'abseil/strings/strings', abseil_version + ss.dependency 'abseil/time/time', abseil_version ss.dependency 'abseil/types/optional', abseil_version ss.source_files = 'include/grpcpp/impl/codegen/core_codegen.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index d1eb9401223..a020e2e0a83 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -178,6 +178,7 @@ Pod::Spec.new do |s| ss.dependency 'abseil/memory/memory', abseil_version ss.dependency 'abseil/strings/str_format', abseil_version ss.dependency 'abseil/strings/strings', abseil_version + ss.dependency 'abseil/time/time', abseil_version ss.dependency 'abseil/types/optional', abseil_version ss.compiler_flags = '-DGRPC_SHADOW_BORINGSSL_SYMBOLS' diff --git a/grpc.gemspec b/grpc.gemspec index 584008f58a2..c8cbf110159 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -1002,6 +1002,37 @@ Gem::Specification.new do |s| s.files += %w( third_party/abseil-cpp/absl/strings/strip.h ) s.files += %w( third_party/abseil-cpp/absl/strings/substitute.cc ) s.files += %w( third_party/abseil-cpp/absl/strings/substitute.h ) + s.files += %w( third_party/abseil-cpp/absl/time/civil_time.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/civil_time.h ) + s.files += %w( third_party/abseil-cpp/absl/time/clock.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/clock.h ) + s.files += %w( third_party/abseil-cpp/absl/time/duration.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/format.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time.h ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.h ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.h ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.h ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.h ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.h ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/get_current_time_chrono.inc ) + s.files += %w( third_party/abseil-cpp/absl/time/internal/get_current_time_posix.inc ) + s.files += %w( third_party/abseil-cpp/absl/time/time.cc ) + s.files += %w( third_party/abseil-cpp/absl/time/time.h ) s.files += %w( third_party/abseil-cpp/absl/types/bad_optional_access.cc ) s.files += %w( third_party/abseil-cpp/absl/types/bad_optional_access.h ) s.files += %w( third_party/abseil-cpp/absl/types/internal/optional.h ) diff --git a/grpc.gyp b/grpc.gyp index 53eb755bec5..d8bba80b271 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -446,6 +446,7 @@ 'absl/strings:str_format', 'absl/strings:strings', 'absl/types:optional', + 'absl/time:time', ], 'sources': [ 'src/core/lib/gpr/alloc.cc', diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index 67af9864356..e0b8baf489e 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -425,6 +425,11 @@ typedef struct { size_t* num_creds_md, grpc_status_code* status, const char** error_details); + /** Implements debug string of the given plugin. This method returns an + * allocated string that the caller needs to free using gpr_free() + * */ + char* (*debug_string)(void* state); + /** Destroys the plugin state. */ void (*destroy)(void* state); diff --git a/include/grpcpp/security/credentials_impl.h b/include/grpcpp/security/credentials_impl.h index 08415171d21..9873cba3f7e 100644 --- a/include/grpcpp/security/credentials_impl.h +++ b/include/grpcpp/security/credentials_impl.h @@ -115,6 +115,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() { return "CallCredentials{}"; } protected: friend std::shared_ptr CompositeChannelCredentials( @@ -250,6 +251,10 @@ class MetadataCredentialsPlugin { grpc::string_ref service_url, grpc::string_ref method_name, const grpc::AuthContext& channel_auth_context, std::multimap* metadata) = 0; + + virtual grpc::string DebugString() const { + return "MetadataCredentialsPlugin"; + } }; std::shared_ptr MetadataCredentialsFromPlugin( diff --git a/package.xml b/package.xml index d3b65fe366b..029ed2459f8 100644 --- a/package.xml +++ b/package.xml @@ -1004,6 +1004,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/core/lib/security/credentials/composite/composite_credentials.cc b/src/core/lib/security/credentials/composite/composite_credentials.cc index dc19e234101..8303342aa80 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.cc +++ b/src/core/lib/security/credentials/composite/composite_credentials.cc @@ -116,6 +116,22 @@ void grpc_composite_call_credentials::cancel_get_request_metadata( GRPC_ERROR_UNREF(error); } +std::string grpc_composite_call_credentials::debug_string() const { + std::string debug_str("CompositeCallCredentials"); + if (inner_.empty()) { + return debug_str; + } + debug_str.append("{"); + for (size_t i = 0; i < inner_.size(); ++i) { + debug_str.append(inner_[i]->debug_string()); + if (i != inner_.size() - 1) { + debug_str.append(","); + } + } + debug_str.append("}"); + return debug_str; +} + static size_t get_creds_array_size(const grpc_call_credentials* creds, bool is_composite) { return is_composite diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h index 74d55bbc416..d0f22d75e06 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.h +++ b/src/core/lib/security/credentials/composite/composite_credentials.h @@ -21,6 +21,8 @@ #include +#include + #include "src/core/lib/gprpp/inlined_vector.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/credentials/credentials.h" @@ -91,6 +93,7 @@ class grpc_composite_call_credentials : public grpc_call_credentials { } const CallCredentialsList& inner() const { return inner_; } + std::string debug_string() const override; private: void push_to_inner(grpc_core::RefCountedPtr creds, diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 65996fd09e4..5c677546479 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -21,6 +21,8 @@ #include +#include + #include #include #include @@ -252,6 +254,8 @@ struct grpc_call_credentials return min_security_level_; } + virtual std::string debug_string() const { return ""; } + const char* type() const { return type_; } private: diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h index 411cfa95b54..a5b87391db9 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.h +++ b/src/core/lib/security/credentials/fake/fake_credentials.h @@ -21,6 +21,8 @@ #include +#include + #include "src/core/lib/security/credentials/credentials.h" #define GRPC_ARG_FAKE_SECURITY_EXPECTED_TARGETS \ @@ -75,6 +77,10 @@ class grpc_md_only_test_credentials : public grpc_call_credentials { void cancel_get_request_metadata(grpc_credentials_mdelem_array* md_array, grpc_error* error) override; + std::string debug_string() const override { + return "MD only Test Credentials"; + }; + private: grpc_mdelem md_; bool is_async_; diff --git a/src/core/lib/security/credentials/iam/iam_credentials.cc b/src/core/lib/security/credentials/iam/iam_credentials.cc index 94e3d28fd6e..092a306dfe2 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.cc +++ b/src/core/lib/security/credentials/iam/iam_credentials.cc @@ -20,8 +20,6 @@ #include "src/core/lib/security/credentials/iam/iam_credentials.h" -#include - #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/surface/api_trace.h" @@ -30,6 +28,10 @@ #include #include +#include "absl/strings/str_format.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/surface/api_trace.h" + grpc_google_iam_credentials::~grpc_google_iam_credentials() { grpc_credentials_mdelem_array_destroy(&md_array_); } @@ -60,6 +62,9 @@ grpc_google_iam_credentials::grpc_google_iam_credentials( grpc_slice_from_copied_string(authority_selector)); grpc_credentials_mdelem_array_add(&md_array_, md); GRPC_MDELEM_UNREF(md); + debug_string_ = absl::StrFormat( + "GoogleIAMCredentials{Token:%s,AuthoritySelector:%s}", + token != nullptr ? "present" : "absent", authority_selector); } grpc_call_credentials* grpc_google_iam_credentials_create( diff --git a/src/core/lib/security/credentials/iam/iam_credentials.h b/src/core/lib/security/credentials/iam/iam_credentials.h index 36f5ee89307..3d061a1d395 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.h +++ b/src/core/lib/security/credentials/iam/iam_credentials.h @@ -21,6 +21,8 @@ #include +#include + #include "src/core/lib/security/credentials/credentials.h" class grpc_google_iam_credentials : public grpc_call_credentials { @@ -37,9 +39,11 @@ class grpc_google_iam_credentials : public grpc_call_credentials { void cancel_get_request_metadata(grpc_credentials_mdelem_array* md_array, grpc_error* error) override; + std::string debug_string() const override { return debug_string_; } private: grpc_credentials_mdelem_array md_array_; + std::string debug_string_; }; #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_IAM_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.cc b/src/core/lib/security/credentials/jwt/jwt_credentials.cc index bed594e5d92..6c39ca48dea 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.cc +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.cc @@ -21,7 +21,6 @@ #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" #include -#include #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h index 5af909f44df..16875beb7c4 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.h +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h @@ -21,6 +21,12 @@ #include +#include + +#include + +#include "absl/strings/str_format.h" +#include "absl/time/time.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/jwt/json_token.h" @@ -43,6 +49,12 @@ class grpc_service_account_jwt_access_credentials const gpr_timespec& jwt_lifetime() const { return jwt_lifetime_; } const grpc_auth_json_key& key() const { return key_; } + std::string debug_string() const override { + return absl::StrFormat("JWTAccessCredentials{ExpirationTime:%s}", + absl::FormatTime(absl::FromUnixMicros( + gpr_timespec_to_micros(jwt_lifetime_)))); + }; + private: void reset_cache(); diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index 3a6d19c11ec..5595984931c 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -21,8 +21,6 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" -#include - #include #include #include @@ -358,6 +356,10 @@ grpc_oauth2_token_fetcher_credentials::grpc_oauth2_token_fetcher_credentials() grpc_httpcli_context_init(&httpcli_context_); } +std::string grpc_oauth2_token_fetcher_credentials::debug_string() const { + return "OAuth2TokenFetcherCredentials"; +} + // // Google Compute Engine credentials. // @@ -396,6 +398,12 @@ class grpc_compute_engine_token_fetcher_credentials grpc_resource_quota_unref_internal(resource_quota); } + std::string debug_string() const override { + return absl::StrFormat( + "GoogleComputeEngineTokenFetcherCredentials{%s}", + grpc_oauth2_token_fetcher_credentials::debug_string()); + } + private: grpc_closure http_get_cb_closure_; }; @@ -468,6 +476,12 @@ grpc_refresh_token_credentials_create_from_auth_refresh_token( refresh_token); } +std::string grpc_google_refresh_token_credentials::debug_string() const { + return absl::StrFormat("GoogleRefreshToken{ClientID:%s,%s}", + refresh_token_.client_id, + grpc_oauth2_token_fetcher_credentials::debug_string()); +} + static char* create_loggable_refresh_token(grpc_auth_refresh_token* token) { if (strcmp(token->type, GRPC_AUTH_JSON_TYPE_INVALID) == 0) { return gpr_strdup(""); @@ -540,6 +554,13 @@ class StsTokenFetcherCredentials ~StsTokenFetcherCredentials() override { grpc_uri_destroy(sts_url_); } + std::string debug_string() const override { + return absl::StrFormat( + "StsTokenFetcherCredentials{Path:%s,Authority:%s,%s}", sts_url_->path, + sts_url_->authority, + grpc_oauth2_token_fetcher_credentials::debug_string()); + } + private: void fetch_oauth2(grpc_credentials_metadata_request* metadata_req, grpc_httpcli_context* http_context, @@ -731,6 +752,12 @@ grpc_access_token_credentials::grpc_access_token_credentials( gpr_free(token_md_value); } +std::string grpc_access_token_credentials::debug_string() const { + bool access_token_present = !GRPC_MDISNULL(access_token_md_); + return absl::StrFormat("AccessTokenCredentials{Token:%s}", + access_token_present ? "present" : "absent"); +} + grpc_call_credentials* grpc_access_token_credentials_create( const char* access_token, void* reserved) { GRPC_API_TRACE( diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index 97579522950..48562a66763 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -21,7 +21,11 @@ #include +#include + #include +#include "absl/strings/str_format.h" +#include "absl/time/time.h" #include "src/core/lib/json/json.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/uri/uri_parser.h" @@ -84,6 +88,7 @@ class grpc_oauth2_token_fetcher_credentials : public grpc_call_credentials { void on_http_response(grpc_credentials_metadata_request* r, grpc_error* error); + std::string debug_string() const override; protected: virtual void fetch_oauth2(grpc_credentials_metadata_request* req, @@ -112,6 +117,8 @@ class grpc_google_refresh_token_credentials final return refresh_token_; } + std::string debug_string() const override; + protected: void fetch_oauth2(grpc_credentials_metadata_request* req, grpc_httpcli_context* httpcli_context, @@ -138,6 +145,8 @@ class grpc_access_token_credentials final : public grpc_call_credentials { void cancel_get_request_metadata(grpc_credentials_mdelem_array* md_array, grpc_error* error) override; + std::string debug_string() const override; + private: grpc_mdelem access_token_md_; }; diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.cc b/src/core/lib/security/credentials/plugin/plugin_credentials.cc index 24351bcf42b..f078f727580 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.cc +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.cc @@ -42,6 +42,16 @@ grpc_plugin_credentials::~grpc_plugin_credentials() { } } +std::string grpc_plugin_credentials::debug_string() const { + if (plugin_.debug_string != nullptr) { + char* debug_c_str = plugin_.debug_string(plugin_.state); + std::string debug_str(debug_c_str); + gpr_free(debug_c_str); + return debug_str; + } + return ""; +} + void grpc_plugin_credentials::pending_request_remove_locked( pending_request* pending_request) { if (pending_request->prev == nullptr) { diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.h b/src/core/lib/security/credentials/plugin/plugin_credentials.h index fb9a7b71348..413f767d2e3 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.h +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.h @@ -59,6 +59,8 @@ struct grpc_plugin_credentials final : public grpc_call_credentials { // cancelled before completion. void pending_request_complete(pending_request* r); + std::string debug_string() const override; + private: void pending_request_remove_locked(pending_request* pending_request); diff --git a/src/core/lib/surface/version.cc b/src/core/lib/surface/version.cc index 9b512a8bcde..3362b23008b 100644 --- a/src/core/lib/surface/version.cc +++ b/src/core/lib/surface/version.cc @@ -23,6 +23,6 @@ #include -const char* grpc_version_string(void) { return "9.0.0"; } +const char* grpc_version_string(void) { return "10.0.0"; } const char* grpc_g_stands_for(void) { return "galactic"; } diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 33f56d3c340..3d4e43da4d7 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -257,6 +258,7 @@ std::shared_ptr MetadataCredentialsFromPlugin( new grpc::MetadataCredentialsPluginWrapper(std::move(plugin)); grpc_metadata_credentials_plugin c_plugin = { grpc::MetadataCredentialsPluginWrapper::GetMetadata, + grpc::MetadataCredentialsPluginWrapper::DebugString, grpc::MetadataCredentialsPluginWrapper::Destroy, wrapper, type}; return WrapCallCredentials(grpc_metadata_credentials_create_from_plugin( c_plugin, min_security_level, nullptr)); @@ -379,6 +381,7 @@ std::shared_ptr MetadataCredentialsFromPlugin( new grpc::MetadataCredentialsPluginWrapper(std::move(plugin)); grpc_metadata_credentials_plugin c_plugin = { grpc::MetadataCredentialsPluginWrapper::GetMetadata, + grpc::MetadataCredentialsPluginWrapper::DebugString, grpc::MetadataCredentialsPluginWrapper::Destroy, wrapper, type}; return WrapCallCredentials(grpc_metadata_credentials_create_from_plugin( c_plugin, GRPC_PRIVACY_AND_INTEGRITY, nullptr)); @@ -395,6 +398,14 @@ void DeleteWrapper(void* wrapper, grpc_error* /*ignored*/) { } } // namespace +char* MetadataCredentialsPluginWrapper::DebugString(void* wrapper) { + GPR_ASSERT(wrapper); + MetadataCredentialsPluginWrapper* w = + static_cast(wrapper); + char* debug_str = gpr_strdup(w->plugin_->DebugString().c_str()); + return debug_str; +} + void MetadataCredentialsPluginWrapper::Destroy(void* wrapper) { if (wrapper == nullptr) return; grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; diff --git a/src/cpp/client/secure_credentials.h b/src/cpp/client/secure_credentials.h index 2c817270ad9..c8f8529338d 100644 --- a/src/cpp/client/secure_credentials.h +++ b/src/cpp/client/secure_credentials.h @@ -65,6 +65,10 @@ class SecureCallCredentials final : public CallCredentials { bool ApplyToCall(grpc_call* call) override; SecureCallCredentials* AsSecureCredentials() override { return this; } + grpc::string DebugString() override { + return "SecureCallCredentials{" + grpc::string(c_creds_->debug_string()) + + "}"; + } private: grpc_call_credentials* const c_creds_; @@ -93,6 +97,7 @@ class MetadataCredentialsPluginWrapper final : private GrpcLibraryCodegen { grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX], size_t* num_creds_md, grpc_status_code* status, const char** error_details); + static char* DebugString(void* wrapper); explicit MetadataCredentialsPluginWrapper( std::unique_ptr plugin); diff --git a/src/objective-c/tests/version.h b/src/objective-c/tests/version.h index 8a9cd1d5dec..5b6a64920dd 100644 --- a/src/objective-c/tests/version.h +++ b/src/objective-c/tests/version.h @@ -23,4 +23,4 @@ // `tools/buildgen/generate_projects.sh`. #define GRPC_OBJC_VERSION_STRING @"1.28.0-dev" -#define GRPC_C_VERSION_STRING @"9.0.0" +#define GRPC_C_VERSION_STRING @"10.0.0" diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 1fbf25a1444..c9e7e04cbb0 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -471,6 +471,21 @@ CORE_SOURCE_FILES = [ 'third_party/abseil-cpp/absl/strings/str_split.cc', 'third_party/abseil-cpp/absl/strings/string_view.cc', 'third_party/abseil-cpp/absl/strings/substitute.cc', + 'third_party/abseil-cpp/absl/time/civil_time.cc', + 'third_party/abseil-cpp/absl/time/clock.cc', + 'third_party/abseil-cpp/absl/time/duration.cc', + 'third_party/abseil-cpp/absl/time/format.cc', + 'third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc', + 'third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc', + 'third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc', + 'third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc', + 'third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc', + 'third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc', + 'third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc', + 'third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc', + 'third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc', + 'third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc', + 'third_party/abseil-cpp/absl/time/time.cc', 'third_party/abseil-cpp/absl/types/bad_optional_access.cc', 'third_party/address_sorting/address_sorting.c', 'third_party/address_sorting/address_sorting_posix.c', diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index b58973d4c34..d938d46f6c3 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -613,6 +613,9 @@ static void test_compute_engine_creds_success() { grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; + const char expected_creds_debug_string[] = + "GoogleComputeEngineTokenFetcherCredentials{" + "OAuth2TokenFetcherCredentials}"; grpc_call_credentials* creds = grpc_google_compute_engine_credentials_create(nullptr); grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, @@ -636,12 +639,17 @@ static void test_compute_engine_creds_success() { run_request_metadata_test(creds, auth_md_ctx, state); grpc_core::ExecCtx::Get()->Flush(); + GPR_ASSERT( + !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); } static void test_compute_engine_creds_failure(void) { grpc_core::ExecCtx exec_ctx; + const char expected_creds_debug_string[] = + "GoogleComputeEngineTokenFetcherCredentials{" + "OAuth2TokenFetcherCredentials}"; request_metadata_state* state = make_request_metadata_state( GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Error occurred when fetching oauth2 token."), @@ -653,6 +661,8 @@ static void test_compute_engine_creds_failure(void) { grpc_httpcli_set_override(compute_engine_httpcli_get_failure_override, httpcli_post_should_not_be_called); run_request_metadata_test(creds, auth_md_ctx, state); + GPR_ASSERT( + !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); } @@ -705,6 +715,9 @@ static void test_refresh_token_creds_success(void) { grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; + const char expected_creds_debug_string[] = + "GoogleRefreshToken{ClientID:32555999999.apps.googleusercontent.com," + "OAuth2TokenFetcherCredentials}"; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; grpc_call_credentials* creds = grpc_google_refresh_token_credentials_create( @@ -728,6 +741,8 @@ static void test_refresh_token_creds_success(void) { httpcli_post_should_not_be_called); run_request_metadata_test(creds, auth_md_ctx, state); grpc_core::ExecCtx::Get()->Flush(); + GPR_ASSERT( + !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); @@ -735,6 +750,9 @@ static void test_refresh_token_creds_success(void) { static void test_refresh_token_creds_failure(void) { grpc_core::ExecCtx exec_ctx; + const char expected_creds_debug_string[] = + "GoogleRefreshToken{ClientID:32555999999.apps.googleusercontent.com," + "OAuth2TokenFetcherCredentials}"; request_metadata_state* state = make_request_metadata_state( GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Error occurred when fetching oauth2 token."), @@ -746,6 +764,9 @@ static void test_refresh_token_creds_failure(void) { grpc_httpcli_set_override(httpcli_get_should_not_be_called, token_httpcli_post_failure); run_request_metadata_test(creds, auth_md_ctx, state); + GPR_ASSERT( + !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); } @@ -939,6 +960,9 @@ static void test_sts_creds_success(void) { grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; + const char expected_creds_debug_string[] = + "StsTokenFetcherCredentials{Path:/v1/" + "token-exchange,Authority:foo.com:5555,OAuth2TokenFetcherCredentials}"; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; char* subject_token_path = write_tmp_jwt_file(test_signed_jwt); @@ -975,6 +999,8 @@ static void test_sts_creds_success(void) { httpcli_post_should_not_be_called); run_request_metadata_test(creds, auth_md_ctx, state); grpc_core::ExecCtx::Get()->Flush(); + GPR_ASSERT( + !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); @@ -1021,6 +1047,9 @@ static void test_sts_creds_no_actor_token_success(void) { grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; + const char expected_creds_debug_string[] = + "StsTokenFetcherCredentials{Path:/v1/" + "token-exchange,Authority:foo.com:5555,OAuth2TokenFetcherCredentials}"; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; char* subject_token_path = write_tmp_jwt_file(test_signed_jwt); @@ -1056,6 +1085,8 @@ static void test_sts_creds_no_actor_token_success(void) { httpcli_post_should_not_be_called); run_request_metadata_test(creds, auth_md_ctx, state); grpc_core::ExecCtx::Get()->Flush(); + GPR_ASSERT( + !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); @@ -1063,6 +1094,9 @@ static void test_sts_creds_no_actor_token_success(void) { } static void test_sts_creds_load_token_failure(void) { + const char expected_creds_debug_string[] = + "StsTokenFetcherCredentials{Path:/v1/" + "token-exchange,Authority:foo.com:5555,OAuth2TokenFetcherCredentials}"; grpc_core::ExecCtx exec_ctx; request_metadata_state* state = make_request_metadata_state( GRPC_ERROR_CREATE_FROM_STATIC_STRING( @@ -1086,12 +1120,18 @@ static void test_sts_creds_load_token_failure(void) { grpc_httpcli_set_override(httpcli_get_should_not_be_called, httpcli_post_should_not_be_called); run_request_metadata_test(creds, auth_md_ctx, state); + GPR_ASSERT( + !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); gpr_free(test_signed_jwt_path); } static void test_sts_creds_http_failure(void) { + const char expected_creds_debug_string[] = + "StsTokenFetcherCredentials{Path:/v1/" + "token-exchange,Authority:foo.com:5555,OAuth2TokenFetcherCredentials}"; grpc_core::ExecCtx exec_ctx; request_metadata_state* state = make_request_metadata_state( GRPC_ERROR_CREATE_FROM_STATIC_STRING( @@ -1116,6 +1156,8 @@ static void test_sts_creds_http_failure(void) { grpc_httpcli_set_override(httpcli_get_should_not_be_called, token_httpcli_post_failure); run_request_metadata_test(creds, auth_md_ctx, state); + GPR_ASSERT( + !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); gpr_free(test_signed_jwt_path); @@ -1176,7 +1218,8 @@ static grpc_service_account_jwt_access_credentials* creds_as_jwt( static void test_jwt_creds_lifetime(void) { char* json_key_string = test_json_key_str(); - + const char expected_creds_debug_string_prefix[] = + "JWTAccessCredentials{ExpirationTime:"; // Max lifetime. grpc_call_credentials* jwt_creds = grpc_service_account_jwt_access_credentials_create( @@ -1185,6 +1228,9 @@ static void test_jwt_creds_lifetime(void) { grpc_max_auth_token_lifetime()) == 0); /* Check security level. */ GPR_ASSERT(jwt_creds->min_security_level() == GRPC_PRIVACY_AND_INTEGRITY); + GPR_ASSERT(!gpr_strincmp(expected_creds_debug_string_prefix, + jwt_creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix))); grpc_call_credentials_release(jwt_creds); // Shorter lifetime. @@ -1194,6 +1240,9 @@ static void test_jwt_creds_lifetime(void) { json_key_string, token_lifetime, nullptr); GPR_ASSERT(gpr_time_cmp(creds_as_jwt(jwt_creds)->jwt_lifetime(), token_lifetime) == 0); + GPR_ASSERT(!gpr_strincmp(expected_creds_debug_string_prefix, + jwt_creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix))); grpc_call_credentials_release(jwt_creds); // Cropped lifetime. @@ -1203,12 +1252,18 @@ static void test_jwt_creds_lifetime(void) { json_key_string, token_lifetime, nullptr); GPR_ASSERT(gpr_time_cmp(creds_as_jwt(jwt_creds)->jwt_lifetime(), grpc_max_auth_token_lifetime()) == 0); + GPR_ASSERT(!gpr_strincmp(expected_creds_debug_string_prefix, + jwt_creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix))); grpc_call_credentials_release(jwt_creds); gpr_free(json_key_string); } static void test_jwt_creds_success(void) { + const char expected_creds_debug_string_prefix[] = + "JWTAccessCredentials{ExpirationTime:"; + char* json_key_string = test_json_key_str(); grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, @@ -1243,6 +1298,9 @@ static void test_jwt_creds_success(void) { grpc_jwt_encode_and_sign_set_override(encode_and_sign_jwt_success); run_request_metadata_test(creds, auth_md_ctx, state); grpc_core::ExecCtx::Get()->Flush(); + GPR_ASSERT(!gpr_strincmp(expected_creds_debug_string_prefix, + creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix))); creds->Unref(); gpr_free(json_key_string); @@ -1251,6 +1309,8 @@ static void test_jwt_creds_success(void) { } static void test_jwt_creds_signing_failure(void) { + const char expected_creds_debug_string_prefix[] = + "JWTAccessCredentials{ExpirationTime:"; char* json_key_string = test_json_key_str(); grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, @@ -1266,6 +1326,10 @@ static void test_jwt_creds_signing_failure(void) { run_request_metadata_test(creds, auth_md_ctx, state); gpr_free(json_key_string); + GPR_ASSERT(!gpr_strincmp(expected_creds_debug_string_prefix, + creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix))); + creds->Unref(); grpc_jwt_encode_and_sign_set_override(nullptr); } @@ -1513,7 +1577,29 @@ static void plugin_destroy(void* state) { *s = PLUGIN_DESTROY_CALLED_STATE; } +static char* plugin_debug_string(void* state) { + plugin_state* s = static_cast(state); + char* ret = nullptr; + switch (*s) { + case PLUGIN_INITIAL_STATE: + gpr_asprintf(&ret, "TestPluginCredentials{state:INITIAL}"); + break; + case PLUGIN_GET_METADATA_CALLED_STATE: + gpr_asprintf(&ret, "TestPluginCredentials{state:GET_METADATA_CALLED}"); + break; + case PLUGIN_DESTROY_CALLED_STATE: + gpr_asprintf(&ret, "TestPluginCredentials{state:DESTROY}"); + break; + default: + gpr_asprintf(&ret, "TestPluginCredentials{state:UNKNOWN}"); + break; + } + return ret; +} + static void test_metadata_plugin_success(void) { + const char expected_creds_debug_string[] = + "TestPluginCredentials{state:GET_METADATA_CALLED}"; plugin_state state = PLUGIN_INITIAL_STATE; grpc_metadata_credentials_plugin plugin; grpc_core::ExecCtx exec_ctx; @@ -1525,6 +1611,7 @@ static void test_metadata_plugin_success(void) { plugin.state = &state; plugin.get_metadata = plugin_get_metadata_success; plugin.destroy = plugin_destroy; + plugin.debug_string = plugin_debug_string; grpc_call_credentials* creds = grpc_metadata_credentials_create_from_plugin( plugin, GRPC_PRIVACY_AND_INTEGRITY, nullptr); @@ -1533,12 +1620,17 @@ static void test_metadata_plugin_success(void) { GPR_ASSERT(state == PLUGIN_INITIAL_STATE); run_request_metadata_test(creds, auth_md_ctx, md_state); GPR_ASSERT(state == PLUGIN_GET_METADATA_CALLED_STATE); + GPR_ASSERT( + !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); creds->Unref(); GPR_ASSERT(state == PLUGIN_DESTROY_CALLED_STATE); } static void test_metadata_plugin_failure(void) { + const char expected_creds_debug_string[] = + "TestPluginCredentials{state:GET_METADATA_CALLED}"; + plugin_state state = PLUGIN_INITIAL_STATE; grpc_metadata_credentials_plugin plugin; grpc_core::ExecCtx exec_ctx; @@ -1555,12 +1647,15 @@ static void test_metadata_plugin_failure(void) { plugin.state = &state; plugin.get_metadata = plugin_get_metadata_failure; plugin.destroy = plugin_destroy; + plugin.debug_string = plugin_debug_string; grpc_call_credentials* creds = grpc_metadata_credentials_create_from_plugin( plugin, GRPC_PRIVACY_AND_INTEGRITY, nullptr); GPR_ASSERT(state == PLUGIN_INITIAL_STATE); run_request_metadata_test(creds, auth_md_ctx, md_state); GPR_ASSERT(state == PLUGIN_GET_METADATA_CALLED_STATE); + GPR_ASSERT( + !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); creds->Unref(); GPR_ASSERT(state == PLUGIN_DESTROY_CALLED_STATE); @@ -1599,6 +1694,8 @@ static void test_get_well_known_google_credentials_file_path(void) { } static void test_channel_creds_duplicate_without_call_creds(void) { + const char expected_creds_debug_string[] = + "AccessTokenCredentials{Token:present}"; grpc_core::ExecCtx exec_ctx; grpc_channel_credentials* channel_creds = @@ -1614,6 +1711,9 @@ static void test_channel_creds_duplicate_without_call_creds(void) { grpc_channel_credentials* composite_creds = grpc_composite_channel_credentials_create(channel_creds, call_creds, nullptr); + GPR_ASSERT(!gpr_stricmp(call_creds->debug_string().c_str(), + expected_creds_debug_string)); + call_creds->Unref(); dup = composite_creds->duplicate_without_call_credentials(); GPR_ASSERT(dup == channel_creds); diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 33113942151..1c20e7da731 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -31,10 +31,12 @@ #include #include #include +#include #include #include +#include "absl/strings/str_format.h" #include "src/core/ext/filters/client_channel/backup_poller.h" #include "src/core/lib/gpr/env.h" #include "src/core/lib/iomgr/iomgr.h" @@ -85,6 +87,58 @@ bool CheckIsLocalhost(const grpc::string& addr) { const char kTestCredsPluginErrorMsg[] = "Could not find plugin metadata."; +const char kFakeToken[] = "fake_token"; +const char kFakeSelector[] = "fake_selector"; +const char kExpectedFakeCredsDebugString[] = + "SecureCallCredentials{GoogleIAMCredentials{Token:present," + "AuthoritySelector:fake_selector}}"; + +const char kWrongToken[] = "wrong_token"; +const char kWrongSelector[] = "wrong_selector"; +const char kExpectedWrongCredsDebugString[] = + "SecureCallCredentials{GoogleIAMCredentials{Token:present," + "AuthoritySelector:wrong_selector}}"; + +const char kFakeToken1[] = "fake_token1"; +const char kFakeSelector1[] = "fake_selector1"; +const char kExpectedFakeCreds1DebugString[] = + "SecureCallCredentials{GoogleIAMCredentials{Token:present," + "AuthoritySelector:fake_selector1}}"; + +const char kFakeToken2[] = "fake_token2"; +const char kFakeSelector2[] = "fake_selector2"; +const char kExpectedFakeCreds2DebugString[] = + "SecureCallCredentials{GoogleIAMCredentials{Token:present," + "AuthoritySelector:fake_selector2}}"; + +const char kExpectedAuthMetadataPluginKeyFailureCredsDebugString[] = + "SecureCallCredentials{TestMetadataCredentials{key:TestPluginMetadata," + "value:Does not matter, will fail the key is invalid.}}"; +const char kExpectedAuthMetadataPluginValueFailureCredsDebugString[] = + "SecureCallCredentials{TestMetadataCredentials{key:test-plugin-metadata," + "value:With illegal \n value.}}"; +const char kExpectedAuthMetadataPluginWithDeadlineCredsDebugString[] = + "SecureCallCredentials{TestMetadataCredentials{key:meta_key,value:Does not " + "matter}}"; +const char kExpectedNonBlockingAuthMetadataPluginFailureCredsDebugString[] = + "SecureCallCredentials{TestMetadataCredentials{key:test-plugin-metadata," + "value:Does not matter, will fail anyway (see 3rd param)}}"; +const char + kExpectedNonBlockingAuthMetadataPluginAndProcessorSuccessCredsDebugString + [] = "SecureCallCredentials{TestMetadataCredentials{key:test-plugin-" + "metadata,value:Dr Jekyll}}"; +const char + kExpectedNonBlockingAuthMetadataPluginAndProcessorFailureCredsDebugString + [] = "SecureCallCredentials{TestMetadataCredentials{key:test-plugin-" + "metadata,value:Mr Hyde}}"; +const char kExpectedBlockingAuthMetadataPluginFailureCredsDebugString[] = + "SecureCallCredentials{TestMetadataCredentials{key:test-plugin-metadata," + "value:Does not matter, will fail anyway (see 3rd param)}}"; +const char kExpectedCompositeCallCredsDebugString[] = + "SecureCallCredentials{CompositeCallCredentials{TestMetadataCredentials{" + "key:call-creds-key1,value:call-creds-val1},TestMetadataCredentials{key:" + "call-creds-key2,value:call-creds-val2}}}"; + class TestMetadataCredentialsPlugin : public MetadataCredentialsPlugin { public: static const char kGoodMetadataKey[]; @@ -123,6 +177,11 @@ class TestMetadataCredentialsPlugin : public MetadataCredentialsPlugin { } } + grpc::string DebugString() const 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_; @@ -1760,7 +1819,7 @@ TEST_P(SecureEnd2endTest, SetPerCallCredentials) { EchoResponse response; ClientContext context; std::shared_ptr creds = - GoogleIAMCredentials("fake_token", "fake_selector"); + GoogleIAMCredentials(kFakeToken, kFakeSelector); context.set_credentials(creds); request.set_message("Hello"); request.mutable_param()->set_echo_metadata(true); @@ -1770,10 +1829,12 @@ TEST_P(SecureEnd2endTest, SetPerCallCredentials) { EXPECT_TRUE(s.ok()); EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, - "fake_token")); + kFakeToken)); EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, - "fake_selector")); + kFakeSelector)); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedFakeCredsDebugString); } class CredentialsInterceptor : public experimental::Interceptor { @@ -1784,7 +1845,7 @@ class CredentialsInterceptor : public experimental::Interceptor { if (methods->QueryInterceptionHookPoint( experimental::InterceptionHookPoints::PRE_SEND_INITIAL_METADATA)) { std::shared_ptr creds = - GoogleIAMCredentials("fake_token", "fake_selector"); + GoogleIAMCredentials(kFakeToken, kFakeSelector); info_->client_context()->set_credentials(creds); } methods->Proceed(); @@ -1824,10 +1885,12 @@ TEST_P(SecureEnd2endTest, CallCredentialsInterception) { EXPECT_TRUE(s.ok()); EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, - "fake_token")); + kFakeToken)); EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, - "fake_selector")); + kFakeSelector)); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedFakeCredsDebugString); } TEST_P(SecureEnd2endTest, CallCredentialsInterceptionWithSetCredentials) { @@ -1844,9 +1907,11 @@ TEST_P(SecureEnd2endTest, CallCredentialsInterceptionWithSetCredentials) { EchoResponse response; ClientContext context; std::shared_ptr creds1 = - GoogleIAMCredentials("wrong_token", "wrong_selector"); + GoogleIAMCredentials(kWrongToken, kWrongSelector); context.set_credentials(creds1); EXPECT_EQ(context.credentials(), creds1); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedWrongCredsDebugString); request.set_message("Hello"); request.mutable_param()->set_echo_metadata(true); @@ -1855,10 +1920,12 @@ TEST_P(SecureEnd2endTest, CallCredentialsInterceptionWithSetCredentials) { EXPECT_TRUE(s.ok()); EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, - "fake_token")); + kFakeToken)); EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, - "fake_selector")); + kFakeSelector)); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedFakeCredsDebugString); } TEST_P(SecureEnd2endTest, OverridePerCallCredentials) { @@ -1868,11 +1935,13 @@ TEST_P(SecureEnd2endTest, OverridePerCallCredentials) { EchoResponse response; ClientContext context; std::shared_ptr creds1 = - GoogleIAMCredentials("fake_token1", "fake_selector1"); + GoogleIAMCredentials(kFakeToken1, kFakeSelector1); context.set_credentials(creds1); EXPECT_EQ(context.credentials(), creds1); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedFakeCreds1DebugString); std::shared_ptr creds2 = - GoogleIAMCredentials("fake_token2", "fake_selector2"); + GoogleIAMCredentials(kFakeToken2, kFakeSelector2); context.set_credentials(creds2); EXPECT_EQ(context.credentials(), creds2); request.set_message("Hello"); @@ -1881,16 +1950,18 @@ TEST_P(SecureEnd2endTest, OverridePerCallCredentials) { Status s = stub_->Echo(&context, request, &response); EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, - "fake_token2")); + kFakeToken2)); EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, - "fake_selector2")); + kFakeSelector2)); EXPECT_FALSE(MetadataContains(context.GetServerTrailingMetadata(), GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, - "fake_token1")); + kFakeToken1)); EXPECT_FALSE(MetadataContains(context.GetServerTrailingMetadata(), GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, - "fake_selector1")); + kFakeSelector1)); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedFakeCreds2DebugString); EXPECT_EQ(request.message(), response.message()); EXPECT_TRUE(s.ok()); } @@ -1912,6 +1983,8 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginKeyFailure) { Status s = stub_->Echo(&context, request, &response); EXPECT_FALSE(s.ok()); EXPECT_EQ(s.error_code(), StatusCode::UNAVAILABLE); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedAuthMetadataPluginKeyFailureCredsDebugString); } TEST_P(SecureEnd2endTest, AuthMetadataPluginValueFailure) { @@ -1930,6 +2003,8 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginValueFailure) { Status s = stub_->Echo(&context, request, &response); EXPECT_FALSE(s.ok()); EXPECT_EQ(s.error_code(), StatusCode::UNAVAILABLE); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedAuthMetadataPluginValueFailureCredsDebugString); } TEST_P(SecureEnd2endTest, AuthMetadataPluginWithDeadline) { @@ -1954,6 +2029,8 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginWithDeadline) { EXPECT_TRUE(s.error_code() == StatusCode::DEADLINE_EXCEEDED || s.error_code() == StatusCode::UNAVAILABLE); } + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedAuthMetadataPluginWithDeadlineCredsDebugString); } TEST_P(SecureEnd2endTest, AuthMetadataPluginWithCancel) { @@ -1981,6 +2058,8 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginWithCancel) { s.error_code() == StatusCode::UNAVAILABLE); } cancel_thread.join(); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedAuthMetadataPluginWithDeadlineCredsDebugString); } TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginFailure) { @@ -2003,6 +2082,8 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginFailure) { EXPECT_EQ(s.error_message(), grpc::string("Getting metadata from plugin failed with error: ") + kTestCredsPluginErrorMsg); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedNonBlockingAuthMetadataPluginFailureCredsDebugString); } TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorSuccess) { @@ -2029,6 +2110,9 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorSuccess) { EXPECT_FALSE(MetadataContains( context.GetServerTrailingMetadata(), GRPC_AUTHORIZATION_METADATA_KEY, grpc::string("Bearer ") + TestAuthMetadataProcessor::kGoodGuy)); + EXPECT_EQ( + context.credentials()->DebugString(), + kExpectedNonBlockingAuthMetadataPluginAndProcessorSuccessCredsDebugString); } TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorFailure) { @@ -2045,6 +2129,9 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorFailure) { Status s = stub_->Echo(&context, request, &response); EXPECT_FALSE(s.ok()); EXPECT_EQ(s.error_code(), StatusCode::UNAUTHENTICATED); + EXPECT_EQ( + context.credentials()->DebugString(), + kExpectedNonBlockingAuthMetadataPluginAndProcessorFailureCredsDebugString); } TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginFailure) { @@ -2067,6 +2154,8 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginFailure) { EXPECT_EQ(s.error_message(), grpc::string("Getting metadata from plugin failed with error: ") + kTestCredsPluginErrorMsg); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedBlockingAuthMetadataPluginFailureCredsDebugString); } TEST_P(SecureEnd2endTest, CompositeCallCreds) { @@ -2098,6 +2187,8 @@ TEST_P(SecureEnd2endTest, CompositeCallCreds) { kMetadataKey1, kMetadataVal1)); EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(), kMetadataKey2, kMetadataVal2)); + EXPECT_EQ(context.credentials()->DebugString(), + kExpectedCompositeCallCredsDebugString); } TEST_P(SecureEnd2endTest, ClientAuthContext) { diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 9ab5b3e429c..f46683470da 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 9.0.0 +PROJECT_NUMBER = 10.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 04cb62c32bc..dcced8d2f3e 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 9.0.0 +PROJECT_NUMBER = 10.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From b68f813e54729362f0954b5ac675221f6f59b583 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 26 Feb 2020 08:23:27 -0800 Subject: [PATCH 02/19] xds: send envoy.lb.does_not_support_overprovisioning client capability --- BUILD | 82 +- BUILD.gn | 30 + CMakeLists.txt | 30 + Makefile | 30 + bazel/grpc_deps.bzl | 7 +- build.yaml | 62 +- config.m4 | 19 + config.w32 | 21 + gRPC-C++.podspec | 30 + gRPC-Core.podspec | 45 + grpc.gemspec | 30 + grpc.gyp | 30 + package.xml | 30 + .../ext/filters/client_channel/xds/xds_api.cc | 3 + .../envoy/annotations/deprecation.upb.c | 17 + .../envoy/annotations/deprecation.upb.h | 30 + .../envoy/annotations/resource.upb.c | 27 + .../envoy/annotations/resource.upb.h | 54 + .../envoy/api/v2/auth/cert.upb.c | 67 +- .../envoy/api/v2/auth/cert.upb.h | 145 +- .../ext/upb-generated/envoy/api/v2/cds.upb.c | 366 +- .../ext/upb-generated/envoy/api/v2/cds.upb.h | 1351 +------- .../upb-generated/envoy/api/v2/cluster.upb.c | 390 +++ .../upb-generated/envoy/api/v2/cluster.upb.h | 1411 ++++++++ .../api/v2/cluster/circuit_breaker.upb.c | 37 +- .../api/v2/cluster/circuit_breaker.upb.h | 60 + .../envoy/api/v2/cluster/filter.upb.c | 1 + .../api/v2/cluster/outlier_detection.upb.c | 1 + .../envoy/api/v2/core/address.upb.c | 8 +- .../envoy/api/v2/core/address.upb.h | 8 +- .../envoy/api/v2/core/base.upb.c | 53 +- .../envoy/api/v2/core/base.upb.h | 158 +- .../envoy/api/v2/core/config_source.upb.c | 34 +- .../envoy/api/v2/core/config_source.upb.h | 78 +- .../envoy/api/v2/core/grpc_service.upb.c | 30 +- .../envoy/api/v2/core/grpc_service.upb.h | 70 + .../envoy/api/v2/core/health_check.upb.c | 67 +- .../envoy/api/v2/core/health_check.upb.h | 108 +- .../envoy/api/v2/core/http_uri.upb.c | 1 + .../envoy/api/v2/core/protocol.upb.c | 50 +- .../envoy/api/v2/core/protocol.upb.h | 115 + .../envoy/api/v2/discovery.upb.c | 1 + .../ext/upb-generated/envoy/api/v2/eds.upb.c | 75 +- .../ext/upb-generated/envoy/api/v2/eds.upb.h | 215 +- .../upb-generated/envoy/api/v2/endpoint.upb.c | 91 + .../upb-generated/envoy/api/v2/endpoint.upb.h | 240 ++ .../envoy/api/v2/endpoint/endpoint.upb.c | 72 +- .../envoy/api/v2/endpoint/endpoint.upb.h | 231 +- .../api/v2/endpoint/endpoint_components.upb.c | 88 + .../api/v2/endpoint/endpoint_components.upb.h | 258 ++ .../envoy/api/v2/endpoint/load_report.upb.c | 1 + .../ext/upb-generated/envoy/api/v2/lds.upb.c | 81 +- .../ext/upb-generated/envoy/api/v2/lds.upb.h | 354 +- .../upb-generated/envoy/api/v2/listener.upb.c | 104 + .../upb-generated/envoy/api/v2/listener.upb.h | 383 +++ .../envoy/api/v2/listener/listener.upb.c | 91 +- .../envoy/api/v2/listener/listener.upb.h | 362 +- .../api/v2/listener/listener_components.upb.c | 144 + .../api/v2/listener/listener_components.upb.h | 527 +++ .../api/v2/listener/udp_listener_config.upb.c | 7 + .../api/v2/listener/udp_listener_config.upb.h | 19 + .../ext/upb-generated/envoy/api/v2/rds.upb.c | 48 +- .../ext/upb-generated/envoy/api/v2/rds.upb.h | 174 +- .../upb-generated/envoy/api/v2/route.upb.c | 62 + .../upb-generated/envoy/api/v2/route.upb.h | 199 ++ .../envoy/api/v2/route/route.upb.c | 716 +--- .../envoy/api/v2/route/route.upb.h | 2684 +-------------- .../envoy/api/v2/route/route_components.upb.c | 793 +++++ .../envoy/api/v2/route/route_components.upb.h | 2936 +++++++++++++++++ .../envoy/api/v2/scoped_route.upb.c | 58 + .../envoy/api/v2/scoped_route.upb.h | 134 + .../ext/upb-generated/envoy/api/v2/srds.upb.c | 44 +- .../ext/upb-generated/envoy/api/v2/srds.upb.h | 109 +- .../filter/accesslog/v2/accesslog.upb.c | 3 +- .../v2/http_connection_manager.upb.c | 17 +- .../v2/http_connection_manager.upb.h | 16 + .../config/listener/v2/api_listener.upb.c | 1 + .../envoy/type/matcher/string.upb.c | 16 +- .../envoy/type/matcher/string.upb.h | 38 +- .../envoy/type/metadata/v2/metadata.upb.c | 87 + .../envoy/type/metadata/v2/metadata.upb.h | 258 ++ .../ext/upb-generated/envoy/type/range.upb.c | 11 + .../ext/upb-generated/envoy/type/range.upb.h | 27 + .../envoy/type/semantic_version.upb.c | 28 + .../envoy/type/semantic_version.upb.h | 62 + .../envoy/type/tracing/v2/custom_tag.upb.c | 88 + .../envoy/type/tracing/v2/custom_tag.upb.h | 249 ++ .../udpa/annotations/migrate.upb.c | 48 + .../udpa/annotations/migrate.upb.h | 104 + .../udpa/annotations/sensitive.upb.c | 17 + .../udpa/annotations/sensitive.upb.h | 30 + .../ext/upb-generated/validate/validate.upb.c | 72 +- .../ext/upb-generated/validate/validate.upb.h | 228 +- src/proto/grpc/testing/xds/eds_for_test.proto | 7 + src/python/grpcio/grpc_core_dependencies.py | 15 + test/cpp/end2end/xds_end2end_test.cc | 3 + third_party/envoy-api | 2 +- third_party/protoc-gen-validate | 2 +- third_party/udpa | 2 +- tools/codegen/core/gen_upb_api.sh | 15 + tools/doxygen/Doxyfile.core.internal | 30 + 101 files changed, 10734 insertions(+), 7229 deletions(-) create mode 100644 src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c create mode 100644 src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h create mode 100644 src/core/ext/upb-generated/envoy/annotations/resource.upb.c create mode 100644 src/core/ext/upb-generated/envoy/annotations/resource.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h create mode 100644 src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c create mode 100644 src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h create mode 100644 src/core/ext/upb-generated/envoy/type/semantic_version.upb.c create mode 100644 src/core/ext/upb-generated/envoy/type/semantic_version.upb.h create mode 100644 src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c create mode 100644 src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h create mode 100644 src/core/ext/upb-generated/udpa/annotations/migrate.upb.c create mode 100644 src/core/ext/upb-generated/udpa/annotations/migrate.upb.h create mode 100644 src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c create mode 100644 src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h diff --git a/BUILD b/BUILD index 19d4c81f554..c7efdda30fd 100644 --- a/BUILD +++ b/BUILD @@ -1098,7 +1098,7 @@ grpc_cc_library( ], language = "c++", deps = [ - "envoy_orca_upb", + "udpa_orca_upb", "gpr_base", "grpc_base", "grpc_client_authority_filter", @@ -2393,50 +2393,62 @@ grpc_cc_library( srcs = [ "src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cds.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c", "src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c", "src/core/ext/upb-generated/envoy/api/v2/eds.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c", "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c", "src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c", "src/core/ext/upb-generated/envoy/api/v2/lds.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/listener.upb.c", "src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c", "src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c", "src/core/ext/upb-generated/envoy/api/v2/rds.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/route.upb.c", "src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c", "src/core/ext/upb-generated/envoy/api/v2/srds.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c", "src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.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/listener/v2/api_listener.upb.c", "src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c", "src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c", - "src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c", - "src/core/ext/upb-generated/envoy/type/matcher/string.upb.c", ], hdrs = [ "src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h", "src/core/ext/upb-generated/envoy/api/v2/cds.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h", "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h", "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h", "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h", "src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h", "src/core/ext/upb-generated/envoy/api/v2/eds.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h", "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h", "src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h", "src/core/ext/upb-generated/envoy/api/v2/lds.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/listener.upb.h", "src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h", "src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h", "src/core/ext/upb-generated/envoy/api/v2/rds.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/route.upb.h", "src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h", "src/core/ext/upb-generated/envoy/api/v2/srds.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h", "src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.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/listener/v2/api_listener.upb.h", "src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h", "src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h", - "src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h", - "src/core/ext/upb-generated/envoy/type/matcher/string.upb.h", ], external_deps = [ "upb_lib", @@ -2447,6 +2459,27 @@ grpc_cc_library( ":envoy_type_upb", ":google_api_upb", ":proto_gen_validate_upb", + ":envoy_annotations_upb", + ":udpa_annotations_upb", + ], +) + +grpc_cc_library( + name = "envoy_annotations_upb", + srcs = [ + "src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c", + "src/core/ext/upb-generated/envoy/annotations/resource.upb.c", + ], + hdrs = [ + "src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h", + "src/core/ext/upb-generated/envoy/annotations/resource.upb.h", + ], + external_deps = [ + "upb_lib", + ], + language = "c++", + deps = [ + ":google_api_upb", ], ) @@ -2478,6 +2511,8 @@ grpc_cc_library( ":envoy_type_upb", ":google_api_upb", ":proto_gen_validate_upb", + ":envoy_annotations_upb", + ":udpa_annotations_upb", ], ) @@ -2485,13 +2520,23 @@ grpc_cc_library( name = "envoy_type_upb", srcs = [ "src/core/ext/upb-generated/envoy/type/http.upb.c", + "src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c", + "src/core/ext/upb-generated/envoy/type/matcher/string.upb.c", + "src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c", "src/core/ext/upb-generated/envoy/type/percent.upb.c", "src/core/ext/upb-generated/envoy/type/range.upb.c", + "src/core/ext/upb-generated/envoy/type/semantic_version.upb.c", + "src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c", ], hdrs = [ "src/core/ext/upb-generated/envoy/type/http.upb.h", + "src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h", + "src/core/ext/upb-generated/envoy/type/matcher/string.upb.h", + "src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h", "src/core/ext/upb-generated/envoy/type/percent.upb.h", "src/core/ext/upb-generated/envoy/type/range.upb.h", + "src/core/ext/upb-generated/envoy/type/semantic_version.upb.h", + "src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h", ], external_deps = [ "upb_lib", @@ -2500,6 +2545,8 @@ grpc_cc_library( deps = [ ":google_api_upb", ":proto_gen_validate_upb", + ":envoy_annotations_upb", + ":udpa_annotations_upb", ], ) @@ -2522,14 +2569,14 @@ grpc_cc_library( ], ) -# Once upb code-gen issue is resolved, replace envoy_orca_upb with this. +# Once upb code-gen issue is resolved, replace udpa_orca_upb with this. # grpc_upb_proto_library( -# name = "envoy_orca_upb", +# name = "udpa_orca_upb", # deps = ["@envoy_api//udpa/data/orca/v1:orca_load_report"] # ) grpc_cc_library( - name = "envoy_orca_upb", + name = "udpa_orca_upb", srcs = [ "src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c", ], @@ -2545,6 +2592,25 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "udpa_annotations_upb", + srcs = [ + "src/core/ext/upb-generated/udpa/annotations/migrate.upb.c", + "src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c", + ], + hdrs = [ + "src/core/ext/upb-generated/udpa/annotations/migrate.upb.h", + "src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h", + ], + external_deps = [ + "upb_lib", + ], + language = "c++", + deps = [ + ":google_api_upb", + ], +) + # Once upb code-gen issue is resolved, replace grpc_health_upb with this. # grpc_upb_proto_library( # name = "grpc_health_upb", diff --git a/BUILD.gn b/BUILD.gn index f821a9e1cdc..a533d03d957 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -395,10 +395,16 @@ config("grpc_config") { "src/core/ext/transport/inproc/inproc_plugin.cc", "src/core/ext/transport/inproc/inproc_transport.cc", "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/resource.upb.c", + "src/core/ext/upb-generated/envoy/annotations/resource.upb.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/cds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cds.upb.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/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/filter.upb.c", @@ -423,20 +429,34 @@ config("grpc_config") { "src/core/ext/upb-generated/envoy/api/v2/discovery.upb.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/endpoint.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.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_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/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/lds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/lds.upb.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/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_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/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/rds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/rds.upb.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/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_components.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.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/srds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/srds.upb.h", "src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c", @@ -455,10 +475,16 @@ config("grpc_config") { "src/core/ext/upb-generated/envoy/type/matcher/regex.upb.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/metadata/v2/metadata.upb.c", + "src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.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/range.upb.c", "src/core/ext/upb-generated/envoy/type/range.upb.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/tracing/v2/custom_tag.upb.c", + "src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h", "src/core/ext/upb-generated/gogoproto/gogo.upb.c", "src/core/ext/upb-generated/gogoproto/gogo.upb.h", "src/core/ext/upb-generated/google/api/annotations.upb.c", @@ -491,6 +517,10 @@ config("grpc_config") { "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.c", "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/sensitive.upb.c", + "src/core/ext/upb-generated/udpa/annotations/sensitive.upb.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", diff --git a/CMakeLists.txt b/CMakeLists.txt index addda4d8c20..8df937898ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1834,18 +1834,26 @@ add_library(grpc src/core/ext/filters/client_channel/xds/xds_client_stats.cc src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c src/core/ext/upb-generated/envoy/api/v2/cds.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c src/core/ext/upb-generated/envoy/api/v2/eds.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c src/core/ext/upb-generated/envoy/api/v2/lds.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener.upb.c src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c src/core/ext/upb-generated/envoy/api/v2/rds.upb.c + src/core/ext/upb-generated/envoy/api/v2/route.upb.c src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c + src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c + src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c src/core/ext/upb-generated/envoy/api/v2/srds.upb.c src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c @@ -1862,8 +1870,15 @@ add_library(grpc src/core/ext/upb-generated/envoy/type/http.upb.c src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c src/core/ext/upb-generated/envoy/type/matcher/string.upb.c + src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c src/core/ext/upb-generated/envoy/type/percent.upb.c src/core/ext/upb-generated/envoy/type/range.upb.c + src/core/ext/upb-generated/envoy/type/semantic_version.upb.c + src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c + src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c + src/core/ext/upb-generated/envoy/annotations/resource.upb.c + src/core/ext/upb-generated/udpa/annotations/migrate.upb.c + src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c src/core/ext/filters/client_channel/lb_policy/xds/xds.cc src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc @@ -3342,18 +3357,26 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/xds/xds_client_stats.cc src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c src/core/ext/upb-generated/envoy/api/v2/cds.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c src/core/ext/upb-generated/envoy/api/v2/eds.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c src/core/ext/upb-generated/envoy/api/v2/lds.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener.upb.c src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c src/core/ext/upb-generated/envoy/api/v2/rds.upb.c + src/core/ext/upb-generated/envoy/api/v2/route.upb.c src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c + src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c + src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c src/core/ext/upb-generated/envoy/api/v2/srds.upb.c src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c @@ -3370,8 +3393,15 @@ add_library(grpc_unsecure src/core/ext/upb-generated/envoy/type/http.upb.c src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c src/core/ext/upb-generated/envoy/type/matcher/string.upb.c + src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c src/core/ext/upb-generated/envoy/type/percent.upb.c src/core/ext/upb-generated/envoy/type/range.upb.c + src/core/ext/upb-generated/envoy/type/semantic_version.upb.c + src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c + src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c + src/core/ext/upb-generated/envoy/annotations/resource.upb.c + src/core/ext/upb-generated/udpa/annotations/migrate.upb.c + src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc diff --git a/Makefile b/Makefile index 25481e07ce6..c248468d6b5 100644 --- a/Makefile +++ b/Makefile @@ -4306,18 +4306,26 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/xds/xds_client_stats.cc \ src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c \ src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c \ src/core/ext/upb-generated/envoy/api/v2/lds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener.upb.c \ src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c \ src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c \ src/core/ext/upb-generated/envoy/api/v2/rds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route.upb.c \ src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c \ src/core/ext/upb-generated/envoy/api/v2/srds.upb.c \ src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c \ src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c \ @@ -4334,8 +4342,15 @@ LIBGRPC_SRC = \ src/core/ext/upb-generated/envoy/type/http.upb.c \ src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c \ src/core/ext/upb-generated/envoy/type/matcher/string.upb.c \ + src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c \ src/core/ext/upb-generated/envoy/type/percent.upb.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ + src/core/ext/upb-generated/envoy/type/semantic_version.upb.c \ + src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c \ + src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c \ + src/core/ext/upb-generated/envoy/annotations/resource.upb.c \ + src/core/ext/upb-generated/udpa/annotations/migrate.upb.c \ + src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c \ src/core/ext/filters/client_channel/lb_policy/xds/xds.cc \ src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \ src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \ @@ -5756,18 +5771,26 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/xds/xds_client_stats.cc \ src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c \ src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c \ src/core/ext/upb-generated/envoy/api/v2/lds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener.upb.c \ src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c \ src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c \ src/core/ext/upb-generated/envoy/api/v2/rds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route.upb.c \ src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c \ src/core/ext/upb-generated/envoy/api/v2/srds.upb.c \ src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c \ src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c \ @@ -5784,8 +5807,15 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/upb-generated/envoy/type/http.upb.c \ src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c \ src/core/ext/upb-generated/envoy/type/matcher/string.upb.c \ + src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c \ src/core/ext/upb-generated/envoy/type/percent.upb.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ + src/core/ext/upb-generated/envoy/type/semantic_version.upb.c \ + src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c \ + src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c \ + src/core/ext/upb-generated/envoy/annotations/resource.upb.c \ + src/core/ext/upb-generated/udpa/annotations/migrate.upb.c \ + src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c \ src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc \ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc \ diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 35a62a4f545..67870991763 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -238,12 +238,13 @@ def grpc_deps(): strip_prefix = "upb-d8f3d6f9d415b31f3ce56d46791706c38fa311bc", url = "https://github.com/protocolbuffers/upb/archive/d8f3d6f9d415b31f3ce56d46791706c38fa311bc.tar.gz", ) + if "envoy_api" not in native.existing_rules(): http_archive( name = "envoy_api", - sha256 = "9e8cf42abce32c9b0e9e271b0cb62803084cbe5e5b49f5d5c2aef0766f9d69ca", - strip_prefix = "data-plane-api-c83ed7ea9eb5fb3b93d1ad52b59750f1958b8bde", - url = "https://github.com/envoyproxy/data-plane-api/archive/c83ed7ea9eb5fb3b93d1ad52b59750f1958b8bde.tar.gz", + sha256 = "4ba23e0370ec358d1050c020e00cd020f03644a733aaf8fd85cc43d17b92236a", + strip_prefix = "data-plane-api-0487bbb43c3e8b54c7332f74ba7344d8265774f7", + url = "https://github.com/envoyproxy/data-plane-api/archive/0487bbb43c3e8b54c7332f74ba7344d8265774f7.tar.gz", ) if "io_bazel_rules_go" not in native.existing_rules(): diff --git a/build.yaml b/build.yaml index 0339328c36a..332eed5dbb3 100644 --- a/build.yaml +++ b/build.yaml @@ -113,18 +113,26 @@ filegroups: headers: - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h - src/core/ext/upb-generated/envoy/api/v2/cds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h - src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h - src/core/ext/upb-generated/envoy/api/v2/eds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h + - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h - src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h - src/core/ext/upb-generated/envoy/api/v2/lds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/listener.upb.h - src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h + - src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h - src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h - src/core/ext/upb-generated/envoy/api/v2/rds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/route.upb.h - src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h + - src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h + - src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h - src/core/ext/upb-generated/envoy/api/v2/srds.upb.h - src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h - src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h @@ -134,18 +142,26 @@ filegroups: src: - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c - src/core/ext/upb-generated/envoy/api/v2/cds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c - src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c - src/core/ext/upb-generated/envoy/api/v2/eds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c + - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c - src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c - src/core/ext/upb-generated/envoy/api/v2/lds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/listener.upb.c - src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c + - src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c - src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c - src/core/ext/upb-generated/envoy/api/v2/rds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/route.upb.c - src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c + - src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c + - src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c - src/core/ext/upb-generated/envoy/api/v2/srds.upb.c - src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c - src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c @@ -157,6 +173,17 @@ filegroups: - envoy_type_upb - google_api_upb - proto_gen_validate_upb + - envoy_annotations_upb + - udpa_annotations_upb +- name: envoy_annotations_upb + headers: + - src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h + - src/core/ext/upb-generated/envoy/annotations/resource.upb.h + src: + - src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c + - src/core/ext/upb-generated/envoy/annotations/resource.upb.c + uses: + - google_api_upb - name: envoy_core_upb headers: - src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h @@ -178,29 +205,32 @@ filegroups: - envoy_type_upb - google_api_upb - proto_gen_validate_upb -- name: envoy_orca_upb - headers: - - src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h - src: - - src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c - uses: - - proto_gen_validate_upb + - envoy_annotations_upb + - udpa_annotations_upb - name: envoy_type_upb headers: - src/core/ext/upb-generated/envoy/type/http.upb.h - src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h - src/core/ext/upb-generated/envoy/type/matcher/string.upb.h + - src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h - src/core/ext/upb-generated/envoy/type/percent.upb.h - src/core/ext/upb-generated/envoy/type/range.upb.h + - src/core/ext/upb-generated/envoy/type/semantic_version.upb.h + - src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h src: - src/core/ext/upb-generated/envoy/type/http.upb.c - src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c - src/core/ext/upb-generated/envoy/type/matcher/string.upb.c + - src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c - src/core/ext/upb-generated/envoy/type/percent.upb.c - src/core/ext/upb-generated/envoy/type/range.upb.c + - src/core/ext/upb-generated/envoy/type/semantic_version.upb.c + - src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c uses: - google_api_upb - proto_gen_validate_upb + - envoy_annotations_upb + - udpa_annotations_upb - name: google_api_upb headers: - src/core/ext/upb-generated/google/api/annotations.upb.h @@ -1050,7 +1080,7 @@ filegroups: - grpc_base - grpc_deadline_filter - grpc_health_upb - - envoy_orca_upb + - udpa_orca_upb - name: grpc_client_idle_filter src: - src/core/ext/filters/client_idle/client_idle_filter.cc @@ -1686,6 +1716,22 @@ filegroups: - gpr uses: - grpc_trace +- name: udpa_annotations_upb + headers: + - src/core/ext/upb-generated/udpa/annotations/migrate.upb.h + - src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h + src: + - src/core/ext/upb-generated/udpa/annotations/migrate.upb.c + - src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c + uses: + - google_api_upb +- name: udpa_orca_upb + headers: + - src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h + src: + - src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c + uses: + - proto_gen_validate_upb libs: - name: address_sorting build: all diff --git a/config.m4 b/config.m4 index 549854690b6..2d1ac460c13 100644 --- a/config.m4 +++ b/config.m4 @@ -138,8 +138,11 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/transport/chttp2/transport/writing.cc \ 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/resource.upb.c \ src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c \ @@ -152,13 +155,20 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \ src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c \ src/core/ext/upb-generated/envoy/api/v2/lds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener.upb.c \ src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c \ src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c \ src/core/ext/upb-generated/envoy/api/v2/rds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route.upb.c \ src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c \ src/core/ext/upb-generated/envoy/api/v2/srds.upb.c \ src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c \ src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c \ @@ -168,8 +178,11 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/upb-generated/envoy/type/http.upb.c \ src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c \ src/core/ext/upb-generated/envoy/type/matcher/string.upb.c \ + src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c \ src/core/ext/upb-generated/envoy/type/percent.upb.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ + src/core/ext/upb-generated/envoy/type/semantic_version.upb.c \ + src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c \ src/core/ext/upb-generated/gogoproto/gogo.upb.c \ src/core/ext/upb-generated/google/api/annotations.upb.c \ src/core/ext/upb-generated/google/api/http.upb.c \ @@ -186,6 +199,8 @@ if test "$PHP_GRPC" != "no"; then 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/sensitive.upb.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/lib/avl/avl.cc \ @@ -814,6 +829,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/secure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/transport) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/inproc) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/annotations) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/auth) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/cluster) @@ -828,6 +844,8 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/service/load_stats/v2) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/type) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/type/matcher) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/type/metadata/v2) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/type/tracing/v2) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/gogoproto) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/google/api) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/google/protobuf) @@ -835,6 +853,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/src/proto/grpc/gcp) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/src/proto/grpc/health/v1) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/src/proto/grpc/lb/v1) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/udpa/annotations) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/udpa/data/orca/v1) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/validate) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/avl) diff --git a/config.w32 b/config.w32 index 09d57424f7e..d55448beab3 100644 --- a/config.w32 +++ b/config.w32 @@ -107,8 +107,11 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\transport\\chttp2\\transport\\writing.cc " + "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\\resource.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\cert.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cds.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\circuit_breaker.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\filter.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\outlier_detection.upb.c " + @@ -121,13 +124,20 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\protocol.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\discovery.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\eds.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\endpoint.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\endpoint_components.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\load_report.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\lds.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener\\listener.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener\\listener_components.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener\\udp_listener_config.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\rds.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route\\route.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route\\route_components.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\scoped_route.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\srds.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\config\\filter\\accesslog\\v2\\accesslog.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\config\\filter\\network\\http_connection_manager\\v2\\http_connection_manager.upb.c " + @@ -137,8 +147,11 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\upb-generated\\envoy\\type\\http.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\matcher\\regex.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\matcher\\string.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\type\\metadata\\v2\\metadata.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\percent.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\range.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\type\\semantic_version.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\type\\tracing\\v2\\custom_tag.upb.c " + "src\\core\\ext\\upb-generated\\gogoproto\\gogo.upb.c " + "src\\core\\ext\\upb-generated\\google\\api\\annotations.upb.c " + "src\\core\\ext\\upb-generated\\google\\api\\http.upb.c " + @@ -155,6 +168,8 @@ if (PHP_GRPC != "no") { "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\\sensitive.upb.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\\lib\\avl\\avl.cc " + @@ -820,6 +835,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\inproc"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\annotations"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth"); @@ -844,6 +860,10 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\service\\load_stats\\v2"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\type"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\type\\matcher"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\type\\metadata"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\type\\metadata\\v2"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\type\\tracing"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\type\\tracing\\v2"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\gogoproto"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\google"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\google\\api"); @@ -858,6 +878,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lb"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lb\\v1"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa\\annotations"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa\\data"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa\\data\\orca"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa\\data\\orca\\v1"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 289f5016df9..36c9afcc0de 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -301,8 +301,11 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/stream_map.h', '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/resource.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h', @@ -315,13 +318,20 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h', @@ -331,8 +341,11 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/type/http.upb.h', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.h', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h', 'src/core/ext/upb-generated/envoy/type/percent.upb.h', 'src/core/ext/upb-generated/envoy/type/range.upb.h', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.h', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h', 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', 'src/core/ext/upb-generated/google/api/annotations.upb.h', 'src/core/ext/upb-generated/google/api/http.upb.h', @@ -349,6 +362,8 @@ Pod::Spec.new do |s| '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/sensitive.upb.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/lib/avl/avl.h', @@ -732,8 +747,11 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/stream_map.h', '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/resource.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h', @@ -746,13 +764,20 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h', @@ -762,8 +787,11 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/type/http.upb.h', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.h', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h', 'src/core/ext/upb-generated/envoy/type/percent.upb.h', 'src/core/ext/upb-generated/envoy/type/range.upb.h', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.h', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h', 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', 'src/core/ext/upb-generated/google/api/annotations.upb.h', 'src/core/ext/upb-generated/google/api/http.upb.h', @@ -780,6 +808,8 @@ Pod::Spec.new do |s| '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/sensitive.upb.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/lib/avl/avl.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index d1eb9401223..9f4dd6b26b0 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -362,10 +362,16 @@ Pod::Spec.new do |s| 'src/core/ext/transport/inproc/inproc_plugin.cc', 'src/core/ext/transport/inproc/inproc_transport.cc', '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/resource.upb.c', + 'src/core/ext/upb-generated/envoy/annotations/resource.upb.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/cds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.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/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/filter.upb.c', @@ -390,20 +396,34 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.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/endpoint.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.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_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/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/lds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.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/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_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/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/rds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.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/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_components.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.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/srds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c', @@ -422,10 +442,16 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.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/metadata/v2/metadata.upb.c', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.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/range.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.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/tracing/v2/custom_tag.upb.c', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h', 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', 'src/core/ext/upb-generated/google/api/annotations.upb.c', @@ -458,6 +484,10 @@ Pod::Spec.new do |s| '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.c', '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/sensitive.upb.c', + 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.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', @@ -1062,8 +1092,11 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/stream_map.h', '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/resource.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h', @@ -1076,13 +1109,20 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h', @@ -1092,8 +1132,11 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/type/http.upb.h', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.h', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h', 'src/core/ext/upb-generated/envoy/type/percent.upb.h', 'src/core/ext/upb-generated/envoy/type/range.upb.h', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.h', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h', 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', 'src/core/ext/upb-generated/google/api/annotations.upb.h', 'src/core/ext/upb-generated/google/api/http.upb.h', @@ -1110,6 +1153,8 @@ Pod::Spec.new do |s| '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/sensitive.upb.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/lib/avl/avl.h', diff --git a/grpc.gemspec b/grpc.gemspec index 696ce9781fb..c658159396c 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -285,10 +285,16 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/transport/inproc/inproc_plugin.cc ) s.files += %w( src/core/ext/transport/inproc/inproc_transport.cc ) s.files += %w( src/core/ext/transport/inproc/inproc_transport.h ) + s.files += %w( src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/annotations/resource.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/annotations/resource.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cds.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cds.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c ) @@ -313,20 +319,34 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/eds.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/eds.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/lds.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/lds.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/rds.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/rds.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/route.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/route.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/srds.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/srds.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c ) @@ -345,10 +365,16 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/type/matcher/string.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/type/matcher/string.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/type/percent.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/type/percent.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/type/range.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/type/range.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/type/semantic_version.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/type/semantic_version.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h ) s.files += %w( src/core/ext/upb-generated/gogoproto/gogo.upb.c ) s.files += %w( src/core/ext/upb-generated/gogoproto/gogo.upb.h ) s.files += %w( src/core/ext/upb-generated/google/api/annotations.upb.c ) @@ -381,6 +407,10 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h ) s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c ) s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h ) + s.files += %w( src/core/ext/upb-generated/udpa/annotations/migrate.upb.c ) + s.files += %w( src/core/ext/upb-generated/udpa/annotations/migrate.upb.h ) + s.files += %w( src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c ) + s.files += %w( src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h ) s.files += %w( src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c ) s.files += %w( src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h ) s.files += %w( src/core/ext/upb-generated/validate/validate.upb.c ) diff --git a/grpc.gyp b/grpc.gyp index 53eb755bec5..c30e8b12806 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -826,18 +826,26 @@ 'src/core/ext/filters/client_channel/xds/xds_client_stats.cc', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/route.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.c', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c', @@ -854,8 +862,15 @@ 'src/core/ext/upb-generated/envoy/type/http.upb.c', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.c', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c', 'src/core/ext/upb-generated/envoy/type/percent.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.c', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.c', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c', + 'src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c', + 'src/core/ext/upb-generated/envoy/annotations/resource.upb.c', + 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.c', + 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc', 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc', 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc', @@ -1679,18 +1694,26 @@ 'src/core/ext/filters/client_channel/xds/xds_client_stats.cc', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/route.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.c', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c', @@ -1707,8 +1730,15 @@ 'src/core/ext/upb-generated/envoy/type/http.upb.c', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.c', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c', 'src/core/ext/upb-generated/envoy/type/percent.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.c', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.c', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c', + 'src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c', + 'src/core/ext/upb-generated/envoy/annotations/resource.upb.c', + 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.c', + 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc', diff --git a/package.xml b/package.xml index 85b50d66b03..9c67b18cd5b 100644 --- a/package.xml +++ b/package.xml @@ -265,10 +265,16 @@ + + + + + + @@ -293,20 +299,34 @@ + + + + + + + + + + + + + + @@ -325,10 +345,16 @@ + + + + + + @@ -361,6 +387,10 @@ + + + + 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 451a5bfd3a0..7df29e0ded1 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -233,6 +233,9 @@ void PopulateNode(upb_arena* arena, const XdsBootstrap::Node* node, } envoy_api_v2_core_Node_set_build_version(node_msg, upb_strview_makez(build_version)); + envoy_api_v2_core_Node_add_client_features( + node_msg, + upb_strview_makez("envoy.lb.does_not_support_overprovisioning"), arena); } envoy_api_v2_DiscoveryRequest* CreateDiscoveryRequest( diff --git a/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c b/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c new file mode 100644 index 00000000000..007de310153 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c @@ -0,0 +1,17 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/annotations/deprecation.upb.h" +#include "google/protobuf/descriptor.upb.h" + +#include "upb/port_def.inc" + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h b/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h new file mode 100644 index 00000000000..081c9d8f8a5 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.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_UPB_H_ +#define ENVOY_ANNOTATIONS_DEPRECATION_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_ANNOTATIONS_DEPRECATION_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/annotations/resource.upb.c b/src/core/ext/upb-generated/envoy/annotations/resource.upb.c new file mode 100644 index 00000000000..3e5712a4792 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/annotations/resource.upb.c @@ -0,0 +1,27 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/annotations/resource.upb.h" +#include "google/protobuf/descriptor.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout_field envoy_annotations_ResourceAnnotation__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_annotations_ResourceAnnotation_msginit = { + NULL, + &envoy_annotations_ResourceAnnotation__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/annotations/resource.upb.h b/src/core/ext/upb-generated/envoy/annotations/resource.upb.h new file mode 100644 index 00000000000..eff0bdc5731 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/annotations/resource.upb.h @@ -0,0 +1,54 @@ +/* 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_UPB_H_ +#define ENVOY_ANNOTATIONS_RESOURCE_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_annotations_ResourceAnnotation; +typedef struct envoy_annotations_ResourceAnnotation envoy_annotations_ResourceAnnotation; +extern const upb_msglayout envoy_annotations_ResourceAnnotation_msginit; + + +/* envoy.annotations.ResourceAnnotation */ + +UPB_INLINE envoy_annotations_ResourceAnnotation *envoy_annotations_ResourceAnnotation_new(upb_arena *arena) { + return (envoy_annotations_ResourceAnnotation *)upb_msg_new(&envoy_annotations_ResourceAnnotation_msginit, arena); +} +UPB_INLINE envoy_annotations_ResourceAnnotation *envoy_annotations_ResourceAnnotation_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_annotations_ResourceAnnotation *ret = envoy_annotations_ResourceAnnotation_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_annotations_ResourceAnnotation_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_annotations_ResourceAnnotation_serialize(const envoy_annotations_ResourceAnnotation *msg, upb_arena *arena, size_t *len) { + 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 void envoy_annotations_ResourceAnnotation_set_type(envoy_annotations_ResourceAnnotation *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_ANNOTATIONS_RESOURCE_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c index 24ff2ddc36b..e56cf2225cd 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c @@ -11,9 +11,13 @@ #include "envoy/api/v2/auth/cert.upb.h" #include "envoy/api/v2/core/base.upb.h" #include "envoy/api/v2/core/config_source.upb.h" +#include "envoy/type/matcher/string.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 "udpa/annotations/sensitive.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" @@ -82,26 +86,29 @@ const upb_msglayout envoy_api_v2_auth_TlsSessionTicketKeys_msginit = { UPB_SIZE(4, 8), 1, false, }; -static const upb_msglayout *const envoy_api_v2_auth_CertificateValidationContext_submsgs[4] = { +static const upb_msglayout *const envoy_api_v2_auth_CertificateValidationContext_submsgs[5] = { &envoy_api_v2_core_DataSource_msginit, + &envoy_type_matcher_StringMatcher_msginit, &google_protobuf_BoolValue_msginit, }; -static const upb_msglayout_field envoy_api_v2_auth_CertificateValidationContext__fields[8] = { - {1, UPB_SIZE(4, 8), 0, 0, 11, 1}, - {2, UPB_SIZE(20, 40), 0, 0, 9, 3}, - {3, UPB_SIZE(24, 48), 0, 0, 9, 3}, - {4, UPB_SIZE(28, 56), 0, 0, 9, 3}, - {5, UPB_SIZE(8, 16), 0, 1, 11, 1}, - {6, UPB_SIZE(12, 24), 0, 1, 11, 1}, - {7, UPB_SIZE(16, 32), 0, 0, 11, 1}, - {8, UPB_SIZE(0, 0), 0, 0, 8, 1}, +static const upb_msglayout_field envoy_api_v2_auth_CertificateValidationContext__fields[10] = { + {1, UPB_SIZE(12, 16), 0, 0, 11, 1}, + {2, UPB_SIZE(28, 48), 0, 0, 9, 3}, + {3, UPB_SIZE(32, 56), 0, 0, 9, 3}, + {4, UPB_SIZE(36, 64), 0, 0, 9, 3}, + {5, UPB_SIZE(16, 24), 0, 2, 11, 1}, + {6, UPB_SIZE(20, 32), 0, 2, 11, 1}, + {7, UPB_SIZE(24, 40), 0, 0, 11, 1}, + {8, UPB_SIZE(8, 8), 0, 0, 8, 1}, + {9, UPB_SIZE(40, 72), 0, 1, 11, 3}, + {10, UPB_SIZE(0, 0), 0, 0, 14, 1}, }; const upb_msglayout envoy_api_v2_auth_CertificateValidationContext_msginit = { &envoy_api_v2_auth_CertificateValidationContext_submsgs[0], &envoy_api_v2_auth_CertificateValidationContext__fields[0], - UPB_SIZE(32, 64), 8, false, + UPB_SIZE(48, 80), 10, false, }; static const upb_msglayout *const envoy_api_v2_auth_CommonTlsContext_submsgs[6] = { @@ -162,25 +169,41 @@ const upb_msglayout envoy_api_v2_auth_UpstreamTlsContext_msginit = { UPB_SIZE(24, 48), 4, false, }; -static const upb_msglayout *const envoy_api_v2_auth_DownstreamTlsContext_submsgs[5] = { +static const upb_msglayout *const envoy_api_v2_auth_DownstreamTlsContext_submsgs[6] = { &envoy_api_v2_auth_CommonTlsContext_msginit, &envoy_api_v2_auth_SdsSecretConfig_msginit, &envoy_api_v2_auth_TlsSessionTicketKeys_msginit, &google_protobuf_BoolValue_msginit, + &google_protobuf_Duration_msginit, }; -static const upb_msglayout_field envoy_api_v2_auth_DownstreamTlsContext__fields[5] = { +static const upb_msglayout_field envoy_api_v2_auth_DownstreamTlsContext__fields[6] = { {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(12, 24), UPB_SIZE(-17, -33), 2, 11, 1}, - {5, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 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}, }; const upb_msglayout envoy_api_v2_auth_DownstreamTlsContext_msginit = { &envoy_api_v2_auth_DownstreamTlsContext_submsgs[0], &envoy_api_v2_auth_DownstreamTlsContext__fields[0], - UPB_SIZE(20, 40), 5, false, + UPB_SIZE(24, 48), 6, false, +}; + +static const upb_msglayout *const envoy_api_v2_auth_GenericSecret_submsgs[1] = { + &envoy_api_v2_core_DataSource_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_auth_GenericSecret__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_auth_GenericSecret_msginit = { + &envoy_api_v2_auth_GenericSecret_submsgs[0], + &envoy_api_v2_auth_GenericSecret__fields[0], + UPB_SIZE(4, 8), 1, false, }; static const upb_msglayout *const envoy_api_v2_auth_SdsSecretConfig_submsgs[1] = { @@ -198,23 +221,25 @@ const upb_msglayout envoy_api_v2_auth_SdsSecretConfig_msginit = { UPB_SIZE(16, 32), 2, false, }; -static const upb_msglayout *const envoy_api_v2_auth_Secret_submsgs[3] = { +static const upb_msglayout *const envoy_api_v2_auth_Secret_submsgs[4] = { &envoy_api_v2_auth_CertificateValidationContext_msginit, + &envoy_api_v2_auth_GenericSecret_msginit, &envoy_api_v2_auth_TlsCertificate_msginit, &envoy_api_v2_auth_TlsSessionTicketKeys_msginit, }; -static const upb_msglayout_field envoy_api_v2_auth_Secret__fields[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), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 2, 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 = { &envoy_api_v2_auth_Secret_submsgs[0], &envoy_api_v2_auth_Secret__fields[0], - UPB_SIZE(16, 32), 4, false, + UPB_SIZE(16, 32), 5, false, }; #include "upb/port_undef.inc" 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..397be401b57 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 @@ -29,6 +29,7 @@ struct envoy_api_v2_auth_CommonTlsContext; struct envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext; struct envoy_api_v2_auth_UpstreamTlsContext; struct envoy_api_v2_auth_DownstreamTlsContext; +struct envoy_api_v2_auth_GenericSecret; struct envoy_api_v2_auth_SdsSecretConfig; struct envoy_api_v2_auth_Secret; typedef struct envoy_api_v2_auth_TlsParameters envoy_api_v2_auth_TlsParameters; @@ -40,6 +41,7 @@ typedef struct envoy_api_v2_auth_CommonTlsContext envoy_api_v2_auth_CommonTlsCon typedef struct envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext; typedef struct envoy_api_v2_auth_UpstreamTlsContext envoy_api_v2_auth_UpstreamTlsContext; typedef struct envoy_api_v2_auth_DownstreamTlsContext envoy_api_v2_auth_DownstreamTlsContext; +typedef struct envoy_api_v2_auth_GenericSecret envoy_api_v2_auth_GenericSecret; typedef struct envoy_api_v2_auth_SdsSecretConfig envoy_api_v2_auth_SdsSecretConfig; typedef struct envoy_api_v2_auth_Secret envoy_api_v2_auth_Secret; extern const upb_msglayout envoy_api_v2_auth_TlsParameters_msginit; @@ -51,21 +53,31 @@ extern const upb_msglayout envoy_api_v2_auth_CommonTlsContext_msginit; extern const upb_msglayout envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_msginit; 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_GenericSecret_msginit; extern const upb_msglayout envoy_api_v2_auth_SdsSecretConfig_msginit; extern const upb_msglayout envoy_api_v2_auth_Secret_msginit; struct envoy_api_v2_core_ConfigSource; struct envoy_api_v2_core_DataSource; +struct envoy_type_matcher_StringMatcher; struct google_protobuf_Any; struct google_protobuf_BoolValue; +struct google_protobuf_Duration; struct google_protobuf_Struct; struct google_protobuf_UInt32Value; extern const upb_msglayout envoy_api_v2_core_ConfigSource_msginit; extern const upb_msglayout envoy_api_v2_core_DataSource_msginit; +extern const upb_msglayout envoy_type_matcher_StringMatcher_msginit; extern const upb_msglayout google_protobuf_Any_msginit; extern const upb_msglayout google_protobuf_BoolValue_msginit; +extern const upb_msglayout google_protobuf_Duration_msginit; extern const upb_msglayout google_protobuf_Struct_msginit; extern const upb_msglayout google_protobuf_UInt32Value_msginit; +typedef enum { + envoy_api_v2_auth_CertificateValidationContext_VERIFY_TRUST_CHAIN = 0, + envoy_api_v2_auth_CertificateValidationContext_ACCEPT_UNTRUSTED = 1 +} envoy_api_v2_auth_CertificateValidationContext_TrustChainVerification; + typedef enum { envoy_api_v2_auth_TlsParameters_TLS_AUTO = 0, envoy_api_v2_auth_TlsParameters_TLSv1_0 = 1, @@ -315,17 +327,19 @@ 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(4, 8)); } -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(20, 40), 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(24, 48), 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(28, 56), 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(8, 16)); } -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(12, 24)); } -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(16, 32)); } -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(0, 0)); } +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 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 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 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(4, 8)) = value; + UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(12, 16)) = 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); @@ -337,37 +351,37 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_CertificateVal return sub; } UPB_INLINE upb_strview* envoy_api_v2_auth_CertificateValidationContext_mutable_verify_certificate_hash(envoy_api_v2_auth_CertificateValidationContext *msg, size_t *len) { - return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), 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(28, 48), len, UPB_SIZE(8, 16), 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); + msg, UPB_SIZE(28, 48), 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); + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), 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(32, 56), len, UPB_SIZE(8, 16), 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); + msg, UPB_SIZE(32, 56), 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); + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), 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(36, 64), len, UPB_SIZE(8, 16), 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); + msg, UPB_SIZE(36, 64), 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; + UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(16, 24)) = 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); @@ -379,7 +393,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(12, 24)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(20, 32)) = 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); @@ -391,7 +405,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(16, 32)) = value; + UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(24, 40)) = 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); @@ -403,7 +417,23 @@ 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(0, 0)) = value; + UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = 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); +} +UPB_INLINE struct envoy_type_matcher_StringMatcher** envoy_api_v2_auth_CertificateValidationContext_resize_match_subject_alt_names(envoy_api_v2_auth_CertificateValidationContext *msg, size_t len, upb_arena *arena) { + return (struct envoy_type_matcher_StringMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_api_v2_auth_CertificateValidationContext_add_match_subject_alt_names(envoy_api_v2_auth_CertificateValidationContext *msg, upb_arena *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(40, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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; } /* envoy.api.v2.auth.CommonTlsContext */ @@ -635,15 +665,16 @@ typedef enum { envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_type_session_ticket_keys_sds_secret_config = 5, 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(16, 32)); } +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 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_session_ticket_keys(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 4); } -UPB_INLINE const 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 envoy_api_v2_auth_TlsSessionTicketKeys*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 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(16, 32), 5); } -UPB_INLINE const 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 envoy_api_v2_auth_SdsSecretConfig*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 5, NULL); } +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 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 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 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 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 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; @@ -682,7 +713,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsCont return sub; } UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_session_ticket_keys(envoy_api_v2_auth_DownstreamTlsContext *msg, envoy_api_v2_auth_TlsSessionTicketKeys* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_auth_TlsSessionTicketKeys*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 4); + UPB_WRITE_ONEOF(msg, envoy_api_v2_auth_TlsSessionTicketKeys*, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 4); } 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); @@ -694,7 +725,7 @@ UPB_INLINE struct envoy_api_v2_auth_TlsSessionTicketKeys* envoy_api_v2_auth_Down return sub; } UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_session_ticket_keys_sds_secret_config(envoy_api_v2_auth_DownstreamTlsContext *msg, envoy_api_v2_auth_SdsSecretConfig* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_auth_SdsSecretConfig*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 5); + UPB_WRITE_ONEOF(msg, envoy_api_v2_auth_SdsSecretConfig*, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 5); } 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); @@ -705,6 +736,47 @@ 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_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); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_auth_DownstreamTlsContext_set_session_timeout(msg, sub); + } + return sub; +} + +/* envoy.api.v2.auth.GenericSecret */ + +UPB_INLINE envoy_api_v2_auth_GenericSecret *envoy_api_v2_auth_GenericSecret_new(upb_arena *arena) { + return (envoy_api_v2_auth_GenericSecret *)upb_msg_new(&envoy_api_v2_auth_GenericSecret_msginit, arena); +} +UPB_INLINE envoy_api_v2_auth_GenericSecret *envoy_api_v2_auth_GenericSecret_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_auth_GenericSecret *ret = envoy_api_v2_auth_GenericSecret_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_auth_GenericSecret_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_auth_GenericSecret_serialize(const envoy_api_v2_auth_GenericSecret *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (sub == NULL) { + 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_GenericSecret_set_secret(msg, sub); + } + return sub; +} /* envoy.api.v2.auth.SdsSecretConfig */ @@ -757,6 +829,7 @@ typedef enum { envoy_api_v2_auth_Secret_type_tls_certificate = 2, envoy_api_v2_auth_Secret_type_session_ticket_keys = 3, envoy_api_v2_auth_Secret_type_validation_context = 4, + 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)); } @@ -768,6 +841,8 @@ UPB_INLINE bool envoy_api_v2_auth_Secret_has_session_ticket_keys(const envoy_api UPB_INLINE const 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 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 const 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 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 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; @@ -808,6 +883,18 @@ UPB_INLINE struct envoy_api_v2_auth_CertificateValidationContext* envoy_api_v2_a } return sub; } +UPB_INLINE void envoy_api_v2_auth_Secret_set_generic_secret(envoy_api_v2_auth_Secret *msg, envoy_api_v2_auth_GenericSecret* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_auth_GenericSecret*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 5); +} +UPB_INLINE struct envoy_api_v2_auth_GenericSecret* envoy_api_v2_auth_Secret_mutable_generic_secret(envoy_api_v2_auth_Secret *msg, upb_arena *arena) { + struct envoy_api_v2_auth_GenericSecret* sub = (struct envoy_api_v2_auth_GenericSecret*)envoy_api_v2_auth_Secret_generic_secret(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_auth_GenericSecret*)upb_msg_new(&envoy_api_v2_auth_GenericSecret_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_auth_Secret_set_generic_secret(msg, sub); + } + return sub; +} #ifdef __cplusplus } /* extern "C" */ 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..e420bb443a9 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 @@ -9,377 +9,19 @@ #include #include "upb/msg.h" #include "envoy/api/v2/cds.upb.h" -#include "envoy/api/v2/auth/cert.upb.h" -#include "envoy/api/v2/cluster/circuit_breaker.upb.h" -#include "envoy/api/v2/cluster/filter.upb.h" -#include "envoy/api/v2/cluster/outlier_detection.upb.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/core/protocol.upb.h" #include "envoy/api/v2/discovery.upb.h" -#include "envoy/api/v2/eds.upb.h" -#include "envoy/type/percent.upb.h" #include "google/api/annotations.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 "validate/validate.upb.h" +#include "envoy/annotations/resource.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "envoy/api/v2/cluster.upb.h" #include "upb/port_def.inc" -static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[33] = { - &envoy_api_v2_Cluster_CommonLbConfig_msginit, - &envoy_api_v2_Cluster_CustomClusterType_msginit, - &envoy_api_v2_Cluster_EdsClusterConfig_msginit, - &envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_msginit, - &envoy_api_v2_Cluster_LbSubsetConfig_msginit, - &envoy_api_v2_Cluster_LeastRequestLbConfig_msginit, - &envoy_api_v2_Cluster_OriginalDstLbConfig_msginit, - &envoy_api_v2_Cluster_RefreshRate_msginit, - &envoy_api_v2_Cluster_RingHashLbConfig_msginit, - &envoy_api_v2_Cluster_TransportSocketMatch_msginit, - &envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_msginit, - &envoy_api_v2_ClusterLoadAssignment_msginit, - &envoy_api_v2_LoadBalancingPolicy_msginit, - &envoy_api_v2_UpstreamConnectionOptions_msginit, - &envoy_api_v2_auth_UpstreamTlsContext_msginit, - &envoy_api_v2_cluster_CircuitBreakers_msginit, - &envoy_api_v2_cluster_Filter_msginit, - &envoy_api_v2_cluster_OutlierDetection_msginit, - &envoy_api_v2_core_Address_msginit, - &envoy_api_v2_core_BindConfig_msginit, - &envoy_api_v2_core_ConfigSource_msginit, - &envoy_api_v2_core_HealthCheck_msginit, - &envoy_api_v2_core_Http1ProtocolOptions_msginit, - &envoy_api_v2_core_Http2ProtocolOptions_msginit, - &envoy_api_v2_core_HttpProtocolOptions_msginit, - &envoy_api_v2_core_Metadata_msginit, - &envoy_api_v2_core_TransportSocket_msginit, - &google_protobuf_Duration_msginit, - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster__fields[42] = { - {1, UPB_SIZE(28, 32), 0, 0, 9, 1}, - {2, UPB_SIZE(160, 296), UPB_SIZE(-169, -305), 0, 14, 1}, - {3, UPB_SIZE(44, 64), 0, 2, 11, 1}, - {4, UPB_SIZE(48, 72), 0, 27, 11, 1}, - {5, UPB_SIZE(52, 80), 0, 28, 11, 1}, - {6, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {7, UPB_SIZE(132, 240), 0, 18, 11, 3}, - {8, UPB_SIZE(136, 248), 0, 21, 11, 3}, - {9, UPB_SIZE(56, 88), 0, 28, 11, 1}, - {10, UPB_SIZE(60, 96), 0, 15, 11, 1}, - {11, UPB_SIZE(64, 104), 0, 14, 11, 1}, - {13, UPB_SIZE(68, 112), 0, 22, 11, 1}, - {14, UPB_SIZE(72, 120), 0, 23, 11, 1}, - {16, UPB_SIZE(76, 128), 0, 27, 11, 1}, - {17, UPB_SIZE(8, 8), 0, 0, 14, 1}, - {18, UPB_SIZE(140, 256), 0, 18, 11, 3}, - {19, UPB_SIZE(80, 136), 0, 17, 11, 1}, - {20, UPB_SIZE(84, 144), 0, 27, 11, 1}, - {21, UPB_SIZE(88, 152), 0, 19, 11, 1}, - {22, UPB_SIZE(92, 160), 0, 4, 11, 1}, - {23, UPB_SIZE(172, 312), UPB_SIZE(-177, -321), 8, 11, 1}, - {24, UPB_SIZE(96, 168), 0, 26, 11, 1}, - {25, UPB_SIZE(100, 176), 0, 25, 11, 1}, - {26, UPB_SIZE(16, 16), 0, 0, 14, 1}, - {27, UPB_SIZE(104, 184), 0, 0, 11, 1}, - {28, UPB_SIZE(36, 48), 0, 0, 9, 1}, - {29, UPB_SIZE(108, 192), 0, 24, 11, 1}, - {30, UPB_SIZE(112, 200), 0, 13, 11, 1}, - {31, UPB_SIZE(24, 24), 0, 0, 8, 1}, - {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}, - {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}, - {40, UPB_SIZE(152, 280), 0, 16, 11, 3}, - {41, UPB_SIZE(120, 216), 0, 12, 11, 1}, - {42, UPB_SIZE(124, 224), 0, 20, 11, 1}, - {43, UPB_SIZE(156, 288), 0, 9, 11, 3}, - {44, UPB_SIZE(128, 232), 0, 7, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_msginit = { - &envoy_api_v2_Cluster_submsgs[0], - &envoy_api_v2_Cluster__fields[0], - UPB_SIZE(184, 336), 42, false, -}; - -static const upb_msglayout *const envoy_api_v2_Cluster_TransportSocketMatch_submsgs[2] = { - &envoy_api_v2_core_TransportSocket_msginit, - &google_protobuf_Struct_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_TransportSocketMatch__fields[3] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 1, 11, 1}, - {3, UPB_SIZE(12, 24), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_TransportSocketMatch_msginit = { - &envoy_api_v2_Cluster_TransportSocketMatch_submsgs[0], - &envoy_api_v2_Cluster_TransportSocketMatch__fields[0], - UPB_SIZE(16, 32), 3, false, -}; - -static const upb_msglayout *const envoy_api_v2_Cluster_CustomClusterType_submsgs[1] = { - &google_protobuf_Any_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_CustomClusterType__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_CustomClusterType_msginit = { - &envoy_api_v2_Cluster_CustomClusterType_submsgs[0], - &envoy_api_v2_Cluster_CustomClusterType__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_Cluster_EdsClusterConfig_submsgs[1] = { - &envoy_api_v2_core_ConfigSource_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_EdsClusterConfig__fields[2] = { - {1, UPB_SIZE(8, 16), 0, 0, 11, 1}, - {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_EdsClusterConfig_msginit = { - &envoy_api_v2_Cluster_EdsClusterConfig_submsgs[0], - &envoy_api_v2_Cluster_EdsClusterConfig__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_Cluster_LbSubsetConfig_submsgs[2] = { - &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, - &google_protobuf_Struct_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig__fields[7] = { - {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {2, UPB_SIZE(12, 16), 0, 1, 11, 1}, - {3, UPB_SIZE(16, 24), 0, 0, 11, 3}, - {4, UPB_SIZE(8, 8), 0, 0, 8, 1}, - {5, UPB_SIZE(9, 9), 0, 0, 8, 1}, - {6, UPB_SIZE(10, 10), 0, 0, 8, 1}, - {7, UPB_SIZE(11, 11), 0, 0, 8, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_LbSubsetConfig_msginit = { - &envoy_api_v2_Cluster_LbSubsetConfig_submsgs[0], - &envoy_api_v2_Cluster_LbSubsetConfig__fields[0], - UPB_SIZE(24, 32), 7, false, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__fields[2] = { - {1, UPB_SIZE(8, 8), 0, 0, 9, 3}, - {2, UPB_SIZE(0, 0), 0, 0, 14, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit = { - NULL, - &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__fields[0], - UPB_SIZE(16, 16), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_Cluster_LeastRequestLbConfig_submsgs[1] = { - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_LeastRequestLbConfig__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_LeastRequestLbConfig_msginit = { - &envoy_api_v2_Cluster_LeastRequestLbConfig_submsgs[0], - &envoy_api_v2_Cluster_LeastRequestLbConfig__fields[0], - UPB_SIZE(4, 8), 1, false, -}; - -static const upb_msglayout *const envoy_api_v2_Cluster_RingHashLbConfig_submsgs[2] = { - &google_protobuf_UInt64Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_RingHashLbConfig__fields[3] = { - {1, UPB_SIZE(8, 8), 0, 0, 11, 1}, - {3, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {4, UPB_SIZE(12, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_RingHashLbConfig_msginit = { - &envoy_api_v2_Cluster_RingHashLbConfig_submsgs[0], - &envoy_api_v2_Cluster_RingHashLbConfig__fields[0], - UPB_SIZE(16, 24), 3, false, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_OriginalDstLbConfig__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 8, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_OriginalDstLbConfig_msginit = { - NULL, - &envoy_api_v2_Cluster_OriginalDstLbConfig__fields[0], - UPB_SIZE(1, 1), 1, false, -}; - -static const upb_msglayout *const envoy_api_v2_Cluster_CommonLbConfig_submsgs[4] = { - &envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, - &envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, - &envoy_type_Percent_msginit, - &google_protobuf_Duration_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_CommonLbConfig__fields[6] = { - {1, UPB_SIZE(4, 8), 0, 2, 11, 1}, - {2, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1}, - {3, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 0, 11, 1}, - {4, UPB_SIZE(8, 16), 0, 3, 11, 1}, - {5, UPB_SIZE(0, 0), 0, 0, 8, 1}, - {6, UPB_SIZE(1, 1), 0, 0, 8, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_msginit = { - &envoy_api_v2_Cluster_CommonLbConfig_submsgs[0], - &envoy_api_v2_Cluster_CommonLbConfig__fields[0], - UPB_SIZE(20, 40), 6, false, -}; - -static const upb_msglayout *const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_submsgs[2] = { - &envoy_type_Percent_msginit, - &google_protobuf_UInt64Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig__fields[3] = { - {1, UPB_SIZE(4, 8), 0, 0, 11, 1}, - {2, UPB_SIZE(8, 16), 0, 1, 11, 1}, - {3, UPB_SIZE(0, 0), 0, 0, 8, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit = { - &envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_submsgs[0], - &envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig__fields[0], - UPB_SIZE(12, 24), 3, false, -}; - -const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit = { +const upb_msglayout envoy_api_v2_CdsDummy_msginit = { NULL, NULL, UPB_SIZE(0, 0), 0, false, }; -static const upb_msglayout *const envoy_api_v2_Cluster_RefreshRate_submsgs[2] = { - &google_protobuf_Duration_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_RefreshRate__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, - {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_RefreshRate_msginit = { - &envoy_api_v2_Cluster_RefreshRate_submsgs[0], - &envoy_api_v2_Cluster_RefreshRate__fields[0], - UPB_SIZE(8, 16), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_submsgs[1] = { - &google_protobuf_Struct_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_msginit = { - &envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_submsgs[0], - &envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_submsgs[1] = { - &google_protobuf_Any_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_msginit = { - &envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_submsgs[0], - &envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_LoadBalancingPolicy_submsgs[1] = { - &envoy_api_v2_LoadBalancingPolicy_Policy_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_LoadBalancingPolicy__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, -}; - -const upb_msglayout envoy_api_v2_LoadBalancingPolicy_msginit = { - &envoy_api_v2_LoadBalancingPolicy_submsgs[0], - &envoy_api_v2_LoadBalancingPolicy__fields[0], - UPB_SIZE(4, 8), 1, false, -}; - -static const upb_msglayout *const envoy_api_v2_LoadBalancingPolicy_Policy_submsgs[2] = { - &google_protobuf_Any_msginit, - &google_protobuf_Struct_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_LoadBalancingPolicy_Policy__fields[3] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 1, 11, 1}, - {3, UPB_SIZE(12, 24), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_LoadBalancingPolicy_Policy_msginit = { - &envoy_api_v2_LoadBalancingPolicy_Policy_submsgs[0], - &envoy_api_v2_LoadBalancingPolicy_Policy__fields[0], - UPB_SIZE(16, 32), 3, false, -}; - -static const upb_msglayout *const envoy_api_v2_UpstreamBindConfig_submsgs[1] = { - &envoy_api_v2_core_Address_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_UpstreamBindConfig__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_UpstreamBindConfig_msginit = { - &envoy_api_v2_UpstreamBindConfig_submsgs[0], - &envoy_api_v2_UpstreamBindConfig__fields[0], - UPB_SIZE(4, 8), 1, false, -}; - -static const upb_msglayout *const envoy_api_v2_UpstreamConnectionOptions_submsgs[1] = { - &envoy_api_v2_core_TcpKeepalive_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_UpstreamConnectionOptions__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_UpstreamConnectionOptions_msginit = { - &envoy_api_v2_UpstreamConnectionOptions_submsgs[0], - &envoy_api_v2_UpstreamConnectionOptions__fields[0], - UPB_SIZE(4, 8), 1, false, -}; - #include "upb/port_undef.inc" 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..3fa1929b87f 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 @@ -14,1358 +14,35 @@ #include "upb/decode.h" #include "upb/encode.h" +/* Public Imports. */ +#include "envoy/api/v2/cluster.upb.h" + #include "upb/port_def.inc" #ifdef __cplusplus extern "C" { #endif -struct envoy_api_v2_Cluster; -struct envoy_api_v2_Cluster_TransportSocketMatch; -struct envoy_api_v2_Cluster_CustomClusterType; -struct envoy_api_v2_Cluster_EdsClusterConfig; -struct envoy_api_v2_Cluster_LbSubsetConfig; -struct envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector; -struct envoy_api_v2_Cluster_LeastRequestLbConfig; -struct envoy_api_v2_Cluster_RingHashLbConfig; -struct envoy_api_v2_Cluster_OriginalDstLbConfig; -struct envoy_api_v2_Cluster_CommonLbConfig; -struct envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig; -struct envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig; -struct envoy_api_v2_Cluster_RefreshRate; -struct envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry; -struct envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry; -struct envoy_api_v2_LoadBalancingPolicy; -struct envoy_api_v2_LoadBalancingPolicy_Policy; -struct envoy_api_v2_UpstreamBindConfig; -struct envoy_api_v2_UpstreamConnectionOptions; -typedef struct envoy_api_v2_Cluster envoy_api_v2_Cluster; -typedef struct envoy_api_v2_Cluster_TransportSocketMatch envoy_api_v2_Cluster_TransportSocketMatch; -typedef struct envoy_api_v2_Cluster_CustomClusterType envoy_api_v2_Cluster_CustomClusterType; -typedef struct envoy_api_v2_Cluster_EdsClusterConfig envoy_api_v2_Cluster_EdsClusterConfig; -typedef struct envoy_api_v2_Cluster_LbSubsetConfig envoy_api_v2_Cluster_LbSubsetConfig; -typedef struct envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector; -typedef struct envoy_api_v2_Cluster_LeastRequestLbConfig envoy_api_v2_Cluster_LeastRequestLbConfig; -typedef struct envoy_api_v2_Cluster_RingHashLbConfig envoy_api_v2_Cluster_RingHashLbConfig; -typedef struct envoy_api_v2_Cluster_OriginalDstLbConfig envoy_api_v2_Cluster_OriginalDstLbConfig; -typedef struct envoy_api_v2_Cluster_CommonLbConfig envoy_api_v2_Cluster_CommonLbConfig; -typedef struct envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig; -typedef struct envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig; -typedef struct envoy_api_v2_Cluster_RefreshRate envoy_api_v2_Cluster_RefreshRate; -typedef struct envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry; -typedef struct envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry; -typedef struct envoy_api_v2_LoadBalancingPolicy envoy_api_v2_LoadBalancingPolicy; -typedef struct envoy_api_v2_LoadBalancingPolicy_Policy envoy_api_v2_LoadBalancingPolicy_Policy; -typedef struct envoy_api_v2_UpstreamBindConfig envoy_api_v2_UpstreamBindConfig; -typedef struct envoy_api_v2_UpstreamConnectionOptions envoy_api_v2_UpstreamConnectionOptions; -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_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; -struct envoy_api_v2_ClusterLoadAssignment; -struct envoy_api_v2_auth_UpstreamTlsContext; -struct envoy_api_v2_cluster_CircuitBreakers; -struct envoy_api_v2_cluster_Filter; -struct envoy_api_v2_cluster_OutlierDetection; -struct envoy_api_v2_core_Address; -struct envoy_api_v2_core_BindConfig; -struct envoy_api_v2_core_ConfigSource; -struct envoy_api_v2_core_HealthCheck; -struct envoy_api_v2_core_Http1ProtocolOptions; -struct envoy_api_v2_core_Http2ProtocolOptions; -struct envoy_api_v2_core_HttpProtocolOptions; -struct envoy_api_v2_core_Metadata; -struct envoy_api_v2_core_TcpKeepalive; -struct envoy_api_v2_core_TransportSocket; -struct envoy_type_Percent; -struct google_protobuf_Any; -struct google_protobuf_Duration; -struct google_protobuf_Struct; -struct google_protobuf_UInt32Value; -struct google_protobuf_UInt64Value; -extern const upb_msglayout envoy_api_v2_ClusterLoadAssignment_msginit; -extern const upb_msglayout envoy_api_v2_auth_UpstreamTlsContext_msginit; -extern const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_msginit; -extern const upb_msglayout envoy_api_v2_cluster_Filter_msginit; -extern const upb_msglayout envoy_api_v2_cluster_OutlierDetection_msginit; -extern const upb_msglayout envoy_api_v2_core_Address_msginit; -extern const upb_msglayout envoy_api_v2_core_BindConfig_msginit; -extern const upb_msglayout envoy_api_v2_core_ConfigSource_msginit; -extern const upb_msglayout envoy_api_v2_core_HealthCheck_msginit; -extern const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_msginit; -extern const upb_msglayout envoy_api_v2_core_Http2ProtocolOptions_msginit; -extern const upb_msglayout envoy_api_v2_core_HttpProtocolOptions_msginit; -extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; -extern const upb_msglayout envoy_api_v2_core_TcpKeepalive_msginit; -extern const upb_msglayout envoy_api_v2_core_TransportSocket_msginit; -extern const upb_msglayout envoy_type_Percent_msginit; -extern const upb_msglayout google_protobuf_Any_msginit; -extern const upb_msglayout google_protobuf_Duration_msginit; -extern const upb_msglayout google_protobuf_Struct_msginit; -extern const upb_msglayout google_protobuf_UInt32Value_msginit; -extern const upb_msglayout google_protobuf_UInt64Value_msginit; - -typedef enum { - envoy_api_v2_Cluster_USE_CONFIGURED_PROTOCOL = 0, - envoy_api_v2_Cluster_USE_DOWNSTREAM_PROTOCOL = 1 -} envoy_api_v2_Cluster_ClusterProtocolSelection; - -typedef enum { - envoy_api_v2_Cluster_STATIC = 0, - envoy_api_v2_Cluster_STRICT_DNS = 1, - envoy_api_v2_Cluster_LOGICAL_DNS = 2, - envoy_api_v2_Cluster_EDS = 3, - envoy_api_v2_Cluster_ORIGINAL_DST = 4 -} envoy_api_v2_Cluster_DiscoveryType; - -typedef enum { - envoy_api_v2_Cluster_AUTO = 0, - envoy_api_v2_Cluster_V4_ONLY = 1, - envoy_api_v2_Cluster_V6_ONLY = 2 -} envoy_api_v2_Cluster_DnsLookupFamily; - -typedef enum { - envoy_api_v2_Cluster_ROUND_ROBIN = 0, - envoy_api_v2_Cluster_LEAST_REQUEST = 1, - envoy_api_v2_Cluster_RING_HASH = 2, - envoy_api_v2_Cluster_RANDOM = 3, - envoy_api_v2_Cluster_ORIGINAL_DST_LB = 4, - envoy_api_v2_Cluster_MAGLEV = 5, - envoy_api_v2_Cluster_CLUSTER_PROVIDED = 6, - envoy_api_v2_Cluster_LOAD_BALANCING_POLICY_CONFIG = 7 -} envoy_api_v2_Cluster_LbPolicy; - -typedef enum { - envoy_api_v2_Cluster_LbSubsetConfig_NO_FALLBACK = 0, - envoy_api_v2_Cluster_LbSubsetConfig_ANY_ENDPOINT = 1, - envoy_api_v2_Cluster_LbSubsetConfig_DEFAULT_SUBSET = 2 -} envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetFallbackPolicy; - -typedef enum { - envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_NOT_DEFINED = 0, - envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_NO_FALLBACK = 1, - envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_ANY_ENDPOINT = 2, - envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_DEFAULT_SUBSET = 3 -} envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy; - -typedef enum { - envoy_api_v2_Cluster_RingHashLbConfig_XX_HASH = 0, - envoy_api_v2_Cluster_RingHashLbConfig_MURMUR_HASH_2 = 1 -} envoy_api_v2_Cluster_RingHashLbConfig_HashFunction; - - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster *envoy_api_v2_Cluster_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster *ret = envoy_api_v2_Cluster_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_serialize(const envoy_api_v2_Cluster *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_Cluster_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_Cluster_cluster_discovery_type_type = 2, - 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(168, 304)); } - -typedef enum { - envoy_api_v2_Cluster_lb_config_ring_hash_lb_config = 23, - envoy_api_v2_Cluster_lb_config_original_dst_lb_config = 34, - 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(176, 320)); } - -UPB_INLINE upb_strview envoy_api_v2_Cluster_name(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)); } -UPB_INLINE bool envoy_api_v2_Cluster_has_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(168, 304), 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(160, 296), UPB_SIZE(168, 304), 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(44, 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(48, 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(52, 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 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(132, 240), len); } -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(136, 248), 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(56, 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(60, 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(64, 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(68, 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(72, 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(76, 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 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(140, 256), 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(80, 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(84, 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(88, 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(92, 160)); } -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(176, 320), 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(172, 312), UPB_SIZE(176, 320), 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(96, 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(100, 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(104, 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(36, 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(108, 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(112, 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(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 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); } -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(160, 296), UPB_SIZE(168, 304), 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 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(152, 280), 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(120, 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(124, 224)); } -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(156, 288), 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(128, 232)); } - -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(28, 32)) = 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(160, 296), value, UPB_SIZE(168, 304), 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(44, 64)) = 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); - if (sub == NULL) { - 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); - } - 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(48, 72)) = 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); - if (sub == NULL) { - 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); - } - 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(52, 80)) = 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); - if (sub == NULL) { - 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); - } - 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_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(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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(132, 240), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE struct envoy_api_v2_core_HealthCheck** envoy_api_v2_Cluster_mutable_health_checks(envoy_api_v2_Cluster *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(136, 248), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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(56, 88)) = 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); - if (sub == NULL) { - 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); - } - 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(60, 96)) = 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); - if (sub == NULL) { - 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); - } - 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(64, 104)) = 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); - if (sub == NULL) { - 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); - } - 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(68, 112)) = 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); - if (sub == NULL) { - 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); - } - 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(72, 120)) = 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); - if (sub == NULL) { - 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); - } - 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(76, 128)) = 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); - if (sub == NULL) { - 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); - } - 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_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(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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(140, 256), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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(80, 136)) = 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); - if (sub == NULL) { - 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); - } - 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(84, 144)) = 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); - if (sub == NULL) { - 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); - } - 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(88, 152)) = 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); - if (sub == NULL) { - 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); - } - 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(92, 160)) = 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); - if (sub == NULL) { - 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); - } - return sub; -} -UPB_INLINE void envoy_api_v2_Cluster_set_ring_hash_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_RingHashLbConfig* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(172, 312), value, UPB_SIZE(176, 320), 23); -} -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); - if (!sub) return NULL; - envoy_api_v2_Cluster_set_ring_hash_lb_config(msg, sub); - } - 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(96, 168)) = 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); - if (sub == NULL) { - 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); - } - 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(100, 176)) = 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); - if (sub == NULL) { - 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); - } - 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_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(104, 184)) = 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); - if (sub == NULL) { - 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); - } - 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(36, 48)) = 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(108, 192)) = 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); - if (sub == NULL) { - 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); - } - 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(112, 200)) = 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); - if (sub == NULL) { - 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); - } - 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_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_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(116, 208)) = 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); - if (sub == NULL) { - 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); - } - return sub; -} -UPB_INLINE void envoy_api_v2_Cluster_set_original_dst_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_OriginalDstLbConfig* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(172, 312), value, UPB_SIZE(176, 320), 34); -} -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); - 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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_set_least_request_lb_config(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_Cluster_set_cluster_type(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_CustomClusterType* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(160, 296), value, UPB_SIZE(168, 304), 38); -} -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); - if (!sub) return NULL; - envoy_api_v2_Cluster_set_cluster_type(msg, sub); - } - 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_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(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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(152, 280), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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(120, 216)) = 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); - if (sub == NULL) { - 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); - } - 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(124, 224)) = 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); - if (sub == NULL) { - 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); - } - return sub; -} -UPB_INLINE envoy_api_v2_Cluster_TransportSocketMatch** envoy_api_v2_Cluster_mutable_transport_socket_matches(envoy_api_v2_Cluster *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(156, 288), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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(128, 232)) = 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); - if (sub == NULL) { - 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); - } - return sub; -} - -/* envoy.api.v2.Cluster.TransportSocketMatch */ +struct envoy_api_v2_CdsDummy; +typedef struct envoy_api_v2_CdsDummy envoy_api_v2_CdsDummy; +extern const upb_msglayout envoy_api_v2_CdsDummy_msginit; -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); -} -UPB_INLINE envoy_api_v2_Cluster_TransportSocketMatch *envoy_api_v2_Cluster_TransportSocketMatch_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_TransportSocketMatch *ret = envoy_api_v2_Cluster_TransportSocketMatch_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_TransportSocketMatch_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_TransportSocketMatch_serialize(const envoy_api_v2_Cluster_TransportSocketMatch *msg, upb_arena *arena, size_t *len) { - 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)); } +/* envoy.api.v2.CdsDummy */ -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_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_INLINE envoy_api_v2_CdsDummy *envoy_api_v2_CdsDummy_new(upb_arena *arena) { + return (envoy_api_v2_CdsDummy *)upb_msg_new(&envoy_api_v2_CdsDummy_msginit, arena); } -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); - if (!sub) return NULL; - envoy_api_v2_Cluster_TransportSocketMatch_set_match(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_TransportSocketMatch_set_transport_socket(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster_CustomClusterType *envoy_api_v2_Cluster_CustomClusterType_parse(const char *buf, size_t size, +UPB_INLINE envoy_api_v2_CdsDummy *envoy_api_v2_CdsDummy_parse(const char *buf, size_t size, upb_arena *arena) { - envoy_api_v2_Cluster_CustomClusterType *ret = envoy_api_v2_Cluster_CustomClusterType_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_CustomClusterType_msginit, arena)) ? ret : NULL; + envoy_api_v2_CdsDummy *ret = envoy_api_v2_CdsDummy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_CdsDummy_msginit, arena)) ? ret : NULL; } -UPB_INLINE char *envoy_api_v2_Cluster_CustomClusterType_serialize(const envoy_api_v2_Cluster_CustomClusterType *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_Cluster_CustomClusterType_msginit, arena, len); +UPB_INLINE char *envoy_api_v2_CdsDummy_serialize(const envoy_api_v2_CdsDummy *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_CdsDummy_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 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_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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_CustomClusterType_set_typed_config(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster_EdsClusterConfig *envoy_api_v2_Cluster_EdsClusterConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_EdsClusterConfig *ret = envoy_api_v2_Cluster_EdsClusterConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_EdsClusterConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_EdsClusterConfig_serialize(const envoy_api_v2_Cluster_EdsClusterConfig *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_EdsClusterConfig_set_eds_config(msg, sub); - } - 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig *envoy_api_v2_Cluster_LbSubsetConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_LbSubsetConfig *ret = envoy_api_v2_Cluster_LbSubsetConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_LbSubsetConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_LbSubsetConfig_serialize(const envoy_api_v2_Cluster_LbSubsetConfig *msg, upb_arena *arena, size_t *len) { - 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 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 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_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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_LbSubsetConfig_set_default_subset(msg, sub); - } - return sub; -} -UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector** envoy_api_v2_Cluster_LbSubsetConfig_mutable_subset_selectors(envoy_api_v2_Cluster_LbSubsetConfig *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(16, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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_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_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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *ret = envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_serialize(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena, len); -} - -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 upb_strview* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_mutable_keys(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { - 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); -} -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); -} -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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster_LeastRequestLbConfig *envoy_api_v2_Cluster_LeastRequestLbConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_LeastRequestLbConfig *ret = envoy_api_v2_Cluster_LeastRequestLbConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_LeastRequestLbConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_LeastRequestLbConfig_serialize(const envoy_api_v2_Cluster_LeastRequestLbConfig *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_LeastRequestLbConfig_set_choice_count(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster_RingHashLbConfig *envoy_api_v2_Cluster_RingHashLbConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_RingHashLbConfig *ret = envoy_api_v2_Cluster_RingHashLbConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_RingHashLbConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_RingHashLbConfig_serialize(const envoy_api_v2_Cluster_RingHashLbConfig *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_RingHashLbConfig_set_minimum_ring_size(msg, sub); - } - 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_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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_RingHashLbConfig_set_maximum_ring_size(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster_OriginalDstLbConfig *envoy_api_v2_Cluster_OriginalDstLbConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_OriginalDstLbConfig *ret = envoy_api_v2_Cluster_OriginalDstLbConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_OriginalDstLbConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_OriginalDstLbConfig_serialize(const envoy_api_v2_Cluster_OriginalDstLbConfig *msg, upb_arena *arena, size_t *len) { - 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 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig *envoy_api_v2_Cluster_CommonLbConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_CommonLbConfig *ret = envoy_api_v2_Cluster_CommonLbConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_CommonLbConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_CommonLbConfig_serialize(const envoy_api_v2_Cluster_CommonLbConfig *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_Cluster_CommonLbConfig_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_zone_aware_lb_config = 2, - 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(16, 32)); } - -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_zone_aware_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 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(12, 24), UPB_SIZE(16, 32), 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(16, 32), 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(12, 24), UPB_SIZE(16, 32), 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 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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_CommonLbConfig_set_healthy_panic_threshold(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_zone_aware_lb_config(envoy_api_v2_Cluster_CommonLbConfig *msg, envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 2); -} -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); - if (!sub) return NULL; - envoy_api_v2_Cluster_CommonLbConfig_set_zone_aware_lb_config(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_locality_weighted_lb_config(envoy_api_v2_Cluster_CommonLbConfig *msg, envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 3); -} -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); - if (!sub) return NULL; - envoy_api_v2_Cluster_CommonLbConfig_set_locality_weighted_lb_config(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_CommonLbConfig_set_update_merge_window(msg, sub); - } - 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_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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *ret = envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_serialize(const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_routing_enabled(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_min_cluster_size(msg, sub); - } - 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig *envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig *ret = envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_serialize(const envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, arena, len); -} - - - -/* 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); -} -UPB_INLINE envoy_api_v2_Cluster_RefreshRate *envoy_api_v2_Cluster_RefreshRate_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_RefreshRate *ret = envoy_api_v2_Cluster_RefreshRate_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_RefreshRate_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Cluster_RefreshRate_serialize(const envoy_api_v2_Cluster_RefreshRate *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_RefreshRate_set_base_interval(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_Cluster_RefreshRate_set_max_interval(msg, sub); - } - return sub; -} - -/* 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 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 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; -} - -/* 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 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 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_LoadBalancingPolicy *envoy_api_v2_LoadBalancingPolicy_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_LoadBalancingPolicy *ret = envoy_api_v2_LoadBalancingPolicy_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_LoadBalancingPolicy_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_LoadBalancingPolicy_serialize(const envoy_api_v2_LoadBalancingPolicy *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_LoadBalancingPolicy_msginit, arena, len); -} - -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) { - 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); -} -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); - 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_LoadBalancingPolicy_Policy *envoy_api_v2_LoadBalancingPolicy_Policy_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_LoadBalancingPolicy_Policy *ret = envoy_api_v2_LoadBalancingPolicy_Policy_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_LoadBalancingPolicy_Policy_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_LoadBalancingPolicy_Policy_serialize(const envoy_api_v2_LoadBalancingPolicy_Policy *msg, upb_arena *arena, size_t *len) { - 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 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_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_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); - if (!sub) return NULL; - envoy_api_v2_LoadBalancingPolicy_Policy_set_config(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_LoadBalancingPolicy_Policy_set_typed_config(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_UpstreamBindConfig *envoy_api_v2_UpstreamBindConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_UpstreamBindConfig *ret = envoy_api_v2_UpstreamBindConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_UpstreamBindConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_UpstreamBindConfig_serialize(const envoy_api_v2_UpstreamBindConfig *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_UpstreamBindConfig_set_source_address(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_UpstreamConnectionOptions *envoy_api_v2_UpstreamConnectionOptions_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_UpstreamConnectionOptions *ret = envoy_api_v2_UpstreamConnectionOptions_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_UpstreamConnectionOptions_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_UpstreamConnectionOptions_serialize(const envoy_api_v2_UpstreamConnectionOptions *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_UpstreamConnectionOptions_set_tcp_keepalive(msg, sub); - } - return sub; -} #ifdef __cplusplus } /* extern "C" */ 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 new file mode 100644 index 00000000000..ca3b3511042 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c @@ -0,0 +1,390 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/api/v2/cluster.upb.h" +#include "envoy/api/v2/auth/cert.upb.h" +#include "envoy/api/v2/cluster/circuit_breaker.upb.h" +#include "envoy/api/v2/cluster/filter.upb.h" +#include "envoy/api/v2/cluster/outlier_detection.upb.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/core/protocol.upb.h" +#include "envoy/api/v2/endpoint.upb.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 "envoy/annotations/deprecation.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[34] = { + &envoy_api_v2_Cluster_CommonLbConfig_msginit, + &envoy_api_v2_Cluster_CustomClusterType_msginit, + &envoy_api_v2_Cluster_EdsClusterConfig_msginit, + &envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_msginit, + &envoy_api_v2_Cluster_LbSubsetConfig_msginit, + &envoy_api_v2_Cluster_LeastRequestLbConfig_msginit, + &envoy_api_v2_Cluster_OriginalDstLbConfig_msginit, + &envoy_api_v2_Cluster_RefreshRate_msginit, + &envoy_api_v2_Cluster_RingHashLbConfig_msginit, + &envoy_api_v2_Cluster_TransportSocketMatch_msginit, + &envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_msginit, + &envoy_api_v2_ClusterLoadAssignment_msginit, + &envoy_api_v2_LoadBalancingPolicy_msginit, + &envoy_api_v2_UpstreamConnectionOptions_msginit, + &envoy_api_v2_auth_UpstreamTlsContext_msginit, + &envoy_api_v2_cluster_CircuitBreakers_msginit, + &envoy_api_v2_cluster_Filter_msginit, + &envoy_api_v2_cluster_OutlierDetection_msginit, + &envoy_api_v2_core_Address_msginit, + &envoy_api_v2_core_BindConfig_msginit, + &envoy_api_v2_core_ConfigSource_msginit, + &envoy_api_v2_core_HealthCheck_msginit, + &envoy_api_v2_core_Http1ProtocolOptions_msginit, + &envoy_api_v2_core_Http2ProtocolOptions_msginit, + &envoy_api_v2_core_HttpProtocolOptions_msginit, + &envoy_api_v2_core_Metadata_msginit, + &envoy_api_v2_core_TransportSocket_msginit, + &envoy_api_v2_core_UpstreamHttpProtocolOptions_msginit, + &google_protobuf_Duration_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +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}, + {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}, + {6, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {7, UPB_SIZE(140, 248), 0, 18, 11, 3}, + {8, UPB_SIZE(144, 256), 0, 21, 11, 3}, + {9, UPB_SIZE(60, 88), 0, 29, 11, 1}, + {10, UPB_SIZE(64, 96), 0, 15, 11, 1}, + {11, UPB_SIZE(68, 104), 0, 14, 11, 1}, + {13, UPB_SIZE(72, 112), 0, 22, 11, 1}, + {14, UPB_SIZE(76, 120), 0, 23, 11, 1}, + {16, UPB_SIZE(80, 128), 0, 28, 11, 1}, + {17, UPB_SIZE(8, 8), 0, 0, 14, 1}, + {18, UPB_SIZE(148, 264), 0, 18, 11, 3}, + {19, UPB_SIZE(84, 136), 0, 17, 11, 1}, + {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}, + {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}, + {27, UPB_SIZE(108, 184), 0, 0, 11, 1}, + {28, UPB_SIZE(40, 48), 0, 0, 9, 1}, + {29, UPB_SIZE(112, 192), 0, 24, 11, 1}, + {30, UPB_SIZE(116, 200), 0, 13, 11, 1}, + {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, 3}, + {36, UPB_SIZE(156, 280), 0, 10, 11, 3}, + {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}, + {42, UPB_SIZE(128, 224), 0, 20, 11, 1}, + {43, UPB_SIZE(164, 296), 0, 9, 11, 3}, + {44, UPB_SIZE(132, 232), 0, 7, 11, 1}, + {45, UPB_SIZE(27, 27), 0, 0, 8, 1}, + {46, UPB_SIZE(136, 240), 0, 27, 11, 1}, + {47, UPB_SIZE(28, 28), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_msginit = { + &envoy_api_v2_Cluster_submsgs[0], + &envoy_api_v2_Cluster__fields[0], + UPB_SIZE(192, 336), 45, false, +}; + +static const upb_msglayout *const envoy_api_v2_Cluster_TransportSocketMatch_submsgs[2] = { + &envoy_api_v2_core_TransportSocket_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_TransportSocketMatch__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 1, 11, 1}, + {3, UPB_SIZE(12, 24), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_TransportSocketMatch_msginit = { + &envoy_api_v2_Cluster_TransportSocketMatch_submsgs[0], + &envoy_api_v2_Cluster_TransportSocketMatch__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_Cluster_CustomClusterType_submsgs[1] = { + &google_protobuf_Any_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_CustomClusterType__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_CustomClusterType_msginit = { + &envoy_api_v2_Cluster_CustomClusterType_submsgs[0], + &envoy_api_v2_Cluster_CustomClusterType__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_Cluster_EdsClusterConfig_submsgs[1] = { + &envoy_api_v2_core_ConfigSource_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_EdsClusterConfig__fields[2] = { + {1, UPB_SIZE(8, 16), 0, 0, 11, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_EdsClusterConfig_msginit = { + &envoy_api_v2_Cluster_EdsClusterConfig_submsgs[0], + &envoy_api_v2_Cluster_EdsClusterConfig__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_Cluster_LbSubsetConfig_submsgs[2] = { + &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig__fields[7] = { + {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {2, UPB_SIZE(12, 16), 0, 1, 11, 1}, + {3, UPB_SIZE(16, 24), 0, 0, 11, 3}, + {4, UPB_SIZE(8, 8), 0, 0, 8, 1}, + {5, UPB_SIZE(9, 9), 0, 0, 8, 1}, + {6, UPB_SIZE(10, 10), 0, 0, 8, 1}, + {7, UPB_SIZE(11, 11), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_LbSubsetConfig_msginit = { + &envoy_api_v2_Cluster_LbSubsetConfig_submsgs[0], + &envoy_api_v2_Cluster_LbSubsetConfig__fields[0], + UPB_SIZE(24, 32), 7, false, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__fields[3] = { + {1, UPB_SIZE(8, 8), 0, 0, 9, 3}, + {2, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {3, UPB_SIZE(12, 16), 0, 0, 9, 3}, +}; + +const upb_msglayout envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit = { + NULL, + &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__fields[0], + UPB_SIZE(16, 24), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_Cluster_LeastRequestLbConfig_submsgs[1] = { + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_LeastRequestLbConfig__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_LeastRequestLbConfig_msginit = { + &envoy_api_v2_Cluster_LeastRequestLbConfig_submsgs[0], + &envoy_api_v2_Cluster_LeastRequestLbConfig__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_Cluster_RingHashLbConfig_submsgs[2] = { + &google_protobuf_UInt64Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_RingHashLbConfig__fields[3] = { + {1, UPB_SIZE(8, 8), 0, 0, 11, 1}, + {3, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {4, UPB_SIZE(12, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_RingHashLbConfig_msginit = { + &envoy_api_v2_Cluster_RingHashLbConfig_submsgs[0], + &envoy_api_v2_Cluster_RingHashLbConfig__fields[0], + UPB_SIZE(16, 24), 3, false, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_OriginalDstLbConfig__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_OriginalDstLbConfig_msginit = { + NULL, + &envoy_api_v2_Cluster_OriginalDstLbConfig__fields[0], + UPB_SIZE(1, 1), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_Cluster_CommonLbConfig_submsgs[4] = { + &envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, + &envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, + &envoy_type_Percent_msginit, + &google_protobuf_Duration_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_CommonLbConfig__fields[6] = { + {1, UPB_SIZE(4, 8), 0, 2, 11, 1}, + {2, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1}, + {3, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 0, 11, 1}, + {4, UPB_SIZE(8, 16), 0, 3, 11, 1}, + {5, UPB_SIZE(0, 0), 0, 0, 8, 1}, + {6, UPB_SIZE(1, 1), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_msginit = { + &envoy_api_v2_Cluster_CommonLbConfig_submsgs[0], + &envoy_api_v2_Cluster_CommonLbConfig__fields[0], + UPB_SIZE(20, 40), 6, false, +}; + +static const upb_msglayout *const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_submsgs[2] = { + &envoy_type_Percent_msginit, + &google_protobuf_UInt64Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig__fields[3] = { + {1, UPB_SIZE(4, 8), 0, 0, 11, 1}, + {2, UPB_SIZE(8, 16), 0, 1, 11, 1}, + {3, UPB_SIZE(0, 0), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit = { + &envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_submsgs[0], + &envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig__fields[0], + UPB_SIZE(12, 24), 3, false, +}; + +const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +static const upb_msglayout *const envoy_api_v2_Cluster_RefreshRate_submsgs[2] = { + &google_protobuf_Duration_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_RefreshRate__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_RefreshRate_msginit = { + &envoy_api_v2_Cluster_RefreshRate_submsgs[0], + &envoy_api_v2_Cluster_RefreshRate__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_submsgs[1] = { + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_msginit = { + &envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_submsgs[0], + &envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_submsgs[1] = { + &google_protobuf_Any_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_msginit = { + &envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_submsgs[0], + &envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_LoadBalancingPolicy_submsgs[1] = { + &envoy_api_v2_LoadBalancingPolicy_Policy_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_LoadBalancingPolicy__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_api_v2_LoadBalancingPolicy_msginit = { + &envoy_api_v2_LoadBalancingPolicy_submsgs[0], + &envoy_api_v2_LoadBalancingPolicy__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_LoadBalancingPolicy_Policy_submsgs[2] = { + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_LoadBalancingPolicy_Policy__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 1, 11, 1}, + {3, UPB_SIZE(12, 24), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_LoadBalancingPolicy_Policy_msginit = { + &envoy_api_v2_LoadBalancingPolicy_Policy_submsgs[0], + &envoy_api_v2_LoadBalancingPolicy_Policy__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_UpstreamBindConfig_submsgs[1] = { + &envoy_api_v2_core_Address_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_UpstreamBindConfig__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_UpstreamBindConfig_msginit = { + &envoy_api_v2_UpstreamBindConfig_submsgs[0], + &envoy_api_v2_UpstreamBindConfig__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_UpstreamConnectionOptions_submsgs[1] = { + &envoy_api_v2_core_TcpKeepalive_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_UpstreamConnectionOptions__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_UpstreamConnectionOptions_msginit = { + &envoy_api_v2_UpstreamConnectionOptions_submsgs[0], + &envoy_api_v2_UpstreamConnectionOptions__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..28cce1bb2f6 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h @@ -0,0 +1,1411 @@ +/* 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_UPB_H_ +#define ENVOY_API_V2_CLUSTER_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_Cluster; +struct envoy_api_v2_Cluster_TransportSocketMatch; +struct envoy_api_v2_Cluster_CustomClusterType; +struct envoy_api_v2_Cluster_EdsClusterConfig; +struct envoy_api_v2_Cluster_LbSubsetConfig; +struct envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector; +struct envoy_api_v2_Cluster_LeastRequestLbConfig; +struct envoy_api_v2_Cluster_RingHashLbConfig; +struct envoy_api_v2_Cluster_OriginalDstLbConfig; +struct envoy_api_v2_Cluster_CommonLbConfig; +struct envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig; +struct envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig; +struct envoy_api_v2_Cluster_RefreshRate; +struct envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry; +struct envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry; +struct envoy_api_v2_LoadBalancingPolicy; +struct envoy_api_v2_LoadBalancingPolicy_Policy; +struct envoy_api_v2_UpstreamBindConfig; +struct envoy_api_v2_UpstreamConnectionOptions; +typedef struct envoy_api_v2_Cluster envoy_api_v2_Cluster; +typedef struct envoy_api_v2_Cluster_TransportSocketMatch envoy_api_v2_Cluster_TransportSocketMatch; +typedef struct envoy_api_v2_Cluster_CustomClusterType envoy_api_v2_Cluster_CustomClusterType; +typedef struct envoy_api_v2_Cluster_EdsClusterConfig envoy_api_v2_Cluster_EdsClusterConfig; +typedef struct envoy_api_v2_Cluster_LbSubsetConfig envoy_api_v2_Cluster_LbSubsetConfig; +typedef struct envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector; +typedef struct envoy_api_v2_Cluster_LeastRequestLbConfig envoy_api_v2_Cluster_LeastRequestLbConfig; +typedef struct envoy_api_v2_Cluster_RingHashLbConfig envoy_api_v2_Cluster_RingHashLbConfig; +typedef struct envoy_api_v2_Cluster_OriginalDstLbConfig envoy_api_v2_Cluster_OriginalDstLbConfig; +typedef struct envoy_api_v2_Cluster_CommonLbConfig envoy_api_v2_Cluster_CommonLbConfig; +typedef struct envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig; +typedef struct envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig; +typedef struct envoy_api_v2_Cluster_RefreshRate envoy_api_v2_Cluster_RefreshRate; +typedef struct envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry; +typedef struct envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry; +typedef struct envoy_api_v2_LoadBalancingPolicy envoy_api_v2_LoadBalancingPolicy; +typedef struct envoy_api_v2_LoadBalancingPolicy_Policy envoy_api_v2_LoadBalancingPolicy_Policy; +typedef struct envoy_api_v2_UpstreamBindConfig envoy_api_v2_UpstreamBindConfig; +typedef struct envoy_api_v2_UpstreamConnectionOptions envoy_api_v2_UpstreamConnectionOptions; +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_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; +struct envoy_api_v2_ClusterLoadAssignment; +struct envoy_api_v2_auth_UpstreamTlsContext; +struct envoy_api_v2_cluster_CircuitBreakers; +struct envoy_api_v2_cluster_Filter; +struct envoy_api_v2_cluster_OutlierDetection; +struct envoy_api_v2_core_Address; +struct envoy_api_v2_core_BindConfig; +struct envoy_api_v2_core_ConfigSource; +struct envoy_api_v2_core_HealthCheck; +struct envoy_api_v2_core_Http1ProtocolOptions; +struct envoy_api_v2_core_Http2ProtocolOptions; +struct envoy_api_v2_core_HttpProtocolOptions; +struct envoy_api_v2_core_Metadata; +struct envoy_api_v2_core_TcpKeepalive; +struct envoy_api_v2_core_TransportSocket; +struct envoy_api_v2_core_UpstreamHttpProtocolOptions; +struct envoy_type_Percent; +struct google_protobuf_Any; +struct google_protobuf_Duration; +struct google_protobuf_Struct; +struct google_protobuf_UInt32Value; +struct google_protobuf_UInt64Value; +extern const upb_msglayout envoy_api_v2_ClusterLoadAssignment_msginit; +extern const upb_msglayout envoy_api_v2_auth_UpstreamTlsContext_msginit; +extern const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_msginit; +extern const upb_msglayout envoy_api_v2_cluster_Filter_msginit; +extern const upb_msglayout envoy_api_v2_cluster_OutlierDetection_msginit; +extern const upb_msglayout envoy_api_v2_core_Address_msginit; +extern const upb_msglayout envoy_api_v2_core_BindConfig_msginit; +extern const upb_msglayout envoy_api_v2_core_ConfigSource_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_msginit; +extern const upb_msglayout envoy_api_v2_core_Http2ProtocolOptions_msginit; +extern const upb_msglayout envoy_api_v2_core_HttpProtocolOptions_msginit; +extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; +extern const upb_msglayout envoy_api_v2_core_TcpKeepalive_msginit; +extern const upb_msglayout envoy_api_v2_core_TransportSocket_msginit; +extern const upb_msglayout envoy_api_v2_core_UpstreamHttpProtocolOptions_msginit; +extern const upb_msglayout envoy_type_Percent_msginit; +extern const upb_msglayout google_protobuf_Any_msginit; +extern const upb_msglayout google_protobuf_Duration_msginit; +extern const upb_msglayout google_protobuf_Struct_msginit; +extern const upb_msglayout google_protobuf_UInt32Value_msginit; +extern const upb_msglayout google_protobuf_UInt64Value_msginit; + +typedef enum { + envoy_api_v2_Cluster_USE_CONFIGURED_PROTOCOL = 0, + envoy_api_v2_Cluster_USE_DOWNSTREAM_PROTOCOL = 1 +} envoy_api_v2_Cluster_ClusterProtocolSelection; + +typedef enum { + envoy_api_v2_Cluster_STATIC = 0, + envoy_api_v2_Cluster_STRICT_DNS = 1, + envoy_api_v2_Cluster_LOGICAL_DNS = 2, + envoy_api_v2_Cluster_EDS = 3, + envoy_api_v2_Cluster_ORIGINAL_DST = 4 +} envoy_api_v2_Cluster_DiscoveryType; + +typedef enum { + envoy_api_v2_Cluster_AUTO = 0, + envoy_api_v2_Cluster_V4_ONLY = 1, + envoy_api_v2_Cluster_V6_ONLY = 2 +} envoy_api_v2_Cluster_DnsLookupFamily; + +typedef enum { + envoy_api_v2_Cluster_ROUND_ROBIN = 0, + envoy_api_v2_Cluster_LEAST_REQUEST = 1, + envoy_api_v2_Cluster_RING_HASH = 2, + envoy_api_v2_Cluster_RANDOM = 3, + envoy_api_v2_Cluster_ORIGINAL_DST_LB = 4, + envoy_api_v2_Cluster_MAGLEV = 5, + envoy_api_v2_Cluster_CLUSTER_PROVIDED = 6, + envoy_api_v2_Cluster_LOAD_BALANCING_POLICY_CONFIG = 7 +} envoy_api_v2_Cluster_LbPolicy; + +typedef enum { + envoy_api_v2_Cluster_LbSubsetConfig_NO_FALLBACK = 0, + envoy_api_v2_Cluster_LbSubsetConfig_ANY_ENDPOINT = 1, + envoy_api_v2_Cluster_LbSubsetConfig_DEFAULT_SUBSET = 2 +} envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetFallbackPolicy; + +typedef enum { + envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_NOT_DEFINED = 0, + envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_NO_FALLBACK = 1, + envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_ANY_ENDPOINT = 2, + envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_DEFAULT_SUBSET = 3, + envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_KEYS_SUBSET = 4 +} envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy; + +typedef enum { + envoy_api_v2_Cluster_RingHashLbConfig_XX_HASH = 0, + envoy_api_v2_Cluster_RingHashLbConfig_MURMUR_HASH_2 = 1 +} envoy_api_v2_Cluster_RingHashLbConfig_HashFunction; + + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster *envoy_api_v2_Cluster_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster *ret = envoy_api_v2_Cluster_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_serialize(const envoy_api_v2_Cluster *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_Cluster_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_Cluster_cluster_discovery_type_type = 2, + 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)); } + +typedef enum { + envoy_api_v2_Cluster_lb_config_ring_hash_lb_config = 23, + envoy_api_v2_Cluster_lb_config_original_dst_lb_config = 34, + 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 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 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 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 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 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_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_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 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(152, 272), 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(156, 280), len); } +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 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 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 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_eds_cluster_config(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_connect_timeout(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_per_connection_buffer_limit_bytes(msg, sub); + } + 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_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); +} +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(140, 248), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(140, 248), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE struct envoy_api_v2_core_HealthCheck** envoy_api_v2_Cluster_mutable_health_checks(envoy_api_v2_Cluster *msg, size_t *len) { + return (struct envoy_api_v2_core_HealthCheck**)_upb_array_mutable_accessor(msg, UPB_SIZE(144, 256), 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(144, 256), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(144, 256), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_max_requests_per_connection(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_circuit_breakers(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_tls_context(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_http_protocol_options(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_http2_protocol_options(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_dns_refresh_rate(msg, sub); + } + 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_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); +} +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(148, 264), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(148, 264), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_outlier_detection(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_cleanup_interval(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_upstream_bind_config(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_lb_subset_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_Cluster_set_ring_hash_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_RingHashLbConfig* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(180, 320), value, UPB_SIZE(184, 328), 23); +} +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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_ring_hash_lb_config(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_transport_socket(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_metadata(msg, sub); + } + 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_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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_common_lb_config(msg, sub); + } + 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_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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_common_http_protocol_options(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_upstream_connection_options(msg, sub); + } + 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_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_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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_load_assignment(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_Cluster_set_original_dst_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_OriginalDstLbConfig* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(180, 320), value, UPB_SIZE(184, 328), 34); +} +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); + 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(152, 272), 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(152, 272), 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(152, 272), 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(156, 280), 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(156, 280), 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(156, 280), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +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(180, 320), value, UPB_SIZE(184, 328), 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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_least_request_lb_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_Cluster_set_cluster_type(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_CustomClusterType* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(168, 304), value, UPB_SIZE(176, 312), 38); +} +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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_cluster_type(msg, sub); + } + 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_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); +} +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(160, 288), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(160, 288), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_load_balancing_policy(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_lrs_server(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_Cluster_TransportSocketMatch** envoy_api_v2_Cluster_mutable_transport_socket_matches(envoy_api_v2_Cluster *msg, size_t *len) { + return (envoy_api_v2_Cluster_TransportSocketMatch**)_upb_array_mutable_accessor(msg, UPB_SIZE(164, 296), 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(164, 296), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(164, 296), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_dns_failure_refresh_rate(msg, sub); + } + 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_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_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); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_UpstreamHttpProtocolOptions*)upb_msg_new(&envoy_api_v2_core_UpstreamHttpProtocolOptions_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_Cluster_set_upstream_http_protocol_options(msg, sub); + } + 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_TransportSocketMatch *envoy_api_v2_Cluster_TransportSocketMatch_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_TransportSocketMatch *ret = envoy_api_v2_Cluster_TransportSocketMatch_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_TransportSocketMatch_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_TransportSocketMatch_serialize(const envoy_api_v2_Cluster_TransportSocketMatch *msg, upb_arena *arena, size_t *len) { + 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_TransportSocketMatch_set_match(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_TransportSocketMatch_set_transport_socket(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_CustomClusterType *envoy_api_v2_Cluster_CustomClusterType_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_CustomClusterType *ret = envoy_api_v2_Cluster_CustomClusterType_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_CustomClusterType_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_CustomClusterType_serialize(const envoy_api_v2_Cluster_CustomClusterType *msg, upb_arena *arena, size_t *len) { + 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_CustomClusterType_set_typed_config(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_EdsClusterConfig *envoy_api_v2_Cluster_EdsClusterConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_EdsClusterConfig *ret = envoy_api_v2_Cluster_EdsClusterConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_EdsClusterConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_EdsClusterConfig_serialize(const envoy_api_v2_Cluster_EdsClusterConfig *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_EdsClusterConfig_set_eds_config(msg, sub); + } + 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig *envoy_api_v2_Cluster_LbSubsetConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_LbSubsetConfig *ret = envoy_api_v2_Cluster_LbSubsetConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_LbSubsetConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_LbSubsetConfig_serialize(const envoy_api_v2_Cluster_LbSubsetConfig *msg, upb_arena *arena, size_t *len) { + 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 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_LbSubsetConfig_set_default_subset(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector** envoy_api_v2_Cluster_LbSubsetConfig_mutable_subset_selectors(envoy_api_v2_Cluster_LbSubsetConfig *msg, size_t *len) { + 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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(16, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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_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_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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *ret = envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_serialize(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena, len); +} + +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 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) { + 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); +} +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); +} +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_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); +} +UPB_INLINE upb_strview* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_resize_fallback_keys_subset(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(12, 16), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_add_fallback_keys_subset(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(12, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_LeastRequestLbConfig *envoy_api_v2_Cluster_LeastRequestLbConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_LeastRequestLbConfig *ret = envoy_api_v2_Cluster_LeastRequestLbConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_LeastRequestLbConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_LeastRequestLbConfig_serialize(const envoy_api_v2_Cluster_LeastRequestLbConfig *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_LeastRequestLbConfig_set_choice_count(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_RingHashLbConfig *envoy_api_v2_Cluster_RingHashLbConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_RingHashLbConfig *ret = envoy_api_v2_Cluster_RingHashLbConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_RingHashLbConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_RingHashLbConfig_serialize(const envoy_api_v2_Cluster_RingHashLbConfig *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_RingHashLbConfig_set_minimum_ring_size(msg, sub); + } + 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_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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_RingHashLbConfig_set_maximum_ring_size(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_OriginalDstLbConfig *envoy_api_v2_Cluster_OriginalDstLbConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_OriginalDstLbConfig *ret = envoy_api_v2_Cluster_OriginalDstLbConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_OriginalDstLbConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_OriginalDstLbConfig_serialize(const envoy_api_v2_Cluster_OriginalDstLbConfig *msg, upb_arena *arena, size_t *len) { + 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 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig *envoy_api_v2_Cluster_CommonLbConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_CommonLbConfig *ret = envoy_api_v2_Cluster_CommonLbConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_CommonLbConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_CommonLbConfig_serialize(const envoy_api_v2_Cluster_CommonLbConfig *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_Cluster_CommonLbConfig_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_zone_aware_lb_config = 2, + 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(16, 32)); } + +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_zone_aware_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 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(12, 24), UPB_SIZE(16, 32), 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(16, 32), 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(12, 24), UPB_SIZE(16, 32), 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 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_CommonLbConfig_set_healthy_panic_threshold(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_zone_aware_lb_config(envoy_api_v2_Cluster_CommonLbConfig *msg, envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 2); +} +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); + if (!sub) return NULL; + envoy_api_v2_Cluster_CommonLbConfig_set_zone_aware_lb_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_locality_weighted_lb_config(envoy_api_v2_Cluster_CommonLbConfig *msg, envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 3); +} +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); + if (!sub) return NULL; + envoy_api_v2_Cluster_CommonLbConfig_set_locality_weighted_lb_config(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_CommonLbConfig_set_update_merge_window(msg, sub); + } + 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_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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *ret = envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_serialize(const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_routing_enabled(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_min_cluster_size(msg, sub); + } + 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig *envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig *ret = envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_serialize(const envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, arena, len); +} + + + +/* 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); +} +UPB_INLINE envoy_api_v2_Cluster_RefreshRate *envoy_api_v2_Cluster_RefreshRate_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Cluster_RefreshRate *ret = envoy_api_v2_Cluster_RefreshRate_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_RefreshRate_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Cluster_RefreshRate_serialize(const envoy_api_v2_Cluster_RefreshRate *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_RefreshRate_set_base_interval(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Cluster_RefreshRate_set_max_interval(msg, sub); + } + return sub; +} + +/* 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 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 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; +} + +/* 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 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 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_LoadBalancingPolicy *envoy_api_v2_LoadBalancingPolicy_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_LoadBalancingPolicy *ret = envoy_api_v2_LoadBalancingPolicy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_LoadBalancingPolicy_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_LoadBalancingPolicy_serialize(const envoy_api_v2_LoadBalancingPolicy *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_LoadBalancingPolicy_msginit, arena, len); +} + +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) { + 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); +} +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); + 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_LoadBalancingPolicy_Policy *envoy_api_v2_LoadBalancingPolicy_Policy_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_LoadBalancingPolicy_Policy *ret = envoy_api_v2_LoadBalancingPolicy_Policy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_LoadBalancingPolicy_Policy_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_LoadBalancingPolicy_Policy_serialize(const envoy_api_v2_LoadBalancingPolicy_Policy *msg, upb_arena *arena, size_t *len) { + 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_LoadBalancingPolicy_Policy_set_config(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_LoadBalancingPolicy_Policy_set_typed_config(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_UpstreamBindConfig *envoy_api_v2_UpstreamBindConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_UpstreamBindConfig *ret = envoy_api_v2_UpstreamBindConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_UpstreamBindConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_UpstreamBindConfig_serialize(const envoy_api_v2_UpstreamBindConfig *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_UpstreamBindConfig_set_source_address(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_UpstreamConnectionOptions *envoy_api_v2_UpstreamConnectionOptions_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_UpstreamConnectionOptions *ret = envoy_api_v2_UpstreamConnectionOptions_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_UpstreamConnectionOptions_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_UpstreamConnectionOptions_serialize(const envoy_api_v2_UpstreamConnectionOptions *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_UpstreamConnectionOptions_set_tcp_keepalive(msg, sub); + } + return sub; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CLUSTER_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c b/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c index 79452e86302..02569a91bfa 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c @@ -10,7 +10,10 @@ #include "upb/msg.h" #include "envoy/api/v2/cluster/circuit_breaker.upb.h" #include "envoy/api/v2/core/base.upb.h" +#include "envoy/type/percent.upb.h" #include "google/protobuf/wrappers.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "validate/validate.upb.h" #include "upb/port_def.inc" @@ -28,24 +31,42 @@ const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_msginit = { UPB_SIZE(4, 8), 1, false, }; -static const upb_msglayout *const envoy_api_v2_cluster_CircuitBreakers_Thresholds_submsgs[5] = { +static const upb_msglayout *const envoy_api_v2_cluster_CircuitBreakers_Thresholds_submsgs[6] = { + &envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_msginit, &google_protobuf_UInt32Value_msginit, }; -static const upb_msglayout_field envoy_api_v2_cluster_CircuitBreakers_Thresholds__fields[7] = { +static const upb_msglayout_field envoy_api_v2_cluster_CircuitBreakers_Thresholds__fields[8] = { {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {2, UPB_SIZE(12, 16), 0, 0, 11, 1}, - {3, UPB_SIZE(16, 24), 0, 0, 11, 1}, - {4, UPB_SIZE(20, 32), 0, 0, 11, 1}, - {5, UPB_SIZE(24, 40), 0, 0, 11, 1}, + {2, UPB_SIZE(12, 16), 0, 1, 11, 1}, + {3, UPB_SIZE(16, 24), 0, 1, 11, 1}, + {4, UPB_SIZE(20, 32), 0, 1, 11, 1}, + {5, UPB_SIZE(24, 40), 0, 1, 11, 1}, {6, UPB_SIZE(8, 8), 0, 0, 8, 1}, - {7, UPB_SIZE(28, 48), 0, 0, 11, 1}, + {7, UPB_SIZE(28, 48), 0, 1, 11, 1}, + {8, UPB_SIZE(32, 56), 0, 0, 11, 1}, }; const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_Thresholds_msginit = { &envoy_api_v2_cluster_CircuitBreakers_Thresholds_submsgs[0], &envoy_api_v2_cluster_CircuitBreakers_Thresholds__fields[0], - UPB_SIZE(32, 56), 7, false, + UPB_SIZE(40, 64), 8, false, +}; + +static const upb_msglayout *const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_submsgs[2] = { + &envoy_type_Percent_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 1, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_msginit = { + &envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_submsgs[0], + &envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget__fields[0], + UPB_SIZE(8, 16), 2, false, }; #include "upb/port_undef.inc" 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..7388b13b6d0 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 @@ -22,11 +22,16 @@ extern "C" { struct envoy_api_v2_cluster_CircuitBreakers; struct envoy_api_v2_cluster_CircuitBreakers_Thresholds; +struct envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget; typedef struct envoy_api_v2_cluster_CircuitBreakers envoy_api_v2_cluster_CircuitBreakers; typedef struct envoy_api_v2_cluster_CircuitBreakers_Thresholds envoy_api_v2_cluster_CircuitBreakers_Thresholds; +typedef struct envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget; 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; +struct envoy_type_Percent; struct google_protobuf_UInt32Value; +extern const upb_msglayout envoy_type_Percent_msginit; extern const upb_msglayout google_protobuf_UInt32Value_msginit; @@ -81,6 +86,7 @@ UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_Circui 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 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; @@ -148,6 +154,60 @@ 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_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); + if (sub == NULL) { + sub = (struct envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget*)upb_msg_new(&envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_retry_budget(msg, sub); + } + return sub; +} + +/* envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget */ + +UPB_INLINE envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_new(upb_arena *arena) { + return (envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *)upb_msg_new(&envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_msginit, arena); +} +UPB_INLINE envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *ret = envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_serialize(const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (sub == NULL) { + sub = (struct envoy_type_Percent*)upb_msg_new(&envoy_type_Percent_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_set_budget_percent(msg, sub); + } + 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_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); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_set_min_retry_concurrency(msg, sub); + } + return sub; +} #ifdef __cplusplus } /* extern "C" */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c index c2a286dc942..1cfdbd7e7a9 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c @@ -10,6 +10,7 @@ #include "upb/msg.h" #include "envoy/api/v2/cluster/filter.upb.h" #include "google/protobuf/any.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c index ed7fedfa979..d62bf5fd373 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c @@ -11,6 +11,7 @@ #include "envoy/api/v2/cluster/outlier_detection.upb.h" #include "google/protobuf/duration.upb.h" #include "google/protobuf/wrappers.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" 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 2c938395f8a..a5b58bf1d7c 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 @@ -11,18 +11,20 @@ #include "envoy/api/v2/core/address.upb.h" #include "envoy/api/v2/core/base.upb.h" #include "google/protobuf/wrappers.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" -static const upb_msglayout_field envoy_api_v2_core_Pipe__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, +static const upb_msglayout_field envoy_api_v2_core_Pipe__fields[2] = { + {1, UPB_SIZE(4, 8), 0, 0, 9, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 13, 1}, }; const upb_msglayout envoy_api_v2_core_Pipe_msginit = { NULL, &envoy_api_v2_core_Pipe__fields[0], - UPB_SIZE(8, 16), 1, false, + UPB_SIZE(16, 32), 2, false, }; static const upb_msglayout_field envoy_api_v2_core_SocketAddress__fields[6] = { 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..842479c2462 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 @@ -65,10 +65,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(0, 0)); } +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 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(0, 0)) = value; + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = 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; } /* envoy.api.v2.core.SocketAddress */ 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..f6e37a5b8a6 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 @@ -11,9 +11,11 @@ #include "envoy/api/v2/core/base.upb.h" #include "envoy/api/v2/core/http_uri.upb.h" #include "envoy/type/percent.upb.h" +#include "envoy/type/semantic_version.upb.h" #include "google/protobuf/any.upb.h" #include "google/protobuf/struct.upb.h" #include "google/protobuf/wrappers.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" @@ -30,23 +32,64 @@ const upb_msglayout envoy_api_v2_core_Locality_msginit = { UPB_SIZE(24, 48), 3, false, }; -static const upb_msglayout *const envoy_api_v2_core_Node_submsgs[2] = { +static const upb_msglayout *const envoy_api_v2_core_BuildVersion_submsgs[2] = { + &envoy_type_SemanticVersion_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_BuildVersion__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 1, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_core_BuildVersion_msginit = { + &envoy_api_v2_core_BuildVersion_submsgs[0], + &envoy_api_v2_core_BuildVersion__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_Extension_submsgs[1] = { + &envoy_api_v2_core_BuildVersion_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_Extension__fields[5] = { + {1, UPB_SIZE(4, 8), 0, 0, 9, 1}, + {2, UPB_SIZE(12, 24), 0, 0, 9, 1}, + {3, UPB_SIZE(20, 40), 0, 0, 9, 1}, + {4, UPB_SIZE(28, 56), 0, 0, 11, 1}, + {5, UPB_SIZE(0, 0), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_core_Extension_msginit = { + &envoy_api_v2_core_Extension_submsgs[0], + &envoy_api_v2_core_Extension__fields[0], + UPB_SIZE(32, 64), 5, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_Node_submsgs[4] = { + &envoy_api_v2_core_BuildVersion_msginit, + &envoy_api_v2_core_Extension_msginit, &envoy_api_v2_core_Locality_msginit, &google_protobuf_Struct_msginit, }; -static const upb_msglayout_field envoy_api_v2_core_Node__fields[5] = { +static const upb_msglayout_field envoy_api_v2_core_Node__fields[10] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, - {3, UPB_SIZE(24, 48), 0, 1, 11, 1}, - {4, UPB_SIZE(28, 56), 0, 0, 11, 1}, + {3, UPB_SIZE(32, 64), 0, 3, 11, 1}, + {4, UPB_SIZE(36, 72), 0, 2, 11, 1}, {5, UPB_SIZE(16, 32), 0, 0, 9, 1}, + {6, UPB_SIZE(24, 48), 0, 0, 9, 1}, + {7, UPB_SIZE(48, 96), UPB_SIZE(-57, -113), 0, 9, 1}, + {8, UPB_SIZE(48, 96), UPB_SIZE(-57, -113), 0, 11, 1}, + {9, UPB_SIZE(40, 80), 0, 1, 11, 3}, + {10, UPB_SIZE(44, 88), 0, 0, 9, 3}, }; const upb_msglayout envoy_api_v2_core_Node_msginit = { &envoy_api_v2_core_Node_submsgs[0], &envoy_api_v2_core_Node__fields[0], - UPB_SIZE(32, 64), 5, false, + UPB_SIZE(64, 128), 10, false, }; static const upb_msglayout *const envoy_api_v2_core_Metadata_submsgs[1] = { 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..2d2070b2d15 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 @@ -21,6 +21,8 @@ extern "C" { #endif struct envoy_api_v2_core_Locality; +struct envoy_api_v2_core_BuildVersion; +struct envoy_api_v2_core_Extension; struct envoy_api_v2_core_Node; struct envoy_api_v2_core_Metadata; struct envoy_api_v2_core_Metadata_FilterMetadataEntry; @@ -37,6 +39,8 @@ struct envoy_api_v2_core_SocketOption; struct envoy_api_v2_core_RuntimeFractionalPercent; struct envoy_api_v2_core_ControlPlane; typedef struct envoy_api_v2_core_Locality envoy_api_v2_core_Locality; +typedef struct envoy_api_v2_core_BuildVersion envoy_api_v2_core_BuildVersion; +typedef struct envoy_api_v2_core_Extension envoy_api_v2_core_Extension; typedef struct envoy_api_v2_core_Node envoy_api_v2_core_Node; typedef struct envoy_api_v2_core_Metadata envoy_api_v2_core_Metadata; typedef struct envoy_api_v2_core_Metadata_FilterMetadataEntry envoy_api_v2_core_Metadata_FilterMetadataEntry; @@ -53,6 +57,8 @@ typedef struct envoy_api_v2_core_SocketOption envoy_api_v2_core_SocketOption; typedef struct envoy_api_v2_core_RuntimeFractionalPercent envoy_api_v2_core_RuntimeFractionalPercent; typedef struct envoy_api_v2_core_ControlPlane envoy_api_v2_core_ControlPlane; 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; @@ -70,11 +76,13 @@ extern const upb_msglayout envoy_api_v2_core_RuntimeFractionalPercent_msginit; extern const upb_msglayout envoy_api_v2_core_ControlPlane_msginit; struct envoy_api_v2_core_HttpUri; struct envoy_type_FractionalPercent; +struct envoy_type_SemanticVersion; struct google_protobuf_Any; struct google_protobuf_BoolValue; struct google_protobuf_Struct; extern const upb_msglayout envoy_api_v2_core_HttpUri_msginit; extern const upb_msglayout envoy_type_FractionalPercent_msginit; +extern const upb_msglayout envoy_type_SemanticVersion_msginit; extern const upb_msglayout google_protobuf_Any_msginit; extern const upb_msglayout google_protobuf_BoolValue_msginit; extern const upb_msglayout google_protobuf_Struct_msginit; @@ -138,6 +146,93 @@ UPB_INLINE void envoy_api_v2_core_Locality_set_sub_zone(envoy_api_v2_core_Locali UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; } +/* envoy.api.v2.core.BuildVersion */ + +UPB_INLINE envoy_api_v2_core_BuildVersion *envoy_api_v2_core_BuildVersion_new(upb_arena *arena) { + return (envoy_api_v2_core_BuildVersion *)upb_msg_new(&envoy_api_v2_core_BuildVersion_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_BuildVersion *envoy_api_v2_core_BuildVersion_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_core_BuildVersion *ret = envoy_api_v2_core_BuildVersion_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_BuildVersion_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_BuildVersion_serialize(const envoy_api_v2_core_BuildVersion *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (sub == NULL) { + sub = (struct envoy_type_SemanticVersion*)upb_msg_new(&envoy_type_SemanticVersion_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_BuildVersion_set_version(msg, sub); + } + 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_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); + if (sub == NULL) { + sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_BuildVersion_set_metadata(msg, sub); + } + return sub; +} + +/* envoy.api.v2.core.Extension */ + +UPB_INLINE envoy_api_v2_core_Extension *envoy_api_v2_core_Extension_new(upb_arena *arena) { + return (envoy_api_v2_core_Extension *)upb_msg_new(&envoy_api_v2_core_Extension_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_Extension *envoy_api_v2_core_Extension_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_core_Extension *ret = envoy_api_v2_core_Extension_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_Extension_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_Extension_serialize(const envoy_api_v2_core_Extension *msg, upb_arena *arena, size_t *len) { + 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 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_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_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_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_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); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_BuildVersion*)upb_msg_new(&envoy_api_v2_core_BuildVersion_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Extension_set_version(msg, sub); + } + 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; +} + /* envoy.api.v2.core.Node */ UPB_INLINE envoy_api_v2_core_Node *envoy_api_v2_core_Node_new(upb_arena *arena) { @@ -152,11 +247,25 @@ UPB_INLINE char *envoy_api_v2_core_Node_serialize(const envoy_api_v2_core_Node * return upb_encode(msg, &envoy_api_v2_core_Node_msginit, arena, len); } +typedef enum { + envoy_api_v2_core_Node_user_agent_version_type_user_agent_version = 7, + 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(56, 112)); } + 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(24, 48)); } -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(28, 56)); } +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 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(56, 112), 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(48, 96), UPB_SIZE(56, 112), 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(56, 112), 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(48, 96), UPB_SIZE(56, 112), 8, NULL); } +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 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; @@ -165,7 +274,7 @@ UPB_INLINE void envoy_api_v2_core_Node_set_cluster(envoy_api_v2_core_Node *msg, UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = 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(24, 48)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(32, 64)) = 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); @@ -177,7 +286,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(28, 56)) = value; + UPB_FIELD_AT(msg, envoy_api_v2_core_Locality*, UPB_SIZE(36, 72)) = 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); @@ -191,6 +300,47 @@ UPB_INLINE struct envoy_api_v2_core_Locality* envoy_api_v2_core_Node_mutable_loc 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_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_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(48, 96), value, UPB_SIZE(56, 112), 7); +} +UPB_INLINE void envoy_api_v2_core_Node_set_user_agent_build_version(envoy_api_v2_core_Node *msg, envoy_api_v2_core_BuildVersion* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_BuildVersion*, UPB_SIZE(48, 96), value, UPB_SIZE(56, 112), 8); +} +UPB_INLINE struct envoy_api_v2_core_BuildVersion* envoy_api_v2_core_Node_mutable_user_agent_build_version(envoy_api_v2_core_Node *msg, upb_arena *arena) { + struct envoy_api_v2_core_BuildVersion* sub = (struct envoy_api_v2_core_BuildVersion*)envoy_api_v2_core_Node_user_agent_build_version(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_BuildVersion*)upb_msg_new(&envoy_api_v2_core_BuildVersion_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Node_set_user_agent_build_version(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_core_Extension** envoy_api_v2_core_Node_mutable_extensions(envoy_api_v2_core_Node *msg, size_t *len) { + return (envoy_api_v2_core_Extension**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); +} +UPB_INLINE envoy_api_v2_core_Extension** envoy_api_v2_core_Node_resize_extensions(envoy_api_v2_core_Node *msg, size_t len, upb_arena *arena) { + return (envoy_api_v2_core_Extension**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_api_v2_core_Extension* envoy_api_v2_core_Node_add_extensions(envoy_api_v2_core_Node *msg, upb_arena *arena) { + struct envoy_api_v2_core_Extension* sub = (struct envoy_api_v2_core_Extension*)upb_msg_new(&envoy_api_v2_core_Extension_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; + return sub; +} +UPB_INLINE upb_strview* envoy_api_v2_core_Node_mutable_client_features(envoy_api_v2_core_Node *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len); +} +UPB_INLINE upb_strview* envoy_api_v2_core_Node_resize_client_features(envoy_api_v2_core_Node *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); +} +UPB_INLINE bool envoy_api_v2_core_Node_add_client_features(envoy_api_v2_core_Node *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); +} /* envoy.api.v2.core.Metadata */ 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 fe4b788aac1..dd17a79caf9 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 @@ -12,6 +12,8 @@ #include "envoy/api/v2/core/grpc_service.upb.h" #include "google/protobuf/duration.upb.h" #include "google/protobuf/wrappers.upb.h" +#include "envoy/annotations/deprecation.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" @@ -22,20 +24,21 @@ static const upb_msglayout *const envoy_api_v2_core_ApiConfigSource_submsgs[4] = &google_protobuf_Duration_msginit, }; -static const upb_msglayout_field envoy_api_v2_core_ApiConfigSource__fields[7] = { +static const upb_msglayout_field envoy_api_v2_core_ApiConfigSource__fields[8] = { {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {2, UPB_SIZE(24, 40), 0, 0, 9, 3}, - {3, UPB_SIZE(12, 16), 0, 2, 11, 1}, - {4, UPB_SIZE(28, 48), 0, 0, 11, 3}, - {5, UPB_SIZE(16, 24), 0, 2, 11, 1}, - {6, UPB_SIZE(20, 32), 0, 1, 11, 1}, - {7, UPB_SIZE(8, 8), 0, 0, 8, 1}, + {2, UPB_SIZE(32, 48), 0, 0, 9, 3}, + {3, UPB_SIZE(20, 24), 0, 2, 11, 1}, + {4, UPB_SIZE(36, 56), 0, 0, 11, 3}, + {5, UPB_SIZE(24, 32), 0, 2, 11, 1}, + {6, UPB_SIZE(28, 40), 0, 1, 11, 1}, + {7, UPB_SIZE(16, 16), 0, 0, 8, 1}, + {8, UPB_SIZE(8, 8), 0, 0, 14, 1}, }; const upb_msglayout envoy_api_v2_core_ApiConfigSource_msginit = { &envoy_api_v2_core_ApiConfigSource_submsgs[0], &envoy_api_v2_core_ApiConfigSource__fields[0], - UPB_SIZE(32, 56), 7, false, + UPB_SIZE(40, 64), 8, false, }; const upb_msglayout envoy_api_v2_core_AggregatedConfigSource_msginit = { @@ -73,18 +76,19 @@ static const upb_msglayout *const envoy_api_v2_core_ConfigSource_submsgs[4] = { &google_protobuf_Duration_msginit, }; -static const upb_msglayout_field envoy_api_v2_core_ConfigSource__fields[5] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, - {2, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 1, 11, 1}, - {3, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 11, 1}, - {4, UPB_SIZE(0, 0), 0, 3, 11, 1}, - {5, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 2, 11, 1}, +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}, + {4, UPB_SIZE(8, 8), 0, 3, 11, 1}, + {5, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 2, 11, 1}, + {6, UPB_SIZE(0, 0), 0, 0, 14, 1}, }; const upb_msglayout envoy_api_v2_core_ConfigSource_msginit = { &envoy_api_v2_core_ConfigSource_submsgs[0], &envoy_api_v2_core_ConfigSource__fields[0], - UPB_SIZE(16, 32), 5, false, + UPB_SIZE(24, 48), 6, false, }; #include "upb/port_undef.inc" 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..915ef60d711 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 @@ -51,6 +51,12 @@ typedef enum { envoy_api_v2_core_ApiConfigSource_DELTA_GRPC = 3 } envoy_api_v2_core_ApiConfigSource_ApiType; +typedef enum { + envoy_api_v2_core_AUTO = 0, + envoy_api_v2_core_V2 = 1, + envoy_api_v2_core_V3 = 2 +} envoy_api_v2_core_ApiVersion; + /* envoy.api.v2.core.ApiConfigSource */ @@ -67,28 +73,29 @@ UPB_INLINE char *envoy_api_v2_core_ApiConfigSource_serialize(const envoy_api_v2_ } 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 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(24, 40), 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(12, 16)); } -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(28, 48), 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(16, 24)); } -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(20, 32)); } -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(8, 8)); } +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 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 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_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(24, 40), len); + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 48), 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(32, 48), len, UPB_SIZE(8, 16), 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); + msg, UPB_SIZE(32, 48), 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; + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(20, 24)) = 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); @@ -100,20 +107,20 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mu return sub; } UPB_INLINE struct envoy_api_v2_core_GrpcService** envoy_api_v2_core_ApiConfigSource_mutable_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { - return (struct envoy_api_v2_core_GrpcService**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len); + return (struct envoy_api_v2_core_GrpcService**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 56), 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(36, 56), len, UPB_SIZE(4, 8), 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); bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(28, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + msg, UPB_SIZE(36, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; 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(16, 24)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(24, 32)) = 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); @@ -125,7 +132,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(20, 32)) = value; + UPB_FIELD_AT(msg, envoy_api_v2_core_RateLimitSettings*, UPB_SIZE(28, 40)) = 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); @@ -137,7 +144,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(8, 8)) = value; + UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = 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; } /* envoy.api.v2.core.AggregatedConfigSource */ @@ -235,23 +245,24 @@ 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(12, 24)); } - -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(12, 24), 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(4, 8), UPB_SIZE(12, 24), 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(12, 24), 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(4, 8), UPB_SIZE(12, 24), 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(12, 24), 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(4, 8), UPB_SIZE(12, 24), 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(0, 0)); } -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(12, 24), 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(4, 8), UPB_SIZE(12, 24), 5, NULL); } +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 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(""))); } +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 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_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 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(4, 8), value, UPB_SIZE(12, 24), 1); + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 1); } UPB_INLINE void envoy_api_v2_core_ConfigSource_set_api_config_source(envoy_api_v2_core_ConfigSource *msg, envoy_api_v2_core_ApiConfigSource* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_core_ApiConfigSource*, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 2); + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_ApiConfigSource*, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 2); } 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); @@ -263,7 +274,7 @@ UPB_INLINE struct envoy_api_v2_core_ApiConfigSource* envoy_api_v2_core_ConfigSou return sub; } UPB_INLINE void envoy_api_v2_core_ConfigSource_set_ads(envoy_api_v2_core_ConfigSource *msg, envoy_api_v2_core_AggregatedConfigSource* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_core_AggregatedConfigSource*, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 3); + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_AggregatedConfigSource*, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 3); } 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); @@ -275,7 +286,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(0, 0)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 8)) = 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); @@ -287,7 +298,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ConfigSource_mutab return sub; } UPB_INLINE void envoy_api_v2_core_ConfigSource_set_self(envoy_api_v2_core_ConfigSource *msg, envoy_api_v2_core_SelfConfigSource* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_core_SelfConfigSource*, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 5); + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_SelfConfigSource*, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 5); } 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); @@ -298,6 +309,9 @@ 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; +} #ifdef __cplusplus } /* extern "C" */ 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 14c41c14dc3..f1b76b8ad46 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 @@ -14,6 +14,8 @@ #include "google/protobuf/duration.upb.h" #include "google/protobuf/empty.upb.h" #include "google/protobuf/struct.upb.h" +#include "udpa/annotations/sensitive.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" @@ -109,26 +111,28 @@ const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_ UPB_SIZE(8, 16), 3, false, }; -static const upb_msglayout *const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_submsgs[4] = { +static const upb_msglayout *const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_submsgs[5] = { &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_ServiceAccountJWTAccessCredentials_msginit, + &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit, &google_protobuf_Empty_msginit, }; -static const upb_msglayout_field envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials__fields[6] = { +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), 3, 11, 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 = { &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_submsgs[0], &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials__fields[0], - UPB_SIZE(16, 32), 6, false, + UPB_SIZE(16, 32), 7, false, }; static const upb_msglayout_field envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials__fields[2] = { @@ -170,5 +174,23 @@ const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_Met UPB_SIZE(16, 32), 3, false, }; +static const upb_msglayout_field envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService__fields[9] = { + {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, 9, 1}, + {4, UPB_SIZE(24, 48), 0, 0, 9, 1}, + {5, UPB_SIZE(32, 64), 0, 0, 9, 1}, + {6, UPB_SIZE(40, 80), 0, 0, 9, 1}, + {7, UPB_SIZE(48, 96), 0, 0, 9, 1}, + {8, UPB_SIZE(56, 112), 0, 0, 9, 1}, + {9, UPB_SIZE(64, 128), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit = { + NULL, + &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService__fields[0], + UPB_SIZE(72, 144), 9, false, +}; + #include "upb/port_undef.inc" 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..143b9d841f6 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 @@ -30,6 +30,7 @@ struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials; struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials; struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials; struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin; +struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService; typedef struct envoy_api_v2_core_GrpcService envoy_api_v2_core_GrpcService; typedef struct envoy_api_v2_core_GrpcService_EnvoyGrpc envoy_api_v2_core_GrpcService_EnvoyGrpc; typedef struct envoy_api_v2_core_GrpcService_GoogleGrpc envoy_api_v2_core_GrpcService_GoogleGrpc; @@ -40,6 +41,7 @@ typedef struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials envoy_ap typedef struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials; typedef struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials; typedef struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin; +typedef struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService; 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; @@ -50,6 +52,7 @@ extern const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredenti 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; struct envoy_api_v2_core_DataSource; struct envoy_api_v2_core_HeaderValue; struct google_protobuf_Any; @@ -388,6 +391,7 @@ typedef enum { envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_service_account_jwt_access = 4, envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_google_iam = 5, envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_from_plugin = 6, + 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)); } @@ -404,6 +408,8 @@ UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_goo 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 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 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) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1); @@ -459,6 +465,18 @@ UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_Metad } return sub; } +UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_set_sts_service(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg, envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 7); +} +UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_mutable_sts_service(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg, upb_arena *arena) { + struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService* sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService*)envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_sts_service(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService*)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_set_sts_service(msg, sub); + } + return sub; +} /* envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.ServiceAccountJWTAccessCredentials */ @@ -563,6 +581,58 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_core_GrpcService_GoogleGrpc_ return sub; } +/* envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.StsService */ + +UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_new(upb_arena *arena) { + return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *ret = envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_serialize(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg, upb_arena *arena, size_t *len) { + 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 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_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_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_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_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_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_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_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_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; +} + #ifdef __cplusplus } /* extern "C" */ #endif 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 5c39efca162..01573ebaeba 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 @@ -11,51 +11,56 @@ #include "envoy/api/v2/core/health_check.upb.h" #include "envoy/api/v2/core/base.upb.h" #include "envoy/type/http.upb.h" +#include "envoy/type/matcher/string.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" #include "google/protobuf/wrappers.upb.h" +#include "envoy/annotations/deprecation.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" -static const upb_msglayout *const envoy_api_v2_core_HealthCheck_submsgs[16] = { +static const upb_msglayout *const envoy_api_v2_core_HealthCheck_submsgs[17] = { &envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit, &envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit, &envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit, &envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit, + &envoy_api_v2_core_HealthCheck_TlsOptions_msginit, &google_protobuf_BoolValue_msginit, &google_protobuf_Duration_msginit, &google_protobuf_UInt32Value_msginit, }; -static const upb_msglayout_field envoy_api_v2_core_HealthCheck__fields[19] = { - {1, UPB_SIZE(16, 24), 0, 5, 11, 1}, - {2, UPB_SIZE(20, 32), 0, 5, 11, 1}, - {3, UPB_SIZE(24, 40), 0, 5, 11, 1}, - {4, UPB_SIZE(28, 48), 0, 6, 11, 1}, - {5, UPB_SIZE(32, 56), 0, 6, 11, 1}, - {6, UPB_SIZE(36, 64), 0, 6, 11, 1}, - {7, UPB_SIZE(40, 72), 0, 4, 11, 1}, - {8, UPB_SIZE(64, 120), UPB_SIZE(-69, -129), 2, 11, 1}, - {9, UPB_SIZE(64, 120), UPB_SIZE(-69, -129), 3, 11, 1}, - {11, UPB_SIZE(64, 120), UPB_SIZE(-69, -129), 1, 11, 1}, - {12, UPB_SIZE(44, 80), 0, 5, 11, 1}, - {13, UPB_SIZE(64, 120), UPB_SIZE(-69, -129), 0, 11, 1}, - {14, UPB_SIZE(48, 88), 0, 5, 11, 1}, - {15, UPB_SIZE(52, 96), 0, 5, 11, 1}, - {16, UPB_SIZE(56, 104), 0, 5, 11, 1}, +static const upb_msglayout_field envoy_api_v2_core_HealthCheck__fields[20] = { + {1, UPB_SIZE(16, 24), 0, 6, 11, 1}, + {2, UPB_SIZE(20, 32), 0, 6, 11, 1}, + {3, UPB_SIZE(24, 40), 0, 6, 11, 1}, + {4, UPB_SIZE(28, 48), 0, 7, 11, 1}, + {5, UPB_SIZE(32, 56), 0, 7, 11, 1}, + {6, UPB_SIZE(36, 64), 0, 7, 11, 1}, + {7, UPB_SIZE(40, 72), 0, 5, 11, 1}, + {8, UPB_SIZE(68, 128), UPB_SIZE(-73, -137), 2, 11, 1}, + {9, UPB_SIZE(68, 128), UPB_SIZE(-73, -137), 3, 11, 1}, + {11, UPB_SIZE(68, 128), UPB_SIZE(-73, -137), 1, 11, 1}, + {12, UPB_SIZE(44, 80), 0, 6, 11, 1}, + {13, UPB_SIZE(68, 128), UPB_SIZE(-73, -137), 0, 11, 1}, + {14, UPB_SIZE(48, 88), 0, 6, 11, 1}, + {15, UPB_SIZE(52, 96), 0, 6, 11, 1}, + {16, UPB_SIZE(56, 104), 0, 6, 11, 1}, {17, UPB_SIZE(8, 8), 0, 0, 9, 1}, {18, UPB_SIZE(0, 0), 0, 0, 13, 1}, {19, UPB_SIZE(4, 4), 0, 0, 8, 1}, - {20, UPB_SIZE(60, 112), 0, 5, 11, 1}, + {20, UPB_SIZE(60, 112), 0, 6, 11, 1}, + {21, UPB_SIZE(64, 120), 0, 4, 11, 1}, }; const upb_msglayout envoy_api_v2_core_HealthCheck_msginit = { &envoy_api_v2_core_HealthCheck_submsgs[0], &envoy_api_v2_core_HealthCheck__fields[0], - UPB_SIZE(72, 144), 19, false, + UPB_SIZE(80, 144), 20, false, }; static const upb_msglayout_field envoy_api_v2_core_HealthCheck_Payload__fields[2] = { @@ -69,29 +74,31 @@ const upb_msglayout envoy_api_v2_core_HealthCheck_Payload_msginit = { UPB_SIZE(16, 32), 2, false, }; -static const upb_msglayout *const envoy_api_v2_core_HealthCheck_HttpHealthCheck_submsgs[4] = { +static const upb_msglayout *const envoy_api_v2_core_HealthCheck_HttpHealthCheck_submsgs[5] = { &envoy_api_v2_core_HeaderValueOption_msginit, &envoy_api_v2_core_HealthCheck_Payload_msginit, &envoy_type_Int64Range_msginit, + &envoy_type_matcher_StringMatcher_msginit, }; -static const upb_msglayout_field envoy_api_v2_core_HealthCheck_HttpHealthCheck__fields[10] = { +static const upb_msglayout_field envoy_api_v2_core_HealthCheck_HttpHealthCheck__fields[11] = { {1, UPB_SIZE(12, 16), 0, 0, 9, 1}, {2, UPB_SIZE(20, 32), 0, 0, 9, 1}, {3, UPB_SIZE(36, 64), 0, 1, 11, 1}, {4, UPB_SIZE(40, 72), 0, 1, 11, 1}, {5, UPB_SIZE(28, 48), 0, 0, 9, 1}, - {6, UPB_SIZE(44, 80), 0, 0, 11, 3}, + {6, UPB_SIZE(48, 88), 0, 0, 11, 3}, {7, UPB_SIZE(8, 8), 0, 0, 8, 1}, - {8, UPB_SIZE(48, 88), 0, 0, 9, 3}, - {9, UPB_SIZE(52, 96), 0, 2, 11, 3}, + {8, UPB_SIZE(52, 96), 0, 0, 9, 3}, + {9, UPB_SIZE(56, 104), 0, 2, 11, 3}, {10, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {11, UPB_SIZE(44, 80), 0, 3, 11, 1}, }; const upb_msglayout envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit = { &envoy_api_v2_core_HealthCheck_HttpHealthCheck_submsgs[0], &envoy_api_v2_core_HealthCheck_HttpHealthCheck__fields[0], - UPB_SIZE(56, 112), 10, false, + UPB_SIZE(64, 112), 11, false, }; static const upb_msglayout *const envoy_api_v2_core_HealthCheck_TcpHealthCheck_submsgs[2] = { @@ -147,5 +154,15 @@ const upb_msglayout envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit = { UPB_SIZE(16, 32), 3, false, }; +static const upb_msglayout_field envoy_api_v2_core_HealthCheck_TlsOptions__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 3}, +}; + +const upb_msglayout envoy_api_v2_core_HealthCheck_TlsOptions_msginit = { + NULL, + &envoy_api_v2_core_HealthCheck_TlsOptions__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + #include "upb/port_undef.inc" 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..587beac26be 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 @@ -27,6 +27,7 @@ struct envoy_api_v2_core_HealthCheck_TcpHealthCheck; struct envoy_api_v2_core_HealthCheck_RedisHealthCheck; struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck; struct envoy_api_v2_core_HealthCheck_CustomHealthCheck; +struct envoy_api_v2_core_HealthCheck_TlsOptions; typedef struct envoy_api_v2_core_HealthCheck envoy_api_v2_core_HealthCheck; typedef struct envoy_api_v2_core_HealthCheck_Payload envoy_api_v2_core_HealthCheck_Payload; typedef struct envoy_api_v2_core_HealthCheck_HttpHealthCheck envoy_api_v2_core_HealthCheck_HttpHealthCheck; @@ -34,6 +35,7 @@ typedef struct envoy_api_v2_core_HealthCheck_TcpHealthCheck envoy_api_v2_core_He typedef struct envoy_api_v2_core_HealthCheck_RedisHealthCheck envoy_api_v2_core_HealthCheck_RedisHealthCheck; typedef struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck envoy_api_v2_core_HealthCheck_GrpcHealthCheck; typedef struct envoy_api_v2_core_HealthCheck_CustomHealthCheck envoy_api_v2_core_HealthCheck_CustomHealthCheck; +typedef struct envoy_api_v2_core_HealthCheck_TlsOptions envoy_api_v2_core_HealthCheck_TlsOptions; 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; @@ -41,8 +43,10 @@ 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; struct envoy_api_v2_core_HeaderValueOption; struct envoy_type_Int64Range; +struct envoy_type_matcher_StringMatcher; struct google_protobuf_Any; struct google_protobuf_BoolValue; struct google_protobuf_Duration; @@ -50,6 +54,7 @@ struct google_protobuf_Struct; struct google_protobuf_UInt32Value; extern const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit; extern const upb_msglayout envoy_type_Int64Range_msginit; +extern const upb_msglayout envoy_type_matcher_StringMatcher_msginit; extern const upb_msglayout google_protobuf_Any_msginit; extern const upb_msglayout google_protobuf_BoolValue_msginit; extern const upb_msglayout google_protobuf_Duration_msginit; @@ -87,7 +92,7 @@ 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(68, 128)); } +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(72, 136)); } 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)); } @@ -96,15 +101,15 @@ UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthChe 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 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(68, 128), 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(64, 120), UPB_SIZE(68, 128), 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(68, 128), 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(64, 120), UPB_SIZE(68, 128), 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(68, 128), 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(64, 120), UPB_SIZE(68, 128), 11, NULL); } +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(72, 136), 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(68, 128), UPB_SIZE(72, 136), 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(72, 136), 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(68, 128), UPB_SIZE(72, 136), 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(72, 136), 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(68, 128), UPB_SIZE(72, 136), 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_custom_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(68, 128), 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(64, 120), UPB_SIZE(68, 128), 13, NULL); } +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(72, 136), 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(68, 128), UPB_SIZE(72, 136), 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)); } @@ -112,6 +117,7 @@ UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_event_log_path(const envoy_ 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 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; @@ -198,7 +204,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_HealthCheck_mutab return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_http_health_check(envoy_api_v2_core_HealthCheck *msg, envoy_api_v2_core_HealthCheck_HttpHealthCheck* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_HttpHealthCheck*, UPB_SIZE(64, 120), value, UPB_SIZE(68, 128), 8); + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_HttpHealthCheck*, UPB_SIZE(68, 128), value, UPB_SIZE(72, 136), 8); } 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); @@ -210,7 +216,7 @@ UPB_INLINE struct envoy_api_v2_core_HealthCheck_HttpHealthCheck* envoy_api_v2_co return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_tcp_health_check(envoy_api_v2_core_HealthCheck *msg, envoy_api_v2_core_HealthCheck_TcpHealthCheck* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_TcpHealthCheck*, UPB_SIZE(64, 120), value, UPB_SIZE(68, 128), 9); + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_TcpHealthCheck*, UPB_SIZE(68, 128), value, UPB_SIZE(72, 136), 9); } 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); @@ -222,7 +228,7 @@ UPB_INLINE struct envoy_api_v2_core_HealthCheck_TcpHealthCheck* envoy_api_v2_cor return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_grpc_health_check(envoy_api_v2_core_HealthCheck *msg, envoy_api_v2_core_HealthCheck_GrpcHealthCheck* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_GrpcHealthCheck*, UPB_SIZE(64, 120), value, UPB_SIZE(68, 128), 11); + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_GrpcHealthCheck*, UPB_SIZE(68, 128), value, UPB_SIZE(72, 136), 11); } 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); @@ -246,7 +252,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutabl return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_custom_health_check(envoy_api_v2_core_HealthCheck *msg, envoy_api_v2_core_HealthCheck_CustomHealthCheck* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_CustomHealthCheck*, UPB_SIZE(64, 120), value, UPB_SIZE(68, 128), 13); + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_CustomHealthCheck*, UPB_SIZE(68, 128), value, UPB_SIZE(72, 136), 13); } 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); @@ -314,6 +320,18 @@ 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_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); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_HealthCheck_TlsOptions*)upb_msg_new(&envoy_api_v2_core_HealthCheck_TlsOptions_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_tls_options(msg, sub); + } + return sub; +} /* envoy.api.v2.core.HealthCheck.Payload */ @@ -367,11 +385,12 @@ UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_HttpHealthCheck_path(const 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 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(44, 80), len); } +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 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(48, 88), len); } -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(52, 96), len); } +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 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 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; @@ -407,15 +426,15 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_service_name(e UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 48)) = 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(44, 80), len); + 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_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(48, 88), len, UPB_SIZE(4, 8), 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); bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(44, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + msg, UPB_SIZE(48, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; return sub; } @@ -423,31 +442,43 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_use_http2(envo UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = 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(48, 88), len); + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 96), 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(52, 96), len, UPB_SIZE(8, 16), 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); + msg, UPB_SIZE(52, 96), 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); + return (struct envoy_type_Int64Range**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 104), 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(56, 104), len, UPB_SIZE(4, 8), 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); bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(52, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + msg, UPB_SIZE(56, 104), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; 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_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_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); + if (sub == NULL) { + sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_service_name_matcher(msg, sub); + } + return sub; +} /* envoy.api.v2.core.HealthCheck.TcpHealthCheck */ @@ -591,6 +622,33 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_core_HealthCheck_CustomHealt return sub; } +/* envoy.api.v2.core.HealthCheck.TlsOptions */ + +UPB_INLINE envoy_api_v2_core_HealthCheck_TlsOptions *envoy_api_v2_core_HealthCheck_TlsOptions_new(upb_arena *arena) { + return (envoy_api_v2_core_HealthCheck_TlsOptions *)upb_msg_new(&envoy_api_v2_core_HealthCheck_TlsOptions_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_HealthCheck_TlsOptions *envoy_api_v2_core_HealthCheck_TlsOptions_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_core_HealthCheck_TlsOptions *ret = envoy_api_v2_core_HealthCheck_TlsOptions_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_HealthCheck_TlsOptions_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_HealthCheck_TlsOptions_serialize(const envoy_api_v2_core_HealthCheck_TlsOptions *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_HealthCheck_TlsOptions_msginit, arena, len); +} + +UPB_INLINE upb_strview const* envoy_api_v2_core_HealthCheck_TlsOptions_alpn_protocols(const envoy_api_v2_core_HealthCheck_TlsOptions *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } + +UPB_INLINE upb_strview* envoy_api_v2_core_HealthCheck_TlsOptions_mutable_alpn_protocols(envoy_api_v2_core_HealthCheck_TlsOptions *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); +} +UPB_INLINE upb_strview* envoy_api_v2_core_HealthCheck_TlsOptions_resize_alpn_protocols(envoy_api_v2_core_HealthCheck_TlsOptions *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); +} +UPB_INLINE bool envoy_api_v2_core_HealthCheck_TlsOptions_add_alpn_protocols(envoy_api_v2_core_HealthCheck_TlsOptions *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); +} + #ifdef __cplusplus } /* extern "C" */ #endif 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 0f3cf7b9a0f..4bd6c617e8e 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 @@ -10,6 +10,7 @@ #include "upb/msg.h" #include "envoy/api/v2/core/http_uri.upb.h" #include "google/protobuf/duration.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" 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 06aa4f3c888..982229903a1 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 @@ -11,6 +11,7 @@ #include "envoy/api/v2/core/protocol.upb.h" #include "google/protobuf/duration.upb.h" #include "google/protobuf/wrappers.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" @@ -21,36 +22,71 @@ const upb_msglayout envoy_api_v2_core_TcpProtocolOptions_msginit = { UPB_SIZE(0, 0), 0, false, }; -static const upb_msglayout *const envoy_api_v2_core_HttpProtocolOptions_submsgs[2] = { +static const upb_msglayout_field envoy_api_v2_core_UpstreamHttpProtocolOptions__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 8, 1}, + {2, UPB_SIZE(1, 1), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_core_UpstreamHttpProtocolOptions_msginit = { + NULL, + &envoy_api_v2_core_UpstreamHttpProtocolOptions__fields[0], + UPB_SIZE(2, 2), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_HttpProtocolOptions_submsgs[3] = { &google_protobuf_Duration_msginit, &google_protobuf_UInt32Value_msginit, }; -static const upb_msglayout_field envoy_api_v2_core_HttpProtocolOptions__fields[2] = { +static const upb_msglayout_field envoy_api_v2_core_HttpProtocolOptions__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, {2, UPB_SIZE(4, 8), 0, 1, 11, 1}, + {3, UPB_SIZE(8, 16), 0, 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_HttpProtocolOptions_msginit = { &envoy_api_v2_core_HttpProtocolOptions_submsgs[0], &envoy_api_v2_core_HttpProtocolOptions__fields[0], - UPB_SIZE(8, 16), 2, false, + UPB_SIZE(12, 24), 3, false, }; -static const upb_msglayout *const envoy_api_v2_core_Http1ProtocolOptions_submsgs[1] = { +static const upb_msglayout *const envoy_api_v2_core_Http1ProtocolOptions_submsgs[2] = { + &envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_msginit, &google_protobuf_BoolValue_msginit, }; -static const upb_msglayout_field envoy_api_v2_core_Http1ProtocolOptions__fields[3] = { - {1, UPB_SIZE(12, 24), 0, 0, 11, 1}, +static const upb_msglayout_field envoy_api_v2_core_Http1ProtocolOptions__fields[5] = { + {1, UPB_SIZE(12, 24), 0, 1, 11, 1}, {2, UPB_SIZE(0, 0), 0, 0, 8, 1}, {3, UPB_SIZE(4, 8), 0, 0, 9, 1}, + {4, UPB_SIZE(16, 32), 0, 0, 11, 1}, + {5, UPB_SIZE(1, 1), 0, 0, 8, 1}, }; const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_msginit = { &envoy_api_v2_core_Http1ProtocolOptions_submsgs[0], &envoy_api_v2_core_Http1ProtocolOptions__fields[0], - UPB_SIZE(16, 32), 3, false, + UPB_SIZE(24, 48), 5, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_submsgs[1] = { + &envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit, +}; + +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}, +}; + +const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_msginit = { + &envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_submsgs[0], + &envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, }; static const upb_msglayout *const envoy_api_v2_core_Http2ProtocolOptions_submsgs[9] = { 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..0cdebc67d47 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 @@ -21,18 +21,27 @@ extern "C" { #endif struct envoy_api_v2_core_TcpProtocolOptions; +struct envoy_api_v2_core_UpstreamHttpProtocolOptions; struct envoy_api_v2_core_HttpProtocolOptions; struct envoy_api_v2_core_Http1ProtocolOptions; +struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat; +struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords; struct envoy_api_v2_core_Http2ProtocolOptions; struct envoy_api_v2_core_GrpcProtocolOptions; typedef struct envoy_api_v2_core_TcpProtocolOptions envoy_api_v2_core_TcpProtocolOptions; +typedef struct envoy_api_v2_core_UpstreamHttpProtocolOptions envoy_api_v2_core_UpstreamHttpProtocolOptions; typedef struct envoy_api_v2_core_HttpProtocolOptions envoy_api_v2_core_HttpProtocolOptions; typedef struct envoy_api_v2_core_Http1ProtocolOptions envoy_api_v2_core_Http1ProtocolOptions; +typedef struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat; +typedef struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords; typedef struct envoy_api_v2_core_Http2ProtocolOptions envoy_api_v2_core_Http2ProtocolOptions; typedef struct envoy_api_v2_core_GrpcProtocolOptions envoy_api_v2_core_GrpcProtocolOptions; 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_GrpcProtocolOptions_msginit; struct google_protobuf_BoolValue; @@ -59,6 +68,30 @@ UPB_INLINE char *envoy_api_v2_core_TcpProtocolOptions_serialize(const envoy_api_ +/* envoy.api.v2.core.UpstreamHttpProtocolOptions */ + +UPB_INLINE envoy_api_v2_core_UpstreamHttpProtocolOptions *envoy_api_v2_core_UpstreamHttpProtocolOptions_new(upb_arena *arena) { + return (envoy_api_v2_core_UpstreamHttpProtocolOptions *)upb_msg_new(&envoy_api_v2_core_UpstreamHttpProtocolOptions_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_UpstreamHttpProtocolOptions *envoy_api_v2_core_UpstreamHttpProtocolOptions_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_core_UpstreamHttpProtocolOptions *ret = envoy_api_v2_core_UpstreamHttpProtocolOptions_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_UpstreamHttpProtocolOptions_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_UpstreamHttpProtocolOptions_serialize(const envoy_api_v2_core_UpstreamHttpProtocolOptions *msg, upb_arena *arena, size_t *len) { + 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 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_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; +} + /* envoy.api.v2.core.HttpProtocolOptions */ UPB_INLINE envoy_api_v2_core_HttpProtocolOptions *envoy_api_v2_core_HttpProtocolOptions_new(upb_arena *arena) { @@ -75,6 +108,7 @@ UPB_INLINE char *envoy_api_v2_core_HttpProtocolOptions_serialize(const envoy_api 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(0, 0)); } 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(4, 8)); } +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(8, 16)); } 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(0, 0)) = value; @@ -100,6 +134,18 @@ 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(8, 16)) = 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); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HttpProtocolOptions_set_max_connection_duration(msg, sub); + } + return sub; +} /* envoy.api.v2.core.Http1ProtocolOptions */ @@ -118,6 +164,8 @@ UPB_INLINE char *envoy_api_v2_core_Http1ProtocolOptions_serialize(const envoy_ap 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 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; @@ -137,6 +185,73 @@ UPB_INLINE void envoy_api_v2_core_Http1ProtocolOptions_set_accept_http_10(envoy_ 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_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_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); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat*)upb_msg_new(&envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Http1ProtocolOptions_set_header_key_format(msg, sub); + } + 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; +} + +/* envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat */ + +UPB_INLINE envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_new(upb_arena *arena) { + return (envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *)upb_msg_new(&envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *ret = envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_serialize(const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_msginit, arena, len); +} + +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 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); } + +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) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); +} +UPB_INLINE struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords* envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_mutable_proper_case_words(envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *msg, upb_arena *arena) { + struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords* sub = (struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords*)envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_proper_case_words(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords*)upb_msg_new(&envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_set_proper_case_words(msg, sub); + } + return sub; +} + +/* envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords */ + +UPB_INLINE envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords *envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_new(upb_arena *arena) { + return (envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords *)upb_msg_new(&envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords *envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords *ret = envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_serialize(const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit, arena, len); +} + + /* envoy.api.v2.core.Http2ProtocolOptions */ 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..eaf14b38b69 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 @@ -12,6 +12,7 @@ #include "envoy/api/v2/core/base.upb.h" #include "google/protobuf/any.upb.h" #include "google/rpc/status.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "upb/port_def.inc" 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..f68881a5f54 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 @@ -10,81 +10,20 @@ #include "upb/msg.h" #include "envoy/api/v2/eds.upb.h" #include "envoy/api/v2/discovery.upb.h" -#include "envoy/api/v2/endpoint/endpoint.upb.h" -#include "envoy/type/percent.upb.h" #include "google/api/annotations.upb.h" #include "google/protobuf/duration.upb.h" #include "google/protobuf/wrappers.upb.h" +#include "envoy/annotations/resource.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" +#include "envoy/api/v2/endpoint.upb.h" #include "upb/port_def.inc" -static const upb_msglayout *const envoy_api_v2_ClusterLoadAssignment_submsgs[3] = { - &envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_msginit, - &envoy_api_v2_ClusterLoadAssignment_Policy_msginit, - &envoy_api_v2_endpoint_LocalityLbEndpoints_msginit, -}; - -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}, -}; - -const upb_msglayout envoy_api_v2_ClusterLoadAssignment_msginit = { - &envoy_api_v2_ClusterLoadAssignment_submsgs[0], - &envoy_api_v2_ClusterLoadAssignment__fields[0], - UPB_SIZE(24, 48), 4, false, -}; - -static const upb_msglayout *const envoy_api_v2_ClusterLoadAssignment_Policy_submsgs[3] = { - &envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit, - &google_protobuf_Duration_msginit, - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_ClusterLoadAssignment_Policy__fields[4] = { - {2, UPB_SIZE(12, 24), 0, 0, 11, 3}, - {3, UPB_SIZE(4, 8), 0, 2, 11, 1}, - {4, UPB_SIZE(8, 16), 0, 1, 11, 1}, - {5, UPB_SIZE(0, 0), 0, 0, 8, 1}, -}; - -const upb_msglayout envoy_api_v2_ClusterLoadAssignment_Policy_msginit = { - &envoy_api_v2_ClusterLoadAssignment_Policy_submsgs[0], - &envoy_api_v2_ClusterLoadAssignment_Policy__fields[0], - UPB_SIZE(16, 32), 4, false, -}; - -static const upb_msglayout *const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_submsgs[1] = { - &envoy_type_FractionalPercent_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit = { - &envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_submsgs[0], - &envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_submsgs[1] = { - &envoy_api_v2_endpoint_Endpoint_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_msginit = { - &envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_submsgs[0], - &envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry__fields[0], - UPB_SIZE(16, 32), 2, false, +const upb_msglayout envoy_api_v2_EdsDummy_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, }; #include "upb/port_undef.inc" 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..d873292762b 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 @@ -14,222 +14,35 @@ #include "upb/decode.h" #include "upb/encode.h" +/* Public Imports. */ +#include "envoy/api/v2/endpoint.upb.h" + #include "upb/port_def.inc" #ifdef __cplusplus extern "C" { #endif -struct envoy_api_v2_ClusterLoadAssignment; -struct envoy_api_v2_ClusterLoadAssignment_Policy; -struct envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload; -struct envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry; -typedef struct envoy_api_v2_ClusterLoadAssignment envoy_api_v2_ClusterLoadAssignment; -typedef struct envoy_api_v2_ClusterLoadAssignment_Policy envoy_api_v2_ClusterLoadAssignment_Policy; -typedef struct envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload; -typedef struct envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry; -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; -struct envoy_api_v2_endpoint_Endpoint; -struct envoy_api_v2_endpoint_LocalityLbEndpoints; -struct envoy_type_FractionalPercent; -struct google_protobuf_Duration; -struct google_protobuf_UInt32Value; -extern const upb_msglayout envoy_api_v2_endpoint_Endpoint_msginit; -extern const upb_msglayout envoy_api_v2_endpoint_LocalityLbEndpoints_msginit; -extern const upb_msglayout envoy_type_FractionalPercent_msginit; -extern const upb_msglayout google_protobuf_Duration_msginit; -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); -} -UPB_INLINE envoy_api_v2_ClusterLoadAssignment *envoy_api_v2_ClusterLoadAssignment_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_ClusterLoadAssignment *ret = envoy_api_v2_ClusterLoadAssignment_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ClusterLoadAssignment_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_ClusterLoadAssignment_serialize(const envoy_api_v2_ClusterLoadAssignment *msg, upb_arena *arena, size_t *len) { - 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 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 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_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); -} -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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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); - 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_ClusterLoadAssignment_Policy *envoy_api_v2_ClusterLoadAssignment_Policy_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_ClusterLoadAssignment_Policy *ret = envoy_api_v2_ClusterLoadAssignment_Policy_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ClusterLoadAssignment_Policy_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_ClusterLoadAssignment_Policy_serialize(const envoy_api_v2_ClusterLoadAssignment_Policy *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_ClusterLoadAssignment_Policy_msginit, arena, len); -} - -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 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); -} -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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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); - if (!sub) return NULL; - envoy_api_v2_ClusterLoadAssignment_Policy_set_overprovisioning_factor(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_ClusterLoadAssignment_Policy_set_endpoint_stale_after(msg, sub); - } - 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; -} - -/* envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload */ +struct envoy_api_v2_EdsDummy; +typedef struct envoy_api_v2_EdsDummy envoy_api_v2_EdsDummy; +extern const upb_msglayout envoy_api_v2_EdsDummy_msginit; -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); -} -UPB_INLINE envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *ret = envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_serialize(const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *msg, upb_arena *arena, size_t *len) { - 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 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_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_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); - if (!sub) return NULL; - envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_set_drop_percentage(msg, sub); - } - return sub; -} -/* envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry */ +/* envoy.api.v2.EdsDummy */ -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_EdsDummy *envoy_api_v2_EdsDummy_new(upb_arena *arena) { + return (envoy_api_v2_EdsDummy *)upb_msg_new(&envoy_api_v2_EdsDummy_msginit, arena); } -UPB_INLINE envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_parse(const char *buf, size_t size, +UPB_INLINE envoy_api_v2_EdsDummy *envoy_api_v2_EdsDummy_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; + envoy_api_v2_EdsDummy *ret = envoy_api_v2_EdsDummy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_EdsDummy_msginit, arena)) ? ret : NULL; } -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 char *envoy_api_v2_EdsDummy_serialize(const envoy_api_v2_EdsDummy *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_EdsDummy_msginit, arena, len); } -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; -} #ifdef __cplusplus } /* extern "C" */ 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 new file mode 100644 index 00000000000..64a00d1fe5d --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c @@ -0,0 +1,91 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/api/v2/endpoint.upb.h" +#include "envoy/api/v2/endpoint/endpoint_components.upb.h" +#include "envoy/type/percent.upb.h" +#include "google/api/annotations.upb.h" +#include "google/protobuf/duration.upb.h" +#include "google/protobuf/wrappers.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_ClusterLoadAssignment_submsgs[3] = { + &envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_msginit, + &envoy_api_v2_ClusterLoadAssignment_Policy_msginit, + &envoy_api_v2_endpoint_LocalityLbEndpoints_msginit, +}; + +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}, +}; + +const upb_msglayout envoy_api_v2_ClusterLoadAssignment_msginit = { + &envoy_api_v2_ClusterLoadAssignment_submsgs[0], + &envoy_api_v2_ClusterLoadAssignment__fields[0], + UPB_SIZE(24, 48), 4, false, +}; + +static const upb_msglayout *const envoy_api_v2_ClusterLoadAssignment_Policy_submsgs[3] = { + &envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit, + &google_protobuf_Duration_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_ClusterLoadAssignment_Policy__fields[4] = { + {2, UPB_SIZE(12, 24), 0, 0, 11, 3}, + {3, UPB_SIZE(4, 8), 0, 2, 11, 1}, + {4, UPB_SIZE(8, 16), 0, 1, 11, 1}, + {5, UPB_SIZE(0, 0), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_ClusterLoadAssignment_Policy_msginit = { + &envoy_api_v2_ClusterLoadAssignment_Policy_submsgs[0], + &envoy_api_v2_ClusterLoadAssignment_Policy__fields[0], + UPB_SIZE(16, 32), 4, false, +}; + +static const upb_msglayout *const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_submsgs[1] = { + &envoy_type_FractionalPercent_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit = { + &envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_submsgs[0], + &envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_submsgs[1] = { + &envoy_api_v2_endpoint_Endpoint_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_msginit = { + &envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_submsgs[0], + &envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..736b1babbf6 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h @@ -0,0 +1,240 @@ +/* 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_UPB_H_ +#define ENVOY_API_V2_ENDPOINT_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_ClusterLoadAssignment; +struct envoy_api_v2_ClusterLoadAssignment_Policy; +struct envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload; +struct envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry; +typedef struct envoy_api_v2_ClusterLoadAssignment envoy_api_v2_ClusterLoadAssignment; +typedef struct envoy_api_v2_ClusterLoadAssignment_Policy envoy_api_v2_ClusterLoadAssignment_Policy; +typedef struct envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload; +typedef struct envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry; +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; +struct envoy_api_v2_endpoint_Endpoint; +struct envoy_api_v2_endpoint_LocalityLbEndpoints; +struct envoy_type_FractionalPercent; +struct google_protobuf_Duration; +struct google_protobuf_UInt32Value; +extern const upb_msglayout envoy_api_v2_endpoint_Endpoint_msginit; +extern const upb_msglayout envoy_api_v2_endpoint_LocalityLbEndpoints_msginit; +extern const upb_msglayout envoy_type_FractionalPercent_msginit; +extern const upb_msglayout google_protobuf_Duration_msginit; +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); +} +UPB_INLINE envoy_api_v2_ClusterLoadAssignment *envoy_api_v2_ClusterLoadAssignment_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_ClusterLoadAssignment *ret = envoy_api_v2_ClusterLoadAssignment_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ClusterLoadAssignment_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_ClusterLoadAssignment_serialize(const envoy_api_v2_ClusterLoadAssignment *msg, upb_arena *arena, size_t *len) { + 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 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 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_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); +} +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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_ClusterLoadAssignment_Policy *envoy_api_v2_ClusterLoadAssignment_Policy_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_ClusterLoadAssignment_Policy *ret = envoy_api_v2_ClusterLoadAssignment_Policy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ClusterLoadAssignment_Policy_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_ClusterLoadAssignment_Policy_serialize(const envoy_api_v2_ClusterLoadAssignment_Policy *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_ClusterLoadAssignment_Policy_msginit, arena, len); +} + +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 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); +} +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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (!sub) return NULL; + envoy_api_v2_ClusterLoadAssignment_Policy_set_overprovisioning_factor(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_ClusterLoadAssignment_Policy_set_endpoint_stale_after(msg, sub); + } + 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *ret = envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_serialize(const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *msg, upb_arena *arena, size_t *len) { + 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_set_drop_percentage(msg, sub); + } + return sub; +} + +/* 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 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 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; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ENDPOINT_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c index e516cc85c85..d071a4fa14c 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c @@ -9,79 +9,9 @@ #include #include "upb/msg.h" #include "envoy/api/v2/endpoint/endpoint.upb.h" -#include "envoy/api/v2/core/address.upb.h" -#include "envoy/api/v2/core/base.upb.h" -#include "envoy/api/v2/core/health_check.upb.h" -#include "google/protobuf/wrappers.upb.h" -#include "validate/validate.upb.h" +#include "envoy/api/v2/endpoint/endpoint_components.upb.h" #include "upb/port_def.inc" -static const upb_msglayout *const envoy_api_v2_endpoint_Endpoint_submsgs[2] = { - &envoy_api_v2_core_Address_msginit, - &envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_endpoint_Endpoint__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, - {2, UPB_SIZE(4, 8), 0, 1, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_endpoint_Endpoint_msginit = { - &envoy_api_v2_endpoint_Endpoint_submsgs[0], - &envoy_api_v2_endpoint_Endpoint__fields[0], - UPB_SIZE(8, 16), 2, false, -}; - -static const upb_msglayout_field envoy_api_v2_endpoint_Endpoint_HealthCheckConfig__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 13, 1}, -}; - -const upb_msglayout envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit = { - NULL, - &envoy_api_v2_endpoint_Endpoint_HealthCheckConfig__fields[0], - UPB_SIZE(4, 4), 1, false, -}; - -static const upb_msglayout *const envoy_api_v2_endpoint_LbEndpoint_submsgs[3] = { - &envoy_api_v2_core_Metadata_msginit, - &envoy_api_v2_endpoint_Endpoint_msginit, - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_endpoint_LbEndpoint__fields[5] = { - {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(-25, -41), 0, 9, 1}, -}; - -const upb_msglayout envoy_api_v2_endpoint_LbEndpoint_msginit = { - &envoy_api_v2_endpoint_LbEndpoint_submsgs[0], - &envoy_api_v2_endpoint_LbEndpoint__fields[0], - UPB_SIZE(32, 48), 5, false, -}; - -static const upb_msglayout *const envoy_api_v2_endpoint_LocalityLbEndpoints_submsgs[4] = { - &envoy_api_v2_core_Locality_msginit, - &envoy_api_v2_endpoint_LbEndpoint_msginit, - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_endpoint_LocalityLbEndpoints__fields[5] = { - {1, UPB_SIZE(4, 8), 0, 0, 11, 1}, - {2, UPB_SIZE(16, 32), 0, 1, 11, 3}, - {3, UPB_SIZE(8, 16), 0, 2, 11, 1}, - {5, UPB_SIZE(0, 0), 0, 0, 13, 1}, - {6, UPB_SIZE(12, 24), 0, 2, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_endpoint_LocalityLbEndpoints_msginit = { - &envoy_api_v2_endpoint_LocalityLbEndpoints_submsgs[0], - &envoy_api_v2_endpoint_LocalityLbEndpoints__fields[0], - UPB_SIZE(20, 40), 5, false, -}; - #include "upb/port_undef.inc" 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..cd90fc3689a 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 @@ -14,240 +14,15 @@ #include "upb/decode.h" #include "upb/encode.h" +/* Public Imports. */ +#include "envoy/api/v2/endpoint/endpoint_components.upb.h" + #include "upb/port_def.inc" #ifdef __cplusplus extern "C" { #endif -struct envoy_api_v2_endpoint_Endpoint; -struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig; -struct envoy_api_v2_endpoint_LbEndpoint; -struct envoy_api_v2_endpoint_LocalityLbEndpoints; -typedef struct envoy_api_v2_endpoint_Endpoint envoy_api_v2_endpoint_Endpoint; -typedef struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig envoy_api_v2_endpoint_Endpoint_HealthCheckConfig; -typedef struct envoy_api_v2_endpoint_LbEndpoint envoy_api_v2_endpoint_LbEndpoint; -typedef struct envoy_api_v2_endpoint_LocalityLbEndpoints envoy_api_v2_endpoint_LocalityLbEndpoints; -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; -struct envoy_api_v2_core_Address; -struct envoy_api_v2_core_Locality; -struct envoy_api_v2_core_Metadata; -struct google_protobuf_UInt32Value; -extern const upb_msglayout envoy_api_v2_core_Address_msginit; -extern const upb_msglayout envoy_api_v2_core_Locality_msginit; -extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; -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); -} -UPB_INLINE envoy_api_v2_endpoint_Endpoint *envoy_api_v2_endpoint_Endpoint_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_endpoint_Endpoint *ret = envoy_api_v2_endpoint_Endpoint_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_endpoint_Endpoint_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_endpoint_Endpoint_serialize(const envoy_api_v2_endpoint_Endpoint *msg, upb_arena *arena, size_t *len) { - 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(0, 0)); } -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(4, 8)); } - -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(0, 0)) = 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); - if (sub == NULL) { - 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); - } - 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(4, 8)) = 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); - if (sub == NULL) { - 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); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *ret = envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_serialize(const envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *msg, upb_arena *arena, size_t *len) { - 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 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_endpoint_LbEndpoint *envoy_api_v2_endpoint_LbEndpoint_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_endpoint_LbEndpoint *ret = envoy_api_v2_endpoint_LbEndpoint_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_endpoint_LbEndpoint_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_endpoint_LbEndpoint_serialize(const envoy_api_v2_endpoint_LbEndpoint *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_endpoint_LbEndpoint_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_endpoint_LbEndpoint_host_identifier_endpoint = 1, - 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 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 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(""))); } - -UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_endpoint(envoy_api_v2_endpoint_LbEndpoint *msg, envoy_api_v2_endpoint_Endpoint* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_endpoint_Endpoint*, UPB_SIZE(16, 24), value, UPB_SIZE(24, 40), 1); -} -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); - if (!sub) return NULL; - envoy_api_v2_endpoint_LbEndpoint_set_endpoint(msg, sub); - } - 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_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_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); - if (!sub) return NULL; - envoy_api_v2_endpoint_LbEndpoint_set_metadata(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_endpoint_LbEndpoint_set_load_balancing_weight(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_endpoint_name(envoy_api_v2_endpoint_LbEndpoint *msg, upb_strview value) { - UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(16, 24), value, UPB_SIZE(24, 40), 5); -} - -/* 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); -} -UPB_INLINE envoy_api_v2_endpoint_LocalityLbEndpoints *envoy_api_v2_endpoint_LocalityLbEndpoints_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_endpoint_LocalityLbEndpoints *ret = envoy_api_v2_endpoint_LocalityLbEndpoints_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_endpoint_LocalityLbEndpoints_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_endpoint_LocalityLbEndpoints_serialize(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg, upb_arena *arena, size_t *len) { - 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 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 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_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); - if (!sub) return NULL; - envoy_api_v2_endpoint_LocalityLbEndpoints_set_locality(msg, sub); - } - return sub; -} -UPB_INLINE envoy_api_v2_endpoint_LbEndpoint** envoy_api_v2_endpoint_LocalityLbEndpoints_mutable_lb_endpoints(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, size_t *len) { - 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); -} -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); - 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_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_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); - if (!sub) return NULL; - envoy_api_v2_endpoint_LocalityLbEndpoints_set_load_balancing_weight(msg, sub); - } - 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_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_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); - if (!sub) return NULL; - envoy_api_v2_endpoint_LocalityLbEndpoints_set_proximity(msg, sub); - } - return sub; -} #ifdef __cplusplus } /* extern "C" */ 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 new file mode 100644 index 00000000000..fc13392e205 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c @@ -0,0 +1,88 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/api/v2/endpoint/endpoint_components.upb.h" +#include "envoy/api/v2/core/address.upb.h" +#include "envoy/api/v2/core/base.upb.h" +#include "envoy/api/v2/core/health_check.upb.h" +#include "google/protobuf/wrappers.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_endpoint_Endpoint_submsgs[2] = { + &envoy_api_v2_core_Address_msginit, + &envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_endpoint_Endpoint__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 1, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_endpoint_Endpoint_msginit = { + &envoy_api_v2_endpoint_Endpoint_submsgs[0], + &envoy_api_v2_endpoint_Endpoint__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + +static const upb_msglayout_field envoy_api_v2_endpoint_Endpoint_HealthCheckConfig__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 13, 1}, +}; + +const upb_msglayout envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit = { + NULL, + &envoy_api_v2_endpoint_Endpoint_HealthCheckConfig__fields[0], + UPB_SIZE(4, 4), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_endpoint_LbEndpoint_submsgs[3] = { + &envoy_api_v2_core_Metadata_msginit, + &envoy_api_v2_endpoint_Endpoint_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_endpoint_LbEndpoint__fields[5] = { + {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(-25, -41), 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_endpoint_LbEndpoint_msginit = { + &envoy_api_v2_endpoint_LbEndpoint_submsgs[0], + &envoy_api_v2_endpoint_LbEndpoint__fields[0], + UPB_SIZE(32, 48), 5, false, +}; + +static const upb_msglayout *const envoy_api_v2_endpoint_LocalityLbEndpoints_submsgs[4] = { + &envoy_api_v2_core_Locality_msginit, + &envoy_api_v2_endpoint_LbEndpoint_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_endpoint_LocalityLbEndpoints__fields[5] = { + {1, UPB_SIZE(4, 8), 0, 0, 11, 1}, + {2, UPB_SIZE(16, 32), 0, 1, 11, 3}, + {3, UPB_SIZE(8, 16), 0, 2, 11, 1}, + {5, UPB_SIZE(0, 0), 0, 0, 13, 1}, + {6, UPB_SIZE(12, 24), 0, 2, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_endpoint_LocalityLbEndpoints_msginit = { + &envoy_api_v2_endpoint_LocalityLbEndpoints_submsgs[0], + &envoy_api_v2_endpoint_LocalityLbEndpoints__fields[0], + UPB_SIZE(20, 40), 5, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..da973c9d7cb --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h @@ -0,0 +1,258 @@ +/* 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_UPB_H_ +#define ENVOY_API_V2_ENDPOINT_ENDPOINT_COMPONENTS_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_endpoint_Endpoint; +struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig; +struct envoy_api_v2_endpoint_LbEndpoint; +struct envoy_api_v2_endpoint_LocalityLbEndpoints; +typedef struct envoy_api_v2_endpoint_Endpoint envoy_api_v2_endpoint_Endpoint; +typedef struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig envoy_api_v2_endpoint_Endpoint_HealthCheckConfig; +typedef struct envoy_api_v2_endpoint_LbEndpoint envoy_api_v2_endpoint_LbEndpoint; +typedef struct envoy_api_v2_endpoint_LocalityLbEndpoints envoy_api_v2_endpoint_LocalityLbEndpoints; +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; +struct envoy_api_v2_core_Address; +struct envoy_api_v2_core_Locality; +struct envoy_api_v2_core_Metadata; +struct google_protobuf_UInt32Value; +extern const upb_msglayout envoy_api_v2_core_Address_msginit; +extern const upb_msglayout envoy_api_v2_core_Locality_msginit; +extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; +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); +} +UPB_INLINE envoy_api_v2_endpoint_Endpoint *envoy_api_v2_endpoint_Endpoint_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_endpoint_Endpoint *ret = envoy_api_v2_endpoint_Endpoint_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_endpoint_Endpoint_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_endpoint_Endpoint_serialize(const envoy_api_v2_endpoint_Endpoint *msg, upb_arena *arena, size_t *len) { + 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(0, 0)); } +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(4, 8)); } + +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(0, 0)) = 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); + if (sub == NULL) { + 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); + } + 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(4, 8)) = 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); + if (sub == NULL) { + 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); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *ret = envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_serialize(const envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *msg, upb_arena *arena, size_t *len) { + 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 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_endpoint_LbEndpoint *envoy_api_v2_endpoint_LbEndpoint_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_endpoint_LbEndpoint *ret = envoy_api_v2_endpoint_LbEndpoint_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_endpoint_LbEndpoint_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_endpoint_LbEndpoint_serialize(const envoy_api_v2_endpoint_LbEndpoint *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_endpoint_LbEndpoint_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_endpoint_LbEndpoint_host_identifier_endpoint = 1, + 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 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 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(""))); } + +UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_endpoint(envoy_api_v2_endpoint_LbEndpoint *msg, envoy_api_v2_endpoint_Endpoint* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_endpoint_Endpoint*, UPB_SIZE(16, 24), value, UPB_SIZE(24, 40), 1); +} +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); + if (!sub) return NULL; + envoy_api_v2_endpoint_LbEndpoint_set_endpoint(msg, sub); + } + 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_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_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); + if (!sub) return NULL; + envoy_api_v2_endpoint_LbEndpoint_set_metadata(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_endpoint_LbEndpoint_set_load_balancing_weight(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_endpoint_name(envoy_api_v2_endpoint_LbEndpoint *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(16, 24), value, UPB_SIZE(24, 40), 5); +} + +/* 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); +} +UPB_INLINE envoy_api_v2_endpoint_LocalityLbEndpoints *envoy_api_v2_endpoint_LocalityLbEndpoints_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_endpoint_LocalityLbEndpoints *ret = envoy_api_v2_endpoint_LocalityLbEndpoints_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_endpoint_LocalityLbEndpoints_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_endpoint_LocalityLbEndpoints_serialize(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg, upb_arena *arena, size_t *len) { + 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 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 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_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); + if (!sub) return NULL; + envoy_api_v2_endpoint_LocalityLbEndpoints_set_locality(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_endpoint_LbEndpoint** envoy_api_v2_endpoint_LocalityLbEndpoints_mutable_lb_endpoints(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, size_t *len) { + 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); +} +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); + 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_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_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); + if (!sub) return NULL; + envoy_api_v2_endpoint_LocalityLbEndpoints_set_load_balancing_weight(msg, sub); + } + 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_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_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); + if (!sub) return NULL; + envoy_api_v2_endpoint_LocalityLbEndpoints_set_proximity(msg, sub); + } + return sub; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ENDPOINT_ENDPOINT_COMPONENTS_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c b/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c index a217752f819..7cc681977c7 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c @@ -13,6 +13,7 @@ #include "envoy/api/v2/core/base.upb.h" #include "google/protobuf/duration.upb.h" #include "google/protobuf/struct.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" diff --git a/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c b/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c index 748ece26dd6..5b372782ea2 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c @@ -9,91 +9,18 @@ #include #include "upb/msg.h" #include "envoy/api/v2/lds.upb.h" -#include "envoy/api/v2/core/address.upb.h" -#include "envoy/api/v2/core/base.upb.h" #include "envoy/api/v2/discovery.upb.h" -#include "envoy/api/v2/listener/listener.upb.h" -#include "envoy/api/v2/listener/udp_listener_config.upb.h" -#include "envoy/config/listener/v2/api_listener.upb.h" #include "google/api/annotations.upb.h" #include "google/protobuf/duration.upb.h" #include "google/protobuf/wrappers.upb.h" +#include "envoy/annotations/resource.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" +#include "envoy/api/v2/listener.upb.h" #include "upb/port_def.inc" -static const upb_msglayout *const envoy_api_v2_Listener_submsgs[15] = { - &envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, - &envoy_api_v2_Listener_DeprecatedV1_msginit, - &envoy_api_v2_core_Address_msginit, - &envoy_api_v2_core_Metadata_msginit, - &envoy_api_v2_core_SocketOption_msginit, - &envoy_api_v2_listener_FilterChain_msginit, - &envoy_api_v2_listener_ListenerFilter_msginit, - &envoy_api_v2_listener_UdpListenerConfig_msginit, - &envoy_config_listener_v2_ApiListener_msginit, - &google_protobuf_BoolValue_msginit, - &google_protobuf_Duration_msginit, - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Listener__fields[19] = { - {1, UPB_SIZE(20, 24), 0, 0, 9, 1}, - {2, UPB_SIZE(28, 40), 0, 2, 11, 1}, - {3, UPB_SIZE(76, 136), 0, 5, 11, 3}, - {4, UPB_SIZE(32, 48), 0, 9, 11, 1}, - {5, UPB_SIZE(36, 56), 0, 11, 11, 1}, - {6, UPB_SIZE(40, 64), 0, 3, 11, 1}, - {7, UPB_SIZE(44, 72), 0, 1, 11, 1}, - {8, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {9, UPB_SIZE(80, 144), 0, 6, 11, 3}, - {10, UPB_SIZE(48, 80), 0, 9, 11, 1}, - {11, UPB_SIZE(52, 88), 0, 9, 11, 1}, - {12, UPB_SIZE(56, 96), 0, 11, 11, 1}, - {13, UPB_SIZE(84, 152), 0, 4, 11, 3}, - {15, UPB_SIZE(60, 104), 0, 10, 11, 1}, - {16, UPB_SIZE(8, 8), 0, 0, 14, 1}, - {17, UPB_SIZE(16, 16), 0, 0, 8, 1}, - {18, UPB_SIZE(64, 112), 0, 7, 11, 1}, - {19, UPB_SIZE(68, 120), 0, 8, 11, 1}, - {20, UPB_SIZE(72, 128), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Listener_msginit = { - &envoy_api_v2_Listener_submsgs[0], - &envoy_api_v2_Listener__fields[0], - UPB_SIZE(88, 160), 19, false, -}; - -static const upb_msglayout *const envoy_api_v2_Listener_DeprecatedV1_submsgs[1] = { - &google_protobuf_BoolValue_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Listener_DeprecatedV1__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Listener_DeprecatedV1_msginit = { - &envoy_api_v2_Listener_DeprecatedV1_submsgs[0], - &envoy_api_v2_Listener_DeprecatedV1__fields[0], - UPB_SIZE(4, 8), 1, false, -}; - -static const upb_msglayout *const envoy_api_v2_Listener_ConnectionBalanceConfig_submsgs[1] = { - &envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Listener_ConnectionBalanceConfig__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_msginit = { - &envoy_api_v2_Listener_ConnectionBalanceConfig_submsgs[0], - &envoy_api_v2_Listener_ConnectionBalanceConfig__fields[0], - UPB_SIZE(8, 16), 1, false, -}; - -const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit = { +const upb_msglayout envoy_api_v2_LdsDummy_msginit = { NULL, NULL, UPB_SIZE(0, 0), 0, false, 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..868dd54d640 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 @@ -14,358 +14,32 @@ #include "upb/decode.h" #include "upb/encode.h" +/* Public Imports. */ +#include "envoy/api/v2/listener.upb.h" + #include "upb/port_def.inc" #ifdef __cplusplus extern "C" { #endif -struct envoy_api_v2_Listener; -struct envoy_api_v2_Listener_DeprecatedV1; -struct envoy_api_v2_Listener_ConnectionBalanceConfig; -struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance; -typedef struct envoy_api_v2_Listener envoy_api_v2_Listener; -typedef struct envoy_api_v2_Listener_DeprecatedV1 envoy_api_v2_Listener_DeprecatedV1; -typedef struct envoy_api_v2_Listener_ConnectionBalanceConfig envoy_api_v2_Listener_ConnectionBalanceConfig; -typedef struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance; -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; -struct envoy_api_v2_core_Address; -struct envoy_api_v2_core_Metadata; -struct envoy_api_v2_core_SocketOption; -struct envoy_api_v2_listener_FilterChain; -struct envoy_api_v2_listener_ListenerFilter; -struct envoy_api_v2_listener_UdpListenerConfig; -struct envoy_config_listener_v2_ApiListener; -struct google_protobuf_BoolValue; -struct google_protobuf_Duration; -struct google_protobuf_UInt32Value; -extern const upb_msglayout envoy_api_v2_core_Address_msginit; -extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; -extern const upb_msglayout envoy_api_v2_core_SocketOption_msginit; -extern const upb_msglayout envoy_api_v2_listener_FilterChain_msginit; -extern const upb_msglayout envoy_api_v2_listener_ListenerFilter_msginit; -extern const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit; -extern const upb_msglayout envoy_config_listener_v2_ApiListener_msginit; -extern const upb_msglayout google_protobuf_BoolValue_msginit; -extern const upb_msglayout google_protobuf_Duration_msginit; -extern const upb_msglayout google_protobuf_UInt32Value_msginit; - -typedef enum { - envoy_api_v2_Listener_DEFAULT = 0, - envoy_api_v2_Listener_MODIFY_ONLY = 1 -} envoy_api_v2_Listener_DrainType; - - -/* 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); -} -UPB_INLINE envoy_api_v2_Listener *envoy_api_v2_Listener_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Listener *ret = envoy_api_v2_Listener_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Listener_serialize(const envoy_api_v2_Listener *msg, upb_arena *arena, size_t *len) { - 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 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 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 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 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_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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_address(msg, sub); - } - return sub; -} -UPB_INLINE struct envoy_api_v2_listener_FilterChain** envoy_api_v2_Listener_mutable_filter_chains(envoy_api_v2_Listener *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(76, 136), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_use_original_dst(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_per_connection_buffer_limit_bytes(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_metadata(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_deprecated_v1(msg, sub); - } - 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_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); -} -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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(80, 144), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_transparent(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_freebind(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_tcp_fast_open_queue_length(msg, sub); - } - return sub; -} -UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_Listener_mutable_socket_options(envoy_api_v2_Listener *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(84, 152), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_listener_filters_timeout(msg, sub); - } - 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_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_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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_udp_listener_config(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_api_listener(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_set_connection_balance_config(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Listener_DeprecatedV1 *envoy_api_v2_Listener_DeprecatedV1_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Listener_DeprecatedV1 *ret = envoy_api_v2_Listener_DeprecatedV1_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_DeprecatedV1_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Listener_DeprecatedV1_serialize(const envoy_api_v2_Listener_DeprecatedV1 *msg, upb_arena *arena, size_t *len) { - 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)); } +struct envoy_api_v2_LdsDummy; +typedef struct envoy_api_v2_LdsDummy envoy_api_v2_LdsDummy; +extern const upb_msglayout envoy_api_v2_LdsDummy_msginit; -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_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); - if (!sub) return NULL; - envoy_api_v2_Listener_DeprecatedV1_set_bind_to_port(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig *envoy_api_v2_Listener_ConnectionBalanceConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Listener_ConnectionBalanceConfig *ret = envoy_api_v2_Listener_ConnectionBalanceConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Listener_ConnectionBalanceConfig_serialize(const envoy_api_v2_Listener_ConnectionBalanceConfig *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena, len); -} - -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 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); } - -UPB_INLINE void envoy_api_v2_Listener_ConnectionBalanceConfig_set_exact_balance(envoy_api_v2_Listener_ConnectionBalanceConfig *msg, envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); -} -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); - if (!sub) return NULL; - envoy_api_v2_Listener_ConnectionBalanceConfig_set_exact_balance(msg, sub); - } - return sub; -} -/* envoy.api.v2.Listener.ConnectionBalanceConfig.ExactBalance */ +/* envoy.api.v2.LdsDummy */ -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); +UPB_INLINE envoy_api_v2_LdsDummy *envoy_api_v2_LdsDummy_new(upb_arena *arena) { + return (envoy_api_v2_LdsDummy *)upb_msg_new(&envoy_api_v2_LdsDummy_msginit, arena); } -UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_parse(const char *buf, size_t size, +UPB_INLINE envoy_api_v2_LdsDummy *envoy_api_v2_LdsDummy_parse(const char *buf, size_t size, upb_arena *arena) { - envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *ret = envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena)) ? ret : NULL; + envoy_api_v2_LdsDummy *ret = envoy_api_v2_LdsDummy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_LdsDummy_msginit, arena)) ? ret : NULL; } -UPB_INLINE char *envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_serialize(const envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena, len); +UPB_INLINE char *envoy_api_v2_LdsDummy_serialize(const envoy_api_v2_LdsDummy *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_LdsDummy_msginit, arena, len); } 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 new file mode 100644 index 00000000000..161c04d9606 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c @@ -0,0 +1,104 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/api/v2/listener.upb.h" +#include "envoy/api/v2/core/address.upb.h" +#include "envoy/api/v2/core/base.upb.h" +#include "envoy/api/v2/listener/listener_components.upb.h" +#include "envoy/api/v2/listener/udp_listener_config.upb.h" +#include "envoy/config/listener/v2/api_listener.upb.h" +#include "google/api/annotations.upb.h" +#include "google/protobuf/duration.upb.h" +#include "google/protobuf/wrappers.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_Listener_submsgs[15] = { + &envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, + &envoy_api_v2_Listener_DeprecatedV1_msginit, + &envoy_api_v2_core_Address_msginit, + &envoy_api_v2_core_Metadata_msginit, + &envoy_api_v2_core_SocketOption_msginit, + &envoy_api_v2_listener_FilterChain_msginit, + &envoy_api_v2_listener_ListenerFilter_msginit, + &envoy_api_v2_listener_UdpListenerConfig_msginit, + &envoy_config_listener_v2_ApiListener_msginit, + &google_protobuf_BoolValue_msginit, + &google_protobuf_Duration_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Listener__fields[20] = { + {1, UPB_SIZE(20, 24), 0, 0, 9, 1}, + {2, UPB_SIZE(28, 40), 0, 2, 11, 1}, + {3, UPB_SIZE(76, 136), 0, 5, 11, 3}, + {4, UPB_SIZE(32, 48), 0, 9, 11, 1}, + {5, UPB_SIZE(36, 56), 0, 11, 11, 1}, + {6, UPB_SIZE(40, 64), 0, 3, 11, 1}, + {7, UPB_SIZE(44, 72), 0, 1, 11, 1}, + {8, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {9, UPB_SIZE(80, 144), 0, 6, 11, 3}, + {10, UPB_SIZE(48, 80), 0, 9, 11, 1}, + {11, UPB_SIZE(52, 88), 0, 9, 11, 1}, + {12, UPB_SIZE(56, 96), 0, 11, 11, 1}, + {13, UPB_SIZE(84, 152), 0, 4, 11, 3}, + {15, UPB_SIZE(60, 104), 0, 10, 11, 1}, + {16, UPB_SIZE(8, 8), 0, 0, 14, 1}, + {17, UPB_SIZE(16, 16), 0, 0, 8, 1}, + {18, UPB_SIZE(64, 112), 0, 7, 11, 1}, + {19, UPB_SIZE(68, 120), 0, 8, 11, 1}, + {20, UPB_SIZE(72, 128), 0, 0, 11, 1}, + {21, UPB_SIZE(17, 17), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_Listener_msginit = { + &envoy_api_v2_Listener_submsgs[0], + &envoy_api_v2_Listener__fields[0], + UPB_SIZE(88, 160), 20, false, +}; + +static const upb_msglayout *const envoy_api_v2_Listener_DeprecatedV1_submsgs[1] = { + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Listener_DeprecatedV1__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_Listener_DeprecatedV1_msginit = { + &envoy_api_v2_Listener_DeprecatedV1_submsgs[0], + &envoy_api_v2_Listener_DeprecatedV1__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_Listener_ConnectionBalanceConfig_submsgs[1] = { + &envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Listener_ConnectionBalanceConfig__fields[1] = { + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_msginit = { + &envoy_api_v2_Listener_ConnectionBalanceConfig_submsgs[0], + &envoy_api_v2_Listener_ConnectionBalanceConfig__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..9689def3480 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h @@ -0,0 +1,383 @@ +/* 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_UPB_H_ +#define ENVOY_API_V2_LISTENER_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_Listener; +struct envoy_api_v2_Listener_DeprecatedV1; +struct envoy_api_v2_Listener_ConnectionBalanceConfig; +struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance; +typedef struct envoy_api_v2_Listener envoy_api_v2_Listener; +typedef struct envoy_api_v2_Listener_DeprecatedV1 envoy_api_v2_Listener_DeprecatedV1; +typedef struct envoy_api_v2_Listener_ConnectionBalanceConfig envoy_api_v2_Listener_ConnectionBalanceConfig; +typedef struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance; +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; +struct envoy_api_v2_core_Address; +struct envoy_api_v2_core_Metadata; +struct envoy_api_v2_core_SocketOption; +struct envoy_api_v2_listener_FilterChain; +struct envoy_api_v2_listener_ListenerFilter; +struct envoy_api_v2_listener_UdpListenerConfig; +struct envoy_config_listener_v2_ApiListener; +struct google_protobuf_BoolValue; +struct google_protobuf_Duration; +struct google_protobuf_UInt32Value; +extern const upb_msglayout envoy_api_v2_core_Address_msginit; +extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; +extern const upb_msglayout envoy_api_v2_core_SocketOption_msginit; +extern const upb_msglayout envoy_api_v2_listener_FilterChain_msginit; +extern const upb_msglayout envoy_api_v2_listener_ListenerFilter_msginit; +extern const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit; +extern const upb_msglayout envoy_config_listener_v2_ApiListener_msginit; +extern const upb_msglayout google_protobuf_BoolValue_msginit; +extern const upb_msglayout google_protobuf_Duration_msginit; +extern const upb_msglayout google_protobuf_UInt32Value_msginit; + +typedef enum { + envoy_api_v2_Listener_DEFAULT = 0, + envoy_api_v2_Listener_MODIFY_ONLY = 1 +} envoy_api_v2_Listener_DrainType; + + +/* 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); +} +UPB_INLINE envoy_api_v2_Listener *envoy_api_v2_Listener_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Listener *ret = envoy_api_v2_Listener_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Listener_serialize(const envoy_api_v2_Listener *msg, upb_arena *arena, size_t *len) { + 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 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 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 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_address(msg, sub); + } + return sub; +} +UPB_INLINE struct envoy_api_v2_listener_FilterChain** envoy_api_v2_Listener_mutable_filter_chains(envoy_api_v2_Listener *msg, size_t *len) { + 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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(76, 136), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_use_original_dst(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_per_connection_buffer_limit_bytes(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_metadata(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_deprecated_v1(msg, sub); + } + 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_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); +} +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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(80, 144), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_transparent(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_freebind(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_tcp_fast_open_queue_length(msg, sub); + } + return sub; +} +UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_Listener_mutable_socket_options(envoy_api_v2_Listener *msg, size_t *len) { + 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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(84, 152), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_listener_filters_timeout(msg, sub); + } + 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_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_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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_udp_listener_config(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_api_listener(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_set_connection_balance_config(msg, sub); + } + 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Listener_DeprecatedV1 *envoy_api_v2_Listener_DeprecatedV1_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Listener_DeprecatedV1 *ret = envoy_api_v2_Listener_DeprecatedV1_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_DeprecatedV1_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Listener_DeprecatedV1_serialize(const envoy_api_v2_Listener_DeprecatedV1 *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_Listener_DeprecatedV1_set_bind_to_port(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig *envoy_api_v2_Listener_ConnectionBalanceConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Listener_ConnectionBalanceConfig *ret = envoy_api_v2_Listener_ConnectionBalanceConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Listener_ConnectionBalanceConfig_serialize(const envoy_api_v2_Listener_ConnectionBalanceConfig *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena, len); +} + +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 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); } + +UPB_INLINE void envoy_api_v2_Listener_ConnectionBalanceConfig_set_exact_balance(envoy_api_v2_Listener_ConnectionBalanceConfig *msg, envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); +} +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); + if (!sub) return NULL; + envoy_api_v2_Listener_ConnectionBalanceConfig_set_exact_balance(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *ret = envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_serialize(const envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena, len); +} + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_LISTENER_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c b/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c index 053149c62a4..ef74720bf6d 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c @@ -9,98 +9,9 @@ #include #include "upb/msg.h" #include "envoy/api/v2/listener/listener.upb.h" -#include "envoy/api/v2/auth/cert.upb.h" -#include "envoy/api/v2/core/address.upb.h" -#include "envoy/api/v2/core/base.upb.h" -#include "google/protobuf/any.upb.h" -#include "google/protobuf/struct.upb.h" -#include "google/protobuf/wrappers.upb.h" -#include "validate/validate.upb.h" +#include "envoy/api/v2/listener/listener_components.upb.h" #include "upb/port_def.inc" -static const upb_msglayout *const envoy_api_v2_listener_Filter_submsgs[2] = { - &google_protobuf_Any_msginit, - &google_protobuf_Struct_msginit, -}; - -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}, -}; - -const upb_msglayout envoy_api_v2_listener_Filter_msginit = { - &envoy_api_v2_listener_Filter_submsgs[0], - &envoy_api_v2_listener_Filter__fields[0], - UPB_SIZE(16, 32), 3, false, -}; - -static const upb_msglayout *const envoy_api_v2_listener_FilterChainMatch_submsgs[4] = { - &envoy_api_v2_core_CidrRange_msginit, - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_listener_FilterChainMatch__fields[10] = { - {3, UPB_SIZE(32, 56), 0, 0, 11, 3}, - {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}, - {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}, - {11, UPB_SIZE(48, 88), 0, 0, 9, 3}, - {12, UPB_SIZE(0, 0), 0, 0, 14, 1}, -}; - -const upb_msglayout envoy_api_v2_listener_FilterChainMatch_msginit = { - &envoy_api_v2_listener_FilterChainMatch_submsgs[0], - &envoy_api_v2_listener_FilterChainMatch__fields[0], - UPB_SIZE(56, 96), 10, false, -}; - -static const upb_msglayout *const envoy_api_v2_listener_FilterChain_submsgs[6] = { - &envoy_api_v2_auth_DownstreamTlsContext_msginit, - &envoy_api_v2_core_Metadata_msginit, - &envoy_api_v2_core_TransportSocket_msginit, - &envoy_api_v2_listener_Filter_msginit, - &envoy_api_v2_listener_FilterChainMatch_msginit, - &google_protobuf_BoolValue_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_listener_FilterChain__fields[7] = { - {1, UPB_SIZE(8, 16), 0, 4, 11, 1}, - {2, UPB_SIZE(12, 24), 0, 0, 11, 1}, - {3, UPB_SIZE(28, 56), 0, 3, 11, 3}, - {4, UPB_SIZE(16, 32), 0, 5, 11, 1}, - {5, UPB_SIZE(20, 40), 0, 1, 11, 1}, - {6, UPB_SIZE(24, 48), 0, 2, 11, 1}, - {7, UPB_SIZE(0, 0), 0, 0, 9, 1}, -}; - -const upb_msglayout envoy_api_v2_listener_FilterChain_msginit = { - &envoy_api_v2_listener_FilterChain_submsgs[0], - &envoy_api_v2_listener_FilterChain__fields[0], - UPB_SIZE(32, 64), 7, false, -}; - -static const upb_msglayout *const envoy_api_v2_listener_ListenerFilter_submsgs[2] = { - &google_protobuf_Any_msginit, - &google_protobuf_Struct_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_listener_ListenerFilter__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}, -}; - -const upb_msglayout envoy_api_v2_listener_ListenerFilter_msginit = { - &envoy_api_v2_listener_ListenerFilter_submsgs[0], - &envoy_api_v2_listener_ListenerFilter__fields[0], - UPB_SIZE(16, 32), 3, false, -}; - #include "upb/port_undef.inc" 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..badef3e7fb8 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 @@ -14,371 +14,15 @@ #include "upb/decode.h" #include "upb/encode.h" +/* Public Imports. */ +#include "envoy/api/v2/listener/listener_components.upb.h" + #include "upb/port_def.inc" #ifdef __cplusplus extern "C" { #endif -struct envoy_api_v2_listener_Filter; -struct envoy_api_v2_listener_FilterChainMatch; -struct envoy_api_v2_listener_FilterChain; -struct envoy_api_v2_listener_ListenerFilter; -typedef struct envoy_api_v2_listener_Filter envoy_api_v2_listener_Filter; -typedef struct envoy_api_v2_listener_FilterChainMatch envoy_api_v2_listener_FilterChainMatch; -typedef struct envoy_api_v2_listener_FilterChain envoy_api_v2_listener_FilterChain; -typedef struct envoy_api_v2_listener_ListenerFilter envoy_api_v2_listener_ListenerFilter; -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_ListenerFilter_msginit; -struct envoy_api_v2_auth_DownstreamTlsContext; -struct envoy_api_v2_core_CidrRange; -struct envoy_api_v2_core_Metadata; -struct envoy_api_v2_core_TransportSocket; -struct google_protobuf_Any; -struct google_protobuf_BoolValue; -struct google_protobuf_Struct; -struct google_protobuf_UInt32Value; -extern const upb_msglayout envoy_api_v2_auth_DownstreamTlsContext_msginit; -extern const upb_msglayout envoy_api_v2_core_CidrRange_msginit; -extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; -extern const upb_msglayout envoy_api_v2_core_TransportSocket_msginit; -extern const upb_msglayout google_protobuf_Any_msginit; -extern const upb_msglayout google_protobuf_BoolValue_msginit; -extern const upb_msglayout google_protobuf_Struct_msginit; -extern const upb_msglayout google_protobuf_UInt32Value_msginit; - -typedef enum { - envoy_api_v2_listener_FilterChainMatch_ANY = 0, - envoy_api_v2_listener_FilterChainMatch_LOCAL = 1, - envoy_api_v2_listener_FilterChainMatch_EXTERNAL = 2 -} envoy_api_v2_listener_FilterChainMatch_ConnectionSourceType; - - -/* 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); -} -UPB_INLINE envoy_api_v2_listener_Filter *envoy_api_v2_listener_Filter_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_listener_Filter *ret = envoy_api_v2_listener_Filter_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_Filter_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_listener_Filter_serialize(const envoy_api_v2_listener_Filter *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_listener_Filter_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_listener_Filter_config_type_config = 2, - 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 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 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_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); -} -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); - if (!sub) return NULL; - envoy_api_v2_listener_Filter_set_config(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_listener_Filter_set_typed_config(envoy_api_v2_listener_Filter *msg, struct google_protobuf_Any* value) { - UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 4); -} -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); - if (!sub) return NULL; - envoy_api_v2_listener_Filter_set_typed_config(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_listener_FilterChainMatch *envoy_api_v2_listener_FilterChainMatch_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_listener_FilterChainMatch *ret = envoy_api_v2_listener_FilterChainMatch_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_FilterChainMatch_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_listener_FilterChainMatch_serialize(const envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_listener_FilterChainMatch_msginit, arena, len); -} - -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 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 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 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); -} -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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(32, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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_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); - if (!sub) return NULL; - envoy_api_v2_listener_FilterChainMatch_set_suffix_len(msg, sub); - } - return sub; -} -UPB_INLINE struct envoy_api_v2_core_CidrRange** envoy_api_v2_listener_FilterChainMatch_mutable_source_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(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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(36, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE uint32_t* envoy_api_v2_listener_FilterChainMatch_mutable_source_ports(envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { - 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); -} -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); -} -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_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); - if (!sub) return NULL; - envoy_api_v2_listener_FilterChainMatch_set_destination_port(msg, sub); - } - 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_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); -} -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); -} -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); -} -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); -} -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); -} -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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_listener_FilterChain *envoy_api_v2_listener_FilterChain_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_listener_FilterChain *ret = envoy_api_v2_listener_FilterChain_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_FilterChain_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_listener_FilterChain_serialize(const envoy_api_v2_listener_FilterChain *msg, upb_arena *arena, size_t *len) { - 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 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 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_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); - if (!sub) return NULL; - envoy_api_v2_listener_FilterChain_set_filter_chain_match(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_listener_FilterChain_set_tls_context(msg, sub); - } - return sub; -} -UPB_INLINE envoy_api_v2_listener_Filter** envoy_api_v2_listener_FilterChain_mutable_filters(envoy_api_v2_listener_FilterChain *msg, size_t *len) { - 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); -} -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); - 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; -} -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_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); - if (!sub) return NULL; - envoy_api_v2_listener_FilterChain_set_use_proxy_proto(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_listener_FilterChain_set_metadata(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_listener_FilterChain_set_transport_socket(msg, sub); - } - 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_listener_ListenerFilter *envoy_api_v2_listener_ListenerFilter_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_listener_ListenerFilter *ret = envoy_api_v2_listener_ListenerFilter_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_ListenerFilter_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_listener_ListenerFilter_serialize(const envoy_api_v2_listener_ListenerFilter *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_listener_ListenerFilter_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_listener_ListenerFilter_config_type_config = 2, - 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(12, 24)); } - -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 bool envoy_api_v2_listener_ListenerFilter_has_config(const envoy_api_v2_listener_ListenerFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 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(8, 16), UPB_SIZE(12, 24), 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(12, 24), 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(8, 16), UPB_SIZE(12, 24), 3, NULL); } - -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_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(8, 16), value, UPB_SIZE(12, 24), 2); -} -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); - if (!sub) return NULL; - envoy_api_v2_listener_ListenerFilter_set_config(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_listener_ListenerFilter_set_typed_config(envoy_api_v2_listener_ListenerFilter *msg, struct google_protobuf_Any* value) { - UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3); -} -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); - if (!sub) return NULL; - envoy_api_v2_listener_ListenerFilter_set_typed_config(msg, sub); - } - return sub; -} #ifdef __cplusplus } /* extern "C" */ 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 new file mode 100644 index 00000000000..cbce3e19bd2 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c @@ -0,0 +1,144 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/api/v2/listener/listener_components.upb.h" +#include "envoy/api/v2/auth/cert.upb.h" +#include "envoy/api/v2/core/address.upb.h" +#include "envoy/api/v2/core/base.upb.h" +#include "envoy/type/range.upb.h" +#include "google/protobuf/any.upb.h" +#include "google/protobuf/struct.upb.h" +#include "google/protobuf/wrappers.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_listener_Filter_submsgs[2] = { + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +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}, +}; + +const upb_msglayout envoy_api_v2_listener_Filter_msginit = { + &envoy_api_v2_listener_Filter_submsgs[0], + &envoy_api_v2_listener_Filter__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_listener_FilterChainMatch_submsgs[4] = { + &envoy_api_v2_core_CidrRange_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_listener_FilterChainMatch__fields[10] = { + {3, UPB_SIZE(32, 56), 0, 0, 11, 3}, + {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}, + {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}, + {11, UPB_SIZE(48, 88), 0, 0, 9, 3}, + {12, UPB_SIZE(0, 0), 0, 0, 14, 1}, +}; + +const upb_msglayout envoy_api_v2_listener_FilterChainMatch_msginit = { + &envoy_api_v2_listener_FilterChainMatch_submsgs[0], + &envoy_api_v2_listener_FilterChainMatch__fields[0], + UPB_SIZE(56, 96), 10, false, +}; + +static const upb_msglayout *const envoy_api_v2_listener_FilterChain_submsgs[6] = { + &envoy_api_v2_auth_DownstreamTlsContext_msginit, + &envoy_api_v2_core_Metadata_msginit, + &envoy_api_v2_core_TransportSocket_msginit, + &envoy_api_v2_listener_Filter_msginit, + &envoy_api_v2_listener_FilterChainMatch_msginit, + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_listener_FilterChain__fields[7] = { + {1, UPB_SIZE(8, 16), 0, 4, 11, 1}, + {2, UPB_SIZE(12, 24), 0, 0, 11, 1}, + {3, UPB_SIZE(28, 56), 0, 3, 11, 3}, + {4, UPB_SIZE(16, 32), 0, 5, 11, 1}, + {5, UPB_SIZE(20, 40), 0, 1, 11, 1}, + {6, UPB_SIZE(24, 48), 0, 2, 11, 1}, + {7, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_listener_FilterChain_msginit = { + &envoy_api_v2_listener_FilterChain_submsgs[0], + &envoy_api_v2_listener_FilterChain__fields[0], + UPB_SIZE(32, 64), 7, false, +}; + +static const upb_msglayout *const envoy_api_v2_listener_ListenerFilterChainMatchPredicate_submsgs[4] = { + &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit, + &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_msginit, + &envoy_type_Int32Range_msginit, +}; + +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}, +}; + +const upb_msglayout envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit = { + &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_submsgs[0], + &envoy_api_v2_listener_ListenerFilterChainMatchPredicate__fields[0], + UPB_SIZE(8, 16), 5, false, +}; + +static const upb_msglayout *const envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_submsgs[1] = { + &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_msginit = { + &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_submsgs[0], + &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_listener_ListenerFilter_submsgs[3] = { + &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit, + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +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}, + {4, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_listener_ListenerFilter_msginit = { + &envoy_api_v2_listener_ListenerFilter_submsgs[0], + &envoy_api_v2_listener_ListenerFilter__fields[0], + UPB_SIZE(24, 48), 4, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..dfe7c7dfe53 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h @@ -0,0 +1,527 @@ +/* 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_UPB_H_ +#define ENVOY_API_V2_LISTENER_LISTENER_COMPONENTS_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_listener_Filter; +struct envoy_api_v2_listener_FilterChainMatch; +struct envoy_api_v2_listener_FilterChain; +struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate; +struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet; +struct envoy_api_v2_listener_ListenerFilter; +typedef struct envoy_api_v2_listener_Filter envoy_api_v2_listener_Filter; +typedef struct envoy_api_v2_listener_FilterChainMatch envoy_api_v2_listener_FilterChainMatch; +typedef struct envoy_api_v2_listener_FilterChain envoy_api_v2_listener_FilterChain; +typedef struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate envoy_api_v2_listener_ListenerFilterChainMatchPredicate; +typedef struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet; +typedef struct envoy_api_v2_listener_ListenerFilter envoy_api_v2_listener_ListenerFilter; +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; +struct envoy_api_v2_auth_DownstreamTlsContext; +struct envoy_api_v2_core_CidrRange; +struct envoy_api_v2_core_Metadata; +struct envoy_api_v2_core_TransportSocket; +struct envoy_type_Int32Range; +struct google_protobuf_Any; +struct google_protobuf_BoolValue; +struct google_protobuf_Struct; +struct google_protobuf_UInt32Value; +extern const upb_msglayout envoy_api_v2_auth_DownstreamTlsContext_msginit; +extern const upb_msglayout envoy_api_v2_core_CidrRange_msginit; +extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; +extern const upb_msglayout envoy_api_v2_core_TransportSocket_msginit; +extern const upb_msglayout envoy_type_Int32Range_msginit; +extern const upb_msglayout google_protobuf_Any_msginit; +extern const upb_msglayout google_protobuf_BoolValue_msginit; +extern const upb_msglayout google_protobuf_Struct_msginit; +extern const upb_msglayout google_protobuf_UInt32Value_msginit; + +typedef enum { + envoy_api_v2_listener_FilterChainMatch_ANY = 0, + envoy_api_v2_listener_FilterChainMatch_LOCAL = 1, + envoy_api_v2_listener_FilterChainMatch_EXTERNAL = 2 +} envoy_api_v2_listener_FilterChainMatch_ConnectionSourceType; + + +/* 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); +} +UPB_INLINE envoy_api_v2_listener_Filter *envoy_api_v2_listener_Filter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_listener_Filter *ret = envoy_api_v2_listener_Filter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_Filter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_listener_Filter_serialize(const envoy_api_v2_listener_Filter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_listener_Filter_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_listener_Filter_config_type_config = 2, + 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 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 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_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); +} +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); + if (!sub) return NULL; + envoy_api_v2_listener_Filter_set_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_listener_Filter_set_typed_config(envoy_api_v2_listener_Filter *msg, struct google_protobuf_Any* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 4); +} +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); + if (!sub) return NULL; + envoy_api_v2_listener_Filter_set_typed_config(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_listener_FilterChainMatch *envoy_api_v2_listener_FilterChainMatch_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_listener_FilterChainMatch *ret = envoy_api_v2_listener_FilterChainMatch_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_FilterChainMatch_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_listener_FilterChainMatch_serialize(const envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_listener_FilterChainMatch_msginit, arena, len); +} + +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 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 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 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); +} +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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(32, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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_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); + if (!sub) return NULL; + envoy_api_v2_listener_FilterChainMatch_set_suffix_len(msg, sub); + } + return sub; +} +UPB_INLINE struct envoy_api_v2_core_CidrRange** envoy_api_v2_listener_FilterChainMatch_mutable_source_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(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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(36, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE uint32_t* envoy_api_v2_listener_FilterChainMatch_mutable_source_ports(envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { + 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); +} +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); +} +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_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); + if (!sub) return NULL; + envoy_api_v2_listener_FilterChainMatch_set_destination_port(msg, sub); + } + 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_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); +} +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); +} +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); +} +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); +} +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); +} +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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_listener_FilterChain *envoy_api_v2_listener_FilterChain_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_listener_FilterChain *ret = envoy_api_v2_listener_FilterChain_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_FilterChain_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_listener_FilterChain_serialize(const envoy_api_v2_listener_FilterChain *msg, upb_arena *arena, size_t *len) { + 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 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 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_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); + if (!sub) return NULL; + envoy_api_v2_listener_FilterChain_set_filter_chain_match(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_listener_FilterChain_set_tls_context(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_listener_Filter** envoy_api_v2_listener_FilterChain_mutable_filters(envoy_api_v2_listener_FilterChain *msg, size_t *len) { + 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); +} +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); + 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; +} +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_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); + if (!sub) return NULL; + envoy_api_v2_listener_FilterChain_set_use_proxy_proto(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_listener_FilterChain_set_metadata(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_listener_FilterChain_set_transport_socket(msg, sub); + } + 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; +} + +/* envoy.api.v2.listener.ListenerFilterChainMatchPredicate */ + +UPB_INLINE envoy_api_v2_listener_ListenerFilterChainMatchPredicate *envoy_api_v2_listener_ListenerFilterChainMatchPredicate_new(upb_arena *arena) { + return (envoy_api_v2_listener_ListenerFilterChainMatchPredicate *)upb_msg_new(&envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit, arena); +} +UPB_INLINE envoy_api_v2_listener_ListenerFilterChainMatchPredicate *envoy_api_v2_listener_ListenerFilterChainMatchPredicate_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_listener_ListenerFilterChainMatchPredicate *ret = envoy_api_v2_listener_ListenerFilterChainMatchPredicate_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_listener_ListenerFilterChainMatchPredicate_serialize(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_or_match = 1, + envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_and_match = 2, + envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_not_match = 3, + envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_any_match = 4, + 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 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); } +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 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 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_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 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) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); +} +UPB_INLINE struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet* envoy_api_v2_listener_ListenerFilterChainMatchPredicate_mutable_or_match(envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg, upb_arena *arena) { + struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet* sub = (struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet*)envoy_api_v2_listener_ListenerFilterChainMatchPredicate_or_match(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet*)upb_msg_new(&envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_listener_ListenerFilterChainMatchPredicate_set_or_match(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_listener_ListenerFilterChainMatchPredicate_set_and_match(envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg, envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2); +} +UPB_INLINE struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet* envoy_api_v2_listener_ListenerFilterChainMatchPredicate_mutable_and_match(envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg, upb_arena *arena) { + struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet* sub = (struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet*)envoy_api_v2_listener_ListenerFilterChainMatchPredicate_and_match(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet*)upb_msg_new(&envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_listener_ListenerFilterChainMatchPredicate_set_and_match(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_listener_ListenerFilterChainMatchPredicate_set_not_match(envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg, envoy_api_v2_listener_ListenerFilterChainMatchPredicate* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_listener_ListenerFilterChainMatchPredicate*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3); +} +UPB_INLINE struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate* envoy_api_v2_listener_ListenerFilterChainMatchPredicate_mutable_not_match(envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg, upb_arena *arena) { + struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate* sub = (struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate*)envoy_api_v2_listener_ListenerFilterChainMatchPredicate_not_match(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate*)upb_msg_new(&envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_listener_ListenerFilterChainMatchPredicate_set_not_match(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_listener_ListenerFilterChainMatchPredicate_set_any_match(envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4); +} +UPB_INLINE void envoy_api_v2_listener_ListenerFilterChainMatchPredicate_set_destination_port_range(envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg, struct envoy_type_Int32Range* value) { + UPB_WRITE_ONEOF(msg, struct envoy_type_Int32Range*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5); +} +UPB_INLINE struct envoy_type_Int32Range* envoy_api_v2_listener_ListenerFilterChainMatchPredicate_mutable_destination_port_range(envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg, upb_arena *arena) { + struct envoy_type_Int32Range* sub = (struct envoy_type_Int32Range*)envoy_api_v2_listener_ListenerFilterChainMatchPredicate_destination_port_range(msg); + if (sub == NULL) { + sub = (struct envoy_type_Int32Range*)upb_msg_new(&envoy_type_Int32Range_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_listener_ListenerFilterChainMatchPredicate_set_destination_port_range(msg, sub); + } + return sub; +} + +/* envoy.api.v2.listener.ListenerFilterChainMatchPredicate.MatchSet */ + +UPB_INLINE envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet *envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_new(upb_arena *arena) { + return (envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet *)upb_msg_new(&envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_msginit, arena); +} +UPB_INLINE envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet *envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet *ret = envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_serialize(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_msginit, arena, len); +} + +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) { + return (envoy_api_v2_listener_ListenerFilterChainMatchPredicate**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); +} +UPB_INLINE envoy_api_v2_listener_ListenerFilterChainMatchPredicate** envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_resize_rules(envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet *msg, size_t len, upb_arena *arena) { + return (envoy_api_v2_listener_ListenerFilterChainMatchPredicate**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate* envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_add_rules(envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet *msg, upb_arena *arena) { + struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate* sub = (struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate*)upb_msg_new(&envoy_api_v2_listener_ListenerFilterChainMatchPredicate_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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_listener_ListenerFilter *envoy_api_v2_listener_ListenerFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_listener_ListenerFilter *ret = envoy_api_v2_listener_ListenerFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_ListenerFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_listener_ListenerFilter_serialize(const envoy_api_v2_listener_ListenerFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_listener_ListenerFilter_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_listener_ListenerFilter_config_type_config = 2, + 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 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 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 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_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); +} +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); + if (!sub) return NULL; + envoy_api_v2_listener_ListenerFilter_set_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_listener_ListenerFilter_set_typed_config(envoy_api_v2_listener_ListenerFilter *msg, struct google_protobuf_Any* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 3); +} +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); + if (!sub) return NULL; + envoy_api_v2_listener_ListenerFilter_set_typed_config(msg, sub); + } + 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_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); + if (sub == NULL) { + sub = (struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate*)upb_msg_new(&envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_listener_ListenerFilter_set_filter_disabled(msg, sub); + } + return sub; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_LISTENER_LISTENER_COMPONENTS_PROTO_UPB_H_ */ 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 44e9e7b23ed..f32ff0ba672 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 @@ -11,6 +11,7 @@ #include "envoy/api/v2/listener/udp_listener_config.upb.h" #include "google/protobuf/any.upb.h" #include "google/protobuf/struct.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "upb/port_def.inc" @@ -31,5 +32,11 @@ const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit = { UPB_SIZE(16, 32), 3, false, }; +const upb_msglayout envoy_api_v2_listener_ActiveRawUdpListenerConfig_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + #include "upb/port_undef.inc" 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..6308acc3cb3 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 @@ -21,8 +21,11 @@ extern "C" { #endif struct envoy_api_v2_listener_UdpListenerConfig; +struct envoy_api_v2_listener_ActiveRawUdpListenerConfig; typedef struct envoy_api_v2_listener_UdpListenerConfig envoy_api_v2_listener_UdpListenerConfig; +typedef struct envoy_api_v2_listener_ActiveRawUdpListenerConfig envoy_api_v2_listener_ActiveRawUdpListenerConfig; extern const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit; +extern const upb_msglayout envoy_api_v2_listener_ActiveRawUdpListenerConfig_msginit; struct google_protobuf_Any; struct google_protobuf_Struct; extern const upb_msglayout google_protobuf_Any_msginit; @@ -84,6 +87,22 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_listener_UdpListenerConfig_m return sub; } +/* envoy.api.v2.listener.ActiveRawUdpListenerConfig */ + +UPB_INLINE envoy_api_v2_listener_ActiveRawUdpListenerConfig *envoy_api_v2_listener_ActiveRawUdpListenerConfig_new(upb_arena *arena) { + return (envoy_api_v2_listener_ActiveRawUdpListenerConfig *)upb_msg_new(&envoy_api_v2_listener_ActiveRawUdpListenerConfig_msginit, arena); +} +UPB_INLINE envoy_api_v2_listener_ActiveRawUdpListenerConfig *envoy_api_v2_listener_ActiveRawUdpListenerConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_listener_ActiveRawUdpListenerConfig *ret = envoy_api_v2_listener_ActiveRawUdpListenerConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_ActiveRawUdpListenerConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_listener_ActiveRawUdpListenerConfig_serialize(const envoy_api_v2_listener_ActiveRawUdpListenerConfig *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_listener_ActiveRawUdpListenerConfig_msginit, arena, len); +} + + + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/core/ext/upb-generated/envoy/api/v2/rds.upb.c b/src/core/ext/upb-generated/envoy/api/v2/rds.upb.c index 8f9ea678df3..c17b86893e1 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/rds.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/rds.upb.c @@ -9,54 +9,20 @@ #include #include "upb/msg.h" #include "envoy/api/v2/rds.upb.h" -#include "envoy/api/v2/core/base.upb.h" -#include "envoy/api/v2/core/config_source.upb.h" #include "envoy/api/v2/discovery.upb.h" -#include "envoy/api/v2/route/route.upb.h" #include "google/api/annotations.upb.h" #include "google/protobuf/wrappers.upb.h" +#include "envoy/annotations/resource.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" +#include "envoy/api/v2/route.upb.h" #include "upb/port_def.inc" -static const upb_msglayout *const envoy_api_v2_RouteConfiguration_submsgs[5] = { - &envoy_api_v2_Vhds_msginit, - &envoy_api_v2_core_HeaderValueOption_msginit, - &envoy_api_v2_route_VirtualHost_msginit, - &google_protobuf_BoolValue_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_RouteConfiguration__fields[10] = { - {1, UPB_SIZE(4, 8), 0, 0, 9, 1}, - {2, UPB_SIZE(20, 40), 0, 2, 11, 3}, - {3, UPB_SIZE(24, 48), 0, 0, 9, 3}, - {4, UPB_SIZE(28, 56), 0, 1, 11, 3}, - {5, UPB_SIZE(32, 64), 0, 0, 9, 3}, - {6, UPB_SIZE(36, 72), 0, 1, 11, 3}, - {7, UPB_SIZE(12, 24), 0, 3, 11, 1}, - {8, UPB_SIZE(40, 80), 0, 0, 9, 3}, - {9, UPB_SIZE(16, 32), 0, 0, 11, 1}, - {10, UPB_SIZE(0, 0), 0, 0, 8, 1}, -}; - -const upb_msglayout envoy_api_v2_RouteConfiguration_msginit = { - &envoy_api_v2_RouteConfiguration_submsgs[0], - &envoy_api_v2_RouteConfiguration__fields[0], - UPB_SIZE(48, 96), 10, false, -}; - -static const upb_msglayout *const envoy_api_v2_Vhds_submsgs[1] = { - &envoy_api_v2_core_ConfigSource_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_Vhds__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_Vhds_msginit = { - &envoy_api_v2_Vhds_submsgs[0], - &envoy_api_v2_Vhds__fields[0], - UPB_SIZE(4, 8), 1, false, +const upb_msglayout envoy_api_v2_RdsDummy_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, }; #include "upb/port_undef.inc" 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..2af52570315 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 @@ -14,181 +14,35 @@ #include "upb/decode.h" #include "upb/encode.h" +/* Public Imports. */ +#include "envoy/api/v2/route.upb.h" + #include "upb/port_def.inc" #ifdef __cplusplus extern "C" { #endif -struct envoy_api_v2_RouteConfiguration; -struct envoy_api_v2_Vhds; -typedef struct envoy_api_v2_RouteConfiguration envoy_api_v2_RouteConfiguration; -typedef struct envoy_api_v2_Vhds envoy_api_v2_Vhds; -extern const upb_msglayout envoy_api_v2_RouteConfiguration_msginit; -extern const upb_msglayout envoy_api_v2_Vhds_msginit; -struct envoy_api_v2_core_ConfigSource; -struct envoy_api_v2_core_HeaderValueOption; -struct envoy_api_v2_route_VirtualHost; -struct google_protobuf_BoolValue; -extern const upb_msglayout envoy_api_v2_core_ConfigSource_msginit; -extern const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit; -extern const upb_msglayout envoy_api_v2_route_VirtualHost_msginit; -extern const upb_msglayout google_protobuf_BoolValue_msginit; +struct envoy_api_v2_RdsDummy; +typedef struct envoy_api_v2_RdsDummy envoy_api_v2_RdsDummy; +extern const upb_msglayout envoy_api_v2_RdsDummy_msginit; -/* envoy.api.v2.RouteConfiguration */ +/* envoy.api.v2.RdsDummy */ -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); +UPB_INLINE envoy_api_v2_RdsDummy *envoy_api_v2_RdsDummy_new(upb_arena *arena) { + return (envoy_api_v2_RdsDummy *)upb_msg_new(&envoy_api_v2_RdsDummy_msginit, arena); } -UPB_INLINE envoy_api_v2_RouteConfiguration *envoy_api_v2_RouteConfiguration_parse(const char *buf, size_t size, +UPB_INLINE envoy_api_v2_RdsDummy *envoy_api_v2_RdsDummy_parse(const char *buf, size_t size, upb_arena *arena) { - envoy_api_v2_RouteConfiguration *ret = envoy_api_v2_RouteConfiguration_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_RouteConfiguration_msginit, arena)) ? ret : NULL; + envoy_api_v2_RdsDummy *ret = envoy_api_v2_RdsDummy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_RdsDummy_msginit, arena)) ? ret : NULL; } -UPB_INLINE char *envoy_api_v2_RouteConfiguration_serialize(const envoy_api_v2_RouteConfiguration *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_RouteConfiguration_msginit, arena, len); +UPB_INLINE char *envoy_api_v2_RdsDummy_serialize(const envoy_api_v2_RdsDummy *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_RdsDummy_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 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 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 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 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 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_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); -} -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); -} -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); - 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; -} -UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_internal_only_headers(envoy_api_v2_RouteConfiguration *msg, size_t *len) { - 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); -} -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); -} -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); -} -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); - 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; -} -UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_response_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, size_t *len) { - 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); -} -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); -} -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); -} -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); - 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; -} -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_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); - if (!sub) return NULL; - envoy_api_v2_RouteConfiguration_set_validate_clusters(msg, sub); - } - return sub; -} -UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_request_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, size_t *len) { - 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); -} -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); -} -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_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); - if (!sub) return NULL; - envoy_api_v2_RouteConfiguration_set_vhds(msg, sub); - } - 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_Vhds *envoy_api_v2_Vhds_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Vhds *ret = envoy_api_v2_Vhds_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Vhds_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_Vhds_serialize(const envoy_api_v2_Vhds *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_Vhds_set_config_source(msg, sub); - } - return sub; -} #ifdef __cplusplus } /* extern "C" */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/route.upb.c b/src/core/ext/upb-generated/envoy/api/v2/route.upb.c new file mode 100644 index 00000000000..7486cb42d84 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route.upb.c @@ -0,0 +1,62 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/api/v2/route.upb.h" +#include "envoy/api/v2/core/base.upb.h" +#include "envoy/api/v2/core/config_source.upb.h" +#include "envoy/api/v2/route/route_components.upb.h" +#include "google/protobuf/wrappers.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_RouteConfiguration_submsgs[5] = { + &envoy_api_v2_Vhds_msginit, + &envoy_api_v2_core_HeaderValueOption_msginit, + &envoy_api_v2_route_VirtualHost_msginit, + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_RouteConfiguration__fields[10] = { + {1, UPB_SIZE(4, 8), 0, 0, 9, 1}, + {2, UPB_SIZE(20, 40), 0, 2, 11, 3}, + {3, UPB_SIZE(24, 48), 0, 0, 9, 3}, + {4, UPB_SIZE(28, 56), 0, 1, 11, 3}, + {5, UPB_SIZE(32, 64), 0, 0, 9, 3}, + {6, UPB_SIZE(36, 72), 0, 1, 11, 3}, + {7, UPB_SIZE(12, 24), 0, 3, 11, 1}, + {8, UPB_SIZE(40, 80), 0, 0, 9, 3}, + {9, UPB_SIZE(16, 32), 0, 0, 11, 1}, + {10, UPB_SIZE(0, 0), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_RouteConfiguration_msginit = { + &envoy_api_v2_RouteConfiguration_submsgs[0], + &envoy_api_v2_RouteConfiguration__fields[0], + UPB_SIZE(48, 96), 10, false, +}; + +static const upb_msglayout *const envoy_api_v2_Vhds_submsgs[1] = { + &envoy_api_v2_core_ConfigSource_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Vhds__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_Vhds_msginit = { + &envoy_api_v2_Vhds_submsgs[0], + &envoy_api_v2_Vhds__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..542607a519b --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route.upb.h @@ -0,0 +1,199 @@ +/* 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_UPB_H_ +#define ENVOY_API_V2_ROUTE_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_RouteConfiguration; +struct envoy_api_v2_Vhds; +typedef struct envoy_api_v2_RouteConfiguration envoy_api_v2_RouteConfiguration; +typedef struct envoy_api_v2_Vhds envoy_api_v2_Vhds; +extern const upb_msglayout envoy_api_v2_RouteConfiguration_msginit; +extern const upb_msglayout envoy_api_v2_Vhds_msginit; +struct envoy_api_v2_core_ConfigSource; +struct envoy_api_v2_core_HeaderValueOption; +struct envoy_api_v2_route_VirtualHost; +struct google_protobuf_BoolValue; +extern const upb_msglayout envoy_api_v2_core_ConfigSource_msginit; +extern const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit; +extern const upb_msglayout envoy_api_v2_route_VirtualHost_msginit; +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); +} +UPB_INLINE envoy_api_v2_RouteConfiguration *envoy_api_v2_RouteConfiguration_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_RouteConfiguration *ret = envoy_api_v2_RouteConfiguration_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_RouteConfiguration_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_RouteConfiguration_serialize(const envoy_api_v2_RouteConfiguration *msg, upb_arena *arena, size_t *len) { + 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 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 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 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 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 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_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); +} +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); +} +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); + 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; +} +UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_internal_only_headers(envoy_api_v2_RouteConfiguration *msg, size_t *len) { + 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); +} +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); +} +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); +} +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); + 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; +} +UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_response_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, size_t *len) { + 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); +} +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); +} +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); +} +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); + 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; +} +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_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); + if (!sub) return NULL; + envoy_api_v2_RouteConfiguration_set_validate_clusters(msg, sub); + } + return sub; +} +UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_request_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, size_t *len) { + 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); +} +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); +} +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_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); + if (!sub) return NULL; + envoy_api_v2_RouteConfiguration_set_vhds(msg, sub); + } + 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_Vhds *envoy_api_v2_Vhds_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_Vhds *ret = envoy_api_v2_Vhds_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Vhds_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Vhds_serialize(const envoy_api_v2_Vhds *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_Vhds_set_config_source(msg, sub); + } + return sub; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ROUTE_PROTO_UPB_H_ */ 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..d8e9ffdf151 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 @@ -9,723 +9,9 @@ #include #include "upb/msg.h" #include "envoy/api/v2/route/route.upb.h" -#include "envoy/api/v2/core/base.upb.h" -#include "envoy/type/matcher/regex.upb.h" -#include "envoy/type/matcher/string.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" -#include "google/protobuf/wrappers.upb.h" -#include "validate/validate.upb.h" +#include "envoy/api/v2/route/route_components.upb.h" #include "upb/port_def.inc" -static const upb_msglayout *const envoy_api_v2_route_VirtualHost_submsgs[10] = { - &envoy_api_v2_core_HeaderValueOption_msginit, - &envoy_api_v2_route_CorsPolicy_msginit, - &envoy_api_v2_route_HedgePolicy_msginit, - &envoy_api_v2_route_RateLimit_msginit, - &envoy_api_v2_route_RetryPolicy_msginit, - &envoy_api_v2_route_Route_msginit, - &envoy_api_v2_route_VirtualCluster_msginit, - &envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit, - &envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_VirtualHost__fields[16] = { - {1, UPB_SIZE(12, 16), 0, 0, 9, 1}, - {2, UPB_SIZE(32, 56), 0, 0, 9, 3}, - {3, UPB_SIZE(36, 64), 0, 5, 11, 3}, - {4, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {5, UPB_SIZE(40, 72), 0, 6, 11, 3}, - {6, UPB_SIZE(44, 80), 0, 3, 11, 3}, - {7, UPB_SIZE(48, 88), 0, 0, 11, 3}, - {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}, - {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}, - {16, UPB_SIZE(24, 40), 0, 4, 11, 1}, - {17, UPB_SIZE(28, 48), 0, 2, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_VirtualHost_msginit = { - &envoy_api_v2_route_VirtualHost_submsgs[0], - &envoy_api_v2_route_VirtualHost__fields[0], - UPB_SIZE(72, 144), 16, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_submsgs[1] = { - &google_protobuf_Struct_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_VirtualHost_PerFilterConfigEntry__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit = { - &envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_submsgs[0], - &envoy_api_v2_route_VirtualHost_PerFilterConfigEntry__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_submsgs[1] = { - &google_protobuf_Any_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit = { - &envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_submsgs[0], - &envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_Route_submsgs[11] = { - &envoy_api_v2_core_HeaderValueOption_msginit, - &envoy_api_v2_core_Metadata_msginit, - &envoy_api_v2_route_Decorator_msginit, - &envoy_api_v2_route_DirectResponseAction_msginit, - &envoy_api_v2_route_RedirectAction_msginit, - &envoy_api_v2_route_Route_PerFilterConfigEntry_msginit, - &envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit, - &envoy_api_v2_route_RouteAction_msginit, - &envoy_api_v2_route_RouteMatch_msginit, - &envoy_api_v2_route_Tracing_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_Route__fields[14] = { - {1, UPB_SIZE(8, 16), 0, 8, 11, 1}, - {2, UPB_SIZE(48, 96), UPB_SIZE(-53, -105), 7, 11, 1}, - {3, UPB_SIZE(48, 96), UPB_SIZE(-53, -105), 4, 11, 1}, - {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}, - {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}, - {14, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {15, UPB_SIZE(20, 40), 0, 9, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_Route_msginit = { - &envoy_api_v2_route_Route_submsgs[0], - &envoy_api_v2_route_Route__fields[0], - UPB_SIZE(56, 112), 14, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_Route_PerFilterConfigEntry_submsgs[1] = { - &google_protobuf_Struct_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_Route_PerFilterConfigEntry__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_Route_PerFilterConfigEntry_msginit = { - &envoy_api_v2_route_Route_PerFilterConfigEntry_submsgs[0], - &envoy_api_v2_route_Route_PerFilterConfigEntry__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_Route_TypedPerFilterConfigEntry_submsgs[1] = { - &google_protobuf_Any_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_Route_TypedPerFilterConfigEntry__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit = { - &envoy_api_v2_route_Route_TypedPerFilterConfigEntry_submsgs[0], - &envoy_api_v2_route_Route_TypedPerFilterConfigEntry__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_submsgs[2] = { - &envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit, - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_WeightedCluster__fields[3] = { - {1, UPB_SIZE(12, 24), 0, 0, 11, 3}, - {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {3, UPB_SIZE(8, 16), 0, 1, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_WeightedCluster_msginit = { - &envoy_api_v2_route_WeightedCluster_submsgs[0], - &envoy_api_v2_route_WeightedCluster__fields[0], - UPB_SIZE(16, 32), 3, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_ClusterWeight_submsgs[6] = { - &envoy_api_v2_core_HeaderValueOption_msginit, - &envoy_api_v2_core_Metadata_msginit, - &envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit, - &envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit, - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_WeightedCluster_ClusterWeight__fields[9] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 4, 11, 1}, - {3, UPB_SIZE(12, 24), 0, 1, 11, 1}, - {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}, - {9, UPB_SIZE(32, 64), 0, 0, 9, 3}, - {10, UPB_SIZE(36, 72), 0, 3, 11, 3}, -}; - -const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit = { - &envoy_api_v2_route_WeightedCluster_ClusterWeight_submsgs[0], - &envoy_api_v2_route_WeightedCluster_ClusterWeight__fields[0], - UPB_SIZE(40, 80), 9, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_submsgs[1] = { - &google_protobuf_Struct_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit = { - &envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_submsgs[0], - &envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_submsgs[1] = { - &google_protobuf_Any_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit = { - &envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_submsgs[0], - &envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RouteMatch_submsgs[6] = { - &envoy_api_v2_core_RuntimeFractionalPercent_msginit, - &envoy_api_v2_route_HeaderMatcher_msginit, - &envoy_api_v2_route_QueryParameterMatcher_msginit, - &envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit, - &envoy_type_matcher_RegexMatcher_msginit, - &google_protobuf_BoolValue_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_RouteMatch__fields[9] = { - {1, UPB_SIZE(20, 40), UPB_SIZE(-29, -57), 0, 9, 1}, - {2, UPB_SIZE(20, 40), UPB_SIZE(-29, -57), 0, 9, 1}, - {3, UPB_SIZE(20, 40), UPB_SIZE(-29, -57), 0, 9, 1}, - {4, UPB_SIZE(0, 0), 0, 5, 11, 1}, - {6, UPB_SIZE(12, 24), 0, 1, 11, 3}, - {7, UPB_SIZE(16, 32), 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(20, 40), UPB_SIZE(-29, -57), 4, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_RouteMatch_msginit = { - &envoy_api_v2_route_RouteMatch_submsgs[0], - &envoy_api_v2_route_RouteMatch__fields[0], - UPB_SIZE(32, 64), 9, false, -}; - -const upb_msglayout envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit = { - NULL, - NULL, - UPB_SIZE(0, 0), 0, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_CorsPolicy_submsgs[5] = { - &envoy_api_v2_core_RuntimeFractionalPercent_msginit, - &envoy_type_matcher_StringMatcher_msginit, - &google_protobuf_BoolValue_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_CorsPolicy__fields[11] = { - {1, UPB_SIZE(40, 80), 0, 0, 9, 3}, - {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {3, UPB_SIZE(8, 16), 0, 0, 9, 1}, - {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}, - {8, UPB_SIZE(44, 88), 0, 0, 9, 3}, - {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}, -}; - -const upb_msglayout envoy_api_v2_route_CorsPolicy_msginit = { - &envoy_api_v2_route_CorsPolicy_submsgs[0], - &envoy_api_v2_route_CorsPolicy__fields[0], - UPB_SIZE(64, 128), 11, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RouteAction_submsgs[15] = { - &envoy_api_v2_core_Metadata_msginit, - &envoy_api_v2_route_CorsPolicy_msginit, - &envoy_api_v2_route_HedgePolicy_msginit, - &envoy_api_v2_route_RateLimit_msginit, - &envoy_api_v2_route_RetryPolicy_msginit, - &envoy_api_v2_route_RouteAction_HashPolicy_msginit, - &envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit, - &envoy_api_v2_route_RouteAction_UpgradeConfig_msginit, - &envoy_api_v2_route_WeightedCluster_msginit, - &google_protobuf_BoolValue_msginit, - &google_protobuf_Duration_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_RouteAction__fields[23] = { - {1, UPB_SIZE(84, 144), UPB_SIZE(-93, -161), 0, 9, 1}, - {2, UPB_SIZE(84, 144), UPB_SIZE(-93, -161), 0, 9, 1}, - {3, UPB_SIZE(84, 144), UPB_SIZE(-93, -161), 8, 11, 1}, - {4, UPB_SIZE(32, 40), 0, 0, 11, 1}, - {5, UPB_SIZE(24, 24), 0, 0, 9, 1}, - {6, UPB_SIZE(96, 168), UPB_SIZE(-105, -185), 0, 9, 1}, - {7, UPB_SIZE(96, 168), UPB_SIZE(-105, -185), 9, 11, 1}, - {8, UPB_SIZE(36, 48), 0, 10, 11, 1}, - {9, UPB_SIZE(40, 56), 0, 4, 11, 1}, - {10, UPB_SIZE(44, 64), 0, 6, 11, 1}, - {11, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {13, UPB_SIZE(72, 120), 0, 3, 11, 3}, - {14, UPB_SIZE(48, 72), 0, 9, 11, 1}, - {15, UPB_SIZE(76, 128), 0, 5, 11, 3}, - {17, UPB_SIZE(52, 80), 0, 1, 11, 1}, - {20, UPB_SIZE(8, 8), 0, 0, 14, 1}, - {23, UPB_SIZE(56, 88), 0, 10, 11, 1}, - {24, UPB_SIZE(60, 96), 0, 10, 11, 1}, - {25, UPB_SIZE(80, 136), 0, 7, 11, 3}, - {26, UPB_SIZE(16, 16), 0, 0, 14, 1}, - {27, UPB_SIZE(64, 104), 0, 2, 11, 1}, - {28, UPB_SIZE(68, 112), 0, 10, 11, 1}, - {29, UPB_SIZE(96, 168), UPB_SIZE(-105, -185), 0, 9, 1}, -}; - -const upb_msglayout envoy_api_v2_route_RouteAction_msginit = { - &envoy_api_v2_route_RouteAction_submsgs[0], - &envoy_api_v2_route_RouteAction__fields[0], - UPB_SIZE(112, 192), 23, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RouteAction_RequestMirrorPolicy_submsgs[1] = { - &envoy_api_v2_core_RuntimeFractionalPercent_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_RouteAction_RequestMirrorPolicy__fields[3] = { - {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, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit = { - &envoy_api_v2_route_RouteAction_RequestMirrorPolicy_submsgs[0], - &envoy_api_v2_route_RouteAction_RequestMirrorPolicy__fields[0], - UPB_SIZE(24, 48), 3, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RouteAction_HashPolicy_submsgs[3] = { - &envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit, - &envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit, - &envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy__fields[4] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 2, 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}, -}; - -const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_msginit = { - &envoy_api_v2_route_RouteAction_HashPolicy_submsgs[0], - &envoy_api_v2_route_RouteAction_HashPolicy__fields[0], - UPB_SIZE(12, 24), 4, false, -}; - -static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy_Header__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, -}; - -const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit = { - NULL, - &envoy_api_v2_route_RouteAction_HashPolicy_Header__fields[0], - UPB_SIZE(8, 16), 1, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RouteAction_HashPolicy_Cookie_submsgs[1] = { - &google_protobuf_Duration_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy_Cookie__fields[3] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(16, 32), 0, 0, 11, 1}, - {3, UPB_SIZE(8, 16), 0, 0, 9, 1}, -}; - -const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit = { - &envoy_api_v2_route_RouteAction_HashPolicy_Cookie_submsgs[0], - &envoy_api_v2_route_RouteAction_HashPolicy_Cookie__fields[0], - UPB_SIZE(24, 48), 3, false, -}; - -static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 8, 1}, -}; - -const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit = { - NULL, - &envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties__fields[0], - UPB_SIZE(1, 1), 1, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RouteAction_UpgradeConfig_submsgs[1] = { - &google_protobuf_BoolValue_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_RouteAction_UpgradeConfig__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_RouteAction_UpgradeConfig_msginit = { - &envoy_api_v2_route_RouteAction_UpgradeConfig_submsgs[0], - &envoy_api_v2_route_RouteAction_UpgradeConfig__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_submsgs[7] = { - &envoy_api_v2_route_HeaderMatcher_msginit, - &envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit, - &envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit, - &envoy_api_v2_route_RetryPolicy_RetryPriority_msginit, - &google_protobuf_Duration_msginit, - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_RetryPolicy__fields[10] = { - {1, UPB_SIZE(8, 8), 0, 0, 9, 1}, - {2, UPB_SIZE(16, 24), 0, 5, 11, 1}, - {3, UPB_SIZE(20, 32), 0, 4, 11, 1}, - {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}, - {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}, -}; - -const upb_msglayout envoy_api_v2_route_RetryPolicy_msginit = { - &envoy_api_v2_route_RetryPolicy_submsgs[0], - &envoy_api_v2_route_RetryPolicy__fields[0], - UPB_SIZE(48, 96), 10, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryPriority_submsgs[2] = { - &google_protobuf_Any_msginit, - &google_protobuf_Struct_msginit, -}; - -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}, -}; - -const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryPriority_msginit = { - &envoy_api_v2_route_RetryPolicy_RetryPriority_submsgs[0], - &envoy_api_v2_route_RetryPolicy_RetryPriority__fields[0], - UPB_SIZE(16, 32), 3, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryHostPredicate_submsgs[2] = { - &google_protobuf_Any_msginit, - &google_protobuf_Struct_msginit, -}; - -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}, -}; - -const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit = { - &envoy_api_v2_route_RetryPolicy_RetryHostPredicate_submsgs[0], - &envoy_api_v2_route_RetryPolicy_RetryHostPredicate__fields[0], - UPB_SIZE(16, 32), 3, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryBackOff_submsgs[2] = { - &google_protobuf_Duration_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_RetryPolicy_RetryBackOff__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, - {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit = { - &envoy_api_v2_route_RetryPolicy_RetryBackOff_submsgs[0], - &envoy_api_v2_route_RetryPolicy_RetryBackOff__fields[0], - UPB_SIZE(8, 16), 2, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_HedgePolicy_submsgs[2] = { - &envoy_type_FractionalPercent_msginit, - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_HedgePolicy__fields[3] = { - {1, UPB_SIZE(4, 8), 0, 1, 11, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, - {3, UPB_SIZE(0, 0), 0, 0, 8, 1}, -}; - -const upb_msglayout envoy_api_v2_route_HedgePolicy_msginit = { - &envoy_api_v2_route_HedgePolicy_submsgs[0], - &envoy_api_v2_route_HedgePolicy__fields[0], - UPB_SIZE(12, 24), 3, false, -}; - -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}, - {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}, - {6, UPB_SIZE(12, 12), 0, 0, 8, 1}, - {7, UPB_SIZE(36, 56), UPB_SIZE(-45, -73), 0, 9, 1}, - {8, UPB_SIZE(8, 8), 0, 0, 13, 1}, -}; - -const upb_msglayout envoy_api_v2_route_RedirectAction_msginit = { - NULL, - &envoy_api_v2_route_RedirectAction__fields[0], - UPB_SIZE(48, 80), 8, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_DirectResponseAction_submsgs[1] = { - &envoy_api_v2_core_DataSource_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_DirectResponseAction__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 13, 1}, - {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_DirectResponseAction_msginit = { - &envoy_api_v2_route_DirectResponseAction_submsgs[0], - &envoy_api_v2_route_DirectResponseAction__fields[0], - UPB_SIZE(8, 16), 2, false, -}; - -static const upb_msglayout_field envoy_api_v2_route_Decorator__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, -}; - -const upb_msglayout envoy_api_v2_route_Decorator_msginit = { - NULL, - &envoy_api_v2_route_Decorator__fields[0], - UPB_SIZE(8, 16), 1, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_Tracing_submsgs[3] = { - &envoy_type_FractionalPercent_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_Tracing__fields[3] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, - {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, - {3, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_route_Tracing_msginit = { - &envoy_api_v2_route_Tracing_submsgs[0], - &envoy_api_v2_route_Tracing__fields[0], - UPB_SIZE(12, 24), 3, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_VirtualCluster_submsgs[1] = { - &envoy_api_v2_route_HeaderMatcher_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_VirtualCluster__fields[4] = { - {1, UPB_SIZE(8, 8), 0, 0, 9, 1}, - {2, UPB_SIZE(16, 24), 0, 0, 9, 1}, - {3, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {4, UPB_SIZE(24, 40), 0, 0, 11, 3}, -}; - -const upb_msglayout envoy_api_v2_route_VirtualCluster_msginit = { - &envoy_api_v2_route_VirtualCluster_submsgs[0], - &envoy_api_v2_route_VirtualCluster__fields[0], - UPB_SIZE(32, 48), 4, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RateLimit_submsgs[2] = { - &envoy_api_v2_route_RateLimit_Action_msginit, - &google_protobuf_UInt32Value_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_RateLimit__fields[3] = { - {1, UPB_SIZE(8, 16), 0, 1, 11, 1}, - {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {3, UPB_SIZE(12, 24), 0, 0, 11, 3}, -}; - -const upb_msglayout envoy_api_v2_route_RateLimit_msginit = { - &envoy_api_v2_route_RateLimit_submsgs[0], - &envoy_api_v2_route_RateLimit__fields[0], - UPB_SIZE(16, 32), 3, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RateLimit_Action_submsgs[6] = { - &envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit, - &envoy_api_v2_route_RateLimit_Action_GenericKey_msginit, - &envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit, - &envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit, - &envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit, - &envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit, -}; - -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}, -}; - -const upb_msglayout envoy_api_v2_route_RateLimit_Action_msginit = { - &envoy_api_v2_route_RateLimit_Action_submsgs[0], - &envoy_api_v2_route_RateLimit_Action__fields[0], - UPB_SIZE(8, 16), 6, false, -}; - -const upb_msglayout envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit = { - NULL, - NULL, - UPB_SIZE(0, 0), 0, false, -}; - -const upb_msglayout envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit = { - NULL, - NULL, - UPB_SIZE(0, 0), 0, false, -}; - -static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action_RequestHeaders__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, -}; - -const upb_msglayout envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit = { - NULL, - &envoy_api_v2_route_RateLimit_Action_RequestHeaders__fields[0], - UPB_SIZE(16, 32), 2, false, -}; - -const upb_msglayout envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit = { - NULL, - NULL, - UPB_SIZE(0, 0), 0, false, -}; - -static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action_GenericKey__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, -}; - -const upb_msglayout envoy_api_v2_route_RateLimit_Action_GenericKey_msginit = { - NULL, - &envoy_api_v2_route_RateLimit_Action_GenericKey__fields[0], - UPB_SIZE(8, 16), 1, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_submsgs[2] = { - &envoy_api_v2_route_HeaderMatcher_msginit, - &google_protobuf_BoolValue_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action_HeaderValueMatch__fields[3] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 1, 11, 1}, - {3, UPB_SIZE(12, 24), 0, 0, 11, 3}, -}; - -const upb_msglayout envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit = { - &envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_submsgs[0], - &envoy_api_v2_route_RateLimit_Action_HeaderValueMatch__fields[0], - UPB_SIZE(16, 32), 3, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_HeaderMatcher_submsgs[2] = { - &envoy_type_Int64Range_msginit, - &envoy_type_matcher_RegexMatcher_msginit, -}; - -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}, - {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}, -}; - -const upb_msglayout envoy_api_v2_route_HeaderMatcher_msginit = { - &envoy_api_v2_route_HeaderMatcher_submsgs[0], - &envoy_api_v2_route_HeaderMatcher__fields[0], - UPB_SIZE(24, 48), 9, false, -}; - -static const upb_msglayout *const envoy_api_v2_route_QueryParameterMatcher_submsgs[2] = { - &envoy_type_matcher_StringMatcher_msginit, - &google_protobuf_BoolValue_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_route_QueryParameterMatcher__fields[5] = { - {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}, -}; - -const upb_msglayout envoy_api_v2_route_QueryParameterMatcher_msginit = { - &envoy_api_v2_route_QueryParameterMatcher_submsgs[0], - &envoy_api_v2_route_QueryParameterMatcher__fields[0], - UPB_SIZE(32, 64), 5, false, -}; - #include "upb/port_undef.inc" 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..794925e9366 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 @@ -14,2693 +14,15 @@ #include "upb/decode.h" #include "upb/encode.h" +/* Public Imports. */ +#include "envoy/api/v2/route/route_components.upb.h" + #include "upb/port_def.inc" #ifdef __cplusplus extern "C" { #endif -struct envoy_api_v2_route_VirtualHost; -struct envoy_api_v2_route_VirtualHost_PerFilterConfigEntry; -struct envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry; -struct envoy_api_v2_route_Route; -struct envoy_api_v2_route_Route_PerFilterConfigEntry; -struct envoy_api_v2_route_Route_TypedPerFilterConfigEntry; -struct envoy_api_v2_route_WeightedCluster; -struct envoy_api_v2_route_WeightedCluster_ClusterWeight; -struct envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry; -struct envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry; -struct envoy_api_v2_route_RouteMatch; -struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions; -struct envoy_api_v2_route_CorsPolicy; -struct envoy_api_v2_route_RouteAction; -struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy; -struct envoy_api_v2_route_RouteAction_HashPolicy; -struct envoy_api_v2_route_RouteAction_HashPolicy_Header; -struct envoy_api_v2_route_RouteAction_HashPolicy_Cookie; -struct envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties; -struct envoy_api_v2_route_RouteAction_UpgradeConfig; -struct envoy_api_v2_route_RetryPolicy; -struct envoy_api_v2_route_RetryPolicy_RetryPriority; -struct envoy_api_v2_route_RetryPolicy_RetryHostPredicate; -struct envoy_api_v2_route_RetryPolicy_RetryBackOff; -struct envoy_api_v2_route_HedgePolicy; -struct envoy_api_v2_route_RedirectAction; -struct envoy_api_v2_route_DirectResponseAction; -struct envoy_api_v2_route_Decorator; -struct envoy_api_v2_route_Tracing; -struct envoy_api_v2_route_VirtualCluster; -struct envoy_api_v2_route_RateLimit; -struct envoy_api_v2_route_RateLimit_Action; -struct envoy_api_v2_route_RateLimit_Action_SourceCluster; -struct envoy_api_v2_route_RateLimit_Action_DestinationCluster; -struct envoy_api_v2_route_RateLimit_Action_RequestHeaders; -struct envoy_api_v2_route_RateLimit_Action_RemoteAddress; -struct envoy_api_v2_route_RateLimit_Action_GenericKey; -struct envoy_api_v2_route_RateLimit_Action_HeaderValueMatch; -struct envoy_api_v2_route_HeaderMatcher; -struct envoy_api_v2_route_QueryParameterMatcher; -typedef struct envoy_api_v2_route_VirtualHost envoy_api_v2_route_VirtualHost; -typedef struct envoy_api_v2_route_VirtualHost_PerFilterConfigEntry envoy_api_v2_route_VirtualHost_PerFilterConfigEntry; -typedef struct envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry; -typedef struct envoy_api_v2_route_Route envoy_api_v2_route_Route; -typedef struct envoy_api_v2_route_Route_PerFilterConfigEntry envoy_api_v2_route_Route_PerFilterConfigEntry; -typedef struct envoy_api_v2_route_Route_TypedPerFilterConfigEntry envoy_api_v2_route_Route_TypedPerFilterConfigEntry; -typedef struct envoy_api_v2_route_WeightedCluster envoy_api_v2_route_WeightedCluster; -typedef struct envoy_api_v2_route_WeightedCluster_ClusterWeight envoy_api_v2_route_WeightedCluster_ClusterWeight; -typedef struct envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry; -typedef struct envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry; -typedef struct envoy_api_v2_route_RouteMatch envoy_api_v2_route_RouteMatch; -typedef struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions; -typedef struct envoy_api_v2_route_CorsPolicy envoy_api_v2_route_CorsPolicy; -typedef struct envoy_api_v2_route_RouteAction envoy_api_v2_route_RouteAction; -typedef struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy envoy_api_v2_route_RouteAction_RequestMirrorPolicy; -typedef struct envoy_api_v2_route_RouteAction_HashPolicy envoy_api_v2_route_RouteAction_HashPolicy; -typedef struct envoy_api_v2_route_RouteAction_HashPolicy_Header envoy_api_v2_route_RouteAction_HashPolicy_Header; -typedef struct envoy_api_v2_route_RouteAction_HashPolicy_Cookie envoy_api_v2_route_RouteAction_HashPolicy_Cookie; -typedef struct envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties; -typedef struct envoy_api_v2_route_RouteAction_UpgradeConfig envoy_api_v2_route_RouteAction_UpgradeConfig; -typedef struct envoy_api_v2_route_RetryPolicy envoy_api_v2_route_RetryPolicy; -typedef struct envoy_api_v2_route_RetryPolicy_RetryPriority envoy_api_v2_route_RetryPolicy_RetryPriority; -typedef struct envoy_api_v2_route_RetryPolicy_RetryHostPredicate envoy_api_v2_route_RetryPolicy_RetryHostPredicate; -typedef struct envoy_api_v2_route_RetryPolicy_RetryBackOff envoy_api_v2_route_RetryPolicy_RetryBackOff; -typedef struct envoy_api_v2_route_HedgePolicy envoy_api_v2_route_HedgePolicy; -typedef struct envoy_api_v2_route_RedirectAction envoy_api_v2_route_RedirectAction; -typedef struct envoy_api_v2_route_DirectResponseAction envoy_api_v2_route_DirectResponseAction; -typedef struct envoy_api_v2_route_Decorator envoy_api_v2_route_Decorator; -typedef struct envoy_api_v2_route_Tracing envoy_api_v2_route_Tracing; -typedef struct envoy_api_v2_route_VirtualCluster envoy_api_v2_route_VirtualCluster; -typedef struct envoy_api_v2_route_RateLimit envoy_api_v2_route_RateLimit; -typedef struct envoy_api_v2_route_RateLimit_Action envoy_api_v2_route_RateLimit_Action; -typedef struct envoy_api_v2_route_RateLimit_Action_SourceCluster envoy_api_v2_route_RateLimit_Action_SourceCluster; -typedef struct envoy_api_v2_route_RateLimit_Action_DestinationCluster envoy_api_v2_route_RateLimit_Action_DestinationCluster; -typedef struct envoy_api_v2_route_RateLimit_Action_RequestHeaders envoy_api_v2_route_RateLimit_Action_RequestHeaders; -typedef struct envoy_api_v2_route_RateLimit_Action_RemoteAddress envoy_api_v2_route_RateLimit_Action_RemoteAddress; -typedef struct envoy_api_v2_route_RateLimit_Action_GenericKey envoy_api_v2_route_RateLimit_Action_GenericKey; -typedef struct envoy_api_v2_route_RateLimit_Action_HeaderValueMatch envoy_api_v2_route_RateLimit_Action_HeaderValueMatch; -typedef struct envoy_api_v2_route_HeaderMatcher envoy_api_v2_route_HeaderMatcher; -typedef struct envoy_api_v2_route_QueryParameterMatcher envoy_api_v2_route_QueryParameterMatcher; -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_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_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_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; -struct envoy_api_v2_core_DataSource; -struct envoy_api_v2_core_HeaderValueOption; -struct envoy_api_v2_core_Metadata; -struct envoy_api_v2_core_RuntimeFractionalPercent; -struct envoy_type_FractionalPercent; -struct envoy_type_Int64Range; -struct envoy_type_matcher_RegexMatcher; -struct envoy_type_matcher_StringMatcher; -struct google_protobuf_Any; -struct google_protobuf_BoolValue; -struct google_protobuf_Duration; -struct google_protobuf_Struct; -struct google_protobuf_UInt32Value; -extern const upb_msglayout envoy_api_v2_core_DataSource_msginit; -extern const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit; -extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; -extern const upb_msglayout envoy_api_v2_core_RuntimeFractionalPercent_msginit; -extern const upb_msglayout envoy_type_FractionalPercent_msginit; -extern const upb_msglayout envoy_type_Int64Range_msginit; -extern const upb_msglayout envoy_type_matcher_RegexMatcher_msginit; -extern const upb_msglayout envoy_type_matcher_StringMatcher_msginit; -extern const upb_msglayout google_protobuf_Any_msginit; -extern const upb_msglayout google_protobuf_BoolValue_msginit; -extern const upb_msglayout google_protobuf_Duration_msginit; -extern const upb_msglayout google_protobuf_Struct_msginit; -extern const upb_msglayout google_protobuf_UInt32Value_msginit; - -typedef enum { - envoy_api_v2_route_RedirectAction_MOVED_PERMANENTLY = 0, - envoy_api_v2_route_RedirectAction_FOUND = 1, - envoy_api_v2_route_RedirectAction_SEE_OTHER = 2, - envoy_api_v2_route_RedirectAction_TEMPORARY_REDIRECT = 3, - envoy_api_v2_route_RedirectAction_PERMANENT_REDIRECT = 4 -} envoy_api_v2_route_RedirectAction_RedirectResponseCode; - -typedef enum { - envoy_api_v2_route_RouteAction_SERVICE_UNAVAILABLE = 0, - envoy_api_v2_route_RouteAction_NOT_FOUND = 1 -} envoy_api_v2_route_RouteAction_ClusterNotFoundResponseCode; - -typedef enum { - envoy_api_v2_route_RouteAction_PASS_THROUGH_INTERNAL_REDIRECT = 0, - envoy_api_v2_route_RouteAction_HANDLE_INTERNAL_REDIRECT = 1 -} envoy_api_v2_route_RouteAction_InternalRedirectAction; - -typedef enum { - envoy_api_v2_route_VirtualHost_NONE = 0, - envoy_api_v2_route_VirtualHost_EXTERNAL_ONLY = 1, - envoy_api_v2_route_VirtualHost_ALL = 2 -} envoy_api_v2_route_VirtualHost_TlsRequirementType; - - -/* 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); -} -UPB_INLINE envoy_api_v2_route_VirtualHost *envoy_api_v2_route_VirtualHost_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_VirtualHost *ret = envoy_api_v2_route_VirtualHost_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_VirtualHost_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_VirtualHost_serialize(const envoy_api_v2_route_VirtualHost *msg, upb_arena *arena, size_t *len) { - 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 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(32, 56), len); } -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(36, 64), 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 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(40, 72), len); } -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(44, 80), len); } -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(48, 88), 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 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 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 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 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_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(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); -} -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); -} -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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(36, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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(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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(40, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE envoy_api_v2_route_RateLimit** envoy_api_v2_route_VirtualHost_mutable_rate_limits(envoy_api_v2_route_VirtualHost *msg, size_t *len) { - 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); -} -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); - 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 struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_VirtualHost_mutable_request_headers_to_add(envoy_api_v2_route_VirtualHost *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(48, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_VirtualHost_set_cors(msg, sub); - } - return sub; -} -UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_VirtualHost_mutable_response_headers_to_add(envoy_api_v2_route_VirtualHost *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(52, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE upb_strview* envoy_api_v2_route_VirtualHost_mutable_response_headers_to_remove(envoy_api_v2_route_VirtualHost *msg, size_t *len) { - 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); -} -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; -} -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); -} -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); -} -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_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); - if (!sub) return NULL; - envoy_api_v2_route_VirtualHost_set_retry_policy(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_VirtualHost_set_hedge_policy(msg, sub); - } - return sub; -} - -/* 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 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 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; -} - -/* 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 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 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_Route *envoy_api_v2_route_Route_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_Route *ret = envoy_api_v2_route_Route_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_Route_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_Route_serialize(const envoy_api_v2_route_Route *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_Route_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_route_Route_action_route = 2, - envoy_api_v2_route_Route_action_redirect = 3, - envoy_api_v2_route_Route_action_direct_response = 7, - 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(52, 104)); } - -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_route(const envoy_api_v2_route_Route *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(52, 104), 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(48, 96), UPB_SIZE(52, 104), 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(52, 104), 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(48, 96), UPB_SIZE(52, 104), 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_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 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 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 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_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); - if (!sub) return NULL; - envoy_api_v2_route_Route_set_match(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_Route_set_route(envoy_api_v2_route_Route *msg, envoy_api_v2_route_RouteAction* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RouteAction*, UPB_SIZE(48, 96), value, UPB_SIZE(52, 104), 2); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_Route_set_route(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_Route_set_redirect(envoy_api_v2_route_Route *msg, envoy_api_v2_route_RedirectAction* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RedirectAction*, UPB_SIZE(48, 96), value, UPB_SIZE(52, 104), 3); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_Route_set_redirect(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_Route_set_metadata(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_Route_set_decorator(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_Route_set_direct_response(envoy_api_v2_route_Route *msg, envoy_api_v2_route_DirectResponseAction* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_DirectResponseAction*, UPB_SIZE(48, 96), value, UPB_SIZE(52, 104), 7); -} -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); - 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 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); -} -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); - 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; -} -UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_Route_mutable_response_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(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); -} -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); - 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; -} -UPB_INLINE upb_strview* envoy_api_v2_route_Route_mutable_response_headers_to_remove(envoy_api_v2_route_Route *msg, size_t *len) { - 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); -} -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); -} -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); -} -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; -} -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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_Route_set_tracing(msg, sub); - } - return sub; -} - -/* 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 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 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; -} - -/* 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 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 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_WeightedCluster *envoy_api_v2_route_WeightedCluster_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_WeightedCluster *ret = envoy_api_v2_route_WeightedCluster_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_WeightedCluster_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_WeightedCluster_serialize(const envoy_api_v2_route_WeightedCluster *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_WeightedCluster_msginit, arena, len); -} - -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 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); -} -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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_WeightedCluster_set_total_weight(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight *envoy_api_v2_route_WeightedCluster_ClusterWeight_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_WeightedCluster_ClusterWeight *ret = envoy_api_v2_route_WeightedCluster_ClusterWeight_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_WeightedCluster_ClusterWeight_serialize(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_arena *arena, size_t *len) { - 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 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 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 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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_WeightedCluster_ClusterWeight_set_weight(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_WeightedCluster_ClusterWeight_set_metadata_match(msg, sub); - } - return sub; -} -UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_request_headers_to_add(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { - 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); -} -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); - 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 struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_response_headers_to_add(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { - 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); -} -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); - 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; -} -UPB_INLINE upb_strview* envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_response_headers_to_remove(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { - 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); -} -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; -} -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); -} -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; -} - -/* 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 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 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; -} - -/* 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 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 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RouteMatch *envoy_api_v2_route_RouteMatch_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RouteMatch *ret = envoy_api_v2_route_RouteMatch_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteMatch_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RouteMatch_serialize(const envoy_api_v2_route_RouteMatch *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_RouteMatch_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_route_RouteMatch_path_specifier_prefix = 1, - envoy_api_v2_route_RouteMatch_path_specifier_path = 2, - envoy_api_v2_route_RouteMatch_path_specifier_regex = 3, - 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(28, 56)); } - -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(28, 56), 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(20, 40), UPB_SIZE(28, 56), 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(28, 56), 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(20, 40), UPB_SIZE(28, 56), 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(28, 56), 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(20, 40), UPB_SIZE(28, 56), 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 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(12, 24), len); } -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(16, 32), 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_safe_regex(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(28, 56), 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(20, 40), UPB_SIZE(28, 56), 10, NULL); } - -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(20, 40), value, UPB_SIZE(28, 56), 1); -} -UPB_INLINE void envoy_api_v2_route_RouteMatch_set_path(envoy_api_v2_route_RouteMatch *msg, upb_strview value) { - UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(20, 40), value, UPB_SIZE(28, 56), 2); -} -UPB_INLINE void envoy_api_v2_route_RouteMatch_set_regex(envoy_api_v2_route_RouteMatch *msg, upb_strview value) { - UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(20, 40), value, UPB_SIZE(28, 56), 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteMatch_set_case_sensitive(msg, sub); - } - return sub; -} -UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RouteMatch_mutable_headers(envoy_api_v2_route_RouteMatch *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE envoy_api_v2_route_QueryParameterMatcher** envoy_api_v2_route_RouteMatch_mutable_query_parameters(envoy_api_v2_route_RouteMatch *msg, size_t *len) { - 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); -} -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); - 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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteMatch_set_grpc(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteMatch_set_runtime_fraction(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_RouteMatch_set_safe_regex(envoy_api_v2_route_RouteMatch *msg, struct envoy_type_matcher_RegexMatcher* value) { - UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(20, 40), value, UPB_SIZE(28, 56), 10); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RouteMatch_set_safe_regex(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions *envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions *ret = envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_serialize(const envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit, arena, len); -} - - - -/* 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); -} -UPB_INLINE envoy_api_v2_route_CorsPolicy *envoy_api_v2_route_CorsPolicy_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_CorsPolicy *ret = envoy_api_v2_route_CorsPolicy_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_CorsPolicy_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_CorsPolicy_serialize(const envoy_api_v2_route_CorsPolicy *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_CorsPolicy_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_route_CorsPolicy_enabled_specifier_enabled = 7, - 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 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 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 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) { - 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); -} -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); -} -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_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_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_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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_CorsPolicy_set_allow_credentials(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_enabled(envoy_api_v2_route_CorsPolicy *msg, struct google_protobuf_BoolValue* value) { - UPB_WRITE_ONEOF(msg, struct google_protobuf_BoolValue*, UPB_SIZE(52, 104), value, UPB_SIZE(56, 112), 7); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_CorsPolicy_set_enabled(msg, sub); - } - return sub; -} -UPB_INLINE upb_strview* envoy_api_v2_route_CorsPolicy_mutable_allow_origin_regex(envoy_api_v2_route_CorsPolicy *msg, size_t *len) { - 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); -} -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); -} -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); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_CorsPolicy_set_filter_enabled(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_CorsPolicy_set_shadow_enabled(msg, sub); - } - return sub; -} -UPB_INLINE struct envoy_type_matcher_StringMatcher** envoy_api_v2_route_CorsPolicy_mutable_allow_origin_string_match(envoy_api_v2_route_CorsPolicy *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(48, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RouteAction *envoy_api_v2_route_RouteAction_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RouteAction *ret = envoy_api_v2_route_RouteAction_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RouteAction_serialize(const envoy_api_v2_route_RouteAction *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_RouteAction_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_route_RouteAction_cluster_specifier_cluster = 1, - envoy_api_v2_route_RouteAction_cluster_specifier_cluster_header = 2, - 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(92, 160)); } - -typedef enum { - envoy_api_v2_route_RouteAction_host_rewrite_specifier_host_rewrite = 6, - envoy_api_v2_route_RouteAction_host_rewrite_specifier_auto_host_rewrite = 7, - 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(104, 184)); } - -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(92, 160), 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(84, 144), UPB_SIZE(92, 160), 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(92, 160), 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(84, 144), UPB_SIZE(92, 160), 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(92, 160), 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(84, 144), UPB_SIZE(92, 160), 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_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(104, 184), 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(96, 168), UPB_SIZE(104, 184), 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(104, 184), 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(96, 168), UPB_SIZE(104, 184), 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 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(72, 120), 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 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(76, 128), 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 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(80, 136), 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 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(104, 184), 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(96, 168), UPB_SIZE(104, 184), 29, upb_strview_make("", strlen(""))); } - -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(84, 144), value, UPB_SIZE(92, 160), 1); -} -UPB_INLINE void envoy_api_v2_route_RouteAction_set_cluster_header(envoy_api_v2_route_RouteAction *msg, upb_strview value) { - UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(84, 144), value, UPB_SIZE(92, 160), 2); -} -UPB_INLINE void envoy_api_v2_route_RouteAction_set_weighted_clusters(envoy_api_v2_route_RouteAction *msg, envoy_api_v2_route_WeightedCluster* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_WeightedCluster*, UPB_SIZE(84, 144), value, UPB_SIZE(92, 160), 3); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_weighted_clusters(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_metadata_match(msg, sub); - } - 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_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(96, 168), value, UPB_SIZE(104, 184), 6); -} -UPB_INLINE void envoy_api_v2_route_RouteAction_set_auto_host_rewrite(envoy_api_v2_route_RouteAction *msg, struct google_protobuf_BoolValue* value) { - UPB_WRITE_ONEOF(msg, struct google_protobuf_BoolValue*, UPB_SIZE(96, 168), value, UPB_SIZE(104, 184), 7); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_auto_host_rewrite(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_timeout(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_retry_policy(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_request_mirror_policy(msg, sub); - } - 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_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(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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(72, 120), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_include_vh_rate_limits(msg, sub); - } - return sub; -} -UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy** envoy_api_v2_route_RouteAction_mutable_hash_policy(envoy_api_v2_route_RouteAction *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(76, 128), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_cors(msg, sub); - } - 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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_max_grpc_timeout(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_idle_timeout(msg, sub); - } - return sub; -} -UPB_INLINE envoy_api_v2_route_RouteAction_UpgradeConfig** envoy_api_v2_route_RouteAction_mutable_upgrade_configs(envoy_api_v2_route_RouteAction *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(80, 136), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_hedge_policy(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_set_grpc_timeout_offset(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_RouteAction_set_auto_host_rewrite_header(envoy_api_v2_route_RouteAction *msg, upb_strview value) { - UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(96, 168), value, UPB_SIZE(104, 184), 29); -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RouteAction_RequestMirrorPolicy *envoy_api_v2_route_RouteAction_RequestMirrorPolicy_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RouteAction_RequestMirrorPolicy *ret = envoy_api_v2_route_RouteAction_RequestMirrorPolicy_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RouteAction_RequestMirrorPolicy_serialize(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg, upb_arena *arena, size_t *len) { - 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 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_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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_RequestMirrorPolicy_set_runtime_fraction(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy *envoy_api_v2_route_RouteAction_HashPolicy_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RouteAction_HashPolicy *ret = envoy_api_v2_route_RouteAction_HashPolicy_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_HashPolicy_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_serialize(const envoy_api_v2_route_RouteAction_HashPolicy *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_RouteAction_HashPolicy_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_header = 1, - envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_cookie = 2, - envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_connection_properties = 3, - 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 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); } -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 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 void envoy_api_v2_route_RouteAction_HashPolicy_set_header(envoy_api_v2_route_RouteAction_HashPolicy *msg, envoy_api_v2_route_RouteAction_HashPolicy_Header* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RouteAction_HashPolicy_Header*, UPB_SIZE(4, 8), value, UPB_SIZE(8, 16), 1); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_HashPolicy_set_header(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_set_cookie(envoy_api_v2_route_RouteAction_HashPolicy *msg, envoy_api_v2_route_RouteAction_HashPolicy_Cookie* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RouteAction_HashPolicy_Cookie*, UPB_SIZE(4, 8), value, UPB_SIZE(8, 16), 2); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_HashPolicy_set_cookie(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_set_connection_properties(envoy_api_v2_route_RouteAction_HashPolicy *msg, envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties*, UPB_SIZE(4, 8), value, UPB_SIZE(8, 16), 3); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_HashPolicy_set_connection_properties(msg, sub); - } - 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; -} - -/* 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); -} -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) { - envoy_api_v2_route_RouteAction_HashPolicy_Header *ret = envoy_api_v2_route_RouteAction_HashPolicy_Header_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_Header_serialize(const envoy_api_v2_route_RouteAction_HashPolicy_Header *msg, upb_arena *arena, size_t *len) { - 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 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; -} - -/* 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); -} -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) { - envoy_api_v2_route_RouteAction_HashPolicy_Cookie *ret = envoy_api_v2_route_RouteAction_HashPolicy_Cookie_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_Cookie_serialize(const envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg, upb_arena *arena, size_t *len) { - 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 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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_HashPolicy_Cookie_set_ttl(msg, sub); - } - 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; -} - -/* 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); -} -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) { - envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties *ret = envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_serialize(const envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties *msg, upb_arena *arena, size_t *len) { - 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 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RouteAction_UpgradeConfig *envoy_api_v2_route_RouteAction_UpgradeConfig_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RouteAction_UpgradeConfig *ret = envoy_api_v2_route_RouteAction_UpgradeConfig_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_UpgradeConfig_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RouteAction_UpgradeConfig_serialize(const envoy_api_v2_route_RouteAction_UpgradeConfig *msg, upb_arena *arena, size_t *len) { - 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 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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_RouteAction_UpgradeConfig_set_enabled(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RetryPolicy *envoy_api_v2_route_RetryPolicy_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RetryPolicy *ret = envoy_api_v2_route_RetryPolicy_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RetryPolicy_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RetryPolicy_serialize(const envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena, size_t *len) { - 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 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 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 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 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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_RetryPolicy_set_num_retries(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RetryPolicy_set_per_try_timeout(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RetryPolicy_set_retry_priority(msg, sub); - } - return sub; -} -UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryHostPredicate** envoy_api_v2_route_RetryPolicy_mutable_retry_host_predicate(envoy_api_v2_route_RetryPolicy *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(32, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - 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_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); -} -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); -} -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); -} -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_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); - if (!sub) return NULL; - envoy_api_v2_route_RetryPolicy_set_retry_back_off(msg, sub); - } - return sub; -} -UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RetryPolicy_mutable_retriable_headers(envoy_api_v2_route_RetryPolicy *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(40, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RetryPolicy_mutable_retriable_request_headers(envoy_api_v2_route_RetryPolicy *msg, size_t *len) { - 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); -} -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); - 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryPriority *envoy_api_v2_route_RetryPolicy_RetryPriority_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RetryPolicy_RetryPriority *ret = envoy_api_v2_route_RetryPolicy_RetryPriority_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RetryPolicy_RetryPriority_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RetryPolicy_RetryPriority_serialize(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_RetryPolicy_RetryPriority_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_config = 2, - 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 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 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_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); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RetryPolicy_RetryPriority_set_config(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryPriority_set_typed_config(envoy_api_v2_route_RetryPolicy_RetryPriority *msg, struct google_protobuf_Any* value) { - UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RetryPolicy_RetryPriority_set_typed_config(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryHostPredicate *envoy_api_v2_route_RetryPolicy_RetryHostPredicate_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RetryPolicy_RetryHostPredicate *ret = envoy_api_v2_route_RetryPolicy_RetryHostPredicate_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RetryPolicy_RetryHostPredicate_serialize(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_config = 2, - 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 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 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_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); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_config(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_typed_config(envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg, struct google_protobuf_Any* value) { - UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_typed_config(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryBackOff *envoy_api_v2_route_RetryPolicy_RetryBackOff_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RetryPolicy_RetryBackOff *ret = envoy_api_v2_route_RetryPolicy_RetryBackOff_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RetryPolicy_RetryBackOff_serialize(const envoy_api_v2_route_RetryPolicy_RetryBackOff *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RetryPolicy_RetryBackOff_set_base_interval(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RetryPolicy_RetryBackOff_set_max_interval(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_HedgePolicy *envoy_api_v2_route_HedgePolicy_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_HedgePolicy *ret = envoy_api_v2_route_HedgePolicy_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_HedgePolicy_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_HedgePolicy_serialize(const envoy_api_v2_route_HedgePolicy *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_route_HedgePolicy_set_initial_requests(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_HedgePolicy_set_additional_request_chance(msg, sub); - } - 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RedirectAction *envoy_api_v2_route_RedirectAction_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RedirectAction *ret = envoy_api_v2_route_RedirectAction_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RedirectAction_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RedirectAction_serialize(const envoy_api_v2_route_RedirectAction *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_RedirectAction_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_route_RedirectAction_scheme_rewrite_specifier_https_redirect = 4, - 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)); } - -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 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 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 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_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 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_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_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); -} -UPB_INLINE void envoy_api_v2_route_RedirectAction_set_prefix_rewrite(envoy_api_v2_route_RedirectAction *msg, upb_strview value) { - 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_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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_DirectResponseAction *envoy_api_v2_route_DirectResponseAction_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_DirectResponseAction *ret = envoy_api_v2_route_DirectResponseAction_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_DirectResponseAction_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_DirectResponseAction_serialize(const envoy_api_v2_route_DirectResponseAction *msg, upb_arena *arena, size_t *len) { - 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 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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_DirectResponseAction_set_body(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_Decorator *envoy_api_v2_route_Decorator_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_Decorator *ret = envoy_api_v2_route_Decorator_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_Decorator_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_Decorator_serialize(const envoy_api_v2_route_Decorator *msg, upb_arena *arena, size_t *len) { - 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 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_Tracing *envoy_api_v2_route_Tracing_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_Tracing *ret = envoy_api_v2_route_Tracing_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_Tracing_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_Tracing_serialize(const envoy_api_v2_route_Tracing *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_route_Tracing_set_client_sampling(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_Tracing_set_random_sampling(msg, sub); - } - 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_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); - if (!sub) return NULL; - envoy_api_v2_route_Tracing_set_overall_sampling(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_VirtualCluster *envoy_api_v2_route_VirtualCluster_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_VirtualCluster *ret = envoy_api_v2_route_VirtualCluster_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_VirtualCluster_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_VirtualCluster_serialize(const envoy_api_v2_route_VirtualCluster *msg, upb_arena *arena, size_t *len) { - 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 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_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_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_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); -} -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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(24, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RateLimit *envoy_api_v2_route_RateLimit_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RateLimit *ret = envoy_api_v2_route_RateLimit_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RateLimit_serialize(const envoy_api_v2_route_RateLimit *msg, upb_arena *arena, size_t *len) { - 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 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_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); - if (!sub) return NULL; - envoy_api_v2_route_RateLimit_set_stage(msg, sub); - } - 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_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); -} -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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_RateLimit_Action *envoy_api_v2_route_RateLimit_Action_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_RateLimit_Action *ret = envoy_api_v2_route_RateLimit_Action_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_serialize(const envoy_api_v2_route_RateLimit_Action *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_RateLimit_Action_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_route_RateLimit_Action_action_specifier_source_cluster = 1, - envoy_api_v2_route_RateLimit_Action_action_specifier_destination_cluster = 2, - envoy_api_v2_route_RateLimit_Action_action_specifier_request_headers = 3, - envoy_api_v2_route_RateLimit_Action_action_specifier_remote_address = 4, - envoy_api_v2_route_RateLimit_Action_action_specifier_generic_key = 5, - 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 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); } -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 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 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 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 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 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) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_SourceCluster*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RateLimit_Action_set_source_cluster(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_destination_cluster(envoy_api_v2_route_RateLimit_Action *msg, envoy_api_v2_route_RateLimit_Action_DestinationCluster* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_DestinationCluster*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RateLimit_Action_set_destination_cluster(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_request_headers(envoy_api_v2_route_RateLimit_Action *msg, envoy_api_v2_route_RateLimit_Action_RequestHeaders* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_RequestHeaders*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RateLimit_Action_set_request_headers(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_remote_address(envoy_api_v2_route_RateLimit_Action *msg, envoy_api_v2_route_RateLimit_Action_RemoteAddress* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_RemoteAddress*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RateLimit_Action_set_remote_address(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_generic_key(envoy_api_v2_route_RateLimit_Action *msg, envoy_api_v2_route_RateLimit_Action_GenericKey* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_GenericKey*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RateLimit_Action_set_generic_key(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_header_value_match(envoy_api_v2_route_RateLimit_Action *msg, envoy_api_v2_route_RateLimit_Action_HeaderValueMatch* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_HeaderValueMatch*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 6); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_RateLimit_Action_set_header_value_match(msg, sub); - } - return sub; -} - -/* 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); -} -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) { - envoy_api_v2_route_RateLimit_Action_SourceCluster *ret = envoy_api_v2_route_RateLimit_Action_SourceCluster_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_SourceCluster_serialize(const envoy_api_v2_route_RateLimit_Action_SourceCluster *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit, arena, len); -} - - - -/* 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); -} -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) { - envoy_api_v2_route_RateLimit_Action_DestinationCluster *ret = envoy_api_v2_route_RateLimit_Action_DestinationCluster_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_DestinationCluster_serialize(const envoy_api_v2_route_RateLimit_Action_DestinationCluster *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit, arena, len); -} - - - -/* 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); -} -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) { - envoy_api_v2_route_RateLimit_Action_RequestHeaders *ret = envoy_api_v2_route_RateLimit_Action_RequestHeaders_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_RequestHeaders_serialize(const envoy_api_v2_route_RateLimit_Action_RequestHeaders *msg, upb_arena *arena, size_t *len) { - 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 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_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; -} - -/* 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); -} -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) { - envoy_api_v2_route_RateLimit_Action_RemoteAddress *ret = envoy_api_v2_route_RateLimit_Action_RemoteAddress_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_RemoteAddress_serialize(const envoy_api_v2_route_RateLimit_Action_RemoteAddress *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit, arena, len); -} - - - -/* 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); -} -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) { - envoy_api_v2_route_RateLimit_Action_GenericKey *ret = envoy_api_v2_route_RateLimit_Action_GenericKey_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_GenericKey_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_GenericKey_serialize(const envoy_api_v2_route_RateLimit_Action_GenericKey *msg, upb_arena *arena, size_t *len) { - 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 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; -} - -/* 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); -} -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) { - envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *ret = envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_serialize(const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg, upb_arena *arena, size_t *len) { - 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 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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_set_expect_match(msg, sub); - } - return sub; -} -UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_mutable_headers(envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg, size_t *len) { - 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); -} -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); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_HeaderMatcher *envoy_api_v2_route_HeaderMatcher_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_HeaderMatcher *ret = envoy_api_v2_route_HeaderMatcher_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_HeaderMatcher_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_HeaderMatcher_serialize(const envoy_api_v2_route_HeaderMatcher *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_HeaderMatcher_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_route_HeaderMatcher_header_match_specifier_exact_match = 4, - envoy_api_v2_route_HeaderMatcher_header_match_specifier_regex_match = 5, - envoy_api_v2_route_HeaderMatcher_header_match_specifier_safe_regex_match = 11, - envoy_api_v2_route_HeaderMatcher_header_match_specifier_range_match = 6, - envoy_api_v2_route_HeaderMatcher_header_match_specifier_present_match = 7, - envoy_api_v2_route_HeaderMatcher_header_match_specifier_prefix_match = 9, - 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 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 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); } -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 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_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); } -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 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_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); -} -UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_regex_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), 5); -} -UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_range_match(envoy_api_v2_route_HeaderMatcher *msg, struct envoy_type_Int64Range* value) { - UPB_WRITE_ONEOF(msg, struct envoy_type_Int64Range*, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 6); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_HeaderMatcher_set_range_match(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_present_match(envoy_api_v2_route_HeaderMatcher *msg, bool value) { - 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_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); -} -UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_suffix_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), 10); -} -UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_safe_regex_match(envoy_api_v2_route_HeaderMatcher *msg, struct envoy_type_matcher_RegexMatcher* value) { - UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 11); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_HeaderMatcher_set_safe_regex_match(msg, sub); - } - return sub; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_route_QueryParameterMatcher *envoy_api_v2_route_QueryParameterMatcher_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_QueryParameterMatcher *ret = envoy_api_v2_route_QueryParameterMatcher_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_QueryParameterMatcher_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_QueryParameterMatcher_serialize(const envoy_api_v2_route_QueryParameterMatcher *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_QueryParameterMatcher_msginit, arena, len); -} - -typedef enum { - envoy_api_v2_route_QueryParameterMatcher_query_parameter_match_specifier_string_match = 5, - 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 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 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_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_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_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); - if (!sub) return NULL; - envoy_api_v2_route_QueryParameterMatcher_set_regex(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_QueryParameterMatcher_set_string_match(envoy_api_v2_route_QueryParameterMatcher *msg, struct envoy_type_matcher_StringMatcher* value) { - UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_StringMatcher*, UPB_SIZE(20, 40), value, UPB_SIZE(24, 48), 5); -} -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); - if (!sub) return NULL; - envoy_api_v2_route_QueryParameterMatcher_set_string_match(msg, sub); - } - return sub; -} -UPB_INLINE void envoy_api_v2_route_QueryParameterMatcher_set_present_match(envoy_api_v2_route_QueryParameterMatcher *msg, bool value) { - UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(20, 40), value, UPB_SIZE(24, 48), 6); -} #ifdef __cplusplus } /* extern "C" */ 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 new file mode 100644 index 00000000000..7c56852726a --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c @@ -0,0 +1,793 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/api/v2/route/route_components.upb.h" +#include "envoy/api/v2/core/base.upb.h" +#include "envoy/type/matcher/regex.upb.h" +#include "envoy/type/matcher/string.upb.h" +#include "envoy/type/percent.upb.h" +#include "envoy/type/range.upb.h" +#include "envoy/type/tracing/v2/custom_tag.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 "envoy/annotations/deprecation.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_route_VirtualHost_submsgs[11] = { + &envoy_api_v2_core_HeaderValueOption_msginit, + &envoy_api_v2_route_CorsPolicy_msginit, + &envoy_api_v2_route_HedgePolicy_msginit, + &envoy_api_v2_route_RateLimit_msginit, + &envoy_api_v2_route_RetryPolicy_msginit, + &envoy_api_v2_route_Route_msginit, + &envoy_api_v2_route_VirtualCluster_msginit, + &envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit, + &envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_VirtualHost__fields[17] = { + {1, UPB_SIZE(12, 16), 0, 0, 9, 1}, + {2, UPB_SIZE(36, 64), 0, 0, 9, 3}, + {3, UPB_SIZE(40, 72), 0, 5, 11, 3}, + {4, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {5, UPB_SIZE(44, 80), 0, 6, 11, 3}, + {6, UPB_SIZE(48, 88), 0, 3, 11, 3}, + {7, UPB_SIZE(52, 96), 0, 0, 11, 3}, + {8, UPB_SIZE(20, 32), 0, 1, 11, 1}, + {10, UPB_SIZE(56, 104), 0, 0, 11, 3}, + {11, UPB_SIZE(60, 112), 0, 0, 9, 3}, + {12, UPB_SIZE(64, 120), 0, 7, 11, 3}, + {13, UPB_SIZE(68, 128), 0, 0, 9, 3}, + {14, UPB_SIZE(8, 8), 0, 0, 8, 1}, + {15, UPB_SIZE(72, 136), 0, 8, 11, 3}, + {16, UPB_SIZE(24, 40), 0, 4, 11, 1}, + {17, UPB_SIZE(28, 48), 0, 2, 11, 1}, + {18, UPB_SIZE(32, 56), 0, 9, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_VirtualHost_msginit = { + &envoy_api_v2_route_VirtualHost_submsgs[0], + &envoy_api_v2_route_VirtualHost__fields[0], + UPB_SIZE(80, 144), 17, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_submsgs[1] = { + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_VirtualHost_PerFilterConfigEntry__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit = { + &envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_submsgs[0], + &envoy_api_v2_route_VirtualHost_PerFilterConfigEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_submsgs[1] = { + &google_protobuf_Any_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit = { + &envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_submsgs[0], + &envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_FilterAction_submsgs[1] = { + &google_protobuf_Any_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_FilterAction__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_FilterAction_msginit = { + &envoy_api_v2_route_FilterAction_submsgs[0], + &envoy_api_v2_route_FilterAction__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_Route_submsgs[13] = { + &envoy_api_v2_core_HeaderValueOption_msginit, + &envoy_api_v2_core_Metadata_msginit, + &envoy_api_v2_route_Decorator_msginit, + &envoy_api_v2_route_DirectResponseAction_msginit, + &envoy_api_v2_route_FilterAction_msginit, + &envoy_api_v2_route_RedirectAction_msginit, + &envoy_api_v2_route_Route_PerFilterConfigEntry_msginit, + &envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit, + &envoy_api_v2_route_RouteAction_msginit, + &envoy_api_v2_route_RouteMatch_msginit, + &envoy_api_v2_route_Tracing_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +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}, + {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, 3}, + {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, 3}, + {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}, +}; + +const upb_msglayout envoy_api_v2_route_Route_msginit = { + &envoy_api_v2_route_Route_submsgs[0], + &envoy_api_v2_route_Route__fields[0], + UPB_SIZE(64, 128), 16, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_Route_PerFilterConfigEntry_submsgs[1] = { + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_Route_PerFilterConfigEntry__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_Route_PerFilterConfigEntry_msginit = { + &envoy_api_v2_route_Route_PerFilterConfigEntry_submsgs[0], + &envoy_api_v2_route_Route_PerFilterConfigEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_Route_TypedPerFilterConfigEntry_submsgs[1] = { + &google_protobuf_Any_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_Route_TypedPerFilterConfigEntry__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit = { + &envoy_api_v2_route_Route_TypedPerFilterConfigEntry_submsgs[0], + &envoy_api_v2_route_Route_TypedPerFilterConfigEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_submsgs[2] = { + &envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_WeightedCluster__fields[3] = { + {1, UPB_SIZE(12, 24), 0, 0, 11, 3}, + {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {3, UPB_SIZE(8, 16), 0, 1, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_WeightedCluster_msginit = { + &envoy_api_v2_route_WeightedCluster_submsgs[0], + &envoy_api_v2_route_WeightedCluster__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_ClusterWeight_submsgs[6] = { + &envoy_api_v2_core_HeaderValueOption_msginit, + &envoy_api_v2_core_Metadata_msginit, + &envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit, + &envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_WeightedCluster_ClusterWeight__fields[9] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 4, 11, 1}, + {3, UPB_SIZE(12, 24), 0, 1, 11, 1}, + {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}, + {9, UPB_SIZE(32, 64), 0, 0, 9, 3}, + {10, UPB_SIZE(36, 72), 0, 3, 11, 3}, +}; + +const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit = { + &envoy_api_v2_route_WeightedCluster_ClusterWeight_submsgs[0], + &envoy_api_v2_route_WeightedCluster_ClusterWeight__fields[0], + UPB_SIZE(40, 80), 9, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_submsgs[1] = { + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit = { + &envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_submsgs[0], + &envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_submsgs[1] = { + &google_protobuf_Any_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit = { + &envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_submsgs[0], + &envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RouteMatch_submsgs[7] = { + &envoy_api_v2_core_RuntimeFractionalPercent_msginit, + &envoy_api_v2_route_HeaderMatcher_msginit, + &envoy_api_v2_route_QueryParameterMatcher_msginit, + &envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit, + &envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_msginit, + &envoy_type_matcher_RegexMatcher_msginit, + &google_protobuf_BoolValue_msginit, +}; + +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}, + {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}, + {11, UPB_SIZE(12, 24), 0, 4, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RouteMatch_msginit = { + &envoy_api_v2_route_RouteMatch_submsgs[0], + &envoy_api_v2_route_RouteMatch__fields[0], + UPB_SIZE(40, 80), 10, false, +}; + +const upb_msglayout envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_submsgs[2] = { + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_RouteMatch_TlsContextMatchOptions__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_msginit = { + &envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_submsgs[0], + &envoy_api_v2_route_RouteMatch_TlsContextMatchOptions__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_CorsPolicy_submsgs[5] = { + &envoy_api_v2_core_RuntimeFractionalPercent_msginit, + &envoy_type_matcher_StringMatcher_msginit, + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_CorsPolicy__fields[11] = { + {1, UPB_SIZE(40, 80), 0, 0, 9, 3}, + {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {3, UPB_SIZE(8, 16), 0, 0, 9, 1}, + {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}, + {8, UPB_SIZE(44, 88), 0, 0, 9, 3}, + {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}, +}; + +const upb_msglayout envoy_api_v2_route_CorsPolicy_msginit = { + &envoy_api_v2_route_CorsPolicy_submsgs[0], + &envoy_api_v2_route_CorsPolicy__fields[0], + UPB_SIZE(64, 128), 11, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RouteAction_submsgs[17] = { + &envoy_api_v2_core_Metadata_msginit, + &envoy_api_v2_route_CorsPolicy_msginit, + &envoy_api_v2_route_HedgePolicy_msginit, + &envoy_api_v2_route_RateLimit_msginit, + &envoy_api_v2_route_RetryPolicy_msginit, + &envoy_api_v2_route_RouteAction_HashPolicy_msginit, + &envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit, + &envoy_api_v2_route_RouteAction_UpgradeConfig_msginit, + &envoy_api_v2_route_WeightedCluster_msginit, + &google_protobuf_BoolValue_msginit, + &google_protobuf_Duration_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_RouteAction__fields[25] = { + {1, UPB_SIZE(92, 160), UPB_SIZE(-101, -177), 0, 9, 1}, + {2, UPB_SIZE(92, 160), UPB_SIZE(-101, -177), 0, 9, 1}, + {3, UPB_SIZE(92, 160), UPB_SIZE(-101, -177), 8, 11, 1}, + {4, UPB_SIZE(32, 40), 0, 0, 11, 1}, + {5, UPB_SIZE(24, 24), 0, 0, 9, 1}, + {6, UPB_SIZE(104, 184), UPB_SIZE(-113, -201), 0, 9, 1}, + {7, UPB_SIZE(104, 184), UPB_SIZE(-113, -201), 9, 11, 1}, + {8, UPB_SIZE(36, 48), 0, 10, 11, 1}, + {9, UPB_SIZE(40, 56), 0, 4, 11, 1}, + {10, UPB_SIZE(44, 64), 0, 6, 11, 1}, + {11, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {13, UPB_SIZE(76, 128), 0, 3, 11, 3}, + {14, UPB_SIZE(48, 72), 0, 9, 11, 1}, + {15, UPB_SIZE(80, 136), 0, 5, 11, 3}, + {17, UPB_SIZE(52, 80), 0, 1, 11, 1}, + {20, UPB_SIZE(8, 8), 0, 0, 14, 1}, + {23, UPB_SIZE(56, 88), 0, 10, 11, 1}, + {24, UPB_SIZE(60, 96), 0, 10, 11, 1}, + {25, UPB_SIZE(84, 144), 0, 7, 11, 3}, + {26, UPB_SIZE(16, 16), 0, 0, 14, 1}, + {27, UPB_SIZE(64, 104), 0, 2, 11, 1}, + {28, UPB_SIZE(68, 112), 0, 10, 11, 1}, + {29, UPB_SIZE(104, 184), UPB_SIZE(-113, -201), 0, 9, 1}, + {30, UPB_SIZE(88, 152), 0, 6, 11, 3}, + {31, UPB_SIZE(72, 120), 0, 11, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RouteAction_msginit = { + &envoy_api_v2_route_RouteAction_submsgs[0], + &envoy_api_v2_route_RouteAction__fields[0], + UPB_SIZE(120, 208), 25, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RouteAction_RequestMirrorPolicy_submsgs[1] = { + &envoy_api_v2_core_RuntimeFractionalPercent_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_RouteAction_RequestMirrorPolicy__fields[3] = { + {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, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit = { + &envoy_api_v2_route_RouteAction_RequestMirrorPolicy_submsgs[0], + &envoy_api_v2_route_RouteAction_RequestMirrorPolicy__fields[0], + UPB_SIZE(24, 48), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RouteAction_HashPolicy_submsgs[4] = { + &envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit, + &envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit, + &envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit, + &envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy__fields[5] = { + {1, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 2, 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(-9, -17), 3, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_msginit = { + &envoy_api_v2_route_RouteAction_HashPolicy_submsgs[0], + &envoy_api_v2_route_RouteAction_HashPolicy__fields[0], + UPB_SIZE(12, 24), 5, false, +}; + +static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy_Header__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit = { + NULL, + &envoy_api_v2_route_RouteAction_HashPolicy_Header__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RouteAction_HashPolicy_Cookie_submsgs[1] = { + &google_protobuf_Duration_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy_Cookie__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(16, 32), 0, 0, 11, 1}, + {3, UPB_SIZE(8, 16), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit = { + &envoy_api_v2_route_RouteAction_HashPolicy_Cookie_submsgs[0], + &envoy_api_v2_route_RouteAction_HashPolicy_Cookie__fields[0], + UPB_SIZE(24, 48), 3, false, +}; + +static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit = { + NULL, + &envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties__fields[0], + UPB_SIZE(1, 1), 1, false, +}; + +static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_msginit = { + NULL, + &envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RouteAction_UpgradeConfig_submsgs[1] = { + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_RouteAction_UpgradeConfig__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RouteAction_UpgradeConfig_msginit = { + &envoy_api_v2_route_RouteAction_UpgradeConfig_submsgs[0], + &envoy_api_v2_route_RouteAction_UpgradeConfig__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_submsgs[7] = { + &envoy_api_v2_route_HeaderMatcher_msginit, + &envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit, + &envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit, + &envoy_api_v2_route_RetryPolicy_RetryPriority_msginit, + &google_protobuf_Duration_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_RetryPolicy__fields[10] = { + {1, UPB_SIZE(8, 8), 0, 0, 9, 1}, + {2, UPB_SIZE(16, 24), 0, 5, 11, 1}, + {3, UPB_SIZE(20, 32), 0, 4, 11, 1}, + {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}, + {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}, +}; + +const upb_msglayout envoy_api_v2_route_RetryPolicy_msginit = { + &envoy_api_v2_route_RetryPolicy_submsgs[0], + &envoy_api_v2_route_RetryPolicy__fields[0], + UPB_SIZE(48, 96), 10, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryPriority_submsgs[2] = { + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +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}, +}; + +const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryPriority_msginit = { + &envoy_api_v2_route_RetryPolicy_RetryPriority_submsgs[0], + &envoy_api_v2_route_RetryPolicy_RetryPriority__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryHostPredicate_submsgs[2] = { + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +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}, +}; + +const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit = { + &envoy_api_v2_route_RetryPolicy_RetryHostPredicate_submsgs[0], + &envoy_api_v2_route_RetryPolicy_RetryHostPredicate__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryBackOff_submsgs[2] = { + &google_protobuf_Duration_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_RetryPolicy_RetryBackOff__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit = { + &envoy_api_v2_route_RetryPolicy_RetryBackOff_submsgs[0], + &envoy_api_v2_route_RetryPolicy_RetryBackOff__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_HedgePolicy_submsgs[2] = { + &envoy_type_FractionalPercent_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_HedgePolicy__fields[3] = { + {1, UPB_SIZE(4, 8), 0, 1, 11, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, + {3, UPB_SIZE(0, 0), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_route_HedgePolicy_msginit = { + &envoy_api_v2_route_HedgePolicy_submsgs[0], + &envoy_api_v2_route_HedgePolicy__fields[0], + UPB_SIZE(12, 24), 3, false, +}; + +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}, + {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}, + {6, UPB_SIZE(12, 12), 0, 0, 8, 1}, + {7, UPB_SIZE(36, 56), UPB_SIZE(-45, -73), 0, 9, 1}, + {8, UPB_SIZE(8, 8), 0, 0, 13, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RedirectAction_msginit = { + NULL, + &envoy_api_v2_route_RedirectAction__fields[0], + UPB_SIZE(48, 80), 8, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_DirectResponseAction_submsgs[1] = { + &envoy_api_v2_core_DataSource_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_DirectResponseAction__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 13, 1}, + {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_DirectResponseAction_msginit = { + &envoy_api_v2_route_DirectResponseAction_submsgs[0], + &envoy_api_v2_route_DirectResponseAction__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_Decorator_submsgs[1] = { + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_Decorator__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_route_Decorator_msginit = { + &envoy_api_v2_route_Decorator_submsgs[0], + &envoy_api_v2_route_Decorator__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_Tracing_submsgs[4] = { + &envoy_type_FractionalPercent_msginit, + &envoy_type_tracing_v2_CustomTag_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_Tracing__fields[4] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, + {3, UPB_SIZE(8, 16), 0, 0, 11, 1}, + {4, UPB_SIZE(12, 24), 0, 1, 11, 3}, +}; + +const upb_msglayout envoy_api_v2_route_Tracing_msginit = { + &envoy_api_v2_route_Tracing_submsgs[0], + &envoy_api_v2_route_Tracing__fields[0], + UPB_SIZE(16, 32), 4, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_VirtualCluster_submsgs[1] = { + &envoy_api_v2_route_HeaderMatcher_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_VirtualCluster__fields[4] = { + {1, UPB_SIZE(8, 8), 0, 0, 9, 1}, + {2, UPB_SIZE(16, 24), 0, 0, 9, 1}, + {3, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {4, UPB_SIZE(24, 40), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_api_v2_route_VirtualCluster_msginit = { + &envoy_api_v2_route_VirtualCluster_submsgs[0], + &envoy_api_v2_route_VirtualCluster__fields[0], + UPB_SIZE(32, 48), 4, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RateLimit_submsgs[2] = { + &envoy_api_v2_route_RateLimit_Action_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_RateLimit__fields[3] = { + {1, UPB_SIZE(8, 16), 0, 1, 11, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {3, UPB_SIZE(12, 24), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_api_v2_route_RateLimit_msginit = { + &envoy_api_v2_route_RateLimit_submsgs[0], + &envoy_api_v2_route_RateLimit__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RateLimit_Action_submsgs[6] = { + &envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit, + &envoy_api_v2_route_RateLimit_Action_GenericKey_msginit, + &envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit, + &envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit, + &envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit, + &envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit, +}; + +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}, +}; + +const upb_msglayout envoy_api_v2_route_RateLimit_Action_msginit = { + &envoy_api_v2_route_RateLimit_Action_submsgs[0], + &envoy_api_v2_route_RateLimit_Action__fields[0], + UPB_SIZE(8, 16), 6, false, +}; + +const upb_msglayout envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +const upb_msglayout envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action_RequestHeaders__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit = { + NULL, + &envoy_api_v2_route_RateLimit_Action_RequestHeaders__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +const upb_msglayout envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action_GenericKey__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_route_RateLimit_Action_GenericKey_msginit = { + NULL, + &envoy_api_v2_route_RateLimit_Action_GenericKey__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_submsgs[2] = { + &envoy_api_v2_route_HeaderMatcher_msginit, + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action_HeaderValueMatch__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 1, 11, 1}, + {3, UPB_SIZE(12, 24), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit = { + &envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_submsgs[0], + &envoy_api_v2_route_RateLimit_Action_HeaderValueMatch__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_HeaderMatcher_submsgs[2] = { + &envoy_type_Int64Range_msginit, + &envoy_type_matcher_RegexMatcher_msginit, +}; + +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}, + {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}, +}; + +const upb_msglayout envoy_api_v2_route_HeaderMatcher_msginit = { + &envoy_api_v2_route_HeaderMatcher_submsgs[0], + &envoy_api_v2_route_HeaderMatcher__fields[0], + UPB_SIZE(24, 48), 9, false, +}; + +static const upb_msglayout *const envoy_api_v2_route_QueryParameterMatcher_submsgs[2] = { + &envoy_type_matcher_StringMatcher_msginit, + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_route_QueryParameterMatcher__fields[5] = { + {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}, +}; + +const upb_msglayout envoy_api_v2_route_QueryParameterMatcher_msginit = { + &envoy_api_v2_route_QueryParameterMatcher_submsgs[0], + &envoy_api_v2_route_QueryParameterMatcher__fields[0], + UPB_SIZE(32, 64), 5, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..ac2640b073c --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h @@ -0,0 +1,2936 @@ +/* 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_UPB_H_ +#define ENVOY_API_V2_ROUTE_ROUTE_COMPONENTS_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_route_VirtualHost; +struct envoy_api_v2_route_VirtualHost_PerFilterConfigEntry; +struct envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry; +struct envoy_api_v2_route_FilterAction; +struct envoy_api_v2_route_Route; +struct envoy_api_v2_route_Route_PerFilterConfigEntry; +struct envoy_api_v2_route_Route_TypedPerFilterConfigEntry; +struct envoy_api_v2_route_WeightedCluster; +struct envoy_api_v2_route_WeightedCluster_ClusterWeight; +struct envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry; +struct envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry; +struct envoy_api_v2_route_RouteMatch; +struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions; +struct envoy_api_v2_route_RouteMatch_TlsContextMatchOptions; +struct envoy_api_v2_route_CorsPolicy; +struct envoy_api_v2_route_RouteAction; +struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy; +struct envoy_api_v2_route_RouteAction_HashPolicy; +struct envoy_api_v2_route_RouteAction_HashPolicy_Header; +struct envoy_api_v2_route_RouteAction_HashPolicy_Cookie; +struct envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties; +struct envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter; +struct envoy_api_v2_route_RouteAction_UpgradeConfig; +struct envoy_api_v2_route_RetryPolicy; +struct envoy_api_v2_route_RetryPolicy_RetryPriority; +struct envoy_api_v2_route_RetryPolicy_RetryHostPredicate; +struct envoy_api_v2_route_RetryPolicy_RetryBackOff; +struct envoy_api_v2_route_HedgePolicy; +struct envoy_api_v2_route_RedirectAction; +struct envoy_api_v2_route_DirectResponseAction; +struct envoy_api_v2_route_Decorator; +struct envoy_api_v2_route_Tracing; +struct envoy_api_v2_route_VirtualCluster; +struct envoy_api_v2_route_RateLimit; +struct envoy_api_v2_route_RateLimit_Action; +struct envoy_api_v2_route_RateLimit_Action_SourceCluster; +struct envoy_api_v2_route_RateLimit_Action_DestinationCluster; +struct envoy_api_v2_route_RateLimit_Action_RequestHeaders; +struct envoy_api_v2_route_RateLimit_Action_RemoteAddress; +struct envoy_api_v2_route_RateLimit_Action_GenericKey; +struct envoy_api_v2_route_RateLimit_Action_HeaderValueMatch; +struct envoy_api_v2_route_HeaderMatcher; +struct envoy_api_v2_route_QueryParameterMatcher; +typedef struct envoy_api_v2_route_VirtualHost envoy_api_v2_route_VirtualHost; +typedef struct envoy_api_v2_route_VirtualHost_PerFilterConfigEntry envoy_api_v2_route_VirtualHost_PerFilterConfigEntry; +typedef struct envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry; +typedef struct envoy_api_v2_route_FilterAction envoy_api_v2_route_FilterAction; +typedef struct envoy_api_v2_route_Route envoy_api_v2_route_Route; +typedef struct envoy_api_v2_route_Route_PerFilterConfigEntry envoy_api_v2_route_Route_PerFilterConfigEntry; +typedef struct envoy_api_v2_route_Route_TypedPerFilterConfigEntry envoy_api_v2_route_Route_TypedPerFilterConfigEntry; +typedef struct envoy_api_v2_route_WeightedCluster envoy_api_v2_route_WeightedCluster; +typedef struct envoy_api_v2_route_WeightedCluster_ClusterWeight envoy_api_v2_route_WeightedCluster_ClusterWeight; +typedef struct envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry; +typedef struct envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry; +typedef struct envoy_api_v2_route_RouteMatch envoy_api_v2_route_RouteMatch; +typedef struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions; +typedef struct envoy_api_v2_route_RouteMatch_TlsContextMatchOptions envoy_api_v2_route_RouteMatch_TlsContextMatchOptions; +typedef struct envoy_api_v2_route_CorsPolicy envoy_api_v2_route_CorsPolicy; +typedef struct envoy_api_v2_route_RouteAction envoy_api_v2_route_RouteAction; +typedef struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy envoy_api_v2_route_RouteAction_RequestMirrorPolicy; +typedef struct envoy_api_v2_route_RouteAction_HashPolicy envoy_api_v2_route_RouteAction_HashPolicy; +typedef struct envoy_api_v2_route_RouteAction_HashPolicy_Header envoy_api_v2_route_RouteAction_HashPolicy_Header; +typedef struct envoy_api_v2_route_RouteAction_HashPolicy_Cookie envoy_api_v2_route_RouteAction_HashPolicy_Cookie; +typedef struct envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties; +typedef struct envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter; +typedef struct envoy_api_v2_route_RouteAction_UpgradeConfig envoy_api_v2_route_RouteAction_UpgradeConfig; +typedef struct envoy_api_v2_route_RetryPolicy envoy_api_v2_route_RetryPolicy; +typedef struct envoy_api_v2_route_RetryPolicy_RetryPriority envoy_api_v2_route_RetryPolicy_RetryPriority; +typedef struct envoy_api_v2_route_RetryPolicy_RetryHostPredicate envoy_api_v2_route_RetryPolicy_RetryHostPredicate; +typedef struct envoy_api_v2_route_RetryPolicy_RetryBackOff envoy_api_v2_route_RetryPolicy_RetryBackOff; +typedef struct envoy_api_v2_route_HedgePolicy envoy_api_v2_route_HedgePolicy; +typedef struct envoy_api_v2_route_RedirectAction envoy_api_v2_route_RedirectAction; +typedef struct envoy_api_v2_route_DirectResponseAction envoy_api_v2_route_DirectResponseAction; +typedef struct envoy_api_v2_route_Decorator envoy_api_v2_route_Decorator; +typedef struct envoy_api_v2_route_Tracing envoy_api_v2_route_Tracing; +typedef struct envoy_api_v2_route_VirtualCluster envoy_api_v2_route_VirtualCluster; +typedef struct envoy_api_v2_route_RateLimit envoy_api_v2_route_RateLimit; +typedef struct envoy_api_v2_route_RateLimit_Action envoy_api_v2_route_RateLimit_Action; +typedef struct envoy_api_v2_route_RateLimit_Action_SourceCluster envoy_api_v2_route_RateLimit_Action_SourceCluster; +typedef struct envoy_api_v2_route_RateLimit_Action_DestinationCluster envoy_api_v2_route_RateLimit_Action_DestinationCluster; +typedef struct envoy_api_v2_route_RateLimit_Action_RequestHeaders envoy_api_v2_route_RateLimit_Action_RequestHeaders; +typedef struct envoy_api_v2_route_RateLimit_Action_RemoteAddress envoy_api_v2_route_RateLimit_Action_RemoteAddress; +typedef struct envoy_api_v2_route_RateLimit_Action_GenericKey envoy_api_v2_route_RateLimit_Action_GenericKey; +typedef struct envoy_api_v2_route_RateLimit_Action_HeaderValueMatch envoy_api_v2_route_RateLimit_Action_HeaderValueMatch; +typedef struct envoy_api_v2_route_HeaderMatcher envoy_api_v2_route_HeaderMatcher; +typedef struct envoy_api_v2_route_QueryParameterMatcher envoy_api_v2_route_QueryParameterMatcher; +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_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; +struct envoy_api_v2_core_DataSource; +struct envoy_api_v2_core_HeaderValueOption; +struct envoy_api_v2_core_Metadata; +struct envoy_api_v2_core_RuntimeFractionalPercent; +struct envoy_type_FractionalPercent; +struct envoy_type_Int64Range; +struct envoy_type_matcher_RegexMatcher; +struct envoy_type_matcher_StringMatcher; +struct envoy_type_tracing_v2_CustomTag; +struct google_protobuf_Any; +struct google_protobuf_BoolValue; +struct google_protobuf_Duration; +struct google_protobuf_Struct; +struct google_protobuf_UInt32Value; +extern const upb_msglayout envoy_api_v2_core_DataSource_msginit; +extern const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit; +extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; +extern const upb_msglayout envoy_api_v2_core_RuntimeFractionalPercent_msginit; +extern const upb_msglayout envoy_type_FractionalPercent_msginit; +extern const upb_msglayout envoy_type_Int64Range_msginit; +extern const upb_msglayout envoy_type_matcher_RegexMatcher_msginit; +extern const upb_msglayout envoy_type_matcher_StringMatcher_msginit; +extern const upb_msglayout envoy_type_tracing_v2_CustomTag_msginit; +extern const upb_msglayout google_protobuf_Any_msginit; +extern const upb_msglayout google_protobuf_BoolValue_msginit; +extern const upb_msglayout google_protobuf_Duration_msginit; +extern const upb_msglayout google_protobuf_Struct_msginit; +extern const upb_msglayout google_protobuf_UInt32Value_msginit; + +typedef enum { + envoy_api_v2_route_RedirectAction_MOVED_PERMANENTLY = 0, + envoy_api_v2_route_RedirectAction_FOUND = 1, + envoy_api_v2_route_RedirectAction_SEE_OTHER = 2, + envoy_api_v2_route_RedirectAction_TEMPORARY_REDIRECT = 3, + envoy_api_v2_route_RedirectAction_PERMANENT_REDIRECT = 4 +} envoy_api_v2_route_RedirectAction_RedirectResponseCode; + +typedef enum { + envoy_api_v2_route_RouteAction_SERVICE_UNAVAILABLE = 0, + envoy_api_v2_route_RouteAction_NOT_FOUND = 1 +} envoy_api_v2_route_RouteAction_ClusterNotFoundResponseCode; + +typedef enum { + envoy_api_v2_route_RouteAction_PASS_THROUGH_INTERNAL_REDIRECT = 0, + envoy_api_v2_route_RouteAction_HANDLE_INTERNAL_REDIRECT = 1 +} envoy_api_v2_route_RouteAction_InternalRedirectAction; + +typedef enum { + envoy_api_v2_route_VirtualHost_NONE = 0, + envoy_api_v2_route_VirtualHost_EXTERNAL_ONLY = 1, + envoy_api_v2_route_VirtualHost_ALL = 2 +} envoy_api_v2_route_VirtualHost_TlsRequirementType; + + +/* 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); +} +UPB_INLINE envoy_api_v2_route_VirtualHost *envoy_api_v2_route_VirtualHost_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_VirtualHost *ret = envoy_api_v2_route_VirtualHost_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_VirtualHost_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_VirtualHost_serialize(const envoy_api_v2_route_VirtualHost *msg, upb_arena *arena, size_t *len) { + 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 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(36, 64), len); } +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(40, 72), 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 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(44, 80), len); } +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(48, 88), len); } +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(52, 96), 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 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(56, 104), 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(60, 112), 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(64, 120), len); } +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(68, 128), 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(72, 136), len); } +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 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_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(36, 64), 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(36, 64), len, UPB_SIZE(8, 16), 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(36, 64), 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(40, 72), 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(40, 72), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(40, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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(44, 80), 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(44, 80), len, UPB_SIZE(4, 8), 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); + 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 envoy_api_v2_route_RateLimit** envoy_api_v2_route_VirtualHost_mutable_rate_limits(envoy_api_v2_route_VirtualHost *msg, size_t *len) { + return (envoy_api_v2_route_RateLimit**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 88), 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(48, 88), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(48, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_VirtualHost_mutable_request_headers_to_add(envoy_api_v2_route_VirtualHost *msg, size_t *len) { + 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_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(52, 96), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(52, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_VirtualHost_set_cors(msg, sub); + } + return sub; +} +UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_VirtualHost_mutable_response_headers_to_add(envoy_api_v2_route_VirtualHost *msg, size_t *len) { + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 104), 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(56, 104), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(56, 104), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE upb_strview* envoy_api_v2_route_VirtualHost_mutable_response_headers_to_remove(envoy_api_v2_route_VirtualHost *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(60, 112), 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(60, 112), len, UPB_SIZE(8, 16), 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(60, 112), 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(64, 120), 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(64, 120), 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(64, 120), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +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(68, 128), 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(68, 128), len, UPB_SIZE(8, 16), 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(68, 128), 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(72, 136), 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(72, 136), 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(72, 136), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +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); + if (!sub) return NULL; + envoy_api_v2_route_VirtualHost_set_retry_policy(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_VirtualHost_set_hedge_policy(msg, sub); + } + 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_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); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_route_VirtualHost_set_per_request_buffer_limit_bytes(msg, sub); + } + return sub; +} + +/* 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 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 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; +} + +/* 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 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 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; +} + +/* envoy.api.v2.route.FilterAction */ + +UPB_INLINE envoy_api_v2_route_FilterAction *envoy_api_v2_route_FilterAction_new(upb_arena *arena) { + return (envoy_api_v2_route_FilterAction *)upb_msg_new(&envoy_api_v2_route_FilterAction_msginit, arena); +} +UPB_INLINE envoy_api_v2_route_FilterAction *envoy_api_v2_route_FilterAction_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_FilterAction *ret = envoy_api_v2_route_FilterAction_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_FilterAction_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_FilterAction_serialize(const envoy_api_v2_route_FilterAction *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (sub == NULL) { + sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_route_FilterAction_set_action(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_Route *envoy_api_v2_route_Route_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_Route *ret = envoy_api_v2_route_Route_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_Route_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_Route_serialize(const envoy_api_v2_route_Route *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_Route_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_route_Route_action_route = 2, + envoy_api_v2_route_Route_action_redirect = 3, + envoy_api_v2_route_Route_action_direct_response = 7, + 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 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_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_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 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(28, 56), len); } +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 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 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(48, 96), len); } +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 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_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); + if (!sub) return NULL; + envoy_api_v2_route_Route_set_match(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_Route_set_route(envoy_api_v2_route_Route *msg, envoy_api_v2_route_RouteAction* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RouteAction*, UPB_SIZE(52, 104), value, UPB_SIZE(56, 112), 2); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_Route_set_route(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_Route_set_redirect(envoy_api_v2_route_Route *msg, envoy_api_v2_route_RedirectAction* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RedirectAction*, UPB_SIZE(52, 104), value, UPB_SIZE(56, 112), 3); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_Route_set_redirect(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_Route_set_metadata(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_Route_set_decorator(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_Route_set_direct_response(envoy_api_v2_route_Route *msg, envoy_api_v2_route_DirectResponseAction* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_DirectResponseAction*, UPB_SIZE(52, 104), value, UPB_SIZE(56, 112), 7); +} +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); + 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(28, 56), 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(28, 56), 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(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +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(32, 64), 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(32, 64), len, UPB_SIZE(4, 8), 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); + 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; +} +UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_Route_mutable_response_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(36, 72), 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(36, 72), len, UPB_SIZE(4, 8), 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); + 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; +} +UPB_INLINE upb_strview* envoy_api_v2_route_Route_mutable_response_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_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(40, 80), len, UPB_SIZE(8, 16), 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(40, 80), 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(44, 88), 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(44, 88), len, UPB_SIZE(8, 16), 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(44, 88), 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(48, 96), 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(48, 96), 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(48, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_Route_set_tracing(msg, sub); + } + 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_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); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_route_Route_set_per_request_buffer_limit_bytes(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_Route_set_filter_action(envoy_api_v2_route_Route *msg, envoy_api_v2_route_FilterAction* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_FilterAction*, UPB_SIZE(52, 104), value, UPB_SIZE(56, 112), 17); +} +UPB_INLINE struct envoy_api_v2_route_FilterAction* envoy_api_v2_route_Route_mutable_filter_action(envoy_api_v2_route_Route *msg, upb_arena *arena) { + struct envoy_api_v2_route_FilterAction* sub = (struct envoy_api_v2_route_FilterAction*)envoy_api_v2_route_Route_filter_action(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_route_FilterAction*)upb_msg_new(&envoy_api_v2_route_FilterAction_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_route_Route_set_filter_action(msg, sub); + } + return sub; +} + +/* 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 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 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; +} + +/* 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 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 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_WeightedCluster *envoy_api_v2_route_WeightedCluster_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_WeightedCluster *ret = envoy_api_v2_route_WeightedCluster_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_WeightedCluster_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_WeightedCluster_serialize(const envoy_api_v2_route_WeightedCluster *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_WeightedCluster_msginit, arena, len); +} + +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 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); +} +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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_WeightedCluster_set_total_weight(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight *envoy_api_v2_route_WeightedCluster_ClusterWeight_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_WeightedCluster_ClusterWeight *ret = envoy_api_v2_route_WeightedCluster_ClusterWeight_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_WeightedCluster_ClusterWeight_serialize(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_arena *arena, size_t *len) { + 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 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 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_WeightedCluster_ClusterWeight_set_weight(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_WeightedCluster_ClusterWeight_set_metadata_match(msg, sub); + } + return sub; +} +UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_request_headers_to_add(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { + 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); +} +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); + 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 struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_response_headers_to_add(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { + 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); +} +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); + 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; +} +UPB_INLINE upb_strview* envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_response_headers_to_remove(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { + 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); +} +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; +} +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); +} +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; +} + +/* 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 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 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; +} + +/* 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 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 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RouteMatch *envoy_api_v2_route_RouteMatch_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RouteMatch *ret = envoy_api_v2_route_RouteMatch_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteMatch_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RouteMatch_serialize(const envoy_api_v2_route_RouteMatch *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_RouteMatch_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_route_RouteMatch_path_specifier_prefix = 1, + envoy_api_v2_route_RouteMatch_path_specifier_path = 2, + envoy_api_v2_route_RouteMatch_path_specifier_regex = 3, + 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 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(""))); } +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 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 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 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_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 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); +} +UPB_INLINE void envoy_api_v2_route_RouteMatch_set_path(envoy_api_v2_route_RouteMatch *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), value, UPB_SIZE(32, 64), 2); +} +UPB_INLINE void envoy_api_v2_route_RouteMatch_set_regex(envoy_api_v2_route_RouteMatch *msg, upb_strview value) { + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteMatch_set_case_sensitive(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RouteMatch_mutable_headers(envoy_api_v2_route_RouteMatch *msg, size_t *len) { + return (envoy_api_v2_route_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), 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(16, 32), len, UPB_SIZE(4, 8), 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); + 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 envoy_api_v2_route_QueryParameterMatcher** envoy_api_v2_route_RouteMatch_mutable_query_parameters(envoy_api_v2_route_RouteMatch *msg, size_t *len) { + return (envoy_api_v2_route_QueryParameterMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), 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(20, 40), len, UPB_SIZE(4, 8), 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); + 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; +} +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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteMatch_set_grpc(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteMatch_set_runtime_fraction(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_RouteMatch_set_safe_regex(envoy_api_v2_route_RouteMatch *msg, struct envoy_type_matcher_RegexMatcher* value) { + UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(24, 48), value, UPB_SIZE(32, 64), 10); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RouteMatch_set_safe_regex(msg, sub); + } + 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_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); + if (sub == NULL) { + sub = (struct envoy_api_v2_route_RouteMatch_TlsContextMatchOptions*)upb_msg_new(&envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_route_RouteMatch_set_tls_context(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions *envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions *ret = envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_serialize(const envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit, arena, len); +} + + + +/* envoy.api.v2.route.RouteMatch.TlsContextMatchOptions */ + +UPB_INLINE envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_new(upb_arena *arena) { + return (envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *)upb_msg_new(&envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_msginit, arena); +} +UPB_INLINE envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *ret = envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_serialize(const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_set_presented(msg, sub); + } + 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_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); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_set_validated(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_CorsPolicy *envoy_api_v2_route_CorsPolicy_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_CorsPolicy *ret = envoy_api_v2_route_CorsPolicy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_CorsPolicy_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_CorsPolicy_serialize(const envoy_api_v2_route_CorsPolicy *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_CorsPolicy_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_route_CorsPolicy_enabled_specifier_enabled = 7, + 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 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 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 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) { + 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); +} +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); +} +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_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_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_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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_CorsPolicy_set_allow_credentials(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_enabled(envoy_api_v2_route_CorsPolicy *msg, struct google_protobuf_BoolValue* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_BoolValue*, UPB_SIZE(52, 104), value, UPB_SIZE(56, 112), 7); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_CorsPolicy_set_enabled(msg, sub); + } + return sub; +} +UPB_INLINE upb_strview* envoy_api_v2_route_CorsPolicy_mutable_allow_origin_regex(envoy_api_v2_route_CorsPolicy *msg, size_t *len) { + 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); +} +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); +} +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); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_CorsPolicy_set_filter_enabled(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_CorsPolicy_set_shadow_enabled(msg, sub); + } + return sub; +} +UPB_INLINE struct envoy_type_matcher_StringMatcher** envoy_api_v2_route_CorsPolicy_mutable_allow_origin_string_match(envoy_api_v2_route_CorsPolicy *msg, size_t *len) { + 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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(48, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RouteAction *envoy_api_v2_route_RouteAction_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RouteAction *ret = envoy_api_v2_route_RouteAction_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RouteAction_serialize(const envoy_api_v2_route_RouteAction *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_RouteAction_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_route_RouteAction_cluster_specifier_cluster = 1, + envoy_api_v2_route_RouteAction_cluster_specifier_cluster_header = 2, + 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(100, 176)); } + +typedef enum { + envoy_api_v2_route_RouteAction_host_rewrite_specifier_host_rewrite = 6, + envoy_api_v2_route_RouteAction_host_rewrite_specifier_auto_host_rewrite = 7, + 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(112, 200)); } + +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(100, 176), 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(92, 160), UPB_SIZE(100, 176), 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(100, 176), 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(92, 160), UPB_SIZE(100, 176), 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(100, 176), 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(92, 160), UPB_SIZE(100, 176), 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_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(112, 200), 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(104, 184), UPB_SIZE(112, 200), 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(112, 200), 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(104, 184), UPB_SIZE(112, 200), 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 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(76, 128), 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 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(80, 136), 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 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(84, 144), 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 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(112, 200), 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(104, 184), UPB_SIZE(112, 200), 29, upb_strview_make("", strlen(""))); } +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(88, 152), 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 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(92, 160), value, UPB_SIZE(100, 176), 1); +} +UPB_INLINE void envoy_api_v2_route_RouteAction_set_cluster_header(envoy_api_v2_route_RouteAction *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(92, 160), value, UPB_SIZE(100, 176), 2); +} +UPB_INLINE void envoy_api_v2_route_RouteAction_set_weighted_clusters(envoy_api_v2_route_RouteAction *msg, envoy_api_v2_route_WeightedCluster* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_WeightedCluster*, UPB_SIZE(92, 160), value, UPB_SIZE(100, 176), 3); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_weighted_clusters(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_metadata_match(msg, sub); + } + 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_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(104, 184), value, UPB_SIZE(112, 200), 6); +} +UPB_INLINE void envoy_api_v2_route_RouteAction_set_auto_host_rewrite(envoy_api_v2_route_RouteAction *msg, struct google_protobuf_BoolValue* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_BoolValue*, UPB_SIZE(104, 184), value, UPB_SIZE(112, 200), 7); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_auto_host_rewrite(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_timeout(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_retry_policy(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_request_mirror_policy(msg, sub); + } + 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_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(76, 128), 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(76, 128), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(76, 128), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_include_vh_rate_limits(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy** envoy_api_v2_route_RouteAction_mutable_hash_policy(envoy_api_v2_route_RouteAction *msg, size_t *len) { + return (envoy_api_v2_route_RouteAction_HashPolicy**)_upb_array_mutable_accessor(msg, UPB_SIZE(80, 136), 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(80, 136), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(80, 136), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_cors(msg, sub); + } + 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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_max_grpc_timeout(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_idle_timeout(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_route_RouteAction_UpgradeConfig** envoy_api_v2_route_RouteAction_mutable_upgrade_configs(envoy_api_v2_route_RouteAction *msg, size_t *len) { + return (envoy_api_v2_route_RouteAction_UpgradeConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(84, 144), 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(84, 144), len, UPB_SIZE(4, 8), 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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(84, 144), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_hedge_policy(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_grpc_timeout_offset(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_RouteAction_set_auto_host_rewrite_header(envoy_api_v2_route_RouteAction *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(104, 184), value, UPB_SIZE(112, 200), 29); +} +UPB_INLINE envoy_api_v2_route_RouteAction_RequestMirrorPolicy** envoy_api_v2_route_RouteAction_mutable_request_mirror_policies(envoy_api_v2_route_RouteAction *msg, size_t *len) { + return (envoy_api_v2_route_RouteAction_RequestMirrorPolicy**)_upb_array_mutable_accessor(msg, UPB_SIZE(88, 152), len); +} +UPB_INLINE envoy_api_v2_route_RouteAction_RequestMirrorPolicy** envoy_api_v2_route_RouteAction_resize_request_mirror_policies(envoy_api_v2_route_RouteAction *msg, size_t len, upb_arena *arena) { + return (envoy_api_v2_route_RouteAction_RequestMirrorPolicy**)_upb_array_resize_accessor(msg, UPB_SIZE(88, 152), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy* envoy_api_v2_route_RouteAction_add_request_mirror_policies(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { + struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy* sub = (struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy*)upb_msg_new(&envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(88, 152), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_set_max_internal_redirects(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RouteAction_RequestMirrorPolicy *envoy_api_v2_route_RouteAction_RequestMirrorPolicy_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RouteAction_RequestMirrorPolicy *ret = envoy_api_v2_route_RouteAction_RequestMirrorPolicy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RouteAction_RequestMirrorPolicy_serialize(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg, upb_arena *arena, size_t *len) { + 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 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_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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_RequestMirrorPolicy_set_runtime_fraction(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy *envoy_api_v2_route_RouteAction_HashPolicy_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RouteAction_HashPolicy *ret = envoy_api_v2_route_RouteAction_HashPolicy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_HashPolicy_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_serialize(const envoy_api_v2_route_RouteAction_HashPolicy *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_RouteAction_HashPolicy_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_header = 1, + envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_cookie = 2, + envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_connection_properties = 3, + envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_query_parameter = 5, + 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 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); } +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 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_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 void envoy_api_v2_route_RouteAction_HashPolicy_set_header(envoy_api_v2_route_RouteAction_HashPolicy *msg, envoy_api_v2_route_RouteAction_HashPolicy_Header* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RouteAction_HashPolicy_Header*, UPB_SIZE(4, 8), value, UPB_SIZE(8, 16), 1); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_HashPolicy_set_header(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_set_cookie(envoy_api_v2_route_RouteAction_HashPolicy *msg, envoy_api_v2_route_RouteAction_HashPolicy_Cookie* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RouteAction_HashPolicy_Cookie*, UPB_SIZE(4, 8), value, UPB_SIZE(8, 16), 2); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_HashPolicy_set_cookie(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_set_connection_properties(envoy_api_v2_route_RouteAction_HashPolicy *msg, envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties*, UPB_SIZE(4, 8), value, UPB_SIZE(8, 16), 3); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_HashPolicy_set_connection_properties(msg, sub); + } + 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_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); +} +UPB_INLINE struct envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter* envoy_api_v2_route_RouteAction_HashPolicy_mutable_query_parameter(envoy_api_v2_route_RouteAction_HashPolicy *msg, upb_arena *arena) { + struct envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter* sub = (struct envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter*)envoy_api_v2_route_RouteAction_HashPolicy_query_parameter(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter*)upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_HashPolicy_set_query_parameter(msg, sub); + } + return sub; +} + +/* 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); +} +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) { + envoy_api_v2_route_RouteAction_HashPolicy_Header *ret = envoy_api_v2_route_RouteAction_HashPolicy_Header_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_Header_serialize(const envoy_api_v2_route_RouteAction_HashPolicy_Header *msg, upb_arena *arena, size_t *len) { + 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 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; +} + +/* 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); +} +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) { + envoy_api_v2_route_RouteAction_HashPolicy_Cookie *ret = envoy_api_v2_route_RouteAction_HashPolicy_Cookie_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_Cookie_serialize(const envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg, upb_arena *arena, size_t *len) { + 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_HashPolicy_Cookie_set_ttl(msg, sub); + } + 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; +} + +/* 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); +} +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) { + envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties *ret = envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_serialize(const envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties *msg, upb_arena *arena, size_t *len) { + 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 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; +} + +/* envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter */ + +UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter *envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_new(upb_arena *arena) { + return (envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter *)upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_msginit, arena); +} +UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter *envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter *ret = envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_serialize(const envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter *msg, upb_arena *arena, size_t *len) { + 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 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RouteAction_UpgradeConfig *envoy_api_v2_route_RouteAction_UpgradeConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RouteAction_UpgradeConfig *ret = envoy_api_v2_route_RouteAction_UpgradeConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RouteAction_UpgradeConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RouteAction_UpgradeConfig_serialize(const envoy_api_v2_route_RouteAction_UpgradeConfig *msg, upb_arena *arena, size_t *len) { + 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_RouteAction_UpgradeConfig_set_enabled(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RetryPolicy *envoy_api_v2_route_RetryPolicy_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RetryPolicy *ret = envoy_api_v2_route_RetryPolicy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RetryPolicy_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RetryPolicy_serialize(const envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena, size_t *len) { + 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 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 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 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_RetryPolicy_set_num_retries(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RetryPolicy_set_per_try_timeout(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RetryPolicy_set_retry_priority(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryHostPredicate** envoy_api_v2_route_RetryPolicy_mutable_retry_host_predicate(envoy_api_v2_route_RetryPolicy *msg, size_t *len) { + 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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(32, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + 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_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); +} +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); +} +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); +} +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_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); + if (!sub) return NULL; + envoy_api_v2_route_RetryPolicy_set_retry_back_off(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RetryPolicy_mutable_retriable_headers(envoy_api_v2_route_RetryPolicy *msg, size_t *len) { + 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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(40, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RetryPolicy_mutable_retriable_request_headers(envoy_api_v2_route_RetryPolicy *msg, size_t *len) { + 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); +} +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); + 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryPriority *envoy_api_v2_route_RetryPolicy_RetryPriority_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RetryPolicy_RetryPriority *ret = envoy_api_v2_route_RetryPolicy_RetryPriority_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RetryPolicy_RetryPriority_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RetryPolicy_RetryPriority_serialize(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_RetryPolicy_RetryPriority_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_config = 2, + 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 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 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_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); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RetryPolicy_RetryPriority_set_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryPriority_set_typed_config(envoy_api_v2_route_RetryPolicy_RetryPriority *msg, struct google_protobuf_Any* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RetryPolicy_RetryPriority_set_typed_config(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryHostPredicate *envoy_api_v2_route_RetryPolicy_RetryHostPredicate_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RetryPolicy_RetryHostPredicate *ret = envoy_api_v2_route_RetryPolicy_RetryHostPredicate_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RetryPolicy_RetryHostPredicate_serialize(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_config = 2, + 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 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 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_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); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_typed_config(envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg, struct google_protobuf_Any* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_typed_config(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryBackOff *envoy_api_v2_route_RetryPolicy_RetryBackOff_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RetryPolicy_RetryBackOff *ret = envoy_api_v2_route_RetryPolicy_RetryBackOff_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RetryPolicy_RetryBackOff_serialize(const envoy_api_v2_route_RetryPolicy_RetryBackOff *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RetryPolicy_RetryBackOff_set_base_interval(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RetryPolicy_RetryBackOff_set_max_interval(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_HedgePolicy *envoy_api_v2_route_HedgePolicy_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_HedgePolicy *ret = envoy_api_v2_route_HedgePolicy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_HedgePolicy_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_HedgePolicy_serialize(const envoy_api_v2_route_HedgePolicy *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_route_HedgePolicy_set_initial_requests(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_HedgePolicy_set_additional_request_chance(msg, sub); + } + 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RedirectAction *envoy_api_v2_route_RedirectAction_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RedirectAction *ret = envoy_api_v2_route_RedirectAction_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RedirectAction_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RedirectAction_serialize(const envoy_api_v2_route_RedirectAction *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_RedirectAction_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_route_RedirectAction_scheme_rewrite_specifier_https_redirect = 4, + 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)); } + +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 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 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 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_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 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_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_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); +} +UPB_INLINE void envoy_api_v2_route_RedirectAction_set_prefix_rewrite(envoy_api_v2_route_RedirectAction *msg, upb_strview value) { + 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_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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_DirectResponseAction *envoy_api_v2_route_DirectResponseAction_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_DirectResponseAction *ret = envoy_api_v2_route_DirectResponseAction_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_DirectResponseAction_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_DirectResponseAction_serialize(const envoy_api_v2_route_DirectResponseAction *msg, upb_arena *arena, size_t *len) { + 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_DirectResponseAction_set_body(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_Decorator *envoy_api_v2_route_Decorator_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_Decorator *ret = envoy_api_v2_route_Decorator_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_Decorator_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_Decorator_serialize(const envoy_api_v2_route_Decorator *msg, upb_arena *arena, size_t *len) { + 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 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_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_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); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_route_Decorator_set_propagate(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_Tracing *envoy_api_v2_route_Tracing_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_Tracing *ret = envoy_api_v2_route_Tracing_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_Tracing_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_Tracing_serialize(const envoy_api_v2_route_Tracing *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_route_Tracing_set_client_sampling(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_Tracing_set_random_sampling(msg, sub); + } + 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_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); + if (!sub) return NULL; + envoy_api_v2_route_Tracing_set_overall_sampling(msg, sub); + } + return sub; +} +UPB_INLINE struct envoy_type_tracing_v2_CustomTag** envoy_api_v2_route_Tracing_mutable_custom_tags(envoy_api_v2_route_Tracing *msg, size_t *len) { + return (struct envoy_type_tracing_v2_CustomTag**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); +} +UPB_INLINE struct envoy_type_tracing_v2_CustomTag** envoy_api_v2_route_Tracing_resize_custom_tags(envoy_api_v2_route_Tracing *msg, size_t len, upb_arena *arena) { + return (struct envoy_type_tracing_v2_CustomTag**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_type_tracing_v2_CustomTag* envoy_api_v2_route_Tracing_add_custom_tags(envoy_api_v2_route_Tracing *msg, upb_arena *arena) { + struct envoy_type_tracing_v2_CustomTag* sub = (struct envoy_type_tracing_v2_CustomTag*)upb_msg_new(&envoy_type_tracing_v2_CustomTag_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; + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_VirtualCluster *envoy_api_v2_route_VirtualCluster_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_VirtualCluster *ret = envoy_api_v2_route_VirtualCluster_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_VirtualCluster_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_VirtualCluster_serialize(const envoy_api_v2_route_VirtualCluster *msg, upb_arena *arena, size_t *len) { + 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 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_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_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_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); +} +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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(24, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RateLimit *envoy_api_v2_route_RateLimit_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RateLimit *ret = envoy_api_v2_route_RateLimit_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RateLimit_serialize(const envoy_api_v2_route_RateLimit *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (!sub) return NULL; + envoy_api_v2_route_RateLimit_set_stage(msg, sub); + } + 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_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); +} +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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_RateLimit_Action *envoy_api_v2_route_RateLimit_Action_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_RateLimit_Action *ret = envoy_api_v2_route_RateLimit_Action_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_serialize(const envoy_api_v2_route_RateLimit_Action *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_RateLimit_Action_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_route_RateLimit_Action_action_specifier_source_cluster = 1, + envoy_api_v2_route_RateLimit_Action_action_specifier_destination_cluster = 2, + envoy_api_v2_route_RateLimit_Action_action_specifier_request_headers = 3, + envoy_api_v2_route_RateLimit_Action_action_specifier_remote_address = 4, + envoy_api_v2_route_RateLimit_Action_action_specifier_generic_key = 5, + 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 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); } +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 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 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 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 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 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) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_SourceCluster*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RateLimit_Action_set_source_cluster(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_destination_cluster(envoy_api_v2_route_RateLimit_Action *msg, envoy_api_v2_route_RateLimit_Action_DestinationCluster* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_DestinationCluster*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RateLimit_Action_set_destination_cluster(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_request_headers(envoy_api_v2_route_RateLimit_Action *msg, envoy_api_v2_route_RateLimit_Action_RequestHeaders* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_RequestHeaders*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RateLimit_Action_set_request_headers(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_remote_address(envoy_api_v2_route_RateLimit_Action *msg, envoy_api_v2_route_RateLimit_Action_RemoteAddress* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_RemoteAddress*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RateLimit_Action_set_remote_address(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_generic_key(envoy_api_v2_route_RateLimit_Action *msg, envoy_api_v2_route_RateLimit_Action_GenericKey* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_GenericKey*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RateLimit_Action_set_generic_key(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_header_value_match(envoy_api_v2_route_RateLimit_Action *msg, envoy_api_v2_route_RateLimit_Action_HeaderValueMatch* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RateLimit_Action_HeaderValueMatch*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 6); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_RateLimit_Action_set_header_value_match(msg, sub); + } + return sub; +} + +/* 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); +} +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) { + envoy_api_v2_route_RateLimit_Action_SourceCluster *ret = envoy_api_v2_route_RateLimit_Action_SourceCluster_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_SourceCluster_serialize(const envoy_api_v2_route_RateLimit_Action_SourceCluster *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit, arena, len); +} + + + +/* 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); +} +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) { + envoy_api_v2_route_RateLimit_Action_DestinationCluster *ret = envoy_api_v2_route_RateLimit_Action_DestinationCluster_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_DestinationCluster_serialize(const envoy_api_v2_route_RateLimit_Action_DestinationCluster *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit, arena, len); +} + + + +/* 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); +} +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) { + envoy_api_v2_route_RateLimit_Action_RequestHeaders *ret = envoy_api_v2_route_RateLimit_Action_RequestHeaders_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_RequestHeaders_serialize(const envoy_api_v2_route_RateLimit_Action_RequestHeaders *msg, upb_arena *arena, size_t *len) { + 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 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_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; +} + +/* 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); +} +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) { + envoy_api_v2_route_RateLimit_Action_RemoteAddress *ret = envoy_api_v2_route_RateLimit_Action_RemoteAddress_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_RemoteAddress_serialize(const envoy_api_v2_route_RateLimit_Action_RemoteAddress *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit, arena, len); +} + + + +/* 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); +} +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) { + envoy_api_v2_route_RateLimit_Action_GenericKey *ret = envoy_api_v2_route_RateLimit_Action_GenericKey_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_GenericKey_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_GenericKey_serialize(const envoy_api_v2_route_RateLimit_Action_GenericKey *msg, upb_arena *arena, size_t *len) { + 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 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; +} + +/* 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); +} +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) { + envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *ret = envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_serialize(const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg, upb_arena *arena, size_t *len) { + 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 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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_set_expect_match(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_mutable_headers(envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg, size_t *len) { + 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); +} +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); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_HeaderMatcher *envoy_api_v2_route_HeaderMatcher_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_HeaderMatcher *ret = envoy_api_v2_route_HeaderMatcher_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_HeaderMatcher_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_HeaderMatcher_serialize(const envoy_api_v2_route_HeaderMatcher *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_HeaderMatcher_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_route_HeaderMatcher_header_match_specifier_exact_match = 4, + envoy_api_v2_route_HeaderMatcher_header_match_specifier_regex_match = 5, + envoy_api_v2_route_HeaderMatcher_header_match_specifier_safe_regex_match = 11, + envoy_api_v2_route_HeaderMatcher_header_match_specifier_range_match = 6, + envoy_api_v2_route_HeaderMatcher_header_match_specifier_present_match = 7, + envoy_api_v2_route_HeaderMatcher_header_match_specifier_prefix_match = 9, + 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 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 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); } +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 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_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); } +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 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_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); +} +UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_regex_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), 5); +} +UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_range_match(envoy_api_v2_route_HeaderMatcher *msg, struct envoy_type_Int64Range* value) { + UPB_WRITE_ONEOF(msg, struct envoy_type_Int64Range*, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 6); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_HeaderMatcher_set_range_match(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_present_match(envoy_api_v2_route_HeaderMatcher *msg, bool value) { + 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_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); +} +UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_suffix_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), 10); +} +UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_safe_regex_match(envoy_api_v2_route_HeaderMatcher *msg, struct envoy_type_matcher_RegexMatcher* value) { + UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 11); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_HeaderMatcher_set_safe_regex_match(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_route_QueryParameterMatcher *envoy_api_v2_route_QueryParameterMatcher_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_route_QueryParameterMatcher *ret = envoy_api_v2_route_QueryParameterMatcher_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_QueryParameterMatcher_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_route_QueryParameterMatcher_serialize(const envoy_api_v2_route_QueryParameterMatcher *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_route_QueryParameterMatcher_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_route_QueryParameterMatcher_query_parameter_match_specifier_string_match = 5, + 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 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 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_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_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_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); + if (!sub) return NULL; + envoy_api_v2_route_QueryParameterMatcher_set_regex(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_QueryParameterMatcher_set_string_match(envoy_api_v2_route_QueryParameterMatcher *msg, struct envoy_type_matcher_StringMatcher* value) { + UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_StringMatcher*, UPB_SIZE(20, 40), value, UPB_SIZE(24, 48), 5); +} +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); + if (!sub) return NULL; + envoy_api_v2_route_QueryParameterMatcher_set_string_match(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_route_QueryParameterMatcher_set_present_match(envoy_api_v2_route_QueryParameterMatcher *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(20, 40), value, UPB_SIZE(24, 48), 6); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ROUTE_ROUTE_COMPONENTS_PROTO_UPB_H_ */ 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 new file mode 100644 index 00000000000..6de0fdd9a0e --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c @@ -0,0 +1,58 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/api/v2/scoped_route.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_ScopedRouteConfiguration_submsgs[1] = { + &envoy_api_v2_ScopedRouteConfiguration_Key_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_ScopedRouteConfiguration__fields[3] = { + {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, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_msginit = { + &envoy_api_v2_ScopedRouteConfiguration_submsgs[0], + &envoy_api_v2_ScopedRouteConfiguration__fields[0], + UPB_SIZE(24, 48), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_ScopedRouteConfiguration_Key_submsgs[1] = { + &envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_ScopedRouteConfiguration_Key__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_msginit = { + &envoy_api_v2_ScopedRouteConfiguration_Key_submsgs[0], + &envoy_api_v2_ScopedRouteConfiguration_Key__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +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}, +}; + +const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit = { + NULL, + &envoy_api_v2_ScopedRouteConfiguration_Key_Fragment__fields[0], + UPB_SIZE(16, 32), 1, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..8421f32ed52 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h @@ -0,0 +1,134 @@ +/* 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_UPB_H_ +#define ENVOY_API_V2_SCOPED_ROUTE_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_ScopedRouteConfiguration; +struct envoy_api_v2_ScopedRouteConfiguration_Key; +struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment; +typedef struct envoy_api_v2_ScopedRouteConfiguration envoy_api_v2_ScopedRouteConfiguration; +typedef struct envoy_api_v2_ScopedRouteConfiguration_Key envoy_api_v2_ScopedRouteConfiguration_Key; +typedef struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment envoy_api_v2_ScopedRouteConfiguration_Key_Fragment; +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; + + +/* 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); +} +UPB_INLINE envoy_api_v2_ScopedRouteConfiguration *envoy_api_v2_ScopedRouteConfiguration_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_ScopedRouteConfiguration *ret = envoy_api_v2_ScopedRouteConfiguration_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ScopedRouteConfiguration_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_ScopedRouteConfiguration_serialize(const envoy_api_v2_ScopedRouteConfiguration *msg, upb_arena *arena, size_t *len) { + 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 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_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_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_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); + if (!sub) return NULL; + envoy_api_v2_ScopedRouteConfiguration_set_key(msg, sub); + } + return sub; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key *envoy_api_v2_ScopedRouteConfiguration_Key_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_ScopedRouteConfiguration_Key *ret = envoy_api_v2_ScopedRouteConfiguration_Key_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_ScopedRouteConfiguration_Key_serialize(const envoy_api_v2_ScopedRouteConfiguration_Key *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena, len); +} + +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) { + 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); +} +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); + 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; +} + +/* 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); +} +UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *ret = envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_serialize(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena, len); +} + +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 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(""))); } + +UPB_INLINE void envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_set_string_key(envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_SCOPED_ROUTE_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/srds.upb.c b/src/core/ext/upb-generated/envoy/api/v2/srds.upb.c index 51c1ee17b94..1711cb772d0 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/srds.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/srds.upb.c @@ -11,48 +11,16 @@ #include "envoy/api/v2/srds.upb.h" #include "envoy/api/v2/discovery.upb.h" #include "google/api/annotations.upb.h" -#include "validate/validate.upb.h" +#include "envoy/annotations/resource.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "envoy/api/v2/scoped_route.upb.h" #include "upb/port_def.inc" -static const upb_msglayout *const envoy_api_v2_ScopedRouteConfiguration_submsgs[1] = { - &envoy_api_v2_ScopedRouteConfiguration_Key_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_ScopedRouteConfiguration__fields[3] = { - {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, 11, 1}, -}; - -const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_msginit = { - &envoy_api_v2_ScopedRouteConfiguration_submsgs[0], - &envoy_api_v2_ScopedRouteConfiguration__fields[0], - UPB_SIZE(24, 48), 3, false, -}; - -static const upb_msglayout *const envoy_api_v2_ScopedRouteConfiguration_Key_submsgs[1] = { - &envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, -}; - -static const upb_msglayout_field envoy_api_v2_ScopedRouteConfiguration_Key__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, -}; - -const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_msginit = { - &envoy_api_v2_ScopedRouteConfiguration_Key_submsgs[0], - &envoy_api_v2_ScopedRouteConfiguration_Key__fields[0], - UPB_SIZE(4, 8), 1, false, -}; - -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}, -}; - -const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit = { +const upb_msglayout envoy_api_v2_SrdsDummy_msginit = { + NULL, NULL, - &envoy_api_v2_ScopedRouteConfiguration_Key_Fragment__fields[0], - UPB_SIZE(16, 32), 1, false, + UPB_SIZE(0, 0), 0, false, }; #include "upb/port_undef.inc" 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..4d1c80c82e8 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 @@ -14,116 +14,35 @@ #include "upb/decode.h" #include "upb/encode.h" +/* Public Imports. */ +#include "envoy/api/v2/scoped_route.upb.h" + #include "upb/port_def.inc" #ifdef __cplusplus extern "C" { #endif -struct envoy_api_v2_ScopedRouteConfiguration; -struct envoy_api_v2_ScopedRouteConfiguration_Key; -struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment; -typedef struct envoy_api_v2_ScopedRouteConfiguration envoy_api_v2_ScopedRouteConfiguration; -typedef struct envoy_api_v2_ScopedRouteConfiguration_Key envoy_api_v2_ScopedRouteConfiguration_Key; -typedef struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment envoy_api_v2_ScopedRouteConfiguration_Key_Fragment; -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; - - -/* 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); -} -UPB_INLINE envoy_api_v2_ScopedRouteConfiguration *envoy_api_v2_ScopedRouteConfiguration_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_ScopedRouteConfiguration *ret = envoy_api_v2_ScopedRouteConfiguration_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ScopedRouteConfiguration_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_ScopedRouteConfiguration_serialize(const envoy_api_v2_ScopedRouteConfiguration *msg, upb_arena *arena, size_t *len) { - 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 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_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_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_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); - if (!sub) return NULL; - envoy_api_v2_ScopedRouteConfiguration_set_key(msg, sub); - } - return sub; -} - -/* envoy.api.v2.ScopedRouteConfiguration.Key */ +struct envoy_api_v2_SrdsDummy; +typedef struct envoy_api_v2_SrdsDummy envoy_api_v2_SrdsDummy; +extern const upb_msglayout envoy_api_v2_SrdsDummy_msginit; -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); -} -UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key *envoy_api_v2_ScopedRouteConfiguration_Key_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_ScopedRouteConfiguration_Key *ret = envoy_api_v2_ScopedRouteConfiguration_Key_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_ScopedRouteConfiguration_Key_serialize(const envoy_api_v2_ScopedRouteConfiguration_Key *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena, len); -} -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); } +/* envoy.api.v2.SrdsDummy */ -UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment** envoy_api_v2_ScopedRouteConfiguration_Key_mutable_fragments(envoy_api_v2_ScopedRouteConfiguration_Key *msg, size_t *len) { - 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); +UPB_INLINE envoy_api_v2_SrdsDummy *envoy_api_v2_SrdsDummy_new(upb_arena *arena) { + return (envoy_api_v2_SrdsDummy *)upb_msg_new(&envoy_api_v2_SrdsDummy_msginit, 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); - 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; -} - -/* 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); -} -UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_parse(const char *buf, size_t size, +UPB_INLINE envoy_api_v2_SrdsDummy *envoy_api_v2_SrdsDummy_parse(const char *buf, size_t size, upb_arena *arena) { - envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *ret = envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena)) ? ret : NULL; + envoy_api_v2_SrdsDummy *ret = envoy_api_v2_SrdsDummy_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_SrdsDummy_msginit, arena)) ? ret : NULL; } -UPB_INLINE char *envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_serialize(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena, len); +UPB_INLINE char *envoy_api_v2_SrdsDummy_serialize(const envoy_api_v2_SrdsDummy *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_SrdsDummy_msginit, arena, len); } -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 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(""))); } -UPB_INLINE void envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_set_string_key(envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg, upb_strview value) { - UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1); -} #ifdef __cplusplus } /* extern "C" */ 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 1f4a3660943..d551ab2f014 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 @@ -10,10 +10,11 @@ #include "upb/msg.h" #include "envoy/config/filter/accesslog/v2/accesslog.upb.h" #include "envoy/api/v2/core/base.upb.h" -#include "envoy/api/v2/route/route.upb.h" +#include "envoy/api/v2/route/route_components.upb.h" #include "envoy/type/percent.upb.h" #include "google/protobuf/any.upb.h" #include "google/protobuf/struct.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" 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 137d43abe90..b062628c0b1 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 @@ -11,14 +11,17 @@ #include "envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h" #include "envoy/api/v2/core/config_source.upb.h" #include "envoy/api/v2/core/protocol.upb.h" -#include "envoy/api/v2/rds.upb.h" -#include "envoy/api/v2/srds.upb.h" +#include "envoy/api/v2/route.upb.h" +#include "envoy/api/v2/scoped_route.upb.h" #include "envoy/config/filter/accesslog/v2/accesslog.upb.h" #include "envoy/type/percent.upb.h" +#include "envoy/type/tracing/v2/custom_tag.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 "envoy/annotations/deprecation.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" @@ -84,25 +87,27 @@ const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpC UPB_SIZE(144, 256), 34, false, }; -static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_submsgs[4] = { +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_submsgs[5] = { &envoy_type_Percent_msginit, + &envoy_type_tracing_v2_CustomTag_msginit, &google_protobuf_UInt32Value_msginit, }; -static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing__fields[7] = { +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing__fields[8] = { {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, {2, UPB_SIZE(28, 48), 0, 0, 9, 3}, {3, UPB_SIZE(12, 16), 0, 0, 11, 1}, {4, UPB_SIZE(16, 24), 0, 0, 11, 1}, {5, UPB_SIZE(20, 32), 0, 0, 11, 1}, {6, UPB_SIZE(8, 8), 0, 0, 8, 1}, - {7, UPB_SIZE(24, 40), 0, 1, 11, 1}, + {7, UPB_SIZE(24, 40), 0, 2, 11, 1}, + {8, UPB_SIZE(32, 56), 0, 1, 11, 3}, }; const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit = { &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_submsgs[0], &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing__fields[0], - UPB_SIZE(32, 56), 7, false, + UPB_SIZE(40, 64), 8, false, }; static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig__fields[1] = { 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..94252529984 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 @@ -70,6 +70,7 @@ struct envoy_api_v2_core_Http2ProtocolOptions; struct envoy_api_v2_core_HttpProtocolOptions; struct envoy_config_filter_accesslog_v2_AccessLog; struct envoy_type_Percent; +struct envoy_type_tracing_v2_CustomTag; struct google_protobuf_Any; struct google_protobuf_BoolValue; struct google_protobuf_Duration; @@ -83,6 +84,7 @@ extern const upb_msglayout envoy_api_v2_core_Http2ProtocolOptions_msginit; extern const upb_msglayout envoy_api_v2_core_HttpProtocolOptions_msginit; extern const upb_msglayout envoy_config_filter_accesslog_v2_AccessLog_msginit; extern const upb_msglayout envoy_type_Percent_msginit; +extern const upb_msglayout envoy_type_tracing_v2_CustomTag_msginit; extern const upb_msglayout google_protobuf_Any_msginit; extern const upb_msglayout google_protobuf_BoolValue_msginit; extern const upb_msglayout google_protobuf_Duration_msginit; @@ -501,6 +503,7 @@ UPB_INLINE const struct envoy_type_Percent* envoy_config_filter_network_http_con 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 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(32, 56), len); } 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; @@ -566,6 +569,19 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_filter_network_http_ } return sub; } +UPB_INLINE struct envoy_type_tracing_v2_CustomTag** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_custom_tags(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, size_t *len) { + return (struct envoy_type_tracing_v2_CustomTag**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len); +} +UPB_INLINE struct envoy_type_tracing_v2_CustomTag** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_resize_custom_tags(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, size_t len, upb_arena *arena) { + return (struct envoy_type_tracing_v2_CustomTag**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_type_tracing_v2_CustomTag* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_add_custom_tags(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { + struct envoy_type_tracing_v2_CustomTag* sub = (struct envoy_type_tracing_v2_CustomTag*)upb_msg_new(&envoy_type_tracing_v2_CustomTag_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; + return sub; +} /* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.InternalAddressConfig */ diff --git a/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c index c5153b51078..36f332f1991 100644 --- a/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c +++ b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c @@ -10,6 +10,7 @@ #include "upb/msg.h" #include "envoy/config/listener/v2/api_listener.upb.h" #include "google/protobuf/any.upb.h" +#include "udpa/annotations/migrate.upb.h" #include "upb/port_def.inc" 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 426b46e14fa..208a022ea88 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 @@ -10,6 +10,7 @@ #include "upb/msg.h" #include "envoy/type/matcher/string.upb.h" #include "envoy/type/matcher/regex.upb.h" +#include "envoy/annotations/deprecation.upb.h" #include "validate/validate.upb.h" #include "upb/port_def.inc" @@ -18,18 +19,19 @@ static const upb_msglayout *const envoy_type_matcher_StringMatcher_submsgs[1] = &envoy_type_matcher_RegexMatcher_msginit, }; -static const upb_msglayout_field envoy_type_matcher_StringMatcher__fields[5] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 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}, + {6, UPB_SIZE(0, 0), 0, 0, 8, 1}, }; const upb_msglayout envoy_type_matcher_StringMatcher_msginit = { &envoy_type_matcher_StringMatcher_submsgs[0], &envoy_type_matcher_StringMatcher__fields[0], - UPB_SIZE(16, 32), 5, false, + UPB_SIZE(16, 32), 6, false, }; static const upb_msglayout *const envoy_type_matcher_ListStringMatcher_submsgs[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 d5b4850992f..5511a237f51 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 @@ -52,33 +52,34 @@ 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(8, 16)); } - -UPB_INLINE bool envoy_type_matcher_StringMatcher_has_exact(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 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(0, 0), UPB_SIZE(8, 16), 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(8, 16), 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(0, 0), UPB_SIZE(8, 16), 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(8, 16), 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(0, 0), UPB_SIZE(8, 16), 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(8, 16), 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(0, 0), UPB_SIZE(8, 16), 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(8, 16), 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(0, 0), UPB_SIZE(8, 16), 5, NULL); } +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 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(""))); } +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 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 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 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 void envoy_type_matcher_StringMatcher_set_exact(envoy_type_matcher_StringMatcher *msg, upb_strview value) { - UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1); + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 1); } UPB_INLINE void envoy_type_matcher_StringMatcher_set_prefix(envoy_type_matcher_StringMatcher *msg, upb_strview value) { - UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2); + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 2); } UPB_INLINE void envoy_type_matcher_StringMatcher_set_suffix(envoy_type_matcher_StringMatcher *msg, upb_strview value) { - UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 3); + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 3); } UPB_INLINE void envoy_type_matcher_StringMatcher_set_regex(envoy_type_matcher_StringMatcher *msg, upb_strview value) { - UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 4); + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 4); } UPB_INLINE void envoy_type_matcher_StringMatcher_set_safe_regex(envoy_type_matcher_StringMatcher *msg, struct envoy_type_matcher_RegexMatcher* value) { - UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 5); + UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 5); } 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); @@ -89,6 +90,9 @@ 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; +} /* envoy.type.matcher.ListStringMatcher */ 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 new file mode 100644 index 00000000000..e2f69c7b3f7 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c @@ -0,0 +1,87 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/type/metadata/v2/metadata.upb.h" +#include "udpa/annotations/migrate.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_type_metadata_v2_MetadataKey_submsgs[1] = { + &envoy_type_metadata_v2_MetadataKey_PathSegment_msginit, +}; + +static const upb_msglayout_field envoy_type_metadata_v2_MetadataKey__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_type_metadata_v2_MetadataKey_msginit = { + &envoy_type_metadata_v2_MetadataKey_submsgs[0], + &envoy_type_metadata_v2_MetadataKey__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +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}, +}; + +const upb_msglayout envoy_type_metadata_v2_MetadataKey_PathSegment_msginit = { + NULL, + &envoy_type_metadata_v2_MetadataKey_PathSegment__fields[0], + UPB_SIZE(16, 32), 1, false, +}; + +static const upb_msglayout *const envoy_type_metadata_v2_MetadataKind_submsgs[4] = { + &envoy_type_metadata_v2_MetadataKind_Cluster_msginit, + &envoy_type_metadata_v2_MetadataKind_Host_msginit, + &envoy_type_metadata_v2_MetadataKind_Request_msginit, + &envoy_type_metadata_v2_MetadataKind_Route_msginit, +}; + +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}, +}; + +const upb_msglayout envoy_type_metadata_v2_MetadataKind_msginit = { + &envoy_type_metadata_v2_MetadataKind_submsgs[0], + &envoy_type_metadata_v2_MetadataKind__fields[0], + UPB_SIZE(8, 16), 4, false, +}; + +const upb_msglayout envoy_type_metadata_v2_MetadataKind_Request_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +const upb_msglayout envoy_type_metadata_v2_MetadataKind_Route_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +const upb_msglayout envoy_type_metadata_v2_MetadataKind_Cluster_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +const upb_msglayout envoy_type_metadata_v2_MetadataKind_Host_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..46b21c32c3b --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h @@ -0,0 +1,258 @@ +/* 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_UPB_H_ +#define ENVOY_TYPE_METADATA_V2_METADATA_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_type_metadata_v2_MetadataKey; +struct envoy_type_metadata_v2_MetadataKey_PathSegment; +struct envoy_type_metadata_v2_MetadataKind; +struct envoy_type_metadata_v2_MetadataKind_Request; +struct envoy_type_metadata_v2_MetadataKind_Route; +struct envoy_type_metadata_v2_MetadataKind_Cluster; +struct envoy_type_metadata_v2_MetadataKind_Host; +typedef struct envoy_type_metadata_v2_MetadataKey envoy_type_metadata_v2_MetadataKey; +typedef struct envoy_type_metadata_v2_MetadataKey_PathSegment envoy_type_metadata_v2_MetadataKey_PathSegment; +typedef struct envoy_type_metadata_v2_MetadataKind envoy_type_metadata_v2_MetadataKind; +typedef struct envoy_type_metadata_v2_MetadataKind_Request envoy_type_metadata_v2_MetadataKind_Request; +typedef struct envoy_type_metadata_v2_MetadataKind_Route envoy_type_metadata_v2_MetadataKind_Route; +typedef struct envoy_type_metadata_v2_MetadataKind_Cluster envoy_type_metadata_v2_MetadataKind_Cluster; +typedef struct envoy_type_metadata_v2_MetadataKind_Host envoy_type_metadata_v2_MetadataKind_Host; +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; + + +/* envoy.type.metadata.v2.MetadataKey */ + +UPB_INLINE envoy_type_metadata_v2_MetadataKey *envoy_type_metadata_v2_MetadataKey_new(upb_arena *arena) { + return (envoy_type_metadata_v2_MetadataKey *)upb_msg_new(&envoy_type_metadata_v2_MetadataKey_msginit, arena); +} +UPB_INLINE envoy_type_metadata_v2_MetadataKey *envoy_type_metadata_v2_MetadataKey_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_metadata_v2_MetadataKey *ret = envoy_type_metadata_v2_MetadataKey_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v2_MetadataKey_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_metadata_v2_MetadataKey_serialize(const envoy_type_metadata_v2_MetadataKey *msg, upb_arena *arena, size_t *len) { + 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 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_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); +} +UPB_INLINE envoy_type_metadata_v2_MetadataKey_PathSegment** envoy_type_metadata_v2_MetadataKey_resize_path(envoy_type_metadata_v2_MetadataKey *msg, size_t len, upb_arena *arena) { + return (envoy_type_metadata_v2_MetadataKey_PathSegment**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_type_metadata_v2_MetadataKey_PathSegment* envoy_type_metadata_v2_MetadataKey_add_path(envoy_type_metadata_v2_MetadataKey *msg, upb_arena *arena) { + struct envoy_type_metadata_v2_MetadataKey_PathSegment* sub = (struct envoy_type_metadata_v2_MetadataKey_PathSegment*)upb_msg_new(&envoy_type_metadata_v2_MetadataKey_PathSegment_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; +} + +/* envoy.type.metadata.v2.MetadataKey.PathSegment */ + +UPB_INLINE envoy_type_metadata_v2_MetadataKey_PathSegment *envoy_type_metadata_v2_MetadataKey_PathSegment_new(upb_arena *arena) { + return (envoy_type_metadata_v2_MetadataKey_PathSegment *)upb_msg_new(&envoy_type_metadata_v2_MetadataKey_PathSegment_msginit, arena); +} +UPB_INLINE envoy_type_metadata_v2_MetadataKey_PathSegment *envoy_type_metadata_v2_MetadataKey_PathSegment_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_metadata_v2_MetadataKey_PathSegment *ret = envoy_type_metadata_v2_MetadataKey_PathSegment_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v2_MetadataKey_PathSegment_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_metadata_v2_MetadataKey_PathSegment_serialize(const envoy_type_metadata_v2_MetadataKey_PathSegment *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_metadata_v2_MetadataKey_PathSegment_msginit, arena, len); +} + +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 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(""))); } + +UPB_INLINE void envoy_type_metadata_v2_MetadataKey_PathSegment_set_key(envoy_type_metadata_v2_MetadataKey_PathSegment *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1); +} + +/* envoy.type.metadata.v2.MetadataKind */ + +UPB_INLINE envoy_type_metadata_v2_MetadataKind *envoy_type_metadata_v2_MetadataKind_new(upb_arena *arena) { + return (envoy_type_metadata_v2_MetadataKind *)upb_msg_new(&envoy_type_metadata_v2_MetadataKind_msginit, arena); +} +UPB_INLINE envoy_type_metadata_v2_MetadataKind *envoy_type_metadata_v2_MetadataKind_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_metadata_v2_MetadataKind *ret = envoy_type_metadata_v2_MetadataKind_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v2_MetadataKind_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_metadata_v2_MetadataKind_serialize(const envoy_type_metadata_v2_MetadataKind *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_metadata_v2_MetadataKind_msginit, arena, len); +} + +typedef enum { + envoy_type_metadata_v2_MetadataKind_kind_request = 1, + envoy_type_metadata_v2_MetadataKind_kind_route = 2, + envoy_type_metadata_v2_MetadataKind_kind_cluster = 3, + 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 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); } +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 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 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 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) { + UPB_WRITE_ONEOF(msg, envoy_type_metadata_v2_MetadataKind_Request*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); +} +UPB_INLINE struct envoy_type_metadata_v2_MetadataKind_Request* envoy_type_metadata_v2_MetadataKind_mutable_request(envoy_type_metadata_v2_MetadataKind *msg, upb_arena *arena) { + struct envoy_type_metadata_v2_MetadataKind_Request* sub = (struct envoy_type_metadata_v2_MetadataKind_Request*)envoy_type_metadata_v2_MetadataKind_request(msg); + if (sub == NULL) { + sub = (struct envoy_type_metadata_v2_MetadataKind_Request*)upb_msg_new(&envoy_type_metadata_v2_MetadataKind_Request_msginit, arena); + if (!sub) return NULL; + envoy_type_metadata_v2_MetadataKind_set_request(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_type_metadata_v2_MetadataKind_set_route(envoy_type_metadata_v2_MetadataKind *msg, envoy_type_metadata_v2_MetadataKind_Route* value) { + UPB_WRITE_ONEOF(msg, envoy_type_metadata_v2_MetadataKind_Route*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2); +} +UPB_INLINE struct envoy_type_metadata_v2_MetadataKind_Route* envoy_type_metadata_v2_MetadataKind_mutable_route(envoy_type_metadata_v2_MetadataKind *msg, upb_arena *arena) { + struct envoy_type_metadata_v2_MetadataKind_Route* sub = (struct envoy_type_metadata_v2_MetadataKind_Route*)envoy_type_metadata_v2_MetadataKind_route(msg); + if (sub == NULL) { + sub = (struct envoy_type_metadata_v2_MetadataKind_Route*)upb_msg_new(&envoy_type_metadata_v2_MetadataKind_Route_msginit, arena); + if (!sub) return NULL; + envoy_type_metadata_v2_MetadataKind_set_route(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_type_metadata_v2_MetadataKind_set_cluster(envoy_type_metadata_v2_MetadataKind *msg, envoy_type_metadata_v2_MetadataKind_Cluster* value) { + UPB_WRITE_ONEOF(msg, envoy_type_metadata_v2_MetadataKind_Cluster*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3); +} +UPB_INLINE struct envoy_type_metadata_v2_MetadataKind_Cluster* envoy_type_metadata_v2_MetadataKind_mutable_cluster(envoy_type_metadata_v2_MetadataKind *msg, upb_arena *arena) { + struct envoy_type_metadata_v2_MetadataKind_Cluster* sub = (struct envoy_type_metadata_v2_MetadataKind_Cluster*)envoy_type_metadata_v2_MetadataKind_cluster(msg); + if (sub == NULL) { + sub = (struct envoy_type_metadata_v2_MetadataKind_Cluster*)upb_msg_new(&envoy_type_metadata_v2_MetadataKind_Cluster_msginit, arena); + if (!sub) return NULL; + envoy_type_metadata_v2_MetadataKind_set_cluster(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_type_metadata_v2_MetadataKind_set_host(envoy_type_metadata_v2_MetadataKind *msg, envoy_type_metadata_v2_MetadataKind_Host* value) { + UPB_WRITE_ONEOF(msg, envoy_type_metadata_v2_MetadataKind_Host*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4); +} +UPB_INLINE struct envoy_type_metadata_v2_MetadataKind_Host* envoy_type_metadata_v2_MetadataKind_mutable_host(envoy_type_metadata_v2_MetadataKind *msg, upb_arena *arena) { + struct envoy_type_metadata_v2_MetadataKind_Host* sub = (struct envoy_type_metadata_v2_MetadataKind_Host*)envoy_type_metadata_v2_MetadataKind_host(msg); + if (sub == NULL) { + sub = (struct envoy_type_metadata_v2_MetadataKind_Host*)upb_msg_new(&envoy_type_metadata_v2_MetadataKind_Host_msginit, arena); + if (!sub) return NULL; + envoy_type_metadata_v2_MetadataKind_set_host(msg, sub); + } + return sub; +} + +/* envoy.type.metadata.v2.MetadataKind.Request */ + +UPB_INLINE envoy_type_metadata_v2_MetadataKind_Request *envoy_type_metadata_v2_MetadataKind_Request_new(upb_arena *arena) { + return (envoy_type_metadata_v2_MetadataKind_Request *)upb_msg_new(&envoy_type_metadata_v2_MetadataKind_Request_msginit, arena); +} +UPB_INLINE envoy_type_metadata_v2_MetadataKind_Request *envoy_type_metadata_v2_MetadataKind_Request_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_metadata_v2_MetadataKind_Request *ret = envoy_type_metadata_v2_MetadataKind_Request_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v2_MetadataKind_Request_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_metadata_v2_MetadataKind_Request_serialize(const envoy_type_metadata_v2_MetadataKind_Request *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_metadata_v2_MetadataKind_Request_msginit, arena, len); +} + + + +/* envoy.type.metadata.v2.MetadataKind.Route */ + +UPB_INLINE envoy_type_metadata_v2_MetadataKind_Route *envoy_type_metadata_v2_MetadataKind_Route_new(upb_arena *arena) { + return (envoy_type_metadata_v2_MetadataKind_Route *)upb_msg_new(&envoy_type_metadata_v2_MetadataKind_Route_msginit, arena); +} +UPB_INLINE envoy_type_metadata_v2_MetadataKind_Route *envoy_type_metadata_v2_MetadataKind_Route_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_metadata_v2_MetadataKind_Route *ret = envoy_type_metadata_v2_MetadataKind_Route_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v2_MetadataKind_Route_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_metadata_v2_MetadataKind_Route_serialize(const envoy_type_metadata_v2_MetadataKind_Route *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_metadata_v2_MetadataKind_Route_msginit, arena, len); +} + + + +/* envoy.type.metadata.v2.MetadataKind.Cluster */ + +UPB_INLINE envoy_type_metadata_v2_MetadataKind_Cluster *envoy_type_metadata_v2_MetadataKind_Cluster_new(upb_arena *arena) { + return (envoy_type_metadata_v2_MetadataKind_Cluster *)upb_msg_new(&envoy_type_metadata_v2_MetadataKind_Cluster_msginit, arena); +} +UPB_INLINE envoy_type_metadata_v2_MetadataKind_Cluster *envoy_type_metadata_v2_MetadataKind_Cluster_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_metadata_v2_MetadataKind_Cluster *ret = envoy_type_metadata_v2_MetadataKind_Cluster_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v2_MetadataKind_Cluster_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_metadata_v2_MetadataKind_Cluster_serialize(const envoy_type_metadata_v2_MetadataKind_Cluster *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_metadata_v2_MetadataKind_Cluster_msginit, arena, len); +} + + + +/* envoy.type.metadata.v2.MetadataKind.Host */ + +UPB_INLINE envoy_type_metadata_v2_MetadataKind_Host *envoy_type_metadata_v2_MetadataKind_Host_new(upb_arena *arena) { + return (envoy_type_metadata_v2_MetadataKind_Host *)upb_msg_new(&envoy_type_metadata_v2_MetadataKind_Host_msginit, arena); +} +UPB_INLINE envoy_type_metadata_v2_MetadataKind_Host *envoy_type_metadata_v2_MetadataKind_Host_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_metadata_v2_MetadataKind_Host *ret = envoy_type_metadata_v2_MetadataKind_Host_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v2_MetadataKind_Host_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_metadata_v2_MetadataKind_Host_serialize(const envoy_type_metadata_v2_MetadataKind_Host *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_metadata_v2_MetadataKind_Host_msginit, arena, len); +} + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_METADATA_V2_METADATA_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/range.upb.c b/src/core/ext/upb-generated/envoy/type/range.upb.c index 245c527fdb5..67de8d007ae 100644 --- a/src/core/ext/upb-generated/envoy/type/range.upb.c +++ b/src/core/ext/upb-generated/envoy/type/range.upb.c @@ -23,6 +23,17 @@ const upb_msglayout envoy_type_Int64Range_msginit = { UPB_SIZE(16, 16), 2, false, }; +static const upb_msglayout_field envoy_type_Int32Range__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 5, 1}, + {2, UPB_SIZE(4, 4), 0, 0, 5, 1}, +}; + +const upb_msglayout envoy_type_Int32Range_msginit = { + NULL, + &envoy_type_Int32Range__fields[0], + UPB_SIZE(8, 8), 2, false, +}; + static const upb_msglayout_field envoy_type_DoubleRange__fields[2] = { {1, UPB_SIZE(0, 0), 0, 0, 1, 1}, {2, UPB_SIZE(8, 8), 0, 0, 1, 1}, 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..22ce3d1f041 100644 --- a/src/core/ext/upb-generated/envoy/type/range.upb.h +++ b/src/core/ext/upb-generated/envoy/type/range.upb.h @@ -21,10 +21,13 @@ extern "C" { #endif struct envoy_type_Int64Range; +struct envoy_type_Int32Range; struct envoy_type_DoubleRange; typedef struct envoy_type_Int64Range envoy_type_Int64Range; +typedef struct envoy_type_Int32Range envoy_type_Int32Range; typedef struct envoy_type_DoubleRange envoy_type_DoubleRange; extern const upb_msglayout envoy_type_Int64Range_msginit; +extern const upb_msglayout envoy_type_Int32Range_msginit; extern const upb_msglayout envoy_type_DoubleRange_msginit; @@ -52,6 +55,30 @@ UPB_INLINE void envoy_type_Int64Range_set_end(envoy_type_Int64Range *msg, int64_ UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; } +/* envoy.type.Int32Range */ + +UPB_INLINE envoy_type_Int32Range *envoy_type_Int32Range_new(upb_arena *arena) { + return (envoy_type_Int32Range *)upb_msg_new(&envoy_type_Int32Range_msginit, arena); +} +UPB_INLINE envoy_type_Int32Range *envoy_type_Int32Range_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_Int32Range *ret = envoy_type_Int32Range_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_Int32Range_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_Int32Range_serialize(const envoy_type_Int32Range *msg, upb_arena *arena, size_t *len) { + 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 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_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; +} + /* envoy.type.DoubleRange */ UPB_INLINE envoy_type_DoubleRange *envoy_type_DoubleRange_new(upb_arena *arena) { diff --git a/src/core/ext/upb-generated/envoy/type/semantic_version.upb.c b/src/core/ext/upb-generated/envoy/type/semantic_version.upb.c new file mode 100644 index 00000000000..a4dd26eae6d --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/semantic_version.upb.c @@ -0,0 +1,28 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/type/semantic_version.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout_field envoy_type_SemanticVersion__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 13, 1}, + {2, UPB_SIZE(4, 4), 0, 0, 13, 1}, + {3, UPB_SIZE(8, 8), 0, 0, 13, 1}, +}; + +const upb_msglayout envoy_type_SemanticVersion_msginit = { + NULL, + &envoy_type_SemanticVersion__fields[0], + UPB_SIZE(12, 12), 3, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..1e628a3b507 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h @@ -0,0 +1,62 @@ +/* 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_UPB_H_ +#define ENVOY_TYPE_SEMANTIC_VERSION_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_type_SemanticVersion; +typedef struct envoy_type_SemanticVersion envoy_type_SemanticVersion; +extern const upb_msglayout envoy_type_SemanticVersion_msginit; + + +/* envoy.type.SemanticVersion */ + +UPB_INLINE envoy_type_SemanticVersion *envoy_type_SemanticVersion_new(upb_arena *arena) { + return (envoy_type_SemanticVersion *)upb_msg_new(&envoy_type_SemanticVersion_msginit, arena); +} +UPB_INLINE envoy_type_SemanticVersion *envoy_type_SemanticVersion_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_SemanticVersion *ret = envoy_type_SemanticVersion_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_SemanticVersion_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_SemanticVersion_serialize(const envoy_type_SemanticVersion *msg, upb_arena *arena, size_t *len) { + 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 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_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_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; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_SEMANTIC_VERSION_PROTO_UPB_H_ */ 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 new file mode 100644 index 00000000000..5a058975986 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c @@ -0,0 +1,88 @@ +/* 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 +#include "upb/msg.h" +#include "envoy/type/tracing/v2/custom_tag.upb.h" +#include "envoy/type/metadata/v2/metadata.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_type_tracing_v2_CustomTag_submsgs[4] = { + &envoy_type_tracing_v2_CustomTag_Environment_msginit, + &envoy_type_tracing_v2_CustomTag_Header_msginit, + &envoy_type_tracing_v2_CustomTag_Literal_msginit, + &envoy_type_tracing_v2_CustomTag_Metadata_msginit, +}; + +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}, +}; + +const upb_msglayout envoy_type_tracing_v2_CustomTag_msginit = { + &envoy_type_tracing_v2_CustomTag_submsgs[0], + &envoy_type_tracing_v2_CustomTag__fields[0], + UPB_SIZE(16, 32), 5, false, +}; + +static const upb_msglayout_field envoy_type_tracing_v2_CustomTag_Literal__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_type_tracing_v2_CustomTag_Literal_msginit = { + NULL, + &envoy_type_tracing_v2_CustomTag_Literal__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +static const upb_msglayout_field envoy_type_tracing_v2_CustomTag_Environment__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_type_tracing_v2_CustomTag_Environment_msginit = { + NULL, + &envoy_type_tracing_v2_CustomTag_Environment__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout_field envoy_type_tracing_v2_CustomTag_Header__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_type_tracing_v2_CustomTag_Header_msginit = { + NULL, + &envoy_type_tracing_v2_CustomTag_Header__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_type_tracing_v2_CustomTag_Metadata_submsgs[2] = { + &envoy_type_metadata_v2_MetadataKey_msginit, + &envoy_type_metadata_v2_MetadataKind_msginit, +}; + +static const upb_msglayout_field envoy_type_tracing_v2_CustomTag_Metadata__fields[3] = { + {1, UPB_SIZE(8, 16), 0, 1, 11, 1}, + {2, UPB_SIZE(12, 24), 0, 0, 11, 1}, + {3, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_type_tracing_v2_CustomTag_Metadata_msginit = { + &envoy_type_tracing_v2_CustomTag_Metadata_submsgs[0], + &envoy_type_tracing_v2_CustomTag_Metadata__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..82345c1bffe --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h @@ -0,0 +1,249 @@ +/* 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_UPB_H_ +#define ENVOY_TYPE_TRACING_V2_CUSTOM_TAG_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_type_tracing_v2_CustomTag; +struct envoy_type_tracing_v2_CustomTag_Literal; +struct envoy_type_tracing_v2_CustomTag_Environment; +struct envoy_type_tracing_v2_CustomTag_Header; +struct envoy_type_tracing_v2_CustomTag_Metadata; +typedef struct envoy_type_tracing_v2_CustomTag envoy_type_tracing_v2_CustomTag; +typedef struct envoy_type_tracing_v2_CustomTag_Literal envoy_type_tracing_v2_CustomTag_Literal; +typedef struct envoy_type_tracing_v2_CustomTag_Environment envoy_type_tracing_v2_CustomTag_Environment; +typedef struct envoy_type_tracing_v2_CustomTag_Header envoy_type_tracing_v2_CustomTag_Header; +typedef struct envoy_type_tracing_v2_CustomTag_Metadata envoy_type_tracing_v2_CustomTag_Metadata; +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; +struct envoy_type_metadata_v2_MetadataKey; +struct envoy_type_metadata_v2_MetadataKind; +extern const upb_msglayout envoy_type_metadata_v2_MetadataKey_msginit; +extern const upb_msglayout envoy_type_metadata_v2_MetadataKind_msginit; + + +/* envoy.type.tracing.v2.CustomTag */ + +UPB_INLINE envoy_type_tracing_v2_CustomTag *envoy_type_tracing_v2_CustomTag_new(upb_arena *arena) { + return (envoy_type_tracing_v2_CustomTag *)upb_msg_new(&envoy_type_tracing_v2_CustomTag_msginit, arena); +} +UPB_INLINE envoy_type_tracing_v2_CustomTag *envoy_type_tracing_v2_CustomTag_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_tracing_v2_CustomTag *ret = envoy_type_tracing_v2_CustomTag_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_tracing_v2_CustomTag_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_tracing_v2_CustomTag_serialize(const envoy_type_tracing_v2_CustomTag *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_tracing_v2_CustomTag_msginit, arena, len); +} + +typedef enum { + envoy_type_tracing_v2_CustomTag_type_literal = 2, + envoy_type_tracing_v2_CustomTag_type_environment = 3, + envoy_type_tracing_v2_CustomTag_type_request_header = 4, + 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 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 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); } +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 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 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_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); +} +UPB_INLINE struct envoy_type_tracing_v2_CustomTag_Literal* envoy_type_tracing_v2_CustomTag_mutable_literal(envoy_type_tracing_v2_CustomTag *msg, upb_arena *arena) { + struct envoy_type_tracing_v2_CustomTag_Literal* sub = (struct envoy_type_tracing_v2_CustomTag_Literal*)envoy_type_tracing_v2_CustomTag_literal(msg); + if (sub == NULL) { + sub = (struct envoy_type_tracing_v2_CustomTag_Literal*)upb_msg_new(&envoy_type_tracing_v2_CustomTag_Literal_msginit, arena); + if (!sub) return NULL; + envoy_type_tracing_v2_CustomTag_set_literal(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_type_tracing_v2_CustomTag_set_environment(envoy_type_tracing_v2_CustomTag *msg, envoy_type_tracing_v2_CustomTag_Environment* value) { + UPB_WRITE_ONEOF(msg, envoy_type_tracing_v2_CustomTag_Environment*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3); +} +UPB_INLINE struct envoy_type_tracing_v2_CustomTag_Environment* envoy_type_tracing_v2_CustomTag_mutable_environment(envoy_type_tracing_v2_CustomTag *msg, upb_arena *arena) { + struct envoy_type_tracing_v2_CustomTag_Environment* sub = (struct envoy_type_tracing_v2_CustomTag_Environment*)envoy_type_tracing_v2_CustomTag_environment(msg); + if (sub == NULL) { + sub = (struct envoy_type_tracing_v2_CustomTag_Environment*)upb_msg_new(&envoy_type_tracing_v2_CustomTag_Environment_msginit, arena); + if (!sub) return NULL; + envoy_type_tracing_v2_CustomTag_set_environment(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_type_tracing_v2_CustomTag_set_request_header(envoy_type_tracing_v2_CustomTag *msg, envoy_type_tracing_v2_CustomTag_Header* value) { + UPB_WRITE_ONEOF(msg, envoy_type_tracing_v2_CustomTag_Header*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 4); +} +UPB_INLINE struct envoy_type_tracing_v2_CustomTag_Header* envoy_type_tracing_v2_CustomTag_mutable_request_header(envoy_type_tracing_v2_CustomTag *msg, upb_arena *arena) { + struct envoy_type_tracing_v2_CustomTag_Header* sub = (struct envoy_type_tracing_v2_CustomTag_Header*)envoy_type_tracing_v2_CustomTag_request_header(msg); + if (sub == NULL) { + sub = (struct envoy_type_tracing_v2_CustomTag_Header*)upb_msg_new(&envoy_type_tracing_v2_CustomTag_Header_msginit, arena); + if (!sub) return NULL; + envoy_type_tracing_v2_CustomTag_set_request_header(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_type_tracing_v2_CustomTag_set_metadata(envoy_type_tracing_v2_CustomTag *msg, envoy_type_tracing_v2_CustomTag_Metadata* value) { + UPB_WRITE_ONEOF(msg, envoy_type_tracing_v2_CustomTag_Metadata*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 5); +} +UPB_INLINE struct envoy_type_tracing_v2_CustomTag_Metadata* envoy_type_tracing_v2_CustomTag_mutable_metadata(envoy_type_tracing_v2_CustomTag *msg, upb_arena *arena) { + struct envoy_type_tracing_v2_CustomTag_Metadata* sub = (struct envoy_type_tracing_v2_CustomTag_Metadata*)envoy_type_tracing_v2_CustomTag_metadata(msg); + if (sub == NULL) { + sub = (struct envoy_type_tracing_v2_CustomTag_Metadata*)upb_msg_new(&envoy_type_tracing_v2_CustomTag_Metadata_msginit, arena); + if (!sub) return NULL; + envoy_type_tracing_v2_CustomTag_set_metadata(msg, sub); + } + return sub; +} + +/* envoy.type.tracing.v2.CustomTag.Literal */ + +UPB_INLINE envoy_type_tracing_v2_CustomTag_Literal *envoy_type_tracing_v2_CustomTag_Literal_new(upb_arena *arena) { + return (envoy_type_tracing_v2_CustomTag_Literal *)upb_msg_new(&envoy_type_tracing_v2_CustomTag_Literal_msginit, arena); +} +UPB_INLINE envoy_type_tracing_v2_CustomTag_Literal *envoy_type_tracing_v2_CustomTag_Literal_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_tracing_v2_CustomTag_Literal *ret = envoy_type_tracing_v2_CustomTag_Literal_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_tracing_v2_CustomTag_Literal_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_tracing_v2_CustomTag_Literal_serialize(const envoy_type_tracing_v2_CustomTag_Literal *msg, upb_arena *arena, size_t *len) { + 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 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; +} + +/* envoy.type.tracing.v2.CustomTag.Environment */ + +UPB_INLINE envoy_type_tracing_v2_CustomTag_Environment *envoy_type_tracing_v2_CustomTag_Environment_new(upb_arena *arena) { + return (envoy_type_tracing_v2_CustomTag_Environment *)upb_msg_new(&envoy_type_tracing_v2_CustomTag_Environment_msginit, arena); +} +UPB_INLINE envoy_type_tracing_v2_CustomTag_Environment *envoy_type_tracing_v2_CustomTag_Environment_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_tracing_v2_CustomTag_Environment *ret = envoy_type_tracing_v2_CustomTag_Environment_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_tracing_v2_CustomTag_Environment_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_tracing_v2_CustomTag_Environment_serialize(const envoy_type_tracing_v2_CustomTag_Environment *msg, upb_arena *arena, size_t *len) { + 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 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_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; +} + +/* envoy.type.tracing.v2.CustomTag.Header */ + +UPB_INLINE envoy_type_tracing_v2_CustomTag_Header *envoy_type_tracing_v2_CustomTag_Header_new(upb_arena *arena) { + return (envoy_type_tracing_v2_CustomTag_Header *)upb_msg_new(&envoy_type_tracing_v2_CustomTag_Header_msginit, arena); +} +UPB_INLINE envoy_type_tracing_v2_CustomTag_Header *envoy_type_tracing_v2_CustomTag_Header_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_tracing_v2_CustomTag_Header *ret = envoy_type_tracing_v2_CustomTag_Header_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_tracing_v2_CustomTag_Header_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_tracing_v2_CustomTag_Header_serialize(const envoy_type_tracing_v2_CustomTag_Header *msg, upb_arena *arena, size_t *len) { + 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 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_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; +} + +/* envoy.type.tracing.v2.CustomTag.Metadata */ + +UPB_INLINE envoy_type_tracing_v2_CustomTag_Metadata *envoy_type_tracing_v2_CustomTag_Metadata_new(upb_arena *arena) { + return (envoy_type_tracing_v2_CustomTag_Metadata *)upb_msg_new(&envoy_type_tracing_v2_CustomTag_Metadata_msginit, arena); +} +UPB_INLINE envoy_type_tracing_v2_CustomTag_Metadata *envoy_type_tracing_v2_CustomTag_Metadata_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_tracing_v2_CustomTag_Metadata *ret = envoy_type_tracing_v2_CustomTag_Metadata_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_tracing_v2_CustomTag_Metadata_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_tracing_v2_CustomTag_Metadata_serialize(const envoy_type_tracing_v2_CustomTag_Metadata *msg, upb_arena *arena, size_t *len) { + 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 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_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); + if (sub == NULL) { + sub = (struct envoy_type_metadata_v2_MetadataKind*)upb_msg_new(&envoy_type_metadata_v2_MetadataKind_msginit, arena); + if (!sub) return NULL; + envoy_type_tracing_v2_CustomTag_Metadata_set_kind(msg, sub); + } + 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_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); + if (sub == NULL) { + sub = (struct envoy_type_metadata_v2_MetadataKey*)upb_msg_new(&envoy_type_metadata_v2_MetadataKey_msginit, arena); + if (!sub) return NULL; + envoy_type_tracing_v2_CustomTag_Metadata_set_metadata_key(msg, sub); + } + 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; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_TRACING_V2_CUSTOM_TAG_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c b/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c new file mode 100644 index 00000000000..fcf32a608bb --- /dev/null +++ b/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c @@ -0,0 +1,48 @@ +/* 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 +#include "upb/msg.h" +#include "udpa/annotations/migrate.upb.h" +#include "google/protobuf/descriptor.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout_field udpa_annotations_MigrateAnnotation__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout udpa_annotations_MigrateAnnotation_msginit = { + NULL, + &udpa_annotations_MigrateAnnotation__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +static const upb_msglayout_field udpa_annotations_FieldMigrateAnnotation__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, +}; + +const upb_msglayout udpa_annotations_FieldMigrateAnnotation_msginit = { + NULL, + &udpa_annotations_FieldMigrateAnnotation__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout_field udpa_annotations_FileMigrateAnnotation__fields[1] = { + {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout udpa_annotations_FileMigrateAnnotation_msginit = { + NULL, + &udpa_annotations_FileMigrateAnnotation__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h b/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h new file mode 100644 index 00000000000..66e35b71676 --- /dev/null +++ b/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h @@ -0,0 +1,104 @@ +/* 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_UPB_H_ +#define UDPA_ANNOTATIONS_MIGRATE_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct udpa_annotations_MigrateAnnotation; +struct udpa_annotations_FieldMigrateAnnotation; +struct udpa_annotations_FileMigrateAnnotation; +typedef struct udpa_annotations_MigrateAnnotation udpa_annotations_MigrateAnnotation; +typedef struct udpa_annotations_FieldMigrateAnnotation udpa_annotations_FieldMigrateAnnotation; +typedef struct udpa_annotations_FileMigrateAnnotation udpa_annotations_FileMigrateAnnotation; +extern const upb_msglayout udpa_annotations_MigrateAnnotation_msginit; +extern const upb_msglayout udpa_annotations_FieldMigrateAnnotation_msginit; +extern const upb_msglayout udpa_annotations_FileMigrateAnnotation_msginit; + + +/* udpa.annotations.MigrateAnnotation */ + +UPB_INLINE udpa_annotations_MigrateAnnotation *udpa_annotations_MigrateAnnotation_new(upb_arena *arena) { + return (udpa_annotations_MigrateAnnotation *)upb_msg_new(&udpa_annotations_MigrateAnnotation_msginit, arena); +} +UPB_INLINE udpa_annotations_MigrateAnnotation *udpa_annotations_MigrateAnnotation_parse(const char *buf, size_t size, + upb_arena *arena) { + udpa_annotations_MigrateAnnotation *ret = udpa_annotations_MigrateAnnotation_new(arena); + return (ret && upb_decode(buf, size, ret, &udpa_annotations_MigrateAnnotation_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *udpa_annotations_MigrateAnnotation_serialize(const udpa_annotations_MigrateAnnotation *msg, upb_arena *arena, size_t *len) { + 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 void udpa_annotations_MigrateAnnotation_set_rename(udpa_annotations_MigrateAnnotation *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} + +/* udpa.annotations.FieldMigrateAnnotation */ + +UPB_INLINE udpa_annotations_FieldMigrateAnnotation *udpa_annotations_FieldMigrateAnnotation_new(upb_arena *arena) { + return (udpa_annotations_FieldMigrateAnnotation *)upb_msg_new(&udpa_annotations_FieldMigrateAnnotation_msginit, arena); +} +UPB_INLINE udpa_annotations_FieldMigrateAnnotation *udpa_annotations_FieldMigrateAnnotation_parse(const char *buf, size_t size, + upb_arena *arena) { + udpa_annotations_FieldMigrateAnnotation *ret = udpa_annotations_FieldMigrateAnnotation_new(arena); + return (ret && upb_decode(buf, size, ret, &udpa_annotations_FieldMigrateAnnotation_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *udpa_annotations_FieldMigrateAnnotation_serialize(const udpa_annotations_FieldMigrateAnnotation *msg, upb_arena *arena, size_t *len) { + 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 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_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; +} + +/* udpa.annotations.FileMigrateAnnotation */ + +UPB_INLINE udpa_annotations_FileMigrateAnnotation *udpa_annotations_FileMigrateAnnotation_new(upb_arena *arena) { + return (udpa_annotations_FileMigrateAnnotation *)upb_msg_new(&udpa_annotations_FileMigrateAnnotation_msginit, arena); +} +UPB_INLINE udpa_annotations_FileMigrateAnnotation *udpa_annotations_FileMigrateAnnotation_parse(const char *buf, size_t size, + upb_arena *arena) { + udpa_annotations_FileMigrateAnnotation *ret = udpa_annotations_FileMigrateAnnotation_new(arena); + return (ret && upb_decode(buf, size, ret, &udpa_annotations_FileMigrateAnnotation_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *udpa_annotations_FileMigrateAnnotation_serialize(const udpa_annotations_FileMigrateAnnotation *msg, upb_arena *arena, size_t *len) { + 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 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; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* UDPA_ANNOTATIONS_MIGRATE_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c b/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c new file mode 100644 index 00000000000..ca1fcb59aed --- /dev/null +++ b/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c @@ -0,0 +1,17 @@ +/* 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 +#include "upb/msg.h" +#include "udpa/annotations/sensitive.upb.h" +#include "google/protobuf/descriptor.upb.h" + +#include "upb/port_def.inc" + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h b/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h new file mode 100644 index 00000000000..33396c2a886 --- /dev/null +++ b/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.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_UPB_H_ +#define UDPA_ANNOTATIONS_SENSITIVE_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* UDPA_ANNOTATIONS_SENSITIVE_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/validate/validate.upb.c b/src/core/ext/upb-generated/validate/validate.upb.c index 6d3c6be1461..2fd97f52f3d 100644 --- a/src/core/ext/upb-generated/validate/validate.upb.c +++ b/src/core/ext/upb-generated/validate/validate.upb.c @@ -41,34 +41,34 @@ static const upb_msglayout *const validate_FieldRules_submsgs[22] = { }; static const upb_msglayout_field validate_FieldRules__fields[22] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 8, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 9, 11, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 10, 11, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 20, 11, 1}, - {6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 21, 11, 1}, - {7, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 16, 11, 1}, - {8, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 17, 11, 1}, - {9, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 6, 11, 1}, - {10, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 7, 11, 1}, - {11, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 14, 11, 1}, - {12, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 15, 11, 1}, - {13, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, - {14, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 18, 11, 1}, - {15, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, - {16, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1}, - {17, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 12, 11, 1}, - {18, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 13, 11, 1}, - {19, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 11, 11, 1}, - {20, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, - {21, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1}, - {22, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 19, 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(-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 = { &validate_FieldRules_submsgs[0], &validate_FieldRules__fields[0], - UPB_SIZE(8, 16), 22, false, + UPB_SIZE(16, 32), 22, false, }; static const upb_msglayout_field validate_FloatRules__fields[7] = { @@ -273,7 +273,7 @@ const upb_msglayout validate_BoolRules_msginit = { UPB_SIZE(2, 2), 1, false, }; -static const upb_msglayout_field validate_StringRules__fields[20] = { +static const upb_msglayout_field validate_StringRules__fields[24] = { {1, UPB_SIZE(56, 56), 7, 0, 9, 1}, {2, UPB_SIZE(8, 8), 1, 0, 4, 1}, {3, UPB_SIZE(16, 16), 2, 0, 4, 1}, @@ -283,23 +283,27 @@ static const upb_msglayout_field validate_StringRules__fields[20] = { {7, UPB_SIZE(72, 88), 9, 0, 9, 1}, {8, UPB_SIZE(80, 104), 10, 0, 9, 1}, {9, UPB_SIZE(88, 120), 11, 0, 9, 1}, - {10, UPB_SIZE(96, 136), 0, 0, 9, 3}, - {11, UPB_SIZE(100, 144), 0, 0, 9, 3}, - {12, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, - {13, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, - {14, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, - {15, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, - {16, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, - {17, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, - {18, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, + {10, UPB_SIZE(104, 152), 0, 0, 9, 3}, + {11, UPB_SIZE(108, 160), 0, 0, 9, 3}, + {12, UPB_SIZE(112, 168), UPB_SIZE(-121, -177), 0, 8, 1}, + {13, UPB_SIZE(112, 168), UPB_SIZE(-121, -177), 0, 8, 1}, + {14, UPB_SIZE(112, 168), UPB_SIZE(-121, -177), 0, 8, 1}, + {15, UPB_SIZE(112, 168), UPB_SIZE(-121, -177), 0, 8, 1}, + {16, UPB_SIZE(112, 168), UPB_SIZE(-121, -177), 0, 8, 1}, + {17, UPB_SIZE(112, 168), UPB_SIZE(-121, -177), 0, 8, 1}, + {18, UPB_SIZE(112, 168), UPB_SIZE(-121, -177), 0, 8, 1}, {19, UPB_SIZE(40, 40), 5, 0, 4, 1}, {20, UPB_SIZE(48, 48), 6, 0, 4, 1}, + {21, UPB_SIZE(112, 168), UPB_SIZE(-121, -177), 0, 8, 1}, + {22, UPB_SIZE(112, 168), UPB_SIZE(-121, -177), 0, 8, 1}, + {23, UPB_SIZE(96, 136), 12, 0, 9, 1}, + {24, UPB_SIZE(112, 168), UPB_SIZE(-121, -177), 0, 14, 1}, }; const upb_msglayout validate_StringRules_msginit = { NULL, &validate_StringRules__fields[0], - UPB_SIZE(112, 160), 20, false, + UPB_SIZE(128, 192), 24, false, }; static const upb_msglayout_field validate_BytesRules__fields[13] = { diff --git a/src/core/ext/upb-generated/validate/validate.upb.h b/src/core/ext/upb-generated/validate/validate.upb.h index cac68a3441f..1a1ba57ae81 100644 --- a/src/core/ext/upb-generated/validate/validate.upb.h +++ b/src/core/ext/upb-generated/validate/validate.upb.h @@ -94,6 +94,12 @@ struct google_protobuf_Timestamp; extern const upb_msglayout google_protobuf_Duration_msginit; extern const upb_msglayout google_protobuf_Timestamp_msginit; +typedef enum { + validate_UNKNOWN = 0, + validate_HTTP_HEADER_NAME = 1, + validate_HTTP_HEADER_VALUE = 2 +} validate_KnownRegex; + /* validate.FieldRules */ @@ -126,7 +132,6 @@ typedef enum { validate_FieldRules_type_string = 14, validate_FieldRules_type_bytes = 15, validate_FieldRules_type_enum = 16, - validate_FieldRules_type_message = 17, validate_FieldRules_type_repeated = 18, validate_FieldRules_type_map = 19, validate_FieldRules_type_any = 20, @@ -134,55 +139,55 @@ 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(4, 8)); } - -UPB_INLINE bool validate_FieldRules_has_float(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } -UPB_INLINE const validate_FloatRules* validate_FieldRules_float(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_FloatRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool validate_FieldRules_has_double(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } -UPB_INLINE const validate_DoubleRules* validate_FieldRules_double(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_DoubleRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } -UPB_INLINE bool validate_FieldRules_has_int32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } -UPB_INLINE const validate_Int32Rules* validate_FieldRules_int32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Int32Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); } -UPB_INLINE bool validate_FieldRules_has_int64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); } -UPB_INLINE const validate_Int64Rules* validate_FieldRules_int64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Int64Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); } -UPB_INLINE bool validate_FieldRules_has_uint32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 5); } -UPB_INLINE const validate_UInt32Rules* validate_FieldRules_uint32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_UInt32Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); } -UPB_INLINE bool validate_FieldRules_has_uint64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 6); } -UPB_INLINE const validate_UInt64Rules* validate_FieldRules_uint64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_UInt64Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, NULL); } -UPB_INLINE bool validate_FieldRules_has_sint32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 7); } -UPB_INLINE const validate_SInt32Rules* validate_FieldRules_sint32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SInt32Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); } -UPB_INLINE bool validate_FieldRules_has_sint64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 8); } -UPB_INLINE const validate_SInt64Rules* validate_FieldRules_sint64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SInt64Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); } -UPB_INLINE bool validate_FieldRules_has_fixed32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 9); } -UPB_INLINE const validate_Fixed32Rules* validate_FieldRules_fixed32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Fixed32Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); } -UPB_INLINE bool validate_FieldRules_has_fixed64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 10); } -UPB_INLINE const validate_Fixed64Rules* validate_FieldRules_fixed64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Fixed64Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 10, NULL); } -UPB_INLINE bool validate_FieldRules_has_sfixed32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 11); } -UPB_INLINE const validate_SFixed32Rules* validate_FieldRules_sfixed32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SFixed32Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 11, NULL); } -UPB_INLINE bool validate_FieldRules_has_sfixed64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 12); } -UPB_INLINE const validate_SFixed64Rules* validate_FieldRules_sfixed64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SFixed64Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 12, NULL); } -UPB_INLINE bool validate_FieldRules_has_bool(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 13); } -UPB_INLINE const validate_BoolRules* validate_FieldRules_bool(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_BoolRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 13, NULL); } -UPB_INLINE bool validate_FieldRules_has_string(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 14); } -UPB_INLINE const validate_StringRules* validate_FieldRules_string(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_StringRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 14, NULL); } -UPB_INLINE bool validate_FieldRules_has_bytes(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 15); } -UPB_INLINE const validate_BytesRules* validate_FieldRules_bytes(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_BytesRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 15, NULL); } -UPB_INLINE bool validate_FieldRules_has_enum(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 16); } -UPB_INLINE const validate_EnumRules* validate_FieldRules_enum(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_EnumRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 16, NULL); } -UPB_INLINE bool validate_FieldRules_has_message(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 17); } -UPB_INLINE const validate_MessageRules* validate_FieldRules_message(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_MessageRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 17, NULL); } -UPB_INLINE bool validate_FieldRules_has_repeated(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 18); } -UPB_INLINE const validate_RepeatedRules* validate_FieldRules_repeated(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_RepeatedRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 18, NULL); } -UPB_INLINE bool validate_FieldRules_has_map(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 19); } -UPB_INLINE const validate_MapRules* validate_FieldRules_map(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_MapRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 19, NULL); } -UPB_INLINE bool validate_FieldRules_has_any(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 20); } -UPB_INLINE const validate_AnyRules* validate_FieldRules_any(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_AnyRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 20, NULL); } -UPB_INLINE bool validate_FieldRules_has_duration(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 21); } -UPB_INLINE const validate_DurationRules* validate_FieldRules_duration(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_DurationRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 21, NULL); } -UPB_INLINE bool validate_FieldRules_has_timestamp(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 22); } -UPB_INLINE const validate_TimestampRules* validate_FieldRules_timestamp(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_TimestampRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 22, NULL); } +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 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); } +UPB_INLINE bool validate_FieldRules_has_double(const validate_FieldRules *msg) { return _upb_has_oneof_field(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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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); } +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 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 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 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) { - UPB_WRITE_ONEOF(msg, validate_FloatRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); + UPB_WRITE_ONEOF(msg, validate_FloatRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 1); } 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); @@ -194,7 +199,7 @@ UPB_INLINE struct validate_FloatRules* validate_FieldRules_mutable_float(validat return sub; } UPB_INLINE void validate_FieldRules_set_double(validate_FieldRules *msg, validate_DoubleRules* value) { - UPB_WRITE_ONEOF(msg, validate_DoubleRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2); + UPB_WRITE_ONEOF(msg, validate_DoubleRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); } 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); @@ -206,7 +211,7 @@ UPB_INLINE struct validate_DoubleRules* validate_FieldRules_mutable_double(valid return sub; } UPB_INLINE void validate_FieldRules_set_int32(validate_FieldRules *msg, validate_Int32Rules* value) { - UPB_WRITE_ONEOF(msg, validate_Int32Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3); + UPB_WRITE_ONEOF(msg, validate_Int32Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3); } 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); @@ -218,7 +223,7 @@ UPB_INLINE struct validate_Int32Rules* validate_FieldRules_mutable_int32(validat return sub; } UPB_INLINE void validate_FieldRules_set_int64(validate_FieldRules *msg, validate_Int64Rules* value) { - UPB_WRITE_ONEOF(msg, validate_Int64Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4); + UPB_WRITE_ONEOF(msg, validate_Int64Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 4); } 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); @@ -230,7 +235,7 @@ UPB_INLINE struct validate_Int64Rules* validate_FieldRules_mutable_int64(validat return sub; } UPB_INLINE void validate_FieldRules_set_uint32(validate_FieldRules *msg, validate_UInt32Rules* value) { - UPB_WRITE_ONEOF(msg, validate_UInt32Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5); + UPB_WRITE_ONEOF(msg, validate_UInt32Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 5); } 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); @@ -242,7 +247,7 @@ UPB_INLINE struct validate_UInt32Rules* validate_FieldRules_mutable_uint32(valid return sub; } UPB_INLINE void validate_FieldRules_set_uint64(validate_FieldRules *msg, validate_UInt64Rules* value) { - UPB_WRITE_ONEOF(msg, validate_UInt64Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 6); + UPB_WRITE_ONEOF(msg, validate_UInt64Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 6); } 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); @@ -254,7 +259,7 @@ UPB_INLINE struct validate_UInt64Rules* validate_FieldRules_mutable_uint64(valid return sub; } UPB_INLINE void validate_FieldRules_set_sint32(validate_FieldRules *msg, validate_SInt32Rules* value) { - UPB_WRITE_ONEOF(msg, validate_SInt32Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 7); + UPB_WRITE_ONEOF(msg, validate_SInt32Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 7); } 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); @@ -266,7 +271,7 @@ UPB_INLINE struct validate_SInt32Rules* validate_FieldRules_mutable_sint32(valid return sub; } UPB_INLINE void validate_FieldRules_set_sint64(validate_FieldRules *msg, validate_SInt64Rules* value) { - UPB_WRITE_ONEOF(msg, validate_SInt64Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 8); + UPB_WRITE_ONEOF(msg, validate_SInt64Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 8); } 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); @@ -278,7 +283,7 @@ UPB_INLINE struct validate_SInt64Rules* validate_FieldRules_mutable_sint64(valid return sub; } UPB_INLINE void validate_FieldRules_set_fixed32(validate_FieldRules *msg, validate_Fixed32Rules* value) { - UPB_WRITE_ONEOF(msg, validate_Fixed32Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 9); + UPB_WRITE_ONEOF(msg, validate_Fixed32Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 9); } 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); @@ -290,7 +295,7 @@ UPB_INLINE struct validate_Fixed32Rules* validate_FieldRules_mutable_fixed32(val return sub; } UPB_INLINE void validate_FieldRules_set_fixed64(validate_FieldRules *msg, validate_Fixed64Rules* value) { - UPB_WRITE_ONEOF(msg, validate_Fixed64Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 10); + UPB_WRITE_ONEOF(msg, validate_Fixed64Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 10); } 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); @@ -302,7 +307,7 @@ UPB_INLINE struct validate_Fixed64Rules* validate_FieldRules_mutable_fixed64(val return sub; } UPB_INLINE void validate_FieldRules_set_sfixed32(validate_FieldRules *msg, validate_SFixed32Rules* value) { - UPB_WRITE_ONEOF(msg, validate_SFixed32Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 11); + UPB_WRITE_ONEOF(msg, validate_SFixed32Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 11); } 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); @@ -314,7 +319,7 @@ UPB_INLINE struct validate_SFixed32Rules* validate_FieldRules_mutable_sfixed32(v return sub; } UPB_INLINE void validate_FieldRules_set_sfixed64(validate_FieldRules *msg, validate_SFixed64Rules* value) { - UPB_WRITE_ONEOF(msg, validate_SFixed64Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 12); + UPB_WRITE_ONEOF(msg, validate_SFixed64Rules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 12); } 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); @@ -326,7 +331,7 @@ UPB_INLINE struct validate_SFixed64Rules* validate_FieldRules_mutable_sfixed64(v return sub; } UPB_INLINE void validate_FieldRules_set_bool(validate_FieldRules *msg, validate_BoolRules* value) { - UPB_WRITE_ONEOF(msg, validate_BoolRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 13); + UPB_WRITE_ONEOF(msg, validate_BoolRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 13); } 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); @@ -338,7 +343,7 @@ UPB_INLINE struct validate_BoolRules* validate_FieldRules_mutable_bool(validate_ return sub; } UPB_INLINE void validate_FieldRules_set_string(validate_FieldRules *msg, validate_StringRules* value) { - UPB_WRITE_ONEOF(msg, validate_StringRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 14); + UPB_WRITE_ONEOF(msg, validate_StringRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 14); } 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); @@ -350,7 +355,7 @@ UPB_INLINE struct validate_StringRules* validate_FieldRules_mutable_string(valid return sub; } UPB_INLINE void validate_FieldRules_set_bytes(validate_FieldRules *msg, validate_BytesRules* value) { - UPB_WRITE_ONEOF(msg, validate_BytesRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 15); + UPB_WRITE_ONEOF(msg, validate_BytesRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 15); } 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); @@ -362,7 +367,7 @@ UPB_INLINE struct validate_BytesRules* validate_FieldRules_mutable_bytes(validat return sub; } UPB_INLINE void validate_FieldRules_set_enum(validate_FieldRules *msg, validate_EnumRules* value) { - UPB_WRITE_ONEOF(msg, validate_EnumRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 16); + UPB_WRITE_ONEOF(msg, validate_EnumRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 16); } 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); @@ -374,7 +379,8 @@ UPB_INLINE struct validate_EnumRules* validate_FieldRules_mutable_enum(validate_ return sub; } UPB_INLINE void validate_FieldRules_set_message(validate_FieldRules *msg, validate_MessageRules* value) { - UPB_WRITE_ONEOF(msg, validate_MessageRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 17); + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, validate_MessageRules*, UPB_SIZE(4, 8)) = 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); @@ -386,7 +392,7 @@ UPB_INLINE struct validate_MessageRules* validate_FieldRules_mutable_message(val return sub; } UPB_INLINE void validate_FieldRules_set_repeated(validate_FieldRules *msg, validate_RepeatedRules* value) { - UPB_WRITE_ONEOF(msg, validate_RepeatedRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 18); + UPB_WRITE_ONEOF(msg, validate_RepeatedRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 18); } 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); @@ -398,7 +404,7 @@ UPB_INLINE struct validate_RepeatedRules* validate_FieldRules_mutable_repeated(v return sub; } UPB_INLINE void validate_FieldRules_set_map(validate_FieldRules *msg, validate_MapRules* value) { - UPB_WRITE_ONEOF(msg, validate_MapRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 19); + UPB_WRITE_ONEOF(msg, validate_MapRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 19); } 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); @@ -410,7 +416,7 @@ UPB_INLINE struct validate_MapRules* validate_FieldRules_mutable_map(validate_Fi return sub; } UPB_INLINE void validate_FieldRules_set_any(validate_FieldRules *msg, validate_AnyRules* value) { - UPB_WRITE_ONEOF(msg, validate_AnyRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 20); + UPB_WRITE_ONEOF(msg, validate_AnyRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 20); } 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); @@ -422,7 +428,7 @@ UPB_INLINE struct validate_AnyRules* validate_FieldRules_mutable_any(validate_Fi return sub; } UPB_INLINE void validate_FieldRules_set_duration(validate_FieldRules *msg, validate_DurationRules* value) { - UPB_WRITE_ONEOF(msg, validate_DurationRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 21); + UPB_WRITE_ONEOF(msg, validate_DurationRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 21); } 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); @@ -434,7 +440,7 @@ UPB_INLINE struct validate_DurationRules* validate_FieldRules_mutable_duration(v return sub; } UPB_INLINE void validate_FieldRules_set_timestamp(validate_FieldRules *msg, validate_TimestampRules* value) { - UPB_WRITE_ONEOF(msg, validate_TimestampRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 22); + UPB_WRITE_ONEOF(msg, validate_TimestampRules*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 22); } 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); @@ -1306,9 +1312,12 @@ typedef enum { validate_StringRules_well_known_ipv6 = 16, validate_StringRules_well_known_uri = 17, validate_StringRules_well_known_uri_ref = 18, + validate_StringRules_well_known_address = 21, + validate_StringRules_well_known_uuid = 22, + 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(108, 156)); } +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(120, 176)); } UPB_INLINE bool validate_StringRules_has_const(const validate_StringRules *msg) { return _upb_has_field(msg, 7); } UPB_INLINE upb_strview validate_StringRules_const(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 56)); } @@ -1328,26 +1337,34 @@ UPB_INLINE bool validate_StringRules_has_suffix(const validate_StringRules *msg) UPB_INLINE upb_strview validate_StringRules_suffix(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(80, 104)); } UPB_INLINE bool validate_StringRules_has_contains(const validate_StringRules *msg) { return _upb_has_field(msg, 11); } UPB_INLINE upb_strview validate_StringRules_contains(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(88, 120)); } -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(96, 136), 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(100, 144), len); } -UPB_INLINE bool validate_StringRules_has_email(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 12); } -UPB_INLINE bool validate_StringRules_email(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 12, false); } -UPB_INLINE bool validate_StringRules_has_hostname(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 13); } -UPB_INLINE bool validate_StringRules_hostname(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 13, false); } -UPB_INLINE bool validate_StringRules_has_ip(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 14); } -UPB_INLINE bool validate_StringRules_ip(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 14, false); } -UPB_INLINE bool validate_StringRules_has_ipv4(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 15); } -UPB_INLINE bool validate_StringRules_ipv4(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 15, false); } -UPB_INLINE bool validate_StringRules_has_ipv6(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 16); } -UPB_INLINE bool validate_StringRules_ipv6(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 16, false); } -UPB_INLINE bool validate_StringRules_has_uri(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 17); } -UPB_INLINE bool validate_StringRules_uri(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 17, false); } -UPB_INLINE bool validate_StringRules_has_uri_ref(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 18); } -UPB_INLINE bool validate_StringRules_uri_ref(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 18, false); } +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(104, 152), 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(108, 160), len); } +UPB_INLINE bool validate_StringRules_has_email(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 176), 12); } +UPB_INLINE bool validate_StringRules_email(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(112, 168), UPB_SIZE(120, 176), 12, false); } +UPB_INLINE bool validate_StringRules_has_hostname(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 176), 13); } +UPB_INLINE bool validate_StringRules_hostname(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(112, 168), UPB_SIZE(120, 176), 13, false); } +UPB_INLINE bool validate_StringRules_has_ip(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 176), 14); } +UPB_INLINE bool validate_StringRules_ip(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(112, 168), UPB_SIZE(120, 176), 14, false); } +UPB_INLINE bool validate_StringRules_has_ipv4(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 176), 15); } +UPB_INLINE bool validate_StringRules_ipv4(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(112, 168), UPB_SIZE(120, 176), 15, false); } +UPB_INLINE bool validate_StringRules_has_ipv6(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 176), 16); } +UPB_INLINE bool validate_StringRules_ipv6(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(112, 168), UPB_SIZE(120, 176), 16, false); } +UPB_INLINE bool validate_StringRules_has_uri(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 176), 17); } +UPB_INLINE bool validate_StringRules_uri(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(112, 168), UPB_SIZE(120, 176), 17, false); } +UPB_INLINE bool validate_StringRules_has_uri_ref(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 176), 18); } +UPB_INLINE bool validate_StringRules_uri_ref(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(112, 168), UPB_SIZE(120, 176), 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 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 bool validate_StringRules_has_address(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 176), 21); } +UPB_INLINE bool validate_StringRules_address(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(112, 168), UPB_SIZE(120, 176), 21, false); } +UPB_INLINE bool validate_StringRules_has_uuid(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 176), 22); } +UPB_INLINE bool validate_StringRules_uuid(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(112, 168), UPB_SIZE(120, 176), 22, false); } +UPB_INLINE bool validate_StringRules_has_not_contains(const validate_StringRules *msg) { return _upb_has_field(msg, 12); } +UPB_INLINE upb_strview validate_StringRules_not_contains(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(96, 136)); } +UPB_INLINE bool validate_StringRules_has_well_known_regex(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 176), 24); } +UPB_INLINE int32_t validate_StringRules_well_known_regex(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(112, 168), UPB_SIZE(120, 176), 24, validate_UNKNOWN); } UPB_INLINE void validate_StringRules_set_const(validate_StringRules *msg, upb_strview value) { _upb_sethas(msg, 7); @@ -1386,45 +1403,45 @@ UPB_INLINE void validate_StringRules_set_contains(validate_StringRules *msg, upb UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(88, 120)) = 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(96, 136), len); + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(104, 152), 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(104, 152), len, UPB_SIZE(8, 16), 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); + msg, UPB_SIZE(104, 152), 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); + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(108, 160), 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(108, 160), len, UPB_SIZE(8, 16), 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); + msg, UPB_SIZE(108, 160), 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); + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(112, 168), value, UPB_SIZE(120, 176), 12); } UPB_INLINE void validate_StringRules_set_hostname(validate_StringRules *msg, bool value) { - UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 13); + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(112, 168), value, UPB_SIZE(120, 176), 13); } UPB_INLINE void validate_StringRules_set_ip(validate_StringRules *msg, bool value) { - UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 14); + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(112, 168), value, UPB_SIZE(120, 176), 14); } UPB_INLINE void validate_StringRules_set_ipv4(validate_StringRules *msg, bool value) { - UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 15); + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(112, 168), value, UPB_SIZE(120, 176), 15); } UPB_INLINE void validate_StringRules_set_ipv6(validate_StringRules *msg, bool value) { - UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 16); + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(112, 168), value, UPB_SIZE(120, 176), 16); } UPB_INLINE void validate_StringRules_set_uri(validate_StringRules *msg, bool value) { - UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 17); + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(112, 168), value, UPB_SIZE(120, 176), 17); } UPB_INLINE void validate_StringRules_set_uri_ref(validate_StringRules *msg, bool value) { - UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 18); + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(112, 168), value, UPB_SIZE(120, 176), 18); } UPB_INLINE void validate_StringRules_set_len(validate_StringRules *msg, uint64_t value) { _upb_sethas(msg, 5); @@ -1434,6 +1451,19 @@ UPB_INLINE void validate_StringRules_set_len_bytes(validate_StringRules *msg, ui _upb_sethas(msg, 6); UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(48, 48)) = value; } +UPB_INLINE void validate_StringRules_set_address(validate_StringRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(112, 168), value, UPB_SIZE(120, 176), 21); +} +UPB_INLINE void validate_StringRules_set_uuid(validate_StringRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(112, 168), value, UPB_SIZE(120, 176), 22); +} +UPB_INLINE void validate_StringRules_set_not_contains(validate_StringRules *msg, upb_strview value) { + _upb_sethas(msg, 12); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(96, 136)) = value; +} +UPB_INLINE void validate_StringRules_set_well_known_regex(validate_StringRules *msg, int32_t value) { + UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(112, 168), value, UPB_SIZE(120, 176), 24); +} /* validate.BytesRules */ diff --git a/src/proto/grpc/testing/xds/eds_for_test.proto b/src/proto/grpc/testing/xds/eds_for_test.proto index e5c4f606407..4cdbf4e3187 100644 --- a/src/proto/grpc/testing/xds/eds_for_test.proto +++ b/src/proto/grpc/testing/xds/eds_for_test.proto @@ -161,6 +161,13 @@ message Node { // version of Envoy is being tested in a heterogeneous fleet. This will be set // by Envoy in management server RPCs. string build_version = 5; + + // Client feature support list. These are well known features described + // in the Envoy API repository for a given major version of an API. Client features + // use reverse DNS naming scheme, for example `com.acme.feature`. + // See :ref:`the list of features ` that xDS client may + // support. + repeated string client_features = 10; } /////////////////////////////////////////////////////////////////////////////// diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 1fbf25a1444..79b5cd216f6 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -116,8 +116,11 @@ CORE_SOURCE_FILES = [ 'src/core/ext/transport/chttp2/transport/writing.cc', '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/resource.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c', @@ -130,13 +133,20 @@ CORE_SOURCE_FILES = [ 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/route.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.c', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c', @@ -146,8 +156,11 @@ CORE_SOURCE_FILES = [ 'src/core/ext/upb-generated/envoy/type/http.upb.c', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.c', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c', 'src/core/ext/upb-generated/envoy/type/percent.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.c', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.c', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c', 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', 'src/core/ext/upb-generated/google/api/annotations.upb.c', 'src/core/ext/upb-generated/google/api/http.upb.c', @@ -164,6 +177,8 @@ CORE_SOURCE_FILES = [ '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/sensitive.upb.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/lib/avl/avl.cc', diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc index 76a59661334..40ed071854b 100644 --- a/test/cpp/end2end/xds_end2end_test.cc +++ b/test/cpp/end2end/xds_end2end_test.cc @@ -546,6 +546,9 @@ class AdsServiceImpl : public AdsService { if (!stream->Read(&request)) return; if (!seen_first_request) { EXPECT_TRUE(request.has_node()); + ASSERT_FALSE(request.node().client_features().empty()); + EXPECT_EQ(request.node().client_features(0), + "envoy.lb.does_not_support_overprovisioning"); seen_first_request = true; } if (request.type_url() == kLdsTypeUrl) { diff --git a/third_party/envoy-api b/third_party/envoy-api index c83ed7ea9eb..0487bbb43c3 160000 --- a/third_party/envoy-api +++ b/third_party/envoy-api @@ -1 +1 @@ -Subproject commit c83ed7ea9eb5fb3b93d1ad52b59750f1958b8bde +Subproject commit 0487bbb43c3e8b54c7332f74ba7344d8265774f7 diff --git a/third_party/protoc-gen-validate b/third_party/protoc-gen-validate index e143189bf6f..c0a080f4bea 160000 --- a/third_party/protoc-gen-validate +++ b/third_party/protoc-gen-validate @@ -1 +1 @@ -Subproject commit e143189bf6f37b3957fb31743df6a1bcf4a8c685 +Subproject commit c0a080f4bea50bc087cdd8551143ee538cf3459e diff --git a/third_party/udpa b/third_party/udpa index 94324803a49..db4b343e48c 160000 --- a/third_party/udpa +++ b/third_party/udpa @@ -1 +1 @@ -Subproject commit 94324803a497c8f76dbc78df393ef629d3a9f3c3 +Subproject commit db4b343e48c1264bb4d9ff491b059300701dc7c7 diff --git a/tools/codegen/core/gen_upb_api.sh b/tools/codegen/core/gen_upb_api.sh index f0799f23476..9b21472089d 100755 --- a/tools/codegen/core/gen_upb_api.sh +++ b/tools/codegen/core/gen_upb_api.sh @@ -38,6 +38,8 @@ UPB_PLUGIN=$PWD/bazel-bin/protoc-gen-upb popd proto_files=( \ + "envoy/annotations/deprecation.proto" \ + "envoy/annotations/resource.proto" \ "envoy/api/v2/auth/cert.proto" \ "envoy/api/v2/cds.proto" \ "envoy/api/v2/cluster/circuit_breaker.proto" \ @@ -50,15 +52,23 @@ proto_files=( \ "envoy/api/v2/core/health_check.proto" \ "envoy/api/v2/core/http_uri.proto" \ "envoy/api/v2/core/protocol.proto" \ + "envoy/api/v2/cluster.proto" \ "envoy/api/v2/discovery.proto" \ "envoy/api/v2/eds.proto" \ + "envoy/api/v2/endpoint.proto" \ "envoy/api/v2/endpoint/endpoint.proto" \ + "envoy/api/v2/endpoint/endpoint_components.proto" \ "envoy/api/v2/endpoint/load_report.proto" \ "envoy/api/v2/lds.proto" \ + "envoy/api/v2/listener.proto" \ "envoy/api/v2/listener/listener.proto" \ + "envoy/api/v2/listener/listener_components.proto" \ "envoy/api/v2/rds.proto" \ + "envoy/api/v2/route.proto" \ "envoy/api/v2/route/route.proto" \ + "envoy/api/v2/route/route_components.proto" \ "envoy/api/v2/srds.proto" \ + "envoy/api/v2/scoped_route.proto" \ "envoy/config/listener/v2/api_listener.proto" \ "envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto" \ "envoy/config/filter/accesslog/v2/accesslog.proto" \ @@ -68,8 +78,11 @@ proto_files=( \ "envoy/type/matcher/regex.proto" \ "envoy/api/v2/listener/udp_listener_config.proto" \ "envoy/type/matcher/string.proto" \ + "envoy/type/metadata/v2/metadata.proto" \ "envoy/type/percent.proto" \ "envoy/type/range.proto" \ + "envoy/type/semantic_version.proto" \ + "envoy/type/tracing/v2/custom_tag.proto" \ "gogoproto/gogo.proto" \ "google/api/annotations.proto" \ "google/api/http.proto" \ @@ -87,6 +100,8 @@ proto_files=( \ "src/proto/grpc/health/v1/health.proto" \ "src/proto/grpc/lb/v1/load_balancer.proto" \ "udpa/data/orca/v1/orca_load_report.proto" \ + "udpa/annotations/migrate.proto" \ + "udpa/annotations/sensitive.proto" \ "validate/validate.proto") for i in "${proto_files[@]}" diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 04cb62c32bc..a8e51e76479 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1055,10 +1055,16 @@ src/core/ext/transport/chttp2/transport/writing.cc \ src/core/ext/transport/inproc/inproc_plugin.cc \ src/core/ext/transport/inproc/inproc_transport.cc \ 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/resource.upb.c \ +src/core/ext/upb-generated/envoy/annotations/resource.upb.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/cds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cds.upb.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/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/filter.upb.c \ @@ -1083,20 +1089,34 @@ 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/eds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.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/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_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/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/lds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/lds.upb.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/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_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/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/rds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/rds.upb.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/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_components.upb.c \ +src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.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/srds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/srds.upb.h \ src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c \ @@ -1115,10 +1135,16 @@ 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/string.upb.c \ src/core/ext/upb-generated/envoy/type/matcher/string.upb.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/percent.upb.c \ src/core/ext/upb-generated/envoy/type/percent.upb.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/semantic_version.upb.c \ +src/core/ext/upb-generated/envoy/type/semantic_version.upb.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/gogoproto/gogo.upb.c \ src/core/ext/upb-generated/gogoproto/gogo.upb.h \ src/core/ext/upb-generated/google/api/annotations.upb.c \ @@ -1151,6 +1177,10 @@ src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c \ 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.c \ 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/sensitive.upb.c \ +src/core/ext/upb-generated/udpa/annotations/sensitive.upb.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 \ From 8908ea5d79ca1da9b84c9f7ec4252feacfeaee76 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 26 Feb 2020 09:13:04 -0800 Subject: [PATCH 03/19] clang-format --- src/core/ext/filters/client_channel/xds/xds_api.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 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 7df29e0ded1..e6e0a1a1790 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -234,8 +234,8 @@ void PopulateNode(upb_arena* arena, const XdsBootstrap::Node* node, envoy_api_v2_core_Node_set_build_version(node_msg, upb_strview_makez(build_version)); envoy_api_v2_core_Node_add_client_features( - node_msg, - upb_strview_makez("envoy.lb.does_not_support_overprovisioning"), arena); + node_msg, upb_strview_makez("envoy.lb.does_not_support_overprovisioning"), + arena); } envoy_api_v2_DiscoveryRequest* CreateDiscoveryRequest( From c3ac15b4807f1c6d6fedc34d8b6fc1d641e0d941 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 26 Feb 2020 09:14:18 -0800 Subject: [PATCH 04/19] buildifer --- BUILD | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BUILD b/BUILD index c7efdda30fd..23cb180a81f 100644 --- a/BUILD +++ b/BUILD @@ -1098,7 +1098,6 @@ grpc_cc_library( ], language = "c++", deps = [ - "udpa_orca_upb", "gpr_base", "grpc_base", "grpc_client_authority_filter", @@ -1108,6 +1107,7 @@ grpc_cc_library( "orphanable", "ref_counted", "ref_counted_ptr", + "udpa_orca_upb", ], ) @@ -2412,8 +2412,8 @@ grpc_cc_library( "src/core/ext/upb-generated/envoy/api/v2/route.upb.c", "src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c", "src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c", - "src/core/ext/upb-generated/envoy/api/v2/srds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/srds.upb.c", "src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.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/listener/v2/api_listener.upb.c", @@ -2442,8 +2442,8 @@ grpc_cc_library( "src/core/ext/upb-generated/envoy/api/v2/route.upb.h", "src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h", "src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h", - "src/core/ext/upb-generated/envoy/api/v2/srds.upb.h", "src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/srds.upb.h", "src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.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/listener/v2/api_listener.upb.h", @@ -2455,11 +2455,11 @@ grpc_cc_library( ], language = "c++", deps = [ + ":envoy_annotations_upb", ":envoy_core_upb", ":envoy_type_upb", ":google_api_upb", ":proto_gen_validate_upb", - ":envoy_annotations_upb", ":udpa_annotations_upb", ], ) @@ -2508,10 +2508,10 @@ grpc_cc_library( ], language = "c++", deps = [ + ":envoy_annotations_upb", ":envoy_type_upb", ":google_api_upb", ":proto_gen_validate_upb", - ":envoy_annotations_upb", ":udpa_annotations_upb", ], ) @@ -2543,9 +2543,9 @@ grpc_cc_library( ], language = "c++", deps = [ + ":envoy_annotations_upb", ":google_api_upb", ":proto_gen_validate_upb", - ":envoy_annotations_upb", ":udpa_annotations_upb", ], ) From 412419b5f9238ee33f0e86ed5a4f95c2fa6ba9be Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 26 Feb 2020 09:18:27 -0800 Subject: [PATCH 05/19] fix submodule check --- tools/run_tests/sanity/check_submodules.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index cede2708bdd..7df3f9a37fe 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -31,14 +31,14 @@ cat << EOF | awk '{ print $1 }' | sort > "$want_submodules" 73594cde8c9a52a102c4341c244c833aa61b9c06 third_party/bloaty (remotes/origin/wide-14-g73594cd) 1c2769383f027befac5b75b6cedd25daf3bf4dcf third_party/boringssl-with-bazel (remotes/origin/master-with-bazel) e982924acee7f7313b4baa4ee5ec000c5e373c30 third_party/cares/cares (cares-1_15_0) - c83ed7ea9eb5fb3b93d1ad52b59750f1958b8bde third_party/envoy-api (heads/master) + 0487bbb43c3e8b54c7332f74ba7344d8265774f7 third_party/envoy-api (heads/master) 28f50e0fed19872e0fd50dd23ce2ee8cd759338e third_party/gflags (v2.2.0-5-g30dbc81) 80ed4d0bbf65d57cc267dfc63bd2584557f11f9b third_party/googleapis (common-protos-1_3_1-915-g80ed4d0bb) c9ccac7cb7345901884aabf5d1a786cfa6e2f397 third_party/googletest (6e2f397) 15ae750151ac9341e5945eb38f8982d59fb99201 third_party/libuv (v1.34.0) fe1790ca0df67173702f70d5646b82f48f412b99 protobuf (v3.7.0-rc.2-756-gfe1790ca0) - e143189bf6f37b3957fb31743df6a1bcf4a8c685 third_party/protoc-gen-validate (v0.0.10) - 94324803a497c8f76dbc78df393ef629d3a9f3c3 third_party/udpa (heads/master) + c0a080f4bea50bc087cdd8551143ee538cf3459e third_party/protoc-gen-validate (v0.0.10) + db4b343e48c1264bb4d9ff491b059300701dc7c7 third_party/udpa (heads/master) cacf7f1d4e3d44d871b605da3b647f07d718623f third_party/zlib (v1.2.11) EOF From 3c98b9d8fe4a7497acbff66b05a6b7ffffcb35b2 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 26 Feb 2020 10:59:48 -0800 Subject: [PATCH 06/19] populate user_agent_name and user_agent_version --- .../ext/filters/client_channel/xds/xds_api.cc | 38 +++++++++++++------ .../ext/filters/client_channel/xds/xds_api.h | 5 +-- .../filters/client_channel/xds/xds_client.cc | 11 +----- .../filters/client_channel/xds/xds_client.h | 2 - 4 files changed, 29 insertions(+), 27 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 e6e0a1a1790..daff1a57e83 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -22,6 +22,8 @@ #include #include +#include "absl/strings/str_cat.h" + #include #include #include @@ -123,6 +125,10 @@ const char* XdsApi::kCdsTypeUrl = "type.googleapis.com/envoy.api.v2.Cluster"; const char* XdsApi::kEdsTypeUrl = "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment"; +XdsApi::XdsApi(const XdsBootstrap::Node* node) + : node_(node), + user_agent_name_(absl::StrCat("gRPC C-core ", GPR_PLATFORM_STRING)) {} + namespace { void PopulateMetadataValue(upb_arena* arena, google_protobuf_Value* value_pb, @@ -185,7 +191,8 @@ void PopulateMetadataValue(upb_arena* arena, google_protobuf_Value* value_pb, } void PopulateNode(upb_arena* arena, const XdsBootstrap::Node* node, - const char* build_version, const std::string& server_name, + const std::string& user_agent_name, + const std::string& server_name, envoy_api_v2_core_Node* node_msg) { if (node != nullptr) { if (!node->id.empty()) { @@ -231,8 +238,15 @@ void PopulateNode(upb_arena* arena, const XdsBootstrap::Node* node, } } } - envoy_api_v2_core_Node_set_build_version(node_msg, - upb_strview_makez(build_version)); + std::string build_version = + absl::StrCat(user_agent_name, " ", grpc_version_string()); + envoy_api_v2_core_Node_set_build_version( + node_msg, upb_strview_make(build_version.data(), build_version.size())); + envoy_api_v2_core_Node_set_user_agent_name( + node_msg, + upb_strview_make(user_agent_name.data(), user_agent_name.size())); + envoy_api_v2_core_Node_set_user_agent_version( + node_msg, upb_strview_makez(grpc_version_string())); envoy_api_v2_core_Node_add_client_features( node_msg, upb_strview_makez("envoy.lb.does_not_support_overprovisioning"), arena); @@ -241,7 +255,7 @@ void PopulateNode(upb_arena* arena, const XdsBootstrap::Node* node, envoy_api_v2_DiscoveryRequest* CreateDiscoveryRequest( upb_arena* arena, const char* type_url, const std::string& version, const std::string& nonce, grpc_error* error, const XdsBootstrap::Node* node, - const char* build_version) { + const std::string& user_agent_name) { // Create a request. envoy_api_v2_DiscoveryRequest* request = envoy_api_v2_DiscoveryRequest_new(arena); @@ -273,10 +287,10 @@ envoy_api_v2_DiscoveryRequest* CreateDiscoveryRequest( GRPC_ERROR_UNREF(error); } // Populate node. - if (build_version != nullptr) { + if (!user_agent_name.empty()) { envoy_api_v2_core_Node* node_msg = envoy_api_v2_DiscoveryRequest_mutable_node(request, arena); - PopulateNode(arena, node, build_version, "", node_msg); + PopulateNode(arena, node, user_agent_name, "", node_msg); } return request; } @@ -297,7 +311,7 @@ grpc_slice XdsApi::CreateUnsupportedTypeNackRequest(const std::string& type_url, upb::Arena arena; envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest( arena.ptr(), type_url.c_str(), /*version=*/"", nonce, error, - /*node=*/nullptr, /*build_version=*/nullptr); + /*node=*/nullptr, /*user_agent_name=*/""); return SerializeDiscoveryRequest(arena.ptr(), request); } @@ -309,7 +323,7 @@ grpc_slice XdsApi::CreateLdsRequest(const std::string& server_name, envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest(arena.ptr(), kLdsTypeUrl, version, nonce, error, populate_node ? node_ : nullptr, - populate_node ? build_version_ : nullptr); + populate_node ? user_agent_name_ : ""); // Add resource_name. envoy_api_v2_DiscoveryRequest_add_resource_names( request, upb_strview_make(server_name.data(), server_name.size()), @@ -325,7 +339,7 @@ grpc_slice XdsApi::CreateRdsRequest(const std::string& route_config_name, envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest(arena.ptr(), kRdsTypeUrl, version, nonce, error, populate_node ? node_ : nullptr, - populate_node ? build_version_ : nullptr); + populate_node ? user_agent_name_ : ""); // Add resource_name. envoy_api_v2_DiscoveryRequest_add_resource_names( request, @@ -342,7 +356,7 @@ grpc_slice XdsApi::CreateCdsRequest(const std::set& cluster_names, envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest(arena.ptr(), kCdsTypeUrl, version, nonce, error, populate_node ? node_ : nullptr, - populate_node ? build_version_ : nullptr); + populate_node ? user_agent_name_ : ""); // Add resource_names. for (const auto& cluster_name : cluster_names) { envoy_api_v2_DiscoveryRequest_add_resource_names( @@ -359,7 +373,7 @@ grpc_slice XdsApi::CreateEdsRequest( envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest(arena.ptr(), kEdsTypeUrl, version, nonce, error, populate_node ? node_ : nullptr, - populate_node ? build_version_ : nullptr); + populate_node ? user_agent_name_ : ""); // Add resource_names. for (const auto& eds_service_name : eds_service_names) { envoy_api_v2_DiscoveryRequest_add_resource_names( @@ -976,7 +990,7 @@ grpc_slice XdsApi::CreateLrsInitialRequest(const std::string& server_name) { envoy_api_v2_core_Node* node_msg = envoy_service_load_stats_v2_LoadStatsRequest_mutable_node(request, arena.ptr()); - PopulateNode(arena.ptr(), node_, build_version_, server_name, node_msg); + PopulateNode(arena.ptr(), node_, user_agent_name_, server_name, node_msg); 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 866531b35b7..5a1fbbb1f3f 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.h +++ b/src/core/ext/filters/client_channel/xds/xds_api.h @@ -187,8 +187,7 @@ class XdsApi { std::pair, ClusterLoadReport>; - XdsApi(const XdsBootstrap::Node* node, const char* build_version) - : node_(node), build_version_(build_version) {} + explicit XdsApi(const XdsBootstrap::Node* node); // Creates a request to nack an unsupported resource type. // Takes ownership of \a error. @@ -251,7 +250,7 @@ class XdsApi { private: const XdsBootstrap::Node* node_; - const char* build_version_; + std::string user_agent_name_; }; } // namespace grpc_core 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 10286787688..bd4eb9566fc 100644 --- a/src/core/ext/filters/client_channel/xds/xds_client.cc +++ b/src/core/ext/filters/client_channel/xds/xds_client.cc @@ -1714,13 +1714,6 @@ grpc_millis GetRequestTimeout(const grpc_channel_args& args) { {15000, 0, INT_MAX}); } -UniquePtr GenerateBuildVersionString() { - char* build_version_str; - gpr_asprintf(&build_version_str, "gRPC C-core %s %s", grpc_version_string(), - GPR_PLATFORM_STRING); - return UniquePtr(build_version_str); -} - } // namespace XdsClient::XdsClient(Combiner* combiner, grpc_pollset_set* interested_parties, @@ -1729,12 +1722,10 @@ XdsClient::XdsClient(Combiner* combiner, grpc_pollset_set* interested_parties, const grpc_channel_args& channel_args, grpc_error** error) : InternallyRefCounted(&grpc_xds_client_trace), request_timeout_(GetRequestTimeout(channel_args)), - build_version_(GenerateBuildVersionString()), combiner_(GRPC_COMBINER_REF(combiner, "xds_client")), interested_parties_(interested_parties), bootstrap_(XdsBootstrap::ReadFromFile(error)), - api_(bootstrap_ == nullptr ? nullptr : bootstrap_->node(), - build_version_.get()), + api_(bootstrap_ == nullptr ? nullptr : bootstrap_->node()), server_name_(server_name), service_config_watcher_(std::move(watcher)) { if (*error != GRPC_ERROR_NONE) { diff --git a/src/core/ext/filters/client_channel/xds/xds_client.h b/src/core/ext/filters/client_channel/xds/xds_client.h index c6bb5affe15..02e80680399 100644 --- a/src/core/ext/filters/client_channel/xds/xds_client.h +++ b/src/core/ext/filters/client_channel/xds/xds_client.h @@ -226,8 +226,6 @@ class XdsClient : public InternallyRefCounted { const grpc_millis request_timeout_; - grpc_core::UniquePtr build_version_; - Combiner* combiner_; grpc_pollset_set* interested_parties_; From def07a47166d046b7d7e8e3842456e4775bdd9ef Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 26 Feb 2020 11:19:48 -0800 Subject: [PATCH 07/19] clang-format --- .../ext/filters/client_channel/xds/xds_api.cc | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 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 daff1a57e83..1b0dc26b6e6 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -320,10 +320,9 @@ grpc_slice XdsApi::CreateLdsRequest(const std::string& server_name, const std::string& nonce, grpc_error* error, bool populate_node) { upb::Arena arena; - envoy_api_v2_DiscoveryRequest* request = - CreateDiscoveryRequest(arena.ptr(), kLdsTypeUrl, version, nonce, error, - populate_node ? node_ : nullptr, - populate_node ? user_agent_name_ : ""); + envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest( + arena.ptr(), kLdsTypeUrl, version, nonce, error, + populate_node ? node_ : nullptr, populate_node ? user_agent_name_ : ""); // Add resource_name. envoy_api_v2_DiscoveryRequest_add_resource_names( request, upb_strview_make(server_name.data(), server_name.size()), @@ -336,10 +335,9 @@ grpc_slice XdsApi::CreateRdsRequest(const std::string& route_config_name, const std::string& nonce, grpc_error* error, bool populate_node) { upb::Arena arena; - envoy_api_v2_DiscoveryRequest* request = - CreateDiscoveryRequest(arena.ptr(), kRdsTypeUrl, version, nonce, error, - populate_node ? node_ : nullptr, - populate_node ? user_agent_name_ : ""); + envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest( + arena.ptr(), kRdsTypeUrl, version, nonce, error, + populate_node ? node_ : nullptr, populate_node ? user_agent_name_ : ""); // Add resource_name. envoy_api_v2_DiscoveryRequest_add_resource_names( request, @@ -353,10 +351,9 @@ grpc_slice XdsApi::CreateCdsRequest(const std::set& cluster_names, const std::string& nonce, grpc_error* error, bool populate_node) { upb::Arena arena; - envoy_api_v2_DiscoveryRequest* request = - CreateDiscoveryRequest(arena.ptr(), kCdsTypeUrl, version, nonce, error, - populate_node ? node_ : nullptr, - populate_node ? user_agent_name_ : ""); + envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest( + arena.ptr(), kCdsTypeUrl, version, nonce, error, + populate_node ? node_ : nullptr, populate_node ? user_agent_name_ : ""); // Add resource_names. for (const auto& cluster_name : cluster_names) { envoy_api_v2_DiscoveryRequest_add_resource_names( @@ -370,10 +367,9 @@ grpc_slice XdsApi::CreateEdsRequest( const std::set& eds_service_names, const std::string& version, const std::string& nonce, grpc_error* error, bool populate_node) { upb::Arena arena; - envoy_api_v2_DiscoveryRequest* request = - CreateDiscoveryRequest(arena.ptr(), kEdsTypeUrl, version, nonce, error, - populate_node ? node_ : nullptr, - populate_node ? user_agent_name_ : ""); + envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest( + arena.ptr(), kEdsTypeUrl, version, nonce, error, + populate_node ? node_ : nullptr, populate_node ? user_agent_name_ : ""); // Add resource_names. for (const auto& eds_service_name : eds_service_names) { envoy_api_v2_DiscoveryRequest_add_resource_names( From 67a2eb2ba140c204e978c144189a9b1238e3adb9 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 26 Feb 2020 12:13:56 -0800 Subject: [PATCH 08/19] fix use-after-free bug --- .../ext/filters/client_channel/xds/xds_api.cc | 68 ++++++++++++------- .../ext/filters/client_channel/xds/xds_api.h | 3 +- src/proto/grpc/testing/xds/eds_for_test.proto | 12 +++- 3 files changed, 56 insertions(+), 27 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 1b0dc26b6e6..57565c02649 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -127,6 +127,8 @@ const char* XdsApi::kEdsTypeUrl = XdsApi::XdsApi(const XdsBootstrap::Node* node) : node_(node), + build_version_(absl::StrCat("gRPC C-core ", GPR_PLATFORM_STRING, " ", + grpc_version_string())), user_agent_name_(absl::StrCat("gRPC C-core ", GPR_PLATFORM_STRING)) {} namespace { @@ -191,6 +193,7 @@ void PopulateMetadataValue(upb_arena* arena, google_protobuf_Value* value_pb, } void PopulateNode(upb_arena* arena, const XdsBootstrap::Node* node, + const std::string& build_version, const std::string& user_agent_name, const std::string& server_name, envoy_api_v2_core_Node* node_msg) { @@ -238,8 +241,6 @@ void PopulateNode(upb_arena* arena, const XdsBootstrap::Node* node, } } } - std::string build_version = - absl::StrCat(user_agent_name, " ", grpc_version_string()); envoy_api_v2_core_Node_set_build_version( node_msg, upb_strview_make(build_version.data(), build_version.size())); envoy_api_v2_core_Node_set_user_agent_name( @@ -254,8 +255,7 @@ void PopulateNode(upb_arena* arena, const XdsBootstrap::Node* node, envoy_api_v2_DiscoveryRequest* CreateDiscoveryRequest( upb_arena* arena, const char* type_url, const std::string& version, - const std::string& nonce, grpc_error* error, const XdsBootstrap::Node* node, - const std::string& user_agent_name) { + const std::string& nonce, grpc_error* error) { // Create a request. envoy_api_v2_DiscoveryRequest* request = envoy_api_v2_DiscoveryRequest_new(arena); @@ -286,12 +286,6 @@ envoy_api_v2_DiscoveryRequest* CreateDiscoveryRequest( google_rpc_Status_set_message(error_detail, error_description_strview); GRPC_ERROR_UNREF(error); } - // Populate node. - if (!user_agent_name.empty()) { - envoy_api_v2_core_Node* node_msg = - envoy_api_v2_DiscoveryRequest_mutable_node(request, arena); - PopulateNode(arena, node, user_agent_name, "", node_msg); - } return request; } @@ -310,8 +304,7 @@ grpc_slice XdsApi::CreateUnsupportedTypeNackRequest(const std::string& type_url, grpc_error* error) { upb::Arena arena; envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest( - arena.ptr(), type_url.c_str(), /*version=*/"", nonce, error, - /*node=*/nullptr, /*user_agent_name=*/""); + arena.ptr(), type_url.c_str(), /*version=*/"", nonce, error); return SerializeDiscoveryRequest(arena.ptr(), request); } @@ -320,9 +313,15 @@ grpc_slice XdsApi::CreateLdsRequest(const std::string& server_name, const std::string& nonce, grpc_error* error, bool populate_node) { upb::Arena arena; - envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest( - arena.ptr(), kLdsTypeUrl, version, nonce, error, - populate_node ? node_ : nullptr, populate_node ? user_agent_name_ : ""); + envoy_api_v2_DiscoveryRequest* request = + CreateDiscoveryRequest(arena.ptr(), kLdsTypeUrl, version, nonce, error); + // Populate node. + if (populate_node) { + envoy_api_v2_core_Node* node_msg = + envoy_api_v2_DiscoveryRequest_mutable_node(request, arena.ptr()); + PopulateNode(arena.ptr(), node_, build_version_, user_agent_name_, "", + node_msg); + } // Add resource_name. envoy_api_v2_DiscoveryRequest_add_resource_names( request, upb_strview_make(server_name.data(), server_name.size()), @@ -335,9 +334,15 @@ grpc_slice XdsApi::CreateRdsRequest(const std::string& route_config_name, const std::string& nonce, grpc_error* error, bool populate_node) { upb::Arena arena; - envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest( - arena.ptr(), kRdsTypeUrl, version, nonce, error, - populate_node ? node_ : nullptr, populate_node ? user_agent_name_ : ""); + envoy_api_v2_DiscoveryRequest* request = + CreateDiscoveryRequest(arena.ptr(), kRdsTypeUrl, version, nonce, error); + // Populate node. + if (populate_node) { + envoy_api_v2_core_Node* node_msg = + envoy_api_v2_DiscoveryRequest_mutable_node(request, arena.ptr()); + PopulateNode(arena.ptr(), node_, build_version_, user_agent_name_, "", + node_msg); + } // Add resource_name. envoy_api_v2_DiscoveryRequest_add_resource_names( request, @@ -351,9 +356,15 @@ grpc_slice XdsApi::CreateCdsRequest(const std::set& cluster_names, const std::string& nonce, grpc_error* error, bool populate_node) { upb::Arena arena; - envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest( - arena.ptr(), kCdsTypeUrl, version, nonce, error, - populate_node ? node_ : nullptr, populate_node ? user_agent_name_ : ""); + envoy_api_v2_DiscoveryRequest* request = + CreateDiscoveryRequest(arena.ptr(), kCdsTypeUrl, version, nonce, error); + // Populate node. + if (populate_node) { + envoy_api_v2_core_Node* node_msg = + envoy_api_v2_DiscoveryRequest_mutable_node(request, arena.ptr()); + PopulateNode(arena.ptr(), node_, build_version_, user_agent_name_, "", + node_msg); + } // Add resource_names. for (const auto& cluster_name : cluster_names) { envoy_api_v2_DiscoveryRequest_add_resource_names( @@ -367,9 +378,15 @@ grpc_slice XdsApi::CreateEdsRequest( const std::set& eds_service_names, const std::string& version, const std::string& nonce, grpc_error* error, bool populate_node) { upb::Arena arena; - envoy_api_v2_DiscoveryRequest* request = CreateDiscoveryRequest( - arena.ptr(), kEdsTypeUrl, version, nonce, error, - populate_node ? node_ : nullptr, populate_node ? user_agent_name_ : ""); + envoy_api_v2_DiscoveryRequest* request = + CreateDiscoveryRequest(arena.ptr(), kEdsTypeUrl, version, nonce, error); + // Populate node. + if (populate_node) { + envoy_api_v2_core_Node* node_msg = + envoy_api_v2_DiscoveryRequest_mutable_node(request, arena.ptr()); + PopulateNode(arena.ptr(), node_, build_version_, user_agent_name_, "", + node_msg); + } // Add resource_names. for (const auto& eds_service_name : eds_service_names) { envoy_api_v2_DiscoveryRequest_add_resource_names( @@ -986,7 +1003,8 @@ grpc_slice XdsApi::CreateLrsInitialRequest(const std::string& server_name) { envoy_api_v2_core_Node* node_msg = envoy_service_load_stats_v2_LoadStatsRequest_mutable_node(request, arena.ptr()); - PopulateNode(arena.ptr(), node_, user_agent_name_, server_name, node_msg); + PopulateNode(arena.ptr(), node_, build_version_, user_agent_name_, + server_name, node_msg); 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 5a1fbbb1f3f..e894071b9af 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.h +++ b/src/core/ext/filters/client_channel/xds/xds_api.h @@ -250,7 +250,8 @@ class XdsApi { private: const XdsBootstrap::Node* node_; - std::string user_agent_name_; + const std::string build_version_; + const std::string user_agent_name_; }; } // namespace grpc_core diff --git a/src/proto/grpc/testing/xds/eds_for_test.proto b/src/proto/grpc/testing/xds/eds_for_test.proto index 4cdbf4e3187..ece658da7f2 100644 --- a/src/proto/grpc/testing/xds/eds_for_test.proto +++ b/src/proto/grpc/testing/xds/eds_for_test.proto @@ -160,7 +160,17 @@ message Node { // This is motivated by informing a management server during canary which // version of Envoy is being tested in a heterogeneous fleet. This will be set // by Envoy in management server RPCs. - string build_version = 5; + string build_version = 5 [deprecated = true]; + + // Free-form string that identifies the entity requesting config. + // E.g. "envoy" or "grpc" + string user_agent_name = 6; + + oneof user_agent_version_type { + // Free-form string that identifies the version of the entity requesting config. + // E.g. "1.12.2" or "abcd1234", or "SpecialEnvoyBuild" + string user_agent_version = 7; + } // Client feature support list. These are well known features described // in the Envoy API repository for a given major version of an API. Client features From dbea965b8e6d3c11f870c863582cffbcfaf8152c Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 26 Feb 2020 12:24:04 -0800 Subject: [PATCH 09/19] Fix fuzzers to actually run. --- .../compression/message_compress_corpus/dummy | 1 + .../message_decompress_corpus/dummy | 1 + .../stream_compression_corpus/dummy | 1 + .../stream_decompression_corpus/dummy | 1 + test/core/slice/b64_decode_fuzzer.cc | 4 +++ test/core/util/fuzzer_corpus_test.cc | 34 ++++++++++++++----- 6 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 test/core/compression/message_compress_corpus/dummy create mode 100644 test/core/compression/message_decompress_corpus/dummy create mode 100644 test/core/compression/stream_compression_corpus/dummy create mode 100644 test/core/compression/stream_decompression_corpus/dummy diff --git a/test/core/compression/message_compress_corpus/dummy b/test/core/compression/message_compress_corpus/dummy new file mode 100644 index 00000000000..c1b0730e013 --- /dev/null +++ b/test/core/compression/message_compress_corpus/dummy @@ -0,0 +1 @@ +x \ No newline at end of file diff --git a/test/core/compression/message_decompress_corpus/dummy b/test/core/compression/message_decompress_corpus/dummy new file mode 100644 index 00000000000..c1b0730e013 --- /dev/null +++ b/test/core/compression/message_decompress_corpus/dummy @@ -0,0 +1 @@ +x \ No newline at end of file diff --git a/test/core/compression/stream_compression_corpus/dummy b/test/core/compression/stream_compression_corpus/dummy new file mode 100644 index 00000000000..c1b0730e013 --- /dev/null +++ b/test/core/compression/stream_compression_corpus/dummy @@ -0,0 +1 @@ +x \ No newline at end of file diff --git a/test/core/compression/stream_decompression_corpus/dummy b/test/core/compression/stream_decompression_corpus/dummy new file mode 100644 index 00000000000..c1b0730e013 --- /dev/null +++ b/test/core/compression/stream_decompression_corpus/dummy @@ -0,0 +1 @@ +x \ No newline at end of file diff --git a/test/core/slice/b64_decode_fuzzer.cc b/test/core/slice/b64_decode_fuzzer.cc index 96ca91af1b8..3bcd86a7d3a 100644 --- a/test/core/slice/b64_decode_fuzzer.cc +++ b/test/core/slice/b64_decode_fuzzer.cc @@ -19,6 +19,8 @@ #include #include +#include + #include "src/core/lib/slice/b64.h" bool squelch = true; @@ -26,9 +28,11 @@ bool leak_check = true; extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (size < 1) return 0; + grpc_init(); const bool url_safe = static_cast(0x100) < data[0]; grpc_slice res = grpc_base64_decode_with_len( reinterpret_cast(data + 1), size - 1, url_safe); grpc_slice_unref(res); + grpc_shutdown_blocking(); return 0; } diff --git a/test/core/util/fuzzer_corpus_test.cc b/test/core/util/fuzzer_corpus_test.cc index 60529689e06..233a2d5ee73 100644 --- a/test/core/util/fuzzer_corpus_test.cc +++ b/test/core/util/fuzzer_corpus_test.cc @@ -26,6 +26,8 @@ #include #include +#include + #include "src/core/lib/gpr/env.h" #include "src/core/lib/iomgr/load_file.h" #include "test/core/util/test_config.h" @@ -48,15 +50,24 @@ DEFINE_string(directory, "", "Use this directory as test data"); class FuzzerCorpusTest : public ::testing::TestWithParam {}; TEST_P(FuzzerCorpusTest, RunOneExample) { + // Need to call grpc_init() here to use a slice, but need to shut it + // down before calling LLVMFuzzerTestOneInput(), because most + // implementations of that function will initialize and shutdown gRPC + // internally. + grpc_init(); gpr_log(GPR_DEBUG, "Example file: %s", GetParam().c_str()); grpc_slice buffer; squelch = false; leak_check = false; GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", grpc_load_file(GetParam().c_str(), 0, &buffer))); - LLVMFuzzerTestOneInput(GRPC_SLICE_START_PTR(buffer), - GRPC_SLICE_LENGTH(buffer)); + size_t length = GRPC_SLICE_LENGTH(buffer); + void* data = gpr_malloc(length); + memcpy(data, GPR_SLICE_START_PTR(buffer), length); grpc_slice_unref(buffer); + grpc_shutdown_blocking(); + LLVMFuzzerTestOneInput(static_cast(data), length); + gpr_free(data); } class ExampleGenerator @@ -72,19 +83,21 @@ class ExampleGenerator if (!FLAGS_file.empty()) examples_.push_back(FLAGS_file); if (!FLAGS_directory.empty()) { char* test_srcdir = gpr_getenv("TEST_SRCDIR"); + gpr_log(GPR_DEBUG, "test_srcdir=\"%s\"", test_srcdir); + std::string directory = FLAGS_directory; if (test_srcdir != nullptr) { - FLAGS_directory = test_srcdir + - std::string("/com_github_grpc_grpc/") + - FLAGS_directory; + directory = + test_srcdir + std::string("/com_github_grpc_grpc/") + directory; } + gpr_log(GPR_DEBUG, "Using corpus directory: %s", directory.c_str()); DIR* dp; struct dirent* ep; - dp = opendir(FLAGS_directory.c_str()); + dp = opendir(directory.c_str()); if (dp != nullptr) { while ((ep = readdir(dp)) != nullptr) { - if (ep->d_type == DT_REG) { - examples_.push_back(FLAGS_directory + "/" + ep->d_name); + if (strcmp(ep->d_name, ".") != 0 && strcmp(ep->d_name, "..") != 0) { + examples_.push_back(directory + "/" + ep->d_name); } } @@ -96,6 +109,9 @@ class ExampleGenerator gpr_free(test_srcdir); } } + // Make sure we don't succeed without doing anything, which caused + // us to be blind to our fuzzers not running for 9 months. + GPR_ASSERT(!examples_.empty()); } mutable std::vector examples_; @@ -146,8 +162,8 @@ INSTANTIATE_TEST_SUITE_P( int main(int argc, char** argv) { grpc::testing::TestEnvironment env(argc, argv); - ::testing::InitGoogleTest(&argc, argv); grpc::testing::InitTest(&argc, &argv, true); + ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } From ede2ffc1a8b845acaad157c1299d9fdc91313e8a Mon Sep 17 00:00:00 2001 From: Moiz Haidry Date: Wed, 26 Feb 2020 12:51:35 -0800 Subject: [PATCH 10/19] Addressed Mark's comments --- BUILD.gn | 2 +- CMakeLists.txt | 12 ++-- build.yaml | 3 +- grpc.gyp | 2 +- include/grpcpp/security/credentials_impl.h | 6 +- .../composite/composite_credentials.cc | 20 +++---- .../lib/security/credentials/credentials.h | 4 +- .../credentials/oauth2/oauth2_credentials.cc | 1 + .../credentials/oauth2/oauth2_credentials.h | 2 - .../credentials/plugin/plugin_credentials.cc | 10 +++- src/cpp/client/secure_credentials.cc | 3 +- src/cpp/client/secure_credentials.h | 5 +- test/core/security/credentials_test.cc | 56 +++++++++---------- 13 files changed, 64 insertions(+), 62 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 122c579bd5b..c3fbed3adf7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -165,8 +165,8 @@ config("grpc_config") { ":absl/memory:memory", ":absl/strings:str_format", ":absl/strings:strings", - ":absl/types:optional", ":absl/time:time", + ":absl/types:optional", ] public_configs = [ diff --git a/CMakeLists.txt b/CMakeLists.txt index 5535b943c0e..7178420f21b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1447,8 +1447,8 @@ target_link_libraries(gpr absl::memory absl::str_format absl::strings - absl::optional absl::time + absl::optional ) if(_gRPC_PLATFORM_ANDROID) target_link_libraries(gpr @@ -18579,7 +18579,7 @@ generate_pkgconfig( "gRPC platform support library" "${gRPC_CORE_VERSION}" "" - "-lgpr -labsl_time -labsl_time_zone -labsl_civil_time -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" + "-lgpr -labsl_bad_optional_access -labsl_time -labsl_time_zone -labsl_civil_time -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" "" "gpr.pc") @@ -18589,7 +18589,7 @@ generate_pkgconfig( "high performance general RPC framework" "${gRPC_CORE_VERSION}" "gpr openssl" - "-lgrpc -laddress_sorting -lupb -lcares -lz -labsl_time -labsl_time_zone -labsl_civil_time -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" + "-lgrpc -laddress_sorting -lupb -lcares -lz -labsl_bad_optional_access -labsl_time -labsl_time_zone -labsl_civil_time -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" "" "grpc.pc") @@ -18599,7 +18599,7 @@ generate_pkgconfig( "high performance general RPC framework without SSL" "${gRPC_CORE_VERSION}" "gpr" - "-lgrpc_unsecure -labsl_time -labsl_time_zone -labsl_civil_time -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" + "-lgrpc_unsecure -labsl_bad_optional_access -labsl_time -labsl_time_zone -labsl_civil_time -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" "" "grpc_unsecure.pc") @@ -18609,7 +18609,7 @@ generate_pkgconfig( "C++ wrapper for gRPC" "${PACKAGE_VERSION}" "grpc" - "-lgrpc++ -labsl_time -labsl_time_zone -labsl_civil_time -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" + "-lgrpc++ -labsl_bad_optional_access -labsl_time -labsl_time_zone -labsl_civil_time -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" "" "grpc++.pc") @@ -18619,6 +18619,6 @@ generate_pkgconfig( "C++ wrapper for gRPC without SSL" "${PACKAGE_VERSION}" "grpc_unsecure" - "-lgrpc++_unsecure -labsl_time -labsl_time_zone -labsl_civil_time -labsl_bad_optional_access -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" + "-lgrpc++_unsecure -labsl_bad_optional_access -labsl_time -labsl_time_zone -labsl_civil_time -labsl_str_format_internal -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_dynamic_annotations -labsl_int128 -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity" "" "grpc++_unsecure.pc") diff --git a/build.yaml b/build.yaml index 371d6809674..5b442c8b391 100644 --- a/build.yaml +++ b/build.yaml @@ -274,9 +274,8 @@ filegroups: - absl/memory:memory - absl/strings:str_format - absl/strings:strings - - absl/types:optional - absl/time:time - - absl/strings:str_format + - absl/types:optional uses: - gpr_base_headers - name: gpr_base_headers diff --git a/grpc.gyp b/grpc.gyp index d8bba80b271..5c50f3d95d0 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -445,8 +445,8 @@ 'absl/memory:memory', 'absl/strings:str_format', 'absl/strings:strings', - 'absl/types:optional', 'absl/time:time', + 'absl/types:optional', ], 'sources': [ 'src/core/lib/gpr/alloc.cc', diff --git a/include/grpcpp/security/credentials_impl.h b/include/grpcpp/security/credentials_impl.h index 9873cba3f7e..234ea042da9 100644 --- a/include/grpcpp/security/credentials_impl.h +++ b/include/grpcpp/security/credentials_impl.h @@ -115,7 +115,9 @@ class CallCredentials : private grpc::GrpcLibraryCodegen { /// Apply this instance's credentials to \a call. virtual bool ApplyToCall(grpc_call* call) = 0; - virtual grpc::string DebugString() { return "CallCredentials{}"; } + virtual grpc::string DebugString() { + return "CallCredentials did not provide a debug string"; + } protected: friend std::shared_ptr CompositeChannelCredentials( @@ -253,7 +255,7 @@ class MetadataCredentialsPlugin { std::multimap* metadata) = 0; virtual grpc::string DebugString() const { - return "MetadataCredentialsPlugin"; + return "MetadataCredentialsPlugin did not provide a debug string"; } }; diff --git a/src/core/lib/security/credentials/composite/composite_credentials.cc b/src/core/lib/security/credentials/composite/composite_credentials.cc index 8303342aa80..955e19f2ede 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.cc +++ b/src/core/lib/security/credentials/composite/composite_credentials.cc @@ -22,7 +22,10 @@ #include #include +#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/surface/api_trace.h" @@ -117,19 +120,12 @@ void grpc_composite_call_credentials::cancel_get_request_metadata( } std::string grpc_composite_call_credentials::debug_string() const { - std::string debug_str("CompositeCallCredentials"); - if (inner_.empty()) { - return debug_str; + std::vector outputs; + for (auto& inner_cred : inner_) { + outputs.emplace_back(inner_cred->debug_string()); } - debug_str.append("{"); - for (size_t i = 0; i < inner_.size(); ++i) { - debug_str.append(inner_[i]->debug_string()); - if (i != inner_.size() - 1) { - debug_str.append(","); - } - } - debug_str.append("}"); - return debug_str; + return absl::StrCat("CompositeCallCredentials{", absl::StrJoin(outputs, ","), + "}"); } static size_t get_creds_array_size(const grpc_call_credentials* creds, diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 5c677546479..a7a353ec217 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -254,7 +254,9 @@ struct grpc_call_credentials return min_security_level_; } - virtual std::string debug_string() const { return ""; } + virtual std::string debug_string() const { + return "grpc_call_credentials did not provide debug string"; + } const char* type() const { return type_; } diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index 5595984931c..573aec264c7 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -28,6 +28,7 @@ #include #include +#include "absl/strings/str_format.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/inlined_vector.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index 48562a66763..ee03fa76223 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -24,8 +24,6 @@ #include #include -#include "absl/strings/str_format.h" -#include "absl/time/time.h" #include "src/core/lib/json/json.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/uri/uri_parser.h" diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.cc b/src/core/lib/security/credentials/plugin/plugin_credentials.cc index f078f727580..95074947670 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.cc +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.cc @@ -43,13 +43,17 @@ grpc_plugin_credentials::~grpc_plugin_credentials() { } std::string grpc_plugin_credentials::debug_string() const { + std::string debug_str; if (plugin_.debug_string != nullptr) { char* debug_c_str = plugin_.debug_string(plugin_.state); - std::string debug_str(debug_c_str); + if (strlen(debug_c_str) != 0) { + debug_str = debug_c_str; + } gpr_free(debug_c_str); - return debug_str; } - return ""; + return debug_str.empty() + ? "grpc_plugin_credentials did not provide a debug string" + : debug_str; } void grpc_plugin_credentials::pending_request_remove_locked( diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 3d4e43da4d7..b21d5102e23 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -402,8 +402,7 @@ char* MetadataCredentialsPluginWrapper::DebugString(void* wrapper) { GPR_ASSERT(wrapper); MetadataCredentialsPluginWrapper* w = static_cast(wrapper); - char* debug_str = gpr_strdup(w->plugin_->DebugString().c_str()); - return debug_str; + return gpr_strdup(w->plugin_->DebugString().c_str()); } void MetadataCredentialsPluginWrapper::Destroy(void* wrapper) { diff --git a/src/cpp/client/secure_credentials.h b/src/cpp/client/secure_credentials.h index c8f8529338d..84852a47942 100644 --- a/src/cpp/client/secure_credentials.h +++ b/src/cpp/client/secure_credentials.h @@ -26,6 +26,7 @@ #include #include +#include "absl/strings/str_cat.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/cpp/server/thread_pool_interface.h" @@ -66,8 +67,8 @@ class SecureCallCredentials final : public CallCredentials { bool ApplyToCall(grpc_call* call) override; SecureCallCredentials* AsSecureCredentials() override { return this; } grpc::string DebugString() override { - return "SecureCallCredentials{" + grpc::string(c_creds_->debug_string()) + - "}"; + return absl::StrCat("SecureCallCredentials{", + grpc::string(c_creds_->debug_string()), "}"); } private: diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index d938d46f6c3..3299259d1ee 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -640,7 +640,7 @@ static void test_compute_engine_creds_success() { grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT( - !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + strcmp(creds->debug_string().c_str(), expected_creds_debug_string) == 0); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); } @@ -662,7 +662,7 @@ static void test_compute_engine_creds_failure(void) { httpcli_post_should_not_be_called); run_request_metadata_test(creds, auth_md_ctx, state); GPR_ASSERT( - !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + strcmp(creds->debug_string().c_str(), expected_creds_debug_string) == 0); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); } @@ -742,7 +742,7 @@ static void test_refresh_token_creds_success(void) { run_request_metadata_test(creds, auth_md_ctx, state); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT( - !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + strcmp(creds->debug_string().c_str(), expected_creds_debug_string) == 0); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); @@ -765,7 +765,7 @@ static void test_refresh_token_creds_failure(void) { token_httpcli_post_failure); run_request_metadata_test(creds, auth_md_ctx, state); GPR_ASSERT( - !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + strcmp(creds->debug_string().c_str(), expected_creds_debug_string) == 0); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); @@ -1000,7 +1000,7 @@ static void test_sts_creds_success(void) { run_request_metadata_test(creds, auth_md_ctx, state); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT( - !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + strcmp(creds->debug_string().c_str(), expected_creds_debug_string) == 0); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); @@ -1086,7 +1086,7 @@ static void test_sts_creds_no_actor_token_success(void) { run_request_metadata_test(creds, auth_md_ctx, state); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT( - !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + strcmp(creds->debug_string().c_str(), expected_creds_debug_string) == 0); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); @@ -1121,7 +1121,7 @@ static void test_sts_creds_load_token_failure(void) { httpcli_post_should_not_be_called); run_request_metadata_test(creds, auth_md_ctx, state); GPR_ASSERT( - !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + strcmp(creds->debug_string().c_str(), expected_creds_debug_string) == 0); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); @@ -1157,7 +1157,7 @@ static void test_sts_creds_http_failure(void) { token_httpcli_post_failure); run_request_metadata_test(creds, auth_md_ctx, state); GPR_ASSERT( - !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + strcmp(creds->debug_string().c_str(), expected_creds_debug_string) == 0); creds->Unref(); grpc_httpcli_set_override(nullptr, nullptr); gpr_free(test_signed_jwt_path); @@ -1183,7 +1183,7 @@ static void validate_jwt_encode_and_sign_params( "777-abaslkan11hlb6nmim3bpspl31ud@developer." "gserviceaccount.com") == 0); if (scope != nullptr) GPR_ASSERT(strcmp(scope, test_scope) == 0); - GPR_ASSERT(!gpr_time_cmp(token_lifetime, grpc_max_auth_token_lifetime())); + GPR_ASSERT(gpr_time_cmp(token_lifetime, grpc_max_auth_token_lifetime()) == 0); } static char* encode_and_sign_jwt_success(const grpc_auth_json_key* json_key, @@ -1228,9 +1228,9 @@ static void test_jwt_creds_lifetime(void) { grpc_max_auth_token_lifetime()) == 0); /* Check security level. */ GPR_ASSERT(jwt_creds->min_security_level() == GRPC_PRIVACY_AND_INTEGRITY); - GPR_ASSERT(!gpr_strincmp(expected_creds_debug_string_prefix, - jwt_creds->debug_string().c_str(), - strlen(expected_creds_debug_string_prefix))); + GPR_ASSERT(gpr_strincmp(expected_creds_debug_string_prefix, + jwt_creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix)) == 0); grpc_call_credentials_release(jwt_creds); // Shorter lifetime. @@ -1240,9 +1240,9 @@ static void test_jwt_creds_lifetime(void) { json_key_string, token_lifetime, nullptr); GPR_ASSERT(gpr_time_cmp(creds_as_jwt(jwt_creds)->jwt_lifetime(), token_lifetime) == 0); - GPR_ASSERT(!gpr_strincmp(expected_creds_debug_string_prefix, - jwt_creds->debug_string().c_str(), - strlen(expected_creds_debug_string_prefix))); + GPR_ASSERT(gpr_strincmp(expected_creds_debug_string_prefix, + jwt_creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix)) == 0); grpc_call_credentials_release(jwt_creds); // Cropped lifetime. @@ -1252,9 +1252,9 @@ static void test_jwt_creds_lifetime(void) { json_key_string, token_lifetime, nullptr); GPR_ASSERT(gpr_time_cmp(creds_as_jwt(jwt_creds)->jwt_lifetime(), grpc_max_auth_token_lifetime()) == 0); - GPR_ASSERT(!gpr_strincmp(expected_creds_debug_string_prefix, - jwt_creds->debug_string().c_str(), - strlen(expected_creds_debug_string_prefix))); + GPR_ASSERT(gpr_strincmp(expected_creds_debug_string_prefix, + jwt_creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix)) == 0); grpc_call_credentials_release(jwt_creds); gpr_free(json_key_string); @@ -1298,9 +1298,9 @@ static void test_jwt_creds_success(void) { grpc_jwt_encode_and_sign_set_override(encode_and_sign_jwt_success); run_request_metadata_test(creds, auth_md_ctx, state); grpc_core::ExecCtx::Get()->Flush(); - GPR_ASSERT(!gpr_strincmp(expected_creds_debug_string_prefix, - creds->debug_string().c_str(), - strlen(expected_creds_debug_string_prefix))); + GPR_ASSERT(gpr_strincmp(expected_creds_debug_string_prefix, + creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix)) == 0); creds->Unref(); gpr_free(json_key_string); @@ -1326,9 +1326,9 @@ static void test_jwt_creds_signing_failure(void) { run_request_metadata_test(creds, auth_md_ctx, state); gpr_free(json_key_string); - GPR_ASSERT(!gpr_strincmp(expected_creds_debug_string_prefix, - creds->debug_string().c_str(), - strlen(expected_creds_debug_string_prefix))); + GPR_ASSERT(gpr_strincmp(expected_creds_debug_string_prefix, + creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix)) == 0); creds->Unref(); grpc_jwt_encode_and_sign_set_override(nullptr); @@ -1621,7 +1621,7 @@ static void test_metadata_plugin_success(void) { run_request_metadata_test(creds, auth_md_ctx, md_state); GPR_ASSERT(state == PLUGIN_GET_METADATA_CALLED_STATE); GPR_ASSERT( - !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + strcmp(creds->debug_string().c_str(), expected_creds_debug_string) == 0); creds->Unref(); GPR_ASSERT(state == PLUGIN_DESTROY_CALLED_STATE); @@ -1655,7 +1655,7 @@ static void test_metadata_plugin_failure(void) { run_request_metadata_test(creds, auth_md_ctx, md_state); GPR_ASSERT(state == PLUGIN_GET_METADATA_CALLED_STATE); GPR_ASSERT( - !gpr_stricmp(creds->debug_string().c_str(), expected_creds_debug_string)); + strcmp(creds->debug_string().c_str(), expected_creds_debug_string) == 0); creds->Unref(); GPR_ASSERT(state == PLUGIN_DESTROY_CALLED_STATE); @@ -1711,8 +1711,8 @@ static void test_channel_creds_duplicate_without_call_creds(void) { grpc_channel_credentials* composite_creds = grpc_composite_channel_credentials_create(channel_creds, call_creds, nullptr); - GPR_ASSERT(!gpr_stricmp(call_creds->debug_string().c_str(), - expected_creds_debug_string)); + GPR_ASSERT(strcmp(call_creds->debug_string().c_str(), + expected_creds_debug_string) == 0); call_creds->Unref(); dup = composite_creds->duplicate_without_call_credentials(); From 4c5ee108da728e41b913c5189428df4eb261aa31 Mon Sep 17 00:00:00 2001 From: Moiz Haidry Date: Wed, 26 Feb 2020 14:14:33 -0800 Subject: [PATCH 11/19] Addressed Yang's comments, I have removed usage of const throughout for consistency --- include/grpcpp/security/credentials_impl.h | 2 +- .../credentials/composite/composite_credentials.cc | 2 +- .../credentials/composite/composite_credentials.h | 4 ++-- src/core/lib/security/credentials/credentials.h | 2 +- .../lib/security/credentials/fake/fake_credentials.h | 4 +--- .../lib/security/credentials/iam/iam_credentials.cc | 11 ++++------- .../lib/security/credentials/iam/iam_credentials.h | 4 ++-- .../lib/security/credentials/jwt/jwt_credentials.h | 2 +- .../security/credentials/oauth2/oauth2_credentials.cc | 10 +++++----- .../security/credentials/oauth2/oauth2_credentials.h | 6 +++--- .../security/credentials/plugin/plugin_credentials.cc | 2 +- .../security/credentials/plugin/plugin_credentials.h | 2 +- test/cpp/end2end/end2end_test.cc | 2 +- 13 files changed, 24 insertions(+), 29 deletions(-) diff --git a/include/grpcpp/security/credentials_impl.h b/include/grpcpp/security/credentials_impl.h index 234ea042da9..aed58283722 100644 --- a/include/grpcpp/security/credentials_impl.h +++ b/include/grpcpp/security/credentials_impl.h @@ -254,7 +254,7 @@ class MetadataCredentialsPlugin { const grpc::AuthContext& channel_auth_context, std::multimap* metadata) = 0; - virtual grpc::string DebugString() const { + virtual grpc::string DebugString() { return "MetadataCredentialsPlugin did not provide a debug string"; } }; diff --git a/src/core/lib/security/credentials/composite/composite_credentials.cc b/src/core/lib/security/credentials/composite/composite_credentials.cc index 955e19f2ede..bccc03472e3 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.cc +++ b/src/core/lib/security/credentials/composite/composite_credentials.cc @@ -119,7 +119,7 @@ void grpc_composite_call_credentials::cancel_get_request_metadata( GRPC_ERROR_UNREF(error); } -std::string grpc_composite_call_credentials::debug_string() const { +std::string grpc_composite_call_credentials::debug_string() { std::vector outputs; for (auto& inner_cred : inner_) { outputs.emplace_back(inner_cred->debug_string()); diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h index d0f22d75e06..57967e1b6c9 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.h +++ b/src/core/lib/security/credentials/composite/composite_credentials.h @@ -21,7 +21,7 @@ #include -#include +#include #include "src/core/lib/gprpp/inlined_vector.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" @@ -93,7 +93,7 @@ class grpc_composite_call_credentials : public grpc_call_credentials { } const CallCredentialsList& inner() const { return inner_; } - std::string debug_string() const override; + std::string debug_string() override; private: void push_to_inner(grpc_core::RefCountedPtr creds, diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index a7a353ec217..4d1af0588f6 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -254,7 +254,7 @@ struct grpc_call_credentials return min_security_level_; } - virtual std::string debug_string() const { + virtual std::string debug_string() { return "grpc_call_credentials did not provide debug string"; } diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h index a5b87391db9..3c2449fac3e 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.h +++ b/src/core/lib/security/credentials/fake/fake_credentials.h @@ -77,9 +77,7 @@ class grpc_md_only_test_credentials : public grpc_call_credentials { void cancel_get_request_metadata(grpc_credentials_mdelem_array* md_array, grpc_error* error) override; - std::string debug_string() const override { - return "MD only Test Credentials"; - }; + std::string debug_string() override { return "MD only Test Credentials"; }; private: grpc_mdelem md_; diff --git a/src/core/lib/security/credentials/iam/iam_credentials.cc b/src/core/lib/security/credentials/iam/iam_credentials.cc index 092a306dfe2..1aeaa888010 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.cc +++ b/src/core/lib/security/credentials/iam/iam_credentials.cc @@ -20,9 +20,6 @@ #include "src/core/lib/security/credentials/iam/iam_credentials.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/surface/api_trace.h" - #include #include #include @@ -51,7 +48,10 @@ void grpc_google_iam_credentials::cancel_get_request_metadata( grpc_google_iam_credentials::grpc_google_iam_credentials( const char* token, const char* authority_selector) - : grpc_call_credentials(GRPC_CALL_CREDENTIALS_TYPE_IAM) { + : grpc_call_credentials(GRPC_CALL_CREDENTIALS_TYPE_IAM), + debug_string_(absl::StrFormat( + "GoogleIAMCredentials{Token:%s,AuthoritySelector:%s}", + token != nullptr ? "present" : "absent", authority_selector)) { grpc_mdelem md = grpc_mdelem_from_slices( grpc_slice_from_static_string(GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY), grpc_slice_from_copied_string(token)); @@ -62,9 +62,6 @@ grpc_google_iam_credentials::grpc_google_iam_credentials( grpc_slice_from_copied_string(authority_selector)); grpc_credentials_mdelem_array_add(&md_array_, md); GRPC_MDELEM_UNREF(md); - debug_string_ = absl::StrFormat( - "GoogleIAMCredentials{Token:%s,AuthoritySelector:%s}", - token != nullptr ? "present" : "absent", authority_selector); } grpc_call_credentials* grpc_google_iam_credentials_create( diff --git a/src/core/lib/security/credentials/iam/iam_credentials.h b/src/core/lib/security/credentials/iam/iam_credentials.h index 3d061a1d395..07139638676 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.h +++ b/src/core/lib/security/credentials/iam/iam_credentials.h @@ -39,11 +39,11 @@ class grpc_google_iam_credentials : public grpc_call_credentials { void cancel_get_request_metadata(grpc_credentials_mdelem_array* md_array, grpc_error* error) override; - std::string debug_string() const override { return debug_string_; } + std::string debug_string() override { return debug_string_; } private: grpc_credentials_mdelem_array md_array_; - std::string debug_string_; + const std::string debug_string_; }; #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_IAM_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h index 16875beb7c4..8ee2665bb4f 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.h +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h @@ -49,7 +49,7 @@ class grpc_service_account_jwt_access_credentials const gpr_timespec& jwt_lifetime() const { return jwt_lifetime_; } const grpc_auth_json_key& key() const { return key_; } - std::string debug_string() const override { + std::string debug_string() override { return absl::StrFormat("JWTAccessCredentials{ExpirationTime:%s}", absl::FormatTime(absl::FromUnixMicros( gpr_timespec_to_micros(jwt_lifetime_)))); diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index 573aec264c7..3a2656496ba 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -357,7 +357,7 @@ grpc_oauth2_token_fetcher_credentials::grpc_oauth2_token_fetcher_credentials() grpc_httpcli_context_init(&httpcli_context_); } -std::string grpc_oauth2_token_fetcher_credentials::debug_string() const { +std::string grpc_oauth2_token_fetcher_credentials::debug_string() { return "OAuth2TokenFetcherCredentials"; } @@ -399,7 +399,7 @@ class grpc_compute_engine_token_fetcher_credentials grpc_resource_quota_unref_internal(resource_quota); } - std::string debug_string() const override { + std::string debug_string() override { return absl::StrFormat( "GoogleComputeEngineTokenFetcherCredentials{%s}", grpc_oauth2_token_fetcher_credentials::debug_string()); @@ -477,7 +477,7 @@ grpc_refresh_token_credentials_create_from_auth_refresh_token( refresh_token); } -std::string grpc_google_refresh_token_credentials::debug_string() const { +std::string grpc_google_refresh_token_credentials::debug_string() { return absl::StrFormat("GoogleRefreshToken{ClientID:%s,%s}", refresh_token_.client_id, grpc_oauth2_token_fetcher_credentials::debug_string()); @@ -555,7 +555,7 @@ class StsTokenFetcherCredentials ~StsTokenFetcherCredentials() override { grpc_uri_destroy(sts_url_); } - std::string debug_string() const override { + std::string debug_string() override { return absl::StrFormat( "StsTokenFetcherCredentials{Path:%s,Authority:%s,%s}", sts_url_->path, sts_url_->authority, @@ -753,7 +753,7 @@ grpc_access_token_credentials::grpc_access_token_credentials( gpr_free(token_md_value); } -std::string grpc_access_token_credentials::debug_string() const { +std::string grpc_access_token_credentials::debug_string() { bool access_token_present = !GRPC_MDISNULL(access_token_md_); return absl::StrFormat("AccessTokenCredentials{Token:%s}", access_token_present ? "present" : "absent"); diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index ee03fa76223..d5f01f13f3e 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -86,7 +86,7 @@ class grpc_oauth2_token_fetcher_credentials : public grpc_call_credentials { void on_http_response(grpc_credentials_metadata_request* r, grpc_error* error); - std::string debug_string() const override; + std::string debug_string() override; protected: virtual void fetch_oauth2(grpc_credentials_metadata_request* req, @@ -115,7 +115,7 @@ class grpc_google_refresh_token_credentials final return refresh_token_; } - std::string debug_string() const override; + std::string debug_string() override; protected: void fetch_oauth2(grpc_credentials_metadata_request* req, @@ -143,7 +143,7 @@ class grpc_access_token_credentials final : public grpc_call_credentials { void cancel_get_request_metadata(grpc_credentials_mdelem_array* md_array, grpc_error* error) override; - std::string debug_string() const override; + std::string debug_string() override; private: grpc_mdelem access_token_md_; diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.cc b/src/core/lib/security/credentials/plugin/plugin_credentials.cc index 95074947670..3ee05c697f3 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.cc +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.cc @@ -42,7 +42,7 @@ grpc_plugin_credentials::~grpc_plugin_credentials() { } } -std::string grpc_plugin_credentials::debug_string() const { +std::string grpc_plugin_credentials::debug_string() { std::string debug_str; if (plugin_.debug_string != nullptr) { char* debug_c_str = plugin_.debug_string(plugin_.state); diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.h b/src/core/lib/security/credentials/plugin/plugin_credentials.h index 413f767d2e3..881eded7643 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.h +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.h @@ -59,7 +59,7 @@ struct grpc_plugin_credentials final : public grpc_call_credentials { // cancelled before completion. void pending_request_complete(pending_request* r); - std::string debug_string() const override; + std::string debug_string() override; private: void pending_request_remove_locked(pending_request* pending_request); diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 1c20e7da731..665a2605244 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -177,7 +177,7 @@ class TestMetadataCredentialsPlugin : public MetadataCredentialsPlugin { } } - grpc::string DebugString() const override { + grpc::string DebugString() override { return absl::StrFormat("TestMetadataCredentials{key:%s,value:%s}", metadata_key_.c_str(), metadata_value_.c_str()); } From d0f91d2e732d8ba76a1df8152ff9edeb1107a9c5 Mon Sep 17 00:00:00 2001 From: Eric Gribkoff Date: Wed, 26 Feb 2020 01:18:35 -0800 Subject: [PATCH 12/19] Use grpc_bazel.sh to run the xds test client using bazel --- tools/internal_ci/linux/grpc_xds.cfg | 6 ++- tools/internal_ci/linux/grpc_xds.sh | 27 ---------- .../linux/grpc_xds_bazel_test_in_docker.sh | 53 +++++++++++++++++++ 3 files changed, 58 insertions(+), 28 deletions(-) delete mode 100755 tools/internal_ci/linux/grpc_xds.sh create mode 100755 tools/internal_ci/linux/grpc_xds_bazel_test_in_docker.sh diff --git a/tools/internal_ci/linux/grpc_xds.cfg b/tools/internal_ci/linux/grpc_xds.cfg index ae91617fda5..d547e7c0e08 100644 --- a/tools/internal_ci/linux/grpc_xds.cfg +++ b/tools/internal_ci/linux/grpc_xds.cfg @@ -15,5 +15,9 @@ # 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_xds.sh" +build_file: "grpc/tools/internal_ci/linux/grpc_bazel.sh" timeout_mins: 60 +env_vars { + key: "BAZEL_SCRIPT" + value: "tools/internal_ci/linux/grpc_xds_bazel_test_in_docker.sh" +} diff --git a/tools/internal_ci/linux/grpc_xds.sh b/tools/internal_ci/linux/grpc_xds.sh deleted file mode 100755 index 2e64455c9b2..00000000000 --- a/tools/internal_ci/linux/grpc_xds.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# 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. - -set -ex - -# change to grpc repo root -cd $(dirname $0)/../../.. - -tools/run_tests/helper_scripts/prep_xds.sh -python3 tools/run_tests/run_xds_tests.py \ - --test_case=all \ - --project_id=grpc-testing \ - --gcp_suffix=$(date '+%s') \ - --verbose \ - --client_cmd='bazel run test/cpp/interop:xds_interop_client -- --server=xds-experimental:///{service_host}:{service_port} --stats_port={stats_port} --qps={qps}' diff --git a/tools/internal_ci/linux/grpc_xds_bazel_test_in_docker.sh b/tools/internal_ci/linux/grpc_xds_bazel_test_in_docker.sh new file mode 100755 index 00000000000..abf2cb1462c --- /dev/null +++ b/tools/internal_ci/linux/grpc_xds_bazel_test_in_docker.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +# 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. + +set -ex -o igncr || set -ex + +mkdir -p /var/local/git +git clone /var/local/jenkins/grpc /var/local/git/grpc +(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \ +&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \ +${name}') +cd /var/local/git/grpc + +VIRTUAL_ENV=$(mktemp -d) +virtualenv "$VIRTUAL_ENV" +PYTHON="$VIRTUAL_ENV"/bin/python +"$PYTHON" -m pip install --upgrade grpcio grpcio-tools google-api-python-client google-auth-httplib2 oauth2client + +# Prepare generated Python code. +TOOLS_DIR=tools/run_tests +PROTO_SOURCE_DIR=src/proto/grpc/testing +PROTO_DEST_DIR="$TOOLS_DIR"/"$PROTO_SOURCE_DIR" +mkdir -p "$PROTO_DEST_DIR" +touch "$TOOLS_DIR"/src/__init__.py +touch "$TOOLS_DIR"/src/proto/__init__.py +touch "$TOOLS_DIR"/src/proto/grpc/__init__.py +touch "$TOOLS_DIR"/src/proto/grpc/testing/__init__.py + +"$PYTHON" -m grpc_tools.protoc \ + --proto_path=. \ + --python_out="$TOOLS_DIR" \ + --grpc_python_out="$TOOLS_DIR" \ + "$PROTO_SOURCE_DIR"/test.proto \ + "$PROTO_SOURCE_DIR"/messages.proto \ + "$PROTO_SOURCE_DIR"/empty.proto + +"$PYTHON" tools/run_tests/run_xds_tests.py \ + --test_case=all \ + --project_id=grpc-testing \ + --gcp_suffix=$(date '+%s') \ + --verbose \ + --client_cmd='bazel run test/cpp/interop:xds_interop_client -- --server=xds-experimental:///{service_host}:{service_port} --stats_port={stats_port} --qps={qps}' From 88b0d84905439f9a4a34e86d655fad2e4e0affeb Mon Sep 17 00:00:00 2001 From: Moiz Haidry Date: Wed, 26 Feb 2020 18:06:26 -0800 Subject: [PATCH 13/19] Addressed Vijay's comments, fixed string headers --- include/grpc/grpc_security.h | 3 +-- src/core/lib/security/credentials/iam/iam_credentials.h | 2 +- src/core/lib/security/credentials/jwt/jwt_credentials.cc | 1 + src/core/lib/security/credentials/jwt/jwt_credentials.h | 2 +- src/core/lib/security/credentials/oauth2/oauth2_credentials.cc | 2 ++ src/core/lib/security/credentials/oauth2/oauth2_credentials.h | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index e0b8baf489e..bec88ec93cf 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -426,8 +426,7 @@ typedef struct { const char** error_details); /** Implements debug string of the given plugin. This method returns an - * allocated string that the caller needs to free using gpr_free() - * */ + * allocated string that the caller needs to free using gpr_free() */ char* (*debug_string)(void* state); /** Destroys the plugin state. */ diff --git a/src/core/lib/security/credentials/iam/iam_credentials.h b/src/core/lib/security/credentials/iam/iam_credentials.h index 07139638676..9d4a1e2e474 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.h +++ b/src/core/lib/security/credentials/iam/iam_credentials.h @@ -21,7 +21,7 @@ #include -#include +#include #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.cc b/src/core/lib/security/credentials/jwt/jwt_credentials.cc index 6c39ca48dea..bed594e5d92 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.cc +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.cc @@ -21,6 +21,7 @@ #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" #include +#include #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h index 8ee2665bb4f..88c0b55598f 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.h +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h @@ -21,7 +21,7 @@ #include -#include +#include #include diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index 3a2656496ba..88b911d6035 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -21,6 +21,8 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" +#include + #include #include #include diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index d5f01f13f3e..9065da4f1d6 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -21,7 +21,7 @@ #include -#include +#include #include #include "src/core/lib/json/json.h" From 38a676ca2e1150d6441492582f2dc8485c4fabc2 Mon Sep 17 00:00:00 2001 From: Moiz Haidry Date: Wed, 26 Feb 2020 20:10:25 -0800 Subject: [PATCH 14/19] Fix abseil version --- third_party/abseil-cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/abseil-cpp b/third_party/abseil-cpp index 37dd2562ec8..b832dce8489 160000 --- a/third_party/abseil-cpp +++ b/third_party/abseil-cpp @@ -1 +1 @@ -Subproject commit 37dd2562ec830d547a1524bb306be313ac3f2556 +Subproject commit b832dce8489ef7b6231384909fd9b68d5a5ff2b7 From 612c743f54f15731f0fcb1295c02629877000ee2 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 26 Feb 2020 20:12:27 -0800 Subject: [PATCH 15/19] Remove the flakiness of disappearing_server end2end test. Fix #21221 --- test/core/end2end/tests/disappearing_server.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/core/end2end/tests/disappearing_server.cc b/test/core/end2end/tests/disappearing_server.cc index 0858ce39597..1380b5c362b 100644 --- a/test/core/end2end/tests/disappearing_server.cc +++ b/test/core/end2end/tests/disappearing_server.cc @@ -161,6 +161,14 @@ static void do_request_and_shutdown_server(grpc_end2end_test_config /*config*/, CQ_EXPECT_COMPLETION(cqv, tag(1), 1); CQ_EXPECT_COMPLETION(cqv, tag(1000), 1); cq_verify(cqv); + /* Please refer https://github.com/grpc/grpc/issues/21221 for additional + * details. + * TODO(yashykt@) - The following line should be removeable after C-Core + * correctly handles GOAWAY frames. Internal Reference b/135458602. If this + * test remains flaky even after this, an alternative fix would be to send a + * request when the server is in the shut down state. + */ + cq_verify_empty(cqv); GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED); GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); From e9b06b5a0f7a5f17d51636db9908e754d9231737 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 27 Feb 2020 12:03:41 -0500 Subject: [PATCH 16/19] increase timeout for grpc_build_*_at_head.cfg --- tools/internal_ci/linux/grpc_build_boringssl_at_head.cfg | 2 +- tools/internal_ci/linux/grpc_build_protobuf_at_head.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/internal_ci/linux/grpc_build_boringssl_at_head.cfg b/tools/internal_ci/linux/grpc_build_boringssl_at_head.cfg index 8dfc431566e..eae125dfbf4 100644 --- a/tools/internal_ci/linux/grpc_build_boringssl_at_head.cfg +++ b/tools/internal_ci/linux/grpc_build_boringssl_at_head.cfg @@ -16,7 +16,7 @@ # Location of the continuous shell script in repository. build_file: "grpc/tools/internal_ci/linux/grpc_build_submodule_at_head.sh" -timeout_mins: 180 +timeout_mins: 240 action { define_artifacts { regex: "**/*sponge_log.*" diff --git a/tools/internal_ci/linux/grpc_build_protobuf_at_head.cfg b/tools/internal_ci/linux/grpc_build_protobuf_at_head.cfg index aef6a7a1dcb..0ec016ec6e2 100644 --- a/tools/internal_ci/linux/grpc_build_protobuf_at_head.cfg +++ b/tools/internal_ci/linux/grpc_build_protobuf_at_head.cfg @@ -16,7 +16,7 @@ # Location of the continuous shell script in repository. build_file: "grpc/tools/internal_ci/linux/grpc_build_submodule_at_head.sh" -timeout_mins: 180 +timeout_mins: 240 action { define_artifacts { regex: "**/*sponge_log.*" From f53456210d1daab6de1313baa29debc42ee6aaff Mon Sep 17 00:00:00 2001 From: Moiz Haidry Date: Thu, 27 Feb 2020 09:03:52 -0800 Subject: [PATCH 17/19] Addressed Mark's comments --- .../credentials/plugin/plugin_credentials.cc | 17 +++++------ test/core/security/credentials_test.cc | 30 +++++++++---------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.cc b/src/core/lib/security/credentials/plugin/plugin_credentials.cc index 3ee05c697f3..ebe59212f82 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.cc +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.cc @@ -43,17 +43,16 @@ grpc_plugin_credentials::~grpc_plugin_credentials() { } std::string grpc_plugin_credentials::debug_string() { - std::string debug_str; + char* debug_c_str = nullptr; if (plugin_.debug_string != nullptr) { - char* debug_c_str = plugin_.debug_string(plugin_.state); - if (strlen(debug_c_str) != 0) { - debug_str = debug_c_str; - } - gpr_free(debug_c_str); + debug_c_str = plugin_.debug_string(plugin_.state); } - return debug_str.empty() - ? "grpc_plugin_credentials did not provide a debug string" - : debug_str; + std::string debug_str( + debug_c_str != nullptr + ? debug_c_str + : "grpc_plugin_credentials did not provide a debug string"); + gpr_free(debug_c_str); + return debug_str; } void grpc_plugin_credentials::pending_request_remove_locked( diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index 3299259d1ee..fd0cf6cc403 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -1228,9 +1228,9 @@ static void test_jwt_creds_lifetime(void) { grpc_max_auth_token_lifetime()) == 0); /* Check security level. */ GPR_ASSERT(jwt_creds->min_security_level() == GRPC_PRIVACY_AND_INTEGRITY); - GPR_ASSERT(gpr_strincmp(expected_creds_debug_string_prefix, - jwt_creds->debug_string().c_str(), - strlen(expected_creds_debug_string_prefix)) == 0); + GPR_ASSERT(strncmp(expected_creds_debug_string_prefix, + jwt_creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix)) == 0); grpc_call_credentials_release(jwt_creds); // Shorter lifetime. @@ -1240,9 +1240,9 @@ static void test_jwt_creds_lifetime(void) { json_key_string, token_lifetime, nullptr); GPR_ASSERT(gpr_time_cmp(creds_as_jwt(jwt_creds)->jwt_lifetime(), token_lifetime) == 0); - GPR_ASSERT(gpr_strincmp(expected_creds_debug_string_prefix, - jwt_creds->debug_string().c_str(), - strlen(expected_creds_debug_string_prefix)) == 0); + GPR_ASSERT(strncmp(expected_creds_debug_string_prefix, + jwt_creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix)) == 0); grpc_call_credentials_release(jwt_creds); // Cropped lifetime. @@ -1252,9 +1252,9 @@ static void test_jwt_creds_lifetime(void) { json_key_string, token_lifetime, nullptr); GPR_ASSERT(gpr_time_cmp(creds_as_jwt(jwt_creds)->jwt_lifetime(), grpc_max_auth_token_lifetime()) == 0); - GPR_ASSERT(gpr_strincmp(expected_creds_debug_string_prefix, - jwt_creds->debug_string().c_str(), - strlen(expected_creds_debug_string_prefix)) == 0); + GPR_ASSERT(strncmp(expected_creds_debug_string_prefix, + jwt_creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix)) == 0); grpc_call_credentials_release(jwt_creds); gpr_free(json_key_string); @@ -1298,9 +1298,9 @@ static void test_jwt_creds_success(void) { grpc_jwt_encode_and_sign_set_override(encode_and_sign_jwt_success); run_request_metadata_test(creds, auth_md_ctx, state); grpc_core::ExecCtx::Get()->Flush(); - GPR_ASSERT(gpr_strincmp(expected_creds_debug_string_prefix, - creds->debug_string().c_str(), - strlen(expected_creds_debug_string_prefix)) == 0); + GPR_ASSERT(strncmp(expected_creds_debug_string_prefix, + creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix)) == 0); creds->Unref(); gpr_free(json_key_string); @@ -1326,9 +1326,9 @@ static void test_jwt_creds_signing_failure(void) { run_request_metadata_test(creds, auth_md_ctx, state); gpr_free(json_key_string); - GPR_ASSERT(gpr_strincmp(expected_creds_debug_string_prefix, - creds->debug_string().c_str(), - strlen(expected_creds_debug_string_prefix)) == 0); + GPR_ASSERT(strncmp(expected_creds_debug_string_prefix, + creds->debug_string().c_str(), + strlen(expected_creds_debug_string_prefix)) == 0); creds->Unref(); grpc_jwt_encode_and_sign_set_override(nullptr); From fe72304e54541ac50004064c427c23efdbbc8ded Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 18 Feb 2020 11:06:26 +0000 Subject: [PATCH 18/19] Switch registered calls to a map and check the map before inserting --- BUILD | 6 +- CMakeLists.txt | 3 + Makefile | 11 ++++ build_autogenerated.yaml | 3 + include/grpc/grpc.h | 4 +- include/grpcpp/channel_impl.h | 4 ++ include/grpcpp/test/channel_test_peer.h | 44 ++++++++++++++ src/core/lib/surface/channel.cc | 78 +++++++++++++++---------- src/core/lib/surface/channel.h | 39 +++++++++++-- src/cpp/client/channel_test_peer.cc | 40 +++++++++++++ test/cpp/end2end/BUILD | 1 + test/cpp/end2end/end2end_test.cc | 14 +++++ 12 files changed, 209 insertions(+), 38 deletions(-) create mode 100644 include/grpcpp/test/channel_test_peer.h create mode 100644 src/cpp/client/channel_test_peer.cc diff --git a/BUILD b/BUILD index 7f3073a6ef4..9de86e8c5d3 100644 --- a/BUILD +++ b/BUILD @@ -2259,12 +2259,16 @@ grpc_cc_library( grpc_cc_library( name = "grpc++_test", + srcs = [ + "src/cpp/client/channel_test_peer.cc", + ], public_hdrs = [ "include/grpc++/test/mock_stream.h", "include/grpc++/test/server_context_test_spouse.h", + "include/grpcpp/test/channel_test_peer.h", + "include/grpcpp/test/default_reactor_test_peer.h", "include/grpcpp/test/mock_stream.h", "include/grpcpp/test/server_context_test_spouse.h", - "include/grpcpp/test/default_reactor_test_peer.h", ], deps = [ ":grpc++", diff --git a/CMakeLists.txt b/CMakeLists.txt index dfac08bdb89..d0973cffe4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10217,6 +10217,7 @@ add_executable(end2end_test ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.grpc.pb.h + src/cpp/client/channel_test_peer.cc test/cpp/end2end/end2end_test.cc test/cpp/end2end/interceptors_util.cc test/cpp/end2end/test_service_impl.cc @@ -11903,6 +11904,7 @@ add_executable(mock_test ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.grpc.pb.h + src/cpp/client/channel_test_peer.cc test/cpp/end2end/mock_test.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -12879,6 +12881,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(server_context_test_spouse_test + src/cpp/client/channel_test_peer.cc test/cpp/test/server_context_test_spouse_test.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc diff --git a/Makefile b/Makefile index cb51b9aa63c..2b6f2efe939 100644 --- a/Makefile +++ b/Makefile @@ -13870,6 +13870,7 @@ END2END_TEST_SRC = \ $(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 \ + src/cpp/client/channel_test_peer.cc \ test/cpp/end2end/end2end_test.cc \ test/cpp/end2end/interceptors_util.cc \ test/cpp/end2end/test_service_impl.cc \ @@ -13911,6 +13912,8 @@ $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo_messages.o: $(LIBDIR)/$(CONFIG) $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/simple_messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a +$(OBJDIR)/$(CONFIG)/src/cpp/client/channel_test_peer.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a + $(OBJDIR)/$(CONFIG)/test/cpp/end2end/end2end_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OBJDIR)/$(CONFIG)/test/cpp/end2end/interceptors_util.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a @@ -13924,6 +13927,7 @@ ifneq ($(NO_DEPS),true) -include $(END2END_TEST_OBJS:.o=.dep) endif endif +$(OBJDIR)/$(CONFIG)/src/cpp/client/channel_test_peer.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(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 $(OBJDIR)/$(CONFIG)/test/cpp/end2end/end2end_test.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(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 $(OBJDIR)/$(CONFIG)/test/cpp/end2end/interceptors_util.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(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 $(OBJDIR)/$(CONFIG)/test/cpp/end2end/test_service_impl.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(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 @@ -15866,6 +15870,7 @@ MOCK_TEST_SRC = \ $(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 \ + src/cpp/client/channel_test_peer.cc \ test/cpp/end2end/mock_test.cc \ MOCK_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(MOCK_TEST_SRC)))) @@ -15905,6 +15910,8 @@ $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo_messages.o: $(LIBDIR)/$(CONFIG) $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/simple_messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a +$(OBJDIR)/$(CONFIG)/src/cpp/client/channel_test_peer.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a + $(OBJDIR)/$(CONFIG)/test/cpp/end2end/mock_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a deps_mock_test: $(MOCK_TEST_OBJS:.o=.dep) @@ -15914,6 +15921,7 @@ ifneq ($(NO_DEPS),true) -include $(MOCK_TEST_OBJS:.o=.dep) endif endif +$(OBJDIR)/$(CONFIG)/src/cpp/client/channel_test_peer.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(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 $(OBJDIR)/$(CONFIG)/test/cpp/end2end/mock_test.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(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 @@ -17168,6 +17176,7 @@ $(OBJDIR)/$(CONFIG)/test/cpp/server/server_builder_with_socket_mutator_test.o: $ SERVER_CONTEXT_TEST_SPOUSE_TEST_SRC = \ + src/cpp/client/channel_test_peer.cc \ test/cpp/test/server_context_test_spouse_test.cc \ SERVER_CONTEXT_TEST_SPOUSE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SERVER_CONTEXT_TEST_SPOUSE_TEST_SRC)))) @@ -17199,6 +17208,8 @@ endif endif +$(OBJDIR)/$(CONFIG)/src/cpp/client/channel_test_peer.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a + $(OBJDIR)/$(CONFIG)/test/cpp/test/server_context_test_spouse_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a deps_server_context_test_spouse_test: $(SERVER_CONTEXT_TEST_SPOUSE_TEST_OBJS:.o=.dep) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 6897600f027..b0d6e8a2ef6 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -5638,6 +5638,7 @@ targets: - src/proto/grpc/testing/echo.proto - src/proto/grpc/testing/echo_messages.proto - src/proto/grpc/testing/simple_messages.proto + - src/cpp/client/channel_test_peer.cc - test/cpp/end2end/end2end_test.cc - test/cpp/end2end/interceptors_util.cc - test/cpp/end2end/test_service_impl.cc @@ -6344,6 +6345,7 @@ targets: - src/proto/grpc/testing/echo.proto - src/proto/grpc/testing/echo_messages.proto - src/proto/grpc/testing/simple_messages.proto + - src/cpp/client/channel_test_peer.cc - test/cpp/end2end/mock_test.cc deps: - grpc++_test_util @@ -6807,6 +6809,7 @@ targets: language: c++ headers: [] src: + - src/cpp/client/channel_test_peer.cc - test/cpp/test/server_context_test_spouse_test.cc deps: - grpc++_test_util diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index cb46477c19d..80c7f796d68 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -225,8 +225,8 @@ GRPCAPI void grpc_channel_ping(grpc_channel* channel, grpc_completion_queue* cq, void* tag, void* reserved); /** Pre-register a method/host pair on a channel. - method and host are not owned and must remain alive while the server is - running. */ + method and host are not owned and must remain alive while the channel is + alive. */ GRPCAPI void* grpc_channel_register_call(grpc_channel* channel, const char* method, const char* host, void* reserved); diff --git a/include/grpcpp/channel_impl.h b/include/grpcpp/channel_impl.h index 4ec913ae523..6cc63ba09aa 100644 --- a/include/grpcpp/channel_impl.h +++ b/include/grpcpp/channel_impl.h @@ -33,6 +33,9 @@ struct grpc_channel; namespace grpc { +namespace testing { +class ChannelTestPeer; +} // namespace testing std::shared_ptr<::grpc_impl::Channel> CreateChannelInternal( const grpc::string& host, grpc_channel* c_channel, @@ -71,6 +74,7 @@ class Channel final : public ::grpc::ChannelInterface, private: template friend class ::grpc::internal::BlockingUnaryCallImpl; + 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, diff --git a/include/grpcpp/test/channel_test_peer.h b/include/grpcpp/test/channel_test_peer.h new file mode 100644 index 00000000000..e41bbfa4604 --- /dev/null +++ b/include/grpcpp/test/channel_test_peer.h @@ -0,0 +1,44 @@ +/* + * + * 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 GRPCPP_TEST_CHANNEL_TEST_PEER_H +#define GRPCPP_TEST_CHANNEL_TEST_PEER_H + +#include + +namespace grpc { +namespace testing { + +/// A test-only class to access private members of Channel. +class ChannelTestPeer { + public: + explicit ChannelTestPeer(Channel* channel) : channel_(channel) {} + + /// Provide the gRPC Core channel + grpc_channel* channel() const { return channel_->c_channel_; } + int registered_calls() const; + int registration_attempts() const; + + private: + Channel* channel_; // not owned +}; + +} // namespace testing +} // namespace grpc + +#endif // GRPCPP_TEST_CHANNEL_TEST_PEER_H diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc index 9f5abca9c47..b9296ba02cf 100644 --- a/src/core/lib/surface/channel.cc +++ b/src/core/lib/surface/channel.cc @@ -54,12 +54,6 @@ * (OK, Cancelled, Unknown). */ #define NUM_CACHED_STATUS_ELEMS 3 -typedef struct registered_call { - grpc_mdelem path; - grpc_mdelem authority; - struct registered_call* next; -} registered_call; - static void destroy_channel(void* arg, grpc_error* error); grpc_channel* grpc_channel_create_with_builder( @@ -90,8 +84,7 @@ grpc_channel* grpc_channel_create_with_builder( channel->target = target; channel->resource_user = resource_user; channel->is_client = grpc_channel_stack_type_is_client(channel_stack_type); - gpr_mu_init(&channel->registered_call_mu); - channel->registered_calls = nullptr; + channel->registration_table.Init(); gpr_atm_no_barrier_store( &channel->call_size_estimate, @@ -417,35 +410,65 @@ grpc_call* grpc_channel_create_pollset_set_call( deadline); } +namespace grpc_core { + +RegisteredCall::RegisteredCall(const char* method, const char* host) { + path = grpc_mdelem_from_slices(GRPC_MDSTR_PATH, + grpc_core::ExternallyManagedSlice(method)); + authority = + host ? grpc_mdelem_from_slices(GRPC_MDSTR_AUTHORITY, + grpc_core::ExternallyManagedSlice(host)) + : GRPC_MDNULL; +} + +// TODO(vjpai): Delete copy-constructor when allowed by all supported compilers. +RegisteredCall::RegisteredCall(const RegisteredCall& other) { + path = other.path; + authority = other.authority; + GRPC_MDELEM_REF(path); + GRPC_MDELEM_REF(authority); +} + +RegisteredCall::RegisteredCall(RegisteredCall&& other) { + path = other.path; + authority = other.authority; + other.path = GRPC_MDNULL; + other.authority = GRPC_MDNULL; +} + +RegisteredCall::~RegisteredCall() { + GRPC_MDELEM_UNREF(path); + GRPC_MDELEM_UNREF(authority); +} + +} // namespace grpc_core + void* grpc_channel_register_call(grpc_channel* channel, const char* method, const char* host, void* reserved) { - registered_call* rc = - static_cast(gpr_malloc(sizeof(registered_call))); GRPC_API_TRACE( "grpc_channel_register_call(channel=%p, method=%s, host=%s, reserved=%p)", 4, (channel, method, host, reserved)); GPR_ASSERT(!reserved); grpc_core::ExecCtx exec_ctx; - rc->path = grpc_mdelem_from_slices(GRPC_MDSTR_PATH, - grpc_core::ExternallyManagedSlice(method)); - rc->authority = - host ? grpc_mdelem_from_slices(GRPC_MDSTR_AUTHORITY, - grpc_core::ExternallyManagedSlice(host)) - : GRPC_MDNULL; - gpr_mu_lock(&channel->registered_call_mu); - rc->next = channel->registered_calls; - channel->registered_calls = rc; - gpr_mu_unlock(&channel->registered_call_mu); - - return rc; + grpc_core::MutexLock lock(&channel->registration_table->mu); + channel->registration_table->method_registration_attempts++; + auto key = std::make_pair(host, method); + auto rc_posn = channel->registration_table->map.find(key); + if (rc_posn != channel->registration_table->map.end()) { + return &rc_posn->second; + } + auto insertion_result = channel->registration_table->map.insert( + {key, grpc_core::RegisteredCall(method, host)}); + return &insertion_result.first->second; } grpc_call* grpc_channel_create_registered_call( grpc_channel* channel, grpc_call* parent_call, uint32_t propagation_mask, grpc_completion_queue* completion_queue, void* registered_call_handle, gpr_timespec deadline, void* reserved) { - registered_call* rc = static_cast(registered_call_handle); + grpc_core::RegisteredCall* rc = + static_cast(registered_call_handle); GRPC_API_TRACE( "grpc_channel_create_registered_call(" "channel=%p, parent_call=%p, propagation_mask=%x, completion_queue=%p, " @@ -486,18 +509,11 @@ static void destroy_channel(void* arg, grpc_error* /*error*/) { channel->channelz_node.reset(); } grpc_channel_stack_destroy(CHANNEL_STACK_FROM_CHANNEL(channel)); - while (channel->registered_calls) { - registered_call* rc = channel->registered_calls; - channel->registered_calls = rc->next; - GRPC_MDELEM_UNREF(rc->path); - GRPC_MDELEM_UNREF(rc->authority); - gpr_free(rc); - } + channel->registration_table.Destroy(); if (channel->resource_user != nullptr) { grpc_resource_user_free(channel->resource_user, GRPC_RESOURCE_QUOTA_CHANNEL_SIZE); } - gpr_mu_destroy(&channel->registered_call_mu); gpr_free(channel->target); gpr_free(channel); // See comment in grpc_channel_create() for why we do this. diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index 280fc96a0bc..39c9b55f8d8 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -21,10 +21,14 @@ #include +#include + #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/lib/channel/channelz.h" +#include "src/core/lib/gprpp/manual_constructor.h" #include "src/core/lib/surface/channel_stack_type.h" +#include "src/core/lib/transport/metadata.h" grpc_channel* grpc_channel_create(const char* target, const grpc_channel_args* args, @@ -62,7 +66,30 @@ grpc_core::channelz::ChannelNode* grpc_channel_get_channelz_node( size_t grpc_channel_get_call_size_estimate(grpc_channel* channel); void grpc_channel_update_call_size_estimate(grpc_channel* channel, size_t size); -struct registered_call; +namespace grpc_core { + +struct RegisteredCall { + grpc_mdelem path; + grpc_mdelem authority; + + explicit RegisteredCall(const char* method, const char* host); + // TODO(vjpai): delete copy constructor once all supported compilers allow + // std::map value_type to be MoveConstructible. + RegisteredCall(const RegisteredCall& other); + RegisteredCall(RegisteredCall&& other); + + ~RegisteredCall(); +}; + +struct CallRegistrationTable { + grpc_core::Mutex mu; + std::map, RegisteredCall> + map /* GUARDED_BY(mu) */; + int method_registration_attempts /* GUARDED_BY(mu) */ = 0; +}; + +} // namespace grpc_core + struct grpc_channel { int is_client; grpc_compression_options compression_options; @@ -70,9 +97,13 @@ struct grpc_channel { gpr_atm call_size_estimate; grpc_resource_user* resource_user; - gpr_mu registered_call_mu; - registered_call* registered_calls; - + // TODO(vjpai): Once the grpc_channel is allocated via new rather than malloc, + // expand the members of the CallRegistrationTable directly into + // the grpc_channel. For now it is kept separate so that all the + // manual constructing can be done with a single call rather than + // a separate manual construction for each field. + grpc_core::ManualConstructor + registration_table; grpc_core::RefCountedPtr channelz_node; char* target; diff --git a/src/cpp/client/channel_test_peer.cc b/src/cpp/client/channel_test_peer.cc new file mode 100644 index 00000000000..f921352a24a --- /dev/null +++ b/src/cpp/client/channel_test_peer.cc @@ -0,0 +1,40 @@ +/* + * + * 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 +#include + +#include "src/core/lib/surface/channel.h" + +namespace grpc { +namespace testing { + +int ChannelTestPeer::registered_calls() const { + grpc_core::MutexLock lock(&channel_->c_channel_->registration_table->mu); + return static_cast(channel_->c_channel_->registration_table->map.size()); +} + +int ChannelTestPeer::registration_attempts() const { + grpc_core::MutexLock lock(&channel_->c_channel_->registration_table->mu); + return channel_->c_channel_->registration_table->method_registration_attempts; +} + +} // namespace testing +} // namespace grpc diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD index 5288c5622be..6116e9e9a05 100644 --- a/test/cpp/end2end/BUILD +++ b/test/cpp/end2end/BUILD @@ -225,6 +225,7 @@ grpc_cc_library( "//:gpr", "//:grpc", "//:grpc++", + "//:grpc++_test", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 33113942151..94d895a06c4 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -812,6 +813,19 @@ TEST_P(End2endTest, MultipleRpcs) { } } +TEST_P(End2endTest, ManyStubs) { + MAYBE_SKIP_TEST; + ResetStub(); + ChannelTestPeer peer(channel_.get()); + int registered_calls_pre = peer.registered_calls(); + int registration_attempts_pre = peer.registration_attempts(); + for (int i = 0; i < 1000; ++i) { + grpc::testing::EchoTestService::NewStub(channel_); + } + EXPECT_EQ(peer.registered_calls(), registered_calls_pre); + EXPECT_GT(peer.registration_attempts(), registration_attempts_pre); +} + TEST_P(End2endTest, EmptyBinaryMetadata) { MAYBE_SKIP_TEST; ResetStub(); From e859aa8169f4f15e99cdd5382c498419a3968d41 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 27 Feb 2020 14:16:25 -0800 Subject: [PATCH 19/19] Update server_callback_impl.h --- include/grpcpp/impl/codegen/server_callback_impl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/grpcpp/impl/codegen/server_callback_impl.h b/include/grpcpp/impl/codegen/server_callback_impl.h index aaf83b9b271..f19ab42716f 100644 --- a/include/grpcpp/impl/codegen/server_callback_impl.h +++ b/include/grpcpp/impl/codegen/server_callback_impl.h @@ -695,7 +695,7 @@ class ServerUnaryReactor : public internal::ServerReactor { ServerUnaryReactor() : call_(nullptr) {} ~ServerUnaryReactor() = default; - /// The following operation initiations are exactly like ServerBidiReactor. + /// StartSendInitialMetadata is exactly like ServerBidiReactor. void StartSendInitialMetadata() { ServerCallbackUnary* call = call_.load(std::memory_order_acquire); if (call == nullptr) { @@ -708,6 +708,9 @@ class ServerUnaryReactor : public internal::ServerReactor { } call->SendInitialMetadata(); } + /// Finish is similar to ServerBidiReactor except for one detail. + /// If the status is non-OK, any message will not be sent. Instead, + /// the client will only receive the status and any trailing metadata. void Finish(::grpc::Status s) { ServerCallbackUnary* call = call_.load(std::memory_order_acquire); if (call == nullptr) {