1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/config/core/v3/backoff.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_CONFIG_CORE_V3_BACKOFF_PROTO_UPB_H_
10 #define ENVOY_CONFIG_CORE_V3_BACKOFF_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_core_v3_BackoffStrategy;
24 typedef struct envoy_config_core_v3_BackoffStrategy envoy_config_core_v3_BackoffStrategy;
25 extern const upb_msglayout envoy_config_core_v3_BackoffStrategy_msginit;
26 struct google_protobuf_Duration;
27 extern const upb_msglayout google_protobuf_Duration_msginit;
28
29
30 /* envoy.config.core.v3.BackoffStrategy */
31
envoy_config_core_v3_BackoffStrategy_new(upb_arena * arena)32 UPB_INLINE envoy_config_core_v3_BackoffStrategy *envoy_config_core_v3_BackoffStrategy_new(upb_arena *arena) {
33 return (envoy_config_core_v3_BackoffStrategy *)_upb_msg_new(&envoy_config_core_v3_BackoffStrategy_msginit, arena);
34 }
envoy_config_core_v3_BackoffStrategy_parse(const char * buf,size_t size,upb_arena * arena)35 UPB_INLINE envoy_config_core_v3_BackoffStrategy *envoy_config_core_v3_BackoffStrategy_parse(const char *buf, size_t size,
36 upb_arena *arena) {
37 envoy_config_core_v3_BackoffStrategy *ret = envoy_config_core_v3_BackoffStrategy_new(arena);
38 return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_BackoffStrategy_msginit, arena)) ? ret : NULL;
39 }
envoy_config_core_v3_BackoffStrategy_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)40 UPB_INLINE envoy_config_core_v3_BackoffStrategy *envoy_config_core_v3_BackoffStrategy_parse_ex(const char *buf, size_t size,
41 upb_arena *arena, int options) {
42 envoy_config_core_v3_BackoffStrategy *ret = envoy_config_core_v3_BackoffStrategy_new(arena);
43 return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_BackoffStrategy_msginit, arena, options))
44 ? ret : NULL;
45 }
envoy_config_core_v3_BackoffStrategy_serialize(const envoy_config_core_v3_BackoffStrategy * msg,upb_arena * arena,size_t * len)46 UPB_INLINE char *envoy_config_core_v3_BackoffStrategy_serialize(const envoy_config_core_v3_BackoffStrategy *msg, upb_arena *arena, size_t *len) {
47 return upb_encode(msg, &envoy_config_core_v3_BackoffStrategy_msginit, arena, len);
48 }
49
envoy_config_core_v3_BackoffStrategy_has_base_interval(const envoy_config_core_v3_BackoffStrategy * msg)50 UPB_INLINE bool envoy_config_core_v3_BackoffStrategy_has_base_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return _upb_hasbit(msg, 1); }
envoy_config_core_v3_BackoffStrategy_base_interval(const envoy_config_core_v3_BackoffStrategy * msg)51 UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_BackoffStrategy_base_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
envoy_config_core_v3_BackoffStrategy_has_max_interval(const envoy_config_core_v3_BackoffStrategy * msg)52 UPB_INLINE bool envoy_config_core_v3_BackoffStrategy_has_max_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return _upb_hasbit(msg, 2); }
envoy_config_core_v3_BackoffStrategy_max_interval(const envoy_config_core_v3_BackoffStrategy * msg)53 UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_BackoffStrategy_max_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
54
envoy_config_core_v3_BackoffStrategy_set_base_interval(envoy_config_core_v3_BackoffStrategy * msg,struct google_protobuf_Duration * value)55 UPB_INLINE void envoy_config_core_v3_BackoffStrategy_set_base_interval(envoy_config_core_v3_BackoffStrategy *msg, struct google_protobuf_Duration* value) {
56 _upb_sethas(msg, 1);
57 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
58 }
envoy_config_core_v3_BackoffStrategy_mutable_base_interval(envoy_config_core_v3_BackoffStrategy * msg,upb_arena * arena)59 UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_BackoffStrategy_mutable_base_interval(envoy_config_core_v3_BackoffStrategy *msg, upb_arena *arena) {
60 struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_BackoffStrategy_base_interval(msg);
61 if (sub == NULL) {
62 sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
63 if (!sub) return NULL;
64 envoy_config_core_v3_BackoffStrategy_set_base_interval(msg, sub);
65 }
66 return sub;
67 }
envoy_config_core_v3_BackoffStrategy_set_max_interval(envoy_config_core_v3_BackoffStrategy * msg,struct google_protobuf_Duration * value)68 UPB_INLINE void envoy_config_core_v3_BackoffStrategy_set_max_interval(envoy_config_core_v3_BackoffStrategy *msg, struct google_protobuf_Duration* value) {
69 _upb_sethas(msg, 2);
70 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
71 }
envoy_config_core_v3_BackoffStrategy_mutable_max_interval(envoy_config_core_v3_BackoffStrategy * msg,upb_arena * arena)72 UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_BackoffStrategy_mutable_max_interval(envoy_config_core_v3_BackoffStrategy *msg, upb_arena *arena) {
73 struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_BackoffStrategy_max_interval(msg);
74 if (sub == NULL) {
75 sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
76 if (!sub) return NULL;
77 envoy_config_core_v3_BackoffStrategy_set_max_interval(msg, sub);
78 }
79 return sub;
80 }
81
82 #ifdef __cplusplus
83 } /* extern "C" */
84 #endif
85
86 #include "upb/port_undef.inc"
87
88 #endif /* ENVOY_CONFIG_CORE_V3_BACKOFF_PROTO_UPB_H_ */
89