GRPC C++  1.39.1
timestamp.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  * google/protobuf/timestamp.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPB_H_
10 #define GOOGLE_PROTOBUF_TIMESTAMP_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 
25 extern const upb_msglayout google_protobuf_Timestamp_msginit;
26 
27 
28 /* google.protobuf.Timestamp */
29 
32 }
33 UPB_INLINE google_protobuf_Timestamp *google_protobuf_Timestamp_parse(const char *buf, size_t size,
34  upb_arena *arena) {
36  return (ret && upb_decode(buf, size, ret, &google_protobuf_Timestamp_msginit, arena)) ? ret : NULL;
37 }
38 UPB_INLINE google_protobuf_Timestamp *google_protobuf_Timestamp_parse_ex(const char *buf, size_t size,
39  upb_arena *arena, int options) {
41  return (ret && _upb_decode(buf, size, ret, &google_protobuf_Timestamp_msginit, arena, options))
42  ? ret : NULL;
43 }
44 UPB_INLINE char *google_protobuf_Timestamp_serialize(const google_protobuf_Timestamp *msg, upb_arena *arena, size_t *len) {
45  return upb_encode(msg, &google_protobuf_Timestamp_msginit, arena, len);
46 }
47 
48 UPB_INLINE int64_t google_protobuf_Timestamp_seconds(const google_protobuf_Timestamp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); }
49 UPB_INLINE int32_t google_protobuf_Timestamp_nanos(const google_protobuf_Timestamp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
50 
52  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
53 }
54 UPB_INLINE void google_protobuf_Timestamp_set_nanos(google_protobuf_Timestamp *msg, int32_t value) {
55  *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
56 }
57 
58 #ifdef __cplusplus
59 } /* extern "C" */
60 #endif
61 
62 #include "upb/port_undef.inc"
63 
64 #endif /* GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPB_H_ */
UPB_INLINE google_protobuf_Timestamp * google_protobuf_Timestamp_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: timestamp.upb.h:38
const upb_msglayout google_protobuf_Timestamp_msginit
Definition: timestamp.upb.c:20
UPB_INLINE int64_t google_protobuf_Timestamp_seconds(const google_protobuf_Timestamp *msg)
Definition: timestamp.upb.h:48
UPB_INLINE google_protobuf_Timestamp * google_protobuf_Timestamp_parse(const char *buf, size_t size, upb_arena *arena)
Definition: timestamp.upb.h:33
UPB_INLINE char * google_protobuf_Timestamp_serialize(const google_protobuf_Timestamp *msg, upb_arena *arena, size_t *len)
Definition: timestamp.upb.h:44
UPB_INLINE void google_protobuf_Timestamp_set_nanos(google_protobuf_Timestamp *msg, int32_t value)
Definition: timestamp.upb.h:54
UPB_INLINE void google_protobuf_Timestamp_set_seconds(google_protobuf_Timestamp *msg, int64_t value)
Definition: timestamp.upb.h:51
UPB_INLINE int32_t google_protobuf_Timestamp_nanos(const google_protobuf_Timestamp *msg)
Definition: timestamp.upb.h:49
struct google_protobuf_Timestamp google_protobuf_Timestamp
Definition: timestamp.upb.h:24
UPB_INLINE google_protobuf_Timestamp * google_protobuf_Timestamp_new(upb_arena *arena)
Definition: timestamp.upb.h:30
upb_arena * arena
Definition: xds_api.cc:909