From ac7c1d20ed1d10e185f05dee50ee8e0e18916fd7 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 24 Jan 2020 08:05:02 -0800 Subject: [PATCH] Add LDS/RDS into XdsClient --- BUILD | 22 + BUILD.gn | 22 + CMakeLists.txt | 29 + Makefile | 43 +- build.yaml | 23 + config.m4 | 17 + config.w32 | 23 + gRPC-C++.podspec | 22 + gRPC-Core.podspec | 33 + grpc.gemspec | 22 + grpc.gyp | 22 + package.xml | 22 + .../ext/filters/client_channel/xds/xds_api.cc | 407 ++- .../ext/filters/client_channel/xds/xds_api.h | 46 +- .../filters/client_channel/xds/xds_client.cc | 184 +- .../filters/client_channel/xds/xds_client.h | 28 +- .../ext/upb-generated/envoy/api/v2/lds.upb.c | 103 + .../ext/upb-generated/envoy/api/v2/lds.upb.h | 379 +++ .../envoy/api/v2/listener/listener.upb.c | 106 + .../envoy/api/v2/listener/listener.upb.h | 389 +++ .../api/v2/listener/udp_listener_config.upb.c | 35 + .../api/v2/listener/udp_listener_config.upb.h | 93 + .../ext/upb-generated/envoy/api/v2/rds.upb.c | 63 + .../ext/upb-generated/envoy/api/v2/rds.upb.h | 199 ++ .../envoy/api/v2/route/route.upb.c | 731 +++++ .../envoy/api/v2/route/route.upb.h | 2711 +++++++++++++++++ .../ext/upb-generated/envoy/api/v2/srds.upb.c | 59 + .../ext/upb-generated/envoy/api/v2/srds.upb.h | 134 + .../filter/accesslog/v2/accesslog.upb.c | 226 ++ .../filter/accesslog/v2/accesslog.upb.h | 725 +++++ .../v2/http_connection_manager.upb.c | 291 ++ .../v2/http_connection_manager.upb.h | 1056 +++++++ .../config/listener/v2/api_listener.upb.c | 31 + .../config/listener/v2/api_listener.upb.h | 65 + .../envoy/type/matcher/regex.upb.c | 47 + .../envoy/type/matcher/regex.upb.h | 108 + .../envoy/type/matcher/string.upb.c | 50 + .../envoy/type/matcher/string.upb.h | 129 + src/proto/grpc/testing/xds/BUILD | 10 + .../grpc/testing/xds/lds_rds_for_test.proto | 149 + src/python/grpcio/grpc_core_dependencies.py | 11 + test/cpp/end2end/BUILD | 1 + test/cpp/end2end/xds_end2end_test.cc | 448 ++- tools/codegen/core/gen_upb_api.sh | 11 + tools/doxygen/Doxyfile.core.internal | 22 + 45 files changed, 9276 insertions(+), 71 deletions(-) create mode 100644 src/core/ext/upb-generated/envoy/api/v2/lds.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/lds.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/rds.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/rds.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/srds.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/srds.upb.h create mode 100644 src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c create mode 100644 src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h create mode 100644 src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c create mode 100644 src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h create mode 100644 src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c create mode 100644 src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h create mode 100644 src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c create mode 100644 src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h create mode 100644 src/core/ext/upb-generated/envoy/type/matcher/string.upb.c create mode 100644 src/core/ext/upb-generated/envoy/type/matcher/string.upb.h create mode 100644 src/proto/grpc/testing/xds/lds_rds_for_test.proto diff --git a/BUILD b/BUILD index 38b8ca1c595..ccff2948fbd 100644 --- a/BUILD +++ b/BUILD @@ -2400,8 +2400,19 @@ grpc_cc_library( "src/core/ext/upb-generated/envoy/api/v2/eds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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", "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", @@ -2413,8 +2424,19 @@ grpc_cc_library( "src/core/ext/upb-generated/envoy/api/v2/eds.upb.h", "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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", "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", diff --git a/BUILD.gn b/BUILD.gn index ba976743ba3..bc4b82154cd 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -421,12 +421,34 @@ config("grpc_config") { "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/listener/listener.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/route.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/route/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", + "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.c", + "src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h", + "src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c", + "src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h", "src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c", "src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h", "src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c", "src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h", "src/core/ext/upb-generated/envoy/type/http.upb.c", "src/core/ext/upb-generated/envoy/type/http.upb.h", + "src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c", + "src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h", + "src/core/ext/upb-generated/envoy/type/matcher/string.upb.c", + "src/core/ext/upb-generated/envoy/type/matcher/string.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", diff --git a/CMakeLists.txt b/CMakeLists.txt index 9acd2778b1d..2da58394f0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -394,6 +394,9 @@ protobuf_generate_grpc_cpp( protobuf_generate_grpc_cpp( src/proto/grpc/testing/xds/eds_for_test.proto ) +protobuf_generate_grpc_cpp( + src/proto/grpc/testing/xds/lds_rds_for_test.proto +) protobuf_generate_grpc_cpp( src/proto/grpc/testing/xds/lrs_for_test.proto ) @@ -1825,6 +1828,15 @@ add_library(grpc src/core/ext/upb-generated/envoy/api/v2/eds.upb.c src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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 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/api/v2/core/address.upb.c @@ -1835,6 +1847,8 @@ add_library(grpc src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c 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/percent.upb.c src/core/ext/upb-generated/envoy/type/range.upb.c src/core/ext/filters/client_channel/lb_policy/xds/xds.cc @@ -3320,6 +3334,15 @@ add_library(grpc_unsecure src/core/ext/upb-generated/envoy/api/v2/eds.upb.c src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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 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/api/v2/core/address.upb.c @@ -3330,6 +3353,8 @@ add_library(grpc_unsecure src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c 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/percent.upb.c src/core/ext/upb-generated/envoy/type/range.upb.c src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc @@ -16080,6 +16105,10 @@ add_executable(xds_end2end_test ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/eds_for_test.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lds_rds_for_test.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lrs_for_test.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lrs_for_test.pb.h diff --git a/Makefile b/Makefile index 701cbe086e5..25fc9cd20e5 100644 --- a/Makefile +++ b/Makefile @@ -3061,6 +3061,22 @@ $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc: src/proto/grpc/tes $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< endif +ifeq ($(NO_PROTOC),true) +$(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc: protoc_dep_error +else + +$(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc: src/proto/grpc/testing/xds/lds_rds_for_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc + $(E) "[PROTOC] Generating protobuf CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< + +$(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc: src/proto/grpc/testing/xds/lds_rds_for_test.proto $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.grpc.pb.cc + $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< +endif + ifeq ($(NO_PROTOC),true) $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.pb.cc: protoc_dep_error $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc: protoc_dep_error @@ -4290,6 +4306,15 @@ LIBGRPC_SRC = \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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 \ 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/api/v2/core/address.upb.c \ @@ -4300,6 +4325,8 @@ LIBGRPC_SRC = \ src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \ 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/percent.upb.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ src/core/ext/filters/client_channel/lb_policy/xds/xds.cc \ @@ -5727,6 +5754,15 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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 \ 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/api/v2/core/address.upb.c \ @@ -5737,6 +5773,8 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \ 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/percent.upb.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \ @@ -20669,6 +20707,7 @@ XDS_END2END_TEST_SRC = \ $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc \ test/cpp/end2end/xds_end2end_test.cc \ @@ -20707,6 +20746,8 @@ $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/xds/cds_for_test.o: $(LIBDIR)/$(CONF $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/xds/eds_for_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 +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/xds/lds_rds_for_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 + $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/xds/lrs_for_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 $(OBJDIR)/$(CONFIG)/test/cpp/end2end/xds_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 @@ -20718,7 +20759,7 @@ ifneq ($(NO_DEPS),true) -include $(XDS_END2END_TEST_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/end2end/xds_end2end_test.o: $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/xds_end2end_test.o: $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc PUBLIC_HEADERS_MUST_BE_C89_SRC = \ diff --git a/build.yaml b/build.yaml index 63724320990..2653961c4d9 100644 --- a/build.yaml +++ b/build.yaml @@ -120,6 +120,15 @@ filegroups: - src/core/ext/upb-generated/envoy/api/v2/eds.upb.h - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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 - 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: @@ -132,6 +141,15 @@ filegroups: - src/core/ext/upb-generated/envoy/api/v2/eds.upb.c - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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 - 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 uses: @@ -170,10 +188,14 @@ filegroups: - 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/percent.upb.h - src/core/ext/upb-generated/envoy/type/range.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/percent.upb.c - src/core/ext/upb-generated/envoy/type/range.upb.c uses: @@ -6088,6 +6110,7 @@ targets: - src/proto/grpc/testing/xds/ads_for_test.proto - src/proto/grpc/testing/xds/cds_for_test.proto - src/proto/grpc/testing/xds/eds_for_test.proto + - src/proto/grpc/testing/xds/lds_rds_for_test.proto - src/proto/grpc/testing/xds/lrs_for_test.proto - test/cpp/end2end/xds_end2end_test.cc deps: diff --git a/config.m4 b/config.m4 index 70ce9d1e61e..eb6b8ab3fbb 100644 --- a/config.m4 +++ b/config.m4 @@ -155,9 +155,20 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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 \ 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/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/percent.upb.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ src/core/ext/upb-generated/gogoproto/gogo.upb.c \ @@ -803,9 +814,15 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/cluster) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/core) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/endpoint) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/listener) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/route) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/config/listener/v2) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/service/discovery/v2) 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/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) diff --git a/config.w32 b/config.w32 index bfd8ce0c09e..707bf3b69bd 100644 --- a/config.w32 +++ b/config.w32 @@ -124,9 +124,20 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\eds.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\endpoint.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\\listener.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\\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 " + "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\\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\\percent.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\range.upb.c " + "src\\core\\ext\\upb-generated\\gogoproto\\gogo.upb.c " + @@ -810,12 +821,24 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter\\accesslog"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter\\accesslog\\v2"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter\\network"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter\\network\\http_connection_manager"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter\\network\\http_connection_manager\\v2"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\listener"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\listener\\v2"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\service"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\service\\discovery"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\service\\discovery\\v2"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\service\\load_stats"); 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\\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"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 5bc0b71bb9e..9901b8fd950 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -315,9 +315,20 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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', '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/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/percent.upb.h', 'src/core/ext/upb-generated/envoy/type/range.upb.h', 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', @@ -736,9 +747,20 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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', '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/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/percent.upb.h', 'src/core/ext/upb-generated/envoy/type/range.upb.h', 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index cfb7617214f..5c2073c0d3d 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -390,12 +390,34 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.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/route.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/route/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', + '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.c', + 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h', + 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c', + 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h', 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c', 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h', 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c', 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h', 'src/core/ext/upb-generated/envoy/type/http.upb.c', 'src/core/ext/upb-generated/envoy/type/http.upb.h', + 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c', + 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h', + 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.c', + 'src/core/ext/upb-generated/envoy/type/matcher/string.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', @@ -1052,9 +1074,20 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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', '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/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/percent.upb.h', 'src/core/ext/upb-generated/envoy/type/range.upb.h', 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', diff --git a/grpc.gemspec b/grpc.gemspec index 91a09623e89..632bdd73521 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -313,12 +313,34 @@ Gem::Specification.new do |s| 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/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/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/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/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/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 ) + s.files += %w( src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/type/http.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/type/http.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c ) + 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/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 ) diff --git a/grpc.gyp b/grpc.gyp index 27692120cbb..92a168d50ac 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -832,6 +832,15 @@ 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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', '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/api/v2/core/address.upb.c', @@ -842,6 +851,8 @@ 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c', '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/percent.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.c', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc', @@ -1677,6 +1688,15 @@ 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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', '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/api/v2/core/address.upb.c', @@ -1687,6 +1707,8 @@ 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c', '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/percent.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.c', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc', diff --git a/package.xml b/package.xml index 05a8ef317f5..7fee466a057 100644 --- a/package.xml +++ b/package.xml @@ -296,12 +296,34 @@ + + + + + + + + + + + + + + + + + + + + + + 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 f2cce90ae27..5b27c5d5904 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -38,6 +39,11 @@ #include "envoy/api/v2/eds.upb.h" #include "envoy/api/v2/endpoint/endpoint.upb.h" #include "envoy/api/v2/endpoint/load_report.upb.h" +#include "envoy/api/v2/lds.upb.h" +#include "envoy/api/v2/rds.upb.h" +#include "envoy/api/v2/route/route.upb.h" +#include "envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h" +#include "envoy/config/listener/v2/api_listener.upb.h" #include "envoy/service/load_stats/v2/lrs.upb.h" #include "envoy/type/percent.upb.h" #include "google/protobuf/any.upb.h" @@ -225,6 +231,117 @@ grpc_slice XdsUnsupportedTypeNackRequestCreateAndEncode( return grpc_slice_from_copied_buffer(output, output_length); } +grpc_slice XdsLdsRequestCreateAndEncode(const std::string& server_name, + const XdsBootstrap::Node* node, + const char* build_version, + const std::string& version, + const std::string& nonce, + grpc_error* error) { + upb::Arena arena; + // Create a request. + envoy_api_v2_DiscoveryRequest* request = + envoy_api_v2_DiscoveryRequest_new(arena.ptr()); + // Set version_info. + if (!version.empty()) { + envoy_api_v2_DiscoveryRequest_set_version_info( + request, upb_strview_makez(version.c_str())); + } + // Populate node. + if (build_version != nullptr) { + envoy_api_v2_core_Node* node_msg = + envoy_api_v2_DiscoveryRequest_mutable_node(request, arena.ptr()); + PopulateNode(arena.ptr(), node, build_version, node_msg); + } + // Add resource_name. + envoy_api_v2_DiscoveryRequest_add_resource_names( + request, upb_strview_make(server_name.data(), server_name.size()), + arena.ptr()); + // Set type_url. + envoy_api_v2_DiscoveryRequest_set_type_url(request, + upb_strview_makez(kLdsTypeUrl)); + // Set nonce. + if (!nonce.empty()) { + envoy_api_v2_DiscoveryRequest_set_response_nonce( + request, upb_strview_makez(nonce.c_str())); + } + // Set error_detail if it's a NACK. + if (error != GRPC_ERROR_NONE) { + grpc_slice error_description_slice; + GPR_ASSERT(grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION, + &error_description_slice)); + upb_strview error_description_strview = + upb_strview_make(reinterpret_cast( + GPR_SLICE_START_PTR(error_description_slice)), + GPR_SLICE_LENGTH(error_description_slice)); + google_rpc_Status* error_detail = + envoy_api_v2_DiscoveryRequest_mutable_error_detail(request, + arena.ptr()); + google_rpc_Status_set_message(error_detail, error_description_strview); + GRPC_ERROR_UNREF(error); + } + // Encode the request. + size_t output_length; + char* output = envoy_api_v2_DiscoveryRequest_serialize(request, arena.ptr(), + &output_length); + return grpc_slice_from_copied_buffer(output, output_length); +} + +grpc_slice XdsRdsRequestCreateAndEncode(const std::string& route_config_name, + const XdsBootstrap::Node* node, + const char* build_version, + const std::string& version, + const std::string& nonce, + grpc_error* error) { + upb::Arena arena; + // Create a request. + envoy_api_v2_DiscoveryRequest* request = + envoy_api_v2_DiscoveryRequest_new(arena.ptr()); + // Set version_info. + if (!version.empty()) { + envoy_api_v2_DiscoveryRequest_set_version_info( + request, upb_strview_makez(version.c_str())); + } + // Populate node. + if (build_version != nullptr) { + envoy_api_v2_core_Node* node_msg = + envoy_api_v2_DiscoveryRequest_mutable_node(request, arena.ptr()); + PopulateNode(arena.ptr(), node, build_version, node_msg); + } + // Add resource_name. + envoy_api_v2_DiscoveryRequest_add_resource_names( + request, + upb_strview_make(route_config_name.data(), route_config_name.size()), + arena.ptr()); + // Set type_url. + envoy_api_v2_DiscoveryRequest_set_type_url(request, + upb_strview_makez(kRdsTypeUrl)); + // Set nonce. + if (!nonce.empty()) { + envoy_api_v2_DiscoveryRequest_set_response_nonce( + request, upb_strview_makez(nonce.c_str())); + } + // Set error_detail if it's a NACK. + if (error != GRPC_ERROR_NONE) { + grpc_slice error_description_slice; + GPR_ASSERT(grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION, + &error_description_slice)); + upb_strview error_description_strview = + upb_strview_make(reinterpret_cast( + GPR_SLICE_START_PTR(error_description_slice)), + GPR_SLICE_LENGTH(error_description_slice)); + google_rpc_Status* error_detail = + envoy_api_v2_DiscoveryRequest_mutable_error_detail(request, + arena.ptr()); + google_rpc_Status_set_message(error_detail, error_description_strview); + GRPC_ERROR_UNREF(error); + } + // Encode the request. + size_t output_length; + char* output = envoy_api_v2_DiscoveryRequest_serialize(request, arena.ptr(), + &output_length); + return grpc_slice_from_copied_buffer(output, output_length); +} + grpc_slice XdsCdsRequestCreateAndEncode( const std::set& cluster_names, const XdsBootstrap::Node* node, const char* build_version, const std::string& version, @@ -336,6 +453,279 @@ grpc_slice XdsEdsRequestCreateAndEncode( return grpc_slice_from_copied_buffer(output, output_length); } +namespace { + +// Better match type has smaller value. +enum MatchType { + EXACT_MATCH, + SUFFIX_MATCH, + PREFIX_MATCH, + UNIVERSE_MATCH, + INVALID_MATCH, +}; + +// Returns true if match succeeds. +bool DomainMatch(MatchType match_type, std::string domain_pattern, + std::string expected_host_name) { + // Normalize the args to lower-case. Domain matching is case-insensitive. + std::transform(domain_pattern.begin(), domain_pattern.end(), + domain_pattern.begin(), + [](unsigned char c) { return std::tolower(c); }); + std::transform(expected_host_name.begin(), expected_host_name.end(), + expected_host_name.begin(), + [](unsigned char c) { return std::tolower(c); }); + if (match_type == EXACT_MATCH) { + return domain_pattern == expected_host_name; + } else if (match_type == SUFFIX_MATCH) { + // Asterisk must match at least one char. + if (expected_host_name.size() < domain_pattern.size()) return false; + StringView pattern_suffix(domain_pattern.c_str() + 1); + StringView host_suffix(expected_host_name.c_str() + + expected_host_name.size() - pattern_suffix.size()); + return pattern_suffix == host_suffix; + } else if (match_type == PREFIX_MATCH) { + // Asterisk must match at least one char. + if (expected_host_name.size() < domain_pattern.size()) return false; + StringView pattern_prefix(domain_pattern.c_str(), + domain_pattern.size() - 1); + StringView host_prefix(expected_host_name.c_str(), pattern_prefix.size()); + return pattern_prefix == host_prefix; + } else { + return match_type == UNIVERSE_MATCH; + } +} + +MatchType DomainPatternMatchType(const std::string& domain_pattern) { + if (domain_pattern.empty()) return INVALID_MATCH; + if (domain_pattern.find('*') == std::string::npos) return EXACT_MATCH; + if (domain_pattern == "*") return UNIVERSE_MATCH; + if (domain_pattern[0] == '*') return SUFFIX_MATCH; + if (domain_pattern[domain_pattern.size() - 1] == '*') return PREFIX_MATCH; + return INVALID_MATCH; +} + +grpc_error* RouteConfigParse( + const envoy_api_v2_RouteConfiguration* route_config, + const std::string& expected_server_name, RdsUpdate* rds_update) { + // Strip off port from server name, if any. + size_t pos = expected_server_name.find(':'); + std::string expected_host_name = expected_server_name.substr(0, pos); + // Get the virtual hosts. + size_t size; + const envoy_api_v2_route_VirtualHost* const* virtual_hosts = + envoy_api_v2_RouteConfiguration_virtual_hosts(route_config, &size); + // Find the best matched virtual host. + // The search order for 4 groups of domain patterns: + // 1. Exact match. + // 2. Suffix match (e.g., "*ABC"). + // 3. Prefix match (e.g., "ABC*"). + // 4. Universe match (i.e., "*"). + // Within each group, longest match wins. + // If the same best matched domain pattern appears in multiple virtual hosts, + // the first matched virtual host wins. + const envoy_api_v2_route_VirtualHost* target_virtual_host = nullptr; + MatchType best_match_type = INVALID_MATCH; + size_t longest_match = 0; + // Check each domain pattern in each virtual host to determine the best + // matched virtual host. + for (size_t i = 0; i < size; ++i) { + size_t domain_size; + upb_strview const* domains = + envoy_api_v2_route_VirtualHost_domains(virtual_hosts[i], &domain_size); + for (size_t j = 0; j < domain_size; ++j) { + const std::string domain_pattern(domains[j].data, domains[j].size); + // Check the match type first. Skip the pattern if it's not better than + // current match. + const MatchType match_type = DomainPatternMatchType(domain_pattern); + if (match_type == INVALID_MATCH) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Invalid domain pattern."); + } + if (match_type > best_match_type) continue; + if (match_type == best_match_type && + domain_pattern.size() <= longest_match) { + continue; + } + // Skip if match fails. + if (!DomainMatch(match_type, domain_pattern, expected_host_name)) { + continue; + } + // Choose this match. + target_virtual_host = virtual_hosts[i]; + best_match_type = match_type; + longest_match = domain_pattern.size(); + if (best_match_type == EXACT_MATCH) break; + } + if (best_match_type == EXACT_MATCH) break; + } + if (target_virtual_host == nullptr) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "No matched virtual host found in the route config."); + } + // Get the route list from the matched virtual host. + const envoy_api_v2_route_Route* const* routes = + envoy_api_v2_route_VirtualHost_routes(target_virtual_host, &size); + if (size < 1) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "No route found in the virtual host."); + } + // Only look at the last one in the route list (the default route), + const envoy_api_v2_route_Route* route = routes[size - 1]; + // Validate that the match field must have a prefix field which is an empty + // string. + const envoy_api_v2_route_RouteMatch* match = + envoy_api_v2_route_Route_match(route); + if (!envoy_api_v2_route_RouteMatch_has_prefix(match)) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "No prefix field found in RouteMatch."); + } + const upb_strview prefix = envoy_api_v2_route_RouteMatch_prefix(match); + if (!upb_strview_eql(prefix, upb_strview_makez(""))) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Prefix is not empty string."); + } + if (!envoy_api_v2_route_Route_has_route(route)) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "No RouteAction found in route."); + } + const envoy_api_v2_route_RouteAction* route_action = + envoy_api_v2_route_Route_route(route); + // Get the cluster in the RouteAction. + if (!envoy_api_v2_route_RouteAction_has_cluster(route_action)) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "No cluster found in RouteAction."); + } + const upb_strview cluster = + envoy_api_v2_route_RouteAction_cluster(route_action); + rds_update->cluster_name = std::string(cluster.data, cluster.size); + return GRPC_ERROR_NONE; +} + +} // namespace + +grpc_error* LdsResponseParse(const envoy_api_v2_DiscoveryResponse* response, + const std::string& expected_server_name, + LdsUpdate* lds_update, upb_arena* arena) { + // Get the resources from the response. + size_t size; + const google_protobuf_Any* const* resources = + envoy_api_v2_DiscoveryResponse_resources(response, &size); + if (size < 1) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "LDS response contains 0 resource."); + } + for (size_t i = 0; i < size; ++i) { + // Check the type_url of the resource. + const upb_strview type_url = google_protobuf_Any_type_url(resources[i]); + if (!upb_strview_eql(type_url, upb_strview_makez(kLdsTypeUrl))) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource is not LDS."); + } + // Decode the listener. + const upb_strview encoded_listener = + google_protobuf_Any_value(resources[i]); + const envoy_api_v2_Listener* listener = envoy_api_v2_Listener_parse( + encoded_listener.data, encoded_listener.size, arena); + if (listener == nullptr) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Can't decode listener."); + } + // Check listener name. Ignore unexpected listeners. + const upb_strview name = envoy_api_v2_Listener_name(listener); + const upb_strview expected_name = + upb_strview_makez(expected_server_name.c_str()); + if (!upb_strview_eql(name, expected_name)) continue; + // Get api_listener and decode it to http_connection_manager. + const envoy_config_listener_v2_ApiListener* api_listener = + envoy_api_v2_Listener_api_listener(listener); + if (api_listener == nullptr) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Listener doesn't have ApiListener."); + } + const upb_strview encoded_api_listener = google_protobuf_Any_value( + envoy_config_listener_v2_ApiListener_api_listener(api_listener)); + const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager* + http_connection_manager = + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_parse( + encoded_api_listener.data, encoded_api_listener.size, arena); + // Found inlined route_config. Parse it to find the cluster_name. + if (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_route_config( + http_connection_manager)) { + const envoy_api_v2_RouteConfiguration* route_config = + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_config( + http_connection_manager); + RdsUpdate rds_update; + grpc_error* error = + RouteConfigParse(route_config, expected_server_name, &rds_update); + if (error != GRPC_ERROR_NONE) return error; + lds_update->rds_update.emplace(std::move(rds_update)); + const upb_strview route_config_name = + envoy_api_v2_RouteConfiguration_name(route_config); + lds_update->route_config_name = + std::string(route_config_name.data, route_config_name.size); + return GRPC_ERROR_NONE; + } + // Validate that RDS must be used to get the route_config dynamically. + if (!envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_rds( + http_connection_manager)) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "HttpConnectionManager neither has inlined route_config nor RDS."); + } + // Get the route_config_name. + const envoy_config_filter_network_http_connection_manager_v2_Rds* rds = + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_rds( + http_connection_manager); + const upb_strview route_config_name = + envoy_config_filter_network_http_connection_manager_v2_Rds_route_config_name( + rds); + lds_update->route_config_name = + std::string(route_config_name.data, route_config_name.size); + return GRPC_ERROR_NONE; + } + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "No listener found for expected server name."); +} + +grpc_error* RdsResponseParse(const envoy_api_v2_DiscoveryResponse* response, + const std::string& expected_server_name, + const std::string& expected_route_config_name, + RdsUpdate* rds_update, upb_arena* arena) { + // Get the resources from the response. + size_t size; + const google_protobuf_Any* const* resources = + envoy_api_v2_DiscoveryResponse_resources(response, &size); + if (size < 1) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "RDS response contains 0 resource."); + } + for (size_t i = 0; i < size; ++i) { + // Check the type_url of the resource. + const upb_strview type_url = google_protobuf_Any_type_url(resources[i]); + if (!upb_strview_eql(type_url, upb_strview_makez(kRdsTypeUrl))) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource is not RDS."); + } + // Decode the route_config. + const upb_strview encoded_route_config = + google_protobuf_Any_value(resources[i]); + const envoy_api_v2_RouteConfiguration* route_config = + envoy_api_v2_RouteConfiguration_parse(encoded_route_config.data, + encoded_route_config.size, arena); + if (route_config == nullptr) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Can't decode route_config."); + } + // Check route_config_name. Ignore unexpected route_config. + const upb_strview name = envoy_api_v2_RouteConfiguration_name(route_config); + const upb_strview expected_name = + upb_strview_makez(expected_route_config_name.c_str()); + if (!upb_strview_eql(name, expected_name)) continue; + // Parse the route_config. + RdsUpdate local_rds_update; + grpc_error* error = + RouteConfigParse(route_config, expected_server_name, &local_rds_update); + if (error != GRPC_ERROR_NONE) return error; + *rds_update = std::move(local_rds_update); + return GRPC_ERROR_NONE; + } + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "No route config found for expected name."); +} + grpc_error* CdsResponseParse(const envoy_api_v2_DiscoveryResponse* response, CdsUpdateMap* cds_update_map, upb_arena* arena) { // Get the resources from the response. @@ -604,10 +994,12 @@ grpc_error* EdsResponsedParse( } // namespace grpc_error* XdsAdsResponseDecodeAndParse( - const grpc_slice& encoded_response, + const grpc_slice& encoded_response, const std::string& expected_server_name, + const std::string& expected_route_config_name, const std::set& expected_eds_service_names, - CdsUpdateMap* cds_update_map, EdsUpdateMap* eds_update_map, - std::string* version, std::string* nonce, std::string* type_url) { + LdsUpdate* lds_update, RdsUpdate* rds_update, CdsUpdateMap* cds_update_map, + EdsUpdateMap* eds_update_map, std::string* version, std::string* nonce, + std::string* type_url) { upb::Arena arena; // Decode the response. const envoy_api_v2_DiscoveryResponse* response = @@ -630,7 +1022,14 @@ grpc_error* XdsAdsResponseDecodeAndParse( upb_strview nonce_strview = envoy_api_v2_DiscoveryResponse_nonce(response); *nonce = std::string(nonce_strview.data, nonce_strview.size); // Parse the response according to the resource type. - if (*type_url == kCdsTypeUrl) { + if (*type_url == kLdsTypeUrl) { + return LdsResponseParse(response, expected_server_name, lds_update, + arena.ptr()); + } else if (*type_url == kRdsTypeUrl) { + return RdsResponseParse(response, expected_server_name, + expected_route_config_name, rds_update, + arena.ptr()); + } else if (*type_url == kCdsTypeUrl) { return CdsResponseParse(response, cds_update_map, arena.ptr()); } else if (*type_url == kEdsTypeUrl) { return EdsResponsedParse(response, expected_eds_service_names, 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 4a2da768d45..48c7282772f 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.h +++ b/src/core/ext/filters/client_channel/xds/xds_api.h @@ -34,6 +34,9 @@ namespace grpc_core { +constexpr char kLdsTypeUrl[] = "type.googleapis.com/envoy.api.v2.Listener"; +constexpr char kRdsTypeUrl[] = + "type.googleapis.com/envoy.api.v2.RouteConfiguration"; constexpr char kCdsTypeUrl[] = "type.googleapis.com/envoy.api.v2.Cluster"; constexpr char kEdsTypeUrl[] = "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment"; @@ -51,6 +54,23 @@ struct VersionState { ~VersionState() { GRPC_ERROR_UNREF(error); } }; +struct RdsUpdate { + // The name to use in the CDS request. + std::string cluster_name; +}; + +struct LdsUpdate { + // The name to use in the RDS request. + std::string route_config_name; + // The name to use in the CDS request. Present if the LDS response has it + // inlined. + Optional rds_update; +}; + +using LdsUpdateMap = std::map; + +using RdsUpdateMap = std::map; + struct CdsUpdate { // The name to use in the EDS request. // If empty, the cluster name will be used. @@ -175,6 +195,24 @@ using EdsUpdateMap = std::map; grpc_slice XdsUnsupportedTypeNackRequestCreateAndEncode( const std::string& type_url, const std::string& nonce, grpc_error* error); +// Creates an LDS request querying \a server_name. +// Takes ownership of \a error. +grpc_slice XdsLdsRequestCreateAndEncode(const std::string& server_name, + const XdsBootstrap::Node* node, + const char* build_version, + const std::string& version, + const std::string& nonce, + grpc_error* error); + +// Creates an RDS request querying \a route_config_name. +// Takes ownership of \a error. +grpc_slice XdsRdsRequestCreateAndEncode(const std::string& route_config_name, + const XdsBootstrap::Node* node, + const char* build_version, + const std::string& version, + const std::string& nonce, + grpc_error* error); + // Creates a CDS request querying \a cluster_names. // Takes ownership of \a error. grpc_slice XdsCdsRequestCreateAndEncode( @@ -193,10 +231,12 @@ grpc_slice XdsEdsRequestCreateAndEncode( // EDS. If the response can't be parsed at the top level, \a type_url will point // to an empty string; otherwise, it will point to the received data. grpc_error* XdsAdsResponseDecodeAndParse( - const grpc_slice& encoded_response, + const grpc_slice& encoded_response, const std::string& expected_server_name, + const std::string& expected_route_config_name, const std::set& expected_eds_service_names, - CdsUpdateMap* cds_update_map, EdsUpdateMap* eds_update_map, - std::string* version, std::string* nonce, std::string* type_url); + LdsUpdate* lds_update, RdsUpdate* rds_update, CdsUpdateMap* cds_update_map, + EdsUpdateMap* eds_update_map, std::string* version, std::string* nonce, + std::string* type_url); // Creates an LRS request querying \a server_name. grpc_slice XdsLrsRequestCreateAndEncode(const std::string& server_name, 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 e533bd490a2..52bda5aa8f3 100644 --- a/src/core/ext/filters/client_channel/xds/xds_client.cc +++ b/src/core/ext/filters/client_channel/xds/xds_client.cc @@ -146,6 +146,8 @@ class XdsClient::ChannelState::AdsCallState ~BufferedRequest() { GRPC_ERROR_UNREF(error); } }; + void AcceptLdsUpdate(LdsUpdate lds_update, std::string new_version); + void AcceptRdsUpdate(RdsUpdate rds_update, std::string new_version); void AcceptCdsUpdate(CdsUpdateMap cds_update_map, std::string new_version); void AcceptEdsUpdate(EdsUpdateMap eds_update_map, std::string new_version); @@ -183,6 +185,8 @@ class XdsClient::ChannelState::AdsCallState grpc_closure on_status_received_; // Version state. + VersionState lds_version_; + VersionState rds_version_; VersionState cds_version_; VersionState eds_version_; @@ -617,6 +621,15 @@ XdsClient::ChannelState::AdsCallState::AdsCallState( GRPC_CLOSURE_INIT(&on_request_sent_, OnRequestSent, this, grpc_schedule_on_exec_ctx); bool initial_message = true; + if (xds_client()->service_config_watcher_ != nullptr) { + if (xds_client()->route_config_name_.empty()) { + SendMessageLocked(kLdsTypeUrl, "", nullptr, initial_message); + initial_message = false; + } else if (xds_client()->cluster_name_.empty()) { + SendMessageLocked(kRdsTypeUrl, "", nullptr, initial_message); + initial_message = false; + } + } if (!xds_client()->cluster_map_.empty()) { SendMessageLocked(kCdsTypeUrl, "", nullptr, initial_message); initial_message = false; @@ -698,7 +711,19 @@ void XdsClient::ChannelState::AdsCallState::SendMessageLocked( is_first_message ? xds_client()->bootstrap_->node() : nullptr; const char* build_version = is_first_message ? xds_client()->build_version_.get() : nullptr; - if (type_url == kCdsTypeUrl) { + if (type_url == kLdsTypeUrl) { + request_payload_slice = XdsLdsRequestCreateAndEncode( + xds_client()->server_name_, node, build_version, + lds_version_.version_info, lds_version_.nonce, lds_version_.error); + lds_version_.error = GRPC_ERROR_NONE; + GRPC_ERROR_UNREF(error_for_unsupported_type); + } else if (type_url == kRdsTypeUrl) { + request_payload_slice = XdsRdsRequestCreateAndEncode( + xds_client()->route_config_name_, node, build_version, + rds_version_.version_info, rds_version_.nonce, rds_version_.error); + rds_version_.error = GRPC_ERROR_NONE; + GRPC_ERROR_UNREF(error_for_unsupported_type); + } else if (type_url == kCdsTypeUrl) { request_payload_slice = XdsCdsRequestCreateAndEncode( xds_client()->WatchedClusterNames(), node, build_version, cds_version_.version_info, cds_version_.nonce, cds_version_.error); @@ -736,6 +761,83 @@ void XdsClient::ChannelState::AdsCallState::SendMessageLocked( } } +void XdsClient::ChannelState::AdsCallState::AcceptLdsUpdate( + LdsUpdate lds_update, std::string new_version) { + const std::string& cluster_name = + lds_update.rds_update.has_value() + ? lds_update.rds_update.value().cluster_name + : ""; + if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { + gpr_log(GPR_INFO, + "[xds_client %p] LDS update received: " + "route_config_name=%s, " + "cluster_name=%s (empty if RDS is needed to obtain it)", + xds_client(), lds_update.route_config_name.c_str(), + cluster_name.c_str()); + } + // Ignore identical update. + if (xds_client()->route_config_name_ == lds_update.route_config_name && + xds_client()->cluster_name_ == cluster_name) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { + gpr_log(GPR_INFO, + "[xds_client %p] LDS update identical to current, ignoring.", + xds_client()); + } + return; + } + xds_client()->route_config_name_ = std::move(lds_update.route_config_name); + if (lds_update.rds_update.has_value()) { + // If cluster_name was found inlined in LDS response, notify the watcher + // immediately. + xds_client()->cluster_name_ = + std::move(lds_update.rds_update.value().cluster_name); + RefCountedPtr service_config; + grpc_error* error = xds_client()->CreateServiceConfig( + xds_client()->cluster_name_, &service_config); + if (error == GRPC_ERROR_NONE) { + xds_client()->service_config_watcher_->OnServiceConfigChanged( + std::move(service_config)); + } else { + xds_client()->service_config_watcher_->OnError(error); + } + } else { + // Send RDS request for dynamic resolution. + SendMessageLocked(kRdsTypeUrl, "", nullptr, false); + } + lds_version_.version_info = std::move(new_version); +} + +void XdsClient::ChannelState::AdsCallState::AcceptRdsUpdate( + RdsUpdate rds_update, std::string new_version) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { + gpr_log(GPR_INFO, + "[xds_client %p] RDS update received: " + "cluster_name=%s", + xds_client(), rds_update.cluster_name.c_str()); + } + // Ignore identical update. + if (xds_client()->cluster_name_ == rds_update.cluster_name) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { + gpr_log(GPR_INFO, + "[xds_client %p] RDS update identical to current, ignoring.", + xds_client()); + } + return; + } + xds_client()->cluster_name_ = std::move(rds_update.cluster_name); + // Notify the watcher. + RefCountedPtr service_config; + grpc_error* error = xds_client()->CreateServiceConfig( + xds_client()->cluster_name_, &service_config); + if (error == GRPC_ERROR_NONE) { + xds_client()->service_config_watcher_->OnServiceConfigChanged( + std::move(service_config)); + } else { + xds_client()->service_config_watcher_->OnError(error); + } + rds_version_.version_info = std::move(new_version); +} + void XdsClient::ChannelState::AdsCallState::AcceptCdsUpdate( CdsUpdateMap cds_update_map, std::string new_version) { for (auto& p : cds_update_map) { @@ -931,6 +1033,8 @@ void XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked( // mode. We will also need to cancel the timer when we receive a serverlist // from the balancer. // Parse the response. + LdsUpdate lds_update; + RdsUpdate rds_update; CdsUpdateMap cds_update_map; EdsUpdateMap eds_update_map; std::string version; @@ -938,7 +1042,8 @@ void XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked( std::string type_url; // Note that XdsAdsResponseDecodeAndParse() also validate the response. grpc_error* parse_error = XdsAdsResponseDecodeAndParse( - response_slice, xds_client->EdsServiceNames(), &cds_update_map, + response_slice, xds_client->server_name_, xds_client->route_config_name_, + xds_client->EdsServiceNames(), &lds_update, &rds_update, &cds_update_map, &eds_update_map, &version, &nonce, &type_url); grpc_slice_unref_internal(response_slice); if (type_url.empty()) { @@ -948,7 +1053,15 @@ void XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked( GRPC_ERROR_UNREF(parse_error); } else { // Update nonce and error. - if (type_url == kCdsTypeUrl) { + if (type_url == kLdsTypeUrl) { + ads_calld->lds_version_.nonce = nonce; + GRPC_ERROR_UNREF(ads_calld->lds_version_.error); + ads_calld->lds_version_.error = GRPC_ERROR_REF(parse_error); + } else if (type_url == kRdsTypeUrl) { + ads_calld->rds_version_.nonce = nonce; + GRPC_ERROR_UNREF(ads_calld->rds_version_.error); + ads_calld->rds_version_.error = GRPC_ERROR_REF(parse_error); + } else if (type_url == kCdsTypeUrl) { ads_calld->cds_version_.nonce = nonce; GRPC_ERROR_UNREF(ads_calld->cds_version_.error); ads_calld->cds_version_.error = GRPC_ERROR_REF(parse_error); @@ -967,8 +1080,12 @@ void XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked( ads_calld->SendMessageLocked(type_url, nonce, parse_error, false); } else { ads_calld->seen_response_ = true; - // Accept the (CDS or EDS) response. - if (type_url == kCdsTypeUrl) { + // Accept the ADS response according to the type_url. + if (type_url == kLdsTypeUrl) { + ads_calld->AcceptLdsUpdate(std::move(lds_update), std::move(version)); + } else if (type_url == kRdsTypeUrl) { + ads_calld->AcceptRdsUpdate(std::move(rds_update), std::move(version)); + } else if (type_url == kCdsTypeUrl) { ads_calld->AcceptCdsUpdate(std::move(cds_update_map), std::move(version)); } else if (type_url == kEdsTypeUrl) { @@ -976,7 +1093,7 @@ void XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked( std::move(version)); } // ACK the update. - ads_calld->SendMessageLocked(type_url, "", nullptr, false); + ads_calld->SendMessageLocked(type_url, nonce, nullptr, false); // Start load reporting if needed. auto& lrs_call = ads_calld->chand()->lrs_calld_; if (lrs_call != nullptr) { @@ -1467,11 +1584,11 @@ bool XdsClient::ChannelState::LrsCallState::IsCurrentCallOnChannel() const { namespace { -grpc_core::UniquePtr GenerateBuildVersionString() { +UniquePtr GenerateBuildVersionString() { char* build_version_str; gpr_asprintf(&build_version_str, "gRPC C-core %s %s", grpc_version_string(), GPR_PLATFORM_STRING); - return grpc_core::UniquePtr(build_version_str); + return UniquePtr(build_version_str); } } // namespace @@ -1501,11 +1618,7 @@ XdsClient::XdsClient(Combiner* combiner, grpc_pollset_set* interested_parties, chand_ = MakeOrphanable( Ref(DEBUG_LOCATION, "XdsClient+ChannelState"), channel_args); if (service_config_watcher_ != nullptr) { - // TODO(juanlishen): Start LDS call and do not return service config - // until we get the first LDS response. - GRPC_CLOSURE_INIT(&service_config_notify_, NotifyOnServiceConfig, - Ref().release(), nullptr); - combiner_->Run(&service_config_notify_, GRPC_ERROR_NONE); + chand_->OnResourceNamesChanged(kLdsTypeUrl); } } @@ -1613,6 +1726,25 @@ void XdsClient::ResetBackoff() { } } +grpc_error* XdsClient::CreateServiceConfig( + const std::string& cluster_name, + RefCountedPtr* service_config) const { + char* json; + gpr_asprintf(&json, + "{\n" + " \"loadBalancingConfig\":[\n" + " { \"cds_experimental\":{\n" + " \"cluster\": \"%s\"\n" + " } }\n" + " ]\n" + "}", + cluster_name.c_str()); + grpc_error* error = GRPC_ERROR_NONE; + *service_config = ServiceConfig::Create(json, &error); + gpr_free(json); + return error; +} + std::set XdsClient::WatchedClusterNames() const { std::set cluster_names; for (const auto& p : cluster_map_) { @@ -1666,32 +1798,6 @@ void XdsClient::NotifyOnError(grpc_error* error) { GRPC_ERROR_UNREF(error); } -void XdsClient::NotifyOnServiceConfig(void* arg, grpc_error* error) { - XdsClient* self = static_cast(arg); - // TODO(roth): When we add support for WeightedClusters, select the - // LB policy based on that functionality. - char* json; - gpr_asprintf(&json, - "{\n" - " \"loadBalancingConfig\":[\n" - " { \"cds_experimental\":{\n" - " \"cluster\": \"%s\"\n" - " } }\n" - " ]\n" - "}", - self->server_name_.c_str()); - RefCountedPtr service_config = - ServiceConfig::Create(json, &error); - gpr_free(json); - if (error != GRPC_ERROR_NONE) { - self->service_config_watcher_->OnError(error); - } else { - self->service_config_watcher_->OnServiceConfigChanged( - std::move(service_config)); - } - self->Unref(); -} - void* XdsClient::ChannelArgCopy(void* p) { XdsClient* xds_client = static_cast(p); xds_client->Ref().release(); 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 619b545ceb3..3e7df5b1581 100644 --- a/src/core/ext/filters/client_channel/xds/xds_client.h +++ b/src/core/ext/filters/client_channel/xds/xds_client.h @@ -116,8 +116,6 @@ class XdsClient : public InternallyRefCounted { const grpc_channel_args& args); private: - static const grpc_arg_pointer_vtable kXdsClientVtable; - // Contains a channel to the xds server and all the data related to the // channel. Holds a ref to the xds client object. // TODO(roth): This is separate from the XdsClient object because it was @@ -193,9 +191,9 @@ class XdsClient : public InternallyRefCounted { // Sends an error notification to all watchers. void NotifyOnError(grpc_error* error); - // TODO(juanlishen): Once we implement LDS support, this can be a - // normal method instead of a closure callback. - static void NotifyOnServiceConfig(void* arg, grpc_error* error); + grpc_error* CreateServiceConfig( + const std::string& cluster_name, + RefCountedPtr* service_config) const; std::set WatchedClusterNames() const; @@ -208,11 +206,7 @@ class XdsClient : public InternallyRefCounted { static void ChannelArgDestroy(void* p); static int ChannelArgCmp(void* p, void* q); - // All the received clusters are cached, no matter they are watched or not. - std::map cluster_map_; - // Only the watched EDS service names are stored. - std::map - endpoint_map_; + static const grpc_arg_pointer_vtable kXdsClientVtable; grpc_core::UniquePtr build_version_; @@ -221,15 +215,21 @@ class XdsClient : public InternallyRefCounted { std::unique_ptr bootstrap_; - std::string server_name_; + const std::string server_name_; + std::unique_ptr service_config_watcher_; - // TODO(juanlishen): Once we implement LDS support, this will no - // longer be needed. - grpc_closure service_config_notify_; // The channel for communicating with the xds server. OrphanablePtr chand_; + std::string route_config_name_; + std::string cluster_name_; + // All the received clusters are cached, no matter they are watched or not. + std::map cluster_map_; + // Only the watched EDS service names are stored. + std::map + endpoint_map_; + bool shutting_down_ = false; }; 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 new file mode 100644 index 00000000000..748ece26dd6 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c @@ -0,0 +1,103 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/lds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#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 "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[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 = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..97bb265162e --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h @@ -0,0 +1,379 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/lds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_LDS_PROTO_UPB_H_ +#define ENVOY_API_V2_LDS_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#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)); } + +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_LDS_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 new file mode 100644 index 00000000000..053149c62a4 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c @@ -0,0 +1,106 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener/listener.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#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 "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 new file mode 100644 index 00000000000..f91fad7a578 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h @@ -0,0 +1,389 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener/listener.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_LISTENER_LISTENER_PROTO_UPB_H_ +#define ENVOY_API_V2_LISTENER_LISTENER_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#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" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_LISTENER_LISTENER_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 new file mode 100644 index 00000000000..44e9e7b23ed --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener/udp_listener_config.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/api/v2/listener/udp_listener_config.upb.h" +#include "google/protobuf/any.upb.h" +#include "google/protobuf/struct.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_listener_UdpListenerConfig_submsgs[2] = { + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_listener_UdpListenerConfig__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit = { + &envoy_api_v2_listener_UdpListenerConfig_submsgs[0], + &envoy_api_v2_listener_UdpListenerConfig__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/udp_listener_config.upb.h b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h new file mode 100644 index 00000000000..d7b409a1247 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h @@ -0,0 +1,93 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener/udp_listener_config.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_LISTENER_UDP_LISTENER_CONFIG_PROTO_UPB_H_ +#define ENVOY_API_V2_LISTENER_UDP_LISTENER_CONFIG_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_listener_UdpListenerConfig; +typedef struct envoy_api_v2_listener_UdpListenerConfig envoy_api_v2_listener_UdpListenerConfig; +extern const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit; +struct google_protobuf_Any; +struct google_protobuf_Struct; +extern const upb_msglayout google_protobuf_Any_msginit; +extern const upb_msglayout google_protobuf_Struct_msginit; + + +/* envoy.api.v2.listener.UdpListenerConfig */ + +UPB_INLINE envoy_api_v2_listener_UdpListenerConfig *envoy_api_v2_listener_UdpListenerConfig_new(upb_arena *arena) { + return (envoy_api_v2_listener_UdpListenerConfig *)upb_msg_new(&envoy_api_v2_listener_UdpListenerConfig_msginit, arena); +} +UPB_INLINE envoy_api_v2_listener_UdpListenerConfig *envoy_api_v2_listener_UdpListenerConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_listener_UdpListenerConfig *ret = envoy_api_v2_listener_UdpListenerConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_UdpListenerConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_listener_UdpListenerConfig_serialize(const envoy_api_v2_listener_UdpListenerConfig *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_listener_UdpListenerConfig_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_listener_UdpListenerConfig_config_type_config = 2, + envoy_api_v2_listener_UdpListenerConfig_config_type_typed_config = 3, + envoy_api_v2_listener_UdpListenerConfig_config_type_NOT_SET = 0 +} envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases; +UPB_INLINE envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases envoy_api_v2_listener_UdpListenerConfig_config_type_case(const envoy_api_v2_listener_UdpListenerConfig* msg) { return (envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } + +UPB_INLINE upb_strview envoy_api_v2_listener_UdpListenerConfig_udp_listener_name(const envoy_api_v2_listener_UdpListenerConfig *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_listener_UdpListenerConfig_has_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_listener_UdpListenerConfig_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } +UPB_INLINE bool envoy_api_v2_listener_UdpListenerConfig_has_typed_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_listener_UdpListenerConfig_typed_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } + +UPB_INLINE void envoy_api_v2_listener_UdpListenerConfig_set_udp_listener_name(envoy_api_v2_listener_UdpListenerConfig *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_listener_UdpListenerConfig_set_config(envoy_api_v2_listener_UdpListenerConfig *msg, struct google_protobuf_Struct* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); +} +UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_listener_UdpListenerConfig_mutable_config(envoy_api_v2_listener_UdpListenerConfig *msg, upb_arena *arena) { + struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_listener_UdpListenerConfig_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_listener_UdpListenerConfig_set_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_listener_UdpListenerConfig_set_typed_config(envoy_api_v2_listener_UdpListenerConfig *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_UdpListenerConfig_mutable_typed_config(envoy_api_v2_listener_UdpListenerConfig *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_listener_UdpListenerConfig_typed_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_listener_UdpListenerConfig_set_typed_config(msg, sub); + } + return sub; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_LISTENER_UDP_LISTENER_CONFIG_PROTO_UPB_H_ */ 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 new file mode 100644 index 00000000000..8f9ea678df3 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/rds.upb.c @@ -0,0 +1,63 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/rds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#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 "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/rds.upb.h b/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h new file mode 100644 index 00000000000..08014f67efb --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h @@ -0,0 +1,199 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/rds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_RDS_PROTO_UPB_H_ +#define ENVOY_API_V2_RDS_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#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_RDS_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 new file mode 100644 index 00000000000..e0044657e3d --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c @@ -0,0 +1,731 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/route/route.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#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 "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 new file mode 100644 index 00000000000..c11ba9b201e --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h @@ -0,0 +1,2711 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/route/route.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_ROUTE_ROUTE_PROTO_UPB_H_ +#define ENVOY_API_V2_ROUTE_ROUTE_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#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" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ROUTE_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 new file mode 100644 index 00000000000..51c1ee17b94 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/srds.upb.c @@ -0,0 +1,59 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/srds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#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 "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/srds.upb.h b/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h new file mode 100644 index 00000000000..2c19cff388f --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h @@ -0,0 +1,134 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/srds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_SRDS_PROTO_UPB_H_ +#define ENVOY_API_V2_SRDS_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#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_SRDS_PROTO_UPB_H_ */ 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 new file mode 100644 index 00000000000..1f4a3660943 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c @@ -0,0 +1,226 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/filter/accesslog/v2/accesslog.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#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/type/percent.upb.h" +#include "google/protobuf/any.upb.h" +#include "google/protobuf/struct.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_config_filter_accesslog_v2_AccessLog_submsgs[3] = { + &envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_AccessLog__fields[4] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, + {3, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 2, 11, 1}, + {4, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_AccessLog_msginit = { + &envoy_config_filter_accesslog_v2_AccessLog_submsgs[0], + &envoy_config_filter_accesslog_v2_AccessLog__fields[0], + UPB_SIZE(24, 48), 4, false, +}; + +static const upb_msglayout *const envoy_config_filter_accesslog_v2_AccessLogFilter_submsgs[11] = { + &envoy_config_filter_accesslog_v2_AndFilter_msginit, + &envoy_config_filter_accesslog_v2_DurationFilter_msginit, + &envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, + &envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, + &envoy_config_filter_accesslog_v2_HeaderFilter_msginit, + &envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, + &envoy_config_filter_accesslog_v2_OrFilter_msginit, + &envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, + &envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, + &envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, + &envoy_config_filter_accesslog_v2_TraceableFilter_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_AccessLogFilter__fields[11] = { + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 9, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 10, 11, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 8, 11, 1}, + {6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {7, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 6, 11, 1}, + {8, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1}, + {9, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 7, 11, 1}, + {10, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, + {11, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_AccessLogFilter_msginit = { + &envoy_config_filter_accesslog_v2_AccessLogFilter_submsgs[0], + &envoy_config_filter_accesslog_v2_AccessLogFilter__fields[0], + UPB_SIZE(8, 16), 11, false, +}; + +static const upb_msglayout *const envoy_config_filter_accesslog_v2_ComparisonFilter_submsgs[1] = { + &envoy_api_v2_core_RuntimeUInt32_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_ComparisonFilter__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {2, UPB_SIZE(8, 8), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_ComparisonFilter_msginit = { + &envoy_config_filter_accesslog_v2_ComparisonFilter_submsgs[0], + &envoy_config_filter_accesslog_v2_ComparisonFilter__fields[0], + UPB_SIZE(16, 16), 2, false, +}; + +static const upb_msglayout *const envoy_config_filter_accesslog_v2_StatusCodeFilter_submsgs[1] = { + &envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_StatusCodeFilter__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit = { + &envoy_config_filter_accesslog_v2_StatusCodeFilter_submsgs[0], + &envoy_config_filter_accesslog_v2_StatusCodeFilter__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_config_filter_accesslog_v2_DurationFilter_submsgs[1] = { + &envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_DurationFilter__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_DurationFilter_msginit = { + &envoy_config_filter_accesslog_v2_DurationFilter_submsgs[0], + &envoy_config_filter_accesslog_v2_DurationFilter__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_TraceableFilter_msginit = { + NULL, + NULL, + UPB_SIZE(0, 0), 0, false, +}; + +static const upb_msglayout *const envoy_config_filter_accesslog_v2_RuntimeFilter_submsgs[1] = { + &envoy_type_FractionalPercent_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_RuntimeFilter__fields[3] = { + {1, UPB_SIZE(4, 8), 0, 0, 9, 1}, + {2, UPB_SIZE(12, 24), 0, 0, 11, 1}, + {3, UPB_SIZE(0, 0), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_RuntimeFilter_msginit = { + &envoy_config_filter_accesslog_v2_RuntimeFilter_submsgs[0], + &envoy_config_filter_accesslog_v2_RuntimeFilter__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_config_filter_accesslog_v2_AndFilter_submsgs[1] = { + &envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_AndFilter__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_AndFilter_msginit = { + &envoy_config_filter_accesslog_v2_AndFilter_submsgs[0], + &envoy_config_filter_accesslog_v2_AndFilter__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_config_filter_accesslog_v2_OrFilter_submsgs[1] = { + &envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_OrFilter__fields[1] = { + {2, UPB_SIZE(0, 0), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_OrFilter_msginit = { + &envoy_config_filter_accesslog_v2_OrFilter_submsgs[0], + &envoy_config_filter_accesslog_v2_OrFilter__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_config_filter_accesslog_v2_HeaderFilter_submsgs[1] = { + &envoy_api_v2_route_HeaderMatcher_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_HeaderFilter__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_HeaderFilter_msginit = { + &envoy_config_filter_accesslog_v2_HeaderFilter_submsgs[0], + &envoy_config_filter_accesslog_v2_HeaderFilter__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_ResponseFlagFilter__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 3}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit = { + NULL, + &envoy_config_filter_accesslog_v2_ResponseFlagFilter__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_GrpcStatusFilter__fields[2] = { + {1, UPB_SIZE(4, 8), 0, 0, 14, 3}, + {2, UPB_SIZE(0, 0), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit = { + NULL, + &envoy_config_filter_accesslog_v2_GrpcStatusFilter__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + +static const upb_msglayout *const envoy_config_filter_accesslog_v2_ExtensionFilter_submsgs[2] = { + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_accesslog_v2_ExtensionFilter__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_accesslog_v2_ExtensionFilter_msginit = { + &envoy_config_filter_accesslog_v2_ExtensionFilter_submsgs[0], + &envoy_config_filter_accesslog_v2_ExtensionFilter__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h new file mode 100644 index 00000000000..50e037bab9a --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h @@ -0,0 +1,725 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/filter/accesslog/v2/accesslog.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_CONFIG_FILTER_ACCESSLOG_V2_ACCESSLOG_PROTO_UPB_H_ +#define ENVOY_CONFIG_FILTER_ACCESSLOG_V2_ACCESSLOG_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_config_filter_accesslog_v2_AccessLog; +struct envoy_config_filter_accesslog_v2_AccessLogFilter; +struct envoy_config_filter_accesslog_v2_ComparisonFilter; +struct envoy_config_filter_accesslog_v2_StatusCodeFilter; +struct envoy_config_filter_accesslog_v2_DurationFilter; +struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter; +struct envoy_config_filter_accesslog_v2_TraceableFilter; +struct envoy_config_filter_accesslog_v2_RuntimeFilter; +struct envoy_config_filter_accesslog_v2_AndFilter; +struct envoy_config_filter_accesslog_v2_OrFilter; +struct envoy_config_filter_accesslog_v2_HeaderFilter; +struct envoy_config_filter_accesslog_v2_ResponseFlagFilter; +struct envoy_config_filter_accesslog_v2_GrpcStatusFilter; +struct envoy_config_filter_accesslog_v2_ExtensionFilter; +typedef struct envoy_config_filter_accesslog_v2_AccessLog envoy_config_filter_accesslog_v2_AccessLog; +typedef struct envoy_config_filter_accesslog_v2_AccessLogFilter envoy_config_filter_accesslog_v2_AccessLogFilter; +typedef struct envoy_config_filter_accesslog_v2_ComparisonFilter envoy_config_filter_accesslog_v2_ComparisonFilter; +typedef struct envoy_config_filter_accesslog_v2_StatusCodeFilter envoy_config_filter_accesslog_v2_StatusCodeFilter; +typedef struct envoy_config_filter_accesslog_v2_DurationFilter envoy_config_filter_accesslog_v2_DurationFilter; +typedef struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter envoy_config_filter_accesslog_v2_NotHealthCheckFilter; +typedef struct envoy_config_filter_accesslog_v2_TraceableFilter envoy_config_filter_accesslog_v2_TraceableFilter; +typedef struct envoy_config_filter_accesslog_v2_RuntimeFilter envoy_config_filter_accesslog_v2_RuntimeFilter; +typedef struct envoy_config_filter_accesslog_v2_AndFilter envoy_config_filter_accesslog_v2_AndFilter; +typedef struct envoy_config_filter_accesslog_v2_OrFilter envoy_config_filter_accesslog_v2_OrFilter; +typedef struct envoy_config_filter_accesslog_v2_HeaderFilter envoy_config_filter_accesslog_v2_HeaderFilter; +typedef struct envoy_config_filter_accesslog_v2_ResponseFlagFilter envoy_config_filter_accesslog_v2_ResponseFlagFilter; +typedef struct envoy_config_filter_accesslog_v2_GrpcStatusFilter envoy_config_filter_accesslog_v2_GrpcStatusFilter; +typedef struct envoy_config_filter_accesslog_v2_ExtensionFilter envoy_config_filter_accesslog_v2_ExtensionFilter; +extern const upb_msglayout envoy_config_filter_accesslog_v2_AccessLog_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_AccessLogFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_ComparisonFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_DurationFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_TraceableFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_RuntimeFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_AndFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_OrFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_HeaderFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_ExtensionFilter_msginit; +struct envoy_api_v2_core_RuntimeUInt32; +struct envoy_api_v2_route_HeaderMatcher; +struct envoy_type_FractionalPercent; +struct google_protobuf_Any; +struct google_protobuf_Struct; +extern const upb_msglayout envoy_api_v2_core_RuntimeUInt32_msginit; +extern const upb_msglayout envoy_api_v2_route_HeaderMatcher_msginit; +extern const upb_msglayout envoy_type_FractionalPercent_msginit; +extern const upb_msglayout google_protobuf_Any_msginit; +extern const upb_msglayout google_protobuf_Struct_msginit; + +typedef enum { + envoy_config_filter_accesslog_v2_ComparisonFilter_EQ = 0, + envoy_config_filter_accesslog_v2_ComparisonFilter_GE = 1, + envoy_config_filter_accesslog_v2_ComparisonFilter_LE = 2 +} envoy_config_filter_accesslog_v2_ComparisonFilter_Op; + +typedef enum { + envoy_config_filter_accesslog_v2_GrpcStatusFilter_OK = 0, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_CANCELED = 1, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_UNKNOWN = 2, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_INVALID_ARGUMENT = 3, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_DEADLINE_EXCEEDED = 4, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_NOT_FOUND = 5, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_ALREADY_EXISTS = 6, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_PERMISSION_DENIED = 7, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_RESOURCE_EXHAUSTED = 8, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_FAILED_PRECONDITION = 9, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_ABORTED = 10, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_OUT_OF_RANGE = 11, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_UNIMPLEMENTED = 12, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_INTERNAL = 13, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_UNAVAILABLE = 14, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_DATA_LOSS = 15, + envoy_config_filter_accesslog_v2_GrpcStatusFilter_UNAUTHENTICATED = 16 +} envoy_config_filter_accesslog_v2_GrpcStatusFilter_Status; + + +/* envoy.config.filter.accesslog.v2.AccessLog */ + +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLog *envoy_config_filter_accesslog_v2_AccessLog_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_AccessLog *)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLog_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLog *envoy_config_filter_accesslog_v2_AccessLog_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_AccessLog *ret = envoy_config_filter_accesslog_v2_AccessLog_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_AccessLog_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_AccessLog_serialize(const envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_AccessLog_msginit, arena, len); +} + +typedef enum { + envoy_config_filter_accesslog_v2_AccessLog_config_type_config = 3, + envoy_config_filter_accesslog_v2_AccessLog_config_type_typed_config = 4, + envoy_config_filter_accesslog_v2_AccessLog_config_type_NOT_SET = 0 +} envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases; +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases envoy_config_filter_accesslog_v2_AccessLog_config_type_case(const envoy_config_filter_accesslog_v2_AccessLog* msg) { return (envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 32)); } + +UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_AccessLog_name(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AccessLog_filter(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_accesslog_v2_AccessLogFilter*, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 3); } +UPB_INLINE const struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_AccessLog_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 3, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_typed_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 4); } +UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_accesslog_v2_AccessLog_typed_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 4, NULL); } + +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_name(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_filter(envoy_config_filter_accesslog_v2_AccessLog *msg, envoy_config_filter_accesslog_v2_AccessLogFilter* value) { + UPB_FIELD_AT(msg, envoy_config_filter_accesslog_v2_AccessLogFilter*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AccessLog_mutable_filter(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)envoy_config_filter_accesslog_v2_AccessLog_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLog_set_filter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_config(envoy_config_filter_accesslog_v2_AccessLog *msg, struct google_protobuf_Struct* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 3); +} +UPB_INLINE struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_AccessLog_mutable_config(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena) { + struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_filter_accesslog_v2_AccessLog_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLog_set_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_typed_config(envoy_config_filter_accesslog_v2_AccessLog *msg, struct google_protobuf_Any* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 4); +} +UPB_INLINE struct google_protobuf_Any* envoy_config_filter_accesslog_v2_AccessLog_mutable_typed_config(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_filter_accesslog_v2_AccessLog_typed_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLog_set_typed_config(msg, sub); + } + return sub; +} + +/* envoy.config.filter.accesslog.v2.AccessLogFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter *envoy_config_filter_accesslog_v2_AccessLogFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_AccessLogFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter *envoy_config_filter_accesslog_v2_AccessLogFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_AccessLogFilter *ret = envoy_config_filter_accesslog_v2_AccessLogFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_AccessLogFilter_serialize(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena, len); +} + +typedef enum { + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_status_code_filter = 1, + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_duration_filter = 2, + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_not_health_check_filter = 3, + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_traceable_filter = 4, + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_runtime_filter = 5, + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_and_filter = 6, + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_or_filter = 7, + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_header_filter = 8, + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_response_flag_filter = 9, + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_grpc_status_filter = 10, + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_extension_filter = 11, + envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_NOT_SET = 0 +} envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases; +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_case(const envoy_config_filter_accesslog_v2_AccessLogFilter* msg) { return (envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } + +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_status_code_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE const envoy_config_filter_accesslog_v2_StatusCodeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_status_code_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_StatusCodeFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_duration_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE const envoy_config_filter_accesslog_v2_DurationFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_duration_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_DurationFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_not_health_check_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } +UPB_INLINE const envoy_config_filter_accesslog_v2_NotHealthCheckFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_not_health_check_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_NotHealthCheckFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_traceable_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); } +UPB_INLINE const envoy_config_filter_accesslog_v2_TraceableFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_traceable_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_TraceableFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_runtime_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 5); } +UPB_INLINE const envoy_config_filter_accesslog_v2_RuntimeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_runtime_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_RuntimeFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_and_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 6); } +UPB_INLINE const envoy_config_filter_accesslog_v2_AndFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_and_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_AndFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_or_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 7); } +UPB_INLINE const envoy_config_filter_accesslog_v2_OrFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_or_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_OrFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_header_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 8); } +UPB_INLINE const envoy_config_filter_accesslog_v2_HeaderFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_header_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_HeaderFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_response_flag_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 9); } +UPB_INLINE const envoy_config_filter_accesslog_v2_ResponseFlagFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_response_flag_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_ResponseFlagFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_grpc_status_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 10); } +UPB_INLINE const envoy_config_filter_accesslog_v2_GrpcStatusFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_grpc_status_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_GrpcStatusFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 10, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_extension_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 11); } +UPB_INLINE const envoy_config_filter_accesslog_v2_ExtensionFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_extension_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_ExtensionFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 11, NULL); } + +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_status_code_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_StatusCodeFilter* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_StatusCodeFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_StatusCodeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_status_code_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_StatusCodeFilter* sub = (struct envoy_config_filter_accesslog_v2_StatusCodeFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_status_code_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_StatusCodeFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLogFilter_set_status_code_filter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_duration_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_DurationFilter* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_DurationFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_DurationFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_duration_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_DurationFilter* sub = (struct envoy_config_filter_accesslog_v2_DurationFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_duration_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_DurationFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLogFilter_set_duration_filter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_not_health_check_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_NotHealthCheckFilter* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_NotHealthCheckFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_not_health_check_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter* sub = (struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_not_health_check_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLogFilter_set_not_health_check_filter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_traceable_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_TraceableFilter* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_TraceableFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_TraceableFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_traceable_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_TraceableFilter* sub = (struct envoy_config_filter_accesslog_v2_TraceableFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_traceable_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_TraceableFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLogFilter_set_traceable_filter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_runtime_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_RuntimeFilter* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_RuntimeFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_RuntimeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_runtime_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_RuntimeFilter* sub = (struct envoy_config_filter_accesslog_v2_RuntimeFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_runtime_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_RuntimeFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLogFilter_set_runtime_filter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_and_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_AndFilter* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_AndFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 6); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_AndFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_and_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_AndFilter* sub = (struct envoy_config_filter_accesslog_v2_AndFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_and_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_AndFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AndFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLogFilter_set_and_filter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_or_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_OrFilter* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_OrFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 7); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_OrFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_or_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_OrFilter* sub = (struct envoy_config_filter_accesslog_v2_OrFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_or_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_OrFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_OrFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLogFilter_set_or_filter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_header_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_HeaderFilter* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_HeaderFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 8); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_HeaderFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_header_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_HeaderFilter* sub = (struct envoy_config_filter_accesslog_v2_HeaderFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_header_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_HeaderFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLogFilter_set_header_filter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_response_flag_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_ResponseFlagFilter* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_ResponseFlagFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 9); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_ResponseFlagFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_response_flag_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_ResponseFlagFilter* sub = (struct envoy_config_filter_accesslog_v2_ResponseFlagFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_response_flag_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_ResponseFlagFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLogFilter_set_response_flag_filter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_grpc_status_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_GrpcStatusFilter* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_GrpcStatusFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 10); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_GrpcStatusFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_grpc_status_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_GrpcStatusFilter* sub = (struct envoy_config_filter_accesslog_v2_GrpcStatusFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_grpc_status_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_GrpcStatusFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLogFilter_set_grpc_status_filter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_extension_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_ExtensionFilter* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_ExtensionFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 11); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_ExtensionFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_extension_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_ExtensionFilter* sub = (struct envoy_config_filter_accesslog_v2_ExtensionFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_extension_filter(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_ExtensionFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_AccessLogFilter_set_extension_filter(msg, sub); + } + return sub; +} + +/* envoy.config.filter.accesslog.v2.ComparisonFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_ComparisonFilter *envoy_config_filter_accesslog_v2_ComparisonFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_ComparisonFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_ComparisonFilter *envoy_config_filter_accesslog_v2_ComparisonFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_ComparisonFilter *ret = envoy_config_filter_accesslog_v2_ComparisonFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_ComparisonFilter_serialize(const envoy_config_filter_accesslog_v2_ComparisonFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena, len); +} + +UPB_INLINE int32_t envoy_config_filter_accesslog_v2_ComparisonFilter_op(const envoy_config_filter_accesslog_v2_ComparisonFilter *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_core_RuntimeUInt32* envoy_config_filter_accesslog_v2_ComparisonFilter_value(const envoy_config_filter_accesslog_v2_ComparisonFilter *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_RuntimeUInt32*, UPB_SIZE(8, 8)); } + +UPB_INLINE void envoy_config_filter_accesslog_v2_ComparisonFilter_set_op(envoy_config_filter_accesslog_v2_ComparisonFilter *msg, int32_t value) { + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_ComparisonFilter_set_value(envoy_config_filter_accesslog_v2_ComparisonFilter *msg, struct envoy_api_v2_core_RuntimeUInt32* value) { + UPB_FIELD_AT(msg, struct envoy_api_v2_core_RuntimeUInt32*, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE struct envoy_api_v2_core_RuntimeUInt32* envoy_config_filter_accesslog_v2_ComparisonFilter_mutable_value(envoy_config_filter_accesslog_v2_ComparisonFilter *msg, upb_arena *arena) { + struct envoy_api_v2_core_RuntimeUInt32* sub = (struct envoy_api_v2_core_RuntimeUInt32*)envoy_config_filter_accesslog_v2_ComparisonFilter_value(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_RuntimeUInt32*)upb_msg_new(&envoy_api_v2_core_RuntimeUInt32_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_ComparisonFilter_set_value(msg, sub); + } + return sub; +} + +/* envoy.config.filter.accesslog.v2.StatusCodeFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_StatusCodeFilter *envoy_config_filter_accesslog_v2_StatusCodeFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_StatusCodeFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_StatusCodeFilter *envoy_config_filter_accesslog_v2_StatusCodeFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_StatusCodeFilter *ret = envoy_config_filter_accesslog_v2_StatusCodeFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_StatusCodeFilter_serialize(const envoy_config_filter_accesslog_v2_StatusCodeFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena, len); +} + +UPB_INLINE const envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_StatusCodeFilter_comparison(const envoy_config_filter_accesslog_v2_StatusCodeFilter *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_config_filter_accesslog_v2_StatusCodeFilter_set_comparison(envoy_config_filter_accesslog_v2_StatusCodeFilter *msg, envoy_config_filter_accesslog_v2_ComparisonFilter* value) { + UPB_FIELD_AT(msg, envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_StatusCodeFilter_mutable_comparison(envoy_config_filter_accesslog_v2_StatusCodeFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_ComparisonFilter* sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)envoy_config_filter_accesslog_v2_StatusCodeFilter_comparison(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_StatusCodeFilter_set_comparison(msg, sub); + } + return sub; +} + +/* envoy.config.filter.accesslog.v2.DurationFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_DurationFilter *envoy_config_filter_accesslog_v2_DurationFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_DurationFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_DurationFilter *envoy_config_filter_accesslog_v2_DurationFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_DurationFilter *ret = envoy_config_filter_accesslog_v2_DurationFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_DurationFilter_serialize(const envoy_config_filter_accesslog_v2_DurationFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena, len); +} + +UPB_INLINE const envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_DurationFilter_comparison(const envoy_config_filter_accesslog_v2_DurationFilter *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_config_filter_accesslog_v2_DurationFilter_set_comparison(envoy_config_filter_accesslog_v2_DurationFilter *msg, envoy_config_filter_accesslog_v2_ComparisonFilter* value) { + UPB_FIELD_AT(msg, envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_DurationFilter_mutable_comparison(envoy_config_filter_accesslog_v2_DurationFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_ComparisonFilter* sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)envoy_config_filter_accesslog_v2_DurationFilter_comparison(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_DurationFilter_set_comparison(msg, sub); + } + return sub; +} + +/* envoy.config.filter.accesslog.v2.NotHealthCheckFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_NotHealthCheckFilter *envoy_config_filter_accesslog_v2_NotHealthCheckFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_NotHealthCheckFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_NotHealthCheckFilter *envoy_config_filter_accesslog_v2_NotHealthCheckFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_NotHealthCheckFilter *ret = envoy_config_filter_accesslog_v2_NotHealthCheckFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_NotHealthCheckFilter_serialize(const envoy_config_filter_accesslog_v2_NotHealthCheckFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena, len); +} + + + +/* envoy.config.filter.accesslog.v2.TraceableFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_TraceableFilter *envoy_config_filter_accesslog_v2_TraceableFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_TraceableFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_TraceableFilter *envoy_config_filter_accesslog_v2_TraceableFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_TraceableFilter *ret = envoy_config_filter_accesslog_v2_TraceableFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_TraceableFilter_serialize(const envoy_config_filter_accesslog_v2_TraceableFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena, len); +} + + + +/* envoy.config.filter.accesslog.v2.RuntimeFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_RuntimeFilter *envoy_config_filter_accesslog_v2_RuntimeFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_RuntimeFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_RuntimeFilter *envoy_config_filter_accesslog_v2_RuntimeFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_RuntimeFilter *ret = envoy_config_filter_accesslog_v2_RuntimeFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_RuntimeFilter_serialize(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_RuntimeFilter_runtime_key(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE const struct envoy_type_FractionalPercent* envoy_config_filter_accesslog_v2_RuntimeFilter_percent_sampled(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_FractionalPercent*, UPB_SIZE(12, 24)); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_RuntimeFilter_use_independent_randomness(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_config_filter_accesslog_v2_RuntimeFilter_set_runtime_key(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_RuntimeFilter_set_percent_sampled(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, struct envoy_type_FractionalPercent* value) { + UPB_FIELD_AT(msg, struct envoy_type_FractionalPercent*, UPB_SIZE(12, 24)) = value; +} +UPB_INLINE struct envoy_type_FractionalPercent* envoy_config_filter_accesslog_v2_RuntimeFilter_mutable_percent_sampled(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, upb_arena *arena) { + struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_config_filter_accesslog_v2_RuntimeFilter_percent_sampled(msg); + if (sub == NULL) { + sub = (struct envoy_type_FractionalPercent*)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_RuntimeFilter_set_percent_sampled(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_RuntimeFilter_set_use_independent_randomness(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; +} + +/* envoy.config.filter.accesslog.v2.AndFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_AndFilter *envoy_config_filter_accesslog_v2_AndFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_AndFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_AndFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_AndFilter *envoy_config_filter_accesslog_v2_AndFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_AndFilter *ret = envoy_config_filter_accesslog_v2_AndFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_AndFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_AndFilter_serialize(const envoy_config_filter_accesslog_v2_AndFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_AndFilter_msginit, arena, len); +} + +UPB_INLINE const envoy_config_filter_accesslog_v2_AccessLogFilter* const* envoy_config_filter_accesslog_v2_AndFilter_filters(const envoy_config_filter_accesslog_v2_AndFilter *msg, size_t *len) { return (const envoy_config_filter_accesslog_v2_AccessLogFilter* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } + +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_AndFilter_mutable_filters(envoy_config_filter_accesslog_v2_AndFilter *msg, size_t *len) { + return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); +} +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_AndFilter_resize_filters(envoy_config_filter_accesslog_v2_AndFilter *msg, size_t len, upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AndFilter_add_filters(envoy_config_filter_accesslog_v2_AndFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); + 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.config.filter.accesslog.v2.OrFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_OrFilter *envoy_config_filter_accesslog_v2_OrFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_OrFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_OrFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_OrFilter *envoy_config_filter_accesslog_v2_OrFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_OrFilter *ret = envoy_config_filter_accesslog_v2_OrFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_OrFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_OrFilter_serialize(const envoy_config_filter_accesslog_v2_OrFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_OrFilter_msginit, arena, len); +} + +UPB_INLINE const envoy_config_filter_accesslog_v2_AccessLogFilter* const* envoy_config_filter_accesslog_v2_OrFilter_filters(const envoy_config_filter_accesslog_v2_OrFilter *msg, size_t *len) { return (const envoy_config_filter_accesslog_v2_AccessLogFilter* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } + +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_OrFilter_mutable_filters(envoy_config_filter_accesslog_v2_OrFilter *msg, size_t *len) { + return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); +} +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_OrFilter_resize_filters(envoy_config_filter_accesslog_v2_OrFilter *msg, size_t len, upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_OrFilter_add_filters(envoy_config_filter_accesslog_v2_OrFilter *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); + 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.config.filter.accesslog.v2.HeaderFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_HeaderFilter *envoy_config_filter_accesslog_v2_HeaderFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_HeaderFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_HeaderFilter *envoy_config_filter_accesslog_v2_HeaderFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_HeaderFilter *ret = envoy_config_filter_accesslog_v2_HeaderFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_HeaderFilter_serialize(const envoy_config_filter_accesslog_v2_HeaderFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena, len); +} + +UPB_INLINE const struct envoy_api_v2_route_HeaderMatcher* envoy_config_filter_accesslog_v2_HeaderFilter_header(const envoy_config_filter_accesslog_v2_HeaderFilter *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_config_filter_accesslog_v2_HeaderFilter_set_header(envoy_config_filter_accesslog_v2_HeaderFilter *msg, struct envoy_api_v2_route_HeaderMatcher* value) { + UPB_FIELD_AT(msg, struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_config_filter_accesslog_v2_HeaderFilter_mutable_header(envoy_config_filter_accesslog_v2_HeaderFilter *msg, upb_arena *arena) { + struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)envoy_config_filter_accesslog_v2_HeaderFilter_header(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_HeaderFilter_set_header(msg, sub); + } + return sub; +} + +/* envoy.config.filter.accesslog.v2.ResponseFlagFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_ResponseFlagFilter *envoy_config_filter_accesslog_v2_ResponseFlagFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_ResponseFlagFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_ResponseFlagFilter *envoy_config_filter_accesslog_v2_ResponseFlagFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_ResponseFlagFilter *ret = envoy_config_filter_accesslog_v2_ResponseFlagFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_ResponseFlagFilter_serialize(const envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena, len); +} + +UPB_INLINE upb_strview const* envoy_config_filter_accesslog_v2_ResponseFlagFilter_flags(const envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } + +UPB_INLINE upb_strview* envoy_config_filter_accesslog_v2_ResponseFlagFilter_mutable_flags(envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); +} +UPB_INLINE upb_strview* envoy_config_filter_accesslog_v2_ResponseFlagFilter_resize_flags(envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool envoy_config_filter_accesslog_v2_ResponseFlagFilter_add_flags(envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(0, 0), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} + +/* envoy.config.filter.accesslog.v2.GrpcStatusFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_GrpcStatusFilter *envoy_config_filter_accesslog_v2_GrpcStatusFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_GrpcStatusFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_GrpcStatusFilter *envoy_config_filter_accesslog_v2_GrpcStatusFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_GrpcStatusFilter *ret = envoy_config_filter_accesslog_v2_GrpcStatusFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_GrpcStatusFilter_serialize(const envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena, len); +} + +UPB_INLINE int32_t const* envoy_config_filter_accesslog_v2_GrpcStatusFilter_statuses(const envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_GrpcStatusFilter_exclude(const envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } + +UPB_INLINE int32_t* envoy_config_filter_accesslog_v2_GrpcStatusFilter_mutable_statuses(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, size_t *len) { + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); +} +UPB_INLINE int32_t* envoy_config_filter_accesslog_v2_GrpcStatusFilter_resize_statuses(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, size_t len, upb_arena *arena) { + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(8, 8), UPB_TYPE_ENUM, arena); +} +UPB_INLINE bool envoy_config_filter_accesslog_v2_GrpcStatusFilter_add_statuses(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, int32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(4, 8), UPB_SIZE(8, 8), UPB_TYPE_ENUM, &val, arena); +} +UPB_INLINE void envoy_config_filter_accesslog_v2_GrpcStatusFilter_set_exclude(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; +} + +/* envoy.config.filter.accesslog.v2.ExtensionFilter */ + +UPB_INLINE envoy_config_filter_accesslog_v2_ExtensionFilter *envoy_config_filter_accesslog_v2_ExtensionFilter_new(upb_arena *arena) { + return (envoy_config_filter_accesslog_v2_ExtensionFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_accesslog_v2_ExtensionFilter *envoy_config_filter_accesslog_v2_ExtensionFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_accesslog_v2_ExtensionFilter *ret = envoy_config_filter_accesslog_v2_ExtensionFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_accesslog_v2_ExtensionFilter_serialize(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena, len); +} + +typedef enum { + envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_config = 2, + envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_typed_config = 3, + envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_NOT_SET = 0 +} envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases; +UPB_INLINE envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_case(const envoy_config_filter_accesslog_v2_ExtensionFilter* msg) { return (envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } + +UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_ExtensionFilter_name(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_ExtensionFilter_has_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE const struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_ExtensionFilter_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_ExtensionFilter_has_typed_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_accesslog_v2_ExtensionFilter_typed_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } + +UPB_INLINE void envoy_config_filter_accesslog_v2_ExtensionFilter_set_name(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_ExtensionFilter_set_config(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, struct google_protobuf_Struct* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); +} +UPB_INLINE struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_ExtensionFilter_mutable_config(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_arena *arena) { + struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_filter_accesslog_v2_ExtensionFilter_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_ExtensionFilter_set_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_accesslog_v2_ExtensionFilter_set_typed_config(envoy_config_filter_accesslog_v2_ExtensionFilter *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_config_filter_accesslog_v2_ExtensionFilter_mutable_typed_config(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_filter_accesslog_v2_ExtensionFilter_typed_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_accesslog_v2_ExtensionFilter_set_typed_config(msg, sub); + } + return sub; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_CONFIG_FILTER_ACCESSLOG_V2_ACCESSLOG_PROTO_UPB_H_ */ 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 new file mode 100644 index 00000000000..137d43abe90 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c @@ -0,0 +1,291 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#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/config/filter/accesslog/v2/accesslog.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 "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_submsgs[22] = { + &envoy_api_v2_RouteConfiguration_msginit, + &envoy_api_v2_core_Http1ProtocolOptions_msginit, + &envoy_api_v2_core_Http2ProtocolOptions_msginit, + &envoy_api_v2_core_HttpProtocolOptions_msginit, + &envoy_config_filter_accesslog_v2_AccessLog_msginit, + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit, + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit, + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit, + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit, + &envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, + &envoy_config_filter_network_http_connection_manager_v2_Rds_msginit, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit, + &google_protobuf_BoolValue_msginit, + &google_protobuf_Duration_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager__fields[34] = { + {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {2, UPB_SIZE(36, 40), 0, 0, 9, 1}, + {3, UPB_SIZE(136, 240), UPB_SIZE(-141, -249), 10, 11, 1}, + {4, UPB_SIZE(136, 240), UPB_SIZE(-141, -249), 0, 11, 1}, + {5, UPB_SIZE(124, 216), 0, 9, 11, 3}, + {6, UPB_SIZE(60, 88), 0, 12, 11, 1}, + {7, UPB_SIZE(64, 96), 0, 7, 11, 1}, + {8, UPB_SIZE(68, 104), 0, 1, 11, 1}, + {9, UPB_SIZE(72, 112), 0, 2, 11, 1}, + {10, UPB_SIZE(44, 56), 0, 0, 9, 1}, + {11, UPB_SIZE(76, 120), 0, 13, 11, 1}, + {12, UPB_SIZE(80, 128), 0, 13, 11, 1}, + {13, UPB_SIZE(128, 224), 0, 4, 11, 3}, + {14, UPB_SIZE(84, 136), 0, 12, 11, 1}, + {15, UPB_SIZE(88, 144), 0, 12, 11, 1}, + {16, UPB_SIZE(8, 8), 0, 0, 14, 1}, + {17, UPB_SIZE(92, 152), 0, 6, 11, 1}, + {18, UPB_SIZE(28, 28), 0, 0, 8, 1}, + {19, UPB_SIZE(24, 24), 0, 0, 13, 1}, + {20, UPB_SIZE(29, 29), 0, 0, 8, 1}, + {21, UPB_SIZE(30, 30), 0, 0, 8, 1}, + {22, UPB_SIZE(52, 72), 0, 0, 9, 1}, + {23, UPB_SIZE(132, 232), 0, 8, 11, 3}, + {24, UPB_SIZE(96, 160), 0, 13, 11, 1}, + {25, UPB_SIZE(100, 168), 0, 5, 11, 1}, + {26, UPB_SIZE(104, 176), 0, 13, 11, 1}, + {28, UPB_SIZE(108, 184), 0, 13, 11, 1}, + {29, UPB_SIZE(112, 192), 0, 14, 11, 1}, + {30, UPB_SIZE(116, 200), 0, 12, 11, 1}, + {31, UPB_SIZE(136, 240), UPB_SIZE(-141, -249), 11, 11, 1}, + {32, UPB_SIZE(31, 31), 0, 0, 8, 1}, + {33, UPB_SIZE(32, 32), 0, 0, 8, 1}, + {34, UPB_SIZE(16, 16), 0, 0, 14, 1}, + {35, UPB_SIZE(120, 208), 0, 3, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_msginit = { + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_submsgs[0], + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager__fields[0], + UPB_SIZE(144, 256), 34, false, +}; + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_submsgs[4] = { + &envoy_type_Percent_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing__fields[7] = { + {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}, +}; + +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, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit = { + NULL, + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig__fields[0], + UPB_SIZE(1, 1), 1, false, +}; + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_submsgs[1] = { + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails__fields[5] = { + {1, UPB_SIZE(4, 8), 0, 0, 11, 1}, + {3, UPB_SIZE(0, 0), 0, 0, 8, 1}, + {4, UPB_SIZE(1, 1), 0, 0, 8, 1}, + {5, UPB_SIZE(2, 2), 0, 0, 8, 1}, + {6, UPB_SIZE(3, 3), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit = { + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_submsgs[0], + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails__fields[0], + UPB_SIZE(8, 16), 5, false, +}; + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_submsgs[2] = { + &envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(12, 24), 0, 0, 11, 3}, + {3, UPB_SIZE(8, 16), 0, 1, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit = { + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_submsgs[0], + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_Rds_submsgs[1] = { + &envoy_api_v2_core_ConfigSource_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_Rds__fields[2] = { + {1, UPB_SIZE(8, 16), 0, 0, 11, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_Rds_msginit = { + &envoy_config_filter_network_http_connection_manager_v2_Rds_submsgs[0], + &envoy_config_filter_network_http_connection_manager_v2_Rds__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_submsgs[1] = { + &envoy_api_v2_ScopedRouteConfiguration_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit = { + &envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_submsgs[0], + &envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_submsgs[4] = { + &envoy_api_v2_core_ConfigSource_msginit, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes__fields[5] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 3, 11, 1}, + {3, UPB_SIZE(12, 24), 0, 0, 11, 1}, + {4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1}, + {5, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit = { + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_submsgs[0], + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes__fields[0], + UPB_SIZE(24, 48), 5, false, +}; + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_submsgs[1] = { + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit = { + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_submsgs[0], + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_submsgs[1] = { + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder__fields[1] = { + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit = { + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_submsgs[0], + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_submsgs[1] = { + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor__fields[4] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, + {3, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 13, 1}, + {4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit = { + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_submsgs[0], + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor__fields[0], + UPB_SIZE(24, 48), 4, false, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit = { + NULL, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRds_submsgs[1] = { + &envoy_api_v2_core_ConfigSource_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRds__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit = { + &envoy_config_filter_network_http_connection_manager_v2_ScopedRds_submsgs[0], + &envoy_config_filter_network_http_connection_manager_v2_ScopedRds__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpFilter_submsgs[2] = { + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpFilter__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, +}; + +const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit = { + &envoy_config_filter_network_http_connection_manager_v2_HttpFilter_submsgs[0], + &envoy_config_filter_network_http_connection_manager_v2_HttpFilter__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..8430c461752 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h @@ -0,0 +1,1056 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_CONFIG_FILTER_NETWORK_HTTP_CONNECTION_MANAGER_V2_HTTP_CONNECTION_MANAGER_PROTO_UPB_H_ +#define ENVOY_CONFIG_FILTER_NETWORK_HTTP_CONNECTION_MANAGER_V2_HTTP_CONNECTION_MANAGER_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager; +struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing; +struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig; +struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails; +struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig; +struct envoy_config_filter_network_http_connection_manager_v2_Rds; +struct envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList; +struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes; +struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder; +struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder; +struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor; +struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement; +struct envoy_config_filter_network_http_connection_manager_v2_ScopedRds; +struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter; +typedef struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager; +typedef struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing; +typedef struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig; +typedef struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails; +typedef struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig; +typedef struct envoy_config_filter_network_http_connection_manager_v2_Rds envoy_config_filter_network_http_connection_manager_v2_Rds; +typedef struct envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList; +typedef struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes; +typedef struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder; +typedef struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder; +typedef struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor; +typedef struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement; +typedef struct envoy_config_filter_network_http_connection_manager_v2_ScopedRds envoy_config_filter_network_http_connection_manager_v2_ScopedRds; +typedef struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter envoy_config_filter_network_http_connection_manager_v2_HttpFilter; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_Rds_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit; +struct envoy_api_v2_RouteConfiguration; +struct envoy_api_v2_ScopedRouteConfiguration; +struct envoy_api_v2_core_ConfigSource; +struct envoy_api_v2_core_Http1ProtocolOptions; +struct envoy_api_v2_core_Http2ProtocolOptions; +struct envoy_api_v2_core_HttpProtocolOptions; +struct envoy_config_filter_accesslog_v2_AccessLog; +struct envoy_type_Percent; +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_RouteConfiguration_msginit; +extern const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_msginit; +extern const upb_msglayout envoy_api_v2_core_ConfigSource_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_config_filter_accesslog_v2_AccessLog_msginit; +extern const upb_msglayout envoy_type_Percent_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_config_filter_network_http_connection_manager_v2_HttpConnectionManager_AUTO = 0, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_HTTP1 = 1, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_HTTP2 = 2, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_HTTP3 = 3 +} envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_CodecType; + +typedef enum { + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SANITIZE = 0, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_FORWARD_ONLY = 1, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_APPEND_FORWARD = 2, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SANITIZE_SET = 3, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_ALWAYS_FORWARD_ONLY = 4 +} envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_ForwardClientCertDetails; + +typedef enum { + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_OVERWRITE = 0, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_APPEND_IF_ABSENT = 1, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_PASS_THROUGH = 2 +} envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_ServerHeaderTransformation; + +typedef enum { + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_INGRESS = 0, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_EGRESS = 1 +} envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_OperationName; + + +/* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *ret = envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_serialize(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_msginit, arena, len); +} + +typedef enum { + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_rds = 3, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_route_config = 4, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_scoped_routes = 31, + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_NOT_SET = 0 +} envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_oneofcases; +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_oneofcases envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_case(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager* msg) { return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(140, 248)); } + +UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_codec_type(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_stat_prefix(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 40)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_rds(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(140, 248), 3); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_Rds* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_rds(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_Rds*, UPB_SIZE(136, 240), UPB_SIZE(140, 248), 3, NULL); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_route_config(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(140, 248), 4); } +UPB_INLINE const struct envoy_api_v2_RouteConfiguration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_config(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_RouteConfiguration*, UPB_SIZE(136, 240), UPB_SIZE(140, 248), 4, NULL); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http_filters(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t *len) { return (const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* const*)_upb_array_accessor(msg, UPB_SIZE(124, 216), len); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_user_agent(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(60, 88)); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_tracing(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*, UPB_SIZE(64, 96)); } +UPB_INLINE const struct envoy_api_v2_core_Http1ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Http1ProtocolOptions*, UPB_SIZE(68, 104)); } +UPB_INLINE const struct envoy_api_v2_core_Http2ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http2_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Http2ProtocolOptions*, UPB_SIZE(72, 112)); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_server_name(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 56)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_idle_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(76, 120)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_drain_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(80, 128)); } +UPB_INLINE const struct envoy_config_filter_accesslog_v2_AccessLog* const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_access_log(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t *len) { return (const struct envoy_config_filter_accesslog_v2_AccessLog* const*)_upb_array_accessor(msg, UPB_SIZE(128, 224), len); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_use_remote_address(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(84, 136)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_generate_request_id(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(88, 144)); } +UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_forward_client_cert_details(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_current_client_cert_details(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*, UPB_SIZE(92, 152)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_proxy_100_continue(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(28, 28)); } +UPB_INLINE uint32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_xff_num_trusted_hops(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(24, 24)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_represent_ipv4_remote_address_as_ipv4_mapped_ipv6(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(29, 29)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_skip_xff_append(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(30, 30)); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_via(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 72)); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig* const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_upgrade_configs(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t *len) { return (const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig* const*)_upb_array_accessor(msg, UPB_SIZE(132, 232), len); } +UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_stream_idle_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(96, 160)); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_internal_address_config(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*, UPB_SIZE(100, 168)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_delayed_close_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(104, 176)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_request_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(108, 184)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_max_request_headers_kb(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(112, 192)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_normalize_path(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(116, 200)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_scoped_routes(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(140, 248), 31); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_scoped_routes(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes*, UPB_SIZE(136, 240), UPB_SIZE(140, 248), 31, NULL); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_preserve_external_request_id(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(31, 31)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_merge_slashes(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(32, 32)); } +UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_server_header_transformation(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } +UPB_INLINE const struct envoy_api_v2_core_HttpProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_common_http_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_HttpProtocolOptions*, UPB_SIZE(120, 208)); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_codec_type(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, int32_t value) { + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_stat_prefix(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 40)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_rds(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, envoy_config_filter_network_http_connection_manager_v2_Rds* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_network_http_connection_manager_v2_Rds*, UPB_SIZE(136, 240), value, UPB_SIZE(140, 248), 3); +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_Rds* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_rds(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_Rds* sub = (struct envoy_config_filter_network_http_connection_manager_v2_Rds*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_rds(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_network_http_connection_manager_v2_Rds*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_Rds_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_rds(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_route_config(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct envoy_api_v2_RouteConfiguration* value) { + UPB_WRITE_ONEOF(msg, struct envoy_api_v2_RouteConfiguration*, UPB_SIZE(136, 240), value, UPB_SIZE(140, 248), 4); +} +UPB_INLINE struct envoy_api_v2_RouteConfiguration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_route_config(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_api_v2_RouteConfiguration* sub = (struct envoy_api_v2_RouteConfiguration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_config(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_RouteConfiguration*)upb_msg_new(&envoy_api_v2_RouteConfiguration_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_route_config(msg, sub); + } + return sub; +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_http_filters(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t *len) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(124, 216), len); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_resize_http_filters(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t len, upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(124, 216), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_http_filters(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(124, 216), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_add_user_agent(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) { + UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(60, 88)) = value; +} +UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_add_user_agent(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_user_agent(msg); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_add_user_agent(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_tracing(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing* value) { + UPB_FIELD_AT(msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*, UPB_SIZE(64, 96)) = value; +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_tracing(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_tracing(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_tracing(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_http_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct envoy_api_v2_core_Http1ProtocolOptions* value) { + UPB_FIELD_AT(msg, struct envoy_api_v2_core_Http1ProtocolOptions*, UPB_SIZE(68, 104)) = value; +} +UPB_INLINE struct envoy_api_v2_core_Http1ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_http_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_api_v2_core_Http1ProtocolOptions* sub = (struct envoy_api_v2_core_Http1ProtocolOptions*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http_protocol_options(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_Http1ProtocolOptions*)upb_msg_new(&envoy_api_v2_core_Http1ProtocolOptions_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_http_protocol_options(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_http2_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct envoy_api_v2_core_Http2ProtocolOptions* value) { + UPB_FIELD_AT(msg, struct envoy_api_v2_core_Http2ProtocolOptions*, UPB_SIZE(72, 112)) = value; +} +UPB_INLINE struct envoy_api_v2_core_Http2ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_http2_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_api_v2_core_Http2ProtocolOptions* sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http2_protocol_options(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)upb_msg_new(&envoy_api_v2_core_Http2ProtocolOptions_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_http2_protocol_options(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_server_name(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 56)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_idle_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(76, 120)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_idle_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_idle_timeout(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_idle_timeout(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_drain_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(80, 128)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_drain_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_drain_timeout(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_drain_timeout(msg, sub); + } + return sub; +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLog** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_access_log(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t *len) { + return (struct envoy_config_filter_accesslog_v2_AccessLog**)_upb_array_mutable_accessor(msg, UPB_SIZE(128, 224), len); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLog** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_resize_access_log(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t len, upb_arena *arena) { + return (struct envoy_config_filter_accesslog_v2_AccessLog**)_upb_array_resize_accessor(msg, UPB_SIZE(128, 224), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLog* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_access_log(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_config_filter_accesslog_v2_AccessLog* sub = (struct envoy_config_filter_accesslog_v2_AccessLog*)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLog_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(128, 224), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_use_remote_address(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) { + UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(84, 136)) = value; +} +UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_use_remote_address(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_use_remote_address(msg); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_use_remote_address(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_generate_request_id(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) { + UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(88, 144)) = value; +} +UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_generate_request_id(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_generate_request_id(msg); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_generate_request_id(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_forward_client_cert_details(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, int32_t value) { + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_set_current_client_cert_details(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails* value) { + UPB_FIELD_AT(msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*, UPB_SIZE(92, 152)) = value; +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_set_current_client_cert_details(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_current_client_cert_details(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_set_current_client_cert_details(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_proxy_100_continue(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(28, 28)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_xff_num_trusted_hops(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, uint32_t value) { + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(24, 24)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_represent_ipv4_remote_address_as_ipv4_mapped_ipv6(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(29, 29)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_skip_xff_append(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(30, 30)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_via(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 72)) = value; +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_upgrade_configs(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t *len) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(132, 232), len); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_resize_upgrade_configs(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t len, upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig**)_upb_array_resize_accessor(msg, UPB_SIZE(132, 232), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_upgrade_configs(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(132, 232), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_stream_idle_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(96, 160)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_stream_idle_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_stream_idle_timeout(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_stream_idle_timeout(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_internal_address_config(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig* value) { + UPB_FIELD_AT(msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*, UPB_SIZE(100, 168)) = value; +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_internal_address_config(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_internal_address_config(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_internal_address_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_delayed_close_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(104, 176)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_delayed_close_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_delayed_close_timeout(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_delayed_close_timeout(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_request_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(108, 184)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_request_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_request_timeout(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_request_timeout(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_max_request_headers_kb(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(112, 192)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_max_request_headers_kb(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_max_request_headers_kb(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_max_request_headers_kb(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_normalize_path(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) { + UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(116, 200)) = value; +} +UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_normalize_path(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_normalize_path(msg); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_normalize_path(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_scoped_routes(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes*, UPB_SIZE(136, 240), value, UPB_SIZE(140, 248), 31); +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_scoped_routes(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_scoped_routes(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_scoped_routes(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_preserve_external_request_id(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(31, 31)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_merge_slashes(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(32, 32)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_server_header_transformation(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, int32_t value) { + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_common_http_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct envoy_api_v2_core_HttpProtocolOptions* value) { + UPB_FIELD_AT(msg, struct envoy_api_v2_core_HttpProtocolOptions*, UPB_SIZE(120, 208)) = value; +} +UPB_INLINE struct envoy_api_v2_core_HttpProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_common_http_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { + struct envoy_api_v2_core_HttpProtocolOptions* sub = (struct envoy_api_v2_core_HttpProtocolOptions*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_common_http_protocol_options(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_HttpProtocolOptions*)upb_msg_new(&envoy_api_v2_core_HttpProtocolOptions_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_common_http_protocol_options(msg, sub); + } + return sub; +} + +/* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *ret = envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_serialize(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit, arena, len); +} + +UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_operation_name(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_request_headers_for_tags(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); } +UPB_INLINE const struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_client_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_Percent*, UPB_SIZE(12, 16)); } +UPB_INLINE const struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_random_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_Percent*, UPB_SIZE(16, 24)); } +UPB_INLINE const struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_overall_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_Percent*, UPB_SIZE(20, 32)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_verbose(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_max_path_tag_length(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 40)); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_operation_name(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, int32_t value) { + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE upb_strview* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_request_headers_for_tags(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len); +} +UPB_INLINE upb_strview* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_resize_request_headers_for_tags(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_add_request_headers_for_tags(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(28, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_client_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, struct envoy_type_Percent* value) { + UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(12, 16)) = value; +} +UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_client_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { + struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_client_sampling(msg); + if (sub == NULL) { + sub = (struct envoy_type_Percent*)upb_msg_new(&envoy_type_Percent_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_client_sampling(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_random_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, struct envoy_type_Percent* value) { + UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(16, 24)) = value; +} +UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_random_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { + struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_random_sampling(msg); + if (sub == NULL) { + sub = (struct envoy_type_Percent*)upb_msg_new(&envoy_type_Percent_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_random_sampling(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_overall_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, struct envoy_type_Percent* value) { + UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(20, 32)) = value; +} +UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_overall_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { + struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_overall_sampling(msg); + if (sub == NULL) { + sub = (struct envoy_type_Percent*)upb_msg_new(&envoy_type_Percent_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_overall_sampling(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_verbose(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_max_path_tag_length(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 40)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_max_path_tag_length(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_max_path_tag_length(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_max_path_tag_length(msg, sub); + } + return sub; +} + +/* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.InternalAddressConfig */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *ret = envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_serialize(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit, arena, len); +} + +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_unix_sockets(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_set_unix_sockets(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; +} + +/* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.SetCurrentClientCertDetails */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *ret = envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_serialize(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena, len); +} + +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_subject(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_cert(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_dns(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_uri(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_chain(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_subject(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, struct google_protobuf_BoolValue* value) { + UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)) = value; +} +UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_mutable_subject(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, upb_arena *arena) { + struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_subject(msg); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_subject(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_cert(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_dns(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_uri(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_chain(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)) = value; +} + +/* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *ret = envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_serialize(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_upgrade_type(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_filters(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, size_t *len) { return (const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_enabled(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_set_upgrade_type(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_mutable_filters(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, size_t *len) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_resize_filters(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, size_t len, upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_add_filters(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, arena); + 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_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_set_enabled(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, struct google_protobuf_BoolValue* value) { + UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_mutable_enabled(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, upb_arena *arena) { + struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_enabled(msg); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_set_enabled(msg, sub); + } + return sub; +} + +/* envoy.config.filter.network.http_connection_manager.v2.Rds */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_Rds *envoy_config_filter_network_http_connection_manager_v2_Rds_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_Rds *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_Rds_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_Rds *envoy_config_filter_network_http_connection_manager_v2_Rds_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_Rds *ret = envoy_config_filter_network_http_connection_manager_v2_Rds_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_Rds_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_Rds_serialize(const envoy_config_filter_network_http_connection_manager_v2_Rds *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_Rds_msginit, arena, len); +} + +UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_Rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_Rds *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_Rds_route_config_name(const envoy_config_filter_network_http_connection_manager_v2_Rds *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_Rds_set_config_source(envoy_config_filter_network_http_connection_manager_v2_Rds *msg, struct envoy_api_v2_core_ConfigSource* value) { + UPB_FIELD_AT(msg, struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_Rds_mutable_config_source(envoy_config_filter_network_http_connection_manager_v2_Rds *msg, upb_arena *arena) { + struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_config_filter_network_http_connection_manager_v2_Rds_config_source(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_ConfigSource*)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_Rds_set_config_source(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_Rds_set_route_config_name(envoy_config_filter_network_http_connection_manager_v2_Rds *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} + +/* envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *ret = envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_serialize(const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit, arena, len); +} + +UPB_INLINE const struct envoy_api_v2_ScopedRouteConfiguration* const* envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_scoped_route_configurations(const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *msg, size_t *len) { return (const struct envoy_api_v2_ScopedRouteConfiguration* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } + +UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration** envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_mutable_scoped_route_configurations(envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *msg, size_t *len) { + return (struct envoy_api_v2_ScopedRouteConfiguration**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); +} +UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration** envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_resize_scoped_route_configurations(envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *msg, size_t len, upb_arena *arena) { + return (struct envoy_api_v2_ScopedRouteConfiguration**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration* envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_add_scoped_route_configurations(envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *msg, upb_arena *arena) { + struct envoy_api_v2_ScopedRouteConfiguration* sub = (struct envoy_api_v2_ScopedRouteConfiguration*)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_msginit, arena); + 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.config.filter.network.http_connection_manager.v2.ScopedRoutes */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *ret = envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_serialize(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit, arena, len); +} + +typedef enum { + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_scoped_route_configurations_list = 4, + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_scoped_rds = 5, + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_NOT_SET = 0 +} envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_oneofcases; +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_oneofcases envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_case(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes* msg) { return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); } + +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_name(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scope_key_builder(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(12, 24)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_has_scoped_route_configurations_list(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 4); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scoped_route_configurations_list(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 4, NULL); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_has_scoped_rds(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 5); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRds* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scoped_rds(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRds*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 5, NULL); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_name(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_scope_key_builder(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* value) { + UPB_FIELD_AT(msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_mutable_scope_key_builder(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scope_key_builder(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_scope_key_builder(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_rds_config_source(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, struct envoy_api_v2_core_ConfigSource* value) { + UPB_FIELD_AT(msg, struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(12, 24)) = value; +} +UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_mutable_rds_config_source(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_arena *arena) { + struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_rds_config_source(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_ConfigSource*)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_rds_config_source(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_scoped_route_configurations_list(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList*, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 4); +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_mutable_scoped_route_configurations_list(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scoped_route_configurations_list(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_scoped_route_configurations_list(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_scoped_rds(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRds* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRds*, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 5); +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRds* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_mutable_scoped_rds(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_ScopedRds* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRds*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scoped_rds(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRds*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_scoped_rds(msg, sub); + } + return sub; +} + +/* envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *ret = envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_serialize(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit, arena, len); +} + +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* const* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_fragments(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *msg, size_t *len) { return (const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder** envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_mutable_fragments(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *msg, size_t *len) { + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder** envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_resize_fragments(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *msg, size_t len, upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_add_fragments(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena); + 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.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *ret = envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_serialize(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena, len); +} + +typedef enum { + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_header_value_extractor = 1, + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_NOT_SET = 0 +} envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_oneofcases; +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_oneofcases envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_case(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* msg) { return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } + +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_has_header_value_extractor(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_header_value_extractor(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_set_header_value_extractor(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_mutable_header_value_extractor(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_header_value_extractor(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_set_header_value_extractor(msg, sub); + } + return sub; +} + +/* envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *ret = envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_serialize(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, arena, len); +} + +typedef enum { + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_index = 3, + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_element = 4, + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_NOT_SET = 0 +} envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_oneofcases; +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_oneofcases envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_case(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* msg) { return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); } + +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_name(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_element_separator(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_has_index(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 3); } +UPB_INLINE uint32_t envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_index(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 3, 0); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_has_element(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 4); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_element(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 4, NULL); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_set_name(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_set_element_separator(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_set_index(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, uint32_t value) { + UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 3); +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_set_element(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement* value) { + UPB_WRITE_ONEOF(msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement*, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 4); +} +UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_mutable_element(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, upb_arena *arena) { + struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_element(msg); + if (sub == NULL) { + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_set_element(msg, sub); + } + return sub; +} + +/* envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *ret = envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_serialize(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_separator(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_key(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_set_separator(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_set_key(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; +} + +/* envoy.config.filter.network.http_connection_manager.v2.ScopedRds */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRds *envoy_config_filter_network_http_connection_manager_v2_ScopedRds_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRds *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRds *envoy_config_filter_network_http_connection_manager_v2_ScopedRds_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_ScopedRds *ret = envoy_config_filter_network_http_connection_manager_v2_ScopedRds_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_ScopedRds_serialize(const envoy_config_filter_network_http_connection_manager_v2_ScopedRds *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit, arena, len); +} + +UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRds_scoped_rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_ScopedRds *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRds_set_scoped_rds_config_source(envoy_config_filter_network_http_connection_manager_v2_ScopedRds *msg, struct envoy_api_v2_core_ConfigSource* value) { + UPB_FIELD_AT(msg, struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRds_mutable_scoped_rds_config_source(envoy_config_filter_network_http_connection_manager_v2_ScopedRds *msg, upb_arena *arena) { + struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_config_filter_network_http_connection_manager_v2_ScopedRds_scoped_rds_config_source(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_ConfigSource*)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_ScopedRds_set_scoped_rds_config_source(msg, sub); + } + return sub; +} + +/* envoy.config.filter.network.http_connection_manager.v2.HttpFilter */ + +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter *envoy_config_filter_network_http_connection_manager_v2_HttpFilter_new(upb_arena *arena) { + return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, arena); +} +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter *envoy_config_filter_network_http_connection_manager_v2_HttpFilter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_filter_network_http_connection_manager_v2_HttpFilter *ret = envoy_config_filter_network_http_connection_manager_v2_HttpFilter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_HttpFilter_serialize(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, arena, len); +} + +typedef enum { + envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_config = 2, + envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_typed_config = 4, + envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_NOT_SET = 0 +} envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_oneofcases; +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_oneofcases envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_case(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* msg) { return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } + +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpFilter_name(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpFilter_has_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE const struct google_protobuf_Struct* envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpFilter_has_typed_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 4); } +UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_network_http_connection_manager_v2_HttpFilter_typed_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); } + +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpFilter_set_name(envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpFilter_set_config(envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg, struct google_protobuf_Struct* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); +} +UPB_INLINE struct google_protobuf_Struct* envoy_config_filter_network_http_connection_manager_v2_HttpFilter_mutable_config(envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg, upb_arena *arena) { + struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpFilter_set_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpFilter_set_typed_config(envoy_config_filter_network_http_connection_manager_v2_HttpFilter *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_config_filter_network_http_connection_manager_v2_HttpFilter_mutable_typed_config(envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_filter_network_http_connection_manager_v2_HttpFilter_typed_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + if (!sub) return NULL; + envoy_config_filter_network_http_connection_manager_v2_HttpFilter_set_typed_config(msg, sub); + } + return sub; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_CONFIG_FILTER_NETWORK_HTTP_CONNECTION_MANAGER_V2_HTTP_CONNECTION_MANAGER_PROTO_UPB_H_ */ 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 new file mode 100644 index 00000000000..c5153b51078 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c @@ -0,0 +1,31 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/listener/v2/api_listener.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/config/listener/v2/api_listener.upb.h" +#include "google/protobuf/any.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_config_listener_v2_ApiListener_submsgs[1] = { + &google_protobuf_Any_msginit, +}; + +static const upb_msglayout_field envoy_config_listener_v2_ApiListener__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_config_listener_v2_ApiListener_msginit = { + &envoy_config_listener_v2_ApiListener_submsgs[0], + &envoy_config_listener_v2_ApiListener__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h new file mode 100644 index 00000000000..bda29669d5a --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h @@ -0,0 +1,65 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/listener/v2/api_listener.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_CONFIG_LISTENER_V2_API_LISTENER_PROTO_UPB_H_ +#define ENVOY_CONFIG_LISTENER_V2_API_LISTENER_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_config_listener_v2_ApiListener; +typedef struct envoy_config_listener_v2_ApiListener envoy_config_listener_v2_ApiListener; +extern const upb_msglayout envoy_config_listener_v2_ApiListener_msginit; +struct google_protobuf_Any; +extern const upb_msglayout google_protobuf_Any_msginit; + + +/* envoy.config.listener.v2.ApiListener */ + +UPB_INLINE envoy_config_listener_v2_ApiListener *envoy_config_listener_v2_ApiListener_new(upb_arena *arena) { + return (envoy_config_listener_v2_ApiListener *)upb_msg_new(&envoy_config_listener_v2_ApiListener_msginit, arena); +} +UPB_INLINE envoy_config_listener_v2_ApiListener *envoy_config_listener_v2_ApiListener_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_config_listener_v2_ApiListener *ret = envoy_config_listener_v2_ApiListener_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v2_ApiListener_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_config_listener_v2_ApiListener_serialize(const envoy_config_listener_v2_ApiListener *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_config_listener_v2_ApiListener_msginit, arena, len); +} + +UPB_INLINE const struct google_protobuf_Any* envoy_config_listener_v2_ApiListener_api_listener(const envoy_config_listener_v2_ApiListener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_config_listener_v2_ApiListener_set_api_listener(envoy_config_listener_v2_ApiListener *msg, struct google_protobuf_Any* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE struct google_protobuf_Any* envoy_config_listener_v2_ApiListener_mutable_api_listener(envoy_config_listener_v2_ApiListener *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_listener_v2_ApiListener_api_listener(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + if (!sub) return NULL; + envoy_config_listener_v2_ApiListener_set_api_listener(msg, sub); + } + return sub; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_CONFIG_LISTENER_V2_API_LISTENER_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c new file mode 100644 index 00000000000..679e9bef33c --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c @@ -0,0 +1,47 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/matcher/regex.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/type/matcher/regex.upb.h" +#include "google/protobuf/wrappers.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_type_matcher_RegexMatcher_submsgs[1] = { + &envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, +}; + +static const upb_msglayout_field envoy_type_matcher_RegexMatcher__fields[2] = { + {1, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_type_matcher_RegexMatcher_msginit = { + &envoy_type_matcher_RegexMatcher_submsgs[0], + &envoy_type_matcher_RegexMatcher__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_type_matcher_RegexMatcher_GoogleRE2_submsgs[1] = { + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_type_matcher_RegexMatcher_GoogleRE2__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_type_matcher_RegexMatcher_GoogleRE2_msginit = { + &envoy_type_matcher_RegexMatcher_GoogleRE2_submsgs[0], + &envoy_type_matcher_RegexMatcher_GoogleRE2__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h new file mode 100644 index 00000000000..1a396732e10 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h @@ -0,0 +1,108 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/matcher/regex.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_MATCHER_REGEX_PROTO_UPB_H_ +#define ENVOY_TYPE_MATCHER_REGEX_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_type_matcher_RegexMatcher; +struct envoy_type_matcher_RegexMatcher_GoogleRE2; +typedef struct envoy_type_matcher_RegexMatcher envoy_type_matcher_RegexMatcher; +typedef struct envoy_type_matcher_RegexMatcher_GoogleRE2 envoy_type_matcher_RegexMatcher_GoogleRE2; +extern const upb_msglayout envoy_type_matcher_RegexMatcher_msginit; +extern const upb_msglayout envoy_type_matcher_RegexMatcher_GoogleRE2_msginit; +struct google_protobuf_UInt32Value; +extern const upb_msglayout google_protobuf_UInt32Value_msginit; + + +/* envoy.type.matcher.RegexMatcher */ + +UPB_INLINE envoy_type_matcher_RegexMatcher *envoy_type_matcher_RegexMatcher_new(upb_arena *arena) { + return (envoy_type_matcher_RegexMatcher *)upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena); +} +UPB_INLINE envoy_type_matcher_RegexMatcher *envoy_type_matcher_RegexMatcher_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_matcher_RegexMatcher *ret = envoy_type_matcher_RegexMatcher_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_RegexMatcher_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_matcher_RegexMatcher_serialize(const envoy_type_matcher_RegexMatcher *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_matcher_RegexMatcher_msginit, arena, len); +} + +typedef enum { + envoy_type_matcher_RegexMatcher_engine_type_google_re2 = 1, + envoy_type_matcher_RegexMatcher_engine_type_NOT_SET = 0 +} envoy_type_matcher_RegexMatcher_engine_type_oneofcases; +UPB_INLINE envoy_type_matcher_RegexMatcher_engine_type_oneofcases envoy_type_matcher_RegexMatcher_engine_type_case(const envoy_type_matcher_RegexMatcher* msg) { return (envoy_type_matcher_RegexMatcher_engine_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } + +UPB_INLINE bool envoy_type_matcher_RegexMatcher_has_google_re2(const envoy_type_matcher_RegexMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); } +UPB_INLINE const envoy_type_matcher_RegexMatcher_GoogleRE2* envoy_type_matcher_RegexMatcher_google_re2(const envoy_type_matcher_RegexMatcher *msg) { return UPB_READ_ONEOF(msg, const envoy_type_matcher_RegexMatcher_GoogleRE2*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); } +UPB_INLINE upb_strview envoy_type_matcher_RegexMatcher_regex(const envoy_type_matcher_RegexMatcher *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_type_matcher_RegexMatcher_set_google_re2(envoy_type_matcher_RegexMatcher *msg, envoy_type_matcher_RegexMatcher_GoogleRE2* value) { + UPB_WRITE_ONEOF(msg, envoy_type_matcher_RegexMatcher_GoogleRE2*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 1); +} +UPB_INLINE struct envoy_type_matcher_RegexMatcher_GoogleRE2* envoy_type_matcher_RegexMatcher_mutable_google_re2(envoy_type_matcher_RegexMatcher *msg, upb_arena *arena) { + struct envoy_type_matcher_RegexMatcher_GoogleRE2* sub = (struct envoy_type_matcher_RegexMatcher_GoogleRE2*)envoy_type_matcher_RegexMatcher_google_re2(msg); + if (sub == NULL) { + sub = (struct envoy_type_matcher_RegexMatcher_GoogleRE2*)upb_msg_new(&envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena); + if (!sub) return NULL; + envoy_type_matcher_RegexMatcher_set_google_re2(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_type_matcher_RegexMatcher_set_regex(envoy_type_matcher_RegexMatcher *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} + +/* envoy.type.matcher.RegexMatcher.GoogleRE2 */ + +UPB_INLINE envoy_type_matcher_RegexMatcher_GoogleRE2 *envoy_type_matcher_RegexMatcher_GoogleRE2_new(upb_arena *arena) { + return (envoy_type_matcher_RegexMatcher_GoogleRE2 *)upb_msg_new(&envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena); +} +UPB_INLINE envoy_type_matcher_RegexMatcher_GoogleRE2 *envoy_type_matcher_RegexMatcher_GoogleRE2_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_matcher_RegexMatcher_GoogleRE2 *ret = envoy_type_matcher_RegexMatcher_GoogleRE2_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_matcher_RegexMatcher_GoogleRE2_serialize(const envoy_type_matcher_RegexMatcher_GoogleRE2 *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena, len); +} + +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_type_matcher_RegexMatcher_GoogleRE2_max_program_size(const envoy_type_matcher_RegexMatcher_GoogleRE2 *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_type_matcher_RegexMatcher_GoogleRE2_set_max_program_size(envoy_type_matcher_RegexMatcher_GoogleRE2 *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_type_matcher_RegexMatcher_GoogleRE2_mutable_max_program_size(envoy_type_matcher_RegexMatcher_GoogleRE2 *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_type_matcher_RegexMatcher_GoogleRE2_max_program_size(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_type_matcher_RegexMatcher_GoogleRE2_set_max_program_size(msg, sub); + } + return sub; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_MATCHER_REGEX_PROTO_UPB_H_ */ 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 new file mode 100644 index 00000000000..426b46e14fa --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c @@ -0,0 +1,50 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/matcher/string.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/type/matcher/string.upb.h" +#include "envoy/type/matcher/regex.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +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}, +}; + +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, +}; + +static const upb_msglayout *const envoy_type_matcher_ListStringMatcher_submsgs[1] = { + &envoy_type_matcher_StringMatcher_msginit, +}; + +static const upb_msglayout_field envoy_type_matcher_ListStringMatcher__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_type_matcher_ListStringMatcher_msginit = { + &envoy_type_matcher_ListStringMatcher_submsgs[0], + &envoy_type_matcher_ListStringMatcher__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +#include "upb/port_undef.inc" + 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 new file mode 100644 index 00000000000..d5b4850992f --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h @@ -0,0 +1,129 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/matcher/string.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_MATCHER_STRING_PROTO_UPB_H_ +#define ENVOY_TYPE_MATCHER_STRING_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_type_matcher_StringMatcher; +struct envoy_type_matcher_ListStringMatcher; +typedef struct envoy_type_matcher_StringMatcher envoy_type_matcher_StringMatcher; +typedef struct envoy_type_matcher_ListStringMatcher envoy_type_matcher_ListStringMatcher; +extern const upb_msglayout envoy_type_matcher_StringMatcher_msginit; +extern const upb_msglayout envoy_type_matcher_ListStringMatcher_msginit; +struct envoy_type_matcher_RegexMatcher; +extern const upb_msglayout envoy_type_matcher_RegexMatcher_msginit; + + +/* envoy.type.matcher.StringMatcher */ + +UPB_INLINE envoy_type_matcher_StringMatcher *envoy_type_matcher_StringMatcher_new(upb_arena *arena) { + return (envoy_type_matcher_StringMatcher *)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); +} +UPB_INLINE envoy_type_matcher_StringMatcher *envoy_type_matcher_StringMatcher_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_matcher_StringMatcher *ret = envoy_type_matcher_StringMatcher_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_StringMatcher_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_matcher_StringMatcher_serialize(const envoy_type_matcher_StringMatcher *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_matcher_StringMatcher_msginit, arena, len); +} + +typedef enum { + envoy_type_matcher_StringMatcher_match_pattern_exact = 1, + envoy_type_matcher_StringMatcher_match_pattern_prefix = 2, + envoy_type_matcher_StringMatcher_match_pattern_suffix = 3, + envoy_type_matcher_StringMatcher_match_pattern_regex = 4, + 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 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_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_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_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_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_INLINE struct envoy_type_matcher_RegexMatcher* envoy_type_matcher_StringMatcher_mutable_safe_regex(envoy_type_matcher_StringMatcher *msg, upb_arena *arena) { + struct envoy_type_matcher_RegexMatcher* sub = (struct envoy_type_matcher_RegexMatcher*)envoy_type_matcher_StringMatcher_safe_regex(msg); + if (sub == NULL) { + sub = (struct envoy_type_matcher_RegexMatcher*)upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena); + if (!sub) return NULL; + envoy_type_matcher_StringMatcher_set_safe_regex(msg, sub); + } + return sub; +} + +/* envoy.type.matcher.ListStringMatcher */ + +UPB_INLINE envoy_type_matcher_ListStringMatcher *envoy_type_matcher_ListStringMatcher_new(upb_arena *arena) { + return (envoy_type_matcher_ListStringMatcher *)upb_msg_new(&envoy_type_matcher_ListStringMatcher_msginit, arena); +} +UPB_INLINE envoy_type_matcher_ListStringMatcher *envoy_type_matcher_ListStringMatcher_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_type_matcher_ListStringMatcher *ret = envoy_type_matcher_ListStringMatcher_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_ListStringMatcher_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_matcher_ListStringMatcher_serialize(const envoy_type_matcher_ListStringMatcher *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_matcher_ListStringMatcher_msginit, arena, len); +} + +UPB_INLINE const envoy_type_matcher_StringMatcher* const* envoy_type_matcher_ListStringMatcher_patterns(const envoy_type_matcher_ListStringMatcher *msg, size_t *len) { return (const envoy_type_matcher_StringMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } + +UPB_INLINE envoy_type_matcher_StringMatcher** envoy_type_matcher_ListStringMatcher_mutable_patterns(envoy_type_matcher_ListStringMatcher *msg, size_t *len) { + return (envoy_type_matcher_StringMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); +} +UPB_INLINE envoy_type_matcher_StringMatcher** envoy_type_matcher_ListStringMatcher_resize_patterns(envoy_type_matcher_ListStringMatcher *msg, size_t len, upb_arena *arena) { + return (envoy_type_matcher_StringMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_type_matcher_ListStringMatcher_add_patterns(envoy_type_matcher_ListStringMatcher *msg, upb_arena *arena) { + struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); + 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; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_MATCHER_STRING_PROTO_UPB_H_ */ diff --git a/src/proto/grpc/testing/xds/BUILD b/src/proto/grpc/testing/xds/BUILD index 0bd14afd072..b0d69f8eb74 100644 --- a/src/proto/grpc/testing/xds/BUILD +++ b/src/proto/grpc/testing/xds/BUILD @@ -46,6 +46,16 @@ grpc_proto_library( well_known_protos = True, ) +grpc_proto_library( + name = "lds_rds_for_test_proto", + srcs = [ + "lds_rds_for_test.proto", + ], + has_services = True, + well_known_protos = True, + deps = ["cds_for_test_proto"], +) + grpc_proto_library( name = "lrs_for_test_proto", srcs = [ diff --git a/src/proto/grpc/testing/xds/lds_rds_for_test.proto b/src/proto/grpc/testing/xds/lds_rds_for_test.proto new file mode 100644 index 00000000000..03d700c9017 --- /dev/null +++ b/src/proto/grpc/testing/xds/lds_rds_for_test.proto @@ -0,0 +1,149 @@ +// Copyright 2019 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file contains the eds protocol and its dependency. +// +// TODO(juanlishen): This file is a hack to avoid a problem we're +// currently having where we can't depend on a proto file in an external +// repo due to bazel limitations. Once that's fixed, this should be +// removed. Until this, it should be used in the gRPC tests only, or else it +// will cause a conflict due to the same proto messages being defined in +// multiple files in the same binary. + +syntax = "proto3"; + +package envoy.api.v2; + +import "google/protobuf/any.proto"; +import "src/proto/grpc/testing/xds/cds_for_test.proto"; + + +message RouteMatch { + oneof path_specifier { + // If specified, the route is a prefix rule meaning that the prefix must + // match the beginning of the *:path* header. + string prefix = 1; + } +} + +message RouteAction { + oneof cluster_specifier { + // Indicates the upstream cluster to which the request should be routed + // to. + string cluster = 1; + + // Envoy will determine the cluster to route to by reading the value of the + // HTTP header named by cluster_header from the request headers. If the + // header is not found or the referenced cluster does not exist, Envoy will + // return a 404 response. + // + // .. attention:: + // + // Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 + // *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. + string cluster_header = 2; + } +} + +message RedirectAction {} + +message Route { + RouteMatch match = 1; + + oneof action { + // Route request to some upstream cluster. + RouteAction route = 2; + + // Return a redirect. + RedirectAction redirect = 3; + } +} + +message VirtualHost { + repeated string domains = 2; + repeated Route routes = 3; +} + +message Rds { + // Configuration source specifier for RDS. + ConfigSource config_source = 1; + + // The name of the route configuration. This name will be passed to the RDS + // API. This allows an Envoy configuration with multiple HTTP listeners (and + // associated HTTP connection manager filters) to use different route + // configurations. + string route_config_name = 2; +} + +message RouteConfiguration { + // The name of the route configuration. For example, it might match + // :ref:`route_config_name + // ` in + // :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.Rds`. + string name = 1; + + // An array of virtual hosts that make up the route table. + repeated VirtualHost virtual_hosts = 2; +} + +message ScopedRoutes {} + +message HttpConnectionManager { + oneof route_specifier { + // The connection manager’s route table will be dynamically loaded via the RDS API. + Rds rds = 3; + + // The route table for the connection manager is static and is specified in this property. + RouteConfiguration route_config = 4; + + // A route table will be dynamically assigned to each request based on request attributes + // (e.g., the value of a header). The "routing scopes" (i.e., route tables) and "scope keys" are + // specified in this message. + ScopedRoutes scoped_routes = 31; + } +} + +message ApiListener { + // The type in this field determines the type of API listener. At present, the following + // types are supported: + // envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager (HTTP) + // [#next-major-version: In the v3 API, replace this Any field with a oneof containing the + // specific config message for each type of API listener. We could not do this in v2 because + // it would have caused circular dependencies for go protos: lds.proto depends on this file, + // and http_connection_manager.proto depends on rds.proto, which is in the same directory as + // lds.proto, so lds.proto cannot depend on this file.] + google.protobuf.Any api_listener = 1; +} + +message Listener { + string name = 1; + + // Used to represent an API listener, which is used in non-proxy clients. The type of API + // exposed to the non-proxy application depends on the type of API listener. + // When this field is set, no other field except for :ref:`name` + // should be set. + // + // .. note:: + // + // Currently only one ApiListener can be installed; and it can only be done via bootstrap config, + // not LDS. + // + // [#next-major-version: In the v3 API, instead of this messy approach where the socket + // listener fields are directly in the top-level Listener message and the API listener types + // are in the ApiListener message, the socket listener messages should be in their own message, + // and the top-level Listener should essentially be a oneof that selects between the + // socket listener and the various types of API listener. That way, a given Listener message + // can structurally only contain the fields of the relevant type.] + ApiListener api_listener = 19; +} diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index ecae1ca9b13..65877087fe8 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -133,9 +133,20 @@ CORE_SOURCE_FILES = [ 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.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/listener.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/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', '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/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/percent.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.c', 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD index 3b490e08848..5288c5622be 100644 --- a/test/cpp/end2end/BUILD +++ b/test/cpp/end2end/BUILD @@ -518,6 +518,7 @@ grpc_cc_test( "//src/proto/grpc/testing/xds:ads_for_test_proto", "//src/proto/grpc/testing/xds:cds_for_test_proto", "//src/proto/grpc/testing/xds:eds_for_test_proto", + "//src/proto/grpc/testing/xds:lds_rds_for_test_proto", "//src/proto/grpc/testing/xds:lrs_for_test_proto", "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc index 79e858d4cba..58fd8fcd78f 100644 --- a/test/cpp/end2end/xds_end2end_test.cc +++ b/test/cpp/end2end/xds_end2end_test.cc @@ -38,6 +38,7 @@ #include "src/core/ext/filters/client_channel/parse_address.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/ext/filters/client_channel/server_address.h" +#include "src/core/ext/filters/client_channel/xds/xds_api.h" #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/tmpfile.h" #include "src/core/lib/gprpp/map.h" @@ -56,6 +57,7 @@ #include "src/proto/grpc/testing/xds/ads_for_test.grpc.pb.h" #include "src/proto/grpc/testing/xds/cds_for_test.grpc.pb.h" #include "src/proto/grpc/testing/xds/eds_for_test.grpc.pb.h" +#include "src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.h" #include "src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.h" #include @@ -89,6 +91,10 @@ using ::envoy::api::v2::ClusterLoadAssignment; using ::envoy::api::v2::DiscoveryRequest; using ::envoy::api::v2::DiscoveryResponse; using ::envoy::api::v2::FractionalPercent; +using ::envoy::api::v2::HttpConnectionManager; +using ::envoy::api::v2::Listener; +using ::envoy::api::v2::RouteConfiguration; +using ::envoy::api::v2::VirtualHost; using ::envoy::service::discovery::v2::AggregatedDiscoveryService; using ::envoy::service::load_stats::v2::ClusterStats; using ::envoy::service::load_stats::v2::LoadReportingService; @@ -96,6 +102,9 @@ using ::envoy::service::load_stats::v2::LoadStatsRequest; using ::envoy::service::load_stats::v2::LoadStatsResponse; using ::envoy::service::load_stats::v2::UpstreamLocalityStats; +constexpr char kLdsTypeUrl[] = "type.googleapis.com/envoy.api.v2.Listener"; +constexpr char kRdsTypeUrl[] = + "type.googleapis.com/envoy.api.v2.RouteConfiguration"; constexpr char kCdsTypeUrl[] = "type.googleapis.com/envoy.api.v2.Cluster"; constexpr char kEdsTypeUrl[] = "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment"; @@ -382,6 +391,22 @@ class AdsServiceImpl : public AdsService { using ResponseDelayPair = std::pair; AdsServiceImpl(bool enable_load_reporting) { + // Construct RDS response data. + default_route_config_.set_name("application_target_name"); + auto* virtual_host = default_route_config_.add_virtual_hosts(); + virtual_host->add_domains("*"); + auto* route = virtual_host->add_routes(); + route->mutable_match()->set_prefix(""); + route->mutable_route()->set_cluster("application_target_name"); + rds_response_data_ = { + {"application_target_name", default_route_config_}, + }; + // Construct LDS response data (with inlined RDS result). + default_listener_ = BuildListener(default_route_config_); + lds_response_data_ = { + {"application_target_name", default_listener_}, + }; + // Construct CDS response data. default_cluster_.set_name("application_target_name"); default_cluster_.set_type(envoy::api::v2::Cluster::EDS); default_cluster_.mutable_eds_cluster_config() @@ -396,6 +421,56 @@ class AdsServiceImpl : public AdsService { }; } + void HandleLdsRequest(DiscoveryRequest* request, Stream* stream) { + gpr_log(GPR_INFO, "ADS[%p]: received LDS request '%s'", this, + request->DebugString().c_str()); + const std::string version_str = "version_1"; + const std::string nonce_str = "nonce_1"; + grpc_core::MutexLock lock(&ads_mu_); + if (lds_response_state_ == NOT_SENT) { + DiscoveryResponse response; + response.set_type_url(kLdsTypeUrl); + response.set_version_info(version_str); + response.set_nonce(nonce_str); + for (const auto& server_name : request->resource_names()) { + auto iter = lds_response_data_.find(server_name); + if (iter == lds_response_data_.end()) continue; + response.add_resources()->PackFrom(iter->second); + } + stream->Write(response); + lds_response_state_ = SENT; + } else if (lds_response_state_ == SENT) { + GPR_ASSERT(!request->response_nonce().empty()); + lds_response_state_ = + request->version_info() == version_str ? ACKED : NACKED; + } + } + + void HandleRdsRequest(DiscoveryRequest* request, Stream* stream) { + gpr_log(GPR_INFO, "ADS[%p]: received RDS request '%s'", this, + request->DebugString().c_str()); + const std::string version_str = "version_1"; + const std::string nonce_str = "nonce_1"; + grpc_core::MutexLock lock(&ads_mu_); + if (rds_response_state_ == NOT_SENT) { + DiscoveryResponse response; + response.set_type_url(kRdsTypeUrl); + response.set_version_info(version_str); + response.set_nonce(nonce_str); + for (const auto& route_config_name : request->resource_names()) { + auto iter = rds_response_data_.find(route_config_name); + if (iter == rds_response_data_.end()) continue; + response.add_resources()->PackFrom(iter->second); + } + stream->Write(response); + rds_response_state_ = SENT; + } else if (rds_response_state_ == SENT) { + GPR_ASSERT(!request->response_nonce().empty()); + rds_response_state_ = + request->version_info() == version_str ? ACKED : NACKED; + } + } + void HandleCdsRequest(DiscoveryRequest* request, Stream* stream) { gpr_log(GPR_INFO, "ADS[%p]: received CDS request '%s'", this, request->DebugString().c_str()); @@ -465,7 +540,11 @@ class AdsServiceImpl : public AdsService { bool eds_sent = false; while (!eds_sent || cds_response_state_ == SENT) { if (!stream->Read(&request)) return; - if (request.type_url() == kCdsTypeUrl) { + if (request.type_url() == kLdsTypeUrl) { + HandleLdsRequest(&request, stream); + } else if (request.type_url() == kRdsTypeUrl) { + HandleRdsRequest(&request, stream); + } else if (request.type_url() == kCdsTypeUrl) { HandleCdsRequest(&request, stream); } else if (request.type_url() == kEdsTypeUrl) { HandleEdsRequest(&request, stream); @@ -480,11 +559,20 @@ class AdsServiceImpl : public AdsService { return Status::OK; } - Cluster GetDefaultCluster() const { return default_cluster_; } + Listener default_listener() const { return default_listener_; } + RouteConfiguration default_route_config() const { + return default_route_config_; + } + Cluster default_cluster() const { return default_cluster_; } - void SetCdsResponse( - std::map cds_response_data) { - cds_response_data_ = std::move(cds_response_data); + ResponseState lds_response_state() { + grpc_core::MutexLock lock(&ads_mu_); + return lds_response_state_; + } + + ResponseState rds_response_state() { + grpc_core::MutexLock lock(&ads_mu_); + return rds_response_state_; } ResponseState cds_response_state() { @@ -492,12 +580,48 @@ class AdsServiceImpl : public AdsService { return cds_response_state_; } + void SetLdsResponse( + std::map lds_response_data) { + lds_response_data_ = std::move(lds_response_data); + } + + void SetRdsResponse( + std::map + rds_response_data) { + rds_response_data_ = std::move(rds_response_data); + } + + void SetCdsResponse( + std::map cds_response_data) { + cds_response_data_ = std::move(cds_response_data); + } + void AddEdsResponse(const DiscoveryResponse& response, int send_after_ms) { grpc_core::MutexLock lock(&ads_mu_); eds_responses_and_delays_.push_back( std::make_pair(response, send_after_ms)); } + void SetLdsToUseDynamicRds() { + auto listener = default_listener_; + HttpConnectionManager http_connection_manager; + http_connection_manager.mutable_rds()->set_route_config_name( + "application_target_name"); + listener.mutable_api_listener()->mutable_api_listener()->PackFrom( + http_connection_manager); + SetLdsResponse({{"application_target_name", std::move(listener)}}); + } + + static Listener BuildListener(const RouteConfiguration& route_config) { + HttpConnectionManager http_connection_manager; + *(http_connection_manager.mutable_route_config()) = route_config; + Listener listener; + listener.set_name("application_target_name"); + listener.mutable_api_listener()->mutable_api_listener()->PackFrom( + http_connection_manager); + return listener; + } + void Start() { grpc_core::MutexLock lock(&ads_mu_); ads_done_ = false; @@ -573,6 +697,15 @@ class AdsServiceImpl : public AdsService { // Protect the members below. grpc_core::Mutex ads_mu_; bool ads_done_ = false; + // LDS response data. + Listener default_listener_; + std::map lds_response_data_; + ResponseState lds_response_state_ = NOT_SENT; + // RDS response data. + RouteConfiguration default_route_config_; + std::map + rds_response_data_; + ResponseState rds_response_state_ = NOT_SENT; // CDS response data. Cluster default_cluster_; std::map cds_response_data_; @@ -1335,13 +1468,296 @@ TEST_P(SecureNamingTest, TargetNameIsUnexpected) { ""); } +using LdsTest = BasicTest; + +// Tests that LDS client should send an ACK upon correct LDS response (with +// inlined RDS result). +TEST_P(LdsTest, Vanilla) { + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + SendRpc(); + EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(), + AdsServiceImpl::ACKED); +} + +// Tests that LDS client should send a NACK if there is no API listener in the +// Listener in the LDS response. +TEST_P(LdsTest, NoApiListener) { + auto listener = balancers_[0]->ads_service()->default_listener(); + listener.clear_api_listener(); + balancers_[0]->ads_service()->SetLdsResponse( + {{"application_target_name", listener}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(), + AdsServiceImpl::NACKED); +} + +// Tests that LDS client should send a NACK if the route_specifier in the +// http_connection_manager is neither inlined route_config nor RDS. +TEST_P(LdsTest, WrongRouteSpecifier) { + auto listener = balancers_[0]->ads_service()->default_listener(); + HttpConnectionManager http_connection_manager; + http_connection_manager.mutable_scoped_routes(); + listener.mutable_api_listener()->mutable_api_listener()->PackFrom( + http_connection_manager); + balancers_[0]->ads_service()->SetLdsResponse( + {{"application_target_name", std::move(listener)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(), + AdsServiceImpl::NACKED); +} + +// Tests that LDS client should send a NACK if matching domain can't be found in +// the LDS response. +TEST_P(LdsTest, NoMatchedDomain) { + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + route_config.mutable_virtual_hosts(0)->clear_domains(); + route_config.mutable_virtual_hosts(0)->add_domains("unmatched_domain"); + balancers_[0]->ads_service()->SetLdsResponse( + {{"application_target_name", + AdsServiceImpl::BuildListener(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(), + AdsServiceImpl::NACKED); +} + +// Tests that LDS client should choose the virtual host with matching domain if +// multiple virtual hosts exist in the LDS response. +TEST_P(LdsTest, ChooseMatchedDomain) { + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + *(route_config.add_virtual_hosts()) = route_config.virtual_hosts(0); + route_config.mutable_virtual_hosts(0)->clear_domains(); + route_config.mutable_virtual_hosts(0)->add_domains("unmatched_domain"); + route_config.mutable_virtual_hosts(0) + ->mutable_routes(0) + ->mutable_route() + ->mutable_cluster_header(); + balancers_[0]->ads_service()->SetLdsResponse( + {{"application_target_name", + AdsServiceImpl::BuildListener(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + SendRpc(); + EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(), + AdsServiceImpl::ACKED); +} + +// Tests that LDS client should choose the last route in the virtual host if +// multiple routes exist in the LDS response. +TEST_P(LdsTest, ChooseLastRoute) { + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + *(route_config.mutable_virtual_hosts(0)->add_routes()) = + route_config.virtual_hosts(0).routes(0); + route_config.mutable_virtual_hosts(0) + ->mutable_routes(0) + ->mutable_route() + ->mutable_cluster_header(); + balancers_[0]->ads_service()->SetLdsResponse( + {{"application_target_name", + AdsServiceImpl::BuildListener(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + SendRpc(); + EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(), + AdsServiceImpl::ACKED); +} + +// Tests that LDS client should send a NACK if route match has non-empty prefix +// in the LDS response. +TEST_P(LdsTest, RouteMatchHasNonemptyPrefix) { + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + route_config.mutable_virtual_hosts(0) + ->mutable_routes(0) + ->mutable_match() + ->set_prefix("nonempty_prefix"); + balancers_[0]->ads_service()->SetLdsResponse( + {{"application_target_name", + AdsServiceImpl::BuildListener(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(), + AdsServiceImpl::NACKED); +} + +// Tests that LDS client should send a NACK if route has an action other than +// RouteAction in the LDS response. +TEST_P(LdsTest, RouteHasNoRouteAction) { + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + route_config.mutable_virtual_hosts(0)->mutable_routes(0)->mutable_redirect(); + balancers_[0]->ads_service()->SetLdsResponse( + {{"application_target_name", + AdsServiceImpl::BuildListener(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(), + AdsServiceImpl::NACKED); +} + +// Tests that LDS client should send a NACK if RouteAction has a +// cluster_specifier other than cluster in the LDS response. +TEST_P(LdsTest, RouteActionHasNoCluster) { + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + route_config.mutable_virtual_hosts(0) + ->mutable_routes(0) + ->mutable_route() + ->mutable_cluster_header(); + balancers_[0]->ads_service()->SetLdsResponse( + {{"application_target_name", + AdsServiceImpl::BuildListener(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(), + AdsServiceImpl::NACKED); +} + +using RdsTest = BasicTest; + +// Tests that RDS client should send an ACK upon correct RDS response. +TEST_P(RdsTest, Vanilla) { + balancers_[0]->ads_service()->SetLdsToUseDynamicRds(); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + SendRpc(); + EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(), + AdsServiceImpl::ACKED); +} + +// Tests that RDS client should send a NACK if matching domain can't be found in +// the RDS response. +TEST_P(RdsTest, NoMatchedDomain) { + balancers_[0]->ads_service()->SetLdsToUseDynamicRds(); + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + route_config.mutable_virtual_hosts(0)->clear_domains(); + route_config.mutable_virtual_hosts(0)->add_domains("unmatched_domain"); + balancers_[0]->ads_service()->SetRdsResponse( + {{"application_target_name", std::move(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(), + AdsServiceImpl::NACKED); +} + +// Tests that RDS client should choose the virtual host with matching domain if +// multiple virtual hosts exist in the RDS response. +TEST_P(RdsTest, ChooseMatchedDomain) { + balancers_[0]->ads_service()->SetLdsToUseDynamicRds(); + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + *(route_config.add_virtual_hosts()) = route_config.virtual_hosts(0); + route_config.mutable_virtual_hosts(0)->clear_domains(); + route_config.mutable_virtual_hosts(0)->add_domains("unmatched_domain"); + route_config.mutable_virtual_hosts(0) + ->mutable_routes(0) + ->mutable_route() + ->mutable_cluster_header(); + balancers_[0]->ads_service()->SetRdsResponse( + {{"application_target_name", std::move(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + SendRpc(); + EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(), + AdsServiceImpl::ACKED); +} + +// Tests that RDS client should choose the last route in the virtual host if +// multiple routes exist in the RDS response. +TEST_P(RdsTest, ChooseLastRoute) { + balancers_[0]->ads_service()->SetLdsToUseDynamicRds(); + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + *(route_config.mutable_virtual_hosts(0)->add_routes()) = + route_config.virtual_hosts(0).routes(0); + route_config.mutable_virtual_hosts(0) + ->mutable_routes(0) + ->mutable_route() + ->mutable_cluster_header(); + balancers_[0]->ads_service()->SetRdsResponse( + {{"application_target_name", std::move(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + SendRpc(); + EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(), + AdsServiceImpl::ACKED); +} + +// Tests that RDS client should send a NACK if route match has non-empty prefix +// in the RDS response. +TEST_P(RdsTest, RouteMatchHasNonemptyPrefix) { + balancers_[0]->ads_service()->SetLdsToUseDynamicRds(); + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + route_config.mutable_virtual_hosts(0) + ->mutable_routes(0) + ->mutable_match() + ->set_prefix("nonempty_prefix"); + balancers_[0]->ads_service()->SetRdsResponse( + {{"application_target_name", std::move(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(), + AdsServiceImpl::NACKED); +} + +// Tests that RDS client should send a NACK if route has an action other than +// RouteAction in the RDS response. +TEST_P(RdsTest, RouteHasNoRouteAction) { + balancers_[0]->ads_service()->SetLdsToUseDynamicRds(); + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + route_config.mutable_virtual_hosts(0)->mutable_routes(0)->mutable_redirect(); + balancers_[0]->ads_service()->SetRdsResponse( + {{"application_target_name", std::move(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(), + AdsServiceImpl::NACKED); +} + +// Tests that RDS client should send a NACK if RouteAction has a +// cluster_specifier other than cluster in the RDS response. +TEST_P(RdsTest, RouteActionHasNoCluster) { + balancers_[0]->ads_service()->SetLdsToUseDynamicRds(); + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + route_config.mutable_virtual_hosts(0) + ->mutable_routes(0) + ->mutable_route() + ->mutable_cluster_header(); + balancers_[0]->ads_service()->SetRdsResponse( + {{"application_target_name", std::move(route_config)}}); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(), + AdsServiceImpl::NACKED); +} + using CdsTest = BasicTest; // Tests that CDS client should send an ACK upon correct CDS response. TEST_P(CdsTest, Vanilla) { SetNextResolution({}); SetNextResolutionForLbChannelAllBalancers(); - CheckRpcSendFailure(); + SendRpc(); EXPECT_EQ(balancers_[0]->ads_service()->cds_response_state(), AdsServiceImpl::ACKED); } @@ -1349,7 +1765,7 @@ TEST_P(CdsTest, Vanilla) { // Tests that CDS client should send a NACK if the cluster type in CDS response // is other than EDS. TEST_P(CdsTest, WrongClusterType) { - auto cluster = balancers_[0]->ads_service()->GetDefaultCluster(); + auto cluster = balancers_[0]->ads_service()->default_cluster(); cluster.set_type(envoy::api::v2::Cluster::STATIC); balancers_[0]->ads_service()->SetCdsResponse( {{"application_target_name", std::move(cluster)}}); @@ -1363,7 +1779,7 @@ TEST_P(CdsTest, WrongClusterType) { // Tests that CDS client should send a NACK if the eds_config in CDS response is // other than ADS. TEST_P(CdsTest, WrongEdsConfig) { - auto cluster = balancers_[0]->ads_service()->GetDefaultCluster(); + auto cluster = balancers_[0]->ads_service()->default_cluster(); cluster.mutable_eds_cluster_config()->mutable_eds_config()->mutable_self(); balancers_[0]->ads_service()->SetCdsResponse( {{"application_target_name", std::move(cluster)}}); @@ -1377,7 +1793,7 @@ TEST_P(CdsTest, WrongEdsConfig) { // Tests that CDS client should send a NACK if the lb_policy in CDS response is // other than ROUND_ROBIN. TEST_P(CdsTest, WrongLbPolicy) { - auto cluster = balancers_[0]->ads_service()->GetDefaultCluster(); + auto cluster = balancers_[0]->ads_service()->default_cluster(); cluster.set_lb_policy(envoy::api::v2::Cluster::LEAST_REQUEST); balancers_[0]->ads_service()->SetCdsResponse( {{"application_target_name", std::move(cluster)}}); @@ -1391,7 +1807,7 @@ TEST_P(CdsTest, WrongLbPolicy) { // Tests that CDS client should send a NACK if the lrs_server in CDS response is // other than SELF. TEST_P(CdsTest, WrongLrsServer) { - auto cluster = balancers_[0]->ads_service()->GetDefaultCluster(); + auto cluster = balancers_[0]->ads_service()->default_cluster(); cluster.mutable_lrs_server()->mutable_ads(); balancers_[0]->ads_service()->SetCdsResponse( {{"application_target_name", std::move(cluster)}}); @@ -2597,6 +3013,18 @@ INSTANTIATE_TEST_SUITE_P(XdsTest, SecureNamingTest, TestType(true, true)), &TestTypeName); +// LDS depends on XdsResolver. +INSTANTIATE_TEST_SUITE_P(XdsTest, LdsTest, + ::testing::Values(TestType(true, false), + TestType(true, true)), + &TestTypeName); + +// RDS depends on XdsResolver. +INSTANTIATE_TEST_SUITE_P(XdsTest, RdsTest, + ::testing::Values(TestType(true, false), + TestType(true, true)), + &TestTypeName); + // CDS depends on XdsResolver. INSTANTIATE_TEST_SUITE_P(XdsTest, CdsTest, ::testing::Values(TestType(true, false), diff --git a/tools/codegen/core/gen_upb_api.sh b/tools/codegen/core/gen_upb_api.sh index fb7199398d6..f0799f23476 100755 --- a/tools/codegen/core/gen_upb_api.sh +++ b/tools/codegen/core/gen_upb_api.sh @@ -54,9 +54,20 @@ proto_files=( \ "envoy/api/v2/eds.proto" \ "envoy/api/v2/endpoint/endpoint.proto" \ "envoy/api/v2/endpoint/load_report.proto" \ + "envoy/api/v2/lds.proto" \ + "envoy/api/v2/listener/listener.proto" \ + "envoy/api/v2/rds.proto" \ + "envoy/api/v2/route/route.proto" \ + "envoy/api/v2/srds.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" \ "envoy/service/discovery/v2/ads.proto" \ "envoy/service/load_stats/v2/lrs.proto" \ "envoy/type/http.proto" \ + "envoy/type/matcher/regex.proto" \ + "envoy/api/v2/listener/udp_listener_config.proto" \ + "envoy/type/matcher/string.proto" \ "envoy/type/percent.proto" \ "envoy/type/range.proto" \ "gogoproto/gogo.proto" \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 174dfe42442..903f69ddacc 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1098,12 +1098,34 @@ 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/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/listener.upb.c \ +src/core/ext/upb-generated/envoy/api/v2/listener/listener.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/route.upb.c \ +src/core/ext/upb-generated/envoy/api/v2/route/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 \ +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.c \ +src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h \ +src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c \ +src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h \ src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c \ src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h \ src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c \ src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h \ src/core/ext/upb-generated/envoy/type/http.upb.c \ src/core/ext/upb-generated/envoy/type/http.upb.h \ +src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c \ +src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h \ +src/core/ext/upb-generated/envoy/type/matcher/string.upb.c \ +src/core/ext/upb-generated/envoy/type/matcher/string.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 \