GRPC Core  18.0.0
lrs.upb.h
Go to the documentation of this file.
1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  * envoy/service/load_stats/v3/lrs.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef ENVOY_SERVICE_LOAD_STATS_V3_LRS_PROTO_UPB_H_
10 #define ENVOY_SERVICE_LOAD_STATS_V3_LRS_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 
32 extern const upb_msglayout envoy_config_core_v3_Node_msginit;
33 extern const upb_msglayout envoy_config_endpoint_v3_ClusterStats_msginit;
34 extern const upb_msglayout google_protobuf_Duration_msginit;
35 
36 
37 /* envoy.service.load_stats.v3.LoadStatsRequest */
38 
41 }
43  upb_arena *arena) {
45  return (ret && upb_decode(buf, size, ret, &envoy_service_load_stats_v3_LoadStatsRequest_msginit, arena)) ? ret : NULL;
46 }
48  upb_arena *arena, int options) {
50  return (ret && _upb_decode(buf, size, ret, &envoy_service_load_stats_v3_LoadStatsRequest_msginit, arena, options))
51  ? ret : NULL;
52 }
54  return upb_encode(msg, &envoy_service_load_stats_v3_LoadStatsRequest_msginit, arena, len);
55 }
56 
58 UPB_INLINE const struct envoy_config_core_v3_Node* envoy_service_load_stats_v3_LoadStatsRequest_node(const envoy_service_load_stats_v3_LoadStatsRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_Node*); }
59 UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsRequest_has_cluster_stats(const envoy_service_load_stats_v3_LoadStatsRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
60 UPB_INLINE const struct envoy_config_endpoint_v3_ClusterStats* const* envoy_service_load_stats_v3_LoadStatsRequest_cluster_stats(const envoy_service_load_stats_v3_LoadStatsRequest *msg, size_t *len) { return (const struct envoy_config_endpoint_v3_ClusterStats* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
61 
63  _upb_sethas(msg, 1);
64  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_Node*) = value;
65 }
68  if (sub == NULL) {
70  if (!sub) return NULL;
72  }
73  return sub;
74 }
76  return (struct envoy_config_endpoint_v3_ClusterStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
77 }
79  return (struct envoy_config_endpoint_v3_ClusterStats**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
80 }
83  bool ok = _upb_array_append_accessor2(
84  msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
85  if (!ok) return NULL;
86  return sub;
87 }
88 
89 /* envoy.service.load_stats.v3.LoadStatsResponse */
90 
93 }
95  upb_arena *arena) {
97  return (ret && upb_decode(buf, size, ret, &envoy_service_load_stats_v3_LoadStatsResponse_msginit, arena)) ? ret : NULL;
98 }
100  upb_arena *arena, int options) {
102  return (ret && _upb_decode(buf, size, ret, &envoy_service_load_stats_v3_LoadStatsResponse_msginit, arena, options))
103  ? ret : NULL;
104 }
106  return upb_encode(msg, &envoy_service_load_stats_v3_LoadStatsResponse_msginit, arena, len);
107 }
108 
109 UPB_INLINE upb_strview const* envoy_service_load_stats_v3_LoadStatsResponse_clusters(const envoy_service_load_stats_v3_LoadStatsResponse *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
112 UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_report_endpoint_granularity(const envoy_service_load_stats_v3_LoadStatsResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
113 UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_send_all_clusters(const envoy_service_load_stats_v3_LoadStatsResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
114 
116  return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
117 }
119  return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(3, 4), arena);
120 }
122  return _upb_array_append_accessor2(msg, UPB_SIZE(8, 16), UPB_SIZE(3, 4), &val,
123  arena);
124 }
126  _upb_sethas(msg, 1);
127  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
128 }
131  if (sub == NULL) {
132  sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
133  if (!sub) return NULL;
135  }
136  return sub;
137 }
139  *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
140 }
142  *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
143 }
144 
145 #ifdef __cplusplus
146 } /* extern "C" */
147 #endif
148 
149 #include "upb/port_undef.inc"
150 
151 #endif /* ENVOY_SERVICE_LOAD_STATS_V3_LRS_PROTO_UPB_H_ */
struct envoy_config_core_v3_Node envoy_config_core_v3_Node
Definition: base.upb.h:47
struct google_protobuf_Duration google_protobuf_Duration
Definition: duration.upb.h:24
struct envoy_config_endpoint_v3_ClusterStats envoy_config_endpoint_v3_ClusterStats
Definition: load_report.upb.h:31
UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsRequest_has_node(const envoy_service_load_stats_v3_LoadStatsRequest *msg)
Definition: lrs.upb.h:57
UPB_INLINE const struct envoy_config_endpoint_v3_ClusterStats *const * envoy_service_load_stats_v3_LoadStatsRequest_cluster_stats(const envoy_service_load_stats_v3_LoadStatsRequest *msg, size_t *len)
Definition: lrs.upb.h:60
UPB_INLINE struct envoy_config_endpoint_v3_ClusterStats ** envoy_service_load_stats_v3_LoadStatsRequest_mutable_cluster_stats(envoy_service_load_stats_v3_LoadStatsRequest *msg, size_t *len)
Definition: lrs.upb.h:75
UPB_INLINE char * envoy_service_load_stats_v3_LoadStatsRequest_serialize(const envoy_service_load_stats_v3_LoadStatsRequest *msg, upb_arena *arena, size_t *len)
Definition: lrs.upb.h:53
UPB_INLINE envoy_service_load_stats_v3_LoadStatsRequest * envoy_service_load_stats_v3_LoadStatsRequest_parse(const char *buf, size_t size, upb_arena *arena)
Definition: lrs.upb.h:42
UPB_INLINE upb_strview * envoy_service_load_stats_v3_LoadStatsResponse_mutable_clusters(envoy_service_load_stats_v3_LoadStatsResponse *msg, size_t *len)
Definition: lrs.upb.h:115
UPB_INLINE const struct envoy_config_core_v3_Node * envoy_service_load_stats_v3_LoadStatsRequest_node(const envoy_service_load_stats_v3_LoadStatsRequest *msg)
Definition: lrs.upb.h:58
struct envoy_service_load_stats_v3_LoadStatsRequest envoy_service_load_stats_v3_LoadStatsRequest
Definition: lrs.upb.h:25
UPB_INLINE void envoy_service_load_stats_v3_LoadStatsRequest_set_node(envoy_service_load_stats_v3_LoadStatsRequest *msg, struct envoy_config_core_v3_Node *value)
Definition: lrs.upb.h:62
UPB_INLINE envoy_service_load_stats_v3_LoadStatsRequest * envoy_service_load_stats_v3_LoadStatsRequest_new(upb_arena *arena)
Definition: lrs.upb.h:39
UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_has_load_reporting_interval(const envoy_service_load_stats_v3_LoadStatsResponse *msg)
Definition: lrs.upb.h:110
UPB_INLINE struct google_protobuf_Duration * envoy_service_load_stats_v3_LoadStatsResponse_mutable_load_reporting_interval(envoy_service_load_stats_v3_LoadStatsResponse *msg, upb_arena *arena)
Definition: lrs.upb.h:129
UPB_INLINE envoy_service_load_stats_v3_LoadStatsRequest * envoy_service_load_stats_v3_LoadStatsRequest_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: lrs.upb.h:47
UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsRequest_has_cluster_stats(const envoy_service_load_stats_v3_LoadStatsRequest *msg)
Definition: lrs.upb.h:59
UPB_INLINE void envoy_service_load_stats_v3_LoadStatsResponse_set_load_reporting_interval(envoy_service_load_stats_v3_LoadStatsResponse *msg, struct google_protobuf_Duration *value)
Definition: lrs.upb.h:125
UPB_INLINE struct envoy_config_endpoint_v3_ClusterStats * envoy_service_load_stats_v3_LoadStatsRequest_add_cluster_stats(envoy_service_load_stats_v3_LoadStatsRequest *msg, upb_arena *arena)
Definition: lrs.upb.h:81
const upb_msglayout envoy_service_load_stats_v3_LoadStatsResponse_msginit
Definition: lrs.upb.c:47
const upb_msglayout envoy_service_load_stats_v3_LoadStatsRequest_msginit
Definition: lrs.upb.c:30
UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_send_all_clusters(const envoy_service_load_stats_v3_LoadStatsResponse *msg)
Definition: lrs.upb.h:113
UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_add_clusters(envoy_service_load_stats_v3_LoadStatsResponse *msg, upb_strview val, upb_arena *arena)
Definition: lrs.upb.h:121
UPB_INLINE void envoy_service_load_stats_v3_LoadStatsResponse_set_report_endpoint_granularity(envoy_service_load_stats_v3_LoadStatsResponse *msg, bool value)
Definition: lrs.upb.h:138
UPB_INLINE struct envoy_config_core_v3_Node * envoy_service_load_stats_v3_LoadStatsRequest_mutable_node(envoy_service_load_stats_v3_LoadStatsRequest *msg, upb_arena *arena)
Definition: lrs.upb.h:66
UPB_INLINE envoy_service_load_stats_v3_LoadStatsResponse * envoy_service_load_stats_v3_LoadStatsResponse_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: lrs.upb.h:99
UPB_INLINE const struct google_protobuf_Duration * envoy_service_load_stats_v3_LoadStatsResponse_load_reporting_interval(const envoy_service_load_stats_v3_LoadStatsResponse *msg)
Definition: lrs.upb.h:111
UPB_INLINE upb_strview * envoy_service_load_stats_v3_LoadStatsResponse_resize_clusters(envoy_service_load_stats_v3_LoadStatsResponse *msg, size_t len, upb_arena *arena)
Definition: lrs.upb.h:118
UPB_INLINE struct envoy_config_endpoint_v3_ClusterStats ** envoy_service_load_stats_v3_LoadStatsRequest_resize_cluster_stats(envoy_service_load_stats_v3_LoadStatsRequest *msg, size_t len, upb_arena *arena)
Definition: lrs.upb.h:78
const upb_msglayout google_protobuf_Duration_msginit
Definition: duration.upb.c:20
UPB_INLINE envoy_service_load_stats_v3_LoadStatsResponse * envoy_service_load_stats_v3_LoadStatsResponse_new(upb_arena *arena)
Definition: lrs.upb.h:91
UPB_INLINE envoy_service_load_stats_v3_LoadStatsResponse * envoy_service_load_stats_v3_LoadStatsResponse_parse(const char *buf, size_t size, upb_arena *arena)
Definition: lrs.upb.h:94
UPB_INLINE char * envoy_service_load_stats_v3_LoadStatsResponse_serialize(const envoy_service_load_stats_v3_LoadStatsResponse *msg, upb_arena *arena, size_t *len)
Definition: lrs.upb.h:105
UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_report_endpoint_granularity(const envoy_service_load_stats_v3_LoadStatsResponse *msg)
Definition: lrs.upb.h:112
const upb_msglayout envoy_config_core_v3_Node_msginit
Definition: base.upb.c:94
UPB_INLINE void envoy_service_load_stats_v3_LoadStatsResponse_set_send_all_clusters(envoy_service_load_stats_v3_LoadStatsResponse *msg, bool value)
Definition: lrs.upb.h:141
struct envoy_service_load_stats_v3_LoadStatsResponse envoy_service_load_stats_v3_LoadStatsResponse
Definition: lrs.upb.h:26
const upb_msglayout envoy_config_endpoint_v3_ClusterStats_msginit
Definition: load_report.upb.c:94
UPB_INLINE upb_strview const * envoy_service_load_stats_v3_LoadStatsResponse_clusters(const envoy_service_load_stats_v3_LoadStatsResponse *msg, size_t *len)
Definition: lrs.upb.h:109
upb_arena * arena
Definition: xds_api.cc:909