xref: /aosp_15_r20/external/grpc-grpc/third_party/upb/upb/mini_descriptor/internal/modifiers.h (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2023 Google LLC.  All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
7 
8 #ifndef UPB_MINI_DESCRIPTOR_INTERNAL_MODIFIERS_H_
9 #define UPB_MINI_DESCRIPTOR_INTERNAL_MODIFIERS_H_
10 
11 // Must be last.
12 #include "upb/port/def.inc"
13 
14 typedef enum {
15   kUpb_FieldModifier_IsRepeated = 1 << 0,
16   kUpb_FieldModifier_IsPacked = 1 << 1,
17   kUpb_FieldModifier_IsClosedEnum = 1 << 2,
18   kUpb_FieldModifier_IsProto3Singular = 1 << 3,
19   kUpb_FieldModifier_IsRequired = 1 << 4,
20   kUpb_FieldModifier_ValidateUtf8 = 1 << 5,
21 } kUpb_FieldModifier;
22 
23 // These modifiers are also used on the wire.
24 typedef enum {
25   kUpb_MessageModifier_ValidateUtf8 = 1 << 0,
26   kUpb_MessageModifier_DefaultIsPacked = 1 << 1,
27   kUpb_MessageModifier_IsExtendable = 1 << 2,
28 } kUpb_MessageModifier;
29 
30 #include "upb/port/undef.inc"
31 
32 #endif  // UPB_MINI_DESCRIPTOR_INTERNAL_MODIFIERS_H_
33