• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     envoy/config/cluster/v3/filter.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef ENVOY_CONFIG_CLUSTER_V3_FILTER_PROTO_UPB_H_
10 #define ENVOY_CONFIG_CLUSTER_V3_FILTER_PROTO_UPB_H_
11 
12 #include "upb/msg.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
16 
17 #include "upb/port_def.inc"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 struct envoy_config_cluster_v3_Filter;
24 typedef struct envoy_config_cluster_v3_Filter envoy_config_cluster_v3_Filter;
25 extern const upb_msglayout envoy_config_cluster_v3_Filter_msginit;
26 struct google_protobuf_Any;
27 extern const upb_msglayout google_protobuf_Any_msginit;
28 
29 
30 /* envoy.config.cluster.v3.Filter */
31 
envoy_config_cluster_v3_Filter_new(upb_arena * arena)32 UPB_INLINE envoy_config_cluster_v3_Filter *envoy_config_cluster_v3_Filter_new(upb_arena *arena) {
33   return (envoy_config_cluster_v3_Filter *)_upb_msg_new(&envoy_config_cluster_v3_Filter_msginit, arena);
34 }
envoy_config_cluster_v3_Filter_parse(const char * buf,size_t size,upb_arena * arena)35 UPB_INLINE envoy_config_cluster_v3_Filter *envoy_config_cluster_v3_Filter_parse(const char *buf, size_t size,
36                         upb_arena *arena) {
37   envoy_config_cluster_v3_Filter *ret = envoy_config_cluster_v3_Filter_new(arena);
38   return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Filter_msginit, arena)) ? ret : NULL;
39 }
envoy_config_cluster_v3_Filter_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)40 UPB_INLINE envoy_config_cluster_v3_Filter *envoy_config_cluster_v3_Filter_parse_ex(const char *buf, size_t size,
41                            upb_arena *arena, int options) {
42   envoy_config_cluster_v3_Filter *ret = envoy_config_cluster_v3_Filter_new(arena);
43   return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Filter_msginit, arena, options))
44       ? ret : NULL;
45 }
envoy_config_cluster_v3_Filter_serialize(const envoy_config_cluster_v3_Filter * msg,upb_arena * arena,size_t * len)46 UPB_INLINE char *envoy_config_cluster_v3_Filter_serialize(const envoy_config_cluster_v3_Filter *msg, upb_arena *arena, size_t *len) {
47   return upb_encode(msg, &envoy_config_cluster_v3_Filter_msginit, arena, len);
48 }
49 
envoy_config_cluster_v3_Filter_name(const envoy_config_cluster_v3_Filter * msg)50 UPB_INLINE upb_strview envoy_config_cluster_v3_Filter_name(const envoy_config_cluster_v3_Filter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
envoy_config_cluster_v3_Filter_has_typed_config(const envoy_config_cluster_v3_Filter * msg)51 UPB_INLINE bool envoy_config_cluster_v3_Filter_has_typed_config(const envoy_config_cluster_v3_Filter *msg) { return _upb_hasbit(msg, 1); }
envoy_config_cluster_v3_Filter_typed_config(const envoy_config_cluster_v3_Filter * msg)52 UPB_INLINE const struct google_protobuf_Any* envoy_config_cluster_v3_Filter_typed_config(const envoy_config_cluster_v3_Filter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Any*); }
53 
envoy_config_cluster_v3_Filter_set_name(envoy_config_cluster_v3_Filter * msg,upb_strview value)54 UPB_INLINE void envoy_config_cluster_v3_Filter_set_name(envoy_config_cluster_v3_Filter *msg, upb_strview value) {
55   *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
56 }
envoy_config_cluster_v3_Filter_set_typed_config(envoy_config_cluster_v3_Filter * msg,struct google_protobuf_Any * value)57 UPB_INLINE void envoy_config_cluster_v3_Filter_set_typed_config(envoy_config_cluster_v3_Filter *msg, struct google_protobuf_Any* value) {
58   _upb_sethas(msg, 1);
59   *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Any*) = value;
60 }
envoy_config_cluster_v3_Filter_mutable_typed_config(envoy_config_cluster_v3_Filter * msg,upb_arena * arena)61 UPB_INLINE struct google_protobuf_Any* envoy_config_cluster_v3_Filter_mutable_typed_config(envoy_config_cluster_v3_Filter *msg, upb_arena *arena) {
62   struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_cluster_v3_Filter_typed_config(msg);
63   if (sub == NULL) {
64     sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
65     if (!sub) return NULL;
66     envoy_config_cluster_v3_Filter_set_typed_config(msg, sub);
67   }
68   return sub;
69 }
70 
71 #ifdef __cplusplus
72 }  /* extern "C" */
73 #endif
74 
75 #include "upb/port_undef.inc"
76 
77 #endif  /* ENVOY_CONFIG_CLUSTER_V3_FILTER_PROTO_UPB_H_ */
78