From ac6795a57e05523b8fa220bc5cef26abb876aae5 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Wed, 12 Dec 2018 11:40:25 -0800 Subject: Revert "Changes add a script for generating C code and build rule for protobuf" This reverts commit 62027b7e14624283f758a7785a0a1347eda0a147. --- BUILD | 25 - CMakeLists.txt | 53 - Makefile | 38 +- bazel/grpc_build_system.bzl | 1 - bazel/grpc_deps.bzl | 6 +- build.yaml | 2 - grpc.gyp | 19 - .../ext/upb-generated/google/protobuf/any.upb.c | 24 - .../ext/upb-generated/google/protobuf/any.upb.h | 63 - .../upb-generated/google/protobuf/descriptor.upb.c | 549 ------ .../upb-generated/google/protobuf/descriptor.upb.h | 1879 -------------------- .../upb-generated/google/protobuf/duration.upb.c | 24 - .../upb-generated/google/protobuf/duration.upb.h | 65 - .../ext/upb-generated/google/protobuf/struct.upb.c | 88 - .../ext/upb-generated/google/protobuf/struct.upb.h | 226 --- .../upb-generated/google/protobuf/timestamp.upb.c | 24 - .../upb-generated/google/protobuf/timestamp.upb.h | 65 - .../upb-generated/google/protobuf/wrappers.upb.c | 87 - .../upb-generated/google/protobuf/wrappers.upb.h | 305 ---- src/upb/gen_build_yaml.py | 69 - tools/buildgen/generate_build_additions.sh | 1 - tools/codegen/core/gen_upb_api.sh | 38 - tools/distrib/check_copyright.py | 14 - tools/distrib/check_include_guards.py | 14 - tools/run_tests/generated/sources_and_headers.json | 21 - tools/run_tests/sanity/check_port_platform.py | 3 - 26 files changed, 4 insertions(+), 3699 deletions(-) delete mode 100644 src/core/ext/upb-generated/google/protobuf/any.upb.c delete mode 100644 src/core/ext/upb-generated/google/protobuf/any.upb.h delete mode 100644 src/core/ext/upb-generated/google/protobuf/descriptor.upb.c delete mode 100644 src/core/ext/upb-generated/google/protobuf/descriptor.upb.h delete mode 100644 src/core/ext/upb-generated/google/protobuf/duration.upb.c delete mode 100644 src/core/ext/upb-generated/google/protobuf/duration.upb.h delete mode 100644 src/core/ext/upb-generated/google/protobuf/struct.upb.c delete mode 100644 src/core/ext/upb-generated/google/protobuf/struct.upb.h delete mode 100644 src/core/ext/upb-generated/google/protobuf/timestamp.upb.c delete mode 100644 src/core/ext/upb-generated/google/protobuf/timestamp.upb.h delete mode 100644 src/core/ext/upb-generated/google/protobuf/wrappers.upb.c delete mode 100644 src/core/ext/upb-generated/google/protobuf/wrappers.upb.h delete mode 100755 src/upb/gen_build_yaml.py delete mode 100755 tools/codegen/core/gen_upb_api.sh diff --git a/BUILD b/BUILD index 034e47d1a9..5550e583a8 100644 --- a/BUILD +++ b/BUILD @@ -2274,29 +2274,4 @@ grpc_cc_library( ], ) -# TODO: Get this into build.yaml once we start using it. -grpc_cc_library( - name = "google_protobuf", - srcs = [ - "src/core/ext/upb-generated/google/protobuf/any.upb.c", - "src/core/ext/upb-generated/google/protobuf/descriptor.upb.c", - "src/core/ext/upb-generated/google/protobuf/duration.upb.c", - "src/core/ext/upb-generated/google/protobuf/struct.upb.c", - "src/core/ext/upb-generated/google/protobuf/timestamp.upb.c", - "src/core/ext/upb-generated/google/protobuf/wrappers.upb.c", - ], - hdrs = [ - "src/core/ext/upb-generated/google/protobuf/any.upb.h", - "src/core/ext/upb-generated/google/protobuf/descriptor.upb.h", - "src/core/ext/upb-generated/google/protobuf/duration.upb.h", - "src/core/ext/upb-generated/google/protobuf/struct.upb.h", - "src/core/ext/upb-generated/google/protobuf/timestamp.upb.h", - "src/core/ext/upb-generated/google/protobuf/wrappers.upb.h", - ], - language = "c++", - external_deps = [ - "upb_lib", - ], -) - grpc_generate_one_off_targets() diff --git a/CMakeLists.txt b/CMakeLists.txt index 08240fe82b..9c660c7701 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5478,59 +5478,6 @@ endif() endif (gRPC_BUILD_CSHARP_EXT) if (gRPC_BUILD_TESTS) -add_library(upb - third_party/upb/google/protobuf/descriptor.upb.c - third_party/upb/upb/decode.c - third_party/upb/upb/def.c - third_party/upb/upb/encode.c - third_party/upb/upb/handlers.c - third_party/upb/upb/msg.c - third_party/upb/upb/msgfactory.c - third_party/upb/upb/refcounted.c - third_party/upb/upb/sink.c - third_party/upb/upb/table.c - third_party/upb/upb/upb.c -) - -if(WIN32 AND MSVC) - set_target_properties(upb PROPERTIES COMPILE_PDB_NAME "upb" - COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" - ) - if (gRPC_INSTALL) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/upb.pdb - DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL - ) - endif() -endif() - - -target_include_directories(upb - PUBLIC $ $ - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - PRIVATE ${_gRPC_SSL_INCLUDE_DIR} - PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} - PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} - PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} - PRIVATE ${_gRPC_CARES_INCLUDE_DIR} - PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} - PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} - PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR} -) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(upb PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(upb PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() -target_link_libraries(upb - ${_gRPC_SSL_LIBRARIES} - ${_gRPC_ALLTARGETS_LIBRARIES} -) - - -endif (gRPC_BUILD_TESTS) -if (gRPC_BUILD_TESTS) - add_library(bad_client_test test/core/bad_client/bad_client.cc ) diff --git a/Makefile b/Makefile index 950ac75695..0163dc414a 100644 --- a/Makefile +++ b/Makefile @@ -1411,7 +1411,7 @@ plugins: $(PROTOC_PLUGINS) privatelibs: privatelibs_c privatelibs_cxx -privatelibs_c: $(LIBDIR)/$(CONFIG)/libalts_test_util.a $(LIBDIR)/$(CONFIG)/libcxxabi.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libupb.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libares.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a +privatelibs_c: $(LIBDIR)/$(CONFIG)/libalts_test_util.a $(LIBDIR)/$(CONFIG)/libcxxabi.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libares.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc $(LIBDIR)/$(CONFIG)/pkgconfig/gpr.pc pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc $(LIBDIR)/$(CONFIG)/pkgconfig/gpr.pc @@ -10117,42 +10117,6 @@ ifneq ($(NO_DEPS),true) endif -LIBUPB_SRC = \ - third_party/upb/google/protobuf/descriptor.upb.c \ - third_party/upb/upb/decode.c \ - third_party/upb/upb/def.c \ - third_party/upb/upb/encode.c \ - third_party/upb/upb/handlers.c \ - third_party/upb/upb/msg.c \ - third_party/upb/upb/msgfactory.c \ - third_party/upb/upb/refcounted.c \ - third_party/upb/upb/sink.c \ - third_party/upb/upb/table.c \ - third_party/upb/upb/upb.c \ - -PUBLIC_HEADERS_C += \ - -LIBUPB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBUPB_SRC)))) - -$(LIBUPB_OBJS): CFLAGS += -Ithird_party/upb -Wno-sign-conversion -Wno-shadow -Wno-conversion -Wno-implicit-fallthrough - -$(LIBDIR)/$(CONFIG)/libupb.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBUPB_OBJS) - $(E) "[AR] Creating $@" - $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libupb.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libupb.a $(LIBUPB_OBJS) -ifeq ($(SYSTEM),Darwin) - $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libupb.a -endif - - - - -ifneq ($(NO_DEPS),true) --include $(LIBUPB_OBJS:.o=.dep) -endif - - LIBZ_SRC = \ third_party/zlib/adler32.c \ third_party/zlib/compress.c \ diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 06b05f7952..65fe5a10aa 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -99,7 +99,6 @@ def grpc_cc_library( linkopts = if_not_windows(["-pthread"]), includes = [ "include", - "src/core/ext/upb-generated", ], alwayslink = alwayslink, data = data, diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 2738e39abf..3eacd2b047 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -12,7 +12,7 @@ def grpc_deps(): ) native.bind( - name = "upb_lib", + name = "upblib", actual = "@upb//:upb", ) @@ -195,8 +195,8 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - strip_prefix = "upb-fb6f7e96895c3a9a8ae2e66516160937e7ac1779", - url = "https://github.com/google/upb/archive/fb6f7e96895c3a9a8ae2e66516160937e7ac1779.tar.gz", + strip_prefix = "upb-9ce4a77f61c134bbed28bfd5be5cd7dc0e80f5e3", + url = "https://github.com/google/upb/archive/9ce4a77f61c134bbed28bfd5be5cd7dc0e80f5e3.tar.gz", ) diff --git a/build.yaml b/build.yaml index b8c2fa6b02..4521169e6c 100644 --- a/build.yaml +++ b/build.yaml @@ -5896,8 +5896,6 @@ defaults: -Wno-deprecated-declarations -Ithird_party/nanopb -DPB_FIELD_32BIT CXXFLAGS: -Wnon-virtual-dtor LDFLAGS: -g - upb: - CFLAGS: -Ithird_party/upb -Wno-sign-conversion -Wno-shadow -Wno-conversion -Wno-implicit-fallthrough zlib: CFLAGS: -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-implicit-function-declaration -Wno-implicit-fallthrough $(W_NO_SHIFT_NEGATIVE_VALUE) -fvisibility=hidden diff --git a/grpc.gyp b/grpc.gyp index d03c74d8dc..00f06a1e54 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -2640,25 +2640,6 @@ 'third_party/benchmark/src/timers.cc', ], }, - { - 'target_name': 'upb', - 'type': 'static_library', - 'dependencies': [ - ], - 'sources': [ - 'third_party/upb/google/protobuf/descriptor.upb.c', - 'third_party/upb/upb/decode.c', - 'third_party/upb/upb/def.c', - 'third_party/upb/upb/encode.c', - 'third_party/upb/upb/handlers.c', - 'third_party/upb/upb/msg.c', - 'third_party/upb/upb/msgfactory.c', - 'third_party/upb/upb/refcounted.c', - 'third_party/upb/upb/sink.c', - 'third_party/upb/upb/table.c', - 'third_party/upb/upb/upb.c', - ], - }, { 'target_name': 'z', 'type': 'static_library', diff --git a/src/core/ext/upb-generated/google/protobuf/any.upb.c b/src/core/ext/upb-generated/google/protobuf/any.upb.c deleted file mode 100644 index 1005a48e90..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/any.upb.c +++ /dev/null @@ -1,24 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/any.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#include "google/protobuf/any.upb.h" -#include -#include "upb/msg.h" - -#include "upb/port_def.inc" - -static const upb_msglayout_field google_protobuf_Any__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 12, 1}, -}; - -const upb_msglayout google_protobuf_Any_msginit = { - NULL, &google_protobuf_Any__fields[0], UPB_SIZE(16, 32), 2, false, -}; - -#include "upb/port_undef.inc" diff --git a/src/core/ext/upb-generated/google/protobuf/any.upb.h b/src/core/ext/upb-generated/google/protobuf/any.upb.h deleted file mode 100644 index d29265553f..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/any.upb.h +++ /dev/null @@ -1,63 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/any.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#ifndef GOOGLE_PROTOBUF_ANY_PROTO_UPB_H_ -#define GOOGLE_PROTOBUF_ANY_PROTO_UPB_H_ - -#include "upb/msg.h" - -#include "upb/decode.h" -#include "upb/encode.h" -#include "upb/port_def.inc" -UPB_BEGIN_EXTERN_C - -struct google_protobuf_Any; -typedef struct google_protobuf_Any google_protobuf_Any; - -/* Enums */ - -/* google.protobuf.Any */ - -extern const upb_msglayout google_protobuf_Any_msginit; -UPB_INLINE google_protobuf_Any* google_protobuf_Any_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_Any_msginit, arena); -} -UPB_INLINE google_protobuf_Any* google_protobuf_Any_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_Any* ret = google_protobuf_Any_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_Any_msginit)) ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_Any_serialize(const google_protobuf_Any* msg, - upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_Any_msginit, arena, len); -} - -UPB_INLINE upb_stringview -google_protobuf_Any_type_url(const google_protobuf_Any* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)); -} -UPB_INLINE upb_stringview -google_protobuf_Any_value(const google_protobuf_Any* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); -} - -UPB_INLINE void google_protobuf_Any_set_type_url(google_protobuf_Any* msg, - upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)) = value; -} -UPB_INLINE void google_protobuf_Any_set_value(google_protobuf_Any* msg, - upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; -} - -UPB_END_EXTERN_C - -#include "upb/port_undef.inc" - -#endif /* GOOGLE_PROTOBUF_ANY_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c deleted file mode 100644 index f774873d61..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +++ /dev/null @@ -1,549 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/descriptor.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#include "google/protobuf/descriptor.upb.h" -#include -#include "upb/msg.h" - -#include "upb/port_def.inc" - -static const upb_msglayout* const google_protobuf_FileDescriptorSet_submsgs[1] = - { - &google_protobuf_FileDescriptorProto_msginit, -}; - -static const upb_msglayout_field google_protobuf_FileDescriptorSet__fields[1] = - { - {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_FileDescriptorSet_msginit = { - &google_protobuf_FileDescriptorSet_submsgs[0], - &google_protobuf_FileDescriptorSet__fields[0], - UPB_SIZE(4, 8), - 1, - false, -}; - -static const upb_msglayout* const - google_protobuf_FileDescriptorProto_submsgs[6] = { - &google_protobuf_DescriptorProto_msginit, - &google_protobuf_EnumDescriptorProto_msginit, - &google_protobuf_FieldDescriptorProto_msginit, - &google_protobuf_FileOptions_msginit, - &google_protobuf_ServiceDescriptorProto_msginit, - &google_protobuf_SourceCodeInfo_msginit, -}; - -static const upb_msglayout_field - google_protobuf_FileDescriptorProto__fields[12] = { - {1, UPB_SIZE(8, 16), 1, 0, 9, 1}, - {2, UPB_SIZE(16, 32), 2, 0, 9, 1}, - {3, UPB_SIZE(40, 80), 0, 0, 9, 3}, - {4, UPB_SIZE(44, 88), 0, 0, 11, 3}, - {5, UPB_SIZE(48, 96), 0, 1, 11, 3}, - {6, UPB_SIZE(52, 104), 0, 4, 11, 3}, - {7, UPB_SIZE(56, 112), 0, 2, 11, 3}, - {8, UPB_SIZE(32, 64), 4, 3, 11, 1}, - {9, UPB_SIZE(36, 72), 5, 5, 11, 1}, - {10, UPB_SIZE(60, 120), 0, 0, 5, 3}, - {11, UPB_SIZE(64, 128), 0, 0, 5, 3}, - {12, UPB_SIZE(24, 48), 3, 0, 9, 1}, -}; - -const upb_msglayout google_protobuf_FileDescriptorProto_msginit = { - &google_protobuf_FileDescriptorProto_submsgs[0], - &google_protobuf_FileDescriptorProto__fields[0], - UPB_SIZE(72, 144), - 12, - false, -}; - -static const upb_msglayout* const google_protobuf_DescriptorProto_submsgs[8] = { - &google_protobuf_DescriptorProto_msginit, - &google_protobuf_DescriptorProto_ExtensionRange_msginit, - &google_protobuf_DescriptorProto_ReservedRange_msginit, - &google_protobuf_EnumDescriptorProto_msginit, - &google_protobuf_FieldDescriptorProto_msginit, - &google_protobuf_MessageOptions_msginit, - &google_protobuf_OneofDescriptorProto_msginit, -}; - -static const upb_msglayout_field google_protobuf_DescriptorProto__fields[10] = { - {1, UPB_SIZE(8, 16), 1, 0, 9, 1}, {2, UPB_SIZE(20, 40), 0, 4, 11, 3}, - {3, UPB_SIZE(24, 48), 0, 0, 11, 3}, {4, UPB_SIZE(28, 56), 0, 3, 11, 3}, - {5, UPB_SIZE(32, 64), 0, 1, 11, 3}, {6, UPB_SIZE(36, 72), 0, 4, 11, 3}, - {7, UPB_SIZE(16, 32), 2, 5, 11, 1}, {8, UPB_SIZE(40, 80), 0, 6, 11, 3}, - {9, UPB_SIZE(44, 88), 0, 2, 11, 3}, {10, UPB_SIZE(48, 96), 0, 0, 9, 3}, -}; - -const upb_msglayout google_protobuf_DescriptorProto_msginit = { - &google_protobuf_DescriptorProto_submsgs[0], - &google_protobuf_DescriptorProto__fields[0], - UPB_SIZE(56, 112), - 10, - false, -}; - -static const upb_msglayout* const - google_protobuf_DescriptorProto_ExtensionRange_submsgs[1] = { - &google_protobuf_ExtensionRangeOptions_msginit, -}; - -static const upb_msglayout_field - google_protobuf_DescriptorProto_ExtensionRange__fields[3] = { - {1, UPB_SIZE(4, 4), 1, 0, 5, 1}, - {2, UPB_SIZE(8, 8), 2, 0, 5, 1}, - {3, UPB_SIZE(12, 16), 3, 0, 11, 1}, -}; - -const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit = { - &google_protobuf_DescriptorProto_ExtensionRange_submsgs[0], - &google_protobuf_DescriptorProto_ExtensionRange__fields[0], - UPB_SIZE(16, 24), - 3, - false, -}; - -static const upb_msglayout_field - google_protobuf_DescriptorProto_ReservedRange__fields[2] = { - {1, UPB_SIZE(4, 4), 1, 0, 5, 1}, - {2, UPB_SIZE(8, 8), 2, 0, 5, 1}, -}; - -const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit = { - NULL, - &google_protobuf_DescriptorProto_ReservedRange__fields[0], - UPB_SIZE(12, 12), - 2, - false, -}; - -static const upb_msglayout* const - google_protobuf_ExtensionRangeOptions_submsgs[1] = { - &google_protobuf_UninterpretedOption_msginit, -}; - -static const upb_msglayout_field - google_protobuf_ExtensionRangeOptions__fields[1] = { - {999, UPB_SIZE(0, 0), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit = { - &google_protobuf_ExtensionRangeOptions_submsgs[0], - &google_protobuf_ExtensionRangeOptions__fields[0], - UPB_SIZE(4, 8), - 1, - false, -}; - -static const upb_msglayout* const - google_protobuf_FieldDescriptorProto_submsgs[1] = { - &google_protobuf_FieldOptions_msginit, -}; - -static const upb_msglayout_field - google_protobuf_FieldDescriptorProto__fields[10] = { - {1, UPB_SIZE(32, 32), 5, 0, 9, 1}, - {2, UPB_SIZE(40, 48), 6, 0, 9, 1}, - {3, UPB_SIZE(24, 24), 3, 0, 5, 1}, - {4, UPB_SIZE(8, 8), 1, 0, 14, 1}, - {5, UPB_SIZE(16, 16), 2, 0, 14, 1}, - {6, UPB_SIZE(48, 64), 7, 0, 9, 1}, - {7, UPB_SIZE(56, 80), 8, 0, 9, 1}, - {8, UPB_SIZE(72, 112), 10, 0, 11, 1}, - {9, UPB_SIZE(28, 28), 4, 0, 5, 1}, - {10, UPB_SIZE(64, 96), 9, 0, 9, 1}, -}; - -const upb_msglayout google_protobuf_FieldDescriptorProto_msginit = { - &google_protobuf_FieldDescriptorProto_submsgs[0], - &google_protobuf_FieldDescriptorProto__fields[0], - UPB_SIZE(80, 128), - 10, - false, -}; - -static const upb_msglayout* const - google_protobuf_OneofDescriptorProto_submsgs[1] = { - &google_protobuf_OneofOptions_msginit, -}; - -static const upb_msglayout_field - google_protobuf_OneofDescriptorProto__fields[2] = { - {1, UPB_SIZE(8, 16), 1, 0, 9, 1}, - {2, UPB_SIZE(16, 32), 2, 0, 11, 1}, -}; - -const upb_msglayout google_protobuf_OneofDescriptorProto_msginit = { - &google_protobuf_OneofDescriptorProto_submsgs[0], - &google_protobuf_OneofDescriptorProto__fields[0], - UPB_SIZE(24, 48), - 2, - false, -}; - -static const upb_msglayout* const - google_protobuf_EnumDescriptorProto_submsgs[3] = { - &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, - &google_protobuf_EnumOptions_msginit, - &google_protobuf_EnumValueDescriptorProto_msginit, -}; - -static const upb_msglayout_field - google_protobuf_EnumDescriptorProto__fields[5] = { - {1, UPB_SIZE(8, 16), 1, 0, 9, 1}, {2, UPB_SIZE(20, 40), 0, 2, 11, 3}, - {3, UPB_SIZE(16, 32), 2, 1, 11, 1}, {4, UPB_SIZE(24, 48), 0, 0, 11, 3}, - {5, UPB_SIZE(28, 56), 0, 0, 9, 3}, -}; - -const upb_msglayout google_protobuf_EnumDescriptorProto_msginit = { - &google_protobuf_EnumDescriptorProto_submsgs[0], - &google_protobuf_EnumDescriptorProto__fields[0], - UPB_SIZE(32, 64), - 5, - false, -}; - -static const upb_msglayout_field - google_protobuf_EnumDescriptorProto_EnumReservedRange__fields[2] = { - {1, UPB_SIZE(4, 4), 1, 0, 5, 1}, - {2, UPB_SIZE(8, 8), 2, 0, 5, 1}, -}; - -const upb_msglayout - google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit = { - NULL, - &google_protobuf_EnumDescriptorProto_EnumReservedRange__fields[0], - UPB_SIZE(12, 12), - 2, - false, -}; - -static const upb_msglayout* const - google_protobuf_EnumValueDescriptorProto_submsgs[1] = { - &google_protobuf_EnumValueOptions_msginit, -}; - -static const upb_msglayout_field - google_protobuf_EnumValueDescriptorProto__fields[3] = { - {1, UPB_SIZE(8, 16), 2, 0, 9, 1}, - {2, UPB_SIZE(4, 4), 1, 0, 5, 1}, - {3, UPB_SIZE(16, 32), 3, 0, 11, 1}, -}; - -const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit = { - &google_protobuf_EnumValueDescriptorProto_submsgs[0], - &google_protobuf_EnumValueDescriptorProto__fields[0], - UPB_SIZE(24, 48), - 3, - false, -}; - -static const upb_msglayout* const - google_protobuf_ServiceDescriptorProto_submsgs[2] = { - &google_protobuf_MethodDescriptorProto_msginit, - &google_protobuf_ServiceOptions_msginit, -}; - -static const upb_msglayout_field - google_protobuf_ServiceDescriptorProto__fields[3] = { - {1, UPB_SIZE(8, 16), 1, 0, 9, 1}, - {2, UPB_SIZE(20, 40), 0, 0, 11, 3}, - {3, UPB_SIZE(16, 32), 2, 1, 11, 1}, -}; - -const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit = { - &google_protobuf_ServiceDescriptorProto_submsgs[0], - &google_protobuf_ServiceDescriptorProto__fields[0], - UPB_SIZE(24, 48), - 3, - false, -}; - -static const upb_msglayout* const - google_protobuf_MethodDescriptorProto_submsgs[1] = { - &google_protobuf_MethodOptions_msginit, -}; - -static const upb_msglayout_field - google_protobuf_MethodDescriptorProto__fields[6] = { - {1, UPB_SIZE(8, 16), 3, 0, 9, 1}, {2, UPB_SIZE(16, 32), 4, 0, 9, 1}, - {3, UPB_SIZE(24, 48), 5, 0, 9, 1}, {4, UPB_SIZE(32, 64), 6, 0, 11, 1}, - {5, UPB_SIZE(1, 1), 1, 0, 8, 1}, {6, UPB_SIZE(2, 2), 2, 0, 8, 1}, -}; - -const upb_msglayout google_protobuf_MethodDescriptorProto_msginit = { - &google_protobuf_MethodDescriptorProto_submsgs[0], - &google_protobuf_MethodDescriptorProto__fields[0], - UPB_SIZE(40, 80), - 6, - false, -}; - -static const upb_msglayout* const google_protobuf_FileOptions_submsgs[1] = { - &google_protobuf_UninterpretedOption_msginit, -}; - -static const upb_msglayout_field google_protobuf_FileOptions__fields[21] = { - {1, UPB_SIZE(32, 32), 11, 0, 9, 1}, - {8, UPB_SIZE(40, 48), 12, 0, 9, 1}, - {9, UPB_SIZE(8, 8), 1, 0, 14, 1}, - {10, UPB_SIZE(16, 16), 2, 0, 8, 1}, - {11, UPB_SIZE(48, 64), 13, 0, 9, 1}, - {16, UPB_SIZE(17, 17), 3, 0, 8, 1}, - {17, UPB_SIZE(18, 18), 4, 0, 8, 1}, - {18, UPB_SIZE(19, 19), 5, 0, 8, 1}, - {20, UPB_SIZE(20, 20), 6, 0, 8, 1}, - {23, UPB_SIZE(21, 21), 7, 0, 8, 1}, - {27, UPB_SIZE(22, 22), 8, 0, 8, 1}, - {31, UPB_SIZE(23, 23), 9, 0, 8, 1}, - {36, UPB_SIZE(56, 80), 14, 0, 9, 1}, - {37, UPB_SIZE(64, 96), 15, 0, 9, 1}, - {39, UPB_SIZE(72, 112), 16, 0, 9, 1}, - {40, UPB_SIZE(80, 128), 17, 0, 9, 1}, - {41, UPB_SIZE(88, 144), 18, 0, 9, 1}, - {42, UPB_SIZE(24, 24), 10, 0, 8, 1}, - {44, UPB_SIZE(96, 160), 19, 0, 9, 1}, - {45, UPB_SIZE(104, 176), 20, 0, 9, 1}, - {999, UPB_SIZE(112, 192), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_FileOptions_msginit = { - &google_protobuf_FileOptions_submsgs[0], - &google_protobuf_FileOptions__fields[0], - UPB_SIZE(120, 208), - 21, - false, -}; - -static const upb_msglayout* const google_protobuf_MessageOptions_submsgs[1] = { - &google_protobuf_UninterpretedOption_msginit, -}; - -static const upb_msglayout_field google_protobuf_MessageOptions__fields[5] = { - {1, UPB_SIZE(1, 1), 1, 0, 8, 1}, {2, UPB_SIZE(2, 2), 2, 0, 8, 1}, - {3, UPB_SIZE(3, 3), 3, 0, 8, 1}, {7, UPB_SIZE(4, 4), 4, 0, 8, 1}, - {999, UPB_SIZE(8, 8), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_MessageOptions_msginit = { - &google_protobuf_MessageOptions_submsgs[0], - &google_protobuf_MessageOptions__fields[0], - UPB_SIZE(12, 16), - 5, - false, -}; - -static const upb_msglayout* const google_protobuf_FieldOptions_submsgs[1] = { - &google_protobuf_UninterpretedOption_msginit, -}; - -static const upb_msglayout_field google_protobuf_FieldOptions__fields[7] = { - {1, UPB_SIZE(8, 8), 1, 0, 14, 1}, {2, UPB_SIZE(24, 24), 3, 0, 8, 1}, - {3, UPB_SIZE(25, 25), 4, 0, 8, 1}, {5, UPB_SIZE(26, 26), 5, 0, 8, 1}, - {6, UPB_SIZE(16, 16), 2, 0, 14, 1}, {10, UPB_SIZE(27, 27), 6, 0, 8, 1}, - {999, UPB_SIZE(28, 32), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_FieldOptions_msginit = { - &google_protobuf_FieldOptions_submsgs[0], - &google_protobuf_FieldOptions__fields[0], - UPB_SIZE(32, 40), - 7, - false, -}; - -static const upb_msglayout* const google_protobuf_OneofOptions_submsgs[1] = { - &google_protobuf_UninterpretedOption_msginit, -}; - -static const upb_msglayout_field google_protobuf_OneofOptions__fields[1] = { - {999, UPB_SIZE(0, 0), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_OneofOptions_msginit = { - &google_protobuf_OneofOptions_submsgs[0], - &google_protobuf_OneofOptions__fields[0], - UPB_SIZE(4, 8), - 1, - false, -}; - -static const upb_msglayout* const google_protobuf_EnumOptions_submsgs[1] = { - &google_protobuf_UninterpretedOption_msginit, -}; - -static const upb_msglayout_field google_protobuf_EnumOptions__fields[3] = { - {2, UPB_SIZE(1, 1), 1, 0, 8, 1}, - {3, UPB_SIZE(2, 2), 2, 0, 8, 1}, - {999, UPB_SIZE(4, 8), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_EnumOptions_msginit = { - &google_protobuf_EnumOptions_submsgs[0], - &google_protobuf_EnumOptions__fields[0], - UPB_SIZE(8, 16), - 3, - false, -}; - -static const upb_msglayout* const google_protobuf_EnumValueOptions_submsgs[1] = - { - &google_protobuf_UninterpretedOption_msginit, -}; - -static const upb_msglayout_field google_protobuf_EnumValueOptions__fields[2] = { - {1, UPB_SIZE(1, 1), 1, 0, 8, 1}, - {999, UPB_SIZE(4, 8), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_EnumValueOptions_msginit = { - &google_protobuf_EnumValueOptions_submsgs[0], - &google_protobuf_EnumValueOptions__fields[0], - UPB_SIZE(8, 16), - 2, - false, -}; - -static const upb_msglayout* const google_protobuf_ServiceOptions_submsgs[1] = { - &google_protobuf_UninterpretedOption_msginit, -}; - -static const upb_msglayout_field google_protobuf_ServiceOptions__fields[2] = { - {33, UPB_SIZE(1, 1), 1, 0, 8, 1}, - {999, UPB_SIZE(4, 8), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_ServiceOptions_msginit = { - &google_protobuf_ServiceOptions_submsgs[0], - &google_protobuf_ServiceOptions__fields[0], - UPB_SIZE(8, 16), - 2, - false, -}; - -static const upb_msglayout* const google_protobuf_MethodOptions_submsgs[1] = { - &google_protobuf_UninterpretedOption_msginit, -}; - -static const upb_msglayout_field google_protobuf_MethodOptions__fields[3] = { - {33, UPB_SIZE(16, 16), 2, 0, 8, 1}, - {34, UPB_SIZE(8, 8), 1, 0, 14, 1}, - {999, UPB_SIZE(20, 24), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_MethodOptions_msginit = { - &google_protobuf_MethodOptions_submsgs[0], - &google_protobuf_MethodOptions__fields[0], - UPB_SIZE(24, 32), - 3, - false, -}; - -static const upb_msglayout* const - google_protobuf_UninterpretedOption_submsgs[1] = { - &google_protobuf_UninterpretedOption_NamePart_msginit, -}; - -static const upb_msglayout_field - google_protobuf_UninterpretedOption__fields[7] = { - {2, UPB_SIZE(56, 80), 0, 0, 11, 3}, {3, UPB_SIZE(32, 32), 4, 0, 9, 1}, - {4, UPB_SIZE(8, 8), 1, 0, 4, 1}, {5, UPB_SIZE(16, 16), 2, 0, 3, 1}, - {6, UPB_SIZE(24, 24), 3, 0, 1, 1}, {7, UPB_SIZE(40, 48), 5, 0, 12, 1}, - {8, UPB_SIZE(48, 64), 6, 0, 9, 1}, -}; - -const upb_msglayout google_protobuf_UninterpretedOption_msginit = { - &google_protobuf_UninterpretedOption_submsgs[0], - &google_protobuf_UninterpretedOption__fields[0], - UPB_SIZE(64, 96), - 7, - false, -}; - -static const upb_msglayout_field - google_protobuf_UninterpretedOption_NamePart__fields[2] = { - {1, UPB_SIZE(8, 16), 2, 0, 9, 2}, - {2, UPB_SIZE(1, 1), 1, 0, 8, 2}, -}; - -const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit = { - NULL, - &google_protobuf_UninterpretedOption_NamePart__fields[0], - UPB_SIZE(16, 32), - 2, - false, -}; - -static const upb_msglayout* const google_protobuf_SourceCodeInfo_submsgs[1] = { - &google_protobuf_SourceCodeInfo_Location_msginit, -}; - -static const upb_msglayout_field google_protobuf_SourceCodeInfo__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_SourceCodeInfo_msginit = { - &google_protobuf_SourceCodeInfo_submsgs[0], - &google_protobuf_SourceCodeInfo__fields[0], - UPB_SIZE(4, 8), - 1, - false, -}; - -static const upb_msglayout_field - google_protobuf_SourceCodeInfo_Location__fields[5] = { - {1, UPB_SIZE(24, 48), 0, 0, 5, 3}, {2, UPB_SIZE(28, 56), 0, 0, 5, 3}, - {3, UPB_SIZE(8, 16), 1, 0, 9, 1}, {4, UPB_SIZE(16, 32), 2, 0, 9, 1}, - {6, UPB_SIZE(32, 64), 0, 0, 9, 3}, -}; - -const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit = { - NULL, - &google_protobuf_SourceCodeInfo_Location__fields[0], - UPB_SIZE(40, 80), - 5, - false, -}; - -static const upb_msglayout* const google_protobuf_GeneratedCodeInfo_submsgs[1] = - { - &google_protobuf_GeneratedCodeInfo_Annotation_msginit, -}; - -static const upb_msglayout_field google_protobuf_GeneratedCodeInfo__fields[1] = - { - {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit = { - &google_protobuf_GeneratedCodeInfo_submsgs[0], - &google_protobuf_GeneratedCodeInfo__fields[0], - UPB_SIZE(4, 8), - 1, - false, -}; - -static const upb_msglayout_field - google_protobuf_GeneratedCodeInfo_Annotation__fields[4] = { - {1, UPB_SIZE(24, 32), 0, 0, 5, 3}, - {2, UPB_SIZE(16, 16), 3, 0, 9, 1}, - {3, UPB_SIZE(4, 4), 1, 0, 5, 1}, - {4, UPB_SIZE(8, 8), 2, 0, 5, 1}, -}; - -const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit = { - NULL, - &google_protobuf_GeneratedCodeInfo_Annotation__fields[0], - UPB_SIZE(32, 48), - 4, - false, -}; - -#include "upb/port_undef.inc" diff --git a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h deleted file mode 100644 index 37f0139ce3..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +++ /dev/null @@ -1,1879 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/descriptor.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ -#define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ - -#include "upb/msg.h" - -#include "upb/decode.h" -#include "upb/encode.h" -#include "upb/port_def.inc" -UPB_BEGIN_EXTERN_C - -struct google_protobuf_FileDescriptorSet; -struct google_protobuf_FileDescriptorProto; -struct google_protobuf_DescriptorProto; -struct google_protobuf_DescriptorProto_ExtensionRange; -struct google_protobuf_DescriptorProto_ReservedRange; -struct google_protobuf_ExtensionRangeOptions; -struct google_protobuf_FieldDescriptorProto; -struct google_protobuf_OneofDescriptorProto; -struct google_protobuf_EnumDescriptorProto; -struct google_protobuf_EnumDescriptorProto_EnumReservedRange; -struct google_protobuf_EnumValueDescriptorProto; -struct google_protobuf_ServiceDescriptorProto; -struct google_protobuf_MethodDescriptorProto; -struct google_protobuf_FileOptions; -struct google_protobuf_MessageOptions; -struct google_protobuf_FieldOptions; -struct google_protobuf_OneofOptions; -struct google_protobuf_EnumOptions; -struct google_protobuf_EnumValueOptions; -struct google_protobuf_ServiceOptions; -struct google_protobuf_MethodOptions; -struct google_protobuf_UninterpretedOption; -struct google_protobuf_UninterpretedOption_NamePart; -struct google_protobuf_SourceCodeInfo; -struct google_protobuf_SourceCodeInfo_Location; -struct google_protobuf_GeneratedCodeInfo; -struct google_protobuf_GeneratedCodeInfo_Annotation; -typedef struct google_protobuf_FileDescriptorSet - google_protobuf_FileDescriptorSet; -typedef struct google_protobuf_FileDescriptorProto - google_protobuf_FileDescriptorProto; -typedef struct google_protobuf_DescriptorProto google_protobuf_DescriptorProto; -typedef struct google_protobuf_DescriptorProto_ExtensionRange - google_protobuf_DescriptorProto_ExtensionRange; -typedef struct google_protobuf_DescriptorProto_ReservedRange - google_protobuf_DescriptorProto_ReservedRange; -typedef struct google_protobuf_ExtensionRangeOptions - google_protobuf_ExtensionRangeOptions; -typedef struct google_protobuf_FieldDescriptorProto - google_protobuf_FieldDescriptorProto; -typedef struct google_protobuf_OneofDescriptorProto - google_protobuf_OneofDescriptorProto; -typedef struct google_protobuf_EnumDescriptorProto - google_protobuf_EnumDescriptorProto; -typedef struct google_protobuf_EnumDescriptorProto_EnumReservedRange - google_protobuf_EnumDescriptorProto_EnumReservedRange; -typedef struct google_protobuf_EnumValueDescriptorProto - google_protobuf_EnumValueDescriptorProto; -typedef struct google_protobuf_ServiceDescriptorProto - google_protobuf_ServiceDescriptorProto; -typedef struct google_protobuf_MethodDescriptorProto - google_protobuf_MethodDescriptorProto; -typedef struct google_protobuf_FileOptions google_protobuf_FileOptions; -typedef struct google_protobuf_MessageOptions google_protobuf_MessageOptions; -typedef struct google_protobuf_FieldOptions google_protobuf_FieldOptions; -typedef struct google_protobuf_OneofOptions google_protobuf_OneofOptions; -typedef struct google_protobuf_EnumOptions google_protobuf_EnumOptions; -typedef struct google_protobuf_EnumValueOptions - google_protobuf_EnumValueOptions; -typedef struct google_protobuf_ServiceOptions google_protobuf_ServiceOptions; -typedef struct google_protobuf_MethodOptions google_protobuf_MethodOptions; -typedef struct google_protobuf_UninterpretedOption - google_protobuf_UninterpretedOption; -typedef struct google_protobuf_UninterpretedOption_NamePart - google_protobuf_UninterpretedOption_NamePart; -typedef struct google_protobuf_SourceCodeInfo google_protobuf_SourceCodeInfo; -typedef struct google_protobuf_SourceCodeInfo_Location - google_protobuf_SourceCodeInfo_Location; -typedef struct google_protobuf_GeneratedCodeInfo - google_protobuf_GeneratedCodeInfo; -typedef struct google_protobuf_GeneratedCodeInfo_Annotation - google_protobuf_GeneratedCodeInfo_Annotation; - -/* Enums */ - -typedef enum { - google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL = 1, - google_protobuf_FieldDescriptorProto_LABEL_REQUIRED = 2, - google_protobuf_FieldDescriptorProto_LABEL_REPEATED = 3 -} google_protobuf_FieldDescriptorProto_Label; - -typedef enum { - google_protobuf_FieldDescriptorProto_TYPE_DOUBLE = 1, - google_protobuf_FieldDescriptorProto_TYPE_FLOAT = 2, - google_protobuf_FieldDescriptorProto_TYPE_INT64 = 3, - google_protobuf_FieldDescriptorProto_TYPE_UINT64 = 4, - google_protobuf_FieldDescriptorProto_TYPE_INT32 = 5, - google_protobuf_FieldDescriptorProto_TYPE_FIXED64 = 6, - google_protobuf_FieldDescriptorProto_TYPE_FIXED32 = 7, - google_protobuf_FieldDescriptorProto_TYPE_BOOL = 8, - google_protobuf_FieldDescriptorProto_TYPE_STRING = 9, - google_protobuf_FieldDescriptorProto_TYPE_GROUP = 10, - google_protobuf_FieldDescriptorProto_TYPE_MESSAGE = 11, - google_protobuf_FieldDescriptorProto_TYPE_BYTES = 12, - google_protobuf_FieldDescriptorProto_TYPE_UINT32 = 13, - google_protobuf_FieldDescriptorProto_TYPE_ENUM = 14, - google_protobuf_FieldDescriptorProto_TYPE_SFIXED32 = 15, - google_protobuf_FieldDescriptorProto_TYPE_SFIXED64 = 16, - google_protobuf_FieldDescriptorProto_TYPE_SINT32 = 17, - google_protobuf_FieldDescriptorProto_TYPE_SINT64 = 18 -} google_protobuf_FieldDescriptorProto_Type; - -typedef enum { - google_protobuf_FieldOptions_STRING = 0, - google_protobuf_FieldOptions_CORD = 1, - google_protobuf_FieldOptions_STRING_PIECE = 2 -} google_protobuf_FieldOptions_CType; - -typedef enum { - google_protobuf_FieldOptions_JS_NORMAL = 0, - google_protobuf_FieldOptions_JS_STRING = 1, - google_protobuf_FieldOptions_JS_NUMBER = 2 -} google_protobuf_FieldOptions_JSType; - -typedef enum { - google_protobuf_FileOptions_SPEED = 1, - google_protobuf_FileOptions_CODE_SIZE = 2, - google_protobuf_FileOptions_LITE_RUNTIME = 3 -} google_protobuf_FileOptions_OptimizeMode; - -typedef enum { - google_protobuf_MethodOptions_IDEMPOTENCY_UNKNOWN = 0, - google_protobuf_MethodOptions_NO_SIDE_EFFECTS = 1, - google_protobuf_MethodOptions_IDEMPOTENT = 2 -} google_protobuf_MethodOptions_IdempotencyLevel; - -/* google.protobuf.FileDescriptorSet */ - -extern const upb_msglayout google_protobuf_FileDescriptorSet_msginit; -UPB_INLINE google_protobuf_FileDescriptorSet* -google_protobuf_FileDescriptorSet_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_FileDescriptorSet_msginit, arena); -} -UPB_INLINE google_protobuf_FileDescriptorSet* -google_protobuf_FileDescriptorSet_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_FileDescriptorSet* ret = - google_protobuf_FileDescriptorSet_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_FileDescriptorSet_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_FileDescriptorSet_serialize( - const google_protobuf_FileDescriptorSet* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, - len); -} - -UPB_INLINE const upb_array* google_protobuf_FileDescriptorSet_file( - const google_protobuf_FileDescriptorSet* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_FileDescriptorSet_set_file( - google_protobuf_FileDescriptorSet* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.FileDescriptorProto */ - -extern const upb_msglayout google_protobuf_FileDescriptorProto_msginit; -UPB_INLINE google_protobuf_FileDescriptorProto* -google_protobuf_FileDescriptorProto_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena); -} -UPB_INLINE google_protobuf_FileDescriptorProto* -google_protobuf_FileDescriptorProto_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_FileDescriptorProto* ret = - google_protobuf_FileDescriptorProto_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_FileDescriptorProto_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_FileDescriptorProto_serialize( - const google_protobuf_FileDescriptorProto* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, - len); -} - -UPB_INLINE upb_stringview google_protobuf_FileDescriptorProto_name( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); -} -UPB_INLINE upb_stringview google_protobuf_FileDescriptorProto_package( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)); -} -UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_dependency( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(40, 80)); -} -UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_message_type( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(44, 88)); -} -UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_enum_type( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(48, 96)); -} -UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_service( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(52, 104)); -} -UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_extension( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(56, 112)); -} -UPB_INLINE const google_protobuf_FileOptions* -google_protobuf_FileDescriptorProto_options( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const google_protobuf_FileOptions*, - UPB_SIZE(32, 64)); -} -UPB_INLINE const google_protobuf_SourceCodeInfo* -google_protobuf_FileDescriptorProto_source_code_info( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const google_protobuf_SourceCodeInfo*, - UPB_SIZE(36, 72)); -} -UPB_INLINE const upb_array* -google_protobuf_FileDescriptorProto_public_dependency( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(60, 120)); -} -UPB_INLINE const upb_array* google_protobuf_FileDescriptorProto_weak_dependency( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(64, 128)); -} -UPB_INLINE upb_stringview google_protobuf_FileDescriptorProto_syntax( - const google_protobuf_FileDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(24, 48)); -} - -UPB_INLINE void google_protobuf_FileDescriptorProto_set_name( - google_protobuf_FileDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_package( - google_protobuf_FileDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)) = value; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_dependency( - google_protobuf_FileDescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(40, 80)) = value; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_message_type( - google_protobuf_FileDescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(44, 88)) = value; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_enum_type( - google_protobuf_FileDescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(48, 96)) = value; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_service( - google_protobuf_FileDescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(52, 104)) = value; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_extension( - google_protobuf_FileDescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(56, 112)) = value; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_options( - google_protobuf_FileDescriptorProto* msg, - google_protobuf_FileOptions* value) { - UPB_FIELD_AT(msg, google_protobuf_FileOptions*, UPB_SIZE(32, 64)) = value; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info( - google_protobuf_FileDescriptorProto* msg, - google_protobuf_SourceCodeInfo* value) { - UPB_FIELD_AT(msg, google_protobuf_SourceCodeInfo*, UPB_SIZE(36, 72)) = value; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_public_dependency( - google_protobuf_FileDescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(60, 120)) = value; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_weak_dependency( - google_protobuf_FileDescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(64, 128)) = value; -} -UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax( - google_protobuf_FileDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(24, 48)) = value; -} - -/* google.protobuf.DescriptorProto */ - -extern const upb_msglayout google_protobuf_DescriptorProto_msginit; -UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); -} -UPB_INLINE google_protobuf_DescriptorProto* -google_protobuf_DescriptorProto_parsenew(upb_stringview buf, upb_arena* arena) { - google_protobuf_DescriptorProto* ret = - google_protobuf_DescriptorProto_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_DescriptorProto_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_DescriptorProto_serialize( - const google_protobuf_DescriptorProto* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len); -} - -UPB_INLINE upb_stringview google_protobuf_DescriptorProto_name( - const google_protobuf_DescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); -} -UPB_INLINE const upb_array* google_protobuf_DescriptorProto_field( - const google_protobuf_DescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(20, 40)); -} -UPB_INLINE const upb_array* google_protobuf_DescriptorProto_nested_type( - const google_protobuf_DescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(24, 48)); -} -UPB_INLINE const upb_array* google_protobuf_DescriptorProto_enum_type( - const google_protobuf_DescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(28, 56)); -} -UPB_INLINE const upb_array* google_protobuf_DescriptorProto_extension_range( - const google_protobuf_DescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(32, 64)); -} -UPB_INLINE const upb_array* google_protobuf_DescriptorProto_extension( - const google_protobuf_DescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(36, 72)); -} -UPB_INLINE const google_protobuf_MessageOptions* -google_protobuf_DescriptorProto_options( - const google_protobuf_DescriptorProto* msg) { - return UPB_FIELD_AT(msg, const google_protobuf_MessageOptions*, - UPB_SIZE(16, 32)); -} -UPB_INLINE const upb_array* google_protobuf_DescriptorProto_oneof_decl( - const google_protobuf_DescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(40, 80)); -} -UPB_INLINE const upb_array* google_protobuf_DescriptorProto_reserved_range( - const google_protobuf_DescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(44, 88)); -} -UPB_INLINE const upb_array* google_protobuf_DescriptorProto_reserved_name( - const google_protobuf_DescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(48, 96)); -} - -UPB_INLINE void google_protobuf_DescriptorProto_set_name( - google_protobuf_DescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_set_field( - google_protobuf_DescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(20, 40)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_set_nested_type( - google_protobuf_DescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(24, 48)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_set_enum_type( - google_protobuf_DescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(28, 56)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_set_extension_range( - google_protobuf_DescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(32, 64)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_set_extension( - google_protobuf_DescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(36, 72)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_set_options( - google_protobuf_DescriptorProto* msg, - google_protobuf_MessageOptions* value) { - UPB_FIELD_AT(msg, google_protobuf_MessageOptions*, UPB_SIZE(16, 32)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_set_oneof_decl( - google_protobuf_DescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(40, 80)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_set_reserved_range( - google_protobuf_DescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(44, 88)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_set_reserved_name( - google_protobuf_DescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(48, 96)) = value; -} - -/* google.protobuf.DescriptorProto.ExtensionRange */ - -extern const upb_msglayout - google_protobuf_DescriptorProto_ExtensionRange_msginit; -UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* -google_protobuf_DescriptorProto_ExtensionRange_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, - arena); -} -UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* -google_protobuf_DescriptorProto_ExtensionRange_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_DescriptorProto_ExtensionRange* ret = - google_protobuf_DescriptorProto_ExtensionRange_new(arena); - return (ret && - upb_decode(buf, ret, - &google_protobuf_DescriptorProto_ExtensionRange_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_DescriptorProto_ExtensionRange_serialize( - const google_protobuf_DescriptorProto_ExtensionRange* msg, upb_arena* arena, - size_t* len) { - return upb_encode( - msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len); -} - -UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start( - const google_protobuf_DescriptorProto_ExtensionRange* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); -} -UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end( - const google_protobuf_DescriptorProto_ExtensionRange* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); -} -UPB_INLINE const google_protobuf_ExtensionRangeOptions* -google_protobuf_DescriptorProto_ExtensionRange_options( - const google_protobuf_DescriptorProto_ExtensionRange* msg) { - return UPB_FIELD_AT(msg, const google_protobuf_ExtensionRangeOptions*, - UPB_SIZE(12, 16)); -} - -UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start( - google_protobuf_DescriptorProto_ExtensionRange* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end( - google_protobuf_DescriptorProto_ExtensionRange* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options( - google_protobuf_DescriptorProto_ExtensionRange* msg, - google_protobuf_ExtensionRangeOptions* value) { - UPB_FIELD_AT(msg, google_protobuf_ExtensionRangeOptions*, UPB_SIZE(12, 16)) = - value; -} - -/* google.protobuf.DescriptorProto.ReservedRange */ - -extern const upb_msglayout - google_protobuf_DescriptorProto_ReservedRange_msginit; -UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* -google_protobuf_DescriptorProto_ReservedRange_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, - arena); -} -UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* -google_protobuf_DescriptorProto_ReservedRange_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_DescriptorProto_ReservedRange* ret = - google_protobuf_DescriptorProto_ReservedRange_new(arena); - return (ret && - upb_decode(buf, ret, - &google_protobuf_DescriptorProto_ReservedRange_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_DescriptorProto_ReservedRange_serialize( - const google_protobuf_DescriptorProto_ReservedRange* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, - arena, len); -} - -UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start( - const google_protobuf_DescriptorProto_ReservedRange* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); -} -UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end( - const google_protobuf_DescriptorProto_ReservedRange* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); -} - -UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start( - google_protobuf_DescriptorProto_ReservedRange* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; -} -UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end( - google_protobuf_DescriptorProto_ReservedRange* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; -} - -/* google.protobuf.ExtensionRangeOptions */ - -extern const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit; -UPB_INLINE google_protobuf_ExtensionRangeOptions* -google_protobuf_ExtensionRangeOptions_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena); -} -UPB_INLINE google_protobuf_ExtensionRangeOptions* -google_protobuf_ExtensionRangeOptions_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_ExtensionRangeOptions* ret = - google_protobuf_ExtensionRangeOptions_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_ExtensionRangeOptions_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_ExtensionRangeOptions_serialize( - const google_protobuf_ExtensionRangeOptions* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, - len); -} - -UPB_INLINE const upb_array* -google_protobuf_ExtensionRangeOptions_uninterpreted_option( - const google_protobuf_ExtensionRangeOptions* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_ExtensionRangeOptions_set_uninterpreted_option( - google_protobuf_ExtensionRangeOptions* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.FieldDescriptorProto */ - -extern const upb_msglayout google_protobuf_FieldDescriptorProto_msginit; -UPB_INLINE google_protobuf_FieldDescriptorProto* -google_protobuf_FieldDescriptorProto_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); -} -UPB_INLINE google_protobuf_FieldDescriptorProto* -google_protobuf_FieldDescriptorProto_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_FieldDescriptorProto* ret = - google_protobuf_FieldDescriptorProto_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_FieldDescriptorProto_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_FieldDescriptorProto_serialize( - const google_protobuf_FieldDescriptorProto* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, - len); -} - -UPB_INLINE upb_stringview google_protobuf_FieldDescriptorProto_name( - const google_protobuf_FieldDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)); -} -UPB_INLINE upb_stringview google_protobuf_FieldDescriptorProto_extendee( - const google_protobuf_FieldDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)); -} -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number( - const google_protobuf_FieldDescriptorProto* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)); -} -UPB_INLINE google_protobuf_FieldDescriptorProto_Label -google_protobuf_FieldDescriptorProto_label( - const google_protobuf_FieldDescriptorProto* msg) { - return UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Label, - UPB_SIZE(8, 8)); -} -UPB_INLINE google_protobuf_FieldDescriptorProto_Type -google_protobuf_FieldDescriptorProto_type( - const google_protobuf_FieldDescriptorProto* msg) { - return UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Type, - UPB_SIZE(16, 16)); -} -UPB_INLINE upb_stringview google_protobuf_FieldDescriptorProto_type_name( - const google_protobuf_FieldDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)); -} -UPB_INLINE upb_stringview google_protobuf_FieldDescriptorProto_default_value( - const google_protobuf_FieldDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(56, 80)); -} -UPB_INLINE const google_protobuf_FieldOptions* -google_protobuf_FieldDescriptorProto_options( - const google_protobuf_FieldDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const google_protobuf_FieldOptions*, - UPB_SIZE(72, 112)); -} -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index( - const google_protobuf_FieldDescriptorProto* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)); -} -UPB_INLINE upb_stringview google_protobuf_FieldDescriptorProto_json_name( - const google_protobuf_FieldDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(64, 96)); -} - -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name( - google_protobuf_FieldDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)) = value; -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee( - google_protobuf_FieldDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)) = value; -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number( - google_protobuf_FieldDescriptorProto* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)) = value; -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label( - google_protobuf_FieldDescriptorProto* msg, - google_protobuf_FieldDescriptorProto_Label value) { - UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Label, - UPB_SIZE(8, 8)) = value; -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type( - google_protobuf_FieldDescriptorProto* msg, - google_protobuf_FieldDescriptorProto_Type value) { - UPB_FIELD_AT(msg, google_protobuf_FieldDescriptorProto_Type, - UPB_SIZE(16, 16)) = value; -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name( - google_protobuf_FieldDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)) = value; -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value( - google_protobuf_FieldDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(56, 80)) = value; -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options( - google_protobuf_FieldDescriptorProto* msg, - google_protobuf_FieldOptions* value) { - UPB_FIELD_AT(msg, google_protobuf_FieldOptions*, UPB_SIZE(72, 112)) = value; -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index( - google_protobuf_FieldDescriptorProto* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)) = value; -} -UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name( - google_protobuf_FieldDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(64, 96)) = value; -} - -/* google.protobuf.OneofDescriptorProto */ - -extern const upb_msglayout google_protobuf_OneofDescriptorProto_msginit; -UPB_INLINE google_protobuf_OneofDescriptorProto* -google_protobuf_OneofDescriptorProto_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena); -} -UPB_INLINE google_protobuf_OneofDescriptorProto* -google_protobuf_OneofDescriptorProto_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_OneofDescriptorProto* ret = - google_protobuf_OneofDescriptorProto_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_OneofDescriptorProto_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_OneofDescriptorProto_serialize( - const google_protobuf_OneofDescriptorProto* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, - len); -} - -UPB_INLINE upb_stringview google_protobuf_OneofDescriptorProto_name( - const google_protobuf_OneofDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); -} -UPB_INLINE const google_protobuf_OneofOptions* -google_protobuf_OneofDescriptorProto_options( - const google_protobuf_OneofDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const google_protobuf_OneofOptions*, - UPB_SIZE(16, 32)); -} - -UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name( - google_protobuf_OneofDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options( - google_protobuf_OneofDescriptorProto* msg, - google_protobuf_OneofOptions* value) { - UPB_FIELD_AT(msg, google_protobuf_OneofOptions*, UPB_SIZE(16, 32)) = value; -} - -/* google.protobuf.EnumDescriptorProto */ - -extern const upb_msglayout google_protobuf_EnumDescriptorProto_msginit; -UPB_INLINE google_protobuf_EnumDescriptorProto* -google_protobuf_EnumDescriptorProto_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); -} -UPB_INLINE google_protobuf_EnumDescriptorProto* -google_protobuf_EnumDescriptorProto_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_EnumDescriptorProto* ret = - google_protobuf_EnumDescriptorProto_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_EnumDescriptorProto_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_EnumDescriptorProto_serialize( - const google_protobuf_EnumDescriptorProto* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, - len); -} - -UPB_INLINE upb_stringview google_protobuf_EnumDescriptorProto_name( - const google_protobuf_EnumDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); -} -UPB_INLINE const upb_array* google_protobuf_EnumDescriptorProto_value( - const google_protobuf_EnumDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(20, 40)); -} -UPB_INLINE const google_protobuf_EnumOptions* -google_protobuf_EnumDescriptorProto_options( - const google_protobuf_EnumDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const google_protobuf_EnumOptions*, - UPB_SIZE(16, 32)); -} -UPB_INLINE const upb_array* google_protobuf_EnumDescriptorProto_reserved_range( - const google_protobuf_EnumDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(24, 48)); -} -UPB_INLINE const upb_array* google_protobuf_EnumDescriptorProto_reserved_name( - const google_protobuf_EnumDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(28, 56)); -} - -UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name( - google_protobuf_EnumDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_set_value( - google_protobuf_EnumDescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(20, 40)) = value; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options( - google_protobuf_EnumDescriptorProto* msg, - google_protobuf_EnumOptions* value) { - UPB_FIELD_AT(msg, google_protobuf_EnumOptions*, UPB_SIZE(16, 32)) = value; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_set_reserved_range( - google_protobuf_EnumDescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(24, 48)) = value; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_set_reserved_name( - google_protobuf_EnumDescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(28, 56)) = value; -} - -/* google.protobuf.EnumDescriptorProto.EnumReservedRange */ - -extern const upb_msglayout - google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit; -UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* -google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_arena* arena) { - return upb_msg_new( - &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); -} -UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* -google_protobuf_EnumDescriptorProto_EnumReservedRange_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = - google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena); - return (ret && - upb_decode( - buf, ret, - &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* -google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize( - const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg, - upb_arena* arena, size_t* len) { - return upb_encode( - msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, - arena, len); -} - -UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start( - const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); -} -UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end( - const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); -} - -UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start( - google_protobuf_EnumDescriptorProto_EnumReservedRange* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; -} -UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end( - google_protobuf_EnumDescriptorProto_EnumReservedRange* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; -} - -/* google.protobuf.EnumValueDescriptorProto */ - -extern const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit; -UPB_INLINE google_protobuf_EnumValueDescriptorProto* -google_protobuf_EnumValueDescriptorProto_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena); -} -UPB_INLINE google_protobuf_EnumValueDescriptorProto* -google_protobuf_EnumValueDescriptorProto_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_EnumValueDescriptorProto* ret = - google_protobuf_EnumValueDescriptorProto_new(arena); - return (ret && upb_decode(buf, ret, - &google_protobuf_EnumValueDescriptorProto_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_EnumValueDescriptorProto_serialize( - const google_protobuf_EnumValueDescriptorProto* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, - arena, len); -} - -UPB_INLINE upb_stringview google_protobuf_EnumValueDescriptorProto_name( - const google_protobuf_EnumValueDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); -} -UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number( - const google_protobuf_EnumValueDescriptorProto* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); -} -UPB_INLINE const google_protobuf_EnumValueOptions* -google_protobuf_EnumValueDescriptorProto_options( - const google_protobuf_EnumValueDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const google_protobuf_EnumValueOptions*, - UPB_SIZE(16, 32)); -} - -UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name( - google_protobuf_EnumValueDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number( - google_protobuf_EnumValueDescriptorProto* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; -} -UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options( - google_protobuf_EnumValueDescriptorProto* msg, - google_protobuf_EnumValueOptions* value) { - UPB_FIELD_AT(msg, google_protobuf_EnumValueOptions*, UPB_SIZE(16, 32)) = - value; -} - -/* google.protobuf.ServiceDescriptorProto */ - -extern const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit; -UPB_INLINE google_protobuf_ServiceDescriptorProto* -google_protobuf_ServiceDescriptorProto_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena); -} -UPB_INLINE google_protobuf_ServiceDescriptorProto* -google_protobuf_ServiceDescriptorProto_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_ServiceDescriptorProto* ret = - google_protobuf_ServiceDescriptorProto_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_ServiceDescriptorProto_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_ServiceDescriptorProto_serialize( - const google_protobuf_ServiceDescriptorProto* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, - len); -} - -UPB_INLINE upb_stringview google_protobuf_ServiceDescriptorProto_name( - const google_protobuf_ServiceDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); -} -UPB_INLINE const upb_array* google_protobuf_ServiceDescriptorProto_method( - const google_protobuf_ServiceDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(20, 40)); -} -UPB_INLINE const google_protobuf_ServiceOptions* -google_protobuf_ServiceDescriptorProto_options( - const google_protobuf_ServiceDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const google_protobuf_ServiceOptions*, - UPB_SIZE(16, 32)); -} - -UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name( - google_protobuf_ServiceDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_method( - google_protobuf_ServiceDescriptorProto* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(20, 40)) = value; -} -UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options( - google_protobuf_ServiceDescriptorProto* msg, - google_protobuf_ServiceOptions* value) { - UPB_FIELD_AT(msg, google_protobuf_ServiceOptions*, UPB_SIZE(16, 32)) = value; -} - -/* google.protobuf.MethodDescriptorProto */ - -extern const upb_msglayout google_protobuf_MethodDescriptorProto_msginit; -UPB_INLINE google_protobuf_MethodDescriptorProto* -google_protobuf_MethodDescriptorProto_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena); -} -UPB_INLINE google_protobuf_MethodDescriptorProto* -google_protobuf_MethodDescriptorProto_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_MethodDescriptorProto* ret = - google_protobuf_MethodDescriptorProto_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_MethodDescriptorProto_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_MethodDescriptorProto_serialize( - const google_protobuf_MethodDescriptorProto* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, - len); -} - -UPB_INLINE upb_stringview google_protobuf_MethodDescriptorProto_name( - const google_protobuf_MethodDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); -} -UPB_INLINE upb_stringview google_protobuf_MethodDescriptorProto_input_type( - const google_protobuf_MethodDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)); -} -UPB_INLINE upb_stringview google_protobuf_MethodDescriptorProto_output_type( - const google_protobuf_MethodDescriptorProto* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(24, 48)); -} -UPB_INLINE const google_protobuf_MethodOptions* -google_protobuf_MethodDescriptorProto_options( - const google_protobuf_MethodDescriptorProto* msg) { - return UPB_FIELD_AT(msg, const google_protobuf_MethodOptions*, - UPB_SIZE(32, 64)); -} -UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming( - const google_protobuf_MethodDescriptorProto* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); -} -UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming( - const google_protobuf_MethodDescriptorProto* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); -} - -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name( - google_protobuf_MethodDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type( - google_protobuf_MethodDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)) = value; -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type( - google_protobuf_MethodDescriptorProto* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(24, 48)) = value; -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options( - google_protobuf_MethodDescriptorProto* msg, - google_protobuf_MethodOptions* value) { - UPB_FIELD_AT(msg, google_protobuf_MethodOptions*, UPB_SIZE(32, 64)) = value; -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming( - google_protobuf_MethodDescriptorProto* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; -} -UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming( - google_protobuf_MethodDescriptorProto* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; -} - -/* google.protobuf.FileOptions */ - -extern const upb_msglayout google_protobuf_FileOptions_msginit; -UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_FileOptions_msginit, arena); -} -UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_FileOptions_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_FileOptions_serialize( - const google_protobuf_FileOptions* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len); -} - -UPB_INLINE upb_stringview google_protobuf_FileOptions_java_package( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)); -} -UPB_INLINE upb_stringview google_protobuf_FileOptions_java_outer_classname( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)); -} -UPB_INLINE google_protobuf_FileOptions_OptimizeMode -google_protobuf_FileOptions_optimize_for( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, google_protobuf_FileOptions_OptimizeMode, - UPB_SIZE(8, 8)); -} -UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); -} -UPB_INLINE upb_stringview -google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)); -} -UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)); -} -UPB_INLINE bool google_protobuf_FileOptions_java_generic_services( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(18, 18)); -} -UPB_INLINE bool google_protobuf_FileOptions_py_generic_services( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(19, 19)); -} -UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(20, 20)); -} -UPB_INLINE bool google_protobuf_FileOptions_deprecated( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(21, 21)); -} -UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(22, 22)); -} -UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(23, 23)); -} -UPB_INLINE upb_stringview google_protobuf_FileOptions_objc_class_prefix( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(56, 80)); -} -UPB_INLINE upb_stringview google_protobuf_FileOptions_csharp_namespace( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(64, 96)); -} -UPB_INLINE upb_stringview google_protobuf_FileOptions_swift_prefix( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(72, 112)); -} -UPB_INLINE upb_stringview google_protobuf_FileOptions_php_class_prefix( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(80, 128)); -} -UPB_INLINE upb_stringview google_protobuf_FileOptions_php_namespace( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(88, 144)); -} -UPB_INLINE bool google_protobuf_FileOptions_php_generic_services( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); -} -UPB_INLINE upb_stringview google_protobuf_FileOptions_php_metadata_namespace( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(96, 160)); -} -UPB_INLINE upb_stringview google_protobuf_FileOptions_ruby_package( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(104, 176)); -} -UPB_INLINE const upb_array* google_protobuf_FileOptions_uninterpreted_option( - const google_protobuf_FileOptions* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(112, 192)); -} - -UPB_INLINE void google_protobuf_FileOptions_set_java_package( - google_protobuf_FileOptions* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname( - google_protobuf_FileOptions* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_optimize_for( - google_protobuf_FileOptions* msg, - google_protobuf_FileOptions_OptimizeMode value) { - UPB_FIELD_AT(msg, google_protobuf_FileOptions_OptimizeMode, UPB_SIZE(8, 8)) = - value; -} -UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files( - google_protobuf_FileOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_go_package( - google_protobuf_FileOptions* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services( - google_protobuf_FileOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services( - google_protobuf_FileOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(18, 18)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services( - google_protobuf_FileOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(19, 19)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash( - google_protobuf_FileOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(20, 20)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_deprecated( - google_protobuf_FileOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(21, 21)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8( - google_protobuf_FileOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(22, 22)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas( - google_protobuf_FileOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(23, 23)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix( - google_protobuf_FileOptions* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(56, 80)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace( - google_protobuf_FileOptions* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(64, 96)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix( - google_protobuf_FileOptions* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(72, 112)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix( - google_protobuf_FileOptions* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(80, 128)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_php_namespace( - google_protobuf_FileOptions* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(88, 144)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services( - google_protobuf_FileOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace( - google_protobuf_FileOptions* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(96, 160)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_ruby_package( - google_protobuf_FileOptions* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(104, 176)) = value; -} -UPB_INLINE void google_protobuf_FileOptions_set_uninterpreted_option( - google_protobuf_FileOptions* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(112, 192)) = value; -} - -/* google.protobuf.MessageOptions */ - -extern const upb_msglayout google_protobuf_MessageOptions_msginit; -UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_MessageOptions_msginit, arena); -} -UPB_INLINE google_protobuf_MessageOptions* -google_protobuf_MessageOptions_parsenew(upb_stringview buf, upb_arena* arena) { - google_protobuf_MessageOptions* ret = - google_protobuf_MessageOptions_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_MessageOptions_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_MessageOptions_serialize( - const google_protobuf_MessageOptions* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len); -} - -UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format( - const google_protobuf_MessageOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); -} -UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor( - const google_protobuf_MessageOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); -} -UPB_INLINE bool google_protobuf_MessageOptions_deprecated( - const google_protobuf_MessageOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)); -} -UPB_INLINE bool google_protobuf_MessageOptions_map_entry( - const google_protobuf_MessageOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)); -} -UPB_INLINE const upb_array* google_protobuf_MessageOptions_uninterpreted_option( - const google_protobuf_MessageOptions* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(8, 8)); -} - -UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format( - google_protobuf_MessageOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; -} -UPB_INLINE void -google_protobuf_MessageOptions_set_no_standard_descriptor_accessor( - google_protobuf_MessageOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; -} -UPB_INLINE void google_protobuf_MessageOptions_set_deprecated( - google_protobuf_MessageOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)) = value; -} -UPB_INLINE void google_protobuf_MessageOptions_set_map_entry( - google_protobuf_MessageOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value; -} -UPB_INLINE void google_protobuf_MessageOptions_set_uninterpreted_option( - google_protobuf_MessageOptions* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(8, 8)) = value; -} - -/* google.protobuf.FieldOptions */ - -extern const upb_msglayout google_protobuf_FieldOptions_msginit; -UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_FieldOptions_msginit, arena); -} -UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_FieldOptions_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_FieldOptions_serialize( - const google_protobuf_FieldOptions* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len); -} - -UPB_INLINE google_protobuf_FieldOptions_CType -google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions* msg) { - return UPB_FIELD_AT(msg, google_protobuf_FieldOptions_CType, UPB_SIZE(8, 8)); -} -UPB_INLINE bool google_protobuf_FieldOptions_packed( - const google_protobuf_FieldOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); -} -UPB_INLINE bool google_protobuf_FieldOptions_deprecated( - const google_protobuf_FieldOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)); -} -UPB_INLINE bool google_protobuf_FieldOptions_lazy( - const google_protobuf_FieldOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)); -} -UPB_INLINE google_protobuf_FieldOptions_JSType -google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions* msg) { - return UPB_FIELD_AT(msg, google_protobuf_FieldOptions_JSType, - UPB_SIZE(16, 16)); -} -UPB_INLINE bool google_protobuf_FieldOptions_weak( - const google_protobuf_FieldOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)); -} -UPB_INLINE const upb_array* google_protobuf_FieldOptions_uninterpreted_option( - const google_protobuf_FieldOptions* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(28, 32)); -} - -UPB_INLINE void google_protobuf_FieldOptions_set_ctype( - google_protobuf_FieldOptions* msg, - google_protobuf_FieldOptions_CType value) { - UPB_FIELD_AT(msg, google_protobuf_FieldOptions_CType, UPB_SIZE(8, 8)) = value; -} -UPB_INLINE void google_protobuf_FieldOptions_set_packed( - google_protobuf_FieldOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; -} -UPB_INLINE void google_protobuf_FieldOptions_set_deprecated( - google_protobuf_FieldOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)) = value; -} -UPB_INLINE void google_protobuf_FieldOptions_set_lazy( - google_protobuf_FieldOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)) = value; -} -UPB_INLINE void google_protobuf_FieldOptions_set_jstype( - google_protobuf_FieldOptions* msg, - google_protobuf_FieldOptions_JSType value) { - UPB_FIELD_AT(msg, google_protobuf_FieldOptions_JSType, UPB_SIZE(16, 16)) = - value; -} -UPB_INLINE void google_protobuf_FieldOptions_set_weak( - google_protobuf_FieldOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)) = value; -} -UPB_INLINE void google_protobuf_FieldOptions_set_uninterpreted_option( - google_protobuf_FieldOptions* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(28, 32)) = value; -} - -/* google.protobuf.OneofOptions */ - -extern const upb_msglayout google_protobuf_OneofOptions_msginit; -UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_OneofOptions_msginit, arena); -} -UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_OneofOptions_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_OneofOptions_serialize( - const google_protobuf_OneofOptions* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len); -} - -UPB_INLINE const upb_array* google_protobuf_OneofOptions_uninterpreted_option( - const google_protobuf_OneofOptions* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_OneofOptions_set_uninterpreted_option( - google_protobuf_OneofOptions* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.EnumOptions */ - -extern const upb_msglayout google_protobuf_EnumOptions_msginit; -UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_EnumOptions_msginit, arena); -} -UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_EnumOptions_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_EnumOptions_serialize( - const google_protobuf_EnumOptions* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len); -} - -UPB_INLINE bool google_protobuf_EnumOptions_allow_alias( - const google_protobuf_EnumOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); -} -UPB_INLINE bool google_protobuf_EnumOptions_deprecated( - const google_protobuf_EnumOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); -} -UPB_INLINE const upb_array* google_protobuf_EnumOptions_uninterpreted_option( - const google_protobuf_EnumOptions* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(4, 8)); -} - -UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias( - google_protobuf_EnumOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; -} -UPB_INLINE void google_protobuf_EnumOptions_set_deprecated( - google_protobuf_EnumOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; -} -UPB_INLINE void google_protobuf_EnumOptions_set_uninterpreted_option( - google_protobuf_EnumOptions* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(4, 8)) = value; -} - -/* google.protobuf.EnumValueOptions */ - -extern const upb_msglayout google_protobuf_EnumValueOptions_msginit; -UPB_INLINE google_protobuf_EnumValueOptions* -google_protobuf_EnumValueOptions_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena); -} -UPB_INLINE google_protobuf_EnumValueOptions* -google_protobuf_EnumValueOptions_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_EnumValueOptions* ret = - google_protobuf_EnumValueOptions_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_EnumValueOptions_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_EnumValueOptions_serialize( - const google_protobuf_EnumValueOptions* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len); -} - -UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated( - const google_protobuf_EnumValueOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); -} -UPB_INLINE const upb_array* -google_protobuf_EnumValueOptions_uninterpreted_option( - const google_protobuf_EnumValueOptions* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(4, 8)); -} - -UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated( - google_protobuf_EnumValueOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; -} -UPB_INLINE void google_protobuf_EnumValueOptions_set_uninterpreted_option( - google_protobuf_EnumValueOptions* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(4, 8)) = value; -} - -/* google.protobuf.ServiceOptions */ - -extern const upb_msglayout google_protobuf_ServiceOptions_msginit; -UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena); -} -UPB_INLINE google_protobuf_ServiceOptions* -google_protobuf_ServiceOptions_parsenew(upb_stringview buf, upb_arena* arena) { - google_protobuf_ServiceOptions* ret = - google_protobuf_ServiceOptions_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_ServiceOptions_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_ServiceOptions_serialize( - const google_protobuf_ServiceOptions* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len); -} - -UPB_INLINE bool google_protobuf_ServiceOptions_deprecated( - const google_protobuf_ServiceOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); -} -UPB_INLINE const upb_array* google_protobuf_ServiceOptions_uninterpreted_option( - const google_protobuf_ServiceOptions* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(4, 8)); -} - -UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated( - google_protobuf_ServiceOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; -} -UPB_INLINE void google_protobuf_ServiceOptions_set_uninterpreted_option( - google_protobuf_ServiceOptions* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(4, 8)) = value; -} - -/* google.protobuf.MethodOptions */ - -extern const upb_msglayout google_protobuf_MethodOptions_msginit; -UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_MethodOptions_msginit, arena); -} -UPB_INLINE google_protobuf_MethodOptions* -google_protobuf_MethodOptions_parsenew(upb_stringview buf, upb_arena* arena) { - google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_MethodOptions_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_MethodOptions_serialize( - const google_protobuf_MethodOptions* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len); -} - -UPB_INLINE bool google_protobuf_MethodOptions_deprecated( - const google_protobuf_MethodOptions* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); -} -UPB_INLINE google_protobuf_MethodOptions_IdempotencyLevel -google_protobuf_MethodOptions_idempotency_level( - const google_protobuf_MethodOptions* msg) { - return UPB_FIELD_AT(msg, google_protobuf_MethodOptions_IdempotencyLevel, - UPB_SIZE(8, 8)); -} -UPB_INLINE const upb_array* google_protobuf_MethodOptions_uninterpreted_option( - const google_protobuf_MethodOptions* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(20, 24)); -} - -UPB_INLINE void google_protobuf_MethodOptions_set_deprecated( - google_protobuf_MethodOptions* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value; -} -UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level( - google_protobuf_MethodOptions* msg, - google_protobuf_MethodOptions_IdempotencyLevel value) { - UPB_FIELD_AT(msg, google_protobuf_MethodOptions_IdempotencyLevel, - UPB_SIZE(8, 8)) = value; -} -UPB_INLINE void google_protobuf_MethodOptions_set_uninterpreted_option( - google_protobuf_MethodOptions* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(20, 24)) = value; -} - -/* google.protobuf.UninterpretedOption */ - -extern const upb_msglayout google_protobuf_UninterpretedOption_msginit; -UPB_INLINE google_protobuf_UninterpretedOption* -google_protobuf_UninterpretedOption_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); -} -UPB_INLINE google_protobuf_UninterpretedOption* -google_protobuf_UninterpretedOption_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_UninterpretedOption* ret = - google_protobuf_UninterpretedOption_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_UninterpretedOption_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_UninterpretedOption_serialize( - const google_protobuf_UninterpretedOption* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, - len); -} - -UPB_INLINE const upb_array* google_protobuf_UninterpretedOption_name( - const google_protobuf_UninterpretedOption* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(56, 80)); -} -UPB_INLINE upb_stringview google_protobuf_UninterpretedOption_identifier_value( - const google_protobuf_UninterpretedOption* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)); -} -UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value( - const google_protobuf_UninterpretedOption* msg) { - return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); -} -UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value( - const google_protobuf_UninterpretedOption* msg) { - return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); -} -UPB_INLINE double google_protobuf_UninterpretedOption_double_value( - const google_protobuf_UninterpretedOption* msg) { - return UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)); -} -UPB_INLINE upb_stringview google_protobuf_UninterpretedOption_string_value( - const google_protobuf_UninterpretedOption* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)); -} -UPB_INLINE upb_stringview google_protobuf_UninterpretedOption_aggregate_value( - const google_protobuf_UninterpretedOption* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)); -} - -UPB_INLINE void google_protobuf_UninterpretedOption_set_name( - google_protobuf_UninterpretedOption* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(56, 80)) = value; -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value( - google_protobuf_UninterpretedOption* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(32, 32)) = value; -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value( - google_protobuf_UninterpretedOption* msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value( - google_protobuf_UninterpretedOption* msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value; -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value( - google_protobuf_UninterpretedOption* msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)) = value; -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value( - google_protobuf_UninterpretedOption* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(40, 48)) = value; -} -UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value( - google_protobuf_UninterpretedOption* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(48, 64)) = value; -} - -/* google.protobuf.UninterpretedOption.NamePart */ - -extern const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit; -UPB_INLINE google_protobuf_UninterpretedOption_NamePart* -google_protobuf_UninterpretedOption_NamePart_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, - arena); -} -UPB_INLINE google_protobuf_UninterpretedOption_NamePart* -google_protobuf_UninterpretedOption_NamePart_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_UninterpretedOption_NamePart* ret = - google_protobuf_UninterpretedOption_NamePart_new(arena); - return (ret && - upb_decode(buf, ret, - &google_protobuf_UninterpretedOption_NamePart_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_UninterpretedOption_NamePart_serialize( - const google_protobuf_UninterpretedOption_NamePart* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, - arena, len); -} - -UPB_INLINE upb_stringview -google_protobuf_UninterpretedOption_NamePart_name_part( - const google_protobuf_UninterpretedOption_NamePart* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); -} -UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension( - const google_protobuf_UninterpretedOption_NamePart* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); -} - -UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part( - google_protobuf_UninterpretedOption_NamePart* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension( - google_protobuf_UninterpretedOption_NamePart* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; -} - -/* google.protobuf.SourceCodeInfo */ - -extern const upb_msglayout google_protobuf_SourceCodeInfo_msginit; -UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena); -} -UPB_INLINE google_protobuf_SourceCodeInfo* -google_protobuf_SourceCodeInfo_parsenew(upb_stringview buf, upb_arena* arena) { - google_protobuf_SourceCodeInfo* ret = - google_protobuf_SourceCodeInfo_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_SourceCodeInfo_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_SourceCodeInfo_serialize( - const google_protobuf_SourceCodeInfo* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len); -} - -UPB_INLINE const upb_array* google_protobuf_SourceCodeInfo_location( - const google_protobuf_SourceCodeInfo* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_SourceCodeInfo_set_location( - google_protobuf_SourceCodeInfo* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.SourceCodeInfo.Location */ - -extern const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit; -UPB_INLINE google_protobuf_SourceCodeInfo_Location* -google_protobuf_SourceCodeInfo_Location_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena); -} -UPB_INLINE google_protobuf_SourceCodeInfo_Location* -google_protobuf_SourceCodeInfo_Location_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_SourceCodeInfo_Location* ret = - google_protobuf_SourceCodeInfo_Location_new(arena); - return (ret && upb_decode(buf, ret, - &google_protobuf_SourceCodeInfo_Location_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_SourceCodeInfo_Location_serialize( - const google_protobuf_SourceCodeInfo_Location* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, - arena, len); -} - -UPB_INLINE const upb_array* google_protobuf_SourceCodeInfo_Location_path( - const google_protobuf_SourceCodeInfo_Location* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(24, 48)); -} -UPB_INLINE const upb_array* google_protobuf_SourceCodeInfo_Location_span( - const google_protobuf_SourceCodeInfo_Location* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(28, 56)); -} -UPB_INLINE upb_stringview -google_protobuf_SourceCodeInfo_Location_leading_comments( - const google_protobuf_SourceCodeInfo_Location* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)); -} -UPB_INLINE upb_stringview -google_protobuf_SourceCodeInfo_Location_trailing_comments( - const google_protobuf_SourceCodeInfo_Location* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)); -} -UPB_INLINE const upb_array* -google_protobuf_SourceCodeInfo_Location_leading_detached_comments( - const google_protobuf_SourceCodeInfo_Location* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(32, 64)); -} - -UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_path( - google_protobuf_SourceCodeInfo_Location* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(24, 48)) = value; -} -UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_span( - google_protobuf_SourceCodeInfo_Location* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(28, 56)) = value; -} -UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments( - google_protobuf_SourceCodeInfo_Location* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments( - google_protobuf_SourceCodeInfo_Location* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 32)) = value; -} -UPB_INLINE void -google_protobuf_SourceCodeInfo_Location_set_leading_detached_comments( - google_protobuf_SourceCodeInfo_Location* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(32, 64)) = value; -} - -/* google.protobuf.GeneratedCodeInfo */ - -extern const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit; -UPB_INLINE google_protobuf_GeneratedCodeInfo* -google_protobuf_GeneratedCodeInfo_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_GeneratedCodeInfo_msginit, arena); -} -UPB_INLINE google_protobuf_GeneratedCodeInfo* -google_protobuf_GeneratedCodeInfo_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_GeneratedCodeInfo* ret = - google_protobuf_GeneratedCodeInfo_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_GeneratedCodeInfo_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_GeneratedCodeInfo_serialize( - const google_protobuf_GeneratedCodeInfo* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, - len); -} - -UPB_INLINE const upb_array* google_protobuf_GeneratedCodeInfo_annotation( - const google_protobuf_GeneratedCodeInfo* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_GeneratedCodeInfo_set_annotation( - google_protobuf_GeneratedCodeInfo* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.GeneratedCodeInfo.Annotation */ - -extern const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit; -UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* -google_protobuf_GeneratedCodeInfo_Annotation_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, - arena); -} -UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* -google_protobuf_GeneratedCodeInfo_Annotation_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_GeneratedCodeInfo_Annotation* ret = - google_protobuf_GeneratedCodeInfo_Annotation_new(arena); - return (ret && - upb_decode(buf, ret, - &google_protobuf_GeneratedCodeInfo_Annotation_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize( - const google_protobuf_GeneratedCodeInfo_Annotation* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, - arena, len); -} - -UPB_INLINE const upb_array* google_protobuf_GeneratedCodeInfo_Annotation_path( - const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(24, 32)); -} -UPB_INLINE upb_stringview -google_protobuf_GeneratedCodeInfo_Annotation_source_file( - const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 16)); -} -UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin( - const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); -} -UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end( - const google_protobuf_GeneratedCodeInfo_Annotation* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); -} - -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_path( - google_protobuf_GeneratedCodeInfo_Annotation* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(24, 32)) = value; -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file( - google_protobuf_GeneratedCodeInfo_Annotation* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(16, 16)) = value; -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin( - google_protobuf_GeneratedCodeInfo_Annotation* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; -} -UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end( - google_protobuf_GeneratedCodeInfo_Annotation* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; -} - -UPB_END_EXTERN_C - -#include "upb/port_undef.inc" - -#endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/duration.upb.c b/src/core/ext/upb-generated/google/protobuf/duration.upb.c deleted file mode 100644 index b057ce5e4a..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/duration.upb.c +++ /dev/null @@ -1,24 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/duration.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#include "google/protobuf/duration.upb.h" -#include -#include "upb/msg.h" - -#include "upb/port_def.inc" - -static const upb_msglayout_field google_protobuf_Duration__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 3, 1}, - {2, UPB_SIZE(8, 8), 0, 0, 5, 1}, -}; - -const upb_msglayout google_protobuf_Duration_msginit = { - NULL, &google_protobuf_Duration__fields[0], UPB_SIZE(16, 16), 2, false, -}; - -#include "upb/port_undef.inc" diff --git a/src/core/ext/upb-generated/google/protobuf/duration.upb.h b/src/core/ext/upb-generated/google/protobuf/duration.upb.h deleted file mode 100644 index 1f40b3aed2..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/duration.upb.h +++ /dev/null @@ -1,65 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/duration.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#ifndef GOOGLE_PROTOBUF_DURATION_PROTO_UPB_H_ -#define GOOGLE_PROTOBUF_DURATION_PROTO_UPB_H_ - -#include "upb/msg.h" - -#include "upb/decode.h" -#include "upb/encode.h" -#include "upb/port_def.inc" -UPB_BEGIN_EXTERN_C - -struct google_protobuf_Duration; -typedef struct google_protobuf_Duration google_protobuf_Duration; - -/* Enums */ - -/* google.protobuf.Duration */ - -extern const upb_msglayout google_protobuf_Duration_msginit; -UPB_INLINE google_protobuf_Duration* google_protobuf_Duration_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_Duration_msginit, arena); -} -UPB_INLINE google_protobuf_Duration* google_protobuf_Duration_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_Duration* ret = google_protobuf_Duration_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_Duration_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_Duration_serialize( - const google_protobuf_Duration* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_Duration_msginit, arena, len); -} - -UPB_INLINE int64_t -google_protobuf_Duration_seconds(const google_protobuf_Duration* msg) { - return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); -} -UPB_INLINE int32_t -google_protobuf_Duration_nanos(const google_protobuf_Duration* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); -} - -UPB_INLINE void google_protobuf_Duration_set_seconds( - google_protobuf_Duration* msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; -} -UPB_INLINE void google_protobuf_Duration_set_nanos( - google_protobuf_Duration* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; -} - -UPB_END_EXTERN_C - -#include "upb/port_undef.inc" - -#endif /* GOOGLE_PROTOBUF_DURATION_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/struct.upb.c b/src/core/ext/upb-generated/google/protobuf/struct.upb.c deleted file mode 100644 index a0820e722a..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/struct.upb.c +++ /dev/null @@ -1,88 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/struct.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#include "google/protobuf/struct.upb.h" -#include -#include "upb/msg.h" - -#include "upb/port_def.inc" - -static const upb_msglayout* const google_protobuf_Struct_submsgs[1] = { - &google_protobuf_Struct_FieldsEntry_msginit, -}; - -static const upb_msglayout_field google_protobuf_Struct__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_Struct_msginit = { - &google_protobuf_Struct_submsgs[0], - &google_protobuf_Struct__fields[0], - UPB_SIZE(4, 8), - 1, - false, -}; - -static const upb_msglayout* const - google_protobuf_Struct_FieldsEntry_submsgs[1] = { - &google_protobuf_Value_msginit, -}; - -static const upb_msglayout_field google_protobuf_Struct_FieldsEntry__fields[2] = - { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, -}; - -const upb_msglayout google_protobuf_Struct_FieldsEntry_msginit = { - &google_protobuf_Struct_FieldsEntry_submsgs[0], - &google_protobuf_Struct_FieldsEntry__fields[0], - UPB_SIZE(16, 32), - 2, - false, -}; - -static const upb_msglayout* const google_protobuf_Value_submsgs[2] = { - &google_protobuf_ListValue_msginit, - &google_protobuf_Struct_msginit, -}; - -static const upb_msglayout_field google_protobuf_Value__fields[6] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 14, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 1, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 8, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 1, 11, 1}, - {6, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 1}, -}; - -const upb_msglayout google_protobuf_Value_msginit = { - &google_protobuf_Value_submsgs[0], - &google_protobuf_Value__fields[0], - UPB_SIZE(16, 32), - 6, - false, -}; - -static const upb_msglayout* const google_protobuf_ListValue_submsgs[1] = { - &google_protobuf_Value_msginit, -}; - -static const upb_msglayout_field google_protobuf_ListValue__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, -}; - -const upb_msglayout google_protobuf_ListValue_msginit = { - &google_protobuf_ListValue_submsgs[0], - &google_protobuf_ListValue__fields[0], - UPB_SIZE(4, 8), - 1, - false, -}; - -#include "upb/port_undef.inc" diff --git a/src/core/ext/upb-generated/google/protobuf/struct.upb.h b/src/core/ext/upb-generated/google/protobuf/struct.upb.h deleted file mode 100644 index 5493794f0e..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/struct.upb.h +++ /dev/null @@ -1,226 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/struct.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#ifndef GOOGLE_PROTOBUF_STRUCT_PROTO_UPB_H_ -#define GOOGLE_PROTOBUF_STRUCT_PROTO_UPB_H_ - -#include "upb/msg.h" - -#include "upb/decode.h" -#include "upb/encode.h" -#include "upb/port_def.inc" -UPB_BEGIN_EXTERN_C - -struct google_protobuf_Struct; -struct google_protobuf_Struct_FieldsEntry; -struct google_protobuf_Value; -struct google_protobuf_ListValue; -typedef struct google_protobuf_Struct google_protobuf_Struct; -typedef struct google_protobuf_Struct_FieldsEntry - google_protobuf_Struct_FieldsEntry; -typedef struct google_protobuf_Value google_protobuf_Value; -typedef struct google_protobuf_ListValue google_protobuf_ListValue; - -/* Enums */ - -typedef enum { google_protobuf_NULL_VALUE = 0 } google_protobuf_NullValue; - -/* google.protobuf.Struct */ - -extern const upb_msglayout google_protobuf_Struct_msginit; -UPB_INLINE google_protobuf_Struct* google_protobuf_Struct_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_Struct_msginit, arena); -} -UPB_INLINE google_protobuf_Struct* google_protobuf_Struct_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_Struct* ret = google_protobuf_Struct_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_Struct_msginit)) ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_Struct_serialize( - const google_protobuf_Struct* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_Struct_msginit, arena, len); -} - -UPB_INLINE const upb_array* google_protobuf_Struct_fields( - const google_protobuf_Struct* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_Struct_set_fields(google_protobuf_Struct* msg, - upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.Struct.FieldsEntry */ - -extern const upb_msglayout google_protobuf_Struct_FieldsEntry_msginit; -UPB_INLINE google_protobuf_Struct_FieldsEntry* -google_protobuf_Struct_FieldsEntry_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_Struct_FieldsEntry_msginit, arena); -} -UPB_INLINE google_protobuf_Struct_FieldsEntry* -google_protobuf_Struct_FieldsEntry_parsenew(upb_stringview buf, - upb_arena* arena) { - google_protobuf_Struct_FieldsEntry* ret = - google_protobuf_Struct_FieldsEntry_new(arena); - return (ret && - upb_decode(buf, ret, &google_protobuf_Struct_FieldsEntry_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_Struct_FieldsEntry_serialize( - const google_protobuf_Struct_FieldsEntry* msg, upb_arena* arena, - size_t* len) { - return upb_encode(msg, &google_protobuf_Struct_FieldsEntry_msginit, arena, - len); -} - -UPB_INLINE upb_stringview google_protobuf_Struct_FieldsEntry_key( - const google_protobuf_Struct_FieldsEntry* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)); -} -UPB_INLINE const google_protobuf_Value* -google_protobuf_Struct_FieldsEntry_value( - const google_protobuf_Struct_FieldsEntry* msg) { - return UPB_FIELD_AT(msg, const google_protobuf_Value*, UPB_SIZE(8, 16)); -} - -UPB_INLINE void google_protobuf_Struct_FieldsEntry_set_key( - google_protobuf_Struct_FieldsEntry* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)) = value; -} -UPB_INLINE void google_protobuf_Struct_FieldsEntry_set_value( - google_protobuf_Struct_FieldsEntry* msg, google_protobuf_Value* value) { - UPB_FIELD_AT(msg, google_protobuf_Value*, UPB_SIZE(8, 16)) = value; -} - -/* google.protobuf.Value */ - -extern const upb_msglayout google_protobuf_Value_msginit; -UPB_INLINE google_protobuf_Value* google_protobuf_Value_new(upb_arena* arena) { - return upb_msg_new(&google_protobuf_Value_msginit, arena); -} -UPB_INLINE google_protobuf_Value* google_protobuf_Value_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_Value* ret = google_protobuf_Value_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_Value_msginit)) ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_Value_serialize( - const google_protobuf_Value* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_Value_msginit, arena, len); -} - -typedef enum { - google_protobuf_Value_kind_null_value = 1, - google_protobuf_Value_kind_number_value = 2, - google_protobuf_Value_kind_string_value = 3, - google_protobuf_Value_kind_bool_value = 4, - google_protobuf_Value_kind_struct_value = 5, - google_protobuf_Value_kind_list_value = 6, - google_protobuf_Value_kind_NOT_SET = 0, -} google_protobuf_Value_kind_oneofcases; -UPB_INLINE google_protobuf_Value_kind_oneofcases -google_protobuf_Value_kind_case(const google_protobuf_Value* msg) { - return UPB_FIELD_AT(msg, int, UPB_SIZE(8, 16)); -} - -UPB_INLINE google_protobuf_NullValue -google_protobuf_Value_null_value(const google_protobuf_Value* msg) { - return UPB_READ_ONEOF(msg, google_protobuf_NullValue, UPB_SIZE(0, 0), - UPB_SIZE(8, 16), 1, google_protobuf_NULL_VALUE); -} -UPB_INLINE double google_protobuf_Value_number_value( - const google_protobuf_Value* msg) { - return UPB_READ_ONEOF(msg, double, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, 0); -} -UPB_INLINE upb_stringview -google_protobuf_Value_string_value(const google_protobuf_Value* msg) { - return UPB_READ_ONEOF(msg, upb_stringview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 3, - upb_stringview_make("", strlen(""))); -} -UPB_INLINE bool google_protobuf_Value_bool_value( - const google_protobuf_Value* msg) { - return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 4, false); -} -UPB_INLINE const google_protobuf_Struct* google_protobuf_Value_struct_value( - const google_protobuf_Value* msg) { - return UPB_READ_ONEOF(msg, const google_protobuf_Struct*, UPB_SIZE(0, 0), - UPB_SIZE(8, 16), 5, NULL); -} -UPB_INLINE const google_protobuf_ListValue* google_protobuf_Value_list_value( - const google_protobuf_Value* msg) { - return UPB_READ_ONEOF(msg, const google_protobuf_ListValue*, UPB_SIZE(0, 0), - UPB_SIZE(8, 16), 6, NULL); -} - -UPB_INLINE void google_protobuf_Value_set_null_value( - google_protobuf_Value* msg, google_protobuf_NullValue value) { - UPB_WRITE_ONEOF(msg, google_protobuf_NullValue, UPB_SIZE(0, 0), value, - UPB_SIZE(8, 16), 1); -} -UPB_INLINE void google_protobuf_Value_set_number_value( - google_protobuf_Value* msg, double value) { - UPB_WRITE_ONEOF(msg, double, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2); -} -UPB_INLINE void google_protobuf_Value_set_string_value( - google_protobuf_Value* msg, upb_stringview value) { - UPB_WRITE_ONEOF(msg, upb_stringview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), - 3); -} -UPB_INLINE void google_protobuf_Value_set_bool_value(google_protobuf_Value* msg, - bool value) { - UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 4); -} -UPB_INLINE void google_protobuf_Value_set_struct_value( - google_protobuf_Value* msg, google_protobuf_Struct* value) { - UPB_WRITE_ONEOF(msg, google_protobuf_Struct*, UPB_SIZE(0, 0), value, - UPB_SIZE(8, 16), 5); -} -UPB_INLINE void google_protobuf_Value_set_list_value( - google_protobuf_Value* msg, google_protobuf_ListValue* value) { - UPB_WRITE_ONEOF(msg, google_protobuf_ListValue*, UPB_SIZE(0, 0), value, - UPB_SIZE(8, 16), 6); -} - -/* google.protobuf.ListValue */ - -extern const upb_msglayout google_protobuf_ListValue_msginit; -UPB_INLINE google_protobuf_ListValue* google_protobuf_ListValue_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_ListValue_msginit, arena); -} -UPB_INLINE google_protobuf_ListValue* google_protobuf_ListValue_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_ListValue* ret = google_protobuf_ListValue_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_ListValue_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_ListValue_serialize( - const google_protobuf_ListValue* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_ListValue_msginit, arena, len); -} - -UPB_INLINE const upb_array* google_protobuf_ListValue_values( - const google_protobuf_ListValue* msg) { - return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_ListValue_set_values( - google_protobuf_ListValue* msg, upb_array* value) { - UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value; -} - -UPB_END_EXTERN_C - -#include "upb/port_undef.inc" - -#endif /* GOOGLE_PROTOBUF_STRUCT_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c b/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c deleted file mode 100644 index 90d0aed766..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +++ /dev/null @@ -1,24 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/timestamp.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#include "google/protobuf/timestamp.upb.h" -#include -#include "upb/msg.h" - -#include "upb/port_def.inc" - -static const upb_msglayout_field google_protobuf_Timestamp__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 3, 1}, - {2, UPB_SIZE(8, 8), 0, 0, 5, 1}, -}; - -const upb_msglayout google_protobuf_Timestamp_msginit = { - NULL, &google_protobuf_Timestamp__fields[0], UPB_SIZE(16, 16), 2, false, -}; - -#include "upb/port_undef.inc" diff --git a/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h b/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h deleted file mode 100644 index a524eb5b6d..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +++ /dev/null @@ -1,65 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/timestamp.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#ifndef GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPB_H_ -#define GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPB_H_ - -#include "upb/msg.h" - -#include "upb/decode.h" -#include "upb/encode.h" -#include "upb/port_def.inc" -UPB_BEGIN_EXTERN_C - -struct google_protobuf_Timestamp; -typedef struct google_protobuf_Timestamp google_protobuf_Timestamp; - -/* Enums */ - -/* google.protobuf.Timestamp */ - -extern const upb_msglayout google_protobuf_Timestamp_msginit; -UPB_INLINE google_protobuf_Timestamp* google_protobuf_Timestamp_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_Timestamp_msginit, arena); -} -UPB_INLINE google_protobuf_Timestamp* google_protobuf_Timestamp_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_Timestamp* ret = google_protobuf_Timestamp_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_Timestamp_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_Timestamp_serialize( - const google_protobuf_Timestamp* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_Timestamp_msginit, arena, len); -} - -UPB_INLINE int64_t -google_protobuf_Timestamp_seconds(const google_protobuf_Timestamp* msg) { - return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); -} -UPB_INLINE int32_t -google_protobuf_Timestamp_nanos(const google_protobuf_Timestamp* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); -} - -UPB_INLINE void google_protobuf_Timestamp_set_seconds( - google_protobuf_Timestamp* msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; -} -UPB_INLINE void google_protobuf_Timestamp_set_nanos( - google_protobuf_Timestamp* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; -} - -UPB_END_EXTERN_C - -#include "upb/port_undef.inc" - -#endif /* GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c b/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c deleted file mode 100644 index 3fa3bea1db..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +++ /dev/null @@ -1,87 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/wrappers.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#include "google/protobuf/wrappers.upb.h" -#include -#include "upb/msg.h" - -#include "upb/port_def.inc" - -static const upb_msglayout_field google_protobuf_DoubleValue__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 1, 1}, -}; - -const upb_msglayout google_protobuf_DoubleValue_msginit = { - NULL, &google_protobuf_DoubleValue__fields[0], UPB_SIZE(8, 8), 1, false, -}; - -static const upb_msglayout_field google_protobuf_FloatValue__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 2, 1}, -}; - -const upb_msglayout google_protobuf_FloatValue_msginit = { - NULL, &google_protobuf_FloatValue__fields[0], UPB_SIZE(4, 4), 1, false, -}; - -static const upb_msglayout_field google_protobuf_Int64Value__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 3, 1}, -}; - -const upb_msglayout google_protobuf_Int64Value_msginit = { - NULL, &google_protobuf_Int64Value__fields[0], UPB_SIZE(8, 8), 1, false, -}; - -static const upb_msglayout_field google_protobuf_UInt64Value__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 4, 1}, -}; - -const upb_msglayout google_protobuf_UInt64Value_msginit = { - NULL, &google_protobuf_UInt64Value__fields[0], UPB_SIZE(8, 8), 1, false, -}; - -static const upb_msglayout_field google_protobuf_Int32Value__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 5, 1}, -}; - -const upb_msglayout google_protobuf_Int32Value_msginit = { - NULL, &google_protobuf_Int32Value__fields[0], UPB_SIZE(4, 4), 1, false, -}; - -static const upb_msglayout_field google_protobuf_UInt32Value__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 13, 1}, -}; - -const upb_msglayout google_protobuf_UInt32Value_msginit = { - NULL, &google_protobuf_UInt32Value__fields[0], UPB_SIZE(4, 4), 1, false, -}; - -static const upb_msglayout_field google_protobuf_BoolValue__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 8, 1}, -}; - -const upb_msglayout google_protobuf_BoolValue_msginit = { - NULL, &google_protobuf_BoolValue__fields[0], UPB_SIZE(1, 1), 1, false, -}; - -static const upb_msglayout_field google_protobuf_StringValue__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, -}; - -const upb_msglayout google_protobuf_StringValue_msginit = { - NULL, &google_protobuf_StringValue__fields[0], UPB_SIZE(8, 16), 1, false, -}; - -static const upb_msglayout_field google_protobuf_BytesValue__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 12, 1}, -}; - -const upb_msglayout google_protobuf_BytesValue_msginit = { - NULL, &google_protobuf_BytesValue__fields[0], UPB_SIZE(8, 16), 1, false, -}; - -#include "upb/port_undef.inc" diff --git a/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h b/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h deleted file mode 100644 index 3ae5d3b16e..0000000000 --- a/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +++ /dev/null @@ -1,305 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * google/protobuf/wrappers.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#ifndef GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_ -#define GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_ - -#include "upb/msg.h" - -#include "upb/decode.h" -#include "upb/encode.h" -#include "upb/port_def.inc" -UPB_BEGIN_EXTERN_C - -struct google_protobuf_DoubleValue; -struct google_protobuf_FloatValue; -struct google_protobuf_Int64Value; -struct google_protobuf_UInt64Value; -struct google_protobuf_Int32Value; -struct google_protobuf_UInt32Value; -struct google_protobuf_BoolValue; -struct google_protobuf_StringValue; -struct google_protobuf_BytesValue; -typedef struct google_protobuf_DoubleValue google_protobuf_DoubleValue; -typedef struct google_protobuf_FloatValue google_protobuf_FloatValue; -typedef struct google_protobuf_Int64Value google_protobuf_Int64Value; -typedef struct google_protobuf_UInt64Value google_protobuf_UInt64Value; -typedef struct google_protobuf_Int32Value google_protobuf_Int32Value; -typedef struct google_protobuf_UInt32Value google_protobuf_UInt32Value; -typedef struct google_protobuf_BoolValue google_protobuf_BoolValue; -typedef struct google_protobuf_StringValue google_protobuf_StringValue; -typedef struct google_protobuf_BytesValue google_protobuf_BytesValue; - -/* Enums */ - -/* google.protobuf.DoubleValue */ - -extern const upb_msglayout google_protobuf_DoubleValue_msginit; -UPB_INLINE google_protobuf_DoubleValue* google_protobuf_DoubleValue_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_DoubleValue_msginit, arena); -} -UPB_INLINE google_protobuf_DoubleValue* google_protobuf_DoubleValue_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_DoubleValue* ret = google_protobuf_DoubleValue_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_DoubleValue_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_DoubleValue_serialize( - const google_protobuf_DoubleValue* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_DoubleValue_msginit, arena, len); -} - -UPB_INLINE double google_protobuf_DoubleValue_value( - const google_protobuf_DoubleValue* msg) { - return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_DoubleValue_set_value( - google_protobuf_DoubleValue* msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.FloatValue */ - -extern const upb_msglayout google_protobuf_FloatValue_msginit; -UPB_INLINE google_protobuf_FloatValue* google_protobuf_FloatValue_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_FloatValue_msginit, arena); -} -UPB_INLINE google_protobuf_FloatValue* google_protobuf_FloatValue_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_FloatValue* ret = google_protobuf_FloatValue_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_FloatValue_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_FloatValue_serialize( - const google_protobuf_FloatValue* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_FloatValue_msginit, arena, len); -} - -UPB_INLINE float google_protobuf_FloatValue_value( - const google_protobuf_FloatValue* msg) { - return UPB_FIELD_AT(msg, float, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_FloatValue_set_value( - google_protobuf_FloatValue* msg, float value) { - UPB_FIELD_AT(msg, float, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.Int64Value */ - -extern const upb_msglayout google_protobuf_Int64Value_msginit; -UPB_INLINE google_protobuf_Int64Value* google_protobuf_Int64Value_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_Int64Value_msginit, arena); -} -UPB_INLINE google_protobuf_Int64Value* google_protobuf_Int64Value_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_Int64Value* ret = google_protobuf_Int64Value_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_Int64Value_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_Int64Value_serialize( - const google_protobuf_Int64Value* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_Int64Value_msginit, arena, len); -} - -UPB_INLINE int64_t -google_protobuf_Int64Value_value(const google_protobuf_Int64Value* msg) { - return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_Int64Value_set_value( - google_protobuf_Int64Value* msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.UInt64Value */ - -extern const upb_msglayout google_protobuf_UInt64Value_msginit; -UPB_INLINE google_protobuf_UInt64Value* google_protobuf_UInt64Value_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_UInt64Value_msginit, arena); -} -UPB_INLINE google_protobuf_UInt64Value* google_protobuf_UInt64Value_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_UInt64Value* ret = google_protobuf_UInt64Value_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_UInt64Value_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_UInt64Value_serialize( - const google_protobuf_UInt64Value* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_UInt64Value_msginit, arena, len); -} - -UPB_INLINE uint64_t -google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value* msg) { - return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_UInt64Value_set_value( - google_protobuf_UInt64Value* msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.Int32Value */ - -extern const upb_msglayout google_protobuf_Int32Value_msginit; -UPB_INLINE google_protobuf_Int32Value* google_protobuf_Int32Value_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_Int32Value_msginit, arena); -} -UPB_INLINE google_protobuf_Int32Value* google_protobuf_Int32Value_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_Int32Value* ret = google_protobuf_Int32Value_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_Int32Value_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_Int32Value_serialize( - const google_protobuf_Int32Value* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_Int32Value_msginit, arena, len); -} - -UPB_INLINE int32_t -google_protobuf_Int32Value_value(const google_protobuf_Int32Value* msg) { - return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_Int32Value_set_value( - google_protobuf_Int32Value* msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.UInt32Value */ - -extern const upb_msglayout google_protobuf_UInt32Value_msginit; -UPB_INLINE google_protobuf_UInt32Value* google_protobuf_UInt32Value_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); -} -UPB_INLINE google_protobuf_UInt32Value* google_protobuf_UInt32Value_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_UInt32Value* ret = google_protobuf_UInt32Value_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_UInt32Value_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_UInt32Value_serialize( - const google_protobuf_UInt32Value* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_UInt32Value_msginit, arena, len); -} - -UPB_INLINE uint32_t -google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value* msg) { - return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_UInt32Value_set_value( - google_protobuf_UInt32Value* msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.BoolValue */ - -extern const upb_msglayout google_protobuf_BoolValue_msginit; -UPB_INLINE google_protobuf_BoolValue* google_protobuf_BoolValue_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_BoolValue_msginit, arena); -} -UPB_INLINE google_protobuf_BoolValue* google_protobuf_BoolValue_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_BoolValue* ret = google_protobuf_BoolValue_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_BoolValue_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_BoolValue_serialize( - const google_protobuf_BoolValue* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_BoolValue_msginit, arena, len); -} - -UPB_INLINE bool google_protobuf_BoolValue_value( - const google_protobuf_BoolValue* msg) { - return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_BoolValue_set_value( - google_protobuf_BoolValue* msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.StringValue */ - -extern const upb_msglayout google_protobuf_StringValue_msginit; -UPB_INLINE google_protobuf_StringValue* google_protobuf_StringValue_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_StringValue_msginit, arena); -} -UPB_INLINE google_protobuf_StringValue* google_protobuf_StringValue_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_StringValue* ret = google_protobuf_StringValue_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_StringValue_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_StringValue_serialize( - const google_protobuf_StringValue* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_StringValue_msginit, arena, len); -} - -UPB_INLINE upb_stringview -google_protobuf_StringValue_value(const google_protobuf_StringValue* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_StringValue_set_value( - google_protobuf_StringValue* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)) = value; -} - -/* google.protobuf.BytesValue */ - -extern const upb_msglayout google_protobuf_BytesValue_msginit; -UPB_INLINE google_protobuf_BytesValue* google_protobuf_BytesValue_new( - upb_arena* arena) { - return upb_msg_new(&google_protobuf_BytesValue_msginit, arena); -} -UPB_INLINE google_protobuf_BytesValue* google_protobuf_BytesValue_parsenew( - upb_stringview buf, upb_arena* arena) { - google_protobuf_BytesValue* ret = google_protobuf_BytesValue_new(arena); - return (ret && upb_decode(buf, ret, &google_protobuf_BytesValue_msginit)) - ? ret - : NULL; -} -UPB_INLINE char* google_protobuf_BytesValue_serialize( - const google_protobuf_BytesValue* msg, upb_arena* arena, size_t* len) { - return upb_encode(msg, &google_protobuf_BytesValue_msginit, arena, len); -} - -UPB_INLINE upb_stringview -google_protobuf_BytesValue_value(const google_protobuf_BytesValue* msg) { - return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)); -} - -UPB_INLINE void google_protobuf_BytesValue_set_value( - google_protobuf_BytesValue* msg, upb_stringview value) { - UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)) = value; -} - -UPB_END_EXTERN_C - -#include "upb/port_undef.inc" - -#endif /* GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_ */ diff --git a/src/upb/gen_build_yaml.py b/src/upb/gen_build_yaml.py deleted file mode 100755 index 0dd7bfae10..0000000000 --- a/src/upb/gen_build_yaml.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env python2.7 - -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: This should ideally be in upb submodule to avoid hardcoding this here. - -import re -import os -import sys -import yaml - -srcs = [ - "third_party/upb/google/protobuf/descriptor.upb.c", - "third_party/upb/upb/decode.c", - "third_party/upb/upb/def.c", - "third_party/upb/upb/encode.c", - "third_party/upb/upb/handlers.c", - "third_party/upb/upb/msg.c", - "third_party/upb/upb/msgfactory.c", - "third_party/upb/upb/refcounted.c", - "third_party/upb/upb/sink.c", - "third_party/upb/upb/table.c", - "third_party/upb/upb/upb.c", -] - -hdrs = [ - "third_party/upb/google/protobuf/descriptor.upb.h", - "third_party/upb/upb/decode.h", - "third_party/upb/upb/def.h", - "third_party/upb/upb/encode.h", - "third_party/upb/upb/handlers.h", - "third_party/upb/upb/msg.h", - "third_party/upb/upb/msgfactory.h", - "third_party/upb/upb/refcounted.h", - "third_party/upb/upb/sink.h", - "third_party/upb/upb/upb.h", -] - -os.chdir(os.path.dirname(sys.argv[0])+'/../..') - -out = {} - -try: - out['libs'] = [{ - 'name': 'upb', - 'defaults': 'upb', - 'build': 'private', - 'language': 'c', - 'secure': 'no', - 'src': srcs, - 'headers': hdrs, - }] -except: - pass - -print yaml.dump(out) - diff --git a/tools/buildgen/generate_build_additions.sh b/tools/buildgen/generate_build_additions.sh index c99ad6ee55..5a1f4a598a 100755 --- a/tools/buildgen/generate_build_additions.sh +++ b/tools/buildgen/generate_build_additions.sh @@ -19,7 +19,6 @@ gen_build_yaml_dirs=" \ src/boringssl \ src/benchmark \ src/proto \ - src/upb \ src/zlib \ src/c-ares \ test/core/bad_client \ diff --git a/tools/codegen/core/gen_upb_api.sh b/tools/codegen/core/gen_upb_api.sh deleted file mode 100755 index 9457e06f12..0000000000 --- a/tools/codegen/core/gen_upb_api.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# Copyright 2016 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# REQUIRES: Bazel -set -ex -rm -rf src/core/ext/upb-generated -mkdir src/core/ext/upb-generated -cd third_party -cd upb -bazel build :protoc-gen-upb - -cd ../.. - -proto_files=( \ - "google/protobuf/any.proto" \ - "google/protobuf/struct.proto" \ - "google/protobuf/wrappers.proto" \ - "google/protobuf/descriptor.proto" \ - "google/protobuf/duration.proto" \ - "google/protobuf/timestamp.proto" ) - -for i in "${proto_files[@]}" -do - protoc -I=$PWD/third_party/data-plane-api -I=$PWD/third_party/googleapis -I=$PWD/third_party/protobuf -I=$PWD/third_party/protoc-gen-validate $i --upb_out=./src/core/ext/upb-generated --plugin=protoc-gen-upb=third_party/upb/bazel-bin/protoc-gen-upb -done diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py index fd93cf31e0..787bef1778 100755 --- a/tools/distrib/check_copyright.py +++ b/tools/distrib/check_copyright.py @@ -104,20 +104,6 @@ _EXEMPT = frozenset(( # Designer-generated source 'examples/csharp/HelloworldXamarin/Droid/Resources/Resource.designer.cs', 'examples/csharp/HelloworldXamarin/iOS/ViewController.designer.cs', - - # Upb generated source - 'src/core/ext/upb-generated/google/protobuf/any.upb.h', - 'src/core/ext/upb-generated/google/protobuf/any.upb.c', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', )) RE_YEAR = r'Copyright (?P[0-9]+\-)?(?P[0-9]+) ([Tt]he )?gRPC [Aa]uthors(\.|)' diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py index 15b3478e55..b8d530cce0 100755 --- a/tools/distrib/check_include_guards.py +++ b/tools/distrib/check_include_guards.py @@ -165,20 +165,6 @@ KNOWN_BAD = set([ 'src/core/tsi/alts/handshaker/transport_security_common.pb.h', 'include/grpc++/ext/reflection.grpc.pb.h', 'include/grpc++/ext/reflection.pb.h', - - # Upb generated code - 'src/core/ext/upb-generated/google/protobuf/any.upb.h', - 'src/core/ext/upb-generated/google/protobuf/any.upb.c', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', ]) grep_filter = r"grep -E '^(include|src/core)/.*\.h$'" diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 5b0041a250..2451101f58 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -8831,27 +8831,6 @@ "third_party": false, "type": "lib" }, - { - "deps": [], - "headers": [ - "third_party/upb/google/protobuf/descriptor.upb.h", - "third_party/upb/upb/decode.h", - "third_party/upb/upb/def.h", - "third_party/upb/upb/encode.h", - "third_party/upb/upb/handlers.h", - "third_party/upb/upb/msg.h", - "third_party/upb/upb/msgfactory.h", - "third_party/upb/upb/refcounted.h", - "third_party/upb/upb/sink.h", - "third_party/upb/upb/upb.h" - ], - "is_filegroup": false, - "language": "c", - "name": "upb", - "src": [], - "third_party": false, - "type": "lib" - }, { "deps": [], "headers": [ diff --git a/tools/run_tests/sanity/check_port_platform.py b/tools/run_tests/sanity/check_port_platform.py index 8c412700e4..fff828eaee 100755 --- a/tools/run_tests/sanity/check_port_platform.py +++ b/tools/run_tests/sanity/check_port_platform.py @@ -35,9 +35,6 @@ def check_port_platform_inclusion(directory_root): continue if filename.endswith('.pb.h') or filename.endswith('.pb.c'): continue - # Skip check for upb generated code - if filename.endswith('.upb.h') or filename.endswith('.upb.c'): - continue with open(path) as f: all_lines_in_file = f.readlines() for index, l in enumerate(all_lines_in_file): -- cgit v1.2.3