1 /* This file was generated by upb_generator from the input file:
2 *
3 * envoy/annotations/deprecation.proto
4 *
5 * Do not edit -- your changes will be discarded when the file is
6 * regenerated. */
7
8 #ifndef ENVOY_ANNOTATIONS_DEPRECATION_PROTO_UPB_H_
9 #define ENVOY_ANNOTATIONS_DEPRECATION_PROTO_UPB_H_
10
11 #include "upb/generated_code_support.h"
12
13 #include "envoy/annotations/deprecation.upb_minitable.h"
14
15 #include "google/protobuf/descriptor.upb_minitable.h"
16
17 // Must be last.
18 #include "upb/port/def.inc"
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 struct google_protobuf_EnumValueOptions;
25 struct google_protobuf_FieldOptions;
26
27
envoy_annotations_has_disallowed_by_default(const struct google_protobuf_FieldOptions * msg)28 UPB_INLINE bool envoy_annotations_has_disallowed_by_default(const struct google_protobuf_FieldOptions* msg) {
29 return upb_Message_HasExtension((upb_Message*)msg, &envoy_annotations_disallowed_by_default_ext);
30 }
envoy_annotations_clear_disallowed_by_default(struct google_protobuf_FieldOptions * msg)31 UPB_INLINE void envoy_annotations_clear_disallowed_by_default(struct google_protobuf_FieldOptions* msg) {
32 upb_Message_ClearExtension((upb_Message*)msg, &envoy_annotations_disallowed_by_default_ext);
33 }
envoy_annotations_disallowed_by_default(const struct google_protobuf_FieldOptions * msg)34 UPB_INLINE bool envoy_annotations_disallowed_by_default(const struct google_protobuf_FieldOptions* msg) {
35 const upb_MiniTableExtension* ext = &envoy_annotations_disallowed_by_default_ext;
36 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
37 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
38 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_1Byte);
39 bool default_val = false;
40 bool ret;
41 _upb_Message_GetExtensionField((upb_Message*)msg, ext, &default_val, &ret);
42 return ret;
43 }
envoy_annotations_set_disallowed_by_default(struct google_protobuf_FieldOptions * msg,bool val,upb_Arena * arena)44 UPB_INLINE void envoy_annotations_set_disallowed_by_default(struct google_protobuf_FieldOptions* msg, bool val, upb_Arena* arena) {
45 const upb_MiniTableExtension* ext = &envoy_annotations_disallowed_by_default_ext;
46 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
47 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
48 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_1Byte);
49 bool ok = _upb_Message_SetExtensionField((upb_Message*)msg, ext, &val, arena);
50 UPB_ASSERT(ok);
51 }
envoy_annotations_has_deprecated_at_minor_version(const struct google_protobuf_FieldOptions * msg)52 UPB_INLINE bool envoy_annotations_has_deprecated_at_minor_version(const struct google_protobuf_FieldOptions* msg) {
53 return upb_Message_HasExtension((upb_Message*)msg, &envoy_annotations_deprecated_at_minor_version_ext);
54 }
envoy_annotations_clear_deprecated_at_minor_version(struct google_protobuf_FieldOptions * msg)55 UPB_INLINE void envoy_annotations_clear_deprecated_at_minor_version(struct google_protobuf_FieldOptions* msg) {
56 upb_Message_ClearExtension((upb_Message*)msg, &envoy_annotations_deprecated_at_minor_version_ext);
57 }
envoy_annotations_deprecated_at_minor_version(const struct google_protobuf_FieldOptions * msg)58 UPB_INLINE upb_StringView envoy_annotations_deprecated_at_minor_version(const struct google_protobuf_FieldOptions* msg) {
59 const upb_MiniTableExtension* ext = &envoy_annotations_deprecated_at_minor_version_ext;
60 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
61 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
62 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_StringView);
63 upb_StringView default_val = upb_StringView_FromString("");
64 upb_StringView ret;
65 _upb_Message_GetExtensionField((upb_Message*)msg, ext, &default_val, &ret);
66 return ret;
67 }
envoy_annotations_set_deprecated_at_minor_version(struct google_protobuf_FieldOptions * msg,upb_StringView val,upb_Arena * arena)68 UPB_INLINE void envoy_annotations_set_deprecated_at_minor_version(struct google_protobuf_FieldOptions* msg, upb_StringView val, upb_Arena* arena) {
69 const upb_MiniTableExtension* ext = &envoy_annotations_deprecated_at_minor_version_ext;
70 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
71 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
72 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_StringView);
73 bool ok = _upb_Message_SetExtensionField((upb_Message*)msg, ext, &val, arena);
74 UPB_ASSERT(ok);
75 }
envoy_annotations_has_disallowed_by_default_enum(const struct google_protobuf_EnumValueOptions * msg)76 UPB_INLINE bool envoy_annotations_has_disallowed_by_default_enum(const struct google_protobuf_EnumValueOptions* msg) {
77 return upb_Message_HasExtension((upb_Message*)msg, &envoy_annotations_disallowed_by_default_enum_ext);
78 }
envoy_annotations_clear_disallowed_by_default_enum(struct google_protobuf_EnumValueOptions * msg)79 UPB_INLINE void envoy_annotations_clear_disallowed_by_default_enum(struct google_protobuf_EnumValueOptions* msg) {
80 upb_Message_ClearExtension((upb_Message*)msg, &envoy_annotations_disallowed_by_default_enum_ext);
81 }
envoy_annotations_disallowed_by_default_enum(const struct google_protobuf_EnumValueOptions * msg)82 UPB_INLINE bool envoy_annotations_disallowed_by_default_enum(const struct google_protobuf_EnumValueOptions* msg) {
83 const upb_MiniTableExtension* ext = &envoy_annotations_disallowed_by_default_enum_ext;
84 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
85 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
86 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_1Byte);
87 bool default_val = false;
88 bool ret;
89 _upb_Message_GetExtensionField((upb_Message*)msg, ext, &default_val, &ret);
90 return ret;
91 }
envoy_annotations_set_disallowed_by_default_enum(struct google_protobuf_EnumValueOptions * msg,bool val,upb_Arena * arena)92 UPB_INLINE void envoy_annotations_set_disallowed_by_default_enum(struct google_protobuf_EnumValueOptions* msg, bool val, upb_Arena* arena) {
93 const upb_MiniTableExtension* ext = &envoy_annotations_disallowed_by_default_enum_ext;
94 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
95 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
96 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_1Byte);
97 bool ok = _upb_Message_SetExtensionField((upb_Message*)msg, ext, &val, arena);
98 UPB_ASSERT(ok);
99 }
envoy_annotations_has_deprecated_at_minor_version_enum(const struct google_protobuf_EnumValueOptions * msg)100 UPB_INLINE bool envoy_annotations_has_deprecated_at_minor_version_enum(const struct google_protobuf_EnumValueOptions* msg) {
101 return upb_Message_HasExtension((upb_Message*)msg, &envoy_annotations_deprecated_at_minor_version_enum_ext);
102 }
envoy_annotations_clear_deprecated_at_minor_version_enum(struct google_protobuf_EnumValueOptions * msg)103 UPB_INLINE void envoy_annotations_clear_deprecated_at_minor_version_enum(struct google_protobuf_EnumValueOptions* msg) {
104 upb_Message_ClearExtension((upb_Message*)msg, &envoy_annotations_deprecated_at_minor_version_enum_ext);
105 }
envoy_annotations_deprecated_at_minor_version_enum(const struct google_protobuf_EnumValueOptions * msg)106 UPB_INLINE upb_StringView envoy_annotations_deprecated_at_minor_version_enum(const struct google_protobuf_EnumValueOptions* msg) {
107 const upb_MiniTableExtension* ext = &envoy_annotations_deprecated_at_minor_version_enum_ext;
108 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
109 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
110 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_StringView);
111 upb_StringView default_val = upb_StringView_FromString("");
112 upb_StringView ret;
113 _upb_Message_GetExtensionField((upb_Message*)msg, ext, &default_val, &ret);
114 return ret;
115 }
envoy_annotations_set_deprecated_at_minor_version_enum(struct google_protobuf_EnumValueOptions * msg,upb_StringView val,upb_Arena * arena)116 UPB_INLINE void envoy_annotations_set_deprecated_at_minor_version_enum(struct google_protobuf_EnumValueOptions* msg, upb_StringView val, upb_Arena* arena) {
117 const upb_MiniTableExtension* ext = &envoy_annotations_deprecated_at_minor_version_enum_ext;
118 UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
119 UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
120 &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_StringView);
121 bool ok = _upb_Message_SetExtensionField((upb_Message*)msg, ext, &val, arena);
122 UPB_ASSERT(ok);
123 }
124 #ifdef __cplusplus
125 } /* extern "C" */
126 #endif
127
128 #include "upb/port/undef.inc"
129
130 #endif /* ENVOY_ANNOTATIONS_DEPRECATION_PROTO_UPB_H_ */
131