Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / grpc / deps / grpc / src / core / ext / upb-generated / envoy / api / v2 / core / http_uri.upb.h
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
23 struct envoy_api_v2_core_HttpUri;
24 typedef struct envoy_api_v2_core_HttpUri envoy_api_v2_core_HttpUri;
25 extern const upb_msglayout envoy_api_v2_core_HttpUri_msginit;
26 struct google_protobuf_Duration;
27 extern const upb_msglayout google_protobuf_Duration_msginit;
28
29
30 /* envoy.api.v2.core.HttpUri */
31
32 UPB_INLINE envoy_api_v2_core_HttpUri *envoy_api_v2_core_HttpUri_new(upb_arena *arena) {
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) {
37   envoy_api_v2_core_HttpUri *ret = envoy_api_v2_core_HttpUri_new(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 {
45   envoy_api_v2_core_HttpUri_http_upstream_type_cluster = 2,
46   envoy_api_v2_core_HttpUri_http_upstream_type_NOT_SET = 0
47 } envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases;
48 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) { return (envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); }
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 }
61 UPB_INLINE void envoy_api_v2_core_HttpUri_set_timeout(envoy_api_v2_core_HttpUri *msg, struct google_protobuf_Duration* value) {
62   UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value;
63 }
64 UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpUri_mutable_timeout(envoy_api_v2_core_HttpUri *msg, upb_arena *arena) {
65   struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HttpUri_timeout(msg);
66   if (sub == NULL) {
67     sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena);
68     if (!sub) return NULL;
69     envoy_api_v2_core_HttpUri_set_timeout(msg, sub);
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_ */