summaryrefslogtreecommitdiff
path: root/google
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2018-09-03 15:06:43 -0700
committerJoshua Haberman <jhaberman@gmail.com>2018-09-03 15:06:43 -0700
commit694d51f4d6cb8adf4a2f7975e5bb899327875de7 (patch)
tree29ea62eeb151c4cfc739522e19ee30dbee57a137 /google
parent41379a7064b6488099f203521fb69ceea0f6cc15 (diff)
Changed C API to only define structs, a table, and a few minimal inline functions.
Diffstat (limited to 'google')
-rw-r--r--google/protobuf/descriptor.upb.c1370
-rw-r--r--google/protobuf/descriptor.upb.h1139
2 files changed, 615 insertions, 1894 deletions
diff --git a/google/protobuf/descriptor.upb.c b/google/protobuf/descriptor.upb.c
index 6b64f69..8b74553 100644
--- a/google/protobuf/descriptor.upb.c
+++ b/google/protobuf/descriptor.upb.c
@@ -7,17 +7,10 @@
* regenerated. */
#include <stddef.h>
-#include "upb/decode.h"
-#include "upb/encode.h"
#include "upb/msg.h"
-#include "upb/upb.h"
#include "google/protobuf/descriptor.upb.h"
-struct google_protobuf_FileDescriptorSet {
- upb_array* file;
-};
-
static const upb_msglayout *const google_protobuf_FileDescriptorSet_submsgs[1] = {
&google_protobuf_FileDescriptorProto_msginit,
};
@@ -34,43 +27,6 @@ const upb_msglayout google_protobuf_FileDescriptorSet_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_FileDescriptorSet), 1, 0, false, true
};
-google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_new(upb_env *env) {
- google_protobuf_FileDescriptorSet *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_FileDescriptorSet *msg = google_protobuf_FileDescriptorSet_new(env);
- if (upb_decode(buf, msg, &google_protobuf_FileDescriptorSet_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_FileDescriptorSet_serialize(google_protobuf_FileDescriptorSet *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, env, size);
-}
-const upb_array* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet *msg) {
- return msg->file;
-}
-void google_protobuf_FileDescriptorSet_set_file(google_protobuf_FileDescriptorSet *msg, upb_array* value) {
- msg->file = value;
-}
-struct google_protobuf_FileDescriptorProto {
- upb_stringview name;
- upb_stringview package;
- upb_stringview syntax;
- google_protobuf_FileOptions* options;
- google_protobuf_SourceCodeInfo* source_code_info;
- upb_array* dependency;
- upb_array* message_type;
- upb_array* enum_type;
- upb_array* service;
- upb_array* extension;
- upb_array* public_dependency;
- upb_array* weak_dependency;
-};
-
static const upb_msglayout *const google_protobuf_FileDescriptorProto_submsgs[6] = {
&google_protobuf_DescriptorProto_msginit,
&google_protobuf_EnumDescriptorProto_msginit,
@@ -103,107 +59,6 @@ const upb_msglayout google_protobuf_FileDescriptorProto_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_FileDescriptorProto), 12, 0, false, true
};
-google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_new(upb_env *env) {
- google_protobuf_FileDescriptorProto *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_FileDescriptorProto *msg = google_protobuf_FileDescriptorProto_new(env);
- if (upb_decode(buf, msg, &google_protobuf_FileDescriptorProto_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_FileDescriptorProto_serialize(google_protobuf_FileDescriptorProto *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, env, size);
-}
-upb_stringview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg) {
- return msg->name;
-}
-void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_stringview value) {
- msg->name = value;
-}
-upb_stringview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg) {
- return msg->package;
-}
-void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_stringview value) {
- msg->package = value;
-}
-const upb_array* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg) {
- return msg->dependency;
-}
-void google_protobuf_FileDescriptorProto_set_dependency(google_protobuf_FileDescriptorProto *msg, upb_array* value) {
- msg->dependency = value;
-}
-const upb_array* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto *msg) {
- return msg->message_type;
-}
-void google_protobuf_FileDescriptorProto_set_message_type(google_protobuf_FileDescriptorProto *msg, upb_array* value) {
- msg->message_type = value;
-}
-const upb_array* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto *msg) {
- return msg->enum_type;
-}
-void google_protobuf_FileDescriptorProto_set_enum_type(google_protobuf_FileDescriptorProto *msg, upb_array* value) {
- msg->enum_type = value;
-}
-const upb_array* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg) {
- return msg->service;
-}
-void google_protobuf_FileDescriptorProto_set_service(google_protobuf_FileDescriptorProto *msg, upb_array* value) {
- msg->service = value;
-}
-const upb_array* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg) {
- return msg->extension;
-}
-void google_protobuf_FileDescriptorProto_set_extension(google_protobuf_FileDescriptorProto *msg, upb_array* value) {
- msg->extension = value;
-}
-const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg) {
- return msg->options;
-}
-void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) {
- msg->options = value;
-}
-const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg) {
- return msg->source_code_info;
-}
-void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) {
- msg->source_code_info = value;
-}
-const upb_array* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg) {
- return msg->public_dependency;
-}
-void google_protobuf_FileDescriptorProto_set_public_dependency(google_protobuf_FileDescriptorProto *msg, upb_array* value) {
- msg->public_dependency = value;
-}
-const upb_array* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg) {
- return msg->weak_dependency;
-}
-void google_protobuf_FileDescriptorProto_set_weak_dependency(google_protobuf_FileDescriptorProto *msg, upb_array* value) {
- msg->weak_dependency = value;
-}
-upb_stringview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg) {
- return msg->syntax;
-}
-void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_stringview value) {
- msg->syntax = value;
-}
-struct google_protobuf_DescriptorProto {
- upb_stringview name;
- google_protobuf_MessageOptions* options;
- upb_array* field;
- upb_array* nested_type;
- upb_array* enum_type;
- upb_array* extension_range;
- upb_array* extension;
- upb_array* oneof_decl;
- upb_array* reserved_range;
- upb_array* reserved_name;
-};
-
static const upb_msglayout *const google_protobuf_DescriptorProto_submsgs[8] = {
&google_protobuf_DescriptorProto_msginit,
&google_protobuf_DescriptorProto_ExtensionRange_msginit,
@@ -235,88 +90,6 @@ const upb_msglayout google_protobuf_DescriptorProto_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_DescriptorProto), 10, 0, false, true
};
-google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(upb_env *env) {
- google_protobuf_DescriptorProto *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_DescriptorProto *msg = google_protobuf_DescriptorProto_new(env);
- if (upb_decode(buf, msg, &google_protobuf_DescriptorProto_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_DescriptorProto_serialize(google_protobuf_DescriptorProto *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, env, size);
-}
-upb_stringview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg) {
- return msg->name;
-}
-void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_stringview value) {
- msg->name = value;
-}
-const upb_array* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg) {
- return msg->field;
-}
-void google_protobuf_DescriptorProto_set_field(google_protobuf_DescriptorProto *msg, upb_array* value) {
- msg->field = value;
-}
-const upb_array* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto *msg) {
- return msg->nested_type;
-}
-void google_protobuf_DescriptorProto_set_nested_type(google_protobuf_DescriptorProto *msg, upb_array* value) {
- msg->nested_type = value;
-}
-const upb_array* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto *msg) {
- return msg->enum_type;
-}
-void google_protobuf_DescriptorProto_set_enum_type(google_protobuf_DescriptorProto *msg, upb_array* value) {
- msg->enum_type = value;
-}
-const upb_array* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg) {
- return msg->extension_range;
-}
-void google_protobuf_DescriptorProto_set_extension_range(google_protobuf_DescriptorProto *msg, upb_array* value) {
- msg->extension_range = value;
-}
-const upb_array* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg) {
- return msg->extension;
-}
-void google_protobuf_DescriptorProto_set_extension(google_protobuf_DescriptorProto *msg, upb_array* value) {
- msg->extension = value;
-}
-const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg) {
- return msg->options;
-}
-void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) {
- msg->options = value;
-}
-const upb_array* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg) {
- return msg->oneof_decl;
-}
-void google_protobuf_DescriptorProto_set_oneof_decl(google_protobuf_DescriptorProto *msg, upb_array* value) {
- msg->oneof_decl = value;
-}
-const upb_array* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto *msg) {
- return msg->reserved_range;
-}
-void google_protobuf_DescriptorProto_set_reserved_range(google_protobuf_DescriptorProto *msg, upb_array* value) {
- msg->reserved_range = value;
-}
-const upb_array* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto *msg) {
- return msg->reserved_name;
-}
-void google_protobuf_DescriptorProto_set_reserved_name(google_protobuf_DescriptorProto *msg, upb_array* value) {
- msg->reserved_name = value;
-}
-struct google_protobuf_DescriptorProto_ExtensionRange {
- int32_t start;
- int32_t end;
- google_protobuf_ExtensionRangeOptions* options;
-};
-
static const upb_msglayout *const google_protobuf_DescriptorProto_ExtensionRange_submsgs[1] = {
&google_protobuf_ExtensionRangeOptions_msginit,
};
@@ -335,45 +108,6 @@ const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_DescriptorProto_ExtensionRange), 3, 0, false, true
};
-google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_new(upb_env *env) {
- google_protobuf_DescriptorProto_ExtensionRange *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_DescriptorProto_ExtensionRange *msg = google_protobuf_DescriptorProto_ExtensionRange_new(env);
- if (upb_decode(buf, msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_DescriptorProto_ExtensionRange_serialize(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, env, size);
-}
-int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) {
- return msg->start;
-}
-void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) {
- msg->start = value;
-}
-int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) {
- return msg->end;
-}
-void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) {
- msg->end = value;
-}
-const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) {
- return msg->options;
-}
-void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) {
- msg->options = value;
-}
-struct google_protobuf_DescriptorProto_ReservedRange {
- int32_t start;
- int32_t end;
-};
-
static const upb_msglayout_field google_protobuf_DescriptorProto_ReservedRange__fields[2] = {
{1, offsetof(google_protobuf_DescriptorProto_ReservedRange, start), 0, UPB_NOT_IN_ONEOF, UPB_NO_SUBMSG, 5, 1},
{2, offsetof(google_protobuf_DescriptorProto_ReservedRange, end), 1, UPB_NOT_IN_ONEOF, UPB_NO_SUBMSG, 5, 1},
@@ -387,38 +121,6 @@ const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_DescriptorProto_ReservedRange), 2, 0, false, true
};
-google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_new(upb_env *env) {
- google_protobuf_DescriptorProto_ReservedRange *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_DescriptorProto_ReservedRange *msg = google_protobuf_DescriptorProto_ReservedRange_new(env);
- if (upb_decode(buf, msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_DescriptorProto_ReservedRange_serialize(google_protobuf_DescriptorProto_ReservedRange *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, env, size);
-}
-int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg) {
- return msg->start;
-}
-void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) {
- msg->start = value;
-}
-int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg) {
- return msg->end;
-}
-void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) {
- msg->end = value;
-}
-struct google_protobuf_ExtensionRangeOptions {
- upb_array* uninterpreted_option;
-};
-
static const upb_msglayout *const google_protobuf_ExtensionRangeOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
@@ -435,41 +137,6 @@ const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_ExtensionRangeOptions), 1, 0, false, true
};
-google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_new(upb_env *env) {
- google_protobuf_ExtensionRangeOptions *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_ExtensionRangeOptions *msg = google_protobuf_ExtensionRangeOptions_new(env);
- if (upb_decode(buf, msg, &google_protobuf_ExtensionRangeOptions_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_ExtensionRangeOptions_serialize(google_protobuf_ExtensionRangeOptions *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, env, size);
-}
-const upb_array* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg) {
- return msg->uninterpreted_option;
-}
-void google_protobuf_ExtensionRangeOptions_set_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, upb_array* value) {
- msg->uninterpreted_option = value;
-}
-struct google_protobuf_FieldDescriptorProto {
- google_protobuf_FieldDescriptorProto_Label label;
- google_protobuf_FieldDescriptorProto_Type type;
- int32_t number;
- int32_t oneof_index;
- upb_stringview name;
- upb_stringview extendee;
- upb_stringview type_name;
- upb_stringview default_value;
- upb_stringview json_name;
- google_protobuf_FieldOptions* options;
-};
-
static const upb_msglayout *const google_protobuf_FieldDescriptorProto_submsgs[1] = {
&google_protobuf_FieldOptions_msginit,
};
@@ -495,87 +162,6 @@ const upb_msglayout google_protobuf_FieldDescriptorProto_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_FieldDescriptorProto), 10, 0, false, true
};
-google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_new(upb_env *env) {
- google_protobuf_FieldDescriptorProto *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_FieldDescriptorProto *msg = google_protobuf_FieldDescriptorProto_new(env);
- if (upb_decode(buf, msg, &google_protobuf_FieldDescriptorProto_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_FieldDescriptorProto_serialize(google_protobuf_FieldDescriptorProto *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, env, size);
-}
-upb_stringview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) {
- return msg->name;
-}
-void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_stringview value) {
- msg->name = value;
-}
-upb_stringview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) {
- return msg->extendee;
-}
-void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_stringview value) {
- msg->extendee = value;
-}
-int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) {
- return msg->number;
-}
-void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
- msg->number = value;
-}
-google_protobuf_FieldDescriptorProto_Label google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) {
- return msg->label;
-}
-void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Label value) {
- msg->label = value;
-}
-google_protobuf_FieldDescriptorProto_Type google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) {
- return msg->type;
-}
-void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Type value) {
- msg->type = value;
-}
-upb_stringview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) {
- return msg->type_name;
-}
-void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_stringview value) {
- msg->type_name = value;
-}
-upb_stringview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) {
- return msg->default_value;
-}
-void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_stringview value) {
- msg->default_value = value;
-}
-const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) {
- return msg->options;
-}
-void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) {
- msg->options = value;
-}
-int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) {
- return msg->oneof_index;
-}
-void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
- msg->oneof_index = value;
-}
-upb_stringview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) {
- return msg->json_name;
-}
-void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_stringview value) {
- msg->json_name = value;
-}
-struct google_protobuf_OneofDescriptorProto {
- upb_stringview name;
- google_protobuf_OneofOptions* options;
-};
-
static const upb_msglayout *const google_protobuf_OneofDescriptorProto_submsgs[1] = {
&google_protobuf_OneofOptions_msginit,
};
@@ -593,42 +179,6 @@ const upb_msglayout google_protobuf_OneofDescriptorProto_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_OneofDescriptorProto), 2, 0, false, true
};
-google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_new(upb_env *env) {
- google_protobuf_OneofDescriptorProto *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_OneofDescriptorProto *msg = google_protobuf_OneofDescriptorProto_new(env);
- if (upb_decode(buf, msg, &google_protobuf_OneofDescriptorProto_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_OneofDescriptorProto_serialize(google_protobuf_OneofDescriptorProto *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, env, size);
-}
-upb_stringview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg) {
- return msg->name;
-}
-void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_stringview value) {
- msg->name = value;
-}
-const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto *msg) {
- return msg->options;
-}
-void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) {
- msg->options = value;
-}
-struct google_protobuf_EnumDescriptorProto {
- upb_stringview name;
- google_protobuf_EnumOptions* options;
- upb_array* value;
- upb_array* reserved_range;
- upb_array* reserved_name;
-};
-
static const upb_msglayout *const google_protobuf_EnumDescriptorProto_submsgs[3] = {
&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit,
&google_protobuf_EnumOptions_msginit,
@@ -651,57 +201,6 @@ const upb_msglayout google_protobuf_EnumDescriptorProto_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_EnumDescriptorProto), 5, 0, false, true
};
-google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_new(upb_env *env) {
- google_protobuf_EnumDescriptorProto *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_EnumDescriptorProto *msg = google_protobuf_EnumDescriptorProto_new(env);
- if (upb_decode(buf, msg, &google_protobuf_EnumDescriptorProto_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_EnumDescriptorProto_serialize(google_protobuf_EnumDescriptorProto *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, env, size);
-}
-upb_stringview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg) {
- return msg->name;
-}
-void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_stringview value) {
- msg->name = value;
-}
-const upb_array* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg) {
- return msg->value;
-}
-void google_protobuf_EnumDescriptorProto_set_value(google_protobuf_EnumDescriptorProto *msg, upb_array* value) {
- msg->value = value;
-}
-const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg) {
- return msg->options;
-}
-void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) {
- msg->options = value;
-}
-const upb_array* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto *msg) {
- return msg->reserved_range;
-}
-void google_protobuf_EnumDescriptorProto_set_reserved_range(google_protobuf_EnumDescriptorProto *msg, upb_array* value) {
- msg->reserved_range = value;
-}
-const upb_array* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto *msg) {
- return msg->reserved_name;
-}
-void google_protobuf_EnumDescriptorProto_set_reserved_name(google_protobuf_EnumDescriptorProto *msg, upb_array* value) {
- msg->reserved_name = value;
-}
-struct google_protobuf_EnumDescriptorProto_EnumReservedRange {
- int32_t start;
- int32_t end;
-};
-
static const upb_msglayout_field google_protobuf_EnumDescriptorProto_EnumReservedRange__fields[2] = {
{1, offsetof(google_protobuf_EnumDescriptorProto_EnumReservedRange, start), 0, UPB_NOT_IN_ONEOF, UPB_NO_SUBMSG, 5, 1},
{2, offsetof(google_protobuf_EnumDescriptorProto_EnumReservedRange, end), 1, UPB_NOT_IN_ONEOF, UPB_NO_SUBMSG, 5, 1},
@@ -715,40 +214,6 @@ const upb_msglayout google_protobuf_EnumDescriptorProto_EnumReservedRange_msgini
UPB_ALIGNED_SIZEOF(google_protobuf_EnumDescriptorProto_EnumReservedRange), 2, 0, false, true
};
-google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_env *env) {
- google_protobuf_EnumDescriptorProto_EnumReservedRange *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_EnumDescriptorProto_EnumReservedRange *msg = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(env);
- if (upb_decode(buf, msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, env, size);
-}
-int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) {
- return msg->start;
-}
-void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) {
- msg->start = value;
-}
-int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) {
- return msg->end;
-}
-void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) {
- msg->end = value;
-}
-struct google_protobuf_EnumValueDescriptorProto {
- int32_t number;
- upb_stringview name;
- google_protobuf_EnumValueOptions* options;
-};
-
static const upb_msglayout *const google_protobuf_EnumValueDescriptorProto_submsgs[1] = {
&google_protobuf_EnumValueOptions_msginit,
};
@@ -767,46 +232,6 @@ const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_EnumValueDescriptorProto), 3, 0, false, true
};
-google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_new(upb_env *env) {
- google_protobuf_EnumValueDescriptorProto *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_EnumValueDescriptorProto *msg = google_protobuf_EnumValueDescriptorProto_new(env);
- if (upb_decode(buf, msg, &google_protobuf_EnumValueDescriptorProto_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_EnumValueDescriptorProto_serialize(google_protobuf_EnumValueDescriptorProto *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, env, size);
-}
-upb_stringview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg) {
- return msg->name;
-}
-void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_stringview value) {
- msg->name = value;
-}
-int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg) {
- return msg->number;
-}
-void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) {
- msg->number = value;
-}
-const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg) {
- return msg->options;
-}
-void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) {
- msg->options = value;
-}
-struct google_protobuf_ServiceDescriptorProto {
- upb_stringview name;
- google_protobuf_ServiceOptions* options;
- upb_array* method;
-};
-
static const upb_msglayout *const google_protobuf_ServiceDescriptorProto_submsgs[2] = {
&google_protobuf_MethodDescriptorProto_msginit,
&google_protobuf_ServiceOptions_msginit,
@@ -826,49 +251,6 @@ const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_ServiceDescriptorProto), 3, 0, false, true
};
-google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_new(upb_env *env) {
- google_protobuf_ServiceDescriptorProto *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_ServiceDescriptorProto *msg = google_protobuf_ServiceDescriptorProto_new(env);
- if (upb_decode(buf, msg, &google_protobuf_ServiceDescriptorProto_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_ServiceDescriptorProto_serialize(google_protobuf_ServiceDescriptorProto *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, env, size);
-}
-upb_stringview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg) {
- return msg->name;
-}
-void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_stringview value) {
- msg->name = value;
-}
-const upb_array* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg) {
- return msg->method;
-}
-void google_protobuf_ServiceDescriptorProto_set_method(google_protobuf_ServiceDescriptorProto *msg, upb_array* value) {
- msg->method = value;
-}
-const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg) {
- return msg->options;
-}
-void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) {
- msg->options = value;
-}
-struct google_protobuf_MethodDescriptorProto {
- bool client_streaming;
- bool server_streaming;
- upb_stringview name;
- upb_stringview input_type;
- upb_stringview output_type;
- google_protobuf_MethodOptions* options;
-};
-
static const upb_msglayout *const google_protobuf_MethodDescriptorProto_submsgs[1] = {
&google_protobuf_MethodOptions_msginit,
};
@@ -890,80 +272,6 @@ const upb_msglayout google_protobuf_MethodDescriptorProto_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_MethodDescriptorProto), 6, 0, false, true
};
-google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_new(upb_env *env) {
- google_protobuf_MethodDescriptorProto *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_MethodDescriptorProto *msg = google_protobuf_MethodDescriptorProto_new(env);
- if (upb_decode(buf, msg, &google_protobuf_MethodDescriptorProto_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_MethodDescriptorProto_serialize(google_protobuf_MethodDescriptorProto *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, env, size);
-}
-upb_stringview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg) {
- return msg->name;
-}
-void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_stringview value) {
- msg->name = value;
-}
-upb_stringview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg) {
- return msg->input_type;
-}
-void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_stringview value) {
- msg->input_type = value;
-}
-upb_stringview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg) {
- return msg->output_type;
-}
-void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_stringview value) {
- msg->output_type = value;
-}
-const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg) {
- return msg->options;
-}
-void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) {
- msg->options = value;
-}
-bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg) {
- return msg->client_streaming;
-}
-void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
- msg->client_streaming = value;
-}
-bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg) {
- return msg->server_streaming;
-}
-void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
- msg->server_streaming = value;
-}
-struct google_protobuf_FileOptions {
- google_protobuf_FileOptions_OptimizeMode optimize_for;
- bool java_multiple_files;
- bool cc_generic_services;
- bool java_generic_services;
- bool py_generic_services;
- bool java_generate_equals_and_hash;
- bool deprecated;
- bool java_string_check_utf8;
- bool cc_enable_arenas;
- bool php_generic_services;
- upb_stringview java_package;
- upb_stringview java_outer_classname;
- upb_stringview go_package;
- upb_stringview objc_class_prefix;
- upb_stringview csharp_namespace;
- upb_stringview swift_prefix;
- upb_stringview php_class_prefix;
- upb_stringview php_namespace;
- upb_array* uninterpreted_option;
-};
-
static const upb_msglayout *const google_protobuf_FileOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
@@ -998,144 +306,6 @@ const upb_msglayout google_protobuf_FileOptions_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_FileOptions), 19, 0, false, true
};
-google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_env *env) {
- google_protobuf_FileOptions *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_FileOptions *google_protobuf_FileOptions_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_FileOptions *msg = google_protobuf_FileOptions_new(env);
- if (upb_decode(buf, msg, &google_protobuf_FileOptions_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_FileOptions_serialize(google_protobuf_FileOptions *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_FileOptions_msginit, env, size);
-}
-upb_stringview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) {
- return msg->java_package;
-}
-void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_stringview value) {
- msg->java_package = value;
-}
-upb_stringview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) {
- return msg->java_outer_classname;
-}
-void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_stringview value) {
- msg->java_outer_classname = value;
-}
-google_protobuf_FileOptions_OptimizeMode google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) {
- return msg->optimize_for;
-}
-void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, google_protobuf_FileOptions_OptimizeMode value) {
- msg->optimize_for = value;
-}
-bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) {
- return msg->java_multiple_files;
-}
-void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) {
- msg->java_multiple_files = value;
-}
-upb_stringview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) {
- return msg->go_package;
-}
-void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_stringview value) {
- msg->go_package = value;
-}
-bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) {
- return msg->cc_generic_services;
-}
-void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) {
- msg->cc_generic_services = value;
-}
-bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) {
- return msg->java_generic_services;
-}
-void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) {
- msg->java_generic_services = value;
-}
-bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) {
- return msg->py_generic_services;
-}
-void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) {
- msg->py_generic_services = value;
-}
-bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) {
- return msg->java_generate_equals_and_hash;
-}
-void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) {
- msg->java_generate_equals_and_hash = value;
-}
-bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) {
- return msg->deprecated;
-}
-void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) {
- msg->deprecated = value;
-}
-bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg) {
- return msg->java_string_check_utf8;
-}
-void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) {
- msg->java_string_check_utf8 = value;
-}
-bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) {
- return msg->cc_enable_arenas;
-}
-void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) {
- msg->cc_enable_arenas = value;
-}
-upb_stringview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) {
- return msg->objc_class_prefix;
-}
-void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_stringview value) {
- msg->objc_class_prefix = value;
-}
-upb_stringview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) {
- return msg->csharp_namespace;
-}
-void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_stringview value) {
- msg->csharp_namespace = value;
-}
-upb_stringview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) {
- return msg->swift_prefix;
-}
-void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_stringview value) {
- msg->swift_prefix = value;
-}
-upb_stringview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) {
- return msg->php_class_prefix;
-}
-void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_stringview value) {
- msg->php_class_prefix = value;
-}
-upb_stringview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) {
- return msg->php_namespace;
-}
-void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_stringview value) {
- msg->php_namespace = value;
-}
-bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) {
- return msg->php_generic_services;
-}
-void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) {
- msg->php_generic_services = value;
-}
-const upb_array* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg) {
- return msg->uninterpreted_option;
-}
-void google_protobuf_FileOptions_set_uninterpreted_option(google_protobuf_FileOptions *msg, upb_array* value) {
- msg->uninterpreted_option = value;
-}
-struct google_protobuf_MessageOptions {
- bool message_set_wire_format;
- bool no_standard_descriptor_accessor;
- bool deprecated;
- bool map_entry;
- upb_array* uninterpreted_option;
-};
-
static const upb_msglayout *const google_protobuf_MessageOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
@@ -1156,62 +326,6 @@ const upb_msglayout google_protobuf_MessageOptions_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_MessageOptions), 5, 0, false, true
};
-google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(upb_env *env) {
- google_protobuf_MessageOptions *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_MessageOptions *google_protobuf_MessageOptions_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_MessageOptions *msg = google_protobuf_MessageOptions_new(env);
- if (upb_decode(buf, msg, &google_protobuf_MessageOptions_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_MessageOptions_serialize(google_protobuf_MessageOptions *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_MessageOptions_msginit, env, size);
-}
-bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg) {
- return msg->message_set_wire_format;
-}
-void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) {
- msg->message_set_wire_format = value;
-}
-bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) {
- return msg->no_standard_descriptor_accessor;
-}
-void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) {
- msg->no_standard_descriptor_accessor = value;
-}
-bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg) {
- return msg->deprecated;
-}
-void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) {
- msg->deprecated = value;
-}
-bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg) {
- return msg->map_entry;
-}
-void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) {
- msg->map_entry = value;
-}
-const upb_array* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg) {
- return msg->uninterpreted_option;
-}
-void google_protobuf_MessageOptions_set_uninterpreted_option(google_protobuf_MessageOptions *msg, upb_array* value) {
- msg->uninterpreted_option = value;
-}
-struct google_protobuf_FieldOptions {
- google_protobuf_FieldOptions_CType ctype;
- google_protobuf_FieldOptions_JSType jstype;
- bool packed;
- bool deprecated;
- bool lazy;
- bool weak;
- upb_array* uninterpreted_option;
-};
-
static const upb_msglayout *const google_protobuf_FieldOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
@@ -1234,68 +348,6 @@ const upb_msglayout google_protobuf_FieldOptions_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_FieldOptions), 7, 0, false, true
};
-google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_env *env) {
- google_protobuf_FieldOptions *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_FieldOptions *google_protobuf_FieldOptions_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_FieldOptions *msg = google_protobuf_FieldOptions_new(env);
- if (upb_decode(buf, msg, &google_protobuf_FieldOptions_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_FieldOptions_serialize(google_protobuf_FieldOptions *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_FieldOptions_msginit, env, size);
-}
-google_protobuf_FieldOptions_CType google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) {
- return msg->ctype;
-}
-void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_CType value) {
- msg->ctype = value;
-}
-bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) {
- return msg->packed;
-}
-void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) {
- msg->packed = value;
-}
-bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) {
- return msg->deprecated;
-}
-void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) {
- msg->deprecated = value;
-}
-bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) {
- return msg->lazy;
-}
-void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) {
- msg->lazy = value;
-}
-google_protobuf_FieldOptions_JSType google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) {
- return msg->jstype;
-}
-void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_JSType value) {
- msg->jstype = value;
-}
-bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) {
- return msg->weak;
-}
-void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) {
- msg->weak = value;
-}
-const upb_array* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg) {
- return msg->uninterpreted_option;
-}
-void google_protobuf_FieldOptions_set_uninterpreted_option(google_protobuf_FieldOptions *msg, upb_array* value) {
- msg->uninterpreted_option = value;
-}
-struct google_protobuf_OneofOptions {
- upb_array* uninterpreted_option;
-};
-
static const upb_msglayout *const google_protobuf_OneofOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
@@ -1312,34 +364,6 @@ const upb_msglayout google_protobuf_OneofOptions_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_OneofOptions), 1, 0, false, true
};
-google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_env *env) {
- google_protobuf_OneofOptions *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_OneofOptions *google_protobuf_OneofOptions_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_OneofOptions *msg = google_protobuf_OneofOptions_new(env);
- if (upb_decode(buf, msg, &google_protobuf_OneofOptions_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_OneofOptions_serialize(google_protobuf_OneofOptions *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_OneofOptions_msginit, env, size);
-}
-const upb_array* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions *msg) {
- return msg->uninterpreted_option;
-}
-void google_protobuf_OneofOptions_set_uninterpreted_option(google_protobuf_OneofOptions *msg, upb_array* value) {
- msg->uninterpreted_option = value;
-}
-struct google_protobuf_EnumOptions {
- bool allow_alias;
- bool deprecated;
- upb_array* uninterpreted_option;
-};
-
static const upb_msglayout *const google_protobuf_EnumOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
@@ -1358,45 +382,6 @@ const upb_msglayout google_protobuf_EnumOptions_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_EnumOptions), 3, 0, false, true
};
-google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_env *env) {
- google_protobuf_EnumOptions *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_EnumOptions *google_protobuf_EnumOptions_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_EnumOptions *msg = google_protobuf_EnumOptions_new(env);
- if (upb_decode(buf, msg, &google_protobuf_EnumOptions_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_EnumOptions_serialize(google_protobuf_EnumOptions *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_EnumOptions_msginit, env, size);
-}
-bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg) {
- return msg->allow_alias;
-}
-void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) {
- msg->allow_alias = value;
-}
-bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg) {
- return msg->deprecated;
-}
-void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) {
- msg->deprecated = value;
-}
-const upb_array* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg) {
- return msg->uninterpreted_option;
-}
-void google_protobuf_EnumOptions_set_uninterpreted_option(google_protobuf_EnumOptions *msg, upb_array* value) {
- msg->uninterpreted_option = value;
-}
-struct google_protobuf_EnumValueOptions {
- bool deprecated;
- upb_array* uninterpreted_option;
-};
-
static const upb_msglayout *const google_protobuf_EnumValueOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
@@ -1414,39 +399,6 @@ const upb_msglayout google_protobuf_EnumValueOptions_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_EnumValueOptions), 2, 0, false, true
};
-google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_new(upb_env *env) {
- google_protobuf_EnumValueOptions *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_EnumValueOptions *msg = google_protobuf_EnumValueOptions_new(env);
- if (upb_decode(buf, msg, &google_protobuf_EnumValueOptions_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_EnumValueOptions_serialize(google_protobuf_EnumValueOptions *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, env, size);
-}
-bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg) {
- return msg->deprecated;
-}
-void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) {
- msg->deprecated = value;
-}
-const upb_array* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg) {
- return msg->uninterpreted_option;
-}
-void google_protobuf_EnumValueOptions_set_uninterpreted_option(google_protobuf_EnumValueOptions *msg, upb_array* value) {
- msg->uninterpreted_option = value;
-}
-struct google_protobuf_ServiceOptions {
- bool deprecated;
- upb_array* uninterpreted_option;
-};
-
static const upb_msglayout *const google_protobuf_ServiceOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
@@ -1464,40 +416,6 @@ const upb_msglayout google_protobuf_ServiceOptions_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_ServiceOptions), 2, 0, false, true
};
-google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(upb_env *env) {
- google_protobuf_ServiceOptions *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_ServiceOptions *msg = google_protobuf_ServiceOptions_new(env);
- if (upb_decode(buf, msg, &google_protobuf_ServiceOptions_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_ServiceOptions_serialize(google_protobuf_ServiceOptions *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, env, size);
-}
-bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg) {
- return msg->deprecated;
-}
-void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) {
- msg->deprecated = value;
-}
-const upb_array* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg) {
- return msg->uninterpreted_option;
-}
-void google_protobuf_ServiceOptions_set_uninterpreted_option(google_protobuf_ServiceOptions *msg, upb_array* value) {
- msg->uninterpreted_option = value;
-}
-struct google_protobuf_MethodOptions {
- google_protobuf_MethodOptions_IdempotencyLevel idempotency_level;
- bool deprecated;
- upb_array* uninterpreted_option;
-};
-
static const upb_msglayout *const google_protobuf_MethodOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
@@ -1516,50 +434,6 @@ const upb_msglayout google_protobuf_MethodOptions_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_MethodOptions), 3, 0, false, true
};
-google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_env *env) {
- google_protobuf_MethodOptions *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_MethodOptions *google_protobuf_MethodOptions_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_MethodOptions *msg = google_protobuf_MethodOptions_new(env);
- if (upb_decode(buf, msg, &google_protobuf_MethodOptions_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_MethodOptions_serialize(google_protobuf_MethodOptions *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_MethodOptions_msginit, env, size);
-}
-bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) {
- return msg->deprecated;
-}
-void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) {
- msg->deprecated = value;
-}
-google_protobuf_MethodOptions_IdempotencyLevel google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) {
- return msg->idempotency_level;
-}
-void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, google_protobuf_MethodOptions_IdempotencyLevel value) {
- msg->idempotency_level = value;
-}
-const upb_array* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg) {
- return msg->uninterpreted_option;
-}
-void google_protobuf_MethodOptions_set_uninterpreted_option(google_protobuf_MethodOptions *msg, upb_array* value) {
- msg->uninterpreted_option = value;
-}
-struct google_protobuf_UninterpretedOption {
- uint64_t positive_int_value;
- int64_t negative_int_value;
- double double_value;
- upb_stringview identifier_value;
- upb_stringview string_value;
- upb_stringview aggregate_value;
- upb_array* name;
-};
-
static const upb_msglayout *const google_protobuf_UninterpretedOption_submsgs[1] = {
&google_protobuf_UninterpretedOption_NamePart_msginit,
};
@@ -1582,69 +456,6 @@ const upb_msglayout google_protobuf_UninterpretedOption_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_UninterpretedOption), 7, 0, false, true
};
-google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_new(upb_env *env) {
- google_protobuf_UninterpretedOption *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_UninterpretedOption *msg = google_protobuf_UninterpretedOption_new(env);
- if (upb_decode(buf, msg, &google_protobuf_UninterpretedOption_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_UninterpretedOption_serialize(google_protobuf_UninterpretedOption *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, env, size);
-}
-const upb_array* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg) {
- return msg->name;
-}
-void google_protobuf_UninterpretedOption_set_name(google_protobuf_UninterpretedOption *msg, upb_array* value) {
- msg->name = value;
-}
-upb_stringview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg) {
- return msg->identifier_value;
-}
-void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_stringview value) {
- msg->identifier_value = value;
-}
-uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg) {
- return msg->positive_int_value;
-}
-void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) {
- msg->positive_int_value = value;
-}
-int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg) {
- return msg->negative_int_value;
-}
-void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) {
- msg->negative_int_value = value;
-}
-double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg) {
- return msg->double_value;
-}
-void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) {
- msg->double_value = value;
-}
-upb_stringview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg) {
- return msg->string_value;
-}
-void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_stringview value) {
- msg->string_value = value;
-}
-upb_stringview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg) {
- return msg->aggregate_value;
-}
-void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_stringview value) {
- msg->aggregate_value = value;
-}
-struct google_protobuf_UninterpretedOption_NamePart {
- bool is_extension;
- upb_stringview name_part;
-};
-
static const upb_msglayout_field google_protobuf_UninterpretedOption_NamePart__fields[2] = {
{1, offsetof(google_protobuf_UninterpretedOption_NamePart, name_part), 1, UPB_NOT_IN_ONEOF, UPB_NO_SUBMSG, 9, 2},
{2, offsetof(google_protobuf_UninterpretedOption_NamePart, is_extension), 0, UPB_NOT_IN_ONEOF, UPB_NO_SUBMSG, 8, 2},
@@ -1658,38 +469,6 @@ const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_UninterpretedOption_NamePart), 2, 0, false, true
};
-google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_new(upb_env *env) {
- google_protobuf_UninterpretedOption_NamePart *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_UninterpretedOption_NamePart *msg = google_protobuf_UninterpretedOption_NamePart_new(env);
- if (upb_decode(buf, msg, &google_protobuf_UninterpretedOption_NamePart_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_UninterpretedOption_NamePart_serialize(google_protobuf_UninterpretedOption_NamePart *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, env, size);
-}
-upb_stringview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) {
- return msg->name_part;
-}
-void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_stringview value) {
- msg->name_part = value;
-}
-bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) {
- return msg->is_extension;
-}
-void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) {
- msg->is_extension = value;
-}
-struct google_protobuf_SourceCodeInfo {
- upb_array* location;
-};
-
static const upb_msglayout *const google_protobuf_SourceCodeInfo_submsgs[1] = {
&google_protobuf_SourceCodeInfo_Location_msginit,
};
@@ -1706,36 +485,6 @@ const upb_msglayout google_protobuf_SourceCodeInfo_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_SourceCodeInfo), 1, 0, false, true
};
-google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(upb_env *env) {
- google_protobuf_SourceCodeInfo *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_SourceCodeInfo *msg = google_protobuf_SourceCodeInfo_new(env);
- if (upb_decode(buf, msg, &google_protobuf_SourceCodeInfo_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_SourceCodeInfo_serialize(google_protobuf_SourceCodeInfo *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, env, size);
-}
-const upb_array* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo *msg) {
- return msg->location;
-}
-void google_protobuf_SourceCodeInfo_set_location(google_protobuf_SourceCodeInfo *msg, upb_array* value) {
- msg->location = value;
-}
-struct google_protobuf_SourceCodeInfo_Location {
- upb_stringview leading_comments;
- upb_stringview trailing_comments;
- upb_array* path;
- upb_array* span;
- upb_array* leading_detached_comments;
-};
-
static const upb_msglayout_field google_protobuf_SourceCodeInfo_Location__fields[5] = {
{1, offsetof(google_protobuf_SourceCodeInfo_Location, path), UPB_NO_HASBIT, UPB_NOT_IN_ONEOF, UPB_NO_SUBMSG, 5, 3},
{2, offsetof(google_protobuf_SourceCodeInfo_Location, span), UPB_NO_HASBIT, UPB_NOT_IN_ONEOF, UPB_NO_SUBMSG, 5, 3},
@@ -1752,56 +501,6 @@ const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_SourceCodeInfo_Location), 5, 0, false, true
};
-google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_new(upb_env *env) {
- google_protobuf_SourceCodeInfo_Location *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_SourceCodeInfo_Location *msg = google_protobuf_SourceCodeInfo_Location_new(env);
- if (upb_decode(buf, msg, &google_protobuf_SourceCodeInfo_Location_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_SourceCodeInfo_Location_serialize(google_protobuf_SourceCodeInfo_Location *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, env, size);
-}
-const upb_array* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg) {
- return msg->path;
-}
-void google_protobuf_SourceCodeInfo_Location_set_path(google_protobuf_SourceCodeInfo_Location *msg, upb_array* value) {
- msg->path = value;
-}
-const upb_array* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg) {
- return msg->span;
-}
-void google_protobuf_SourceCodeInfo_Location_set_span(google_protobuf_SourceCodeInfo_Location *msg, upb_array* value) {
- msg->span = value;
-}
-upb_stringview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) {
- return msg->leading_comments;
-}
-void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_stringview value) {
- msg->leading_comments = value;
-}
-upb_stringview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) {
- return msg->trailing_comments;
-}
-void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_stringview value) {
- msg->trailing_comments = value;
-}
-const upb_array* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg) {
- return msg->leading_detached_comments;
-}
-void google_protobuf_SourceCodeInfo_Location_set_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_array* value) {
- msg->leading_detached_comments = value;
-}
-struct google_protobuf_GeneratedCodeInfo {
- upb_array* annotation;
-};
-
static const upb_msglayout *const google_protobuf_GeneratedCodeInfo_submsgs[1] = {
&google_protobuf_GeneratedCodeInfo_Annotation_msginit,
};
@@ -1818,35 +517,6 @@ const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_GeneratedCodeInfo), 1, 0, false, true
};
-google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_new(upb_env *env) {
- google_protobuf_GeneratedCodeInfo *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_GeneratedCodeInfo *msg = google_protobuf_GeneratedCodeInfo_new(env);
- if (upb_decode(buf, msg, &google_protobuf_GeneratedCodeInfo_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_GeneratedCodeInfo_serialize(google_protobuf_GeneratedCodeInfo *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, env, size);
-}
-const upb_array* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo *msg) {
- return msg->annotation;
-}
-void google_protobuf_GeneratedCodeInfo_set_annotation(google_protobuf_GeneratedCodeInfo *msg, upb_array* value) {
- msg->annotation = value;
-}
-struct google_protobuf_GeneratedCodeInfo_Annotation {
- int32_t begin;
- int32_t end;
- upb_stringview source_file;
- upb_array* path;
-};
-
static const upb_msglayout_field google_protobuf_GeneratedCodeInfo_Annotation__fields[4] = {
{1, offsetof(google_protobuf_GeneratedCodeInfo_Annotation, path), UPB_NO_HASBIT, UPB_NOT_IN_ONEOF, UPB_NO_SUBMSG, 5, 3},
{2, offsetof(google_protobuf_GeneratedCodeInfo_Annotation, source_file), 2, UPB_NOT_IN_ONEOF, UPB_NO_SUBMSG, 9, 1},
@@ -1862,43 +532,3 @@ const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit = {
UPB_ALIGNED_SIZEOF(google_protobuf_GeneratedCodeInfo_Annotation), 4, 0, false, true
};
-google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_new(upb_env *env) {
- google_protobuf_GeneratedCodeInfo_Annotation *msg = upb_env_malloc(env, sizeof(*msg));
- memset(msg, 0, sizeof(*msg)); /* TODO: defaults */
- return msg;
-}
-google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parsenew(upb_stringview buf, upb_env *env) {
- google_protobuf_GeneratedCodeInfo_Annotation *msg = google_protobuf_GeneratedCodeInfo_Annotation_new(env);
- if (upb_decode(buf, msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, env)) {
- return msg;
- } else {
- return NULL;
- }
-}
-char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_env *env, size_t *size) {
- return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, env, size);
-}
-const upb_array* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg) {
- return msg->path;
-}
-void google_protobuf_GeneratedCodeInfo_Annotation_set_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_array* value) {
- msg->path = value;
-}
-upb_stringview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) {
- return msg->source_file;
-}
-void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_stringview value) {
- msg->source_file = value;
-}
-int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) {
- return msg->begin;
-}
-void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
- msg->begin = value;
-}
-int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) {
- return msg->end;
-}
-void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
- msg->end = value;
-}
diff --git a/google/protobuf/descriptor.upb.h b/google/protobuf/descriptor.upb.h
index e7e9934..aea011d 100644
--- a/google/protobuf/descriptor.upb.h
+++ b/google/protobuf/descriptor.upb.h
@@ -11,6 +11,8 @@
#include "upb/msg.h"
+#include "upb/decode.h"
+#include "upb/encode.h"
UPB_BEGIN_EXTERN_C
struct google_protobuf_FileDescriptorSet;
@@ -120,573 +122,662 @@ typedef enum {
google_protobuf_MethodOptions_IDEMPOTENT = 2
} google_protobuf_MethodOptions_IdempotencyLevel;
-/* google_protobuf_FileDescriptorSet */
-extern const upb_msglayout google_protobuf_FileDescriptorSet_msginit;
-google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_new(upb_env *env);
-google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_FileDescriptorSet_serialize(google_protobuf_FileDescriptorSet *msg, upb_env *env, size_t *len);
-void google_protobuf_FileDescriptorSet_free(google_protobuf_FileDescriptorSet *msg, upb_env *env);
-
-/* getters. */
-const upb_array* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet *msg);
-
-/* setters. */
-void google_protobuf_FileDescriptorSet_set_file(google_protobuf_FileDescriptorSet *msg, upb_array* value);
+struct google_protobuf_FileDescriptorSet {
+ upb_array* file;
+};
+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);
+}
+
+struct google_protobuf_FileDescriptorProto {
+ struct {
+ bool name:1;
+ bool package:1;
+ bool syntax:1;
+ bool options:1;
+ bool source_code_info:1;
+ } has;
+ upb_stringview name;
+ upb_stringview package;
+ upb_stringview syntax;
+ google_protobuf_FileOptions* options;
+ google_protobuf_SourceCodeInfo* source_code_info;
+ upb_array* dependency;
+ upb_array* message_type;
+ upb_array* enum_type;
+ upb_array* service;
+ upb_array* extension;
+ upb_array* public_dependency;
+ upb_array* weak_dependency;
+};
-/* google_protobuf_FileDescriptorProto */
extern const upb_msglayout google_protobuf_FileDescriptorProto_msginit;
-google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_new(upb_env *env);
-google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_FileDescriptorProto_serialize(google_protobuf_FileDescriptorProto *msg, upb_env *env, size_t *len);
-void google_protobuf_FileDescriptorProto_free(google_protobuf_FileDescriptorProto *msg, upb_env *env);
-
-/* getters. */
-upb_stringview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg);
-upb_stringview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg);
-const upb_array* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg);
-const upb_array* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto *msg);
-const upb_array* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto *msg);
-const upb_array* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg);
-const upb_array* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg);
-const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg);
-const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg);
-const upb_array* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg);
-const upb_array* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg);
-upb_stringview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg);
-
-/* setters. */
-void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_stringview value);
-void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_stringview value);
-void google_protobuf_FileDescriptorProto_set_dependency(google_protobuf_FileDescriptorProto *msg, upb_array* value);
-void google_protobuf_FileDescriptorProto_set_message_type(google_protobuf_FileDescriptorProto *msg, upb_array* value);
-void google_protobuf_FileDescriptorProto_set_enum_type(google_protobuf_FileDescriptorProto *msg, upb_array* value);
-void google_protobuf_FileDescriptorProto_set_service(google_protobuf_FileDescriptorProto *msg, upb_array* value);
-void google_protobuf_FileDescriptorProto_set_extension(google_protobuf_FileDescriptorProto *msg, upb_array* value);
-void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value);
-void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value);
-void google_protobuf_FileDescriptorProto_set_public_dependency(google_protobuf_FileDescriptorProto *msg, upb_array* value);
-void google_protobuf_FileDescriptorProto_set_weak_dependency(google_protobuf_FileDescriptorProto *msg, upb_array* value);
-void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_stringview value);
-
-
-/* google_protobuf_DescriptorProto */
-extern const upb_msglayout google_protobuf_DescriptorProto_msginit;
-google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(upb_env *env);
-google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_DescriptorProto_serialize(google_protobuf_DescriptorProto *msg, upb_env *env, size_t *len);
-void google_protobuf_DescriptorProto_free(google_protobuf_DescriptorProto *msg, upb_env *env);
-
-/* getters. */
-upb_stringview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg);
-const upb_array* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg);
-const upb_array* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto *msg);
-const upb_array* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto *msg);
-const upb_array* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg);
-const upb_array* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg);
-const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg);
-const upb_array* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg);
-const upb_array* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto *msg);
-const upb_array* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto *msg);
-
-/* setters. */
-void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_stringview value);
-void google_protobuf_DescriptorProto_set_field(google_protobuf_DescriptorProto *msg, upb_array* value);
-void google_protobuf_DescriptorProto_set_nested_type(google_protobuf_DescriptorProto *msg, upb_array* value);
-void google_protobuf_DescriptorProto_set_enum_type(google_protobuf_DescriptorProto *msg, upb_array* value);
-void google_protobuf_DescriptorProto_set_extension_range(google_protobuf_DescriptorProto *msg, upb_array* value);
-void google_protobuf_DescriptorProto_set_extension(google_protobuf_DescriptorProto *msg, upb_array* value);
-void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value);
-void google_protobuf_DescriptorProto_set_oneof_decl(google_protobuf_DescriptorProto *msg, upb_array* value);
-void google_protobuf_DescriptorProto_set_reserved_range(google_protobuf_DescriptorProto *msg, upb_array* value);
-void google_protobuf_DescriptorProto_set_reserved_name(google_protobuf_DescriptorProto *msg, upb_array* value);
-
-
-/* google_protobuf_DescriptorProto_ExtensionRange */
-extern const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit;
-google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_new(upb_env *env);
-google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_DescriptorProto_ExtensionRange_serialize(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_env *env, size_t *len);
-void google_protobuf_DescriptorProto_ExtensionRange_free(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_env *env);
+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);
+}
+
+struct google_protobuf_DescriptorProto {
+ struct {
+ bool name:1;
+ bool options:1;
+ } has;
+ upb_stringview name;
+ google_protobuf_MessageOptions* options;
+ upb_array* field;
+ upb_array* nested_type;
+ upb_array* enum_type;
+ upb_array* extension_range;
+ upb_array* extension;
+ upb_array* oneof_decl;
+ upb_array* reserved_range;
+ upb_array* reserved_name;
+};
-/* getters. */
-int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg);
-int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg);
-const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg);
-
-/* setters. */
-void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value);
-void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value);
-void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value);
+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);
+}
+
+struct google_protobuf_DescriptorProto_ExtensionRange {
+ struct {
+ bool start:1;
+ bool end:1;
+ bool options:1;
+ } has;
+ int32_t start;
+ int32_t end;
+ google_protobuf_ExtensionRangeOptions* options;
+};
+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);
+}
+
+struct google_protobuf_DescriptorProto_ReservedRange {
+ struct {
+ bool start:1;
+ bool end:1;
+ } has;
+ int32_t start;
+ int32_t end;
+};
-/* google_protobuf_DescriptorProto_ReservedRange */
extern const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit;
-google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_new(upb_env *env);
-google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_DescriptorProto_ReservedRange_serialize(google_protobuf_DescriptorProto_ReservedRange *msg, upb_env *env, size_t *len);
-void google_protobuf_DescriptorProto_ReservedRange_free(google_protobuf_DescriptorProto_ReservedRange *msg, upb_env *env);
-
-/* getters. */
-int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg);
-int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg);
-
-/* setters. */
-void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value);
-void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value);
-
+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);
+}
+
+struct google_protobuf_ExtensionRangeOptions {
+ upb_array* uninterpreted_option;
+};
-/* google_protobuf_ExtensionRangeOptions */
extern const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit;
-google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_new(upb_env *env);
-google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_ExtensionRangeOptions_serialize(google_protobuf_ExtensionRangeOptions *msg, upb_env *env, size_t *len);
-void google_protobuf_ExtensionRangeOptions_free(google_protobuf_ExtensionRangeOptions *msg, upb_env *env);
-
-/* getters. */
-const upb_array* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg);
-
-/* setters. */
-void google_protobuf_ExtensionRangeOptions_set_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, upb_array* value);
-
+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);
+}
+
+struct google_protobuf_FieldDescriptorProto {
+ struct {
+ bool label:1;
+ bool type:1;
+ bool number:1;
+ bool oneof_index:1;
+ bool name:1;
+ bool extendee:1;
+ bool type_name:1;
+ bool default_value:1;
+ bool json_name:1;
+ bool options:1;
+ } has;
+ google_protobuf_FieldDescriptorProto_Label label;
+ google_protobuf_FieldDescriptorProto_Type type;
+ int32_t number;
+ int32_t oneof_index;
+ upb_stringview name;
+ upb_stringview extendee;
+ upb_stringview type_name;
+ upb_stringview default_value;
+ upb_stringview json_name;
+ google_protobuf_FieldOptions* options;
+};
-/* google_protobuf_FieldDescriptorProto */
extern const upb_msglayout google_protobuf_FieldDescriptorProto_msginit;
-google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_new(upb_env *env);
-google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_FieldDescriptorProto_serialize(google_protobuf_FieldDescriptorProto *msg, upb_env *env, size_t *len);
-void google_protobuf_FieldDescriptorProto_free(google_protobuf_FieldDescriptorProto *msg, upb_env *env);
-
-/* getters. */
-upb_stringview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg);
-upb_stringview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg);
-int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg);
-google_protobuf_FieldDescriptorProto_Label google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg);
-google_protobuf_FieldDescriptorProto_Type google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg);
-upb_stringview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg);
-upb_stringview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg);
-const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg);
-int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg);
-upb_stringview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg);
-
-/* setters. */
-void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_stringview value);
-void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_stringview value);
-void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value);
-void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Label value);
-void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Type value);
-void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_stringview value);
-void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_stringview value);
-void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value);
-void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value);
-void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_stringview value);
-
-
-/* google_protobuf_OneofDescriptorProto */
-extern const upb_msglayout google_protobuf_OneofDescriptorProto_msginit;
-google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_new(upb_env *env);
-google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_OneofDescriptorProto_serialize(google_protobuf_OneofDescriptorProto *msg, upb_env *env, size_t *len);
-void google_protobuf_OneofDescriptorProto_free(google_protobuf_OneofDescriptorProto *msg, upb_env *env);
-
-/* getters. */
-upb_stringview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg);
-const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto *msg);
-
-/* setters. */
-void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_stringview value);
-void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value);
+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);
+}
+
+struct google_protobuf_OneofDescriptorProto {
+ struct {
+ bool name:1;
+ bool options:1;
+ } has;
+ upb_stringview name;
+ google_protobuf_OneofOptions* options;
+};
+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);
+}
+
+struct google_protobuf_EnumDescriptorProto {
+ struct {
+ bool name:1;
+ bool options:1;
+ } has;
+ upb_stringview name;
+ google_protobuf_EnumOptions* options;
+ upb_array* value;
+ upb_array* reserved_range;
+ upb_array* reserved_name;
+};
-/* google_protobuf_EnumDescriptorProto */
extern const upb_msglayout google_protobuf_EnumDescriptorProto_msginit;
-google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_new(upb_env *env);
-google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_EnumDescriptorProto_serialize(google_protobuf_EnumDescriptorProto *msg, upb_env *env, size_t *len);
-void google_protobuf_EnumDescriptorProto_free(google_protobuf_EnumDescriptorProto *msg, upb_env *env);
-
-/* getters. */
-upb_stringview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg);
-const upb_array* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg);
-const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg);
-const upb_array* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto *msg);
-const upb_array* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto *msg);
-
-/* setters. */
-void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_stringview value);
-void google_protobuf_EnumDescriptorProto_set_value(google_protobuf_EnumDescriptorProto *msg, upb_array* value);
-void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value);
-void google_protobuf_EnumDescriptorProto_set_reserved_range(google_protobuf_EnumDescriptorProto *msg, upb_array* value);
-void google_protobuf_EnumDescriptorProto_set_reserved_name(google_protobuf_EnumDescriptorProto *msg, upb_array* value);
-
-
-/* google_protobuf_EnumDescriptorProto_EnumReservedRange */
-extern const upb_msglayout google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit;
-google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_env *env);
-google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_env *env, size_t *len);
-void google_protobuf_EnumDescriptorProto_EnumReservedRange_free(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_env *env);
-
-/* getters. */
-int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg);
-int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg);
-
-/* setters. */
-void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value);
-void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value);
+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);
+}
+
+struct google_protobuf_EnumDescriptorProto_EnumReservedRange {
+ struct {
+ bool start:1;
+ bool end:1;
+ } has;
+ int32_t start;
+ int32_t end;
+};
+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);
+}
+
+struct google_protobuf_EnumValueDescriptorProto {
+ struct {
+ bool number:1;
+ bool name:1;
+ bool options:1;
+ } has;
+ int32_t number;
+ upb_stringview name;
+ google_protobuf_EnumValueOptions* options;
+};
-/* google_protobuf_EnumValueDescriptorProto */
extern const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit;
-google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_new(upb_env *env);
-google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_EnumValueDescriptorProto_serialize(google_protobuf_EnumValueDescriptorProto *msg, upb_env *env, size_t *len);
-void google_protobuf_EnumValueDescriptorProto_free(google_protobuf_EnumValueDescriptorProto *msg, upb_env *env);
+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);
+}
+
+struct google_protobuf_ServiceDescriptorProto {
+ struct {
+ bool name:1;
+ bool options:1;
+ } has;
+ upb_stringview name;
+ google_protobuf_ServiceOptions* options;
+ upb_array* method;
+};
-/* getters. */
-upb_stringview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg);
-int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg);
-const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg);
-
-/* setters. */
-void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_stringview value);
-void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value);
-void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value);
-
-
-/* google_protobuf_ServiceDescriptorProto */
extern const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit;
-google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_new(upb_env *env);
-google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_ServiceDescriptorProto_serialize(google_protobuf_ServiceDescriptorProto *msg, upb_env *env, size_t *len);
-void google_protobuf_ServiceDescriptorProto_free(google_protobuf_ServiceDescriptorProto *msg, upb_env *env);
-
-/* getters. */
-upb_stringview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg);
-const upb_array* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg);
-const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg);
+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);
+}
+
+struct google_protobuf_MethodDescriptorProto {
+ struct {
+ bool client_streaming:1;
+ bool server_streaming:1;
+ bool name:1;
+ bool input_type:1;
+ bool output_type:1;
+ bool options:1;
+ } has;
+ bool client_streaming;
+ bool server_streaming;
+ upb_stringview name;
+ upb_stringview input_type;
+ upb_stringview output_type;
+ google_protobuf_MethodOptions* options;
+};
-/* setters. */
-void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_stringview value);
-void google_protobuf_ServiceDescriptorProto_set_method(google_protobuf_ServiceDescriptorProto *msg, upb_array* value);
-void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value);
-
-
-/* google_protobuf_MethodDescriptorProto */
extern const upb_msglayout google_protobuf_MethodDescriptorProto_msginit;
-google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_new(upb_env *env);
-google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_MethodDescriptorProto_serialize(google_protobuf_MethodDescriptorProto *msg, upb_env *env, size_t *len);
-void google_protobuf_MethodDescriptorProto_free(google_protobuf_MethodDescriptorProto *msg, upb_env *env);
-
-/* getters. */
-upb_stringview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg);
-upb_stringview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg);
-upb_stringview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg);
-const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg);
-bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg);
-bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg);
-
-/* setters. */
-void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_stringview value);
-void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_stringview value);
-void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_stringview value);
-void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value);
-void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value);
-void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value);
-
-
-/* google_protobuf_FileOptions */
+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);
+}
+
+struct google_protobuf_FileOptions {
+ struct {
+ bool optimize_for:1;
+ bool java_multiple_files:1;
+ bool cc_generic_services:1;
+ bool java_generic_services:1;
+ bool py_generic_services:1;
+ bool java_generate_equals_and_hash:1;
+ bool deprecated:1;
+ bool java_string_check_utf8:1;
+ bool cc_enable_arenas:1;
+ bool php_generic_services:1;
+ bool java_package:1;
+ bool java_outer_classname:1;
+ bool go_package:1;
+ bool objc_class_prefix:1;
+ bool csharp_namespace:1;
+ bool swift_prefix:1;
+ bool php_class_prefix:1;
+ bool php_namespace:1;
+ } has;
+ google_protobuf_FileOptions_OptimizeMode optimize_for;
+ bool java_multiple_files;
+ bool cc_generic_services;
+ bool java_generic_services;
+ bool py_generic_services;
+ bool java_generate_equals_and_hash;
+ bool deprecated;
+ bool java_string_check_utf8;
+ bool cc_enable_arenas;
+ bool php_generic_services;
+ upb_stringview java_package;
+ upb_stringview java_outer_classname;
+ upb_stringview go_package;
+ upb_stringview objc_class_prefix;
+ upb_stringview csharp_namespace;
+ upb_stringview swift_prefix;
+ upb_stringview php_class_prefix;
+ upb_stringview php_namespace;
+ upb_array* uninterpreted_option;
+};
+
extern const upb_msglayout google_protobuf_FileOptions_msginit;
-google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_env *env);
-google_protobuf_FileOptions *google_protobuf_FileOptions_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_FileOptions_serialize(google_protobuf_FileOptions *msg, upb_env *env, size_t *len);
-void google_protobuf_FileOptions_free(google_protobuf_FileOptions *msg, upb_env *env);
-
-/* getters. */
-upb_stringview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg);
-upb_stringview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg);
-google_protobuf_FileOptions_OptimizeMode google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg);
-bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg);
-upb_stringview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg);
-bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg);
-bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg);
-bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg);
-bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg);
-bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg);
-bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg);
-bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg);
-upb_stringview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg);
-upb_stringview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg);
-upb_stringview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg);
-upb_stringview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg);
-upb_stringview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg);
-bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg);
-const upb_array* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg);
-
-/* setters. */
-void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_stringview value);
-void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_stringview value);
-void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, google_protobuf_FileOptions_OptimizeMode value);
-void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value);
-void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_stringview value);
-void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value);
-void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value);
-void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value);
-void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value);
-void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value);
-void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value);
-void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value);
-void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_stringview value);
-void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_stringview value);
-void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_stringview value);
-void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_stringview value);
-void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_stringview value);
-void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value);
-void google_protobuf_FileOptions_set_uninterpreted_option(google_protobuf_FileOptions *msg, upb_array* value);
-
-
-/* google_protobuf_MessageOptions */
-extern const upb_msglayout google_protobuf_MessageOptions_msginit;
-google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(upb_env *env);
-google_protobuf_MessageOptions *google_protobuf_MessageOptions_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_MessageOptions_serialize(google_protobuf_MessageOptions *msg, upb_env *env, size_t *len);
-void google_protobuf_MessageOptions_free(google_protobuf_MessageOptions *msg, upb_env *env);
-
-/* getters. */
-bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg);
-bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg);
-bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg);
-bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg);
-const upb_array* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg);
-
-/* setters. */
-void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value);
-void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value);
-void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value);
-void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value);
-void google_protobuf_MessageOptions_set_uninterpreted_option(google_protobuf_MessageOptions *msg, upb_array* value);
-
-
-/* google_protobuf_FieldOptions */
-extern const upb_msglayout google_protobuf_FieldOptions_msginit;
-google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_env *env);
-google_protobuf_FieldOptions *google_protobuf_FieldOptions_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_FieldOptions_serialize(google_protobuf_FieldOptions *msg, upb_env *env, size_t *len);
-void google_protobuf_FieldOptions_free(google_protobuf_FieldOptions *msg, upb_env *env);
-
-/* getters. */
-google_protobuf_FieldOptions_CType google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg);
-bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg);
-bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg);
-bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg);
-google_protobuf_FieldOptions_JSType google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg);
-bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg);
-const upb_array* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg);
-
-/* setters. */
-void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_CType value);
-void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value);
-void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value);
-void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value);
-void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_JSType value);
-void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value);
-void google_protobuf_FieldOptions_set_uninterpreted_option(google_protobuf_FieldOptions *msg, upb_array* value);
-
-
-/* google_protobuf_OneofOptions */
-extern const upb_msglayout google_protobuf_OneofOptions_msginit;
-google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_env *env);
-google_protobuf_OneofOptions *google_protobuf_OneofOptions_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_OneofOptions_serialize(google_protobuf_OneofOptions *msg, upb_env *env, size_t *len);
-void google_protobuf_OneofOptions_free(google_protobuf_OneofOptions *msg, upb_env *env);
+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);
+}
+
+struct google_protobuf_MessageOptions {
+ struct {
+ bool message_set_wire_format:1;
+ bool no_standard_descriptor_accessor:1;
+ bool deprecated:1;
+ bool map_entry:1;
+ } has;
+ bool message_set_wire_format;
+ bool no_standard_descriptor_accessor;
+ bool deprecated;
+ bool map_entry;
+ upb_array* uninterpreted_option;
+};
-/* getters. */
-const upb_array* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions *msg);
+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);
+}
+
+struct google_protobuf_FieldOptions {
+ struct {
+ bool ctype:1;
+ bool jstype:1;
+ bool packed:1;
+ bool deprecated:1;
+ bool lazy:1;
+ bool weak:1;
+ } has;
+ google_protobuf_FieldOptions_CType ctype;
+ google_protobuf_FieldOptions_JSType jstype;
+ bool packed;
+ bool deprecated;
+ bool lazy;
+ bool weak;
+ upb_array* uninterpreted_option;
+};
-/* setters. */
-void google_protobuf_OneofOptions_set_uninterpreted_option(google_protobuf_OneofOptions *msg, upb_array* value);
+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);
+}
+
+struct google_protobuf_OneofOptions {
+ upb_array* uninterpreted_option;
+};
+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);
+}
+
+struct google_protobuf_EnumOptions {
+ struct {
+ bool allow_alias:1;
+ bool deprecated:1;
+ } has;
+ bool allow_alias;
+ bool deprecated;
+ upb_array* uninterpreted_option;
+};
-/* google_protobuf_EnumOptions */
extern const upb_msglayout google_protobuf_EnumOptions_msginit;
-google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_env *env);
-google_protobuf_EnumOptions *google_protobuf_EnumOptions_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_EnumOptions_serialize(google_protobuf_EnumOptions *msg, upb_env *env, size_t *len);
-void google_protobuf_EnumOptions_free(google_protobuf_EnumOptions *msg, upb_env *env);
-
-/* getters. */
-bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg);
-bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg);
-const upb_array* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg);
-
-/* setters. */
-void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value);
-void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value);
-void google_protobuf_EnumOptions_set_uninterpreted_option(google_protobuf_EnumOptions *msg, upb_array* value);
+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);
+}
+
+struct google_protobuf_EnumValueOptions {
+ struct {
+ bool deprecated:1;
+ } has;
+ bool deprecated;
+ upb_array* uninterpreted_option;
+};
-
-/* google_protobuf_EnumValueOptions */
extern const upb_msglayout google_protobuf_EnumValueOptions_msginit;
-google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_new(upb_env *env);
-google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_EnumValueOptions_serialize(google_protobuf_EnumValueOptions *msg, upb_env *env, size_t *len);
-void google_protobuf_EnumValueOptions_free(google_protobuf_EnumValueOptions *msg, upb_env *env);
-
-/* getters. */
-bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg);
-const upb_array* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg);
-
-/* setters. */
-void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value);
-void google_protobuf_EnumValueOptions_set_uninterpreted_option(google_protobuf_EnumValueOptions *msg, upb_array* value);
-
+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);
+}
+
+struct google_protobuf_ServiceOptions {
+ struct {
+ bool deprecated:1;
+ } has;
+ bool deprecated;
+ upb_array* uninterpreted_option;
+};
-/* google_protobuf_ServiceOptions */
extern const upb_msglayout google_protobuf_ServiceOptions_msginit;
-google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(upb_env *env);
-google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_ServiceOptions_serialize(google_protobuf_ServiceOptions *msg, upb_env *env, size_t *len);
-void google_protobuf_ServiceOptions_free(google_protobuf_ServiceOptions *msg, upb_env *env);
-
-/* getters. */
-bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg);
-const upb_array* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg);
-
-/* setters. */
-void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value);
-void google_protobuf_ServiceOptions_set_uninterpreted_option(google_protobuf_ServiceOptions *msg, upb_array* value);
-
+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);
+}
+
+struct google_protobuf_MethodOptions {
+ struct {
+ bool idempotency_level:1;
+ bool deprecated:1;
+ } has;
+ google_protobuf_MethodOptions_IdempotencyLevel idempotency_level;
+ bool deprecated;
+ upb_array* uninterpreted_option;
+};
-/* google_protobuf_MethodOptions */
extern const upb_msglayout google_protobuf_MethodOptions_msginit;
-google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_env *env);
-google_protobuf_MethodOptions *google_protobuf_MethodOptions_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_MethodOptions_serialize(google_protobuf_MethodOptions *msg, upb_env *env, size_t *len);
-void google_protobuf_MethodOptions_free(google_protobuf_MethodOptions *msg, upb_env *env);
+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);
+}
+
+struct google_protobuf_UninterpretedOption {
+ struct {
+ bool positive_int_value:1;
+ bool negative_int_value:1;
+ bool double_value:1;
+ bool identifier_value:1;
+ bool string_value:1;
+ bool aggregate_value:1;
+ } has;
+ uint64_t positive_int_value;
+ int64_t negative_int_value;
+ double double_value;
+ upb_stringview identifier_value;
+ upb_stringview string_value;
+ upb_stringview aggregate_value;
+ upb_array* name;
+};
-/* getters. */
-bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg);
-google_protobuf_MethodOptions_IdempotencyLevel google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg);
-const upb_array* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg);
-
-/* setters. */
-void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value);
-void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, google_protobuf_MethodOptions_IdempotencyLevel value);
-void google_protobuf_MethodOptions_set_uninterpreted_option(google_protobuf_MethodOptions *msg, upb_array* value);
-
-
-/* google_protobuf_UninterpretedOption */
extern const upb_msglayout google_protobuf_UninterpretedOption_msginit;
-google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_new(upb_env *env);
-google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_UninterpretedOption_serialize(google_protobuf_UninterpretedOption *msg, upb_env *env, size_t *len);
-void google_protobuf_UninterpretedOption_free(google_protobuf_UninterpretedOption *msg, upb_env *env);
-
-/* getters. */
-const upb_array* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg);
-upb_stringview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg);
-uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg);
-int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg);
-double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg);
-upb_stringview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg);
-upb_stringview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg);
-
-/* setters. */
-void google_protobuf_UninterpretedOption_set_name(google_protobuf_UninterpretedOption *msg, upb_array* value);
-void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_stringview value);
-void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value);
-void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value);
-void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value);
-void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_stringview value);
-void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_stringview value);
-
-
-/* google_protobuf_UninterpretedOption_NamePart */
-extern const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit;
-google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_new(upb_env *env);
-google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_UninterpretedOption_NamePart_serialize(google_protobuf_UninterpretedOption_NamePart *msg, upb_env *env, size_t *len);
-void google_protobuf_UninterpretedOption_NamePart_free(google_protobuf_UninterpretedOption_NamePart *msg, upb_env *env);
-
-/* getters. */
-upb_stringview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg);
-bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg);
-
-/* setters. */
-void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_stringview value);
-void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value);
+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);
+}
+
+struct google_protobuf_UninterpretedOption_NamePart {
+ struct {
+ bool is_extension:1;
+ bool name_part:1;
+ } has;
+ bool is_extension;
+ upb_stringview name_part;
+};
+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);
+}
+
+struct google_protobuf_SourceCodeInfo {
+ upb_array* location;
+};
-/* google_protobuf_SourceCodeInfo */
extern const upb_msglayout google_protobuf_SourceCodeInfo_msginit;
-google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(upb_env *env);
-google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_SourceCodeInfo_serialize(google_protobuf_SourceCodeInfo *msg, upb_env *env, size_t *len);
-void google_protobuf_SourceCodeInfo_free(google_protobuf_SourceCodeInfo *msg, upb_env *env);
-
-/* getters. */
-const upb_array* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo *msg);
+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);
+}
+
+struct google_protobuf_SourceCodeInfo_Location {
+ struct {
+ bool leading_comments:1;
+ bool trailing_comments:1;
+ } has;
+ upb_stringview leading_comments;
+ upb_stringview trailing_comments;
+ upb_array* path;
+ upb_array* span;
+ upb_array* leading_detached_comments;
+};
-/* setters. */
-void google_protobuf_SourceCodeInfo_set_location(google_protobuf_SourceCodeInfo *msg, upb_array* value);
-
-
-/* google_protobuf_SourceCodeInfo_Location */
extern const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit;
-google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_new(upb_env *env);
-google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_SourceCodeInfo_Location_serialize(google_protobuf_SourceCodeInfo_Location *msg, upb_env *env, size_t *len);
-void google_protobuf_SourceCodeInfo_Location_free(google_protobuf_SourceCodeInfo_Location *msg, upb_env *env);
-
-/* getters. */
-const upb_array* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg);
-const upb_array* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg);
-upb_stringview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg);
-upb_stringview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg);
-const upb_array* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg);
-
-/* setters. */
-void google_protobuf_SourceCodeInfo_Location_set_path(google_protobuf_SourceCodeInfo_Location *msg, upb_array* value);
-void google_protobuf_SourceCodeInfo_Location_set_span(google_protobuf_SourceCodeInfo_Location *msg, upb_array* value);
-void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_stringview value);
-void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_stringview value);
-void google_protobuf_SourceCodeInfo_Location_set_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_array* value);
-
-
-/* google_protobuf_GeneratedCodeInfo */
-extern const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit;
-google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_new(upb_env *env);
-google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_GeneratedCodeInfo_serialize(google_protobuf_GeneratedCodeInfo *msg, upb_env *env, size_t *len);
-void google_protobuf_GeneratedCodeInfo_free(google_protobuf_GeneratedCodeInfo *msg, upb_env *env);
-
-/* getters. */
-const upb_array* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo *msg);
-
-/* setters. */
-void google_protobuf_GeneratedCodeInfo_set_annotation(google_protobuf_GeneratedCodeInfo *msg, upb_array* value);
+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);
+}
+
+struct google_protobuf_GeneratedCodeInfo {
+ upb_array* annotation;
+};
+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);
+}
+
+struct google_protobuf_GeneratedCodeInfo_Annotation {
+ struct {
+ bool begin:1;
+ bool end:1;
+ bool source_file:1;
+ } has;
+ int32_t begin;
+ int32_t end;
+ upb_stringview source_file;
+ upb_array* path;
+};
-/* google_protobuf_GeneratedCodeInfo_Annotation */
extern const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit;
-google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_new(upb_env *env);
-google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parsenew(upb_stringview buf, upb_env *env);
-char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_env *env, size_t *len);
-void google_protobuf_GeneratedCodeInfo_Annotation_free(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_env *env);
-
-/* getters. */
-const upb_array* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg);
-upb_stringview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg);
-int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg);
-int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg);
-
-/* setters. */
-void google_protobuf_GeneratedCodeInfo_Annotation_set_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_array* value);
-void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_stringview value);
-void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value);
-void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value);
-
+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_END_EXTERN_C
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback