GRPC Core  9.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/v2/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_V2_LRS_PROTO_UPB_H_
10 #define ENVOY_SERVICE_LOAD_STATS_V2_LRS_PROTO_UPB_H_
11 
12 #include "upb/generated_util.h"
13 #include "upb/msg.h"
14 #include "upb/decode.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_api_v2_core_Node_msginit;
33 extern const upb_msglayout envoy_api_v2_endpoint_ClusterStats_msginit;
34 extern const upb_msglayout google_protobuf_Duration_msginit;
35 
36 
37 /* envoy.service.load_stats.v2.LoadStatsRequest */
38 
41 }
43  upb_arena *arena) {
45  return (ret && upb_decode(buf, size, ret, &envoy_service_load_stats_v2_LoadStatsRequest_msginit, arena)) ? ret : NULL;
46 }
48  return upb_encode(msg, &envoy_service_load_stats_v2_LoadStatsRequest_msginit, arena, len);
49 }
50 
51 UPB_INLINE const struct envoy_api_v2_core_Node* envoy_service_load_stats_v2_LoadStatsRequest_node(const envoy_service_load_stats_v2_LoadStatsRequest *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Node*, UPB_SIZE(0, 0)); }
52 UPB_INLINE const struct envoy_api_v2_endpoint_ClusterStats* const* envoy_service_load_stats_v2_LoadStatsRequest_cluster_stats(const envoy_service_load_stats_v2_LoadStatsRequest *msg, size_t *len) { return (const struct envoy_api_v2_endpoint_ClusterStats* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
53 
55  UPB_FIELD_AT(msg, struct envoy_api_v2_core_Node*, UPB_SIZE(0, 0)) = value;
56 }
59  if (sub == NULL) {
60  sub = (struct envoy_api_v2_core_Node*)upb_msg_new(&envoy_api_v2_core_Node_msginit, arena);
61  if (!sub) return NULL;
63  }
64  return sub;
65 }
67  return (struct envoy_api_v2_endpoint_ClusterStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
68 }
70  return (struct envoy_api_v2_endpoint_ClusterStats**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
71 }
74  bool ok = _upb_array_append_accessor(
75  msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
76  if (!ok) return NULL;
77  return sub;
78 }
79 
80 /* envoy.service.load_stats.v2.LoadStatsResponse */
81 
84 }
86  upb_arena *arena) {
88  return (ret && upb_decode(buf, size, ret, &envoy_service_load_stats_v2_LoadStatsResponse_msginit, arena)) ? ret : NULL;
89 }
91  return upb_encode(msg, &envoy_service_load_stats_v2_LoadStatsResponse_msginit, arena, len);
92 }
93 
94 UPB_INLINE upb_strview const* envoy_service_load_stats_v2_LoadStatsResponse_clusters(const envoy_service_load_stats_v2_LoadStatsResponse *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
96 UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsResponse_report_endpoint_granularity(const envoy_service_load_stats_v2_LoadStatsResponse *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); }
97 
99  return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
100 }
102  return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
103 }
105  return _upb_array_append_accessor(
106  msg, UPB_SIZE(8, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
107 }
109  UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(4, 8)) = value;
110 }
113  if (sub == NULL) {
114  sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena);
115  if (!sub) return NULL;
117  }
118  return sub;
119 }
121  UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value;
122 }
123 
124 #ifdef __cplusplus
125 } /* extern "C" */
126 #endif
127 
128 #include "upb/port_undef.inc"
129 
130 #endif /* ENVOY_SERVICE_LOAD_STATS_V2_LRS_PROTO_UPB_H_ */
struct envoy_api_v2_core_Node envoy_api_v2_core_Node
Definition: base.upb.h:40
struct google_protobuf_Duration google_protobuf_Duration
Definition: duration.upb.h:24
struct envoy_api_v2_endpoint_ClusterStats envoy_api_v2_endpoint_ClusterStats
Definition: load_report.upb.h:31
UPB_INLINE const struct google_protobuf_Duration * envoy_service_load_stats_v2_LoadStatsResponse_load_reporting_interval(const envoy_service_load_stats_v2_LoadStatsResponse *msg)
Definition: lrs.upb.h:95
UPB_INLINE envoy_service_load_stats_v2_LoadStatsResponse * envoy_service_load_stats_v2_LoadStatsResponse_new(upb_arena *arena)
Definition: lrs.upb.h:82
UPB_INLINE char * envoy_service_load_stats_v2_LoadStatsResponse_serialize(const envoy_service_load_stats_v2_LoadStatsResponse *msg, upb_arena *arena, size_t *len)
Definition: lrs.upb.h:90
const upb_msglayout envoy_api_v2_core_Node_msginit
Definition: base.upb.c:46
const upb_msglayout envoy_api_v2_endpoint_ClusterStats_msginit
Definition: load_report.upb.c:92
UPB_INLINE char * envoy_service_load_stats_v2_LoadStatsRequest_serialize(const envoy_service_load_stats_v2_LoadStatsRequest *msg, upb_arena *arena, size_t *len)
Definition: lrs.upb.h:47
UPB_INLINE struct envoy_api_v2_endpoint_ClusterStats ** envoy_service_load_stats_v2_LoadStatsRequest_mutable_cluster_stats(envoy_service_load_stats_v2_LoadStatsRequest *msg, size_t *len)
Definition: lrs.upb.h:66
UPB_INLINE envoy_service_load_stats_v2_LoadStatsRequest * envoy_service_load_stats_v2_LoadStatsRequest_parse(const char *buf, size_t size, upb_arena *arena)
Definition: lrs.upb.h:42
UPB_INLINE upb_strview const * envoy_service_load_stats_v2_LoadStatsResponse_clusters(const envoy_service_load_stats_v2_LoadStatsResponse *msg, size_t *len)
Definition: lrs.upb.h:94
UPB_INLINE const struct envoy_api_v2_endpoint_ClusterStats *const * envoy_service_load_stats_v2_LoadStatsRequest_cluster_stats(const envoy_service_load_stats_v2_LoadStatsRequest *msg, size_t *len)
Definition: lrs.upb.h:52
UPB_INLINE envoy_service_load_stats_v2_LoadStatsResponse * envoy_service_load_stats_v2_LoadStatsResponse_parse(const char *buf, size_t size, upb_arena *arena)
Definition: lrs.upb.h:85
UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsResponse_add_clusters(envoy_service_load_stats_v2_LoadStatsResponse *msg, upb_strview val, upb_arena *arena)
Definition: lrs.upb.h:104
UPB_INLINE void envoy_service_load_stats_v2_LoadStatsResponse_set_load_reporting_interval(envoy_service_load_stats_v2_LoadStatsResponse *msg, struct google_protobuf_Duration *value)
Definition: lrs.upb.h:108
UPB_INLINE upb_strview * envoy_service_load_stats_v2_LoadStatsResponse_mutable_clusters(envoy_service_load_stats_v2_LoadStatsResponse *msg, size_t *len)
Definition: lrs.upb.h:98
struct envoy_service_load_stats_v2_LoadStatsResponse envoy_service_load_stats_v2_LoadStatsResponse
Definition: lrs.upb.h:26
UPB_INLINE struct envoy_api_v2_core_Node * envoy_service_load_stats_v2_LoadStatsRequest_mutable_node(envoy_service_load_stats_v2_LoadStatsRequest *msg, upb_arena *arena)
Definition: lrs.upb.h:57
UPB_INLINE envoy_service_load_stats_v2_LoadStatsRequest * envoy_service_load_stats_v2_LoadStatsRequest_new(upb_arena *arena)
Definition: lrs.upb.h:39
UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsResponse_report_endpoint_granularity(const envoy_service_load_stats_v2_LoadStatsResponse *msg)
Definition: lrs.upb.h:96
const upb_msglayout envoy_service_load_stats_v2_LoadStatsResponse_msginit
Definition: lrs.upb.c:45
UPB_INLINE void envoy_service_load_stats_v2_LoadStatsRequest_set_node(envoy_service_load_stats_v2_LoadStatsRequest *msg, struct envoy_api_v2_core_Node *value)
Definition: lrs.upb.h:54
const upb_msglayout google_protobuf_Duration_msginit
Definition: duration.upb.c:20
UPB_INLINE struct google_protobuf_Duration * envoy_service_load_stats_v2_LoadStatsResponse_mutable_load_reporting_interval(envoy_service_load_stats_v2_LoadStatsResponse *msg, upb_arena *arena)
Definition: lrs.upb.h:111
const upb_msglayout envoy_service_load_stats_v2_LoadStatsRequest_msginit
Definition: lrs.upb.c:29
UPB_INLINE upb_strview * envoy_service_load_stats_v2_LoadStatsResponse_resize_clusters(envoy_service_load_stats_v2_LoadStatsResponse *msg, size_t len, upb_arena *arena)
Definition: lrs.upb.h:101
struct envoy_service_load_stats_v2_LoadStatsRequest envoy_service_load_stats_v2_LoadStatsRequest
Definition: lrs.upb.h:25
UPB_INLINE const struct envoy_api_v2_core_Node * envoy_service_load_stats_v2_LoadStatsRequest_node(const envoy_service_load_stats_v2_LoadStatsRequest *msg)
Definition: lrs.upb.h:51
UPB_INLINE struct envoy_api_v2_endpoint_ClusterStats * envoy_service_load_stats_v2_LoadStatsRequest_add_cluster_stats(envoy_service_load_stats_v2_LoadStatsRequest *msg, upb_arena *arena)
Definition: lrs.upb.h:72
UPB_INLINE struct envoy_api_v2_endpoint_ClusterStats ** envoy_service_load_stats_v2_LoadStatsRequest_resize_cluster_stats(envoy_service_load_stats_v2_LoadStatsRequest *msg, size_t len, upb_arena *arena)
Definition: lrs.upb.h:69
UPB_INLINE void envoy_service_load_stats_v2_LoadStatsResponse_set_report_endpoint_granularity(envoy_service_load_stats_v2_LoadStatsResponse *msg, bool value)
Definition: lrs.upb.h:120