/* This file was generated by upbc (the upb compiler) from the input
 * file:
 *
 *     google/protobuf/descriptor.proto
 *
 * Do not edit -- your changes will be discarded when the file is
 * regenerated. */

#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
#define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_

#include "upb/generated_code_support.h"

// Must be last. 
#include "upb/port/def.inc"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct google_protobuf_FileDescriptorSet google_protobuf_FileDescriptorSet;
typedef struct google_protobuf_FileDescriptorProto google_protobuf_FileDescriptorProto;
typedef struct google_protobuf_DescriptorProto google_protobuf_DescriptorProto;
typedef struct google_protobuf_DescriptorProto_ExtensionRange google_protobuf_DescriptorProto_ExtensionRange;
typedef struct google_protobuf_DescriptorProto_ReservedRange google_protobuf_DescriptorProto_ReservedRange;
typedef struct google_protobuf_ExtensionRangeOptions google_protobuf_ExtensionRangeOptions;
typedef struct google_protobuf_FieldDescriptorProto google_protobuf_FieldDescriptorProto;
typedef struct google_protobuf_OneofDescriptorProto google_protobuf_OneofDescriptorProto;
typedef struct google_protobuf_EnumDescriptorProto google_protobuf_EnumDescriptorProto;
typedef struct google_protobuf_EnumDescriptorProto_EnumReservedRange google_protobuf_EnumDescriptorProto_EnumReservedRange;
typedef struct google_protobuf_EnumValueDescriptorProto google_protobuf_EnumValueDescriptorProto;
typedef struct google_protobuf_ServiceDescriptorProto google_protobuf_ServiceDescriptorProto;
typedef struct google_protobuf_MethodDescriptorProto google_protobuf_MethodDescriptorProto;
typedef struct google_protobuf_FileOptions google_protobuf_FileOptions;
typedef struct google_protobuf_MessageOptions google_protobuf_MessageOptions;
typedef struct google_protobuf_FieldOptions google_protobuf_FieldOptions;
typedef struct google_protobuf_OneofOptions google_protobuf_OneofOptions;
typedef struct google_protobuf_EnumOptions google_protobuf_EnumOptions;
typedef struct google_protobuf_EnumValueOptions google_protobuf_EnumValueOptions;
typedef struct google_protobuf_ServiceOptions google_protobuf_ServiceOptions;
typedef struct google_protobuf_MethodOptions google_protobuf_MethodOptions;
typedef struct google_protobuf_UninterpretedOption google_protobuf_UninterpretedOption;
typedef struct google_protobuf_UninterpretedOption_NamePart google_protobuf_UninterpretedOption_NamePart;
typedef struct google_protobuf_SourceCodeInfo google_protobuf_SourceCodeInfo;
typedef struct google_protobuf_SourceCodeInfo_Location google_protobuf_SourceCodeInfo_Location;
typedef struct google_protobuf_GeneratedCodeInfo google_protobuf_GeneratedCodeInfo;
typedef struct google_protobuf_GeneratedCodeInfo_Annotation google_protobuf_GeneratedCodeInfo_Annotation;
extern const upb_MiniTable* google_protobuf_FileDescriptorSet_msg_init();
extern const upb_MiniTable* google_protobuf_FileDescriptorProto_msg_init();
extern const upb_MiniTable* google_protobuf_DescriptorProto_msg_init();
extern const upb_MiniTable* google_protobuf_DescriptorProto_ExtensionRange_msg_init();
extern const upb_MiniTable* google_protobuf_DescriptorProto_ReservedRange_msg_init();
extern const upb_MiniTable* google_protobuf_ExtensionRangeOptions_msg_init();
extern const upb_MiniTable* google_protobuf_FieldDescriptorProto_msg_init();
extern const upb_MiniTable* google_protobuf_OneofDescriptorProto_msg_init();
extern const upb_MiniTable* google_protobuf_EnumDescriptorProto_msg_init();
extern const upb_MiniTable* google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init();
extern const upb_MiniTable* google_protobuf_EnumValueDescriptorProto_msg_init();
extern const upb_MiniTable* google_protobuf_ServiceDescriptorProto_msg_init();
extern const upb_MiniTable* google_protobuf_MethodDescriptorProto_msg_init();
extern const upb_MiniTable* google_protobuf_FileOptions_msg_init();
extern const upb_MiniTable* google_protobuf_MessageOptions_msg_init();
extern const upb_MiniTable* google_protobuf_FieldOptions_msg_init();
extern const upb_MiniTable* google_protobuf_OneofOptions_msg_init();
extern const upb_MiniTable* google_protobuf_EnumOptions_msg_init();
extern const upb_MiniTable* google_protobuf_EnumValueOptions_msg_init();
extern const upb_MiniTable* google_protobuf_ServiceOptions_msg_init();
extern const upb_MiniTable* google_protobuf_MethodOptions_msg_init();
extern const upb_MiniTable* google_protobuf_UninterpretedOption_msg_init();
extern const upb_MiniTable* google_protobuf_UninterpretedOption_NamePart_msg_init();
extern const upb_MiniTable* google_protobuf_SourceCodeInfo_msg_init();
extern const upb_MiniTable* google_protobuf_SourceCodeInfo_Location_msg_init();
extern const upb_MiniTable* google_protobuf_GeneratedCodeInfo_msg_init();
extern const upb_MiniTable* google_protobuf_GeneratedCodeInfo_Annotation_msg_init();

typedef enum {
  google_protobuf_FieldDescriptorProto_TYPE_DOUBLE = 1,
  google_protobuf_FieldDescriptorProto_TYPE_FLOAT = 2,
  google_protobuf_FieldDescriptorProto_TYPE_INT64 = 3,
  google_protobuf_FieldDescriptorProto_TYPE_UINT64 = 4,
  google_protobuf_FieldDescriptorProto_TYPE_INT32 = 5,
  google_protobuf_FieldDescriptorProto_TYPE_FIXED64 = 6,
  google_protobuf_FieldDescriptorProto_TYPE_FIXED32 = 7,
  google_protobuf_FieldDescriptorProto_TYPE_BOOL = 8,
  google_protobuf_FieldDescriptorProto_TYPE_STRING = 9,
  google_protobuf_FieldDescriptorProto_TYPE_GROUP = 10,
  google_protobuf_FieldDescriptorProto_TYPE_MESSAGE = 11,
  google_protobuf_FieldDescriptorProto_TYPE_BYTES = 12,
  google_protobuf_FieldDescriptorProto_TYPE_UINT32 = 13,
  google_protobuf_FieldDescriptorProto_TYPE_ENUM = 14,
  google_protobuf_FieldDescriptorProto_TYPE_SFIXED32 = 15,
  google_protobuf_FieldDescriptorProto_TYPE_SFIXED64 = 16,
  google_protobuf_FieldDescriptorProto_TYPE_SINT32 = 17,
  google_protobuf_FieldDescriptorProto_TYPE_SINT64 = 18
} google_protobuf_FieldDescriptorProto_Type;

typedef enum {
  google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL = 1,
  google_protobuf_FieldDescriptorProto_LABEL_REQUIRED = 2,
  google_protobuf_FieldDescriptorProto_LABEL_REPEATED = 3
} google_protobuf_FieldDescriptorProto_Label;

typedef enum {
  google_protobuf_FileOptions_SPEED = 1,
  google_protobuf_FileOptions_CODE_SIZE = 2,
  google_protobuf_FileOptions_LITE_RUNTIME = 3
} google_protobuf_FileOptions_OptimizeMode;

typedef enum {
  google_protobuf_FieldOptions_STRING = 0,
  google_protobuf_FieldOptions_CORD = 1,
  google_protobuf_FieldOptions_STRING_PIECE = 2
} google_protobuf_FieldOptions_CType;

typedef enum {
  google_protobuf_FieldOptions_JS_NORMAL = 0,
  google_protobuf_FieldOptions_JS_STRING = 1,
  google_protobuf_FieldOptions_JS_NUMBER = 2
} google_protobuf_FieldOptions_JSType;

typedef enum {
  google_protobuf_FieldOptions_RETENTION_UNKNOWN = 0,
  google_protobuf_FieldOptions_RETENTION_RUNTIME = 1,
  google_protobuf_FieldOptions_RETENTION_SOURCE = 2
} google_protobuf_FieldOptions_OptionRetention;

typedef enum {
  google_protobuf_FieldOptions_TARGET_TYPE_UNKNOWN = 0,
  google_protobuf_FieldOptions_TARGET_TYPE_FILE = 1,
  google_protobuf_FieldOptions_TARGET_TYPE_EXTENSION_RANGE = 2,
  google_protobuf_FieldOptions_TARGET_TYPE_MESSAGE = 3,
  google_protobuf_FieldOptions_TARGET_TYPE_FIELD = 4,
  google_protobuf_FieldOptions_TARGET_TYPE_ONEOF = 5,
  google_protobuf_FieldOptions_TARGET_TYPE_ENUM = 6,
  google_protobuf_FieldOptions_TARGET_TYPE_ENUM_ENTRY = 7,
  google_protobuf_FieldOptions_TARGET_TYPE_SERVICE = 8,
  google_protobuf_FieldOptions_TARGET_TYPE_METHOD = 9
} google_protobuf_FieldOptions_OptionTargetType;

typedef enum {
  google_protobuf_MethodOptions_IDEMPOTENCY_UNKNOWN = 0,
  google_protobuf_MethodOptions_NO_SIDE_EFFECTS = 1,
  google_protobuf_MethodOptions_IDEMPOTENT = 2
} google_protobuf_MethodOptions_IdempotencyLevel;

typedef enum {
  google_protobuf_GeneratedCodeInfo_Annotation_NONE = 0,
  google_protobuf_GeneratedCodeInfo_Annotation_SET = 1,
  google_protobuf_GeneratedCodeInfo_Annotation_ALIAS = 2
} google_protobuf_GeneratedCodeInfo_Annotation_Semantic;


extern const upb_MiniTableEnum* google_protobuf_FieldDescriptorProto_Type_enum_init();
extern const upb_MiniTableEnum* google_protobuf_FieldDescriptorProto_Label_enum_init();
extern const upb_MiniTableEnum* google_protobuf_FileOptions_OptimizeMode_enum_init();
extern const upb_MiniTableEnum* google_protobuf_FieldOptions_CType_enum_init();
extern const upb_MiniTableEnum* google_protobuf_FieldOptions_JSType_enum_init();
extern const upb_MiniTableEnum* google_protobuf_FieldOptions_OptionRetention_enum_init();
extern const upb_MiniTableEnum* google_protobuf_FieldOptions_OptionTargetType_enum_init();
extern const upb_MiniTableEnum* google_protobuf_MethodOptions_IdempotencyLevel_enum_init();
extern const upb_MiniTableEnum* google_protobuf_GeneratedCodeInfo_Annotation_Semantic_enum_init();

/* google.protobuf.FileDescriptorSet */

UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_new(upb_Arena* arena) {
  return (google_protobuf_FileDescriptorSet*)_upb_Message_New(google_protobuf_FileDescriptorSet_msg_init(), arena);
}
UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_FileDescriptorSet* ret = google_protobuf_FileDescriptorSet_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_FileDescriptorSet_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_FileDescriptorSet* google_protobuf_FileDescriptorSet_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_FileDescriptorSet* ret = google_protobuf_FileDescriptorSet_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_FileDescriptorSet_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_FileDescriptorSet_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_FileDescriptorSet_serialize_ex(const google_protobuf_FileDescriptorSet* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_FileDescriptorSet_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_FileDescriptorSet_clear_file(google_protobuf_FileDescriptorSet* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorSet_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_FileDescriptorProto* const* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorSet_msg_init(), 1);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_FileDescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_FileDescriptorSet_has_file(const google_protobuf_FileDescriptorSet* msg) {
  size_t size;
  google_protobuf_FileDescriptorSet_file(msg, &size);
  return size != 0;
}

UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_mutable_file(google_protobuf_FileDescriptorSet* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorSet_msg_init(), 1);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_FileDescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_resize_file(google_protobuf_FileDescriptorSet* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorSet_msg_init(), 1);
  return (google_protobuf_FileDescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorSet_add_file(google_protobuf_FileDescriptorSet* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorSet_msg_init(), 1);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)_upb_Message_New(google_protobuf_FileDescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.FileDescriptorProto */

UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_new(upb_Arena* arena) {
  return (google_protobuf_FileDescriptorProto*)_upb_Message_New(google_protobuf_FileDescriptorProto_msg_init(), arena);
}
UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_FileDescriptorProto* ret = google_protobuf_FileDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_FileDescriptorProto_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorProto_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_FileDescriptorProto* ret = google_protobuf_FileDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_FileDescriptorProto_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_FileDescriptorProto_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_FileDescriptorProto_serialize_ex(const google_protobuf_FileDescriptorProto* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_FileDescriptorProto_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_name(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_package(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_dependency(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 3);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (upb_StringView const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_dependency(const google_protobuf_FileDescriptorProto* msg) {
  size_t size;
  google_protobuf_FileDescriptorProto_dependency(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_message_type(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 4);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 4);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_DescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_message_type(const google_protobuf_FileDescriptorProto* msg) {
  size_t size;
  google_protobuf_FileDescriptorProto_message_type(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_enum_type(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 5);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 5);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_enum_type(const google_protobuf_FileDescriptorProto* msg) {
  size_t size;
  google_protobuf_FileDescriptorProto_enum_type(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_service(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 6);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 6);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_protobuf_FileDescriptorProto* msg) {
  size_t size;
  google_protobuf_FileDescriptorProto_service(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_extension(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 7);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 7);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_protobuf_FileDescriptorProto* msg) {
  size_t size;
  google_protobuf_FileDescriptorProto_extension(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_options(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 8);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto* msg) {
  const google_protobuf_FileOptions* default_val = NULL;
  const google_protobuf_FileOptions* ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 8);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 8);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_source_code_info(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 9);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto* msg) {
  const google_protobuf_SourceCodeInfo* default_val = NULL;
  const google_protobuf_SourceCodeInfo* ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 9);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 9);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_public_dependency(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 10);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 10);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (int32_t const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_public_dependency(const google_protobuf_FileDescriptorProto* msg) {
  size_t size;
  google_protobuf_FileDescriptorProto_public_dependency(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_weak_dependency(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 11);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 11);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (int32_t const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_weak_dependency(const google_protobuf_FileDescriptorProto* msg) {
  size_t size;
  google_protobuf_FileDescriptorProto_weak_dependency(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_syntax(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 12);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 12);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 12);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileDescriptorProto_clear_edition(google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 13);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileDescriptorProto_edition(const google_protobuf_FileDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 13);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_edition(const google_protobuf_FileDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 13);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 3);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (upb_StringView*)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE upb_StringView* google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 3);
  return (upb_StringView*)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto* msg, upb_StringView val, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 3);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return false;
  }
  _upb_Array_Set(arr, arr->size - 1, &val, sizeof(val));
  return true;
}
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_mutable_message_type(google_protobuf_FileDescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 4);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_DescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 4);
  return (google_protobuf_DescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescriptorProto_add_message_type(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 4);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(google_protobuf_DescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_mutable_enum_type(google_protobuf_FileDescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 5);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_EnumDescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 5);
  return (google_protobuf_EnumDescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescriptorProto_add_enum_type(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 5);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(google_protobuf_EnumDescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_mutable_service(google_protobuf_FileDescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 6);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_ServiceDescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 6);
  return (google_protobuf_ServiceDescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 6);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_Message_New(google_protobuf_ServiceDescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_mutable_extension(google_protobuf_FileDescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 7);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_FieldDescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 7);
  return (google_protobuf_FieldDescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 7);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(google_protobuf_FieldDescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 8);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) {
  struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_FileOptions*)_upb_Message_New(google_protobuf_FileOptions_msg_init(), arena);
    if (sub) google_protobuf_FileDescriptorProto_set_options(msg, sub);
  }
  return sub;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 9);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto* msg, upb_Arena* arena) {
  struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_SourceCodeInfo*)_upb_Message_New(google_protobuf_SourceCodeInfo_msg_init(), arena);
    if (sub) google_protobuf_FileDescriptorProto_set_source_code_info(msg, sub);
  }
  return sub;
}
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_public_dependency(google_protobuf_FileDescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 10);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (int32_t*)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 10);
  return (int32_t*)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto* msg, int32_t val, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 10);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return false;
  }
  _upb_Array_Set(arr, arr->size - 1, &val, sizeof(val));
  return true;
}
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_weak_dependency(google_protobuf_FileDescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 11);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (int32_t*)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 11);
  return (int32_t*)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto* msg, int32_t val, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 11);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return false;
  }
  _upb_Array_Set(arr, arr->size - 1, &val, sizeof(val));
  return true;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 12);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileDescriptorProto_set_edition(google_protobuf_FileDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileDescriptorProto_msg_init(), 13);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}

/* google.protobuf.DescriptorProto */

UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_new(upb_Arena* arena) {
  return (google_protobuf_DescriptorProto*)_upb_Message_New(google_protobuf_DescriptorProto_msg_init(), arena);
}
UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_DescriptorProto* ret = google_protobuf_DescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_DescriptorProto_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_DescriptorProto* ret = google_protobuf_DescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_DescriptorProto_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_DescriptorProto_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_DescriptorProto_serialize_ex(const google_protobuf_DescriptorProto* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_DescriptorProto_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_DescriptorProto_clear_name(google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_DescriptorProto_clear_field(google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 2);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_DescriptorProto_has_field(const google_protobuf_DescriptorProto* msg) {
  size_t size;
  google_protobuf_DescriptorProto_field(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_DescriptorProto_clear_nested_type(google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 3);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_DescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_DescriptorProto_has_nested_type(const google_protobuf_DescriptorProto* msg) {
  size_t size;
  google_protobuf_DescriptorProto_nested_type(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_DescriptorProto_clear_enum_type(google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 4);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 4);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_DescriptorProto_has_enum_type(const google_protobuf_DescriptorProto* msg) {
  size_t size;
  google_protobuf_DescriptorProto_enum_type(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_DescriptorProto_clear_extension_range(google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 5);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 5);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_DescriptorProto_has_extension_range(const google_protobuf_DescriptorProto* msg) {
  size_t size;
  google_protobuf_DescriptorProto_extension_range(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_DescriptorProto_clear_extension(google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 6);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 6);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_DescriptorProto_has_extension(const google_protobuf_DescriptorProto* msg) {
  size_t size;
  google_protobuf_DescriptorProto_extension(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_DescriptorProto_clear_options(google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 7);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto* msg) {
  const google_protobuf_MessageOptions* default_val = NULL;
  const google_protobuf_MessageOptions* ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 7);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 7);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_DescriptorProto_clear_oneof_decl(google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 8);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 8);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_DescriptorProto_has_oneof_decl(const google_protobuf_DescriptorProto* msg) {
  size_t size;
  google_protobuf_DescriptorProto_oneof_decl(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_range(google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 9);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_DescriptorProto_ReservedRange* const* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 9);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_DescriptorProto_ReservedRange* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_range(const google_protobuf_DescriptorProto* msg) {
  size_t size;
  google_protobuf_DescriptorProto_reserved_range(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_DescriptorProto_clear_reserved_name(google_protobuf_DescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 10);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView const* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 10);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (upb_StringView const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_name(const google_protobuf_DescriptorProto* msg) {
  size_t size;
  google_protobuf_DescriptorProto_reserved_name(msg, &size);
  return size != 0;
}

UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 2);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_FieldDescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 2);
  return (google_protobuf_FieldDescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 2);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(google_protobuf_FieldDescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_mutable_nested_type(google_protobuf_DescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 3);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_DescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 3);
  return (google_protobuf_DescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_add_nested_type(google_protobuf_DescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 3);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_Message_New(google_protobuf_DescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_mutable_enum_type(google_protobuf_DescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 4);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_EnumDescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 4);
  return (google_protobuf_EnumDescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_DescriptorProto_add_enum_type(google_protobuf_DescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 4);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_Message_New(google_protobuf_EnumDescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_mutable_extension_range(google_protobuf_DescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 5);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 5);
  return (google_protobuf_DescriptorProto_ExtensionRange**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_add_extension_range(google_protobuf_DescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 5);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_extension(google_protobuf_DescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 6);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_FieldDescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 6);
  return (google_protobuf_FieldDescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 6);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_Message_New(google_protobuf_FieldDescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 7);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto* msg, upb_Arena* arena) {
  struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_MessageOptions*)_upb_Message_New(google_protobuf_MessageOptions_msg_init(), arena);
    if (sub) google_protobuf_DescriptorProto_set_options(msg, sub);
  }
  return sub;
}
UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_mutable_oneof_decl(google_protobuf_DescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 8);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_OneofDescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 8);
  return (google_protobuf_OneofDescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_DescriptorProto_add_oneof_decl(google_protobuf_DescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 8);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_Message_New(google_protobuf_OneofDescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_mutable_reserved_range(google_protobuf_DescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 9);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 9);
  return (google_protobuf_DescriptorProto_ReservedRange**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_add_reserved_range(google_protobuf_DescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 9);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(google_protobuf_DescriptorProto_ReservedRange_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE upb_StringView* google_protobuf_DescriptorProto_mutable_reserved_name(google_protobuf_DescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 10);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (upb_StringView*)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE upb_StringView* google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 10);
  return (upb_StringView*)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto* msg, upb_StringView val, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_msg_init(), 10);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return false;
  }
  _upb_Array_Set(arr, arr->size - 1, &val, sizeof(val));
  return true;
}

/* google.protobuf.DescriptorProto.ExtensionRange */

UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_new(upb_Arena* arena) {
  return (google_protobuf_DescriptorProto_ExtensionRange*)_upb_Message_New(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), arena);
}
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_DescriptorProto_ExtensionRange* ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_DescriptorProto_ExtensionRange_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_ExtensionRange_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_DescriptorProto_ExtensionRange* ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_DescriptorProto_ExtensionRange_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_DescriptorProto_ExtensionRange_serialize_ex(const google_protobuf_DescriptorProto_ExtensionRange* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_DescriptorProto_ExtensionRange_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_start(google_protobuf_DescriptorProto_ExtensionRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) {
  int32_t default_val = (int32_t)0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_end(google_protobuf_DescriptorProto_ExtensionRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) {
  int32_t default_val = (int32_t)0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_clear_options(google_protobuf_DescriptorProto_ExtensionRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) {
  const google_protobuf_ExtensionRangeOptions* default_val = NULL;
  const google_protobuf_ExtensionRangeOptions* ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ExtensionRange_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange* msg, upb_Arena* arena) {
  struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_ExtensionRangeOptions*)_upb_Message_New(google_protobuf_ExtensionRangeOptions_msg_init(), arena);
    if (sub) google_protobuf_DescriptorProto_ExtensionRange_set_options(msg, sub);
  }
  return sub;
}

/* google.protobuf.DescriptorProto.ReservedRange */

UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_new(upb_Arena* arena) {
  return (google_protobuf_DescriptorProto_ReservedRange*)_upb_Message_New(google_protobuf_DescriptorProto_ReservedRange_msg_init(), arena);
}
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_DescriptorProto_ReservedRange* ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_DescriptorProto_ReservedRange_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_ReservedRange_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_DescriptorProto_ReservedRange* ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_DescriptorProto_ReservedRange_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_DescriptorProto_ReservedRange_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_DescriptorProto_ReservedRange_serialize_ex(const google_protobuf_DescriptorProto_ReservedRange* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_DescriptorProto_ReservedRange_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_clear_start(google_protobuf_DescriptorProto_ReservedRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ReservedRange_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange* msg) {
  int32_t default_val = (int32_t)0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ReservedRange_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ReservedRange_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_clear_end(google_protobuf_DescriptorProto_ReservedRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ReservedRange_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange* msg) {
  int32_t default_val = (int32_t)0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ReservedRange_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ReservedRange_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ReservedRange_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_DescriptorProto_ReservedRange_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}

/* google.protobuf.ExtensionRangeOptions */

UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_new(upb_Arena* arena) {
  return (google_protobuf_ExtensionRangeOptions*)_upb_Message_New(google_protobuf_ExtensionRangeOptions_msg_init(), arena);
}
UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_ExtensionRangeOptions* ret = google_protobuf_ExtensionRangeOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_ExtensionRangeOptions_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_ExtensionRangeOptions* google_protobuf_ExtensionRangeOptions_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_ExtensionRangeOptions* ret = google_protobuf_ExtensionRangeOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_ExtensionRangeOptions_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_ExtensionRangeOptions_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_ExtensionRangeOptions_serialize_ex(const google_protobuf_ExtensionRangeOptions* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_ExtensionRangeOptions_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_ExtensionRangeOptions_clear_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ExtensionRangeOptions_msg_init(), 999);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ExtensionRangeOptions_msg_init(), 999);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_UninterpretedOption* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_ExtensionRangeOptions_has_uninterpreted_option(const google_protobuf_ExtensionRangeOptions* msg) {
  size_t size;
  google_protobuf_ExtensionRangeOptions_uninterpreted_option(msg, &size);
  return size != 0;
}

UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_mutable_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ExtensionRangeOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_UninterpretedOption**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ExtensionRangeOptions_msg_init(), 999);
  return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ExtensionRangeOptions_add_uninterpreted_option(google_protobuf_ExtensionRangeOptions* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ExtensionRangeOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(google_protobuf_UninterpretedOption_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.FieldDescriptorProto */

UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_new(upb_Arena* arena) {
  return (google_protobuf_FieldDescriptorProto*)_upb_Message_New(google_protobuf_FieldDescriptorProto_msg_init(), arena);
}
UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_FieldDescriptorProto* ret = google_protobuf_FieldDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_FieldDescriptorProto_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_FieldDescriptorProto* google_protobuf_FieldDescriptorProto_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_FieldDescriptorProto* ret = google_protobuf_FieldDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_FieldDescriptorProto_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_FieldDescriptorProto_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_FieldDescriptorProto_serialize_ex(const google_protobuf_FieldDescriptorProto* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_FieldDescriptorProto_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_name(google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_extendee(google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_number(google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto* msg) {
  int32_t default_val = (int32_t)0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_label(google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 4);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto* msg) {
  int32_t default_val = 1;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 4);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 4);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_type(google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 5);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto* msg) {
  int32_t default_val = 1;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 5);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 5);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_type_name(google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 6);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 6);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 6);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_default_value(google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 7);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 7);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 7);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_options(google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 8);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto* msg) {
  const google_protobuf_FieldOptions* default_val = NULL;
  const google_protobuf_FieldOptions* ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 8);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 8);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_oneof_index(google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 9);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto* msg) {
  int32_t default_val = (int32_t)0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 9);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 9);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_json_name(google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 10);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 10);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 10);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_clear_proto3_optional(google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 17);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 17);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 17);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 4);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 5);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 6);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 7);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 8);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto* msg, upb_Arena* arena) {
  struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_FieldOptions*)_upb_Message_New(google_protobuf_FieldOptions_msg_init(), arena);
    if (sub) google_protobuf_FieldDescriptorProto_set_options(msg, sub);
  }
  return sub;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 9);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 10);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldDescriptorProto_msg_init(), 17);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}

/* google.protobuf.OneofDescriptorProto */

UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_new(upb_Arena* arena) {
  return (google_protobuf_OneofDescriptorProto*)_upb_Message_New(google_protobuf_OneofDescriptorProto_msg_init(), arena);
}
UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_OneofDescriptorProto* ret = google_protobuf_OneofDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_OneofDescriptorProto_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_OneofDescriptorProto* google_protobuf_OneofDescriptorProto_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_OneofDescriptorProto* ret = google_protobuf_OneofDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_OneofDescriptorProto_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_OneofDescriptorProto_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_OneofDescriptorProto_serialize_ex(const google_protobuf_OneofDescriptorProto* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_OneofDescriptorProto_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_name(google_protobuf_OneofDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofDescriptorProto_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofDescriptorProto_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofDescriptorProto_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_OneofDescriptorProto_clear_options(google_protobuf_OneofDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofDescriptorProto_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto* msg) {
  const google_protobuf_OneofOptions* default_val = NULL;
  const google_protobuf_OneofOptions* ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofDescriptorProto_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofDescriptorProto_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofDescriptorProto_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofDescriptorProto_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto* msg, upb_Arena* arena) {
  struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_OneofOptions*)_upb_Message_New(google_protobuf_OneofOptions_msg_init(), arena);
    if (sub) google_protobuf_OneofDescriptorProto_set_options(msg, sub);
  }
  return sub;
}

/* google.protobuf.EnumDescriptorProto */

UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_new(upb_Arena* arena) {
  return (google_protobuf_EnumDescriptorProto*)_upb_Message_New(google_protobuf_EnumDescriptorProto_msg_init(), arena);
}
UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_EnumDescriptorProto* ret = google_protobuf_EnumDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_EnumDescriptorProto_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_EnumDescriptorProto* google_protobuf_EnumDescriptorProto_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_EnumDescriptorProto* ret = google_protobuf_EnumDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_EnumDescriptorProto_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_EnumDescriptorProto_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_EnumDescriptorProto_serialize_ex(const google_protobuf_EnumDescriptorProto* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_EnumDescriptorProto_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_name(google_protobuf_EnumDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_value(google_protobuf_EnumDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 2);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_value(const google_protobuf_EnumDescriptorProto* msg) {
  size_t size;
  google_protobuf_EnumDescriptorProto_value(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_options(google_protobuf_EnumDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto* msg) {
  const google_protobuf_EnumOptions* default_val = NULL;
  const google_protobuf_EnumOptions* ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_range(google_protobuf_EnumDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 4);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 4);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_range(const google_protobuf_EnumDescriptorProto* msg) {
  size_t size;
  google_protobuf_EnumDescriptorProto_reserved_range(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_EnumDescriptorProto_clear_reserved_name(google_protobuf_EnumDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 5);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView const* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 5);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (upb_StringView const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_name(const google_protobuf_EnumDescriptorProto* msg) {
  size_t size;
  google_protobuf_EnumDescriptorProto_reserved_name(msg, &size);
  return size != 0;
}

UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 2);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_EnumValueDescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 2);
  return (google_protobuf_EnumValueDescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 2);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(google_protobuf_EnumValueDescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) {
  struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_EnumOptions*)_upb_Message_New(google_protobuf_EnumOptions_msg_init(), arena);
    if (sub) google_protobuf_EnumDescriptorProto_set_options(msg, sub);
  }
  return sub;
}
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_mutable_reserved_range(google_protobuf_EnumDescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 4);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 4);
  return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_add_reserved_range(google_protobuf_EnumDescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 4);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE upb_StringView* google_protobuf_EnumDescriptorProto_mutable_reserved_name(google_protobuf_EnumDescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 5);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (upb_StringView*)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE upb_StringView* google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 5);
  return (upb_StringView*)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto* msg, upb_StringView val, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_msg_init(), 5);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return false;
  }
  _upb_Array_Set(arr, arr->size - 1, &val, sizeof(val));
  return true;
}

/* google.protobuf.EnumDescriptorProto.EnumReservedRange */

UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_Arena* arena) {
  return (google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_Message_New(google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), arena);
}
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_EnumReservedRange_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_EnumDescriptorProto_EnumReservedRange* ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize_ex(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_clear_start(google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) {
  int32_t default_val = (int32_t)0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_clear_end(google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) {
  int32_t default_val = (int32_t)0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumDescriptorProto_EnumReservedRange_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}

/* google.protobuf.EnumValueDescriptorProto */

UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_new(upb_Arena* arena) {
  return (google_protobuf_EnumValueDescriptorProto*)_upb_Message_New(google_protobuf_EnumValueDescriptorProto_msg_init(), arena);
}
UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_EnumValueDescriptorProto* ret = google_protobuf_EnumValueDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_EnumValueDescriptorProto_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumValueDescriptorProto_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_EnumValueDescriptorProto* ret = google_protobuf_EnumValueDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_EnumValueDescriptorProto_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_EnumValueDescriptorProto_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_EnumValueDescriptorProto_serialize_ex(const google_protobuf_EnumValueDescriptorProto* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_EnumValueDescriptorProto_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_name(google_protobuf_EnumValueDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_number(google_protobuf_EnumValueDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto* msg) {
  int32_t default_val = (int32_t)0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_clear_options(google_protobuf_EnumValueDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto* msg) {
  const google_protobuf_EnumValueOptions* default_val = NULL;
  const google_protobuf_EnumValueOptions* ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueDescriptorProto_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto* msg, upb_Arena* arena) {
  struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_EnumValueOptions*)_upb_Message_New(google_protobuf_EnumValueOptions_msg_init(), arena);
    if (sub) google_protobuf_EnumValueDescriptorProto_set_options(msg, sub);
  }
  return sub;
}

/* google.protobuf.ServiceDescriptorProto */

UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_new(upb_Arena* arena) {
  return (google_protobuf_ServiceDescriptorProto*)_upb_Message_New(google_protobuf_ServiceDescriptorProto_msg_init(), arena);
}
UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_ServiceDescriptorProto* ret = google_protobuf_ServiceDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_ServiceDescriptorProto_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_ServiceDescriptorProto* google_protobuf_ServiceDescriptorProto_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_ServiceDescriptorProto* ret = google_protobuf_ServiceDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_ServiceDescriptorProto_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_ServiceDescriptorProto_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_ServiceDescriptorProto_serialize_ex(const google_protobuf_ServiceDescriptorProto* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_ServiceDescriptorProto_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_name(google_protobuf_ServiceDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_method(google_protobuf_ServiceDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 2);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_method(const google_protobuf_ServiceDescriptorProto* msg) {
  size_t size;
  google_protobuf_ServiceDescriptorProto_method(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_ServiceDescriptorProto_clear_options(google_protobuf_ServiceDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto* msg) {
  const google_protobuf_ServiceOptions* default_val = NULL;
  const google_protobuf_ServiceOptions* ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 2);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_MethodDescriptorProto**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 2);
  return (google_protobuf_MethodDescriptorProto**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 2);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_Message_New(google_protobuf_MethodDescriptorProto_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceDescriptorProto_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto* msg, upb_Arena* arena) {
  struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_ServiceOptions*)_upb_Message_New(google_protobuf_ServiceOptions_msg_init(), arena);
    if (sub) google_protobuf_ServiceDescriptorProto_set_options(msg, sub);
  }
  return sub;
}

/* google.protobuf.MethodDescriptorProto */

UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_new(upb_Arena* arena) {
  return (google_protobuf_MethodDescriptorProto*)_upb_Message_New(google_protobuf_MethodDescriptorProto_msg_init(), arena);
}
UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_MethodDescriptorProto* ret = google_protobuf_MethodDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_MethodDescriptorProto_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_MethodDescriptorProto* google_protobuf_MethodDescriptorProto_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_MethodDescriptorProto* ret = google_protobuf_MethodDescriptorProto_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_MethodDescriptorProto_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_MethodDescriptorProto_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_MethodDescriptorProto_serialize_ex(const google_protobuf_MethodDescriptorProto* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_MethodDescriptorProto_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_name(google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_input_type(google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_output_type(google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_options(google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 4);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto* msg) {
  const google_protobuf_MethodOptions* default_val = NULL;
  const google_protobuf_MethodOptions* ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 4);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 4);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_client_streaming(google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 5);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 5);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 5);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_clear_server_streaming(google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 6);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 6);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 6);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 4);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto* msg, upb_Arena* arena) {
  struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_MethodOptions*)_upb_Message_New(google_protobuf_MethodOptions_msg_init(), arena);
    if (sub) google_protobuf_MethodDescriptorProto_set_options(msg, sub);
  }
  return sub;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 5);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodDescriptorProto_msg_init(), 6);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}

/* google.protobuf.FileOptions */

UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_new(upb_Arena* arena) {
  return (google_protobuf_FileOptions*)_upb_Message_New(google_protobuf_FileOptions_msg_init(), arena);
}
UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_FileOptions_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_FileOptions* google_protobuf_FileOptions_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_FileOptions* ret = google_protobuf_FileOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_FileOptions_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_FileOptions_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_FileOptions_serialize_ex(const google_protobuf_FileOptions* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_FileOptions_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_FileOptions_clear_java_package(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_java_outer_classname(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 8);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 8);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 8);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_optimize_for(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 9);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions* msg) {
  int32_t default_val = 1;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 9);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 9);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_java_multiple_files(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 10);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 10);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 10);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_go_package(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 11);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 11);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 11);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_cc_generic_services(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 16);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 16);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 16);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_java_generic_services(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 17);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 17);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 17);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_py_generic_services(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 18);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 18);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 18);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_java_generate_equals_and_hash(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 20);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 20);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 20);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_deprecated(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 23);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 23);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 23);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_java_string_check_utf8(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 27);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 27);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 27);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_cc_enable_arenas(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 31);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions* msg) {
  bool default_val = true;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 31);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 31);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_objc_class_prefix(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 36);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 36);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 36);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_csharp_namespace(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 37);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 37);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 37);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_swift_prefix(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 39);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 39);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 39);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_php_class_prefix(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 40);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 40);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 40);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_php_namespace(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 41);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 41);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 41);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_php_generic_services(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 42);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 42);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 42);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_php_metadata_namespace(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 44);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 44);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 44);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_ruby_package(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 45);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 45);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 45);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FileOptions_clear_uninterpreted_option(google_protobuf_FileOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 999);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 999);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_UninterpretedOption* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const google_protobuf_FileOptions* msg) {
  size_t size;
  google_protobuf_FileOptions_uninterpreted_option(msg, &size);
  return size != 0;
}

UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 8);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 9);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 10);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 11);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 16);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 17);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 18);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 20);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 23);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 27);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 31);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 36);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 37);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 39);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 40);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 41);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 42);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace(google_protobuf_FileOptions *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 44);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FileOptions_set_ruby_package(google_protobuf_FileOptions *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 45);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_UninterpretedOption**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 999);
  return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptions_add_uninterpreted_option(google_protobuf_FileOptions* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FileOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(google_protobuf_UninterpretedOption_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.MessageOptions */

UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_new(upb_Arena* arena) {
  return (google_protobuf_MessageOptions*)_upb_Message_New(google_protobuf_MessageOptions_msg_init(), arena);
}
UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_MessageOptions* ret = google_protobuf_MessageOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_MessageOptions_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_MessageOptions* google_protobuf_MessageOptions_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_MessageOptions* ret = google_protobuf_MessageOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_MessageOptions_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_MessageOptions_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_MessageOptions_serialize_ex(const google_protobuf_MessageOptions* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_MessageOptions_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_MessageOptions_clear_message_set_wire_format(google_protobuf_MessageOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MessageOptions_clear_no_standard_descriptor_accessor(google_protobuf_MessageOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MessageOptions_clear_deprecated(google_protobuf_MessageOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MessageOptions_clear_map_entry(google_protobuf_MessageOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 7);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 7);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 7);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MessageOptions_clear_deprecated_legacy_json_field_conflicts(google_protobuf_MessageOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 11);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_MessageOptions_deprecated_legacy_json_field_conflicts(const google_protobuf_MessageOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 11);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated_legacy_json_field_conflicts(const google_protobuf_MessageOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 11);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MessageOptions_clear_uninterpreted_option(google_protobuf_MessageOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 999);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 999);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_UninterpretedOption* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_MessageOptions_has_uninterpreted_option(const google_protobuf_MessageOptions* msg) {
  size_t size;
  google_protobuf_MessageOptions_uninterpreted_option(msg, &size);
  return size != 0;
}

UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 7);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_MessageOptions_set_deprecated_legacy_json_field_conflicts(google_protobuf_MessageOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 11);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_UninterpretedOption**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_resize_uninterpreted_option(google_protobuf_MessageOptions* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 999);
  return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOptions_add_uninterpreted_option(google_protobuf_MessageOptions* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MessageOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(google_protobuf_UninterpretedOption_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.FieldOptions */

UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_new(upb_Arena* arena) {
  return (google_protobuf_FieldOptions*)_upb_Message_New(google_protobuf_FieldOptions_msg_init(), arena);
}
UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_FieldOptions_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_FieldOptions* google_protobuf_FieldOptions_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_FieldOptions* ret = google_protobuf_FieldOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_FieldOptions_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_FieldOptions_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_FieldOptions_serialize_ex(const google_protobuf_FieldOptions* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_FieldOptions_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_FieldOptions_clear_ctype(google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions* msg) {
  int32_t default_val = 0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldOptions_clear_packed(google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldOptions_clear_deprecated(google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldOptions_clear_lazy(google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 5);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 5);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 5);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldOptions_clear_jstype(google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 6);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions* msg) {
  int32_t default_val = 0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 6);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 6);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldOptions_clear_weak(google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 10);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 10);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 10);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldOptions_clear_unverified_lazy(google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 15);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FieldOptions_unverified_lazy(const google_protobuf_FieldOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 15);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldOptions_has_unverified_lazy(const google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 15);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldOptions_clear_debug_redact(google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 16);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_FieldOptions_debug_redact(const google_protobuf_FieldOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 16);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_FieldOptions_has_debug_redact(const google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 16);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_FieldOptions_clear_uninterpreted_option(google_protobuf_FieldOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 999);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 999);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_UninterpretedOption* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const google_protobuf_FieldOptions* msg) {
  size_t size;
  google_protobuf_FieldOptions_uninterpreted_option(msg, &size);
  return size != 0;
}

UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 5);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 6);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 10);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldOptions_set_unverified_lazy(google_protobuf_FieldOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 15);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_FieldOptions_set_debug_redact(google_protobuf_FieldOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 16);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_UninterpretedOption**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_resize_uninterpreted_option(google_protobuf_FieldOptions* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 999);
  return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOptions_add_uninterpreted_option(google_protobuf_FieldOptions* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_FieldOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(google_protobuf_UninterpretedOption_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.OneofOptions */

UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_new(upb_Arena* arena) {
  return (google_protobuf_OneofOptions*)_upb_Message_New(google_protobuf_OneofOptions_msg_init(), arena);
}
UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_OneofOptions_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_OneofOptions* google_protobuf_OneofOptions_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_OneofOptions* ret = google_protobuf_OneofOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_OneofOptions_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_OneofOptions_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_OneofOptions_serialize_ex(const google_protobuf_OneofOptions* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_OneofOptions_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_OneofOptions_clear_uninterpreted_option(google_protobuf_OneofOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofOptions_msg_init(), 999);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofOptions_msg_init(), 999);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_UninterpretedOption* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_OneofOptions_has_uninterpreted_option(const google_protobuf_OneofOptions* msg) {
  size_t size;
  google_protobuf_OneofOptions_uninterpreted_option(msg, &size);
  return size != 0;
}

UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_mutable_uninterpreted_option(google_protobuf_OneofOptions* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_UninterpretedOption**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_resize_uninterpreted_option(google_protobuf_OneofOptions* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofOptions_msg_init(), 999);
  return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOptions_add_uninterpreted_option(google_protobuf_OneofOptions* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_OneofOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(google_protobuf_UninterpretedOption_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.EnumOptions */

UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_new(upb_Arena* arena) {
  return (google_protobuf_EnumOptions*)_upb_Message_New(google_protobuf_EnumOptions_msg_init(), arena);
}
UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_EnumOptions_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_EnumOptions* google_protobuf_EnumOptions_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_EnumOptions* ret = google_protobuf_EnumOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_EnumOptions_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_EnumOptions_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_EnumOptions_serialize_ex(const google_protobuf_EnumOptions* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_EnumOptions_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_EnumOptions_clear_allow_alias(google_protobuf_EnumOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_EnumOptions_clear_deprecated(google_protobuf_EnumOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_EnumOptions_clear_deprecated_legacy_json_field_conflicts(google_protobuf_EnumOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 6);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_EnumOptions_deprecated_legacy_json_field_conflicts(const google_protobuf_EnumOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 6);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated_legacy_json_field_conflicts(const google_protobuf_EnumOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 6);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_EnumOptions_clear_uninterpreted_option(google_protobuf_EnumOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 999);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 999);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_UninterpretedOption* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_EnumOptions_has_uninterpreted_option(const google_protobuf_EnumOptions* msg) {
  size_t size;
  google_protobuf_EnumOptions_uninterpreted_option(msg, &size);
  return size != 0;
}

UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_EnumOptions_set_deprecated_legacy_json_field_conflicts(google_protobuf_EnumOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 6);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_UninterpretedOption**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_resize_uninterpreted_option(google_protobuf_EnumOptions* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 999);
  return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptions_add_uninterpreted_option(google_protobuf_EnumOptions* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(google_protobuf_UninterpretedOption_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.EnumValueOptions */

UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_new(upb_Arena* arena) {
  return (google_protobuf_EnumValueOptions*)_upb_Message_New(google_protobuf_EnumValueOptions_msg_init(), arena);
}
UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_EnumValueOptions* ret = google_protobuf_EnumValueOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_EnumValueOptions_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_EnumValueOptions* google_protobuf_EnumValueOptions_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_EnumValueOptions* ret = google_protobuf_EnumValueOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_EnumValueOptions_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_EnumValueOptions_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_EnumValueOptions_serialize_ex(const google_protobuf_EnumValueOptions* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_EnumValueOptions_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_EnumValueOptions_clear_deprecated(google_protobuf_EnumValueOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueOptions_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueOptions_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueOptions_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_EnumValueOptions_clear_uninterpreted_option(google_protobuf_EnumValueOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueOptions_msg_init(), 999);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueOptions_msg_init(), 999);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_UninterpretedOption* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_EnumValueOptions_has_uninterpreted_option(const google_protobuf_EnumValueOptions* msg) {
  size_t size;
  google_protobuf_EnumValueOptions_uninterpreted_option(msg, &size);
  return size != 0;
}

UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueOptions_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_UninterpretedOption**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_resize_uninterpreted_option(google_protobuf_EnumValueOptions* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueOptions_msg_init(), 999);
  return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValueOptions_add_uninterpreted_option(google_protobuf_EnumValueOptions* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_EnumValueOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(google_protobuf_UninterpretedOption_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.ServiceOptions */

UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_new(upb_Arena* arena) {
  return (google_protobuf_ServiceOptions*)_upb_Message_New(google_protobuf_ServiceOptions_msg_init(), arena);
}
UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_ServiceOptions* ret = google_protobuf_ServiceOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_ServiceOptions_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_ServiceOptions* google_protobuf_ServiceOptions_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_ServiceOptions* ret = google_protobuf_ServiceOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_ServiceOptions_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_ServiceOptions_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_ServiceOptions_serialize_ex(const google_protobuf_ServiceOptions* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_ServiceOptions_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_ServiceOptions_clear_deprecated(google_protobuf_ServiceOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceOptions_msg_init(), 33);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceOptions_msg_init(), 33);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceOptions_msg_init(), 33);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_ServiceOptions_clear_uninterpreted_option(google_protobuf_ServiceOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceOptions_msg_init(), 999);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceOptions_msg_init(), 999);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_UninterpretedOption* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_ServiceOptions_has_uninterpreted_option(const google_protobuf_ServiceOptions* msg) {
  size_t size;
  google_protobuf_ServiceOptions_uninterpreted_option(msg, &size);
  return size != 0;
}

UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceOptions_msg_init(), 33);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_UninterpretedOption**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_resize_uninterpreted_option(google_protobuf_ServiceOptions* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceOptions_msg_init(), 999);
  return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOptions_add_uninterpreted_option(google_protobuf_ServiceOptions* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_ServiceOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(google_protobuf_UninterpretedOption_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.MethodOptions */

UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_new(upb_Arena* arena) {
  return (google_protobuf_MethodOptions*)_upb_Message_New(google_protobuf_MethodOptions_msg_init(), arena);
}
UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_MethodOptions_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_MethodOptions* google_protobuf_MethodOptions_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_MethodOptions* ret = google_protobuf_MethodOptions_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_MethodOptions_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_MethodOptions_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_MethodOptions_serialize_ex(const google_protobuf_MethodOptions* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_MethodOptions_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_MethodOptions_clear_deprecated(google_protobuf_MethodOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 33);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 33);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 33);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MethodOptions_clear_idempotency_level(google_protobuf_MethodOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 34);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions* msg) {
  int32_t default_val = 0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 34);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 34);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_MethodOptions_clear_uninterpreted_option(google_protobuf_MethodOptions* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 999);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 999);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_UninterpretedOption* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const google_protobuf_MethodOptions* msg) {
  size_t size;
  google_protobuf_MethodOptions_uninterpreted_option(msg, &size);
  return size != 0;
}

UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 33);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 34);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_UninterpretedOption**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_resize_uninterpreted_option(google_protobuf_MethodOptions* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 999);
  return (google_protobuf_UninterpretedOption**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOptions_add_uninterpreted_option(google_protobuf_MethodOptions* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_MethodOptions_msg_init(), 999);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_Message_New(google_protobuf_UninterpretedOption_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.UninterpretedOption */

UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_new(upb_Arena* arena) {
  return (google_protobuf_UninterpretedOption*)_upb_Message_New(google_protobuf_UninterpretedOption_msg_init(), arena);
}
UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_UninterpretedOption* ret = google_protobuf_UninterpretedOption_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_UninterpretedOption_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_UninterpretedOption* google_protobuf_UninterpretedOption_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_UninterpretedOption* ret = google_protobuf_UninterpretedOption_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_UninterpretedOption_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_UninterpretedOption_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_UninterpretedOption_serialize_ex(const google_protobuf_UninterpretedOption* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_UninterpretedOption_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_UninterpretedOption_clear_name(google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 2);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_UninterpretedOption_has_name(const google_protobuf_UninterpretedOption* msg) {
  size_t size;
  google_protobuf_UninterpretedOption_name(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_UninterpretedOption_clear_identifier_value(google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_UninterpretedOption_clear_positive_int_value(google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 4);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption* msg) {
  uint64_t default_val = (uint64_t)0ull;
  uint64_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 4);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 4);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_UninterpretedOption_clear_negative_int_value(google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 5);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption* msg) {
  int64_t default_val = (int64_t)0ll;
  int64_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 5);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 5);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_UninterpretedOption_clear_double_value(google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 6);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption* msg) {
  double default_val = 0;
  double ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 6);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 6);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_UninterpretedOption_clear_string_value(google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 7);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 7);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 7);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_UninterpretedOption_clear_aggregate_value(google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 8);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 8);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 8);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 2);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_resize_name(google_protobuf_UninterpretedOption* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 2);
  return (google_protobuf_UninterpretedOption_NamePart**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_add_name(google_protobuf_UninterpretedOption* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 2);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(google_protobuf_UninterpretedOption_NamePart_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 4);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 5);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 6);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 7);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_msg_init(), 8);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}

/* google.protobuf.UninterpretedOption.NamePart */

UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_new(upb_Arena* arena) {
  return (google_protobuf_UninterpretedOption_NamePart*)_upb_Message_New(google_protobuf_UninterpretedOption_NamePart_msg_init(), arena);
}
UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_UninterpretedOption_NamePart* ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_UninterpretedOption_NamePart_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_NamePart_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_UninterpretedOption_NamePart* ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_UninterpretedOption_NamePart_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_UninterpretedOption_NamePart_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_UninterpretedOption_NamePart_serialize_ex(const google_protobuf_UninterpretedOption_NamePart* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_UninterpretedOption_NamePart_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_clear_name_part(google_protobuf_UninterpretedOption_NamePart* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_NamePart_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_NamePart_msg_init(), 1);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_NamePart_msg_init(), 1);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_clear_is_extension(google_protobuf_UninterpretedOption_NamePart* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_NamePart_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) {
  bool default_val = false;
  bool ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_NamePart_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_NamePart_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_NamePart_msg_init(), 1);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_UninterpretedOption_NamePart_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}

/* google.protobuf.SourceCodeInfo */

UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_new(upb_Arena* arena) {
  return (google_protobuf_SourceCodeInfo*)_upb_Message_New(google_protobuf_SourceCodeInfo_msg_init(), arena);
}
UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_SourceCodeInfo* ret = google_protobuf_SourceCodeInfo_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_SourceCodeInfo_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_SourceCodeInfo* google_protobuf_SourceCodeInfo_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_SourceCodeInfo* ret = google_protobuf_SourceCodeInfo_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_SourceCodeInfo_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_SourceCodeInfo_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_SourceCodeInfo_serialize_ex(const google_protobuf_SourceCodeInfo* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_SourceCodeInfo_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_SourceCodeInfo_clear_location(google_protobuf_SourceCodeInfo* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_SourceCodeInfo_Location* const* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_msg_init(), 1);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_SourceCodeInfo_Location* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_has_location(const google_protobuf_SourceCodeInfo* msg) {
  size_t size;
  google_protobuf_SourceCodeInfo_location(msg, &size);
  return size != 0;
}

UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_mutable_location(google_protobuf_SourceCodeInfo* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_msg_init(), 1);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_SourceCodeInfo_Location**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_resize_location(google_protobuf_SourceCodeInfo* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_msg_init(), 1);
  return (google_protobuf_SourceCodeInfo_Location**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_add_location(google_protobuf_SourceCodeInfo* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_msg_init(), 1);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(google_protobuf_SourceCodeInfo_Location_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.SourceCodeInfo.Location */

UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_new(upb_Arena* arena) {
  return (google_protobuf_SourceCodeInfo_Location*)_upb_Message_New(google_protobuf_SourceCodeInfo_Location_msg_init(), arena);
}
UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_SourceCodeInfo_Location* ret = google_protobuf_SourceCodeInfo_Location_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_SourceCodeInfo_Location_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_Location_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_SourceCodeInfo_Location* ret = google_protobuf_SourceCodeInfo_Location_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_SourceCodeInfo_Location_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_SourceCodeInfo_Location_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_SourceCodeInfo_Location_serialize_ex(const google_protobuf_SourceCodeInfo_Location* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_SourceCodeInfo_Location_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_path(google_protobuf_SourceCodeInfo_Location* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 1);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (int32_t const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_path(const google_protobuf_SourceCodeInfo_Location* msg) {
  size_t size;
  google_protobuf_SourceCodeInfo_Location_path(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_span(google_protobuf_SourceCodeInfo_Location* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 2);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (int32_t const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_span(const google_protobuf_SourceCodeInfo_Location* msg) {
  size_t size;
  google_protobuf_SourceCodeInfo_Location_span(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_comments(google_protobuf_SourceCodeInfo_Location* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_trailing_comments(google_protobuf_SourceCodeInfo_Location* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 4);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 4);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 4);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_clear_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 6);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 6);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (upb_StringView const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location* msg) {
  size_t size;
  google_protobuf_SourceCodeInfo_Location_leading_detached_comments(msg, &size);
  return size != 0;
}

UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_protobuf_SourceCodeInfo_Location* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 1);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (int32_t*)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_path(google_protobuf_SourceCodeInfo_Location* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 1);
  return (int32_t*)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_path(google_protobuf_SourceCodeInfo_Location* msg, int32_t val, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 1);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return false;
  }
  _upb_Array_Set(arr, arr->size - 1, &val, sizeof(val));
  return true;
}
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_span(google_protobuf_SourceCodeInfo_Location* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 2);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (int32_t*)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_span(google_protobuf_SourceCodeInfo_Location* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 2);
  return (int32_t*)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf_SourceCodeInfo_Location* msg, int32_t val, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 2);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return false;
  }
  _upb_Array_Set(arr, arr->size - 1, &val, sizeof(val));
  return true;
}
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 4);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 6);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (upb_StringView*)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE upb_StringView* google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 6);
  return (upb_StringView*)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location* msg, upb_StringView val, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_SourceCodeInfo_Location_msg_init(), 6);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return false;
  }
  _upb_Array_Set(arr, arr->size - 1, &val, sizeof(val));
  return true;
}

/* google.protobuf.GeneratedCodeInfo */

UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_new(upb_Arena* arena) {
  return (google_protobuf_GeneratedCodeInfo*)_upb_Message_New(google_protobuf_GeneratedCodeInfo_msg_init(), arena);
}
UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_GeneratedCodeInfo* ret = google_protobuf_GeneratedCodeInfo_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_GeneratedCodeInfo_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_GeneratedCodeInfo* google_protobuf_GeneratedCodeInfo_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_GeneratedCodeInfo* ret = google_protobuf_GeneratedCodeInfo_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_GeneratedCodeInfo_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_GeneratedCodeInfo_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_GeneratedCodeInfo_serialize_ex(const google_protobuf_GeneratedCodeInfo* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_GeneratedCodeInfo_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_clear_annotation(google_protobuf_GeneratedCodeInfo* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE const google_protobuf_GeneratedCodeInfo_Annotation* const* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_msg_init(), 1);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (const google_protobuf_GeneratedCodeInfo_Annotation* const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_has_annotation(const google_protobuf_GeneratedCodeInfo* msg) {
  size_t size;
  google_protobuf_GeneratedCodeInfo_annotation(msg, &size);
  return size != 0;
}

UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_mutable_annotation(google_protobuf_GeneratedCodeInfo* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_msg_init(), 1);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_resize_annotation(google_protobuf_GeneratedCodeInfo* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_msg_init(), 1);
  return (google_protobuf_GeneratedCodeInfo_Annotation**)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_add_annotation(google_protobuf_GeneratedCodeInfo* msg, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_msg_init(), 1);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return NULL;
  }
  struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), arena);
  if (!arr || !sub) return NULL;
  _upb_Array_Set(arr, arr->size - 1, &sub, sizeof(sub));
  return sub;
}

/* google.protobuf.GeneratedCodeInfo.Annotation */

UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_new(upb_Arena* arena) {
  return (google_protobuf_GeneratedCodeInfo_Annotation*)_upb_Message_New(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), arena);
}
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_protobuf_GeneratedCodeInfo_Annotation* ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_Annotation_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_protobuf_GeneratedCodeInfo_Annotation* ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_protobuf_GeneratedCodeInfo_Annotation_serialize_ex(const google_protobuf_GeneratedCodeInfo_Annotation* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_path(google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 1);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* size) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 1);
  const upb_Array* arr = upb_Message_GetArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (int32_t const*)_upb_array_constptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_path(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  size_t size;
  google_protobuf_GeneratedCodeInfo_Annotation_path(msg, &size);
  return size != 0;
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_source_file(google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 2);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE upb_StringView google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  upb_StringView default_val = upb_StringView_FromString("");
  upb_StringView ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 2);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 2);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_begin(google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 3);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  int32_t default_val = (int32_t)0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 3);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 3);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_end(google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 4);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  int32_t default_val = (int32_t)0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 4);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 4);
  return _upb_Message_HasNonExtensionField(msg, &field);
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_clear_semantic(google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 5);
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_semantic(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  int32_t default_val = 0;
  int32_t ret;
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 5);
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_semantic(const google_protobuf_GeneratedCodeInfo_Annotation* msg) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 5);
  return _upb_Message_HasNonExtensionField(msg, &field);
}

UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t* size) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 1);
  upb_Array* arr = upb_Message_GetMutableArray(msg, &field);
  if (arr) {
    if (size) *size = arr->size;
    return (int32_t*)_upb_array_ptr(arr);
  } else {
    if (size) *size = 0;
    return NULL;
  }
}
UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, size_t size, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 1);
  return (int32_t*)upb_Message_ResizeArrayUninitialized(msg, &field, size, arena);
}
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation* msg, int32_t val, upb_Arena* arena) {
  upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 1);
  upb_Array* arr = upb_Message_GetOrCreateMutableArray(msg, &field, arena);
  if (!arr || !_upb_Array_ResizeUninitialized(arr, arr->size + 1, arena)) {
    return false;
  }
  _upb_Array_Set(arr, arr->size - 1, &val, sizeof(val));
  return true;
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_StringView value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 2);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 3);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 4);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_semantic(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
  const upb_MiniTableField field = *upb_MiniTable_FindFieldByNumber(google_protobuf_GeneratedCodeInfo_Annotation_msg_init(), 5);
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}

extern const upb_MiniTableFile google_protobuf_descriptor_proto_upb_file_layout;

/* Max size 32 is google.protobuf.FileOptions */
/* Max size 64 is google.protobuf.FileOptions */
#define _UPB_MAXOPT_SIZE UPB_SIZE(104, 192)

#ifdef __cplusplus
}  /* extern "C" */
#endif

#include "upb/port/undef.inc"

#endif  /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ */
