GRPC Core  9.0.0
health.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  * src/proto/grpc/health/v1/health.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef SRC_PROTO_GRPC_HEALTH_V1_HEALTH_PROTO_UPB_H_
10 #define SRC_PROTO_GRPC_HEALTH_V1_HEALTH_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 
27 extern const upb_msglayout grpc_health_v1_HealthCheckRequest_msginit;
28 extern const upb_msglayout grpc_health_v1_HealthCheckResponse_msginit;
29 
30 typedef enum {
36 
37 
38 /* grpc.health.v1.HealthCheckRequest */
39 
42 }
44  upb_arena *arena) {
46  return (ret && upb_decode(buf, size, ret, &grpc_health_v1_HealthCheckRequest_msginit, arena)) ? ret : NULL;
47 }
48 UPB_INLINE char *grpc_health_v1_HealthCheckRequest_serialize(const grpc_health_v1_HealthCheckRequest *msg, upb_arena *arena, size_t *len) {
49  return upb_encode(msg, &grpc_health_v1_HealthCheckRequest_msginit, arena, len);
50 }
51 
52 UPB_INLINE upb_strview grpc_health_v1_HealthCheckRequest_service(const grpc_health_v1_HealthCheckRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
53 
55  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
56 }
57 
58 /* grpc.health.v1.HealthCheckResponse */
59 
62 }
64  upb_arena *arena) {
66  return (ret && upb_decode(buf, size, ret, &grpc_health_v1_HealthCheckResponse_msginit, arena)) ? ret : NULL;
67 }
68 UPB_INLINE char *grpc_health_v1_HealthCheckResponse_serialize(const grpc_health_v1_HealthCheckResponse *msg, upb_arena *arena, size_t *len) {
69  return upb_encode(msg, &grpc_health_v1_HealthCheckResponse_msginit, arena, len);
70 }
71 
72 UPB_INLINE int32_t grpc_health_v1_HealthCheckResponse_status(const grpc_health_v1_HealthCheckResponse *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
73 
75  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
76 }
77 
78 #ifdef __cplusplus
79 } /* extern "C" */
80 #endif
81 
82 #include "upb/port_undef.inc"
83 
84 #endif /* SRC_PROTO_GRPC_HEALTH_V1_HEALTH_PROTO_UPB_H_ */
UPB_INLINE void grpc_health_v1_HealthCheckResponse_set_status(grpc_health_v1_HealthCheckResponse *msg, int32_t value)
Definition: health.upb.h:74
grpc_health_v1_HealthCheckResponse_ServingStatus
Definition: health.upb.h:30
@ grpc_health_v1_HealthCheckResponse_SERVING
Definition: health.upb.h:32
@ grpc_health_v1_HealthCheckResponse_SERVICE_UNKNOWN
Definition: health.upb.h:34
@ grpc_health_v1_HealthCheckResponse_NOT_SERVING
Definition: health.upb.h:33
@ grpc_health_v1_HealthCheckResponse_UNKNOWN
Definition: health.upb.h:31
const upb_msglayout grpc_health_v1_HealthCheckResponse_msginit
Definition: health.upb.c:29
UPB_INLINE char * grpc_health_v1_HealthCheckRequest_serialize(const grpc_health_v1_HealthCheckRequest *msg, upb_arena *arena, size_t *len)
Definition: health.upb.h:48
UPB_INLINE void grpc_health_v1_HealthCheckRequest_set_service(grpc_health_v1_HealthCheckRequest *msg, upb_strview value)
Definition: health.upb.h:54
UPB_INLINE upb_strview grpc_health_v1_HealthCheckRequest_service(const grpc_health_v1_HealthCheckRequest *msg)
Definition: health.upb.h:52
UPB_INLINE int32_t grpc_health_v1_HealthCheckResponse_status(const grpc_health_v1_HealthCheckResponse *msg)
Definition: health.upb.h:72
UPB_INLINE grpc_health_v1_HealthCheckResponse * grpc_health_v1_HealthCheckResponse_parse(const char *buf, size_t size, upb_arena *arena)
Definition: health.upb.h:63
const upb_msglayout grpc_health_v1_HealthCheckRequest_msginit
Definition: health.upb.c:19
struct grpc_health_v1_HealthCheckRequest grpc_health_v1_HealthCheckRequest
Definition: health.upb.h:25
UPB_INLINE grpc_health_v1_HealthCheckRequest * grpc_health_v1_HealthCheckRequest_parse(const char *buf, size_t size, upb_arena *arena)
Definition: health.upb.h:43
UPB_INLINE grpc_health_v1_HealthCheckRequest * grpc_health_v1_HealthCheckRequest_new(upb_arena *arena)
Definition: health.upb.h:40
UPB_INLINE grpc_health_v1_HealthCheckResponse * grpc_health_v1_HealthCheckResponse_new(upb_arena *arena)
Definition: health.upb.h:60
struct grpc_health_v1_HealthCheckResponse grpc_health_v1_HealthCheckResponse
Definition: health.upb.h:26
UPB_INLINE char * grpc_health_v1_HealthCheckResponse_serialize(const grpc_health_v1_HealthCheckResponse *msg, upb_arena *arena, size_t *len)
Definition: health.upb.h:68