GRPC Core  9.0.0
http_uri.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/api/v2/core/http_uri.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPB_H_
10 #define ENVOY_API_V2_CORE_HTTP_URI_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 
25 extern const upb_msglayout envoy_api_v2_core_HttpUri_msginit;
27 extern const upb_msglayout google_protobuf_Duration_msginit;
28 
29 
30 /* envoy.api.v2.core.HttpUri */
31 
33  return (envoy_api_v2_core_HttpUri *)upb_msg_new(&envoy_api_v2_core_HttpUri_msginit, arena);
34 }
35 UPB_INLINE envoy_api_v2_core_HttpUri *envoy_api_v2_core_HttpUri_parse(const char *buf, size_t size,
36  upb_arena *arena) {
38  return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_HttpUri_msginit, arena)) ? ret : NULL;
39 }
40 UPB_INLINE char *envoy_api_v2_core_HttpUri_serialize(const envoy_api_v2_core_HttpUri *msg, upb_arena *arena, size_t *len) {
41  return upb_encode(msg, &envoy_api_v2_core_HttpUri_msginit, arena, len);
42 }
43 
44 typedef enum {
49 
50 UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_uri(const envoy_api_v2_core_HttpUri *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
51 UPB_INLINE bool envoy_api_v2_core_HttpUri_has_cluster(const envoy_api_v2_core_HttpUri *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 2); }
52 UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_cluster(const envoy_api_v2_core_HttpUri *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 2, upb_strview_make("", strlen(""))); }
53 UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpUri_timeout(const envoy_api_v2_core_HttpUri *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); }
54 
55 UPB_INLINE void envoy_api_v2_core_HttpUri_set_uri(envoy_api_v2_core_HttpUri *msg, upb_strview value) {
56  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
57 }
58 UPB_INLINE void envoy_api_v2_core_HttpUri_set_cluster(envoy_api_v2_core_HttpUri *msg, upb_strview value) {
59  UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 2);
60 }
62  UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value;
63 }
66  if (sub == NULL) {
67  sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena);
68  if (!sub) return NULL;
70  }
71  return sub;
72 }
73 
74 #ifdef __cplusplus
75 } /* extern "C" */
76 #endif
77 
78 #include "upb/port_undef.inc"
79 
80 #endif /* ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPB_H_ */
UPB_INLINE envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases envoy_api_v2_core_HttpUri_http_upstream_type_case(const envoy_api_v2_core_HttpUri *msg)
Definition: http_uri.upb.h:48
UPB_INLINE envoy_api_v2_core_HttpUri * envoy_api_v2_core_HttpUri_parse(const char *buf, size_t size, upb_arena *arena)
Definition: http_uri.upb.h:35
UPB_INLINE void envoy_api_v2_core_HttpUri_set_uri(envoy_api_v2_core_HttpUri *msg, upb_strview value)
Definition: http_uri.upb.h:55
UPB_INLINE bool envoy_api_v2_core_HttpUri_has_cluster(const envoy_api_v2_core_HttpUri *msg)
Definition: http_uri.upb.h:51
UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_uri(const envoy_api_v2_core_HttpUri *msg)
Definition: http_uri.upb.h:50
UPB_INLINE void envoy_api_v2_core_HttpUri_set_timeout(envoy_api_v2_core_HttpUri *msg, struct google_protobuf_Duration *value)
Definition: http_uri.upb.h:61
UPB_INLINE void envoy_api_v2_core_HttpUri_set_cluster(envoy_api_v2_core_HttpUri *msg, upb_strview value)
Definition: http_uri.upb.h:58
struct envoy_api_v2_core_HttpUri envoy_api_v2_core_HttpUri
Definition: http_uri.upb.h:24
envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases
Definition: http_uri.upb.h:44
UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_cluster(const envoy_api_v2_core_HttpUri *msg)
Definition: http_uri.upb.h:52
UPB_INLINE envoy_api_v2_core_HttpUri * envoy_api_v2_core_HttpUri_new(upb_arena *arena)
Definition: http_uri.upb.h:32
const upb_msglayout envoy_api_v2_core_HttpUri_msginit
Definition: http_uri.upb.c:27
const upb_msglayout google_protobuf_Duration_msginit
Definition: duration.upb.c:20
UPB_INLINE struct google_protobuf_Duration * envoy_api_v2_core_HttpUri_mutable_timeout(envoy_api_v2_core_HttpUri *msg, upb_arena *arena)
Definition: http_uri.upb.h:64
UPB_INLINE char * envoy_api_v2_core_HttpUri_serialize(const envoy_api_v2_core_HttpUri *msg, upb_arena *arena, size_t *len)
Definition: http_uri.upb.h:40
struct google_protobuf_Duration google_protobuf_Duration
Definition: duration.upb.h:24
UPB_INLINE const struct google_protobuf_Duration * envoy_api_v2_core_HttpUri_timeout(const envoy_api_v2_core_HttpUri *msg)
Definition: http_uri.upb.h:53