diff --git a/BUILD b/BUILD index 835edbfb48f..9e052dcf0c2 100644 --- a/BUILD +++ b/BUILD @@ -2313,22 +2313,92 @@ grpc_cc_library( #TODO: Get this into build.yaml once we start using it. grpc_cc_library( - name = "google_protobuf_upb", + name = "envoy_ads_upb", srcs = [ + "src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c", + ], + hdrs = [ + "src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h", + ], + language = "c++", + external_deps = [ + "upb_lib", + ], + deps = [ + ":google_api_upb", + ":proto_gen_validate_upb", + ":envoy_type_upb", + ] +) + +grpc_cc_library( + name = "envoy_type_upb", + srcs = [ + "src/core/ext/upb-generated/envoy/type/percent.upb.c", + "src/core/ext/upb-generated/envoy/type/range.upb.c", + ], + hdrs = [ + "src/core/ext/upb-generated/envoy/type/percent.upb.h", + "src/core/ext/upb-generated/envoy/type/range.upb.h", + ], + language = "c++", + external_deps = [ + "upb_lib", + ], + deps = [ + ":google_api_upb", + ":proto_gen_validate_upb" + ] +) + +grpc_cc_library( + name = "proto_gen_validate_upb", + srcs = [ + "src/core/ext/upb-generated/gogoproto/gogo.upb.c", + "src/core/ext/upb-generated/validate/validate.upb.c", + ], + hdrs = [ + "src/core/ext/upb-generated/gogoproto/gogo.upb.h", + "src/core/ext/upb-generated/validate/validate.upb.h", + ], + language = "c++", + external_deps = [ + "upb_lib", + ], + deps = [ + ":google_api_upb", + ] +) + +grpc_cc_library( + name = "google_api_upb", + srcs = [ + "src/core/ext/upb-generated/google/api/annotations.upb.c", + "src/core/ext/upb-generated/google/api/http.upb.c", "src/core/ext/upb-generated/google/protobuf/any.upb.c", "src/core/ext/upb-generated/google/protobuf/descriptor.upb.c", "src/core/ext/upb-generated/google/protobuf/duration.upb.c", "src/core/ext/upb-generated/google/protobuf/struct.upb.c", "src/core/ext/upb-generated/google/protobuf/timestamp.upb.c", "src/core/ext/upb-generated/google/protobuf/wrappers.upb.c", + "src/core/ext/upb-generated/google/rpc/status.upb.c", ], hdrs = [ + "src/core/ext/upb-generated/google/api/annotations.upb.h", + "src/core/ext/upb-generated/google/api/http.upb.h", "src/core/ext/upb-generated/google/protobuf/any.upb.h", "src/core/ext/upb-generated/google/protobuf/descriptor.upb.h", "src/core/ext/upb-generated/google/protobuf/duration.upb.h", "src/core/ext/upb-generated/google/protobuf/struct.upb.h", "src/core/ext/upb-generated/google/protobuf/timestamp.upb.h", "src/core/ext/upb-generated/google/protobuf/wrappers.upb.h", + "src/core/ext/upb-generated/google/rpc/status.upb.h", ], language = "c++", external_deps = [ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c new file mode 100644 index 00000000000..5a37e5785c3 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c @@ -0,0 +1,110 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/address.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/api/v2/core/address.upb.h" +#include "envoy/api/v2/core/base.upb.h" +#include "google/protobuf/wrappers.upb.h" +#include "validate/validate.upb.h" +#include "gogoproto/gogo.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout_field envoy_api_v2_core_Pipe__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_core_Pipe_msginit = { + NULL, + &envoy_api_v2_core_Pipe__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +static const upb_msglayout_field envoy_api_v2_core_SocketAddress__fields[6] = { + {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, + {2, UPB_SIZE(12, 16), 0, 0, 9, 1}, + {3, UPB_SIZE(28, 48), UPB_SIZE(-37, -65), 0, 13, 1}, + {4, UPB_SIZE(28, 48), UPB_SIZE(-37, -65), 0, 9, 1}, + {5, UPB_SIZE(20, 32), 0, 0, 9, 1}, + {6, UPB_SIZE(8, 8), 0, 0, 8, 1}, +}; + +const upb_msglayout envoy_api_v2_core_SocketAddress_msginit = { + NULL, + &envoy_api_v2_core_SocketAddress__fields[0], + UPB_SIZE(40, 80), 6, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_TcpKeepalive_submsgs[3] = { + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_TcpKeepalive__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, + {3, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_core_TcpKeepalive_msginit = { + &envoy_api_v2_core_TcpKeepalive_submsgs[0], + &envoy_api_v2_core_TcpKeepalive__fields[0], + UPB_SIZE(12, 24), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_BindConfig_submsgs[3] = { + &envoy_api_v2_core_SocketAddress_msginit, + &envoy_api_v2_core_SocketOption_msginit, + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_BindConfig__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 2, 11, 1}, + {3, UPB_SIZE(8, 16), 0, 1, 11, 3}, +}; + +const upb_msglayout envoy_api_v2_core_BindConfig_msginit = { + &envoy_api_v2_core_BindConfig_submsgs[0], + &envoy_api_v2_core_BindConfig__fields[0], + UPB_SIZE(12, 24), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_Address_submsgs[2] = { + &envoy_api_v2_core_Pipe_msginit, + &envoy_api_v2_core_SocketAddress_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_Address__fields[2] = { + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_core_Address_msginit = { + &envoy_api_v2_core_Address_submsgs[0], + &envoy_api_v2_core_Address__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_CidrRange_submsgs[1] = { + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_CidrRange__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_core_CidrRange_msginit = { + &envoy_api_v2_core_CidrRange_submsgs[0], + &envoy_api_v2_core_CidrRange__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h new file mode 100644 index 00000000000..be9e8312b70 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h @@ -0,0 +1,325 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/address.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_ADDRESS_PROTO_UPB_H_ +#define ENVOY_API_V2_CORE_ADDRESS_PROTO_UPB_H_ + +#include "upb/generated_util.h" + +#include "upb/msg.h" + +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_core_Pipe; +struct envoy_api_v2_core_SocketAddress; +struct envoy_api_v2_core_TcpKeepalive; +struct envoy_api_v2_core_BindConfig; +struct envoy_api_v2_core_Address; +struct envoy_api_v2_core_CidrRange; +typedef struct envoy_api_v2_core_Pipe envoy_api_v2_core_Pipe; +typedef struct envoy_api_v2_core_SocketAddress envoy_api_v2_core_SocketAddress; +typedef struct envoy_api_v2_core_TcpKeepalive envoy_api_v2_core_TcpKeepalive; +typedef struct envoy_api_v2_core_BindConfig envoy_api_v2_core_BindConfig; +typedef struct envoy_api_v2_core_Address envoy_api_v2_core_Address; +typedef struct envoy_api_v2_core_CidrRange envoy_api_v2_core_CidrRange; +extern const upb_msglayout envoy_api_v2_core_Pipe_msginit; +extern const upb_msglayout envoy_api_v2_core_SocketAddress_msginit; +extern const upb_msglayout envoy_api_v2_core_TcpKeepalive_msginit; +extern const upb_msglayout envoy_api_v2_core_BindConfig_msginit; +extern const upb_msglayout envoy_api_v2_core_Address_msginit; +extern const upb_msglayout envoy_api_v2_core_CidrRange_msginit; +struct google_protobuf_UInt32Value; +struct google_protobuf_BoolValue; +struct envoy_api_v2_core_SocketOption; +extern const upb_msglayout google_protobuf_UInt32Value_msginit; +extern const upb_msglayout google_protobuf_BoolValue_msginit; +extern const upb_msglayout envoy_api_v2_core_SocketOption_msginit; + +/* Enums */ + +typedef enum { + envoy_api_v2_core_SocketAddress_TCP = 0, + envoy_api_v2_core_SocketAddress_UDP = 1 +} envoy_api_v2_core_SocketAddress_Protocol; + +/* envoy.api.v2.core.Pipe */ + +UPB_INLINE envoy_api_v2_core_Pipe *envoy_api_v2_core_Pipe_new(upb_arena *arena) { + return (envoy_api_v2_core_Pipe *)upb_msg_new(&envoy_api_v2_core_Pipe_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_Pipe *envoy_api_v2_core_Pipe_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_Pipe *ret = envoy_api_v2_core_Pipe_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_Pipe_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_Pipe_serialize(const envoy_api_v2_core_Pipe *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_Pipe_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_core_Pipe_path(const envoy_api_v2_core_Pipe *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_api_v2_core_Pipe_set_path(envoy_api_v2_core_Pipe *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} + + +/* envoy.api.v2.core.SocketAddress */ + +UPB_INLINE envoy_api_v2_core_SocketAddress *envoy_api_v2_core_SocketAddress_new(upb_arena *arena) { + return (envoy_api_v2_core_SocketAddress *)upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_SocketAddress *envoy_api_v2_core_SocketAddress_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_SocketAddress *ret = envoy_api_v2_core_SocketAddress_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_SocketAddress_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_SocketAddress_serialize(const envoy_api_v2_core_SocketAddress *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_SocketAddress_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_core_SocketAddress_port_specifier_port_value = 3, + envoy_api_v2_core_SocketAddress_port_specifier_named_port = 4, + envoy_api_v2_core_SocketAddress_port_specifier_NOT_SET = 0, +} envoy_api_v2_core_SocketAddress_port_specifier_oneofcases; +UPB_INLINE envoy_api_v2_core_SocketAddress_port_specifier_oneofcases envoy_api_v2_core_SocketAddress_port_specifier_case(const envoy_api_v2_core_SocketAddress* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(36, 64)); } + +UPB_INLINE envoy_api_v2_core_SocketAddress_Protocol envoy_api_v2_core_SocketAddress_protocol(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, envoy_api_v2_core_SocketAddress_Protocol, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_address(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); } +UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_port_value(const envoy_api_v2_core_SocketAddress *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 64), 3); } +UPB_INLINE uint32_t envoy_api_v2_core_SocketAddress_port_value(const envoy_api_v2_core_SocketAddress *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 3, 0); } +UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_named_port(const envoy_api_v2_core_SocketAddress *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 64), 4); } +UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_named_port(const envoy_api_v2_core_SocketAddress *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 4, upb_strview_make("", strlen(""))); } +UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_resolver_name(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 32)); } +UPB_INLINE bool envoy_api_v2_core_SocketAddress_ipv4_compat(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } + +UPB_INLINE void envoy_api_v2_core_SocketAddress_set_protocol(envoy_api_v2_core_SocketAddress *msg, envoy_api_v2_core_SocketAddress_Protocol value) { + UPB_FIELD_AT(msg, envoy_api_v2_core_SocketAddress_Protocol, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_core_SocketAddress_set_address(envoy_api_v2_core_SocketAddress *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value; +} +UPB_INLINE void envoy_api_v2_core_SocketAddress_set_port_value(envoy_api_v2_core_SocketAddress *msg, uint32_t value) { + UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(28, 48), value, UPB_SIZE(36, 64), 3); +} +UPB_INLINE void envoy_api_v2_core_SocketAddress_set_named_port(envoy_api_v2_core_SocketAddress *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 48), value, UPB_SIZE(36, 64), 4); +} +UPB_INLINE void envoy_api_v2_core_SocketAddress_set_resolver_name(envoy_api_v2_core_SocketAddress *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 32)) = value; +} +UPB_INLINE void envoy_api_v2_core_SocketAddress_set_ipv4_compat(envoy_api_v2_core_SocketAddress *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; +} + + +/* envoy.api.v2.core.TcpKeepalive */ + +UPB_INLINE envoy_api_v2_core_TcpKeepalive *envoy_api_v2_core_TcpKeepalive_new(upb_arena *arena) { + return (envoy_api_v2_core_TcpKeepalive *)upb_msg_new(&envoy_api_v2_core_TcpKeepalive_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_TcpKeepalive *envoy_api_v2_core_TcpKeepalive_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_TcpKeepalive *ret = envoy_api_v2_core_TcpKeepalive_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_TcpKeepalive_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_TcpKeepalive_serialize(const envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_TcpKeepalive_msginit, arena, len); +} + +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_probes(const envoy_api_v2_core_TcpKeepalive *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_time(const envoy_api_v2_core_TcpKeepalive *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_interval(const envoy_api_v2_core_TcpKeepalive *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)); } + +UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_probes(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_probes(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_probes(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_TcpKeepalive_set_keepalive_probes(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_time(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_time(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_time(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_TcpKeepalive_set_keepalive_time(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_interval(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_interval(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_interval(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_TcpKeepalive_set_keepalive_interval(msg, sub); + } + return sub; +} + + +/* envoy.api.v2.core.BindConfig */ + +UPB_INLINE envoy_api_v2_core_BindConfig *envoy_api_v2_core_BindConfig_new(upb_arena *arena) { + return (envoy_api_v2_core_BindConfig *)upb_msg_new(&envoy_api_v2_core_BindConfig_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_BindConfig *envoy_api_v2_core_BindConfig_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_BindConfig *ret = envoy_api_v2_core_BindConfig_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_BindConfig_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_BindConfig_serialize(const envoy_api_v2_core_BindConfig *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_BindConfig_msginit, arena, len); +} + +UPB_INLINE const envoy_api_v2_core_SocketAddress* envoy_api_v2_core_BindConfig_source_address(const envoy_api_v2_core_BindConfig *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_BindConfig_freebind(const envoy_api_v2_core_BindConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)); } +UPB_INLINE const struct envoy_api_v2_core_SocketOption* const* envoy_api_v2_core_BindConfig_socket_options(const envoy_api_v2_core_BindConfig *msg, size_t *len) { return (const struct envoy_api_v2_core_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } + +UPB_INLINE void envoy_api_v2_core_BindConfig_set_source_address(envoy_api_v2_core_BindConfig *msg, envoy_api_v2_core_SocketAddress* value) { + UPB_FIELD_AT(msg, envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE struct envoy_api_v2_core_SocketAddress* envoy_api_v2_core_BindConfig_mutable_source_address(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) { + struct envoy_api_v2_core_SocketAddress* sub = (struct envoy_api_v2_core_SocketAddress*)envoy_api_v2_core_BindConfig_source_address(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_SocketAddress*)upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_BindConfig_set_source_address(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_BindConfig_set_freebind(envoy_api_v2_core_BindConfig *msg, struct google_protobuf_BoolValue* value) { + UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)) = value; +} +UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_BindConfig_mutable_freebind(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) { + struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_BindConfig_freebind(msg); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_BindConfig_set_freebind(msg, sub); + } + return sub; +} +UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_core_BindConfig_mutable_socket_options(envoy_api_v2_core_BindConfig *msg, size_t *len) { + return (struct envoy_api_v2_core_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); +} +UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_core_BindConfig_resize_socket_options(envoy_api_v2_core_BindConfig *msg, size_t len, upb_arena *arena) { + return (struct envoy_api_v2_core_SocketOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_api_v2_core_SocketOption* envoy_api_v2_core_BindConfig_add_socket_options(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) { + struct envoy_api_v2_core_SocketOption* sub = (struct envoy_api_v2_core_SocketOption*)upb_msg_new(&envoy_api_v2_core_SocketOption_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} + + +/* envoy.api.v2.core.Address */ + +UPB_INLINE envoy_api_v2_core_Address *envoy_api_v2_core_Address_new(upb_arena *arena) { + return (envoy_api_v2_core_Address *)upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_Address *envoy_api_v2_core_Address_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_Address *ret = envoy_api_v2_core_Address_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_Address_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_Address_serialize(const envoy_api_v2_core_Address *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_Address_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_core_Address_address_socket_address = 1, + envoy_api_v2_core_Address_address_pipe = 2, + envoy_api_v2_core_Address_address_NOT_SET = 0, +} envoy_api_v2_core_Address_address_oneofcases; +UPB_INLINE envoy_api_v2_core_Address_address_oneofcases envoy_api_v2_core_Address_address_case(const envoy_api_v2_core_Address* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(4, 8)); } + +UPB_INLINE bool envoy_api_v2_core_Address_has_socket_address(const envoy_api_v2_core_Address *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE const envoy_api_v2_core_SocketAddress* envoy_api_v2_core_Address_socket_address(const envoy_api_v2_core_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } +UPB_INLINE bool envoy_api_v2_core_Address_has_pipe(const envoy_api_v2_core_Address *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE const envoy_api_v2_core_Pipe* envoy_api_v2_core_Address_pipe(const envoy_api_v2_core_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_Pipe*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } + +UPB_INLINE void envoy_api_v2_core_Address_set_socket_address(envoy_api_v2_core_Address *msg, envoy_api_v2_core_SocketAddress* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); +} +UPB_INLINE struct envoy_api_v2_core_SocketAddress* envoy_api_v2_core_Address_mutable_socket_address(envoy_api_v2_core_Address *msg, upb_arena *arena) { + struct envoy_api_v2_core_SocketAddress* sub = (struct envoy_api_v2_core_SocketAddress*)envoy_api_v2_core_Address_socket_address(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_SocketAddress*)upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Address_set_socket_address(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_Address_set_pipe(envoy_api_v2_core_Address *msg, envoy_api_v2_core_Pipe* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_Pipe*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2); +} +UPB_INLINE struct envoy_api_v2_core_Pipe* envoy_api_v2_core_Address_mutable_pipe(envoy_api_v2_core_Address *msg, upb_arena *arena) { + struct envoy_api_v2_core_Pipe* sub = (struct envoy_api_v2_core_Pipe*)envoy_api_v2_core_Address_pipe(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_Pipe*)upb_msg_new(&envoy_api_v2_core_Pipe_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Address_set_pipe(msg, sub); + } + return sub; +} + + +/* envoy.api.v2.core.CidrRange */ + +UPB_INLINE envoy_api_v2_core_CidrRange *envoy_api_v2_core_CidrRange_new(upb_arena *arena) { + return (envoy_api_v2_core_CidrRange *)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_CidrRange *envoy_api_v2_core_CidrRange_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_CidrRange *ret = envoy_api_v2_core_CidrRange_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_CidrRange_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_CidrRange_serialize(const envoy_api_v2_core_CidrRange *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_CidrRange_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_core_CidrRange_address_prefix(const envoy_api_v2_core_CidrRange *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_CidrRange_prefix_len(const envoy_api_v2_core_CidrRange *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)); } + +UPB_INLINE void envoy_api_v2_core_CidrRange_set_address_prefix(envoy_api_v2_core_CidrRange *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_core_CidrRange_set_prefix_len(envoy_api_v2_core_CidrRange *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_CidrRange_mutable_prefix_len(envoy_api_v2_core_CidrRange *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_CidrRange_prefix_len(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_CidrRange_set_prefix_len(msg, sub); + } + return sub; +} + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_ADDRESS_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c new file mode 100644 index 00000000000..1e5c9190381 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c @@ -0,0 +1,179 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/base.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/api/v2/core/base.upb.h" +#include "google/protobuf/any.upb.h" +#include "google/protobuf/struct.upb.h" +#include "google/protobuf/wrappers.upb.h" +#include "validate/validate.upb.h" +#include "gogoproto/gogo.upb.h" +#include "envoy/type/percent.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout_field envoy_api_v2_core_Locality__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, + {3, UPB_SIZE(16, 32), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_core_Locality_msginit = { + NULL, + &envoy_api_v2_core_Locality__fields[0], + UPB_SIZE(24, 48), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_Node_submsgs[2] = { + &envoy_api_v2_core_Locality_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_Node__fields[5] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, + {3, UPB_SIZE(24, 48), 0, 1, 11, 1}, + {4, UPB_SIZE(28, 56), 0, 0, 11, 1}, + {5, UPB_SIZE(16, 32), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_core_Node_msginit = { + &envoy_api_v2_core_Node_submsgs[0], + &envoy_api_v2_core_Node__fields[0], + UPB_SIZE(32, 64), 5, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_Metadata_submsgs[1] = { + &envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_Metadata__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_api_v2_core_Metadata_msginit = { + &envoy_api_v2_core_Metadata_submsgs[0], + &envoy_api_v2_core_Metadata__fields[0], + UPB_SIZE(4, 8), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_Metadata_FilterMetadataEntry_submsgs[1] = { + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_Metadata_FilterMetadataEntry__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit = { + &envoy_api_v2_core_Metadata_FilterMetadataEntry_submsgs[0], + &envoy_api_v2_core_Metadata_FilterMetadataEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout_field envoy_api_v2_core_RuntimeUInt32__fields[2] = { + {2, UPB_SIZE(0, 0), 0, 0, 13, 1}, + {3, UPB_SIZE(4, 8), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_core_RuntimeUInt32_msginit = { + NULL, + &envoy_api_v2_core_RuntimeUInt32__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout_field envoy_api_v2_core_HeaderValue__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_core_HeaderValue_msginit = { + NULL, + &envoy_api_v2_core_HeaderValue__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_HeaderValueOption_submsgs[2] = { + &envoy_api_v2_core_HeaderValue_msginit, + &google_protobuf_BoolValue_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_HeaderValueOption__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 1, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit = { + &envoy_api_v2_core_HeaderValueOption_submsgs[0], + &envoy_api_v2_core_HeaderValueOption__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + +static const upb_msglayout_field envoy_api_v2_core_DataSource__fields[3] = { + {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 12, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_core_DataSource_msginit = { + NULL, + &envoy_api_v2_core_DataSource__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_TransportSocket_submsgs[2] = { + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_TransportSocket__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_core_TransportSocket_msginit = { + &envoy_api_v2_core_TransportSocket_submsgs[0], + &envoy_api_v2_core_TransportSocket__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout_field envoy_api_v2_core_SocketOption__fields[6] = { + {1, UPB_SIZE(24, 24), 0, 0, 9, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 3, 1}, + {3, UPB_SIZE(8, 8), 0, 0, 3, 1}, + {4, UPB_SIZE(32, 40), UPB_SIZE(-41, -57), 0, 3, 1}, + {5, UPB_SIZE(32, 40), UPB_SIZE(-41, -57), 0, 12, 1}, + {6, UPB_SIZE(16, 16), 0, 0, 14, 1}, +}; + +const upb_msglayout envoy_api_v2_core_SocketOption_msginit = { + NULL, + &envoy_api_v2_core_SocketOption__fields[0], + UPB_SIZE(48, 64), 6, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_RuntimeFractionalPercent_submsgs[1] = { + &envoy_type_FractionalPercent_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_RuntimeFractionalPercent__fields[2] = { + {1, UPB_SIZE(8, 16), 0, 0, 11, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_core_RuntimeFractionalPercent_msginit = { + &envoy_api_v2_core_RuntimeFractionalPercent_submsgs[0], + &envoy_api_v2_core_RuntimeFractionalPercent__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h new file mode 100644 index 00000000000..e630d1d53ca --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h @@ -0,0 +1,507 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/base.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_BASE_PROTO_UPB_H_ +#define ENVOY_API_V2_CORE_BASE_PROTO_UPB_H_ + +#include "upb/generated_util.h" + +#include "upb/msg.h" + +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_core_Locality; +struct envoy_api_v2_core_Node; +struct envoy_api_v2_core_Metadata; +struct envoy_api_v2_core_Metadata_FilterMetadataEntry; +struct envoy_api_v2_core_RuntimeUInt32; +struct envoy_api_v2_core_HeaderValue; +struct envoy_api_v2_core_HeaderValueOption; +struct envoy_api_v2_core_DataSource; +struct envoy_api_v2_core_TransportSocket; +struct envoy_api_v2_core_SocketOption; +struct envoy_api_v2_core_RuntimeFractionalPercent; +typedef struct envoy_api_v2_core_Locality envoy_api_v2_core_Locality; +typedef struct envoy_api_v2_core_Node envoy_api_v2_core_Node; +typedef struct envoy_api_v2_core_Metadata envoy_api_v2_core_Metadata; +typedef struct envoy_api_v2_core_Metadata_FilterMetadataEntry envoy_api_v2_core_Metadata_FilterMetadataEntry; +typedef struct envoy_api_v2_core_RuntimeUInt32 envoy_api_v2_core_RuntimeUInt32; +typedef struct envoy_api_v2_core_HeaderValue envoy_api_v2_core_HeaderValue; +typedef struct envoy_api_v2_core_HeaderValueOption envoy_api_v2_core_HeaderValueOption; +typedef struct envoy_api_v2_core_DataSource envoy_api_v2_core_DataSource; +typedef struct envoy_api_v2_core_TransportSocket envoy_api_v2_core_TransportSocket; +typedef struct envoy_api_v2_core_SocketOption envoy_api_v2_core_SocketOption; +typedef struct envoy_api_v2_core_RuntimeFractionalPercent envoy_api_v2_core_RuntimeFractionalPercent; +extern const upb_msglayout envoy_api_v2_core_Locality_msginit; +extern const upb_msglayout envoy_api_v2_core_Node_msginit; +extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; +extern const upb_msglayout envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit; +extern const upb_msglayout envoy_api_v2_core_RuntimeUInt32_msginit; +extern const upb_msglayout envoy_api_v2_core_HeaderValue_msginit; +extern const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit; +extern const upb_msglayout envoy_api_v2_core_DataSource_msginit; +extern const upb_msglayout envoy_api_v2_core_TransportSocket_msginit; +extern const upb_msglayout envoy_api_v2_core_SocketOption_msginit; +extern const upb_msglayout envoy_api_v2_core_RuntimeFractionalPercent_msginit; +struct google_protobuf_Any; +struct google_protobuf_Struct; +struct google_protobuf_BoolValue; +struct envoy_type_FractionalPercent; +extern const upb_msglayout google_protobuf_Any_msginit; +extern const upb_msglayout google_protobuf_Struct_msginit; +extern const upb_msglayout google_protobuf_BoolValue_msginit; +extern const upb_msglayout envoy_type_FractionalPercent_msginit; + +/* Enums */ + +typedef enum { + envoy_api_v2_core_METHOD_UNSPECIFIED = 0, + envoy_api_v2_core_GET = 1, + envoy_api_v2_core_HEAD = 2, + envoy_api_v2_core_POST = 3, + envoy_api_v2_core_PUT = 4, + envoy_api_v2_core_DELETE = 5, + envoy_api_v2_core_CONNECT = 6, + envoy_api_v2_core_OPTIONS = 7, + envoy_api_v2_core_TRACE = 8 +} envoy_api_v2_core_RequestMethod; + +typedef enum { + envoy_api_v2_core_DEFAULT = 0, + envoy_api_v2_core_HIGH = 1 +} envoy_api_v2_core_RoutingPriority; + +typedef enum { + envoy_api_v2_core_SocketOption_STATE_PREBIND = 0, + envoy_api_v2_core_SocketOption_STATE_BOUND = 1, + envoy_api_v2_core_SocketOption_STATE_LISTENING = 2 +} envoy_api_v2_core_SocketOption_SocketState; + +/* envoy.api.v2.core.Locality */ + +UPB_INLINE envoy_api_v2_core_Locality *envoy_api_v2_core_Locality_new(upb_arena *arena) { + return (envoy_api_v2_core_Locality *)upb_msg_new(&envoy_api_v2_core_Locality_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_Locality *envoy_api_v2_core_Locality_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_Locality *ret = envoy_api_v2_core_Locality_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_Locality_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_Locality_serialize(const envoy_api_v2_core_Locality *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_Locality_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_core_Locality_region(const envoy_api_v2_core_Locality *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_Locality_zone(const envoy_api_v2_core_Locality *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_core_Locality_sub_zone(const envoy_api_v2_core_Locality *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } + +UPB_INLINE void envoy_api_v2_core_Locality_set_region(envoy_api_v2_core_Locality *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_core_Locality_set_zone(envoy_api_v2_core_Locality *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE void envoy_api_v2_core_Locality_set_sub_zone(envoy_api_v2_core_Locality *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; +} + + +/* envoy.api.v2.core.Node */ + +UPB_INLINE envoy_api_v2_core_Node *envoy_api_v2_core_Node_new(upb_arena *arena) { + return (envoy_api_v2_core_Node *)upb_msg_new(&envoy_api_v2_core_Node_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_Node *envoy_api_v2_core_Node_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_Node *ret = envoy_api_v2_core_Node_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_Node_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_Node_serialize(const envoy_api_v2_core_Node *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_Node_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_core_Node_id(const envoy_api_v2_core_Node *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_Node_cluster(const envoy_api_v2_core_Node *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_Node_metadata(const envoy_api_v2_core_Node *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(24, 48)); } +UPB_INLINE const envoy_api_v2_core_Locality* envoy_api_v2_core_Node_locality(const envoy_api_v2_core_Node *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_Locality*, UPB_SIZE(28, 56)); } +UPB_INLINE upb_strview envoy_api_v2_core_Node_build_version(const envoy_api_v2_core_Node *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } + +UPB_INLINE void envoy_api_v2_core_Node_set_id(envoy_api_v2_core_Node *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_core_Node_set_cluster(envoy_api_v2_core_Node *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE void envoy_api_v2_core_Node_set_metadata(envoy_api_v2_core_Node *msg, struct google_protobuf_Struct* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(24, 48)) = value; +} +UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_Node_mutable_metadata(envoy_api_v2_core_Node *msg, upb_arena *arena) { + struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_Node_metadata(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Node_set_metadata(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_Node_set_locality(envoy_api_v2_core_Node *msg, envoy_api_v2_core_Locality* value) { + UPB_FIELD_AT(msg, envoy_api_v2_core_Locality*, UPB_SIZE(28, 56)) = value; +} +UPB_INLINE struct envoy_api_v2_core_Locality* envoy_api_v2_core_Node_mutable_locality(envoy_api_v2_core_Node *msg, upb_arena *arena) { + struct envoy_api_v2_core_Locality* sub = (struct envoy_api_v2_core_Locality*)envoy_api_v2_core_Node_locality(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_Locality*)upb_msg_new(&envoy_api_v2_core_Locality_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Node_set_locality(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_Node_set_build_version(envoy_api_v2_core_Node *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; +} + + +/* envoy.api.v2.core.Metadata */ + +UPB_INLINE envoy_api_v2_core_Metadata *envoy_api_v2_core_Metadata_new(upb_arena *arena) { + return (envoy_api_v2_core_Metadata *)upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_Metadata *envoy_api_v2_core_Metadata_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_Metadata *ret = envoy_api_v2_core_Metadata_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_Metadata_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_Metadata_serialize(const envoy_api_v2_core_Metadata *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_Metadata_msginit, arena, len); +} + +UPB_INLINE const envoy_api_v2_core_Metadata_FilterMetadataEntry* const* envoy_api_v2_core_Metadata_filter_metadata(const envoy_api_v2_core_Metadata *msg, size_t *len) { return (const envoy_api_v2_core_Metadata_FilterMetadataEntry* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } + +UPB_INLINE envoy_api_v2_core_Metadata_FilterMetadataEntry** envoy_api_v2_core_Metadata_mutable_filter_metadata(envoy_api_v2_core_Metadata *msg, size_t *len) { + return (envoy_api_v2_core_Metadata_FilterMetadataEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); +} +UPB_INLINE envoy_api_v2_core_Metadata_FilterMetadataEntry** envoy_api_v2_core_Metadata_resize_filter_metadata(envoy_api_v2_core_Metadata *msg, size_t len, upb_arena *arena) { + return (envoy_api_v2_core_Metadata_FilterMetadataEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_api_v2_core_Metadata_FilterMetadataEntry* envoy_api_v2_core_Metadata_add_filter_metadata(envoy_api_v2_core_Metadata *msg, upb_arena *arena) { + struct envoy_api_v2_core_Metadata_FilterMetadataEntry* sub = (struct envoy_api_v2_core_Metadata_FilterMetadataEntry*)upb_msg_new(&envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} + + +/* envoy.api.v2.core.Metadata.FilterMetadataEntry */ + +UPB_INLINE envoy_api_v2_core_Metadata_FilterMetadataEntry *envoy_api_v2_core_Metadata_FilterMetadataEntry_new(upb_arena *arena) { + return (envoy_api_v2_core_Metadata_FilterMetadataEntry *)upb_msg_new(&envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_Metadata_FilterMetadataEntry *envoy_api_v2_core_Metadata_FilterMetadataEntry_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_Metadata_FilterMetadataEntry *ret = envoy_api_v2_core_Metadata_FilterMetadataEntry_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_Metadata_FilterMetadataEntry_serialize(const envoy_api_v2_core_Metadata_FilterMetadataEntry *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_core_Metadata_FilterMetadataEntry_key(const envoy_api_v2_core_Metadata_FilterMetadataEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_Metadata_FilterMetadataEntry_value(const envoy_api_v2_core_Metadata_FilterMetadataEntry *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16)); } + +UPB_INLINE void envoy_api_v2_core_Metadata_FilterMetadataEntry_set_key(envoy_api_v2_core_Metadata_FilterMetadataEntry *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_core_Metadata_FilterMetadataEntry_set_value(envoy_api_v2_core_Metadata_FilterMetadataEntry *msg, struct google_protobuf_Struct* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_Metadata_FilterMetadataEntry_mutable_value(envoy_api_v2_core_Metadata_FilterMetadataEntry *msg, upb_arena *arena) { + struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_Metadata_FilterMetadataEntry_value(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Metadata_FilterMetadataEntry_set_value(msg, sub); + } + return sub; +} + + +/* envoy.api.v2.core.RuntimeUInt32 */ + +UPB_INLINE envoy_api_v2_core_RuntimeUInt32 *envoy_api_v2_core_RuntimeUInt32_new(upb_arena *arena) { + return (envoy_api_v2_core_RuntimeUInt32 *)upb_msg_new(&envoy_api_v2_core_RuntimeUInt32_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_RuntimeUInt32 *envoy_api_v2_core_RuntimeUInt32_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_RuntimeUInt32 *ret = envoy_api_v2_core_RuntimeUInt32_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_RuntimeUInt32_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_RuntimeUInt32_serialize(const envoy_api_v2_core_RuntimeUInt32 *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_RuntimeUInt32_msginit, arena, len); +} + +UPB_INLINE uint32_t envoy_api_v2_core_RuntimeUInt32_default_value(const envoy_api_v2_core_RuntimeUInt32 *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_RuntimeUInt32_runtime_key(const envoy_api_v2_core_RuntimeUInt32 *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } + +UPB_INLINE void envoy_api_v2_core_RuntimeUInt32_set_default_value(envoy_api_v2_core_RuntimeUInt32 *msg, uint32_t value) { + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_core_RuntimeUInt32_set_runtime_key(envoy_api_v2_core_RuntimeUInt32 *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; +} + + +/* envoy.api.v2.core.HeaderValue */ + +UPB_INLINE envoy_api_v2_core_HeaderValue *envoy_api_v2_core_HeaderValue_new(upb_arena *arena) { + return (envoy_api_v2_core_HeaderValue *)upb_msg_new(&envoy_api_v2_core_HeaderValue_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_HeaderValue *envoy_api_v2_core_HeaderValue_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_HeaderValue *ret = envoy_api_v2_core_HeaderValue_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_HeaderValue_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_HeaderValue_serialize(const envoy_api_v2_core_HeaderValue *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_HeaderValue_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_core_HeaderValue_key(const envoy_api_v2_core_HeaderValue *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_HeaderValue_value(const envoy_api_v2_core_HeaderValue *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } + +UPB_INLINE void envoy_api_v2_core_HeaderValue_set_key(envoy_api_v2_core_HeaderValue *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_core_HeaderValue_set_value(envoy_api_v2_core_HeaderValue *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; +} + + +/* envoy.api.v2.core.HeaderValueOption */ + +UPB_INLINE envoy_api_v2_core_HeaderValueOption *envoy_api_v2_core_HeaderValueOption_new(upb_arena *arena) { + return (envoy_api_v2_core_HeaderValueOption *)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_HeaderValueOption *envoy_api_v2_core_HeaderValueOption_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_HeaderValueOption *ret = envoy_api_v2_core_HeaderValueOption_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_HeaderValueOption_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_HeaderValueOption_serialize(const envoy_api_v2_core_HeaderValueOption *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_HeaderValueOption_msginit, arena, len); +} + +UPB_INLINE const envoy_api_v2_core_HeaderValue* envoy_api_v2_core_HeaderValueOption_header(const envoy_api_v2_core_HeaderValueOption *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_HeaderValue*, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_HeaderValueOption_append(const envoy_api_v2_core_HeaderValueOption *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)); } + +UPB_INLINE void envoy_api_v2_core_HeaderValueOption_set_header(envoy_api_v2_core_HeaderValueOption *msg, envoy_api_v2_core_HeaderValue* value) { + UPB_FIELD_AT(msg, envoy_api_v2_core_HeaderValue*, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE struct envoy_api_v2_core_HeaderValue* envoy_api_v2_core_HeaderValueOption_mutable_header(envoy_api_v2_core_HeaderValueOption *msg, upb_arena *arena) { + struct envoy_api_v2_core_HeaderValue* sub = (struct envoy_api_v2_core_HeaderValue*)envoy_api_v2_core_HeaderValueOption_header(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_HeaderValue*)upb_msg_new(&envoy_api_v2_core_HeaderValue_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HeaderValueOption_set_header(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HeaderValueOption_set_append(envoy_api_v2_core_HeaderValueOption *msg, struct google_protobuf_BoolValue* value) { + UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)) = value; +} +UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_HeaderValueOption_mutable_append(envoy_api_v2_core_HeaderValueOption *msg, upb_arena *arena) { + struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_HeaderValueOption_append(msg); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HeaderValueOption_set_append(msg, sub); + } + return sub; +} + + +/* envoy.api.v2.core.DataSource */ + +UPB_INLINE envoy_api_v2_core_DataSource *envoy_api_v2_core_DataSource_new(upb_arena *arena) { + return (envoy_api_v2_core_DataSource *)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_DataSource *envoy_api_v2_core_DataSource_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_DataSource *ret = envoy_api_v2_core_DataSource_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_DataSource_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_DataSource_serialize(const envoy_api_v2_core_DataSource *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_DataSource_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_core_DataSource_specifier_filename = 1, + envoy_api_v2_core_DataSource_specifier_inline_bytes = 2, + envoy_api_v2_core_DataSource_specifier_inline_string = 3, + envoy_api_v2_core_DataSource_specifier_NOT_SET = 0, +} envoy_api_v2_core_DataSource_specifier_oneofcases; +UPB_INLINE envoy_api_v2_core_DataSource_specifier_oneofcases envoy_api_v2_core_DataSource_specifier_case(const envoy_api_v2_core_DataSource* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(8, 16)); } + +UPB_INLINE bool envoy_api_v2_core_DataSource_has_filename(const envoy_api_v2_core_DataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } +UPB_INLINE upb_strview envoy_api_v2_core_DataSource_filename(const envoy_api_v2_core_DataSource *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } +UPB_INLINE bool envoy_api_v2_core_DataSource_has_inline_bytes(const envoy_api_v2_core_DataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 2); } +UPB_INLINE upb_strview envoy_api_v2_core_DataSource_inline_bytes(const envoy_api_v2_core_DataSource *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, upb_strview_make("", strlen(""))); } +UPB_INLINE bool envoy_api_v2_core_DataSource_has_inline_string(const envoy_api_v2_core_DataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 3); } +UPB_INLINE upb_strview envoy_api_v2_core_DataSource_inline_string(const envoy_api_v2_core_DataSource *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 3, upb_strview_make("", strlen(""))); } + +UPB_INLINE void envoy_api_v2_core_DataSource_set_filename(envoy_api_v2_core_DataSource *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1); +} +UPB_INLINE void envoy_api_v2_core_DataSource_set_inline_bytes(envoy_api_v2_core_DataSource *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2); +} +UPB_INLINE void envoy_api_v2_core_DataSource_set_inline_string(envoy_api_v2_core_DataSource *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 3); +} + + +/* envoy.api.v2.core.TransportSocket */ + +UPB_INLINE envoy_api_v2_core_TransportSocket *envoy_api_v2_core_TransportSocket_new(upb_arena *arena) { + return (envoy_api_v2_core_TransportSocket *)upb_msg_new(&envoy_api_v2_core_TransportSocket_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_TransportSocket *envoy_api_v2_core_TransportSocket_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_TransportSocket *ret = envoy_api_v2_core_TransportSocket_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_TransportSocket_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_TransportSocket_serialize(const envoy_api_v2_core_TransportSocket *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_TransportSocket_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_core_TransportSocket_config_type_config = 2, + envoy_api_v2_core_TransportSocket_config_type_typed_config = 3, + envoy_api_v2_core_TransportSocket_config_type_NOT_SET = 0, +} envoy_api_v2_core_TransportSocket_config_type_oneofcases; +UPB_INLINE envoy_api_v2_core_TransportSocket_config_type_oneofcases envoy_api_v2_core_TransportSocket_config_type_case(const envoy_api_v2_core_TransportSocket* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(12, 24)); } + +UPB_INLINE upb_strview envoy_api_v2_core_TransportSocket_name(const envoy_api_v2_core_TransportSocket *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_core_TransportSocket_has_config(const envoy_api_v2_core_TransportSocket *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_TransportSocket_config(const envoy_api_v2_core_TransportSocket *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } +UPB_INLINE bool envoy_api_v2_core_TransportSocket_has_typed_config(const envoy_api_v2_core_TransportSocket *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_core_TransportSocket_typed_config(const envoy_api_v2_core_TransportSocket *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } + +UPB_INLINE void envoy_api_v2_core_TransportSocket_set_name(envoy_api_v2_core_TransportSocket *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_core_TransportSocket_set_config(envoy_api_v2_core_TransportSocket *msg, struct google_protobuf_Struct* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); +} +UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_TransportSocket_mutable_config(envoy_api_v2_core_TransportSocket *msg, upb_arena *arena) { + struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_TransportSocket_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_TransportSocket_set_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_TransportSocket_set_typed_config(envoy_api_v2_core_TransportSocket *msg, struct google_protobuf_Any* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3); +} +UPB_INLINE struct google_protobuf_Any* envoy_api_v2_core_TransportSocket_mutable_typed_config(envoy_api_v2_core_TransportSocket *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_core_TransportSocket_typed_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_TransportSocket_set_typed_config(msg, sub); + } + return sub; +} + + +/* envoy.api.v2.core.SocketOption */ + +UPB_INLINE envoy_api_v2_core_SocketOption *envoy_api_v2_core_SocketOption_new(upb_arena *arena) { + return (envoy_api_v2_core_SocketOption *)upb_msg_new(&envoy_api_v2_core_SocketOption_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_SocketOption *envoy_api_v2_core_SocketOption_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_SocketOption *ret = envoy_api_v2_core_SocketOption_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_SocketOption_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_SocketOption_serialize(const envoy_api_v2_core_SocketOption *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_SocketOption_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_core_SocketOption_value_int_value = 4, + envoy_api_v2_core_SocketOption_value_buf_value = 5, + envoy_api_v2_core_SocketOption_value_NOT_SET = 0, +} envoy_api_v2_core_SocketOption_value_oneofcases; +UPB_INLINE envoy_api_v2_core_SocketOption_value_oneofcases envoy_api_v2_core_SocketOption_value_case(const envoy_api_v2_core_SocketOption* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(40, 56)); } + +UPB_INLINE upb_strview envoy_api_v2_core_SocketOption_description(const envoy_api_v2_core_SocketOption *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 24)); } +UPB_INLINE int64_t envoy_api_v2_core_SocketOption_level(const envoy_api_v2_core_SocketOption *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } +UPB_INLINE int64_t envoy_api_v2_core_SocketOption_name(const envoy_api_v2_core_SocketOption *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool envoy_api_v2_core_SocketOption_has_int_value(const envoy_api_v2_core_SocketOption *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(40, 56), 4); } +UPB_INLINE int64_t envoy_api_v2_core_SocketOption_int_value(const envoy_api_v2_core_SocketOption *msg) { return UPB_READ_ONEOF(msg, int64_t, UPB_SIZE(32, 40), UPB_SIZE(40, 56), 4, 0); } +UPB_INLINE bool envoy_api_v2_core_SocketOption_has_buf_value(const envoy_api_v2_core_SocketOption *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(40, 56), 5); } +UPB_INLINE upb_strview envoy_api_v2_core_SocketOption_buf_value(const envoy_api_v2_core_SocketOption *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(32, 40), UPB_SIZE(40, 56), 5, upb_strview_make("", strlen(""))); } +UPB_INLINE envoy_api_v2_core_SocketOption_SocketState envoy_api_v2_core_SocketOption_state(const envoy_api_v2_core_SocketOption *msg) { return UPB_FIELD_AT(msg, envoy_api_v2_core_SocketOption_SocketState, UPB_SIZE(16, 16)); } + +UPB_INLINE void envoy_api_v2_core_SocketOption_set_description(envoy_api_v2_core_SocketOption *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 24)) = value; +} +UPB_INLINE void envoy_api_v2_core_SocketOption_set_level(envoy_api_v2_core_SocketOption *msg, int64_t value) { + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_core_SocketOption_set_name(envoy_api_v2_core_SocketOption *msg, int64_t value) { + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void envoy_api_v2_core_SocketOption_set_int_value(envoy_api_v2_core_SocketOption *msg, int64_t value) { + UPB_WRITE_ONEOF(msg, int64_t, UPB_SIZE(32, 40), value, UPB_SIZE(40, 56), 4); +} +UPB_INLINE void envoy_api_v2_core_SocketOption_set_buf_value(envoy_api_v2_core_SocketOption *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(32, 40), value, UPB_SIZE(40, 56), 5); +} +UPB_INLINE void envoy_api_v2_core_SocketOption_set_state(envoy_api_v2_core_SocketOption *msg, envoy_api_v2_core_SocketOption_SocketState value) { + UPB_FIELD_AT(msg, envoy_api_v2_core_SocketOption_SocketState, UPB_SIZE(16, 16)) = value; +} + + +/* envoy.api.v2.core.RuntimeFractionalPercent */ + +UPB_INLINE envoy_api_v2_core_RuntimeFractionalPercent *envoy_api_v2_core_RuntimeFractionalPercent_new(upb_arena *arena) { + return (envoy_api_v2_core_RuntimeFractionalPercent *)upb_msg_new(&envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_RuntimeFractionalPercent *envoy_api_v2_core_RuntimeFractionalPercent_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_RuntimeFractionalPercent *ret = envoy_api_v2_core_RuntimeFractionalPercent_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_RuntimeFractionalPercent_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_RuntimeFractionalPercent_serialize(const envoy_api_v2_core_RuntimeFractionalPercent *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena, len); +} + +UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_core_RuntimeFractionalPercent_default_value(const envoy_api_v2_core_RuntimeFractionalPercent *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_FractionalPercent*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_core_RuntimeFractionalPercent_runtime_key(const envoy_api_v2_core_RuntimeFractionalPercent *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_api_v2_core_RuntimeFractionalPercent_set_default_value(envoy_api_v2_core_RuntimeFractionalPercent *msg, struct envoy_type_FractionalPercent* value) { + UPB_FIELD_AT(msg, struct envoy_type_FractionalPercent*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_core_RuntimeFractionalPercent_mutable_default_value(envoy_api_v2_core_RuntimeFractionalPercent *msg, upb_arena *arena) { + struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_core_RuntimeFractionalPercent_default_value(msg); + if (sub == NULL) { + sub = (struct envoy_type_FractionalPercent*)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_RuntimeFractionalPercent_set_default_value(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_RuntimeFractionalPercent_set_runtime_key(envoy_api_v2_core_RuntimeFractionalPercent *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_BASE_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c new file mode 100644 index 00000000000..a6dcd52d45b --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c @@ -0,0 +1,144 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/health_check.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/api/v2/core/health_check.upb.h" +#include "envoy/api/v2/core/base.upb.h" +#include "google/protobuf/any.upb.h" +#include "google/protobuf/duration.upb.h" +#include "google/protobuf/struct.upb.h" +#include "google/protobuf/wrappers.upb.h" +#include "validate/validate.upb.h" +#include "gogoproto/gogo.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_core_HealthCheck_submsgs[15] = { + &envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit, + &envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit, + &envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit, + &envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit, + &google_protobuf_BoolValue_msginit, + &google_protobuf_Duration_msginit, + &google_protobuf_UInt32Value_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_HealthCheck__fields[17] = { + {1, UPB_SIZE(12, 24), 0, 5, 11, 1}, + {2, UPB_SIZE(16, 32), 0, 5, 11, 1}, + {3, UPB_SIZE(20, 40), 0, 5, 11, 1}, + {4, UPB_SIZE(24, 48), 0, 6, 11, 1}, + {5, UPB_SIZE(28, 56), 0, 6, 11, 1}, + {6, UPB_SIZE(32, 64), 0, 6, 11, 1}, + {7, UPB_SIZE(36, 72), 0, 4, 11, 1}, + {8, UPB_SIZE(56, 112), UPB_SIZE(-61, -121), 2, 11, 1}, + {9, UPB_SIZE(56, 112), UPB_SIZE(-61, -121), 3, 11, 1}, + {11, UPB_SIZE(56, 112), UPB_SIZE(-61, -121), 1, 11, 1}, + {12, UPB_SIZE(40, 80), 0, 5, 11, 1}, + {13, UPB_SIZE(56, 112), UPB_SIZE(-61, -121), 0, 11, 1}, + {14, UPB_SIZE(44, 88), 0, 5, 11, 1}, + {15, UPB_SIZE(48, 96), 0, 5, 11, 1}, + {16, UPB_SIZE(52, 104), 0, 5, 11, 1}, + {17, UPB_SIZE(4, 8), 0, 0, 9, 1}, + {18, UPB_SIZE(0, 0), 0, 0, 13, 1}, +}; + +const upb_msglayout envoy_api_v2_core_HealthCheck_msginit = { + &envoy_api_v2_core_HealthCheck_submsgs[0], + &envoy_api_v2_core_HealthCheck__fields[0], + UPB_SIZE(64, 128), 17, false, +}; + +static const upb_msglayout_field envoy_api_v2_core_HealthCheck_Payload__fields[2] = { + {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 12, 1}, +}; + +const upb_msglayout envoy_api_v2_core_HealthCheck_Payload_msginit = { + NULL, + &envoy_api_v2_core_HealthCheck_Payload__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_HealthCheck_HttpHealthCheck_submsgs[3] = { + &envoy_api_v2_core_HeaderValueOption_msginit, + &envoy_api_v2_core_HealthCheck_Payload_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_HealthCheck_HttpHealthCheck__fields[8] = { + {1, UPB_SIZE(4, 8), 0, 0, 9, 1}, + {2, UPB_SIZE(12, 24), 0, 0, 9, 1}, + {3, UPB_SIZE(28, 56), 0, 1, 11, 1}, + {4, UPB_SIZE(32, 64), 0, 1, 11, 1}, + {5, UPB_SIZE(20, 40), 0, 0, 9, 1}, + {6, UPB_SIZE(36, 72), 0, 0, 11, 3}, + {7, UPB_SIZE(0, 0), 0, 0, 8, 1}, + {8, UPB_SIZE(40, 80), 0, 0, 9, 3}, +}; + +const upb_msglayout envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit = { + &envoy_api_v2_core_HealthCheck_HttpHealthCheck_submsgs[0], + &envoy_api_v2_core_HealthCheck_HttpHealthCheck__fields[0], + UPB_SIZE(48, 96), 8, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_HealthCheck_TcpHealthCheck_submsgs[2] = { + &envoy_api_v2_core_HealthCheck_Payload_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_HealthCheck_TcpHealthCheck__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 0, 11, 3}, +}; + +const upb_msglayout envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit = { + &envoy_api_v2_core_HealthCheck_TcpHealthCheck_submsgs[0], + &envoy_api_v2_core_HealthCheck_TcpHealthCheck__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + +static const upb_msglayout_field envoy_api_v2_core_HealthCheck_RedisHealthCheck__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_core_HealthCheck_RedisHealthCheck_msginit = { + NULL, + &envoy_api_v2_core_HealthCheck_RedisHealthCheck__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +static const upb_msglayout_field envoy_api_v2_core_HealthCheck_GrpcHealthCheck__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit = { + NULL, + &envoy_api_v2_core_HealthCheck_GrpcHealthCheck__fields[0], + UPB_SIZE(8, 16), 1, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_HealthCheck_CustomHealthCheck_submsgs[2] = { + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_HealthCheck_CustomHealthCheck__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit = { + &envoy_api_v2_core_HealthCheck_CustomHealthCheck_submsgs[0], + &envoy_api_v2_core_HealthCheck_CustomHealthCheck__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h new file mode 100644 index 00000000000..d788fea61c6 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h @@ -0,0 +1,559 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/health_check.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_HEALTH_CHECK_PROTO_UPB_H_ +#define ENVOY_API_V2_CORE_HEALTH_CHECK_PROTO_UPB_H_ + +#include "upb/generated_util.h" + +#include "upb/msg.h" + +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_core_HealthCheck; +struct envoy_api_v2_core_HealthCheck_Payload; +struct envoy_api_v2_core_HealthCheck_HttpHealthCheck; +struct envoy_api_v2_core_HealthCheck_TcpHealthCheck; +struct envoy_api_v2_core_HealthCheck_RedisHealthCheck; +struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck; +struct envoy_api_v2_core_HealthCheck_CustomHealthCheck; +typedef struct envoy_api_v2_core_HealthCheck envoy_api_v2_core_HealthCheck; +typedef struct envoy_api_v2_core_HealthCheck_Payload envoy_api_v2_core_HealthCheck_Payload; +typedef struct envoy_api_v2_core_HealthCheck_HttpHealthCheck envoy_api_v2_core_HealthCheck_HttpHealthCheck; +typedef struct envoy_api_v2_core_HealthCheck_TcpHealthCheck envoy_api_v2_core_HealthCheck_TcpHealthCheck; +typedef struct envoy_api_v2_core_HealthCheck_RedisHealthCheck envoy_api_v2_core_HealthCheck_RedisHealthCheck; +typedef struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck envoy_api_v2_core_HealthCheck_GrpcHealthCheck; +typedef struct envoy_api_v2_core_HealthCheck_CustomHealthCheck envoy_api_v2_core_HealthCheck_CustomHealthCheck; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_Payload_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_RedisHealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit; +struct google_protobuf_Any; +struct google_protobuf_Struct; +struct google_protobuf_UInt32Value; +struct google_protobuf_BoolValue; +struct google_protobuf_Duration; +struct envoy_api_v2_core_HeaderValueOption; +extern const upb_msglayout google_protobuf_Any_msginit; +extern const upb_msglayout google_protobuf_Struct_msginit; +extern const upb_msglayout google_protobuf_UInt32Value_msginit; +extern const upb_msglayout google_protobuf_BoolValue_msginit; +extern const upb_msglayout google_protobuf_Duration_msginit; +extern const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit; + +/* Enums */ + +typedef enum { + envoy_api_v2_core_UNKNOWN = 0, + envoy_api_v2_core_HEALTHY = 1, + envoy_api_v2_core_UNHEALTHY = 2, + envoy_api_v2_core_DRAINING = 3, + envoy_api_v2_core_TIMEOUT = 4 +} envoy_api_v2_core_HealthStatus; + +/* envoy.api.v2.core.HealthCheck */ + +UPB_INLINE envoy_api_v2_core_HealthCheck *envoy_api_v2_core_HealthCheck_new(upb_arena *arena) { + return (envoy_api_v2_core_HealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_HealthCheck *envoy_api_v2_core_HealthCheck_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_HealthCheck *ret = envoy_api_v2_core_HealthCheck_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_HealthCheck_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_HealthCheck_serialize(const envoy_api_v2_core_HealthCheck *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_HealthCheck_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_core_HealthCheck_health_checker_http_health_check = 8, + envoy_api_v2_core_HealthCheck_health_checker_tcp_health_check = 9, + envoy_api_v2_core_HealthCheck_health_checker_grpc_health_check = 11, + envoy_api_v2_core_HealthCheck_health_checker_custom_health_check = 13, + envoy_api_v2_core_HealthCheck_health_checker_NOT_SET = 0, +} envoy_api_v2_core_HealthCheck_health_checker_oneofcases; +UPB_INLINE envoy_api_v2_core_HealthCheck_health_checker_oneofcases envoy_api_v2_core_HealthCheck_health_checker_case(const envoy_api_v2_core_HealthCheck* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(60, 120)); } + +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_timeout(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(12, 24)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_interval(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(16, 32)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_interval_jitter(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(20, 40)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_unhealthy_threshold(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_healthy_threshold(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_alt_port(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_HealthCheck_reuse_connection(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(36, 72)); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_http_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(60, 120), 8); } +UPB_INLINE const envoy_api_v2_core_HealthCheck_HttpHealthCheck* envoy_api_v2_core_HealthCheck_http_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_HttpHealthCheck*, UPB_SIZE(56, 112), UPB_SIZE(60, 120), 8, NULL); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_tcp_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(60, 120), 9); } +UPB_INLINE const envoy_api_v2_core_HealthCheck_TcpHealthCheck* envoy_api_v2_core_HealthCheck_tcp_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_TcpHealthCheck*, UPB_SIZE(56, 112), UPB_SIZE(60, 120), 9, NULL); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_grpc_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(60, 120), 11); } +UPB_INLINE const envoy_api_v2_core_HealthCheck_GrpcHealthCheck* envoy_api_v2_core_HealthCheck_grpc_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_GrpcHealthCheck*, UPB_SIZE(56, 112), UPB_SIZE(60, 120), 11, NULL); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_no_traffic_interval(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(40, 80)); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_custom_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(60, 120), 13); } +UPB_INLINE const envoy_api_v2_core_HealthCheck_CustomHealthCheck* envoy_api_v2_core_HealthCheck_custom_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_CustomHealthCheck*, UPB_SIZE(56, 112), UPB_SIZE(60, 120), 13, NULL); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_unhealthy_interval(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(44, 88)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_unhealthy_edge_interval(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(48, 96)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_healthy_edge_interval(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(52, 104)); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_event_log_path(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE uint32_t envoy_api_v2_core_HealthCheck_interval_jitter_percent(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_timeout(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 24)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_timeout(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_timeout(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_timeout(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_interval(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(16, 32)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_interval(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_interval(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_interval_jitter(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(20, 40)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_interval_jitter(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_interval_jitter(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_interval_jitter(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_unhealthy_threshold(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mutable_unhealthy_threshold(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_HealthCheck_unhealthy_threshold(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_unhealthy_threshold(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_healthy_threshold(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mutable_healthy_threshold(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_HealthCheck_healthy_threshold(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_healthy_threshold(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_alt_port(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mutable_alt_port(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_HealthCheck_alt_port(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_alt_port(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_reuse_connection(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_BoolValue* value) { + UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(36, 72)) = value; +} +UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_HealthCheck_mutable_reuse_connection(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_HealthCheck_reuse_connection(msg); + if (sub == NULL) { + sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_reuse_connection(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_http_health_check(envoy_api_v2_core_HealthCheck *msg, envoy_api_v2_core_HealthCheck_HttpHealthCheck* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_HttpHealthCheck*, UPB_SIZE(56, 112), value, UPB_SIZE(60, 120), 8); +} +UPB_INLINE struct envoy_api_v2_core_HealthCheck_HttpHealthCheck* envoy_api_v2_core_HealthCheck_mutable_http_health_check(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct envoy_api_v2_core_HealthCheck_HttpHealthCheck* sub = (struct envoy_api_v2_core_HealthCheck_HttpHealthCheck*)envoy_api_v2_core_HealthCheck_http_health_check(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_HealthCheck_HttpHealthCheck*)upb_msg_new(&envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_http_health_check(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_tcp_health_check(envoy_api_v2_core_HealthCheck *msg, envoy_api_v2_core_HealthCheck_TcpHealthCheck* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_TcpHealthCheck*, UPB_SIZE(56, 112), value, UPB_SIZE(60, 120), 9); +} +UPB_INLINE struct envoy_api_v2_core_HealthCheck_TcpHealthCheck* envoy_api_v2_core_HealthCheck_mutable_tcp_health_check(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct envoy_api_v2_core_HealthCheck_TcpHealthCheck* sub = (struct envoy_api_v2_core_HealthCheck_TcpHealthCheck*)envoy_api_v2_core_HealthCheck_tcp_health_check(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_HealthCheck_TcpHealthCheck*)upb_msg_new(&envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_tcp_health_check(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_grpc_health_check(envoy_api_v2_core_HealthCheck *msg, envoy_api_v2_core_HealthCheck_GrpcHealthCheck* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_GrpcHealthCheck*, UPB_SIZE(56, 112), value, UPB_SIZE(60, 120), 11); +} +UPB_INLINE struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck* envoy_api_v2_core_HealthCheck_mutable_grpc_health_check(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck* sub = (struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck*)envoy_api_v2_core_HealthCheck_grpc_health_check(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck*)upb_msg_new(&envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_grpc_health_check(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_no_traffic_interval(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(40, 80)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_no_traffic_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_no_traffic_interval(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_no_traffic_interval(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_custom_health_check(envoy_api_v2_core_HealthCheck *msg, envoy_api_v2_core_HealthCheck_CustomHealthCheck* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_HealthCheck_CustomHealthCheck*, UPB_SIZE(56, 112), value, UPB_SIZE(60, 120), 13); +} +UPB_INLINE struct envoy_api_v2_core_HealthCheck_CustomHealthCheck* envoy_api_v2_core_HealthCheck_mutable_custom_health_check(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct envoy_api_v2_core_HealthCheck_CustomHealthCheck* sub = (struct envoy_api_v2_core_HealthCheck_CustomHealthCheck*)envoy_api_v2_core_HealthCheck_custom_health_check(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_HealthCheck_CustomHealthCheck*)upb_msg_new(&envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_custom_health_check(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_unhealthy_interval(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(44, 88)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_unhealthy_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_unhealthy_interval(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_unhealthy_interval(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_unhealthy_edge_interval(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(48, 96)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_unhealthy_edge_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_unhealthy_edge_interval(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_unhealthy_edge_interval(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_healthy_edge_interval(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(52, 104)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_healthy_edge_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_healthy_edge_interval(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_set_healthy_edge_interval(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_event_log_path(envoy_api_v2_core_HealthCheck *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_set_interval_jitter_percent(envoy_api_v2_core_HealthCheck *msg, uint32_t value) { + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; +} + + +/* envoy.api.v2.core.HealthCheck.Payload */ + +UPB_INLINE envoy_api_v2_core_HealthCheck_Payload *envoy_api_v2_core_HealthCheck_Payload_new(upb_arena *arena) { + return (envoy_api_v2_core_HealthCheck_Payload *)upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_HealthCheck_Payload *envoy_api_v2_core_HealthCheck_Payload_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_HealthCheck_Payload *ret = envoy_api_v2_core_HealthCheck_Payload_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_HealthCheck_Payload_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_HealthCheck_Payload_serialize(const envoy_api_v2_core_HealthCheck_Payload *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_HealthCheck_Payload_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_core_HealthCheck_Payload_payload_text = 1, + envoy_api_v2_core_HealthCheck_Payload_payload_binary = 2, + envoy_api_v2_core_HealthCheck_Payload_payload_NOT_SET = 0, +} envoy_api_v2_core_HealthCheck_Payload_payload_oneofcases; +UPB_INLINE envoy_api_v2_core_HealthCheck_Payload_payload_oneofcases envoy_api_v2_core_HealthCheck_Payload_payload_case(const envoy_api_v2_core_HealthCheck_Payload* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(8, 16)); } + +UPB_INLINE bool envoy_api_v2_core_HealthCheck_Payload_has_text(const envoy_api_v2_core_HealthCheck_Payload *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_Payload_text(const envoy_api_v2_core_HealthCheck_Payload *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_Payload_has_binary(const envoy_api_v2_core_HealthCheck_Payload *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 2); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_Payload_binary(const envoy_api_v2_core_HealthCheck_Payload *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, upb_strview_make("", strlen(""))); } + +UPB_INLINE void envoy_api_v2_core_HealthCheck_Payload_set_text(envoy_api_v2_core_HealthCheck_Payload *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1); +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_Payload_set_binary(envoy_api_v2_core_HealthCheck_Payload *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2); +} + + +/* envoy.api.v2.core.HealthCheck.HttpHealthCheck */ + +UPB_INLINE envoy_api_v2_core_HealthCheck_HttpHealthCheck *envoy_api_v2_core_HealthCheck_HttpHealthCheck_new(upb_arena *arena) { + return (envoy_api_v2_core_HealthCheck_HttpHealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_HealthCheck_HttpHealthCheck *envoy_api_v2_core_HealthCheck_HttpHealthCheck_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_HealthCheck_HttpHealthCheck *ret = envoy_api_v2_core_HealthCheck_HttpHealthCheck_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_HealthCheck_HttpHealthCheck_serialize(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_HttpHealthCheck_host(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_HttpHealthCheck_path(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); } +UPB_INLINE const envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_send(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(28, 56)); } +UPB_INLINE const envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_receive(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(32, 64)); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_HttpHealthCheck_service_name(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)); } +UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_core_HealthCheck_HttpHealthCheck_request_headers_to_add(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_HttpHealthCheck_use_http2(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview const* envoy_api_v2_core_HealthCheck_HttpHealthCheck_request_headers_to_remove(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } + +UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_host(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_path(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_send(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, envoy_api_v2_core_HealthCheck_Payload* value) { + UPB_FIELD_AT(msg, envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(28, 56)) = value; +} +UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_send(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) { + struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)envoy_api_v2_core_HealthCheck_HttpHealthCheck_send(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_HealthCheck_Payload*)upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_send(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_receive(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, envoy_api_v2_core_HealthCheck_Payload* value) { + UPB_FIELD_AT(msg, envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(32, 64)) = value; +} +UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_receive(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) { + struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)envoy_api_v2_core_HealthCheck_HttpHealthCheck_receive(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_HealthCheck_Payload*)upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_receive(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_service_name(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value; +} +UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_request_headers_to_add(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t *len) { + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); +} +UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_core_HealthCheck_HttpHealthCheck_resize_request_headers_to_add(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t len, upb_arena *arena) { + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_core_HealthCheck_HttpHealthCheck_add_request_headers_to_add(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) { + struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(36, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_use_http2(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE upb_strview* envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_request_headers_to_remove(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); +} +UPB_INLINE upb_strview* envoy_api_v2_core_HealthCheck_HttpHealthCheck_resize_request_headers_to_remove(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool envoy_api_v2_core_HealthCheck_HttpHealthCheck_add_request_headers_to_remove(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(40, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} + + +/* envoy.api.v2.core.HealthCheck.TcpHealthCheck */ + +UPB_INLINE envoy_api_v2_core_HealthCheck_TcpHealthCheck *envoy_api_v2_core_HealthCheck_TcpHealthCheck_new(upb_arena *arena) { + return (envoy_api_v2_core_HealthCheck_TcpHealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_HealthCheck_TcpHealthCheck *envoy_api_v2_core_HealthCheck_TcpHealthCheck_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_HealthCheck_TcpHealthCheck *ret = envoy_api_v2_core_HealthCheck_TcpHealthCheck_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_HealthCheck_TcpHealthCheck_serialize(const envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit, arena, len); +} + +UPB_INLINE const envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_TcpHealthCheck_send(const envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_api_v2_core_HealthCheck_Payload* const* envoy_api_v2_core_HealthCheck_TcpHealthCheck_receive(const envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, size_t *len) { return (const envoy_api_v2_core_HealthCheck_Payload* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } + +UPB_INLINE void envoy_api_v2_core_HealthCheck_TcpHealthCheck_set_send(envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, envoy_api_v2_core_HealthCheck_Payload* value) { + UPB_FIELD_AT(msg, envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_TcpHealthCheck_mutable_send(envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, upb_arena *arena) { + struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)envoy_api_v2_core_HealthCheck_TcpHealthCheck_send(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_HealthCheck_Payload*)upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_TcpHealthCheck_set_send(msg, sub); + } + return sub; +} +UPB_INLINE envoy_api_v2_core_HealthCheck_Payload** envoy_api_v2_core_HealthCheck_TcpHealthCheck_mutable_receive(envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, size_t *len) { + return (envoy_api_v2_core_HealthCheck_Payload**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); +} +UPB_INLINE envoy_api_v2_core_HealthCheck_Payload** envoy_api_v2_core_HealthCheck_TcpHealthCheck_resize_receive(envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, size_t len, upb_arena *arena) { + return (envoy_api_v2_core_HealthCheck_Payload**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_TcpHealthCheck_add_receive(envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, upb_arena *arena) { + struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} + + +/* envoy.api.v2.core.HealthCheck.RedisHealthCheck */ + +UPB_INLINE envoy_api_v2_core_HealthCheck_RedisHealthCheck *envoy_api_v2_core_HealthCheck_RedisHealthCheck_new(upb_arena *arena) { + return (envoy_api_v2_core_HealthCheck_RedisHealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_RedisHealthCheck_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_HealthCheck_RedisHealthCheck *envoy_api_v2_core_HealthCheck_RedisHealthCheck_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_HealthCheck_RedisHealthCheck *ret = envoy_api_v2_core_HealthCheck_RedisHealthCheck_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_HealthCheck_RedisHealthCheck_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_HealthCheck_RedisHealthCheck_serialize(const envoy_api_v2_core_HealthCheck_RedisHealthCheck *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_HealthCheck_RedisHealthCheck_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_RedisHealthCheck_key(const envoy_api_v2_core_HealthCheck_RedisHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_api_v2_core_HealthCheck_RedisHealthCheck_set_key(envoy_api_v2_core_HealthCheck_RedisHealthCheck *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} + + +/* envoy.api.v2.core.HealthCheck.GrpcHealthCheck */ + +UPB_INLINE envoy_api_v2_core_HealthCheck_GrpcHealthCheck *envoy_api_v2_core_HealthCheck_GrpcHealthCheck_new(upb_arena *arena) { + return (envoy_api_v2_core_HealthCheck_GrpcHealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_HealthCheck_GrpcHealthCheck *envoy_api_v2_core_HealthCheck_GrpcHealthCheck_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_HealthCheck_GrpcHealthCheck *ret = envoy_api_v2_core_HealthCheck_GrpcHealthCheck_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_HealthCheck_GrpcHealthCheck_serialize(const envoy_api_v2_core_HealthCheck_GrpcHealthCheck *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_GrpcHealthCheck_service_name(const envoy_api_v2_core_HealthCheck_GrpcHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_api_v2_core_HealthCheck_GrpcHealthCheck_set_service_name(envoy_api_v2_core_HealthCheck_GrpcHealthCheck *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} + + +/* envoy.api.v2.core.HealthCheck.CustomHealthCheck */ + +UPB_INLINE envoy_api_v2_core_HealthCheck_CustomHealthCheck *envoy_api_v2_core_HealthCheck_CustomHealthCheck_new(upb_arena *arena) { + return (envoy_api_v2_core_HealthCheck_CustomHealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_HealthCheck_CustomHealthCheck *envoy_api_v2_core_HealthCheck_CustomHealthCheck_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_core_HealthCheck_CustomHealthCheck *ret = envoy_api_v2_core_HealthCheck_CustomHealthCheck_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_HealthCheck_CustomHealthCheck_serialize(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_config = 2, + envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_typed_config = 3, + envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_NOT_SET = 0, +} envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_oneofcases; +UPB_INLINE envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_oneofcases envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_case(const envoy_api_v2_core_HealthCheck_CustomHealthCheck* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(12, 24)); } + +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_CustomHealthCheck_name(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_CustomHealthCheck_has_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_HealthCheck_CustomHealthCheck_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_CustomHealthCheck_has_typed_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_core_HealthCheck_CustomHealthCheck_typed_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } + +UPB_INLINE void envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_name(envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_config(envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg, struct google_protobuf_Struct* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); +} +UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_HealthCheck_CustomHealthCheck_mutable_config(envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg, upb_arena *arena) { + struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_HealthCheck_CustomHealthCheck_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_typed_config(envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg, struct google_protobuf_Any* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3); +} +UPB_INLINE struct google_protobuf_Any* envoy_api_v2_core_HealthCheck_CustomHealthCheck_mutable_typed_config(envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_core_HealthCheck_CustomHealthCheck_typed_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_typed_config(msg, sub); + } + return sub; +} + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_HEALTH_CHECK_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c new file mode 100644 index 00000000000..2f67f55a8a3 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c @@ -0,0 +1,123 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/discovery.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/api/v2/discovery.upb.h" +#include "envoy/api/v2/core/base.upb.h" +#include "google/protobuf/any.upb.h" +#include "google/rpc/status.upb.h" +#include "gogoproto/gogo.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_DiscoveryRequest_submsgs[2] = { + &envoy_api_v2_core_Node_msginit, + &google_rpc_Status_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_DiscoveryRequest__fields[6] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(24, 48), 0, 0, 11, 1}, + {3, UPB_SIZE(32, 64), 0, 0, 9, 3}, + {4, UPB_SIZE(8, 16), 0, 0, 9, 1}, + {5, UPB_SIZE(16, 32), 0, 0, 9, 1}, + {6, UPB_SIZE(28, 56), 0, 1, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_DiscoveryRequest_msginit = { + &envoy_api_v2_DiscoveryRequest_submsgs[0], + &envoy_api_v2_DiscoveryRequest__fields[0], + UPB_SIZE(40, 80), 6, false, +}; + +static const upb_msglayout *const envoy_api_v2_DiscoveryResponse_submsgs[1] = { + &google_protobuf_Any_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_DiscoveryResponse__fields[5] = { + {1, UPB_SIZE(4, 8), 0, 0, 9, 1}, + {2, UPB_SIZE(28, 56), 0, 0, 11, 3}, + {3, UPB_SIZE(0, 0), 0, 0, 8, 1}, + {4, UPB_SIZE(12, 24), 0, 0, 9, 1}, + {5, UPB_SIZE(20, 40), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_DiscoveryResponse_msginit = { + &envoy_api_v2_DiscoveryResponse_submsgs[0], + &envoy_api_v2_DiscoveryResponse__fields[0], + UPB_SIZE(32, 64), 5, false, +}; + +static const upb_msglayout *const envoy_api_v2_IncrementalDiscoveryRequest_submsgs[3] = { + &envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_msginit, + &envoy_api_v2_core_Node_msginit, + &google_rpc_Status_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_IncrementalDiscoveryRequest__fields[7] = { + {1, UPB_SIZE(16, 32), 0, 1, 11, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {3, UPB_SIZE(24, 48), 0, 0, 9, 3}, + {4, UPB_SIZE(28, 56), 0, 0, 9, 3}, + {5, UPB_SIZE(32, 64), 0, 0, 11, 3}, + {6, UPB_SIZE(8, 16), 0, 0, 9, 1}, + {7, UPB_SIZE(20, 40), 0, 2, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_IncrementalDiscoveryRequest_msginit = { + &envoy_api_v2_IncrementalDiscoveryRequest_submsgs[0], + &envoy_api_v2_IncrementalDiscoveryRequest__fields[0], + UPB_SIZE(40, 80), 7, false, +}; + +static const upb_msglayout_field envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_msginit = { + NULL, + &envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_IncrementalDiscoveryResponse_submsgs[1] = { + &envoy_api_v2_Resource_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_IncrementalDiscoveryResponse__fields[4] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(16, 32), 0, 0, 11, 3}, + {5, UPB_SIZE(8, 16), 0, 0, 9, 1}, + {6, UPB_SIZE(20, 40), 0, 0, 9, 3}, +}; + +const upb_msglayout envoy_api_v2_IncrementalDiscoveryResponse_msginit = { + &envoy_api_v2_IncrementalDiscoveryResponse_submsgs[0], + &envoy_api_v2_IncrementalDiscoveryResponse__fields[0], + UPB_SIZE(24, 48), 4, false, +}; + +static const upb_msglayout *const envoy_api_v2_Resource_submsgs[1] = { + &google_protobuf_Any_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_Resource__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_Resource_msginit = { + &envoy_api_v2_Resource_submsgs[0], + &envoy_api_v2_Resource__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h new file mode 100644 index 00000000000..a437ebaad5c --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h @@ -0,0 +1,359 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/discovery.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_DISCOVERY_PROTO_UPB_H_ +#define ENVOY_API_V2_DISCOVERY_PROTO_UPB_H_ + +#include "upb/generated_util.h" + +#include "upb/msg.h" + +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_DiscoveryRequest; +struct envoy_api_v2_DiscoveryResponse; +struct envoy_api_v2_IncrementalDiscoveryRequest; +struct envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry; +struct envoy_api_v2_IncrementalDiscoveryResponse; +struct envoy_api_v2_Resource; +typedef struct envoy_api_v2_DiscoveryRequest envoy_api_v2_DiscoveryRequest; +typedef struct envoy_api_v2_DiscoveryResponse envoy_api_v2_DiscoveryResponse; +typedef struct envoy_api_v2_IncrementalDiscoveryRequest envoy_api_v2_IncrementalDiscoveryRequest; +typedef struct envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry; +typedef struct envoy_api_v2_IncrementalDiscoveryResponse envoy_api_v2_IncrementalDiscoveryResponse; +typedef struct envoy_api_v2_Resource envoy_api_v2_Resource; +extern const upb_msglayout envoy_api_v2_DiscoveryRequest_msginit; +extern const upb_msglayout envoy_api_v2_DiscoveryResponse_msginit; +extern const upb_msglayout envoy_api_v2_IncrementalDiscoveryRequest_msginit; +extern const upb_msglayout envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_msginit; +extern const upb_msglayout envoy_api_v2_IncrementalDiscoveryResponse_msginit; +extern const upb_msglayout envoy_api_v2_Resource_msginit; +struct google_protobuf_Any; +struct envoy_api_v2_core_Node; +struct google_rpc_Status; +extern const upb_msglayout google_protobuf_Any_msginit; +extern const upb_msglayout envoy_api_v2_core_Node_msginit; +extern const upb_msglayout google_rpc_Status_msginit; + +/* Enums */ + +/* envoy.api.v2.DiscoveryRequest */ + +UPB_INLINE envoy_api_v2_DiscoveryRequest *envoy_api_v2_DiscoveryRequest_new(upb_arena *arena) { + return (envoy_api_v2_DiscoveryRequest *)upb_msg_new(&envoy_api_v2_DiscoveryRequest_msginit, arena); +} +UPB_INLINE envoy_api_v2_DiscoveryRequest *envoy_api_v2_DiscoveryRequest_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_DiscoveryRequest *ret = envoy_api_v2_DiscoveryRequest_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_DiscoveryRequest_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_DiscoveryRequest_serialize(const envoy_api_v2_DiscoveryRequest *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_DiscoveryRequest_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_DiscoveryRequest_version_info(const envoy_api_v2_DiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_core_Node* envoy_api_v2_DiscoveryRequest_node(const envoy_api_v2_DiscoveryRequest *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Node*, UPB_SIZE(24, 48)); } +UPB_INLINE upb_strview const* envoy_api_v2_DiscoveryRequest_resource_names(const envoy_api_v2_DiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } +UPB_INLINE upb_strview envoy_api_v2_DiscoveryRequest_type_url(const envoy_api_v2_DiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_DiscoveryRequest_response_nonce(const envoy_api_v2_DiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } +UPB_INLINE const struct google_rpc_Status* envoy_api_v2_DiscoveryRequest_error_detail(const envoy_api_v2_DiscoveryRequest *msg) { return UPB_FIELD_AT(msg, const struct google_rpc_Status*, UPB_SIZE(28, 56)); } + +UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_version_info(envoy_api_v2_DiscoveryRequest *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_node(envoy_api_v2_DiscoveryRequest *msg, struct envoy_api_v2_core_Node* value) { + UPB_FIELD_AT(msg, struct envoy_api_v2_core_Node*, UPB_SIZE(24, 48)) = value; +} +UPB_INLINE struct envoy_api_v2_core_Node* envoy_api_v2_DiscoveryRequest_mutable_node(envoy_api_v2_DiscoveryRequest *msg, upb_arena *arena) { + struct envoy_api_v2_core_Node* sub = (struct envoy_api_v2_core_Node*)envoy_api_v2_DiscoveryRequest_node(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_Node*)upb_msg_new(&envoy_api_v2_core_Node_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_DiscoveryRequest_set_node(msg, sub); + } + return sub; +} +UPB_INLINE upb_strview* envoy_api_v2_DiscoveryRequest_mutable_resource_names(envoy_api_v2_DiscoveryRequest *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); +} +UPB_INLINE upb_strview* envoy_api_v2_DiscoveryRequest_resize_resource_names(envoy_api_v2_DiscoveryRequest *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool envoy_api_v2_DiscoveryRequest_add_resource_names(envoy_api_v2_DiscoveryRequest *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(32, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} +UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_type_url(envoy_api_v2_DiscoveryRequest *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_response_nonce(envoy_api_v2_DiscoveryRequest *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; +} +UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_error_detail(envoy_api_v2_DiscoveryRequest *msg, struct google_rpc_Status* value) { + UPB_FIELD_AT(msg, struct google_rpc_Status*, UPB_SIZE(28, 56)) = value; +} +UPB_INLINE struct google_rpc_Status* envoy_api_v2_DiscoveryRequest_mutable_error_detail(envoy_api_v2_DiscoveryRequest *msg, upb_arena *arena) { + struct google_rpc_Status* sub = (struct google_rpc_Status*)envoy_api_v2_DiscoveryRequest_error_detail(msg); + if (sub == NULL) { + sub = (struct google_rpc_Status*)upb_msg_new(&google_rpc_Status_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_DiscoveryRequest_set_error_detail(msg, sub); + } + return sub; +} + + +/* envoy.api.v2.DiscoveryResponse */ + +UPB_INLINE envoy_api_v2_DiscoveryResponse *envoy_api_v2_DiscoveryResponse_new(upb_arena *arena) { + return (envoy_api_v2_DiscoveryResponse *)upb_msg_new(&envoy_api_v2_DiscoveryResponse_msginit, arena); +} +UPB_INLINE envoy_api_v2_DiscoveryResponse *envoy_api_v2_DiscoveryResponse_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_DiscoveryResponse *ret = envoy_api_v2_DiscoveryResponse_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_DiscoveryResponse_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_DiscoveryResponse_serialize(const envoy_api_v2_DiscoveryResponse *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_DiscoveryResponse_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_DiscoveryResponse_version_info(const envoy_api_v2_DiscoveryResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_Any* const* envoy_api_v2_DiscoveryResponse_resources(const envoy_api_v2_DiscoveryResponse *msg, size_t *len) { return (const struct google_protobuf_Any* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } +UPB_INLINE bool envoy_api_v2_DiscoveryResponse_canary(const envoy_api_v2_DiscoveryResponse *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_DiscoveryResponse_type_url(const envoy_api_v2_DiscoveryResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); } +UPB_INLINE upb_strview envoy_api_v2_DiscoveryResponse_nonce(const envoy_api_v2_DiscoveryResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)); } + +UPB_INLINE void envoy_api_v2_DiscoveryResponse_set_version_info(envoy_api_v2_DiscoveryResponse *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; +} +UPB_INLINE struct google_protobuf_Any** envoy_api_v2_DiscoveryResponse_mutable_resources(envoy_api_v2_DiscoveryResponse *msg, size_t *len) { + return (struct google_protobuf_Any**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); +} +UPB_INLINE struct google_protobuf_Any** envoy_api_v2_DiscoveryResponse_resize_resources(envoy_api_v2_DiscoveryResponse *msg, size_t len, upb_arena *arena) { + return (struct google_protobuf_Any**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct google_protobuf_Any* envoy_api_v2_DiscoveryResponse_add_resources(envoy_api_v2_DiscoveryResponse *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE void envoy_api_v2_DiscoveryResponse_set_canary(envoy_api_v2_DiscoveryResponse *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_DiscoveryResponse_set_type_url(envoy_api_v2_DiscoveryResponse *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value; +} +UPB_INLINE void envoy_api_v2_DiscoveryResponse_set_nonce(envoy_api_v2_DiscoveryResponse *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value; +} + + +/* envoy.api.v2.IncrementalDiscoveryRequest */ + +UPB_INLINE envoy_api_v2_IncrementalDiscoveryRequest *envoy_api_v2_IncrementalDiscoveryRequest_new(upb_arena *arena) { + return (envoy_api_v2_IncrementalDiscoveryRequest *)upb_msg_new(&envoy_api_v2_IncrementalDiscoveryRequest_msginit, arena); +} +UPB_INLINE envoy_api_v2_IncrementalDiscoveryRequest *envoy_api_v2_IncrementalDiscoveryRequest_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_IncrementalDiscoveryRequest *ret = envoy_api_v2_IncrementalDiscoveryRequest_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_IncrementalDiscoveryRequest_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_IncrementalDiscoveryRequest_serialize(const envoy_api_v2_IncrementalDiscoveryRequest *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_IncrementalDiscoveryRequest_msginit, arena, len); +} + +UPB_INLINE const struct envoy_api_v2_core_Node* envoy_api_v2_IncrementalDiscoveryRequest_node(const envoy_api_v2_IncrementalDiscoveryRequest *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Node*, UPB_SIZE(16, 32)); } +UPB_INLINE upb_strview envoy_api_v2_IncrementalDiscoveryRequest_type_url(const envoy_api_v2_IncrementalDiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview const* envoy_api_v2_IncrementalDiscoveryRequest_resource_names_subscribe(const envoy_api_v2_IncrementalDiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } +UPB_INLINE upb_strview const* envoy_api_v2_IncrementalDiscoveryRequest_resource_names_unsubscribe(const envoy_api_v2_IncrementalDiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } +UPB_INLINE const envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry* const* envoy_api_v2_IncrementalDiscoveryRequest_initial_resource_versions(const envoy_api_v2_IncrementalDiscoveryRequest *msg, size_t *len) { return (const envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } +UPB_INLINE upb_strview envoy_api_v2_IncrementalDiscoveryRequest_response_nonce(const envoy_api_v2_IncrementalDiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_rpc_Status* envoy_api_v2_IncrementalDiscoveryRequest_error_detail(const envoy_api_v2_IncrementalDiscoveryRequest *msg) { return UPB_FIELD_AT(msg, const struct google_rpc_Status*, UPB_SIZE(20, 40)); } + +UPB_INLINE void envoy_api_v2_IncrementalDiscoveryRequest_set_node(envoy_api_v2_IncrementalDiscoveryRequest *msg, struct envoy_api_v2_core_Node* value) { + UPB_FIELD_AT(msg, struct envoy_api_v2_core_Node*, UPB_SIZE(16, 32)) = value; +} +UPB_INLINE struct envoy_api_v2_core_Node* envoy_api_v2_IncrementalDiscoveryRequest_mutable_node(envoy_api_v2_IncrementalDiscoveryRequest *msg, upb_arena *arena) { + struct envoy_api_v2_core_Node* sub = (struct envoy_api_v2_core_Node*)envoy_api_v2_IncrementalDiscoveryRequest_node(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_Node*)upb_msg_new(&envoy_api_v2_core_Node_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_IncrementalDiscoveryRequest_set_node(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_IncrementalDiscoveryRequest_set_type_url(envoy_api_v2_IncrementalDiscoveryRequest *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE upb_strview* envoy_api_v2_IncrementalDiscoveryRequest_mutable_resource_names_subscribe(envoy_api_v2_IncrementalDiscoveryRequest *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); +} +UPB_INLINE upb_strview* envoy_api_v2_IncrementalDiscoveryRequest_resize_resource_names_subscribe(envoy_api_v2_IncrementalDiscoveryRequest *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool envoy_api_v2_IncrementalDiscoveryRequest_add_resource_names_subscribe(envoy_api_v2_IncrementalDiscoveryRequest *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} +UPB_INLINE upb_strview* envoy_api_v2_IncrementalDiscoveryRequest_mutable_resource_names_unsubscribe(envoy_api_v2_IncrementalDiscoveryRequest *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); +} +UPB_INLINE upb_strview* envoy_api_v2_IncrementalDiscoveryRequest_resize_resource_names_unsubscribe(envoy_api_v2_IncrementalDiscoveryRequest *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool envoy_api_v2_IncrementalDiscoveryRequest_add_resource_names_unsubscribe(envoy_api_v2_IncrementalDiscoveryRequest *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} +UPB_INLINE envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry** envoy_api_v2_IncrementalDiscoveryRequest_mutable_initial_resource_versions(envoy_api_v2_IncrementalDiscoveryRequest *msg, size_t *len) { + return (envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); +} +UPB_INLINE envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry** envoy_api_v2_IncrementalDiscoveryRequest_resize_initial_resource_versions(envoy_api_v2_IncrementalDiscoveryRequest *msg, size_t len, upb_arena *arena) { + return (envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry* envoy_api_v2_IncrementalDiscoveryRequest_add_initial_resource_versions(envoy_api_v2_IncrementalDiscoveryRequest *msg, upb_arena *arena) { + struct envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry* sub = (struct envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry*)upb_msg_new(&envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE void envoy_api_v2_IncrementalDiscoveryRequest_set_response_nonce(envoy_api_v2_IncrementalDiscoveryRequest *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE void envoy_api_v2_IncrementalDiscoveryRequest_set_error_detail(envoy_api_v2_IncrementalDiscoveryRequest *msg, struct google_rpc_Status* value) { + UPB_FIELD_AT(msg, struct google_rpc_Status*, UPB_SIZE(20, 40)) = value; +} +UPB_INLINE struct google_rpc_Status* envoy_api_v2_IncrementalDiscoveryRequest_mutable_error_detail(envoy_api_v2_IncrementalDiscoveryRequest *msg, upb_arena *arena) { + struct google_rpc_Status* sub = (struct google_rpc_Status*)envoy_api_v2_IncrementalDiscoveryRequest_error_detail(msg); + if (sub == NULL) { + sub = (struct google_rpc_Status*)upb_msg_new(&google_rpc_Status_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_IncrementalDiscoveryRequest_set_error_detail(msg, sub); + } + return sub; +} + + +/* envoy.api.v2.IncrementalDiscoveryRequest.InitialResourceVersionsEntry */ + +UPB_INLINE envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry *envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_new(upb_arena *arena) { + return (envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry *)upb_msg_new(&envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_msginit, arena); +} +UPB_INLINE envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry *envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry *ret = envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_serialize(const envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_key(const envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_value(const envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } + +UPB_INLINE void envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_set_key(envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_set_value(envoy_api_v2_IncrementalDiscoveryRequest_InitialResourceVersionsEntry *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; +} + + +/* envoy.api.v2.IncrementalDiscoveryResponse */ + +UPB_INLINE envoy_api_v2_IncrementalDiscoveryResponse *envoy_api_v2_IncrementalDiscoveryResponse_new(upb_arena *arena) { + return (envoy_api_v2_IncrementalDiscoveryResponse *)upb_msg_new(&envoy_api_v2_IncrementalDiscoveryResponse_msginit, arena); +} +UPB_INLINE envoy_api_v2_IncrementalDiscoveryResponse *envoy_api_v2_IncrementalDiscoveryResponse_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_IncrementalDiscoveryResponse *ret = envoy_api_v2_IncrementalDiscoveryResponse_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_IncrementalDiscoveryResponse_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_IncrementalDiscoveryResponse_serialize(const envoy_api_v2_IncrementalDiscoveryResponse *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_IncrementalDiscoveryResponse_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_IncrementalDiscoveryResponse_system_version_info(const envoy_api_v2_IncrementalDiscoveryResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_api_v2_Resource* const* envoy_api_v2_IncrementalDiscoveryResponse_resources(const envoy_api_v2_IncrementalDiscoveryResponse *msg, size_t *len) { return (const envoy_api_v2_Resource* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } +UPB_INLINE upb_strview envoy_api_v2_IncrementalDiscoveryResponse_nonce(const envoy_api_v2_IncrementalDiscoveryResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview const* envoy_api_v2_IncrementalDiscoveryResponse_removed_resources(const envoy_api_v2_IncrementalDiscoveryResponse *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } + +UPB_INLINE void envoy_api_v2_IncrementalDiscoveryResponse_set_system_version_info(envoy_api_v2_IncrementalDiscoveryResponse *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE envoy_api_v2_Resource** envoy_api_v2_IncrementalDiscoveryResponse_mutable_resources(envoy_api_v2_IncrementalDiscoveryResponse *msg, size_t *len) { + return (envoy_api_v2_Resource**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); +} +UPB_INLINE envoy_api_v2_Resource** envoy_api_v2_IncrementalDiscoveryResponse_resize_resources(envoy_api_v2_IncrementalDiscoveryResponse *msg, size_t len, upb_arena *arena) { + return (envoy_api_v2_Resource**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_api_v2_Resource* envoy_api_v2_IncrementalDiscoveryResponse_add_resources(envoy_api_v2_IncrementalDiscoveryResponse *msg, upb_arena *arena) { + struct envoy_api_v2_Resource* sub = (struct envoy_api_v2_Resource*)upb_msg_new(&envoy_api_v2_Resource_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE void envoy_api_v2_IncrementalDiscoveryResponse_set_nonce(envoy_api_v2_IncrementalDiscoveryResponse *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE upb_strview* envoy_api_v2_IncrementalDiscoveryResponse_mutable_removed_resources(envoy_api_v2_IncrementalDiscoveryResponse *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); +} +UPB_INLINE upb_strview* envoy_api_v2_IncrementalDiscoveryResponse_resize_removed_resources(envoy_api_v2_IncrementalDiscoveryResponse *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool envoy_api_v2_IncrementalDiscoveryResponse_add_removed_resources(envoy_api_v2_IncrementalDiscoveryResponse *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(20, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} + + +/* envoy.api.v2.Resource */ + +UPB_INLINE envoy_api_v2_Resource *envoy_api_v2_Resource_new(upb_arena *arena) { + return (envoy_api_v2_Resource *)upb_msg_new(&envoy_api_v2_Resource_msginit, arena); +} +UPB_INLINE envoy_api_v2_Resource *envoy_api_v2_Resource_parsenew(upb_strview buf, upb_arena *arena) { + envoy_api_v2_Resource *ret = envoy_api_v2_Resource_new(arena); + return (ret && upb_decode(buf, ret, &envoy_api_v2_Resource_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_Resource_serialize(const envoy_api_v2_Resource *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_Resource_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_Resource_version(const envoy_api_v2_Resource *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_Resource_resource(const envoy_api_v2_Resource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16)); } + +UPB_INLINE void envoy_api_v2_Resource_set_version(envoy_api_v2_Resource *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_Resource_set_resource(envoy_api_v2_Resource *msg, struct google_protobuf_Any* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct google_protobuf_Any* envoy_api_v2_Resource_mutable_resource(envoy_api_v2_Resource *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_Resource_resource(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_Resource_set_resource(msg, sub); + } + return sub; +} + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_DISCOVERY_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/percent.upb.c b/src/core/ext/upb-generated/envoy/type/percent.upb.c new file mode 100644 index 00000000000..0ef0ae176e2 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/percent.upb.c @@ -0,0 +1,39 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/percent.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/type/percent.upb.h" +#include "validate/validate.upb.h" +#include "gogoproto/gogo.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout_field envoy_type_Percent__fields[1] = { + {1, UPB_SIZE(0, 0), 0, 0, 1, 1}, +}; + +const upb_msglayout envoy_type_Percent_msginit = { + NULL, + &envoy_type_Percent__fields[0], + UPB_SIZE(8, 8), 1, false, +}; + +static const upb_msglayout_field envoy_type_FractionalPercent__fields[2] = { + {1, UPB_SIZE(8, 8), 0, 0, 13, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 14, 1}, +}; + +const upb_msglayout envoy_type_FractionalPercent_msginit = { + NULL, + &envoy_type_FractionalPercent__fields[0], + UPB_SIZE(16, 16), 2, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/type/percent.upb.h b/src/core/ext/upb-generated/envoy/type/percent.upb.h new file mode 100644 index 00000000000..6fa665a2de9 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/percent.upb.h @@ -0,0 +1,88 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/percent.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_PERCENT_PROTO_UPB_H_ +#define ENVOY_TYPE_PERCENT_PROTO_UPB_H_ + +#include "upb/generated_util.h" + +#include "upb/msg.h" + +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_type_Percent; +struct envoy_type_FractionalPercent; +typedef struct envoy_type_Percent envoy_type_Percent; +typedef struct envoy_type_FractionalPercent envoy_type_FractionalPercent; +extern const upb_msglayout envoy_type_Percent_msginit; +extern const upb_msglayout envoy_type_FractionalPercent_msginit; + +/* Enums */ + +typedef enum { + envoy_type_FractionalPercent_HUNDRED = 0, + envoy_type_FractionalPercent_TEN_THOUSAND = 1, + envoy_type_FractionalPercent_MILLION = 2 +} envoy_type_FractionalPercent_DenominatorType; + +/* envoy.type.Percent */ + +UPB_INLINE envoy_type_Percent *envoy_type_Percent_new(upb_arena *arena) { + return (envoy_type_Percent *)upb_msg_new(&envoy_type_Percent_msginit, arena); +} +UPB_INLINE envoy_type_Percent *envoy_type_Percent_parsenew(upb_strview buf, upb_arena *arena) { + envoy_type_Percent *ret = envoy_type_Percent_new(arena); + return (ret && upb_decode(buf, ret, &envoy_type_Percent_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_Percent_serialize(const envoy_type_Percent *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_Percent_msginit, arena, len); +} + +UPB_INLINE double envoy_type_Percent_value(const envoy_type_Percent *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_type_Percent_set_value(envoy_type_Percent *msg, double value) { + UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; +} + + +/* envoy.type.FractionalPercent */ + +UPB_INLINE envoy_type_FractionalPercent *envoy_type_FractionalPercent_new(upb_arena *arena) { + return (envoy_type_FractionalPercent *)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); +} +UPB_INLINE envoy_type_FractionalPercent *envoy_type_FractionalPercent_parsenew(upb_strview buf, upb_arena *arena) { + envoy_type_FractionalPercent *ret = envoy_type_FractionalPercent_new(arena); + return (ret && upb_decode(buf, ret, &envoy_type_FractionalPercent_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_FractionalPercent_serialize(const envoy_type_FractionalPercent *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_FractionalPercent_msginit, arena, len); +} + +UPB_INLINE uint32_t envoy_type_FractionalPercent_numerator(const envoy_type_FractionalPercent *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)); } +UPB_INLINE envoy_type_FractionalPercent_DenominatorType envoy_type_FractionalPercent_denominator(const envoy_type_FractionalPercent *msg) { return UPB_FIELD_AT(msg, envoy_type_FractionalPercent_DenominatorType, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_type_FractionalPercent_set_numerator(envoy_type_FractionalPercent *msg, uint32_t value) { + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void envoy_type_FractionalPercent_set_denominator(envoy_type_FractionalPercent *msg, envoy_type_FractionalPercent_DenominatorType value) { + UPB_FIELD_AT(msg, envoy_type_FractionalPercent_DenominatorType, UPB_SIZE(0, 0)) = value; +} + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_PERCENT_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/range.upb.c b/src/core/ext/upb-generated/envoy/type/range.upb.c new file mode 100644 index 00000000000..2e71b82611e --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/range.upb.c @@ -0,0 +1,39 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/range.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/type/range.upb.h" +#include "gogoproto/gogo.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout_field envoy_type_Int64Range__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 3, 1}, + {2, UPB_SIZE(8, 8), 0, 0, 3, 1}, +}; + +const upb_msglayout envoy_type_Int64Range_msginit = { + NULL, + &envoy_type_Int64Range__fields[0], + UPB_SIZE(16, 16), 2, false, +}; + +static const upb_msglayout_field envoy_type_DoubleRange__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 1, 1}, + {2, UPB_SIZE(8, 8), 0, 0, 1, 1}, +}; + +const upb_msglayout envoy_type_DoubleRange_msginit = { + NULL, + &envoy_type_DoubleRange__fields[0], + UPB_SIZE(16, 16), 2, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/type/range.upb.h b/src/core/ext/upb-generated/envoy/type/range.upb.h new file mode 100644 index 00000000000..c036ee66a95 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/range.upb.h @@ -0,0 +1,86 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/range.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_RANGE_PROTO_UPB_H_ +#define ENVOY_TYPE_RANGE_PROTO_UPB_H_ + +#include "upb/generated_util.h" + +#include "upb/msg.h" + +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_type_Int64Range; +struct envoy_type_DoubleRange; +typedef struct envoy_type_Int64Range envoy_type_Int64Range; +typedef struct envoy_type_DoubleRange envoy_type_DoubleRange; +extern const upb_msglayout envoy_type_Int64Range_msginit; +extern const upb_msglayout envoy_type_DoubleRange_msginit; + +/* Enums */ + +/* envoy.type.Int64Range */ + +UPB_INLINE envoy_type_Int64Range *envoy_type_Int64Range_new(upb_arena *arena) { + return (envoy_type_Int64Range *)upb_msg_new(&envoy_type_Int64Range_msginit, arena); +} +UPB_INLINE envoy_type_Int64Range *envoy_type_Int64Range_parsenew(upb_strview buf, upb_arena *arena) { + envoy_type_Int64Range *ret = envoy_type_Int64Range_new(arena); + return (ret && upb_decode(buf, ret, &envoy_type_Int64Range_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_Int64Range_serialize(const envoy_type_Int64Range *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_Int64Range_msginit, arena, len); +} + +UPB_INLINE int64_t envoy_type_Int64Range_start(const envoy_type_Int64Range *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } +UPB_INLINE int64_t envoy_type_Int64Range_end(const envoy_type_Int64Range *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); } + +UPB_INLINE void envoy_type_Int64Range_set_start(envoy_type_Int64Range *msg, int64_t value) { + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_type_Int64Range_set_end(envoy_type_Int64Range *msg, int64_t value) { + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; +} + + +/* envoy.type.DoubleRange */ + +UPB_INLINE envoy_type_DoubleRange *envoy_type_DoubleRange_new(upb_arena *arena) { + return (envoy_type_DoubleRange *)upb_msg_new(&envoy_type_DoubleRange_msginit, arena); +} +UPB_INLINE envoy_type_DoubleRange *envoy_type_DoubleRange_parsenew(upb_strview buf, upb_arena *arena) { + envoy_type_DoubleRange *ret = envoy_type_DoubleRange_new(arena); + return (ret && upb_decode(buf, ret, &envoy_type_DoubleRange_msginit)) ? ret : NULL; +} +UPB_INLINE char *envoy_type_DoubleRange_serialize(const envoy_type_DoubleRange *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_type_DoubleRange_msginit, arena, len); +} + +UPB_INLINE double envoy_type_DoubleRange_start(const envoy_type_DoubleRange *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } +UPB_INLINE double envoy_type_DoubleRange_end(const envoy_type_DoubleRange *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)); } + +UPB_INLINE void envoy_type_DoubleRange_set_start(envoy_type_DoubleRange *msg, double value) { + UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_type_DoubleRange_set_end(envoy_type_DoubleRange *msg, double value) { + UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)) = value; +} + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_RANGE_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/gogoproto/gogo.upb.c b/src/core/ext/upb-generated/gogoproto/gogo.upb.c new file mode 100644 index 00000000000..7517fdcbbe8 --- /dev/null +++ b/src/core/ext/upb-generated/gogoproto/gogo.upb.c @@ -0,0 +1,17 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * gogoproto/gogo.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "gogoproto/gogo.upb.h" +#include "google/protobuf/descriptor.upb.h" + +#include "upb/port_def.inc" + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/gogoproto/gogo.upb.h b/src/core/ext/upb-generated/gogoproto/gogo.upb.h new file mode 100644 index 00000000000..313d6fa644e --- /dev/null +++ b/src/core/ext/upb-generated/gogoproto/gogo.upb.h @@ -0,0 +1,32 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * gogoproto/gogo.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOGOPROTO_GOGO_PROTO_UPB_H_ +#define GOGOPROTO_GOGO_PROTO_UPB_H_ + +#include "upb/generated_util.h" + +#include "upb/msg.h" + +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + + +/* Enums */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOGOPROTO_GOGO_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/google/api/annotations.upb.c b/src/core/ext/upb-generated/google/api/annotations.upb.c new file mode 100644 index 00000000000..a1385cc3e70 --- /dev/null +++ b/src/core/ext/upb-generated/google/api/annotations.upb.c @@ -0,0 +1,18 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/api/annotations.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "google/api/annotations.upb.h" +#include "google/api/http.upb.h" +#include "google/protobuf/descriptor.upb.h" + +#include "upb/port_def.inc" + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/google/api/annotations.upb.h b/src/core/ext/upb-generated/google/api/annotations.upb.h new file mode 100644 index 00000000000..93d7868ff34 --- /dev/null +++ b/src/core/ext/upb-generated/google/api/annotations.upb.h @@ -0,0 +1,32 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/api/annotations.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_API_ANNOTATIONS_PROTO_UPB_H_ +#define GOOGLE_API_ANNOTATIONS_PROTO_UPB_H_ + +#include "upb/generated_util.h" + +#include "upb/msg.h" + +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + + +/* Enums */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_API_ANNOTATIONS_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/google/api/http.upb.c b/src/core/ext/upb-generated/google/api/http.upb.c new file mode 100644 index 00000000000..8ad07dcd9fd --- /dev/null +++ b/src/core/ext/upb-generated/google/api/http.upb.c @@ -0,0 +1,66 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/api/http.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "google/api/http.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const google_api_Http_submsgs[1] = { + &google_api_HttpRule_msginit, +}; + +static const upb_msglayout_field google_api_Http__fields[2] = { + {1, UPB_SIZE(4, 8), 0, 0, 11, 3}, + {2, UPB_SIZE(0, 0), 0, 0, 8, 1}, +}; + +const upb_msglayout google_api_Http_msginit = { + &google_api_Http_submsgs[0], + &google_api_Http__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + +static const upb_msglayout *const google_api_HttpRule_submsgs[2] = { + &google_api_CustomHttpPattern_msginit, + &google_api_HttpRule_msginit, +}; + +static const upb_msglayout_field google_api_HttpRule__fields[10] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, + {3, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, + {4, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, + {5, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, + {6, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, + {7, UPB_SIZE(8, 16), 0, 0, 9, 1}, + {8, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 11, 1}, + {11, UPB_SIZE(24, 48), 0, 1, 11, 3}, + {12, UPB_SIZE(16, 32), 0, 0, 9, 1}, +}; + +const upb_msglayout google_api_HttpRule_msginit = { + &google_api_HttpRule_submsgs[0], + &google_api_HttpRule__fields[0], + UPB_SIZE(40, 80), 10, false, +}; + +static const upb_msglayout_field google_api_CustomHttpPattern__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, +}; + +const upb_msglayout google_api_CustomHttpPattern_msginit = { + NULL, + &google_api_CustomHttpPattern__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/google/api/http.upb.h b/src/core/ext/upb-generated/google/api/http.upb.h new file mode 100644 index 00000000000..6fec36802d3 --- /dev/null +++ b/src/core/ext/upb-generated/google/api/http.upb.h @@ -0,0 +1,191 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/api/http.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_API_HTTP_PROTO_UPB_H_ +#define GOOGLE_API_HTTP_PROTO_UPB_H_ + +#include "upb/generated_util.h" + +#include "upb/msg.h" + +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +struct google_api_Http; +struct google_api_HttpRule; +struct google_api_CustomHttpPattern; +typedef struct google_api_Http google_api_Http; +typedef struct google_api_HttpRule google_api_HttpRule; +typedef struct google_api_CustomHttpPattern google_api_CustomHttpPattern; +extern const upb_msglayout google_api_Http_msginit; +extern const upb_msglayout google_api_HttpRule_msginit; +extern const upb_msglayout google_api_CustomHttpPattern_msginit; + +/* Enums */ + +/* google.api.Http */ + +UPB_INLINE google_api_Http *google_api_Http_new(upb_arena *arena) { + return (google_api_Http *)upb_msg_new(&google_api_Http_msginit, arena); +} +UPB_INLINE google_api_Http *google_api_Http_parsenew(upb_strview buf, upb_arena *arena) { + google_api_Http *ret = google_api_Http_new(arena); + return (ret && upb_decode(buf, ret, &google_api_Http_msginit)) ? ret : NULL; +} +UPB_INLINE char *google_api_Http_serialize(const google_api_Http *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &google_api_Http_msginit, arena, len); +} + +UPB_INLINE const google_api_HttpRule* const* google_api_Http_rules(const google_api_Http *msg, size_t *len) { return (const google_api_HttpRule* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } +UPB_INLINE bool google_api_Http_fully_decode_reserved_expansion(const google_api_Http *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } + +UPB_INLINE google_api_HttpRule** google_api_Http_mutable_rules(google_api_Http *msg, size_t *len) { + return (google_api_HttpRule**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); +} +UPB_INLINE google_api_HttpRule** google_api_Http_resize_rules(google_api_Http *msg, size_t len, upb_arena *arena) { + return (google_api_HttpRule**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct google_api_HttpRule* google_api_Http_add_rules(google_api_Http *msg, upb_arena *arena) { + struct google_api_HttpRule* sub = (struct google_api_HttpRule*)upb_msg_new(&google_api_HttpRule_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE void google_api_Http_set_fully_decode_reserved_expansion(google_api_Http *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; +} + + +/* google.api.HttpRule */ + +UPB_INLINE google_api_HttpRule *google_api_HttpRule_new(upb_arena *arena) { + return (google_api_HttpRule *)upb_msg_new(&google_api_HttpRule_msginit, arena); +} +UPB_INLINE google_api_HttpRule *google_api_HttpRule_parsenew(upb_strview buf, upb_arena *arena) { + google_api_HttpRule *ret = google_api_HttpRule_new(arena); + return (ret && upb_decode(buf, ret, &google_api_HttpRule_msginit)) ? ret : NULL; +} +UPB_INLINE char *google_api_HttpRule_serialize(const google_api_HttpRule *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &google_api_HttpRule_msginit, arena, len); +} + +typedef enum { + google_api_HttpRule_pattern_get = 2, + google_api_HttpRule_pattern_put = 3, + google_api_HttpRule_pattern_post = 4, + google_api_HttpRule_pattern_delete = 5, + google_api_HttpRule_pattern_patch = 6, + google_api_HttpRule_pattern_custom = 8, + google_api_HttpRule_pattern_NOT_SET = 0, +} google_api_HttpRule_pattern_oneofcases; +UPB_INLINE google_api_HttpRule_pattern_oneofcases google_api_HttpRule_pattern_case(const google_api_HttpRule* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(36, 72)); } + +UPB_INLINE upb_strview google_api_HttpRule_selector(const google_api_HttpRule *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool google_api_HttpRule_has_get(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 2); } +UPB_INLINE upb_strview google_api_HttpRule_get(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 2, upb_strview_make("", strlen(""))); } +UPB_INLINE bool google_api_HttpRule_has_put(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 3); } +UPB_INLINE upb_strview google_api_HttpRule_put(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 3, upb_strview_make("", strlen(""))); } +UPB_INLINE bool google_api_HttpRule_has_post(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 4); } +UPB_INLINE upb_strview google_api_HttpRule_post(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 4, upb_strview_make("", strlen(""))); } +UPB_INLINE bool google_api_HttpRule_has_delete(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 5); } +UPB_INLINE upb_strview google_api_HttpRule_delete(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 5, upb_strview_make("", strlen(""))); } +UPB_INLINE bool google_api_HttpRule_has_patch(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 6); } +UPB_INLINE upb_strview google_api_HttpRule_patch(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 6, upb_strview_make("", strlen(""))); } +UPB_INLINE upb_strview google_api_HttpRule_body(const google_api_HttpRule *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE bool google_api_HttpRule_has_custom(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 8); } +UPB_INLINE const google_api_CustomHttpPattern* google_api_HttpRule_custom(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, const google_api_CustomHttpPattern*, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 8, NULL); } +UPB_INLINE const google_api_HttpRule* const* google_api_HttpRule_additional_bindings(const google_api_HttpRule *msg, size_t *len) { return (const google_api_HttpRule* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } +UPB_INLINE upb_strview google_api_HttpRule_response_body(const google_api_HttpRule *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } + +UPB_INLINE void google_api_HttpRule_set_selector(google_api_HttpRule *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void google_api_HttpRule_set_get(google_api_HttpRule *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 2); +} +UPB_INLINE void google_api_HttpRule_set_put(google_api_HttpRule *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 3); +} +UPB_INLINE void google_api_HttpRule_set_post(google_api_HttpRule *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 4); +} +UPB_INLINE void google_api_HttpRule_set_delete(google_api_HttpRule *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 5); +} +UPB_INLINE void google_api_HttpRule_set_patch(google_api_HttpRule *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 6); +} +UPB_INLINE void google_api_HttpRule_set_body(google_api_HttpRule *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE void google_api_HttpRule_set_custom(google_api_HttpRule *msg, google_api_CustomHttpPattern* value) { + UPB_WRITE_ONEOF(msg, google_api_CustomHttpPattern*, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 8); +} +UPB_INLINE struct google_api_CustomHttpPattern* google_api_HttpRule_mutable_custom(google_api_HttpRule *msg, upb_arena *arena) { + struct google_api_CustomHttpPattern* sub = (struct google_api_CustomHttpPattern*)google_api_HttpRule_custom(msg); + if (sub == NULL) { + sub = (struct google_api_CustomHttpPattern*)upb_msg_new(&google_api_CustomHttpPattern_msginit, arena); + if (!sub) return NULL; + google_api_HttpRule_set_custom(msg, sub); + } + return sub; +} +UPB_INLINE google_api_HttpRule** google_api_HttpRule_mutable_additional_bindings(google_api_HttpRule *msg, size_t *len) { + return (google_api_HttpRule**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); +} +UPB_INLINE google_api_HttpRule** google_api_HttpRule_resize_additional_bindings(google_api_HttpRule *msg, size_t len, upb_arena *arena) { + return (google_api_HttpRule**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct google_api_HttpRule* google_api_HttpRule_add_additional_bindings(google_api_HttpRule *msg, upb_arena *arena) { + struct google_api_HttpRule* sub = (struct google_api_HttpRule*)upb_msg_new(&google_api_HttpRule_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE void google_api_HttpRule_set_response_body(google_api_HttpRule *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; +} + + +/* google.api.CustomHttpPattern */ + +UPB_INLINE google_api_CustomHttpPattern *google_api_CustomHttpPattern_new(upb_arena *arena) { + return (google_api_CustomHttpPattern *)upb_msg_new(&google_api_CustomHttpPattern_msginit, arena); +} +UPB_INLINE google_api_CustomHttpPattern *google_api_CustomHttpPattern_parsenew(upb_strview buf, upb_arena *arena) { + google_api_CustomHttpPattern *ret = google_api_CustomHttpPattern_new(arena); + return (ret && upb_decode(buf, ret, &google_api_CustomHttpPattern_msginit)) ? ret : NULL; +} +UPB_INLINE char *google_api_CustomHttpPattern_serialize(const google_api_CustomHttpPattern *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &google_api_CustomHttpPattern_msginit, arena, len); +} + +UPB_INLINE upb_strview google_api_CustomHttpPattern_kind(const google_api_CustomHttpPattern *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview google_api_CustomHttpPattern_path(const google_api_CustomHttpPattern *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } + +UPB_INLINE void google_api_CustomHttpPattern_set_kind(google_api_CustomHttpPattern *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void google_api_CustomHttpPattern_set_path(google_api_CustomHttpPattern *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; +} + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_API_HTTP_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/google/rpc/status.upb.c b/src/core/ext/upb-generated/google/rpc/status.upb.c new file mode 100644 index 00000000000..25ac1461741 --- /dev/null +++ b/src/core/ext/upb-generated/google/rpc/status.upb.c @@ -0,0 +1,33 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/rpc/status.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "google/rpc/status.upb.h" +#include "google/protobuf/any.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const google_rpc_Status_submsgs[1] = { + &google_protobuf_Any_msginit, +}; + +static const upb_msglayout_field google_rpc_Status__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 5, 1}, + {2, UPB_SIZE(4, 8), 0, 0, 9, 1}, + {3, UPB_SIZE(12, 24), 0, 0, 11, 3}, +}; + +const upb_msglayout google_rpc_Status_msginit = { + &google_rpc_Status_submsgs[0], + &google_rpc_Status__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/google/rpc/status.upb.h b/src/core/ext/upb-generated/google/rpc/status.upb.h new file mode 100644 index 00000000000..23f72447e4d --- /dev/null +++ b/src/core/ext/upb-generated/google/rpc/status.upb.h @@ -0,0 +1,75 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/rpc/status.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_RPC_STATUS_PROTO_UPB_H_ +#define GOOGLE_RPC_STATUS_PROTO_UPB_H_ + +#include "upb/generated_util.h" + +#include "upb/msg.h" + +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +struct google_rpc_Status; +typedef struct google_rpc_Status google_rpc_Status; +extern const upb_msglayout google_rpc_Status_msginit; +struct google_protobuf_Any; +extern const upb_msglayout google_protobuf_Any_msginit; + +/* Enums */ + +/* google.rpc.Status */ + +UPB_INLINE google_rpc_Status *google_rpc_Status_new(upb_arena *arena) { + return (google_rpc_Status *)upb_msg_new(&google_rpc_Status_msginit, arena); +} +UPB_INLINE google_rpc_Status *google_rpc_Status_parsenew(upb_strview buf, upb_arena *arena) { + google_rpc_Status *ret = google_rpc_Status_new(arena); + return (ret && upb_decode(buf, ret, &google_rpc_Status_msginit)) ? ret : NULL; +} +UPB_INLINE char *google_rpc_Status_serialize(const google_rpc_Status *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &google_rpc_Status_msginit, arena, len); +} + +UPB_INLINE int32_t google_rpc_Status_code(const google_rpc_Status *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview google_rpc_Status_message(const google_rpc_Status *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_Any* const* google_rpc_Status_details(const google_rpc_Status *msg, size_t *len) { return (const struct google_protobuf_Any* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } + +UPB_INLINE void google_rpc_Status_set_code(google_rpc_Status *msg, int32_t value) { + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void google_rpc_Status_set_message(google_rpc_Status *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; +} +UPB_INLINE struct google_protobuf_Any** google_rpc_Status_mutable_details(google_rpc_Status *msg, size_t *len) { + return (struct google_protobuf_Any**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); +} +UPB_INLINE struct google_protobuf_Any** google_rpc_Status_resize_details(google_rpc_Status *msg, size_t len, upb_arena *arena) { + return (struct google_protobuf_Any**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct google_protobuf_Any* google_rpc_Status_add_details(google_rpc_Status *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_RPC_STATUS_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/validate/validate.upb.c b/src/core/ext/upb-generated/validate/validate.upb.c new file mode 100644 index 00000000000..6d3c6be1461 --- /dev/null +++ b/src/core/ext/upb-generated/validate/validate.upb.c @@ -0,0 +1,443 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * validate/validate.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "validate/validate.upb.h" +#include "google/protobuf/descriptor.upb.h" +#include "google/protobuf/duration.upb.h" +#include "google/protobuf/timestamp.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const validate_FieldRules_submsgs[22] = { + &validate_AnyRules_msginit, + &validate_BoolRules_msginit, + &validate_BytesRules_msginit, + &validate_DoubleRules_msginit, + &validate_DurationRules_msginit, + &validate_EnumRules_msginit, + &validate_Fixed32Rules_msginit, + &validate_Fixed64Rules_msginit, + &validate_FloatRules_msginit, + &validate_Int32Rules_msginit, + &validate_Int64Rules_msginit, + &validate_MapRules_msginit, + &validate_MessageRules_msginit, + &validate_RepeatedRules_msginit, + &validate_SFixed32Rules_msginit, + &validate_SFixed64Rules_msginit, + &validate_SInt32Rules_msginit, + &validate_SInt64Rules_msginit, + &validate_StringRules_msginit, + &validate_TimestampRules_msginit, + &validate_UInt32Rules_msginit, + &validate_UInt64Rules_msginit, +}; + +static const upb_msglayout_field validate_FieldRules__fields[22] = { + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 8, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 9, 11, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 10, 11, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 20, 11, 1}, + {6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 21, 11, 1}, + {7, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 16, 11, 1}, + {8, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 17, 11, 1}, + {9, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 6, 11, 1}, + {10, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 7, 11, 1}, + {11, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 14, 11, 1}, + {12, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 15, 11, 1}, + {13, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {14, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 18, 11, 1}, + {15, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, + {16, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1}, + {17, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 12, 11, 1}, + {18, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 13, 11, 1}, + {19, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 11, 11, 1}, + {20, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {21, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1}, + {22, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 19, 11, 1}, +}; + +const upb_msglayout validate_FieldRules_msginit = { + &validate_FieldRules_submsgs[0], + &validate_FieldRules__fields[0], + UPB_SIZE(8, 16), 22, false, +}; + +static const upb_msglayout_field validate_FloatRules__fields[7] = { + {1, UPB_SIZE(4, 4), 1, 0, 2, 1}, + {2, UPB_SIZE(8, 8), 2, 0, 2, 1}, + {3, UPB_SIZE(12, 12), 3, 0, 2, 1}, + {4, UPB_SIZE(16, 16), 4, 0, 2, 1}, + {5, UPB_SIZE(20, 20), 5, 0, 2, 1}, + {6, UPB_SIZE(24, 24), 0, 0, 2, 3}, + {7, UPB_SIZE(28, 32), 0, 0, 2, 3}, +}; + +const upb_msglayout validate_FloatRules_msginit = { + NULL, + &validate_FloatRules__fields[0], + UPB_SIZE(32, 40), 7, false, +}; + +static const upb_msglayout_field validate_DoubleRules__fields[7] = { + {1, UPB_SIZE(8, 8), 1, 0, 1, 1}, + {2, UPB_SIZE(16, 16), 2, 0, 1, 1}, + {3, UPB_SIZE(24, 24), 3, 0, 1, 1}, + {4, UPB_SIZE(32, 32), 4, 0, 1, 1}, + {5, UPB_SIZE(40, 40), 5, 0, 1, 1}, + {6, UPB_SIZE(48, 48), 0, 0, 1, 3}, + {7, UPB_SIZE(52, 56), 0, 0, 1, 3}, +}; + +const upb_msglayout validate_DoubleRules_msginit = { + NULL, + &validate_DoubleRules__fields[0], + UPB_SIZE(56, 64), 7, false, +}; + +static const upb_msglayout_field validate_Int32Rules__fields[7] = { + {1, UPB_SIZE(4, 4), 1, 0, 5, 1}, + {2, UPB_SIZE(8, 8), 2, 0, 5, 1}, + {3, UPB_SIZE(12, 12), 3, 0, 5, 1}, + {4, UPB_SIZE(16, 16), 4, 0, 5, 1}, + {5, UPB_SIZE(20, 20), 5, 0, 5, 1}, + {6, UPB_SIZE(24, 24), 0, 0, 5, 3}, + {7, UPB_SIZE(28, 32), 0, 0, 5, 3}, +}; + +const upb_msglayout validate_Int32Rules_msginit = { + NULL, + &validate_Int32Rules__fields[0], + UPB_SIZE(32, 40), 7, false, +}; + +static const upb_msglayout_field validate_Int64Rules__fields[7] = { + {1, UPB_SIZE(8, 8), 1, 0, 3, 1}, + {2, UPB_SIZE(16, 16), 2, 0, 3, 1}, + {3, UPB_SIZE(24, 24), 3, 0, 3, 1}, + {4, UPB_SIZE(32, 32), 4, 0, 3, 1}, + {5, UPB_SIZE(40, 40), 5, 0, 3, 1}, + {6, UPB_SIZE(48, 48), 0, 0, 3, 3}, + {7, UPB_SIZE(52, 56), 0, 0, 3, 3}, +}; + +const upb_msglayout validate_Int64Rules_msginit = { + NULL, + &validate_Int64Rules__fields[0], + UPB_SIZE(56, 64), 7, false, +}; + +static const upb_msglayout_field validate_UInt32Rules__fields[7] = { + {1, UPB_SIZE(4, 4), 1, 0, 13, 1}, + {2, UPB_SIZE(8, 8), 2, 0, 13, 1}, + {3, UPB_SIZE(12, 12), 3, 0, 13, 1}, + {4, UPB_SIZE(16, 16), 4, 0, 13, 1}, + {5, UPB_SIZE(20, 20), 5, 0, 13, 1}, + {6, UPB_SIZE(24, 24), 0, 0, 13, 3}, + {7, UPB_SIZE(28, 32), 0, 0, 13, 3}, +}; + +const upb_msglayout validate_UInt32Rules_msginit = { + NULL, + &validate_UInt32Rules__fields[0], + UPB_SIZE(32, 40), 7, false, +}; + +static const upb_msglayout_field validate_UInt64Rules__fields[7] = { + {1, UPB_SIZE(8, 8), 1, 0, 4, 1}, + {2, UPB_SIZE(16, 16), 2, 0, 4, 1}, + {3, UPB_SIZE(24, 24), 3, 0, 4, 1}, + {4, UPB_SIZE(32, 32), 4, 0, 4, 1}, + {5, UPB_SIZE(40, 40), 5, 0, 4, 1}, + {6, UPB_SIZE(48, 48), 0, 0, 4, 3}, + {7, UPB_SIZE(52, 56), 0, 0, 4, 3}, +}; + +const upb_msglayout validate_UInt64Rules_msginit = { + NULL, + &validate_UInt64Rules__fields[0], + UPB_SIZE(56, 64), 7, false, +}; + +static const upb_msglayout_field validate_SInt32Rules__fields[7] = { + {1, UPB_SIZE(4, 4), 1, 0, 17, 1}, + {2, UPB_SIZE(8, 8), 2, 0, 17, 1}, + {3, UPB_SIZE(12, 12), 3, 0, 17, 1}, + {4, UPB_SIZE(16, 16), 4, 0, 17, 1}, + {5, UPB_SIZE(20, 20), 5, 0, 17, 1}, + {6, UPB_SIZE(24, 24), 0, 0, 17, 3}, + {7, UPB_SIZE(28, 32), 0, 0, 17, 3}, +}; + +const upb_msglayout validate_SInt32Rules_msginit = { + NULL, + &validate_SInt32Rules__fields[0], + UPB_SIZE(32, 40), 7, false, +}; + +static const upb_msglayout_field validate_SInt64Rules__fields[7] = { + {1, UPB_SIZE(8, 8), 1, 0, 18, 1}, + {2, UPB_SIZE(16, 16), 2, 0, 18, 1}, + {3, UPB_SIZE(24, 24), 3, 0, 18, 1}, + {4, UPB_SIZE(32, 32), 4, 0, 18, 1}, + {5, UPB_SIZE(40, 40), 5, 0, 18, 1}, + {6, UPB_SIZE(48, 48), 0, 0, 18, 3}, + {7, UPB_SIZE(52, 56), 0, 0, 18, 3}, +}; + +const upb_msglayout validate_SInt64Rules_msginit = { + NULL, + &validate_SInt64Rules__fields[0], + UPB_SIZE(56, 64), 7, false, +}; + +static const upb_msglayout_field validate_Fixed32Rules__fields[7] = { + {1, UPB_SIZE(4, 4), 1, 0, 7, 1}, + {2, UPB_SIZE(8, 8), 2, 0, 7, 1}, + {3, UPB_SIZE(12, 12), 3, 0, 7, 1}, + {4, UPB_SIZE(16, 16), 4, 0, 7, 1}, + {5, UPB_SIZE(20, 20), 5, 0, 7, 1}, + {6, UPB_SIZE(24, 24), 0, 0, 7, 3}, + {7, UPB_SIZE(28, 32), 0, 0, 7, 3}, +}; + +const upb_msglayout validate_Fixed32Rules_msginit = { + NULL, + &validate_Fixed32Rules__fields[0], + UPB_SIZE(32, 40), 7, false, +}; + +static const upb_msglayout_field validate_Fixed64Rules__fields[7] = { + {1, UPB_SIZE(8, 8), 1, 0, 6, 1}, + {2, UPB_SIZE(16, 16), 2, 0, 6, 1}, + {3, UPB_SIZE(24, 24), 3, 0, 6, 1}, + {4, UPB_SIZE(32, 32), 4, 0, 6, 1}, + {5, UPB_SIZE(40, 40), 5, 0, 6, 1}, + {6, UPB_SIZE(48, 48), 0, 0, 6, 3}, + {7, UPB_SIZE(52, 56), 0, 0, 6, 3}, +}; + +const upb_msglayout validate_Fixed64Rules_msginit = { + NULL, + &validate_Fixed64Rules__fields[0], + UPB_SIZE(56, 64), 7, false, +}; + +static const upb_msglayout_field validate_SFixed32Rules__fields[7] = { + {1, UPB_SIZE(4, 4), 1, 0, 15, 1}, + {2, UPB_SIZE(8, 8), 2, 0, 15, 1}, + {3, UPB_SIZE(12, 12), 3, 0, 15, 1}, + {4, UPB_SIZE(16, 16), 4, 0, 15, 1}, + {5, UPB_SIZE(20, 20), 5, 0, 15, 1}, + {6, UPB_SIZE(24, 24), 0, 0, 15, 3}, + {7, UPB_SIZE(28, 32), 0, 0, 15, 3}, +}; + +const upb_msglayout validate_SFixed32Rules_msginit = { + NULL, + &validate_SFixed32Rules__fields[0], + UPB_SIZE(32, 40), 7, false, +}; + +static const upb_msglayout_field validate_SFixed64Rules__fields[7] = { + {1, UPB_SIZE(8, 8), 1, 0, 16, 1}, + {2, UPB_SIZE(16, 16), 2, 0, 16, 1}, + {3, UPB_SIZE(24, 24), 3, 0, 16, 1}, + {4, UPB_SIZE(32, 32), 4, 0, 16, 1}, + {5, UPB_SIZE(40, 40), 5, 0, 16, 1}, + {6, UPB_SIZE(48, 48), 0, 0, 16, 3}, + {7, UPB_SIZE(52, 56), 0, 0, 16, 3}, +}; + +const upb_msglayout validate_SFixed64Rules_msginit = { + NULL, + &validate_SFixed64Rules__fields[0], + UPB_SIZE(56, 64), 7, false, +}; + +static const upb_msglayout_field validate_BoolRules__fields[1] = { + {1, UPB_SIZE(1, 1), 1, 0, 8, 1}, +}; + +const upb_msglayout validate_BoolRules_msginit = { + NULL, + &validate_BoolRules__fields[0], + UPB_SIZE(2, 2), 1, false, +}; + +static const upb_msglayout_field validate_StringRules__fields[20] = { + {1, UPB_SIZE(56, 56), 7, 0, 9, 1}, + {2, UPB_SIZE(8, 8), 1, 0, 4, 1}, + {3, UPB_SIZE(16, 16), 2, 0, 4, 1}, + {4, UPB_SIZE(24, 24), 3, 0, 4, 1}, + {5, UPB_SIZE(32, 32), 4, 0, 4, 1}, + {6, UPB_SIZE(64, 72), 8, 0, 9, 1}, + {7, UPB_SIZE(72, 88), 9, 0, 9, 1}, + {8, UPB_SIZE(80, 104), 10, 0, 9, 1}, + {9, UPB_SIZE(88, 120), 11, 0, 9, 1}, + {10, UPB_SIZE(96, 136), 0, 0, 9, 3}, + {11, UPB_SIZE(100, 144), 0, 0, 9, 3}, + {12, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, + {13, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, + {14, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, + {15, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, + {16, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, + {17, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, + {18, UPB_SIZE(104, 152), UPB_SIZE(-109, -157), 0, 8, 1}, + {19, UPB_SIZE(40, 40), 5, 0, 4, 1}, + {20, UPB_SIZE(48, 48), 6, 0, 4, 1}, +}; + +const upb_msglayout validate_StringRules_msginit = { + NULL, + &validate_StringRules__fields[0], + UPB_SIZE(112, 160), 20, false, +}; + +static const upb_msglayout_field validate_BytesRules__fields[13] = { + {1, UPB_SIZE(32, 32), 4, 0, 12, 1}, + {2, UPB_SIZE(8, 8), 1, 0, 4, 1}, + {3, UPB_SIZE(16, 16), 2, 0, 4, 1}, + {4, UPB_SIZE(40, 48), 5, 0, 9, 1}, + {5, UPB_SIZE(48, 64), 6, 0, 12, 1}, + {6, UPB_SIZE(56, 80), 7, 0, 12, 1}, + {7, UPB_SIZE(64, 96), 8, 0, 12, 1}, + {8, UPB_SIZE(72, 112), 0, 0, 12, 3}, + {9, UPB_SIZE(76, 120), 0, 0, 12, 3}, + {10, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1}, + {11, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1}, + {12, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1}, + {13, UPB_SIZE(24, 24), 3, 0, 4, 1}, +}; + +const upb_msglayout validate_BytesRules_msginit = { + NULL, + &validate_BytesRules__fields[0], + UPB_SIZE(88, 144), 13, false, +}; + +static const upb_msglayout_field validate_EnumRules__fields[4] = { + {1, UPB_SIZE(4, 4), 1, 0, 5, 1}, + {2, UPB_SIZE(8, 8), 2, 0, 8, 1}, + {3, UPB_SIZE(12, 16), 0, 0, 5, 3}, + {4, UPB_SIZE(16, 24), 0, 0, 5, 3}, +}; + +const upb_msglayout validate_EnumRules_msginit = { + NULL, + &validate_EnumRules__fields[0], + UPB_SIZE(20, 32), 4, false, +}; + +static const upb_msglayout_field validate_MessageRules__fields[2] = { + {1, UPB_SIZE(1, 1), 1, 0, 8, 1}, + {2, UPB_SIZE(2, 2), 2, 0, 8, 1}, +}; + +const upb_msglayout validate_MessageRules_msginit = { + NULL, + &validate_MessageRules__fields[0], + UPB_SIZE(3, 3), 2, false, +}; + +static const upb_msglayout *const validate_RepeatedRules_submsgs[1] = { + &validate_FieldRules_msginit, +}; + +static const upb_msglayout_field validate_RepeatedRules__fields[4] = { + {1, UPB_SIZE(8, 8), 1, 0, 4, 1}, + {2, UPB_SIZE(16, 16), 2, 0, 4, 1}, + {3, UPB_SIZE(24, 24), 3, 0, 8, 1}, + {4, UPB_SIZE(28, 32), 4, 0, 11, 1}, +}; + +const upb_msglayout validate_RepeatedRules_msginit = { + &validate_RepeatedRules_submsgs[0], + &validate_RepeatedRules__fields[0], + UPB_SIZE(32, 40), 4, false, +}; + +static const upb_msglayout *const validate_MapRules_submsgs[2] = { + &validate_FieldRules_msginit, +}; + +static const upb_msglayout_field validate_MapRules__fields[5] = { + {1, UPB_SIZE(8, 8), 1, 0, 4, 1}, + {2, UPB_SIZE(16, 16), 2, 0, 4, 1}, + {3, UPB_SIZE(24, 24), 3, 0, 8, 1}, + {4, UPB_SIZE(28, 32), 4, 0, 11, 1}, + {5, UPB_SIZE(32, 40), 5, 0, 11, 1}, +}; + +const upb_msglayout validate_MapRules_msginit = { + &validate_MapRules_submsgs[0], + &validate_MapRules__fields[0], + UPB_SIZE(40, 48), 5, false, +}; + +static const upb_msglayout_field validate_AnyRules__fields[3] = { + {1, UPB_SIZE(1, 1), 1, 0, 8, 1}, + {2, UPB_SIZE(4, 8), 0, 0, 9, 3}, + {3, UPB_SIZE(8, 16), 0, 0, 9, 3}, +}; + +const upb_msglayout validate_AnyRules_msginit = { + NULL, + &validate_AnyRules__fields[0], + UPB_SIZE(12, 24), 3, false, +}; + +static const upb_msglayout *const validate_DurationRules_submsgs[7] = { + &google_protobuf_Duration_msginit, +}; + +static const upb_msglayout_field validate_DurationRules__fields[8] = { + {1, UPB_SIZE(1, 1), 1, 0, 8, 1}, + {2, UPB_SIZE(4, 8), 2, 0, 11, 1}, + {3, UPB_SIZE(8, 16), 3, 0, 11, 1}, + {4, UPB_SIZE(12, 24), 4, 0, 11, 1}, + {5, UPB_SIZE(16, 32), 5, 0, 11, 1}, + {6, UPB_SIZE(20, 40), 6, 0, 11, 1}, + {7, UPB_SIZE(24, 48), 0, 0, 11, 3}, + {8, UPB_SIZE(28, 56), 0, 0, 11, 3}, +}; + +const upb_msglayout validate_DurationRules_msginit = { + &validate_DurationRules_submsgs[0], + &validate_DurationRules__fields[0], + UPB_SIZE(32, 64), 8, false, +}; + +static const upb_msglayout *const validate_TimestampRules_submsgs[6] = { + &google_protobuf_Duration_msginit, + &google_protobuf_Timestamp_msginit, +}; + +static const upb_msglayout_field validate_TimestampRules__fields[9] = { + {1, UPB_SIZE(2, 2), 1, 0, 8, 1}, + {2, UPB_SIZE(8, 8), 4, 1, 11, 1}, + {3, UPB_SIZE(12, 16), 5, 1, 11, 1}, + {4, UPB_SIZE(16, 24), 6, 1, 11, 1}, + {5, UPB_SIZE(20, 32), 7, 1, 11, 1}, + {6, UPB_SIZE(24, 40), 8, 1, 11, 1}, + {7, UPB_SIZE(3, 3), 2, 0, 8, 1}, + {8, UPB_SIZE(4, 4), 3, 0, 8, 1}, + {9, UPB_SIZE(28, 48), 9, 0, 11, 1}, +}; + +const upb_msglayout validate_TimestampRules_msginit = { + &validate_TimestampRules_submsgs[0], + &validate_TimestampRules__fields[0], + UPB_SIZE(32, 56), 9, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/validate/validate.upb.h b/src/core/ext/upb-generated/validate/validate.upb.h new file mode 100644 index 00000000000..04b6cd431f5 --- /dev/null +++ b/src/core/ext/upb-generated/validate/validate.upb.h @@ -0,0 +1,2038 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * validate/validate.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef VALIDATE_VALIDATE_PROTO_UPB_H_ +#define VALIDATE_VALIDATE_PROTO_UPB_H_ + +#include "upb/generated_util.h" + +#include "upb/msg.h" + +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +struct validate_FieldRules; +struct validate_FloatRules; +struct validate_DoubleRules; +struct validate_Int32Rules; +struct validate_Int64Rules; +struct validate_UInt32Rules; +struct validate_UInt64Rules; +struct validate_SInt32Rules; +struct validate_SInt64Rules; +struct validate_Fixed32Rules; +struct validate_Fixed64Rules; +struct validate_SFixed32Rules; +struct validate_SFixed64Rules; +struct validate_BoolRules; +struct validate_StringRules; +struct validate_BytesRules; +struct validate_EnumRules; +struct validate_MessageRules; +struct validate_RepeatedRules; +struct validate_MapRules; +struct validate_AnyRules; +struct validate_DurationRules; +struct validate_TimestampRules; +typedef struct validate_FieldRules validate_FieldRules; +typedef struct validate_FloatRules validate_FloatRules; +typedef struct validate_DoubleRules validate_DoubleRules; +typedef struct validate_Int32Rules validate_Int32Rules; +typedef struct validate_Int64Rules validate_Int64Rules; +typedef struct validate_UInt32Rules validate_UInt32Rules; +typedef struct validate_UInt64Rules validate_UInt64Rules; +typedef struct validate_SInt32Rules validate_SInt32Rules; +typedef struct validate_SInt64Rules validate_SInt64Rules; +typedef struct validate_Fixed32Rules validate_Fixed32Rules; +typedef struct validate_Fixed64Rules validate_Fixed64Rules; +typedef struct validate_SFixed32Rules validate_SFixed32Rules; +typedef struct validate_SFixed64Rules validate_SFixed64Rules; +typedef struct validate_BoolRules validate_BoolRules; +typedef struct validate_StringRules validate_StringRules; +typedef struct validate_BytesRules validate_BytesRules; +typedef struct validate_EnumRules validate_EnumRules; +typedef struct validate_MessageRules validate_MessageRules; +typedef struct validate_RepeatedRules validate_RepeatedRules; +typedef struct validate_MapRules validate_MapRules; +typedef struct validate_AnyRules validate_AnyRules; +typedef struct validate_DurationRules validate_DurationRules; +typedef struct validate_TimestampRules validate_TimestampRules; +extern const upb_msglayout validate_FieldRules_msginit; +extern const upb_msglayout validate_FloatRules_msginit; +extern const upb_msglayout validate_DoubleRules_msginit; +extern const upb_msglayout validate_Int32Rules_msginit; +extern const upb_msglayout validate_Int64Rules_msginit; +extern const upb_msglayout validate_UInt32Rules_msginit; +extern const upb_msglayout validate_UInt64Rules_msginit; +extern const upb_msglayout validate_SInt32Rules_msginit; +extern const upb_msglayout validate_SInt64Rules_msginit; +extern const upb_msglayout validate_Fixed32Rules_msginit; +extern const upb_msglayout validate_Fixed64Rules_msginit; +extern const upb_msglayout validate_SFixed32Rules_msginit; +extern const upb_msglayout validate_SFixed64Rules_msginit; +extern const upb_msglayout validate_BoolRules_msginit; +extern const upb_msglayout validate_StringRules_msginit; +extern const upb_msglayout validate_BytesRules_msginit; +extern const upb_msglayout validate_EnumRules_msginit; +extern const upb_msglayout validate_MessageRules_msginit; +extern const upb_msglayout validate_RepeatedRules_msginit; +extern const upb_msglayout validate_MapRules_msginit; +extern const upb_msglayout validate_AnyRules_msginit; +extern const upb_msglayout validate_DurationRules_msginit; +extern const upb_msglayout validate_TimestampRules_msginit; +struct google_protobuf_Duration; +struct google_protobuf_Timestamp; +extern const upb_msglayout google_protobuf_Duration_msginit; +extern const upb_msglayout google_protobuf_Timestamp_msginit; + +/* Enums */ + +/* validate.FieldRules */ + +UPB_INLINE validate_FieldRules *validate_FieldRules_new(upb_arena *arena) { + return (validate_FieldRules *)upb_msg_new(&validate_FieldRules_msginit, arena); +} +UPB_INLINE validate_FieldRules *validate_FieldRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_FieldRules *ret = validate_FieldRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_FieldRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_FieldRules_serialize(const validate_FieldRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_FieldRules_msginit, arena, len); +} + +typedef enum { + validate_FieldRules_type_float = 1, + validate_FieldRules_type_double = 2, + validate_FieldRules_type_int32 = 3, + validate_FieldRules_type_int64 = 4, + validate_FieldRules_type_uint32 = 5, + validate_FieldRules_type_uint64 = 6, + validate_FieldRules_type_sint32 = 7, + validate_FieldRules_type_sint64 = 8, + validate_FieldRules_type_fixed32 = 9, + validate_FieldRules_type_fixed64 = 10, + validate_FieldRules_type_sfixed32 = 11, + validate_FieldRules_type_sfixed64 = 12, + validate_FieldRules_type_bool = 13, + validate_FieldRules_type_string = 14, + validate_FieldRules_type_bytes = 15, + validate_FieldRules_type_enum = 16, + validate_FieldRules_type_message = 17, + validate_FieldRules_type_repeated = 18, + validate_FieldRules_type_map = 19, + validate_FieldRules_type_any = 20, + validate_FieldRules_type_duration = 21, + validate_FieldRules_type_timestamp = 22, + validate_FieldRules_type_NOT_SET = 0, +} validate_FieldRules_type_oneofcases; +UPB_INLINE validate_FieldRules_type_oneofcases validate_FieldRules_type_case(const validate_FieldRules* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(4, 8)); } + +UPB_INLINE bool validate_FieldRules_has_float(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE const validate_FloatRules* validate_FieldRules_float(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_FloatRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } +UPB_INLINE bool validate_FieldRules_has_double(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE const validate_DoubleRules* validate_FieldRules_double(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_DoubleRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } +UPB_INLINE bool validate_FieldRules_has_int32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } +UPB_INLINE const validate_Int32Rules* validate_FieldRules_int32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Int32Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); } +UPB_INLINE bool validate_FieldRules_has_int64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); } +UPB_INLINE const validate_Int64Rules* validate_FieldRules_int64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Int64Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); } +UPB_INLINE bool validate_FieldRules_has_uint32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 5); } +UPB_INLINE const validate_UInt32Rules* validate_FieldRules_uint32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_UInt32Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); } +UPB_INLINE bool validate_FieldRules_has_uint64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 6); } +UPB_INLINE const validate_UInt64Rules* validate_FieldRules_uint64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_UInt64Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, NULL); } +UPB_INLINE bool validate_FieldRules_has_sint32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 7); } +UPB_INLINE const validate_SInt32Rules* validate_FieldRules_sint32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SInt32Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); } +UPB_INLINE bool validate_FieldRules_has_sint64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 8); } +UPB_INLINE const validate_SInt64Rules* validate_FieldRules_sint64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SInt64Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); } +UPB_INLINE bool validate_FieldRules_has_fixed32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 9); } +UPB_INLINE const validate_Fixed32Rules* validate_FieldRules_fixed32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Fixed32Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); } +UPB_INLINE bool validate_FieldRules_has_fixed64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 10); } +UPB_INLINE const validate_Fixed64Rules* validate_FieldRules_fixed64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Fixed64Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 10, NULL); } +UPB_INLINE bool validate_FieldRules_has_sfixed32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 11); } +UPB_INLINE const validate_SFixed32Rules* validate_FieldRules_sfixed32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SFixed32Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 11, NULL); } +UPB_INLINE bool validate_FieldRules_has_sfixed64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 12); } +UPB_INLINE const validate_SFixed64Rules* validate_FieldRules_sfixed64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SFixed64Rules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 12, NULL); } +UPB_INLINE bool validate_FieldRules_has_bool(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 13); } +UPB_INLINE const validate_BoolRules* validate_FieldRules_bool(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_BoolRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 13, NULL); } +UPB_INLINE bool validate_FieldRules_has_string(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 14); } +UPB_INLINE const validate_StringRules* validate_FieldRules_string(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_StringRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 14, NULL); } +UPB_INLINE bool validate_FieldRules_has_bytes(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 15); } +UPB_INLINE const validate_BytesRules* validate_FieldRules_bytes(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_BytesRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 15, NULL); } +UPB_INLINE bool validate_FieldRules_has_enum(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 16); } +UPB_INLINE const validate_EnumRules* validate_FieldRules_enum(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_EnumRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 16, NULL); } +UPB_INLINE bool validate_FieldRules_has_message(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 17); } +UPB_INLINE const validate_MessageRules* validate_FieldRules_message(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_MessageRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 17, NULL); } +UPB_INLINE bool validate_FieldRules_has_repeated(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 18); } +UPB_INLINE const validate_RepeatedRules* validate_FieldRules_repeated(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_RepeatedRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 18, NULL); } +UPB_INLINE bool validate_FieldRules_has_map(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 19); } +UPB_INLINE const validate_MapRules* validate_FieldRules_map(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_MapRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 19, NULL); } +UPB_INLINE bool validate_FieldRules_has_any(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 20); } +UPB_INLINE const validate_AnyRules* validate_FieldRules_any(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_AnyRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 20, NULL); } +UPB_INLINE bool validate_FieldRules_has_duration(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 21); } +UPB_INLINE const validate_DurationRules* validate_FieldRules_duration(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_DurationRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 21, NULL); } +UPB_INLINE bool validate_FieldRules_has_timestamp(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 22); } +UPB_INLINE const validate_TimestampRules* validate_FieldRules_timestamp(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_TimestampRules*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 22, NULL); } + +UPB_INLINE void validate_FieldRules_set_float(validate_FieldRules *msg, validate_FloatRules* value) { + UPB_WRITE_ONEOF(msg, validate_FloatRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); +} +UPB_INLINE struct validate_FloatRules* validate_FieldRules_mutable_float(validate_FieldRules *msg, upb_arena *arena) { + struct validate_FloatRules* sub = (struct validate_FloatRules*)validate_FieldRules_float(msg); + if (sub == NULL) { + sub = (struct validate_FloatRules*)upb_msg_new(&validate_FloatRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_float(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_double(validate_FieldRules *msg, validate_DoubleRules* value) { + UPB_WRITE_ONEOF(msg, validate_DoubleRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2); +} +UPB_INLINE struct validate_DoubleRules* validate_FieldRules_mutable_double(validate_FieldRules *msg, upb_arena *arena) { + struct validate_DoubleRules* sub = (struct validate_DoubleRules*)validate_FieldRules_double(msg); + if (sub == NULL) { + sub = (struct validate_DoubleRules*)upb_msg_new(&validate_DoubleRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_double(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_int32(validate_FieldRules *msg, validate_Int32Rules* value) { + UPB_WRITE_ONEOF(msg, validate_Int32Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3); +} +UPB_INLINE struct validate_Int32Rules* validate_FieldRules_mutable_int32(validate_FieldRules *msg, upb_arena *arena) { + struct validate_Int32Rules* sub = (struct validate_Int32Rules*)validate_FieldRules_int32(msg); + if (sub == NULL) { + sub = (struct validate_Int32Rules*)upb_msg_new(&validate_Int32Rules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_int32(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_int64(validate_FieldRules *msg, validate_Int64Rules* value) { + UPB_WRITE_ONEOF(msg, validate_Int64Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4); +} +UPB_INLINE struct validate_Int64Rules* validate_FieldRules_mutable_int64(validate_FieldRules *msg, upb_arena *arena) { + struct validate_Int64Rules* sub = (struct validate_Int64Rules*)validate_FieldRules_int64(msg); + if (sub == NULL) { + sub = (struct validate_Int64Rules*)upb_msg_new(&validate_Int64Rules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_int64(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_uint32(validate_FieldRules *msg, validate_UInt32Rules* value) { + UPB_WRITE_ONEOF(msg, validate_UInt32Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5); +} +UPB_INLINE struct validate_UInt32Rules* validate_FieldRules_mutable_uint32(validate_FieldRules *msg, upb_arena *arena) { + struct validate_UInt32Rules* sub = (struct validate_UInt32Rules*)validate_FieldRules_uint32(msg); + if (sub == NULL) { + sub = (struct validate_UInt32Rules*)upb_msg_new(&validate_UInt32Rules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_uint32(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_uint64(validate_FieldRules *msg, validate_UInt64Rules* value) { + UPB_WRITE_ONEOF(msg, validate_UInt64Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 6); +} +UPB_INLINE struct validate_UInt64Rules* validate_FieldRules_mutable_uint64(validate_FieldRules *msg, upb_arena *arena) { + struct validate_UInt64Rules* sub = (struct validate_UInt64Rules*)validate_FieldRules_uint64(msg); + if (sub == NULL) { + sub = (struct validate_UInt64Rules*)upb_msg_new(&validate_UInt64Rules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_uint64(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_sint32(validate_FieldRules *msg, validate_SInt32Rules* value) { + UPB_WRITE_ONEOF(msg, validate_SInt32Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 7); +} +UPB_INLINE struct validate_SInt32Rules* validate_FieldRules_mutable_sint32(validate_FieldRules *msg, upb_arena *arena) { + struct validate_SInt32Rules* sub = (struct validate_SInt32Rules*)validate_FieldRules_sint32(msg); + if (sub == NULL) { + sub = (struct validate_SInt32Rules*)upb_msg_new(&validate_SInt32Rules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_sint32(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_sint64(validate_FieldRules *msg, validate_SInt64Rules* value) { + UPB_WRITE_ONEOF(msg, validate_SInt64Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 8); +} +UPB_INLINE struct validate_SInt64Rules* validate_FieldRules_mutable_sint64(validate_FieldRules *msg, upb_arena *arena) { + struct validate_SInt64Rules* sub = (struct validate_SInt64Rules*)validate_FieldRules_sint64(msg); + if (sub == NULL) { + sub = (struct validate_SInt64Rules*)upb_msg_new(&validate_SInt64Rules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_sint64(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_fixed32(validate_FieldRules *msg, validate_Fixed32Rules* value) { + UPB_WRITE_ONEOF(msg, validate_Fixed32Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 9); +} +UPB_INLINE struct validate_Fixed32Rules* validate_FieldRules_mutable_fixed32(validate_FieldRules *msg, upb_arena *arena) { + struct validate_Fixed32Rules* sub = (struct validate_Fixed32Rules*)validate_FieldRules_fixed32(msg); + if (sub == NULL) { + sub = (struct validate_Fixed32Rules*)upb_msg_new(&validate_Fixed32Rules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_fixed32(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_fixed64(validate_FieldRules *msg, validate_Fixed64Rules* value) { + UPB_WRITE_ONEOF(msg, validate_Fixed64Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 10); +} +UPB_INLINE struct validate_Fixed64Rules* validate_FieldRules_mutable_fixed64(validate_FieldRules *msg, upb_arena *arena) { + struct validate_Fixed64Rules* sub = (struct validate_Fixed64Rules*)validate_FieldRules_fixed64(msg); + if (sub == NULL) { + sub = (struct validate_Fixed64Rules*)upb_msg_new(&validate_Fixed64Rules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_fixed64(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_sfixed32(validate_FieldRules *msg, validate_SFixed32Rules* value) { + UPB_WRITE_ONEOF(msg, validate_SFixed32Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 11); +} +UPB_INLINE struct validate_SFixed32Rules* validate_FieldRules_mutable_sfixed32(validate_FieldRules *msg, upb_arena *arena) { + struct validate_SFixed32Rules* sub = (struct validate_SFixed32Rules*)validate_FieldRules_sfixed32(msg); + if (sub == NULL) { + sub = (struct validate_SFixed32Rules*)upb_msg_new(&validate_SFixed32Rules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_sfixed32(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_sfixed64(validate_FieldRules *msg, validate_SFixed64Rules* value) { + UPB_WRITE_ONEOF(msg, validate_SFixed64Rules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 12); +} +UPB_INLINE struct validate_SFixed64Rules* validate_FieldRules_mutable_sfixed64(validate_FieldRules *msg, upb_arena *arena) { + struct validate_SFixed64Rules* sub = (struct validate_SFixed64Rules*)validate_FieldRules_sfixed64(msg); + if (sub == NULL) { + sub = (struct validate_SFixed64Rules*)upb_msg_new(&validate_SFixed64Rules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_sfixed64(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_bool(validate_FieldRules *msg, validate_BoolRules* value) { + UPB_WRITE_ONEOF(msg, validate_BoolRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 13); +} +UPB_INLINE struct validate_BoolRules* validate_FieldRules_mutable_bool(validate_FieldRules *msg, upb_arena *arena) { + struct validate_BoolRules* sub = (struct validate_BoolRules*)validate_FieldRules_bool(msg); + if (sub == NULL) { + sub = (struct validate_BoolRules*)upb_msg_new(&validate_BoolRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_bool(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_string(validate_FieldRules *msg, validate_StringRules* value) { + UPB_WRITE_ONEOF(msg, validate_StringRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 14); +} +UPB_INLINE struct validate_StringRules* validate_FieldRules_mutable_string(validate_FieldRules *msg, upb_arena *arena) { + struct validate_StringRules* sub = (struct validate_StringRules*)validate_FieldRules_string(msg); + if (sub == NULL) { + sub = (struct validate_StringRules*)upb_msg_new(&validate_StringRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_string(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_bytes(validate_FieldRules *msg, validate_BytesRules* value) { + UPB_WRITE_ONEOF(msg, validate_BytesRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 15); +} +UPB_INLINE struct validate_BytesRules* validate_FieldRules_mutable_bytes(validate_FieldRules *msg, upb_arena *arena) { + struct validate_BytesRules* sub = (struct validate_BytesRules*)validate_FieldRules_bytes(msg); + if (sub == NULL) { + sub = (struct validate_BytesRules*)upb_msg_new(&validate_BytesRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_bytes(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_enum(validate_FieldRules *msg, validate_EnumRules* value) { + UPB_WRITE_ONEOF(msg, validate_EnumRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 16); +} +UPB_INLINE struct validate_EnumRules* validate_FieldRules_mutable_enum(validate_FieldRules *msg, upb_arena *arena) { + struct validate_EnumRules* sub = (struct validate_EnumRules*)validate_FieldRules_enum(msg); + if (sub == NULL) { + sub = (struct validate_EnumRules*)upb_msg_new(&validate_EnumRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_enum(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_message(validate_FieldRules *msg, validate_MessageRules* value) { + UPB_WRITE_ONEOF(msg, validate_MessageRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 17); +} +UPB_INLINE struct validate_MessageRules* validate_FieldRules_mutable_message(validate_FieldRules *msg, upb_arena *arena) { + struct validate_MessageRules* sub = (struct validate_MessageRules*)validate_FieldRules_message(msg); + if (sub == NULL) { + sub = (struct validate_MessageRules*)upb_msg_new(&validate_MessageRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_message(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_repeated(validate_FieldRules *msg, validate_RepeatedRules* value) { + UPB_WRITE_ONEOF(msg, validate_RepeatedRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 18); +} +UPB_INLINE struct validate_RepeatedRules* validate_FieldRules_mutable_repeated(validate_FieldRules *msg, upb_arena *arena) { + struct validate_RepeatedRules* sub = (struct validate_RepeatedRules*)validate_FieldRules_repeated(msg); + if (sub == NULL) { + sub = (struct validate_RepeatedRules*)upb_msg_new(&validate_RepeatedRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_repeated(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_map(validate_FieldRules *msg, validate_MapRules* value) { + UPB_WRITE_ONEOF(msg, validate_MapRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 19); +} +UPB_INLINE struct validate_MapRules* validate_FieldRules_mutable_map(validate_FieldRules *msg, upb_arena *arena) { + struct validate_MapRules* sub = (struct validate_MapRules*)validate_FieldRules_map(msg); + if (sub == NULL) { + sub = (struct validate_MapRules*)upb_msg_new(&validate_MapRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_map(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_any(validate_FieldRules *msg, validate_AnyRules* value) { + UPB_WRITE_ONEOF(msg, validate_AnyRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 20); +} +UPB_INLINE struct validate_AnyRules* validate_FieldRules_mutable_any(validate_FieldRules *msg, upb_arena *arena) { + struct validate_AnyRules* sub = (struct validate_AnyRules*)validate_FieldRules_any(msg); + if (sub == NULL) { + sub = (struct validate_AnyRules*)upb_msg_new(&validate_AnyRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_any(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_duration(validate_FieldRules *msg, validate_DurationRules* value) { + UPB_WRITE_ONEOF(msg, validate_DurationRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 21); +} +UPB_INLINE struct validate_DurationRules* validate_FieldRules_mutable_duration(validate_FieldRules *msg, upb_arena *arena) { + struct validate_DurationRules* sub = (struct validate_DurationRules*)validate_FieldRules_duration(msg); + if (sub == NULL) { + sub = (struct validate_DurationRules*)upb_msg_new(&validate_DurationRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_duration(msg, sub); + } + return sub; +} +UPB_INLINE void validate_FieldRules_set_timestamp(validate_FieldRules *msg, validate_TimestampRules* value) { + UPB_WRITE_ONEOF(msg, validate_TimestampRules*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 22); +} +UPB_INLINE struct validate_TimestampRules* validate_FieldRules_mutable_timestamp(validate_FieldRules *msg, upb_arena *arena) { + struct validate_TimestampRules* sub = (struct validate_TimestampRules*)validate_FieldRules_timestamp(msg); + if (sub == NULL) { + sub = (struct validate_TimestampRules*)upb_msg_new(&validate_TimestampRules_msginit, arena); + if (!sub) return NULL; + validate_FieldRules_set_timestamp(msg, sub); + } + return sub; +} + + +/* validate.FloatRules */ + +UPB_INLINE validate_FloatRules *validate_FloatRules_new(upb_arena *arena) { + return (validate_FloatRules *)upb_msg_new(&validate_FloatRules_msginit, arena); +} +UPB_INLINE validate_FloatRules *validate_FloatRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_FloatRules *ret = validate_FloatRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_FloatRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_FloatRules_serialize(const validate_FloatRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_FloatRules_msginit, arena, len); +} + +UPB_INLINE bool validate_FloatRules_has_const(const validate_FloatRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE float validate_FloatRules_const(const validate_FloatRules *msg) { return UPB_FIELD_AT(msg, float, UPB_SIZE(4, 4)); } +UPB_INLINE bool validate_FloatRules_has_lt(const validate_FloatRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE float validate_FloatRules_lt(const validate_FloatRules *msg) { return UPB_FIELD_AT(msg, float, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_FloatRules_has_lte(const validate_FloatRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE float validate_FloatRules_lte(const validate_FloatRules *msg) { return UPB_FIELD_AT(msg, float, UPB_SIZE(12, 12)); } +UPB_INLINE bool validate_FloatRules_has_gt(const validate_FloatRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE float validate_FloatRules_gt(const validate_FloatRules *msg) { return UPB_FIELD_AT(msg, float, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_FloatRules_has_gte(const validate_FloatRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE float validate_FloatRules_gte(const validate_FloatRules *msg) { return UPB_FIELD_AT(msg, float, UPB_SIZE(20, 20)); } +UPB_INLINE float const* validate_FloatRules_in(const validate_FloatRules *msg, size_t *len) { return (float const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } +UPB_INLINE float const* validate_FloatRules_not_in(const validate_FloatRules *msg, size_t *len) { return (float const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } + +UPB_INLINE void validate_FloatRules_set_const(validate_FloatRules *msg, float value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, float, UPB_SIZE(4, 4)) = value; +} +UPB_INLINE void validate_FloatRules_set_lt(validate_FloatRules *msg, float value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, float, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_FloatRules_set_lte(validate_FloatRules *msg, float value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, float, UPB_SIZE(12, 12)) = value; +} +UPB_INLINE void validate_FloatRules_set_gt(validate_FloatRules *msg, float value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, float, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_FloatRules_set_gte(validate_FloatRules *msg, float value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, float, UPB_SIZE(20, 20)) = value; +} +UPB_INLINE float* validate_FloatRules_mutable_in(validate_FloatRules *msg, size_t *len) { + return (float*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); +} +UPB_INLINE float* validate_FloatRules_resize_in(validate_FloatRules *msg, size_t len, upb_arena *arena) { + return (float*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_FLOAT, arena); +} +UPB_INLINE bool validate_FloatRules_add_in(validate_FloatRules *msg, float val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_FLOAT, &val, arena); +} +UPB_INLINE float* validate_FloatRules_mutable_not_in(validate_FloatRules *msg, size_t *len) { + return (float*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); +} +UPB_INLINE float* validate_FloatRules_resize_not_in(validate_FloatRules *msg, size_t len, upb_arena *arena) { + return (float*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_FLOAT, arena); +} +UPB_INLINE bool validate_FloatRules_add_not_in(validate_FloatRules *msg, float val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_FLOAT, &val, arena); +} + + +/* validate.DoubleRules */ + +UPB_INLINE validate_DoubleRules *validate_DoubleRules_new(upb_arena *arena) { + return (validate_DoubleRules *)upb_msg_new(&validate_DoubleRules_msginit, arena); +} +UPB_INLINE validate_DoubleRules *validate_DoubleRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_DoubleRules *ret = validate_DoubleRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_DoubleRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_DoubleRules_serialize(const validate_DoubleRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_DoubleRules_msginit, arena, len); +} + +UPB_INLINE bool validate_DoubleRules_has_const(const validate_DoubleRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE double validate_DoubleRules_const(const validate_DoubleRules *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_DoubleRules_has_lt(const validate_DoubleRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE double validate_DoubleRules_lt(const validate_DoubleRules *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_DoubleRules_has_lte(const validate_DoubleRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE double validate_DoubleRules_lte(const validate_DoubleRules *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)); } +UPB_INLINE bool validate_DoubleRules_has_gt(const validate_DoubleRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE double validate_DoubleRules_gt(const validate_DoubleRules *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(32, 32)); } +UPB_INLINE bool validate_DoubleRules_has_gte(const validate_DoubleRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE double validate_DoubleRules_gte(const validate_DoubleRules *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(40, 40)); } +UPB_INLINE double const* validate_DoubleRules_in(const validate_DoubleRules *msg, size_t *len) { return (double const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } +UPB_INLINE double const* validate_DoubleRules_not_in(const validate_DoubleRules *msg, size_t *len) { return (double const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } + +UPB_INLINE void validate_DoubleRules_set_const(validate_DoubleRules *msg, double value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_DoubleRules_set_lt(validate_DoubleRules *msg, double value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, double, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_DoubleRules_set_lte(validate_DoubleRules *msg, double value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)) = value; +} +UPB_INLINE void validate_DoubleRules_set_gt(validate_DoubleRules *msg, double value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, double, UPB_SIZE(32, 32)) = value; +} +UPB_INLINE void validate_DoubleRules_set_gte(validate_DoubleRules *msg, double value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, double, UPB_SIZE(40, 40)) = value; +} +UPB_INLINE double* validate_DoubleRules_mutable_in(validate_DoubleRules *msg, size_t *len) { + return (double*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); +} +UPB_INLINE double* validate_DoubleRules_resize_in(validate_DoubleRules *msg, size_t len, upb_arena *arena) { + return (double*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, arena); +} +UPB_INLINE bool validate_DoubleRules_add_in(validate_DoubleRules *msg, double val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, &val, arena); +} +UPB_INLINE double* validate_DoubleRules_mutable_not_in(validate_DoubleRules *msg, size_t *len) { + return (double*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); +} +UPB_INLINE double* validate_DoubleRules_resize_not_in(validate_DoubleRules *msg, size_t len, upb_arena *arena) { + return (double*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, arena); +} +UPB_INLINE bool validate_DoubleRules_add_not_in(validate_DoubleRules *msg, double val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, &val, arena); +} + + +/* validate.Int32Rules */ + +UPB_INLINE validate_Int32Rules *validate_Int32Rules_new(upb_arena *arena) { + return (validate_Int32Rules *)upb_msg_new(&validate_Int32Rules_msginit, arena); +} +UPB_INLINE validate_Int32Rules *validate_Int32Rules_parsenew(upb_strview buf, upb_arena *arena) { + validate_Int32Rules *ret = validate_Int32Rules_new(arena); + return (ret && upb_decode(buf, ret, &validate_Int32Rules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_Int32Rules_serialize(const validate_Int32Rules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_Int32Rules_msginit, arena, len); +} + +UPB_INLINE bool validate_Int32Rules_has_const(const validate_Int32Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE int32_t validate_Int32Rules_const(const validate_Int32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE bool validate_Int32Rules_has_lt(const validate_Int32Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE int32_t validate_Int32Rules_lt(const validate_Int32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_Int32Rules_has_lte(const validate_Int32Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE int32_t validate_Int32Rules_lte(const validate_Int32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)); } +UPB_INLINE bool validate_Int32Rules_has_gt(const validate_Int32Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE int32_t validate_Int32Rules_gt(const validate_Int32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_Int32Rules_has_gte(const validate_Int32Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE int32_t validate_Int32Rules_gte(const validate_Int32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)); } +UPB_INLINE int32_t const* validate_Int32Rules_in(const validate_Int32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } +UPB_INLINE int32_t const* validate_Int32Rules_not_in(const validate_Int32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } + +UPB_INLINE void validate_Int32Rules_set_const(validate_Int32Rules *msg, int32_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; +} +UPB_INLINE void validate_Int32Rules_set_lt(validate_Int32Rules *msg, int32_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_Int32Rules_set_lte(validate_Int32Rules *msg, int32_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)) = value; +} +UPB_INLINE void validate_Int32Rules_set_gt(validate_Int32Rules *msg, int32_t value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_Int32Rules_set_gte(validate_Int32Rules *msg, int32_t value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)) = value; +} +UPB_INLINE int32_t* validate_Int32Rules_mutable_in(validate_Int32Rules *msg, size_t *len) { + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); +} +UPB_INLINE int32_t* validate_Int32Rules_resize_in(validate_Int32Rules *msg, size_t len, upb_arena *arena) { + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); +} +UPB_INLINE bool validate_Int32Rules_add_in(validate_Int32Rules *msg, int32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); +} +UPB_INLINE int32_t* validate_Int32Rules_mutable_not_in(validate_Int32Rules *msg, size_t *len) { + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); +} +UPB_INLINE int32_t* validate_Int32Rules_resize_not_in(validate_Int32Rules *msg, size_t len, upb_arena *arena) { + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); +} +UPB_INLINE bool validate_Int32Rules_add_not_in(validate_Int32Rules *msg, int32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); +} + + +/* validate.Int64Rules */ + +UPB_INLINE validate_Int64Rules *validate_Int64Rules_new(upb_arena *arena) { + return (validate_Int64Rules *)upb_msg_new(&validate_Int64Rules_msginit, arena); +} +UPB_INLINE validate_Int64Rules *validate_Int64Rules_parsenew(upb_strview buf, upb_arena *arena) { + validate_Int64Rules *ret = validate_Int64Rules_new(arena); + return (ret && upb_decode(buf, ret, &validate_Int64Rules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_Int64Rules_serialize(const validate_Int64Rules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_Int64Rules_msginit, arena, len); +} + +UPB_INLINE bool validate_Int64Rules_has_const(const validate_Int64Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE int64_t validate_Int64Rules_const(const validate_Int64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_Int64Rules_has_lt(const validate_Int64Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE int64_t validate_Int64Rules_lt(const validate_Int64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_Int64Rules_has_lte(const validate_Int64Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE int64_t validate_Int64Rules_lte(const validate_Int64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)); } +UPB_INLINE bool validate_Int64Rules_has_gt(const validate_Int64Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE int64_t validate_Int64Rules_gt(const validate_Int64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)); } +UPB_INLINE bool validate_Int64Rules_has_gte(const validate_Int64Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE int64_t validate_Int64Rules_gte(const validate_Int64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)); } +UPB_INLINE int64_t const* validate_Int64Rules_in(const validate_Int64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } +UPB_INLINE int64_t const* validate_Int64Rules_not_in(const validate_Int64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } + +UPB_INLINE void validate_Int64Rules_set_const(validate_Int64Rules *msg, int64_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_Int64Rules_set_lt(validate_Int64Rules *msg, int64_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_Int64Rules_set_lte(validate_Int64Rules *msg, int64_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)) = value; +} +UPB_INLINE void validate_Int64Rules_set_gt(validate_Int64Rules *msg, int64_t value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)) = value; +} +UPB_INLINE void validate_Int64Rules_set_gte(validate_Int64Rules *msg, int64_t value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)) = value; +} +UPB_INLINE int64_t* validate_Int64Rules_mutable_in(validate_Int64Rules *msg, size_t *len) { + return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); +} +UPB_INLINE int64_t* validate_Int64Rules_resize_in(validate_Int64Rules *msg, size_t len, upb_arena *arena) { + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); +} +UPB_INLINE bool validate_Int64Rules_add_in(validate_Int64Rules *msg, int64_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); +} +UPB_INLINE int64_t* validate_Int64Rules_mutable_not_in(validate_Int64Rules *msg, size_t *len) { + return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); +} +UPB_INLINE int64_t* validate_Int64Rules_resize_not_in(validate_Int64Rules *msg, size_t len, upb_arena *arena) { + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); +} +UPB_INLINE bool validate_Int64Rules_add_not_in(validate_Int64Rules *msg, int64_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); +} + + +/* validate.UInt32Rules */ + +UPB_INLINE validate_UInt32Rules *validate_UInt32Rules_new(upb_arena *arena) { + return (validate_UInt32Rules *)upb_msg_new(&validate_UInt32Rules_msginit, arena); +} +UPB_INLINE validate_UInt32Rules *validate_UInt32Rules_parsenew(upb_strview buf, upb_arena *arena) { + validate_UInt32Rules *ret = validate_UInt32Rules_new(arena); + return (ret && upb_decode(buf, ret, &validate_UInt32Rules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_UInt32Rules_serialize(const validate_UInt32Rules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_UInt32Rules_msginit, arena, len); +} + +UPB_INLINE bool validate_UInt32Rules_has_const(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE uint32_t validate_UInt32Rules_const(const validate_UInt32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)); } +UPB_INLINE bool validate_UInt32Rules_has_lt(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE uint32_t validate_UInt32Rules_lt(const validate_UInt32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_UInt32Rules_has_lte(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE uint32_t validate_UInt32Rules_lte(const validate_UInt32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(12, 12)); } +UPB_INLINE bool validate_UInt32Rules_has_gt(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE uint32_t validate_UInt32Rules_gt(const validate_UInt32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_UInt32Rules_has_gte(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE uint32_t validate_UInt32Rules_gte(const validate_UInt32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(20, 20)); } +UPB_INLINE uint32_t const* validate_UInt32Rules_in(const validate_UInt32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } +UPB_INLINE uint32_t const* validate_UInt32Rules_not_in(const validate_UInt32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } + +UPB_INLINE void validate_UInt32Rules_set_const(validate_UInt32Rules *msg, uint32_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)) = value; +} +UPB_INLINE void validate_UInt32Rules_set_lt(validate_UInt32Rules *msg, uint32_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_UInt32Rules_set_lte(validate_UInt32Rules *msg, uint32_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(12, 12)) = value; +} +UPB_INLINE void validate_UInt32Rules_set_gt(validate_UInt32Rules *msg, uint32_t value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_UInt32Rules_set_gte(validate_UInt32Rules *msg, uint32_t value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(20, 20)) = value; +} +UPB_INLINE uint32_t* validate_UInt32Rules_mutable_in(validate_UInt32Rules *msg, size_t *len) { + return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); +} +UPB_INLINE uint32_t* validate_UInt32Rules_resize_in(validate_UInt32Rules *msg, size_t len, upb_arena *arena) { + return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_UINT32, arena); +} +UPB_INLINE bool validate_UInt32Rules_add_in(validate_UInt32Rules *msg, uint32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, arena); +} +UPB_INLINE uint32_t* validate_UInt32Rules_mutable_not_in(validate_UInt32Rules *msg, size_t *len) { + return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); +} +UPB_INLINE uint32_t* validate_UInt32Rules_resize_not_in(validate_UInt32Rules *msg, size_t len, upb_arena *arena) { + return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_UINT32, arena); +} +UPB_INLINE bool validate_UInt32Rules_add_not_in(validate_UInt32Rules *msg, uint32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, arena); +} + + +/* validate.UInt64Rules */ + +UPB_INLINE validate_UInt64Rules *validate_UInt64Rules_new(upb_arena *arena) { + return (validate_UInt64Rules *)upb_msg_new(&validate_UInt64Rules_msginit, arena); +} +UPB_INLINE validate_UInt64Rules *validate_UInt64Rules_parsenew(upb_strview buf, upb_arena *arena) { + validate_UInt64Rules *ret = validate_UInt64Rules_new(arena); + return (ret && upb_decode(buf, ret, &validate_UInt64Rules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_UInt64Rules_serialize(const validate_UInt64Rules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_UInt64Rules_msginit, arena, len); +} + +UPB_INLINE bool validate_UInt64Rules_has_const(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE uint64_t validate_UInt64Rules_const(const validate_UInt64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_UInt64Rules_has_lt(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE uint64_t validate_UInt64Rules_lt(const validate_UInt64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_UInt64Rules_has_lte(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE uint64_t validate_UInt64Rules_lte(const validate_UInt64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)); } +UPB_INLINE bool validate_UInt64Rules_has_gt(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE uint64_t validate_UInt64Rules_gt(const validate_UInt64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)); } +UPB_INLINE bool validate_UInt64Rules_has_gte(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE uint64_t validate_UInt64Rules_gte(const validate_UInt64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)); } +UPB_INLINE uint64_t const* validate_UInt64Rules_in(const validate_UInt64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } +UPB_INLINE uint64_t const* validate_UInt64Rules_not_in(const validate_UInt64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } + +UPB_INLINE void validate_UInt64Rules_set_const(validate_UInt64Rules *msg, uint64_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_UInt64Rules_set_lt(validate_UInt64Rules *msg, uint64_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_UInt64Rules_set_lte(validate_UInt64Rules *msg, uint64_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)) = value; +} +UPB_INLINE void validate_UInt64Rules_set_gt(validate_UInt64Rules *msg, uint64_t value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)) = value; +} +UPB_INLINE void validate_UInt64Rules_set_gte(validate_UInt64Rules *msg, uint64_t value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)) = value; +} +UPB_INLINE uint64_t* validate_UInt64Rules_mutable_in(validate_UInt64Rules *msg, size_t *len) { + return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); +} +UPB_INLINE uint64_t* validate_UInt64Rules_resize_in(validate_UInt64Rules *msg, size_t len, upb_arena *arena) { + return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_UINT64, arena); +} +UPB_INLINE bool validate_UInt64Rules_add_in(validate_UInt64Rules *msg, uint64_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, arena); +} +UPB_INLINE uint64_t* validate_UInt64Rules_mutable_not_in(validate_UInt64Rules *msg, size_t *len) { + return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); +} +UPB_INLINE uint64_t* validate_UInt64Rules_resize_not_in(validate_UInt64Rules *msg, size_t len, upb_arena *arena) { + return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_UINT64, arena); +} +UPB_INLINE bool validate_UInt64Rules_add_not_in(validate_UInt64Rules *msg, uint64_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, arena); +} + + +/* validate.SInt32Rules */ + +UPB_INLINE validate_SInt32Rules *validate_SInt32Rules_new(upb_arena *arena) { + return (validate_SInt32Rules *)upb_msg_new(&validate_SInt32Rules_msginit, arena); +} +UPB_INLINE validate_SInt32Rules *validate_SInt32Rules_parsenew(upb_strview buf, upb_arena *arena) { + validate_SInt32Rules *ret = validate_SInt32Rules_new(arena); + return (ret && upb_decode(buf, ret, &validate_SInt32Rules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_SInt32Rules_serialize(const validate_SInt32Rules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_SInt32Rules_msginit, arena, len); +} + +UPB_INLINE bool validate_SInt32Rules_has_const(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE int32_t validate_SInt32Rules_const(const validate_SInt32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE bool validate_SInt32Rules_has_lt(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE int32_t validate_SInt32Rules_lt(const validate_SInt32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_SInt32Rules_has_lte(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE int32_t validate_SInt32Rules_lte(const validate_SInt32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)); } +UPB_INLINE bool validate_SInt32Rules_has_gt(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE int32_t validate_SInt32Rules_gt(const validate_SInt32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_SInt32Rules_has_gte(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE int32_t validate_SInt32Rules_gte(const validate_SInt32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)); } +UPB_INLINE int32_t const* validate_SInt32Rules_in(const validate_SInt32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } +UPB_INLINE int32_t const* validate_SInt32Rules_not_in(const validate_SInt32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } + +UPB_INLINE void validate_SInt32Rules_set_const(validate_SInt32Rules *msg, int32_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; +} +UPB_INLINE void validate_SInt32Rules_set_lt(validate_SInt32Rules *msg, int32_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_SInt32Rules_set_lte(validate_SInt32Rules *msg, int32_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)) = value; +} +UPB_INLINE void validate_SInt32Rules_set_gt(validate_SInt32Rules *msg, int32_t value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_SInt32Rules_set_gte(validate_SInt32Rules *msg, int32_t value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)) = value; +} +UPB_INLINE int32_t* validate_SInt32Rules_mutable_in(validate_SInt32Rules *msg, size_t *len) { + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); +} +UPB_INLINE int32_t* validate_SInt32Rules_resize_in(validate_SInt32Rules *msg, size_t len, upb_arena *arena) { + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); +} +UPB_INLINE bool validate_SInt32Rules_add_in(validate_SInt32Rules *msg, int32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); +} +UPB_INLINE int32_t* validate_SInt32Rules_mutable_not_in(validate_SInt32Rules *msg, size_t *len) { + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); +} +UPB_INLINE int32_t* validate_SInt32Rules_resize_not_in(validate_SInt32Rules *msg, size_t len, upb_arena *arena) { + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); +} +UPB_INLINE bool validate_SInt32Rules_add_not_in(validate_SInt32Rules *msg, int32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); +} + + +/* validate.SInt64Rules */ + +UPB_INLINE validate_SInt64Rules *validate_SInt64Rules_new(upb_arena *arena) { + return (validate_SInt64Rules *)upb_msg_new(&validate_SInt64Rules_msginit, arena); +} +UPB_INLINE validate_SInt64Rules *validate_SInt64Rules_parsenew(upb_strview buf, upb_arena *arena) { + validate_SInt64Rules *ret = validate_SInt64Rules_new(arena); + return (ret && upb_decode(buf, ret, &validate_SInt64Rules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_SInt64Rules_serialize(const validate_SInt64Rules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_SInt64Rules_msginit, arena, len); +} + +UPB_INLINE bool validate_SInt64Rules_has_const(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE int64_t validate_SInt64Rules_const(const validate_SInt64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_SInt64Rules_has_lt(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE int64_t validate_SInt64Rules_lt(const validate_SInt64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_SInt64Rules_has_lte(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE int64_t validate_SInt64Rules_lte(const validate_SInt64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)); } +UPB_INLINE bool validate_SInt64Rules_has_gt(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE int64_t validate_SInt64Rules_gt(const validate_SInt64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)); } +UPB_INLINE bool validate_SInt64Rules_has_gte(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE int64_t validate_SInt64Rules_gte(const validate_SInt64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)); } +UPB_INLINE int64_t const* validate_SInt64Rules_in(const validate_SInt64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } +UPB_INLINE int64_t const* validate_SInt64Rules_not_in(const validate_SInt64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } + +UPB_INLINE void validate_SInt64Rules_set_const(validate_SInt64Rules *msg, int64_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_SInt64Rules_set_lt(validate_SInt64Rules *msg, int64_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_SInt64Rules_set_lte(validate_SInt64Rules *msg, int64_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)) = value; +} +UPB_INLINE void validate_SInt64Rules_set_gt(validate_SInt64Rules *msg, int64_t value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)) = value; +} +UPB_INLINE void validate_SInt64Rules_set_gte(validate_SInt64Rules *msg, int64_t value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)) = value; +} +UPB_INLINE int64_t* validate_SInt64Rules_mutable_in(validate_SInt64Rules *msg, size_t *len) { + return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); +} +UPB_INLINE int64_t* validate_SInt64Rules_resize_in(validate_SInt64Rules *msg, size_t len, upb_arena *arena) { + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); +} +UPB_INLINE bool validate_SInt64Rules_add_in(validate_SInt64Rules *msg, int64_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); +} +UPB_INLINE int64_t* validate_SInt64Rules_mutable_not_in(validate_SInt64Rules *msg, size_t *len) { + return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); +} +UPB_INLINE int64_t* validate_SInt64Rules_resize_not_in(validate_SInt64Rules *msg, size_t len, upb_arena *arena) { + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); +} +UPB_INLINE bool validate_SInt64Rules_add_not_in(validate_SInt64Rules *msg, int64_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); +} + + +/* validate.Fixed32Rules */ + +UPB_INLINE validate_Fixed32Rules *validate_Fixed32Rules_new(upb_arena *arena) { + return (validate_Fixed32Rules *)upb_msg_new(&validate_Fixed32Rules_msginit, arena); +} +UPB_INLINE validate_Fixed32Rules *validate_Fixed32Rules_parsenew(upb_strview buf, upb_arena *arena) { + validate_Fixed32Rules *ret = validate_Fixed32Rules_new(arena); + return (ret && upb_decode(buf, ret, &validate_Fixed32Rules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_Fixed32Rules_serialize(const validate_Fixed32Rules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_Fixed32Rules_msginit, arena, len); +} + +UPB_INLINE bool validate_Fixed32Rules_has_const(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE uint32_t validate_Fixed32Rules_const(const validate_Fixed32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)); } +UPB_INLINE bool validate_Fixed32Rules_has_lt(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE uint32_t validate_Fixed32Rules_lt(const validate_Fixed32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_Fixed32Rules_has_lte(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE uint32_t validate_Fixed32Rules_lte(const validate_Fixed32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(12, 12)); } +UPB_INLINE bool validate_Fixed32Rules_has_gt(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE uint32_t validate_Fixed32Rules_gt(const validate_Fixed32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_Fixed32Rules_has_gte(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE uint32_t validate_Fixed32Rules_gte(const validate_Fixed32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(20, 20)); } +UPB_INLINE uint32_t const* validate_Fixed32Rules_in(const validate_Fixed32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } +UPB_INLINE uint32_t const* validate_Fixed32Rules_not_in(const validate_Fixed32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } + +UPB_INLINE void validate_Fixed32Rules_set_const(validate_Fixed32Rules *msg, uint32_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)) = value; +} +UPB_INLINE void validate_Fixed32Rules_set_lt(validate_Fixed32Rules *msg, uint32_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_Fixed32Rules_set_lte(validate_Fixed32Rules *msg, uint32_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(12, 12)) = value; +} +UPB_INLINE void validate_Fixed32Rules_set_gt(validate_Fixed32Rules *msg, uint32_t value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_Fixed32Rules_set_gte(validate_Fixed32Rules *msg, uint32_t value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(20, 20)) = value; +} +UPB_INLINE uint32_t* validate_Fixed32Rules_mutable_in(validate_Fixed32Rules *msg, size_t *len) { + return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); +} +UPB_INLINE uint32_t* validate_Fixed32Rules_resize_in(validate_Fixed32Rules *msg, size_t len, upb_arena *arena) { + return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_UINT32, arena); +} +UPB_INLINE bool validate_Fixed32Rules_add_in(validate_Fixed32Rules *msg, uint32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, arena); +} +UPB_INLINE uint32_t* validate_Fixed32Rules_mutable_not_in(validate_Fixed32Rules *msg, size_t *len) { + return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); +} +UPB_INLINE uint32_t* validate_Fixed32Rules_resize_not_in(validate_Fixed32Rules *msg, size_t len, upb_arena *arena) { + return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_UINT32, arena); +} +UPB_INLINE bool validate_Fixed32Rules_add_not_in(validate_Fixed32Rules *msg, uint32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, arena); +} + + +/* validate.Fixed64Rules */ + +UPB_INLINE validate_Fixed64Rules *validate_Fixed64Rules_new(upb_arena *arena) { + return (validate_Fixed64Rules *)upb_msg_new(&validate_Fixed64Rules_msginit, arena); +} +UPB_INLINE validate_Fixed64Rules *validate_Fixed64Rules_parsenew(upb_strview buf, upb_arena *arena) { + validate_Fixed64Rules *ret = validate_Fixed64Rules_new(arena); + return (ret && upb_decode(buf, ret, &validate_Fixed64Rules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_Fixed64Rules_serialize(const validate_Fixed64Rules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_Fixed64Rules_msginit, arena, len); +} + +UPB_INLINE bool validate_Fixed64Rules_has_const(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE uint64_t validate_Fixed64Rules_const(const validate_Fixed64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_Fixed64Rules_has_lt(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE uint64_t validate_Fixed64Rules_lt(const validate_Fixed64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_Fixed64Rules_has_lte(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE uint64_t validate_Fixed64Rules_lte(const validate_Fixed64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)); } +UPB_INLINE bool validate_Fixed64Rules_has_gt(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE uint64_t validate_Fixed64Rules_gt(const validate_Fixed64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)); } +UPB_INLINE bool validate_Fixed64Rules_has_gte(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE uint64_t validate_Fixed64Rules_gte(const validate_Fixed64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)); } +UPB_INLINE uint64_t const* validate_Fixed64Rules_in(const validate_Fixed64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } +UPB_INLINE uint64_t const* validate_Fixed64Rules_not_in(const validate_Fixed64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } + +UPB_INLINE void validate_Fixed64Rules_set_const(validate_Fixed64Rules *msg, uint64_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_Fixed64Rules_set_lt(validate_Fixed64Rules *msg, uint64_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_Fixed64Rules_set_lte(validate_Fixed64Rules *msg, uint64_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)) = value; +} +UPB_INLINE void validate_Fixed64Rules_set_gt(validate_Fixed64Rules *msg, uint64_t value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)) = value; +} +UPB_INLINE void validate_Fixed64Rules_set_gte(validate_Fixed64Rules *msg, uint64_t value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)) = value; +} +UPB_INLINE uint64_t* validate_Fixed64Rules_mutable_in(validate_Fixed64Rules *msg, size_t *len) { + return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); +} +UPB_INLINE uint64_t* validate_Fixed64Rules_resize_in(validate_Fixed64Rules *msg, size_t len, upb_arena *arena) { + return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_UINT64, arena); +} +UPB_INLINE bool validate_Fixed64Rules_add_in(validate_Fixed64Rules *msg, uint64_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, arena); +} +UPB_INLINE uint64_t* validate_Fixed64Rules_mutable_not_in(validate_Fixed64Rules *msg, size_t *len) { + return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); +} +UPB_INLINE uint64_t* validate_Fixed64Rules_resize_not_in(validate_Fixed64Rules *msg, size_t len, upb_arena *arena) { + return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_UINT64, arena); +} +UPB_INLINE bool validate_Fixed64Rules_add_not_in(validate_Fixed64Rules *msg, uint64_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, arena); +} + + +/* validate.SFixed32Rules */ + +UPB_INLINE validate_SFixed32Rules *validate_SFixed32Rules_new(upb_arena *arena) { + return (validate_SFixed32Rules *)upb_msg_new(&validate_SFixed32Rules_msginit, arena); +} +UPB_INLINE validate_SFixed32Rules *validate_SFixed32Rules_parsenew(upb_strview buf, upb_arena *arena) { + validate_SFixed32Rules *ret = validate_SFixed32Rules_new(arena); + return (ret && upb_decode(buf, ret, &validate_SFixed32Rules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_SFixed32Rules_serialize(const validate_SFixed32Rules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_SFixed32Rules_msginit, arena, len); +} + +UPB_INLINE bool validate_SFixed32Rules_has_const(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE int32_t validate_SFixed32Rules_const(const validate_SFixed32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE bool validate_SFixed32Rules_has_lt(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE int32_t validate_SFixed32Rules_lt(const validate_SFixed32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_SFixed32Rules_has_lte(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE int32_t validate_SFixed32Rules_lte(const validate_SFixed32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)); } +UPB_INLINE bool validate_SFixed32Rules_has_gt(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE int32_t validate_SFixed32Rules_gt(const validate_SFixed32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_SFixed32Rules_has_gte(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE int32_t validate_SFixed32Rules_gte(const validate_SFixed32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)); } +UPB_INLINE int32_t const* validate_SFixed32Rules_in(const validate_SFixed32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } +UPB_INLINE int32_t const* validate_SFixed32Rules_not_in(const validate_SFixed32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } + +UPB_INLINE void validate_SFixed32Rules_set_const(validate_SFixed32Rules *msg, int32_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; +} +UPB_INLINE void validate_SFixed32Rules_set_lt(validate_SFixed32Rules *msg, int32_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_SFixed32Rules_set_lte(validate_SFixed32Rules *msg, int32_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)) = value; +} +UPB_INLINE void validate_SFixed32Rules_set_gt(validate_SFixed32Rules *msg, int32_t value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_SFixed32Rules_set_gte(validate_SFixed32Rules *msg, int32_t value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)) = value; +} +UPB_INLINE int32_t* validate_SFixed32Rules_mutable_in(validate_SFixed32Rules *msg, size_t *len) { + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); +} +UPB_INLINE int32_t* validate_SFixed32Rules_resize_in(validate_SFixed32Rules *msg, size_t len, upb_arena *arena) { + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); +} +UPB_INLINE bool validate_SFixed32Rules_add_in(validate_SFixed32Rules *msg, int32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); +} +UPB_INLINE int32_t* validate_SFixed32Rules_mutable_not_in(validate_SFixed32Rules *msg, size_t *len) { + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); +} +UPB_INLINE int32_t* validate_SFixed32Rules_resize_not_in(validate_SFixed32Rules *msg, size_t len, upb_arena *arena) { + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); +} +UPB_INLINE bool validate_SFixed32Rules_add_not_in(validate_SFixed32Rules *msg, int32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); +} + + +/* validate.SFixed64Rules */ + +UPB_INLINE validate_SFixed64Rules *validate_SFixed64Rules_new(upb_arena *arena) { + return (validate_SFixed64Rules *)upb_msg_new(&validate_SFixed64Rules_msginit, arena); +} +UPB_INLINE validate_SFixed64Rules *validate_SFixed64Rules_parsenew(upb_strview buf, upb_arena *arena) { + validate_SFixed64Rules *ret = validate_SFixed64Rules_new(arena); + return (ret && upb_decode(buf, ret, &validate_SFixed64Rules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_SFixed64Rules_serialize(const validate_SFixed64Rules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_SFixed64Rules_msginit, arena, len); +} + +UPB_INLINE bool validate_SFixed64Rules_has_const(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE int64_t validate_SFixed64Rules_const(const validate_SFixed64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_SFixed64Rules_has_lt(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE int64_t validate_SFixed64Rules_lt(const validate_SFixed64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_SFixed64Rules_has_lte(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE int64_t validate_SFixed64Rules_lte(const validate_SFixed64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)); } +UPB_INLINE bool validate_SFixed64Rules_has_gt(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE int64_t validate_SFixed64Rules_gt(const validate_SFixed64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)); } +UPB_INLINE bool validate_SFixed64Rules_has_gte(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE int64_t validate_SFixed64Rules_gte(const validate_SFixed64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)); } +UPB_INLINE int64_t const* validate_SFixed64Rules_in(const validate_SFixed64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } +UPB_INLINE int64_t const* validate_SFixed64Rules_not_in(const validate_SFixed64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } + +UPB_INLINE void validate_SFixed64Rules_set_const(validate_SFixed64Rules *msg, int64_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_SFixed64Rules_set_lt(validate_SFixed64Rules *msg, int64_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_SFixed64Rules_set_lte(validate_SFixed64Rules *msg, int64_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)) = value; +} +UPB_INLINE void validate_SFixed64Rules_set_gt(validate_SFixed64Rules *msg, int64_t value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)) = value; +} +UPB_INLINE void validate_SFixed64Rules_set_gte(validate_SFixed64Rules *msg, int64_t value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)) = value; +} +UPB_INLINE int64_t* validate_SFixed64Rules_mutable_in(validate_SFixed64Rules *msg, size_t *len) { + return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); +} +UPB_INLINE int64_t* validate_SFixed64Rules_resize_in(validate_SFixed64Rules *msg, size_t len, upb_arena *arena) { + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); +} +UPB_INLINE bool validate_SFixed64Rules_add_in(validate_SFixed64Rules *msg, int64_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); +} +UPB_INLINE int64_t* validate_SFixed64Rules_mutable_not_in(validate_SFixed64Rules *msg, size_t *len) { + return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); +} +UPB_INLINE int64_t* validate_SFixed64Rules_resize_not_in(validate_SFixed64Rules *msg, size_t len, upb_arena *arena) { + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); +} +UPB_INLINE bool validate_SFixed64Rules_add_not_in(validate_SFixed64Rules *msg, int64_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); +} + + +/* validate.BoolRules */ + +UPB_INLINE validate_BoolRules *validate_BoolRules_new(upb_arena *arena) { + return (validate_BoolRules *)upb_msg_new(&validate_BoolRules_msginit, arena); +} +UPB_INLINE validate_BoolRules *validate_BoolRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_BoolRules *ret = validate_BoolRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_BoolRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_BoolRules_serialize(const validate_BoolRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_BoolRules_msginit, arena, len); +} + +UPB_INLINE bool validate_BoolRules_has_const(const validate_BoolRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_BoolRules_const(const validate_BoolRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } + +UPB_INLINE void validate_BoolRules_set_const(validate_BoolRules *msg, bool value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; +} + + +/* validate.StringRules */ + +UPB_INLINE validate_StringRules *validate_StringRules_new(upb_arena *arena) { + return (validate_StringRules *)upb_msg_new(&validate_StringRules_msginit, arena); +} +UPB_INLINE validate_StringRules *validate_StringRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_StringRules *ret = validate_StringRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_StringRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_StringRules_serialize(const validate_StringRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_StringRules_msginit, arena, len); +} + +typedef enum { + validate_StringRules_well_known_email = 12, + validate_StringRules_well_known_hostname = 13, + validate_StringRules_well_known_ip = 14, + validate_StringRules_well_known_ipv4 = 15, + validate_StringRules_well_known_ipv6 = 16, + validate_StringRules_well_known_uri = 17, + validate_StringRules_well_known_uri_ref = 18, + validate_StringRules_well_known_NOT_SET = 0, +} validate_StringRules_well_known_oneofcases; +UPB_INLINE validate_StringRules_well_known_oneofcases validate_StringRules_well_known_case(const validate_StringRules* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(108, 156)); } + +UPB_INLINE bool validate_StringRules_has_const(const validate_StringRules *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE upb_strview validate_StringRules_const(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 56)); } +UPB_INLINE bool validate_StringRules_has_min_len(const validate_StringRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE uint64_t validate_StringRules_min_len(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_StringRules_has_max_len(const validate_StringRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE uint64_t validate_StringRules_max_len(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_StringRules_has_min_bytes(const validate_StringRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE uint64_t validate_StringRules_min_bytes(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)); } +UPB_INLINE bool validate_StringRules_has_max_bytes(const validate_StringRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE uint64_t validate_StringRules_max_bytes(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)); } +UPB_INLINE bool validate_StringRules_has_pattern(const validate_StringRules *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE upb_strview validate_StringRules_pattern(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 72)); } +UPB_INLINE bool validate_StringRules_has_prefix(const validate_StringRules *msg) { return _upb_has_field(msg, 9); } +UPB_INLINE upb_strview validate_StringRules_prefix(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(72, 88)); } +UPB_INLINE bool validate_StringRules_has_suffix(const validate_StringRules *msg) { return _upb_has_field(msg, 10); } +UPB_INLINE upb_strview validate_StringRules_suffix(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(80, 104)); } +UPB_INLINE bool validate_StringRules_has_contains(const validate_StringRules *msg) { return _upb_has_field(msg, 11); } +UPB_INLINE upb_strview validate_StringRules_contains(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(88, 120)); } +UPB_INLINE upb_strview const* validate_StringRules_in(const validate_StringRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(96, 136), len); } +UPB_INLINE upb_strview const* validate_StringRules_not_in(const validate_StringRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(100, 144), len); } +UPB_INLINE bool validate_StringRules_has_email(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 12); } +UPB_INLINE bool validate_StringRules_email(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 12, false); } +UPB_INLINE bool validate_StringRules_has_hostname(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 13); } +UPB_INLINE bool validate_StringRules_hostname(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 13, false); } +UPB_INLINE bool validate_StringRules_has_ip(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 14); } +UPB_INLINE bool validate_StringRules_ip(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 14, false); } +UPB_INLINE bool validate_StringRules_has_ipv4(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 15); } +UPB_INLINE bool validate_StringRules_ipv4(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 15, false); } +UPB_INLINE bool validate_StringRules_has_ipv6(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 16); } +UPB_INLINE bool validate_StringRules_ipv6(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 16, false); } +UPB_INLINE bool validate_StringRules_has_uri(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 17); } +UPB_INLINE bool validate_StringRules_uri(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 17, false); } +UPB_INLINE bool validate_StringRules_has_uri_ref(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 156), 18); } +UPB_INLINE bool validate_StringRules_uri_ref(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(104, 152), UPB_SIZE(108, 156), 18, false); } +UPB_INLINE bool validate_StringRules_has_len(const validate_StringRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE uint64_t validate_StringRules_len(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)); } +UPB_INLINE bool validate_StringRules_has_len_bytes(const validate_StringRules *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE uint64_t validate_StringRules_len_bytes(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(48, 48)); } + +UPB_INLINE void validate_StringRules_set_const(validate_StringRules *msg, upb_strview value) { + _upb_sethas(msg, 7); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 56)) = value; +} +UPB_INLINE void validate_StringRules_set_min_len(validate_StringRules *msg, uint64_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_StringRules_set_max_len(validate_StringRules *msg, uint64_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_StringRules_set_min_bytes(validate_StringRules *msg, uint64_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)) = value; +} +UPB_INLINE void validate_StringRules_set_max_bytes(validate_StringRules *msg, uint64_t value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)) = value; +} +UPB_INLINE void validate_StringRules_set_pattern(validate_StringRules *msg, upb_strview value) { + _upb_sethas(msg, 8); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 72)) = value; +} +UPB_INLINE void validate_StringRules_set_prefix(validate_StringRules *msg, upb_strview value) { + _upb_sethas(msg, 9); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(72, 88)) = value; +} +UPB_INLINE void validate_StringRules_set_suffix(validate_StringRules *msg, upb_strview value) { + _upb_sethas(msg, 10); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(80, 104)) = value; +} +UPB_INLINE void validate_StringRules_set_contains(validate_StringRules *msg, upb_strview value) { + _upb_sethas(msg, 11); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(88, 120)) = value; +} +UPB_INLINE upb_strview* validate_StringRules_mutable_in(validate_StringRules *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(96, 136), len); +} +UPB_INLINE upb_strview* validate_StringRules_resize_in(validate_StringRules *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(96, 136), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool validate_StringRules_add_in(validate_StringRules *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(96, 136), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} +UPB_INLINE upb_strview* validate_StringRules_mutable_not_in(validate_StringRules *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(100, 144), len); +} +UPB_INLINE upb_strview* validate_StringRules_resize_not_in(validate_StringRules *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(100, 144), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool validate_StringRules_add_not_in(validate_StringRules *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(100, 144), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} +UPB_INLINE void validate_StringRules_set_email(validate_StringRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 12); +} +UPB_INLINE void validate_StringRules_set_hostname(validate_StringRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 13); +} +UPB_INLINE void validate_StringRules_set_ip(validate_StringRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 14); +} +UPB_INLINE void validate_StringRules_set_ipv4(validate_StringRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 15); +} +UPB_INLINE void validate_StringRules_set_ipv6(validate_StringRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 16); +} +UPB_INLINE void validate_StringRules_set_uri(validate_StringRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 17); +} +UPB_INLINE void validate_StringRules_set_uri_ref(validate_StringRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 18); +} +UPB_INLINE void validate_StringRules_set_len(validate_StringRules *msg, uint64_t value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)) = value; +} +UPB_INLINE void validate_StringRules_set_len_bytes(validate_StringRules *msg, uint64_t value) { + _upb_sethas(msg, 6); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(48, 48)) = value; +} + + +/* validate.BytesRules */ + +UPB_INLINE validate_BytesRules *validate_BytesRules_new(upb_arena *arena) { + return (validate_BytesRules *)upb_msg_new(&validate_BytesRules_msginit, arena); +} +UPB_INLINE validate_BytesRules *validate_BytesRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_BytesRules *ret = validate_BytesRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_BytesRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_BytesRules_serialize(const validate_BytesRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_BytesRules_msginit, arena, len); +} + +typedef enum { + validate_BytesRules_well_known_ip = 10, + validate_BytesRules_well_known_ipv4 = 11, + validate_BytesRules_well_known_ipv6 = 12, + validate_BytesRules_well_known_NOT_SET = 0, +} validate_BytesRules_well_known_oneofcases; +UPB_INLINE validate_BytesRules_well_known_oneofcases validate_BytesRules_well_known_case(const validate_BytesRules* msg) { return UPB_FIELD_AT(msg, int, UPB_SIZE(84, 132)); } + +UPB_INLINE bool validate_BytesRules_has_const(const validate_BytesRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE upb_strview validate_BytesRules_const(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)); } +UPB_INLINE bool validate_BytesRules_has_min_len(const validate_BytesRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE uint64_t validate_BytesRules_min_len(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_BytesRules_has_max_len(const validate_BytesRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE uint64_t validate_BytesRules_max_len(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_BytesRules_has_pattern(const validate_BytesRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE upb_strview validate_BytesRules_pattern(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)); } +UPB_INLINE bool validate_BytesRules_has_prefix(const validate_BytesRules *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE upb_strview validate_BytesRules_prefix(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)); } +UPB_INLINE bool validate_BytesRules_has_suffix(const validate_BytesRules *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE upb_strview validate_BytesRules_suffix(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 80)); } +UPB_INLINE bool validate_BytesRules_has_contains(const validate_BytesRules *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE upb_strview validate_BytesRules_contains(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 96)); } +UPB_INLINE upb_strview const* validate_BytesRules_in(const validate_BytesRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(72, 112), len); } +UPB_INLINE upb_strview const* validate_BytesRules_not_in(const validate_BytesRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(76, 120), len); } +UPB_INLINE bool validate_BytesRules_has_ip(const validate_BytesRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(84, 132), 10); } +UPB_INLINE bool validate_BytesRules_ip(const validate_BytesRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(80, 128), UPB_SIZE(84, 132), 10, false); } +UPB_INLINE bool validate_BytesRules_has_ipv4(const validate_BytesRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(84, 132), 11); } +UPB_INLINE bool validate_BytesRules_ipv4(const validate_BytesRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(80, 128), UPB_SIZE(84, 132), 11, false); } +UPB_INLINE bool validate_BytesRules_has_ipv6(const validate_BytesRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(84, 132), 12); } +UPB_INLINE bool validate_BytesRules_ipv6(const validate_BytesRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(80, 128), UPB_SIZE(84, 132), 12, false); } +UPB_INLINE bool validate_BytesRules_has_len(const validate_BytesRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE uint64_t validate_BytesRules_len(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)); } + +UPB_INLINE void validate_BytesRules_set_const(validate_BytesRules *msg, upb_strview value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)) = value; +} +UPB_INLINE void validate_BytesRules_set_min_len(validate_BytesRules *msg, uint64_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_BytesRules_set_max_len(validate_BytesRules *msg, uint64_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_BytesRules_set_pattern(validate_BytesRules *msg, upb_strview value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)) = value; +} +UPB_INLINE void validate_BytesRules_set_prefix(validate_BytesRules *msg, upb_strview value) { + _upb_sethas(msg, 6); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)) = value; +} +UPB_INLINE void validate_BytesRules_set_suffix(validate_BytesRules *msg, upb_strview value) { + _upb_sethas(msg, 7); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 80)) = value; +} +UPB_INLINE void validate_BytesRules_set_contains(validate_BytesRules *msg, upb_strview value) { + _upb_sethas(msg, 8); + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 96)) = value; +} +UPB_INLINE upb_strview* validate_BytesRules_mutable_in(validate_BytesRules *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(72, 112), len); +} +UPB_INLINE upb_strview* validate_BytesRules_resize_in(validate_BytesRules *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(72, 112), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool validate_BytesRules_add_in(validate_BytesRules *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(72, 112), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} +UPB_INLINE upb_strview* validate_BytesRules_mutable_not_in(validate_BytesRules *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(76, 120), len); +} +UPB_INLINE upb_strview* validate_BytesRules_resize_not_in(validate_BytesRules *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(76, 120), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool validate_BytesRules_add_not_in(validate_BytesRules *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(76, 120), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} +UPB_INLINE void validate_BytesRules_set_ip(validate_BytesRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(80, 128), value, UPB_SIZE(84, 132), 10); +} +UPB_INLINE void validate_BytesRules_set_ipv4(validate_BytesRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(80, 128), value, UPB_SIZE(84, 132), 11); +} +UPB_INLINE void validate_BytesRules_set_ipv6(validate_BytesRules *msg, bool value) { + UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(80, 128), value, UPB_SIZE(84, 132), 12); +} +UPB_INLINE void validate_BytesRules_set_len(validate_BytesRules *msg, uint64_t value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)) = value; +} + + +/* validate.EnumRules */ + +UPB_INLINE validate_EnumRules *validate_EnumRules_new(upb_arena *arena) { + return (validate_EnumRules *)upb_msg_new(&validate_EnumRules_msginit, arena); +} +UPB_INLINE validate_EnumRules *validate_EnumRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_EnumRules *ret = validate_EnumRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_EnumRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_EnumRules_serialize(const validate_EnumRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_EnumRules_msginit, arena, len); +} + +UPB_INLINE bool validate_EnumRules_has_const(const validate_EnumRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE int32_t validate_EnumRules_const(const validate_EnumRules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE bool validate_EnumRules_has_defined_only(const validate_EnumRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_EnumRules_defined_only(const validate_EnumRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t const* validate_EnumRules_in(const validate_EnumRules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); } +UPB_INLINE int32_t const* validate_EnumRules_not_in(const validate_EnumRules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(16, 24), len); } + +UPB_INLINE void validate_EnumRules_set_const(validate_EnumRules *msg, int32_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; +} +UPB_INLINE void validate_EnumRules_set_defined_only(validate_EnumRules *msg, bool value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE int32_t* validate_EnumRules_mutable_in(validate_EnumRules *msg, size_t *len) { + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len); +} +UPB_INLINE int32_t* validate_EnumRules_resize_in(validate_EnumRules *msg, size_t len, upb_arena *arena) { + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(12, 16), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); +} +UPB_INLINE bool validate_EnumRules_add_in(validate_EnumRules *msg, int32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(12, 16), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); +} +UPB_INLINE int32_t* validate_EnumRules_mutable_not_in(validate_EnumRules *msg, size_t *len) { + return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 24), len); +} +UPB_INLINE int32_t* validate_EnumRules_resize_not_in(validate_EnumRules *msg, size_t len, upb_arena *arena) { + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 24), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); +} +UPB_INLINE bool validate_EnumRules_add_not_in(validate_EnumRules *msg, int32_t val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(16, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); +} + + +/* validate.MessageRules */ + +UPB_INLINE validate_MessageRules *validate_MessageRules_new(upb_arena *arena) { + return (validate_MessageRules *)upb_msg_new(&validate_MessageRules_msginit, arena); +} +UPB_INLINE validate_MessageRules *validate_MessageRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_MessageRules *ret = validate_MessageRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_MessageRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_MessageRules_serialize(const validate_MessageRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_MessageRules_msginit, arena, len); +} + +UPB_INLINE bool validate_MessageRules_has_skip(const validate_MessageRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_MessageRules_skip(const validate_MessageRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool validate_MessageRules_has_required(const validate_MessageRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_MessageRules_required(const validate_MessageRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } + +UPB_INLINE void validate_MessageRules_set_skip(validate_MessageRules *msg, bool value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; +} +UPB_INLINE void validate_MessageRules_set_required(validate_MessageRules *msg, bool value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; +} + + +/* validate.RepeatedRules */ + +UPB_INLINE validate_RepeatedRules *validate_RepeatedRules_new(upb_arena *arena) { + return (validate_RepeatedRules *)upb_msg_new(&validate_RepeatedRules_msginit, arena); +} +UPB_INLINE validate_RepeatedRules *validate_RepeatedRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_RepeatedRules *ret = validate_RepeatedRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_RepeatedRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_RepeatedRules_serialize(const validate_RepeatedRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_RepeatedRules_msginit, arena, len); +} + +UPB_INLINE bool validate_RepeatedRules_has_min_items(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE uint64_t validate_RepeatedRules_min_items(const validate_RepeatedRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_RepeatedRules_has_max_items(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE uint64_t validate_RepeatedRules_max_items(const validate_RepeatedRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_RepeatedRules_has_unique(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_RepeatedRules_unique(const validate_RepeatedRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); } +UPB_INLINE bool validate_RepeatedRules_has_items(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE const validate_FieldRules* validate_RepeatedRules_items(const validate_RepeatedRules *msg) { return UPB_FIELD_AT(msg, const validate_FieldRules*, UPB_SIZE(28, 32)); } + +UPB_INLINE void validate_RepeatedRules_set_min_items(validate_RepeatedRules *msg, uint64_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_RepeatedRules_set_max_items(validate_RepeatedRules *msg, uint64_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_RepeatedRules_set_unique(validate_RepeatedRules *msg, bool value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; +} +UPB_INLINE void validate_RepeatedRules_set_items(validate_RepeatedRules *msg, validate_FieldRules* value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, validate_FieldRules*, UPB_SIZE(28, 32)) = value; +} +UPB_INLINE struct validate_FieldRules* validate_RepeatedRules_mutable_items(validate_RepeatedRules *msg, upb_arena *arena) { + struct validate_FieldRules* sub = (struct validate_FieldRules*)validate_RepeatedRules_items(msg); + if (sub == NULL) { + sub = (struct validate_FieldRules*)upb_msg_new(&validate_FieldRules_msginit, arena); + if (!sub) return NULL; + validate_RepeatedRules_set_items(msg, sub); + } + return sub; +} + + +/* validate.MapRules */ + +UPB_INLINE validate_MapRules *validate_MapRules_new(upb_arena *arena) { + return (validate_MapRules *)upb_msg_new(&validate_MapRules_msginit, arena); +} +UPB_INLINE validate_MapRules *validate_MapRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_MapRules *ret = validate_MapRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_MapRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_MapRules_serialize(const validate_MapRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_MapRules_msginit, arena, len); +} + +UPB_INLINE bool validate_MapRules_has_min_pairs(const validate_MapRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE uint64_t validate_MapRules_min_pairs(const validate_MapRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_MapRules_has_max_pairs(const validate_MapRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE uint64_t validate_MapRules_max_pairs(const validate_MapRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool validate_MapRules_has_no_sparse(const validate_MapRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_MapRules_no_sparse(const validate_MapRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); } +UPB_INLINE bool validate_MapRules_has_keys(const validate_MapRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE const validate_FieldRules* validate_MapRules_keys(const validate_MapRules *msg) { return UPB_FIELD_AT(msg, const validate_FieldRules*, UPB_SIZE(28, 32)); } +UPB_INLINE bool validate_MapRules_has_values(const validate_MapRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE const validate_FieldRules* validate_MapRules_values(const validate_MapRules *msg) { return UPB_FIELD_AT(msg, const validate_FieldRules*, UPB_SIZE(32, 40)); } + +UPB_INLINE void validate_MapRules_set_min_pairs(validate_MapRules *msg, uint64_t value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void validate_MapRules_set_max_pairs(validate_MapRules *msg, uint64_t value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE void validate_MapRules_set_no_sparse(validate_MapRules *msg, bool value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; +} +UPB_INLINE void validate_MapRules_set_keys(validate_MapRules *msg, validate_FieldRules* value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, validate_FieldRules*, UPB_SIZE(28, 32)) = value; +} +UPB_INLINE struct validate_FieldRules* validate_MapRules_mutable_keys(validate_MapRules *msg, upb_arena *arena) { + struct validate_FieldRules* sub = (struct validate_FieldRules*)validate_MapRules_keys(msg); + if (sub == NULL) { + sub = (struct validate_FieldRules*)upb_msg_new(&validate_FieldRules_msginit, arena); + if (!sub) return NULL; + validate_MapRules_set_keys(msg, sub); + } + return sub; +} +UPB_INLINE void validate_MapRules_set_values(validate_MapRules *msg, validate_FieldRules* value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, validate_FieldRules*, UPB_SIZE(32, 40)) = value; +} +UPB_INLINE struct validate_FieldRules* validate_MapRules_mutable_values(validate_MapRules *msg, upb_arena *arena) { + struct validate_FieldRules* sub = (struct validate_FieldRules*)validate_MapRules_values(msg); + if (sub == NULL) { + sub = (struct validate_FieldRules*)upb_msg_new(&validate_FieldRules_msginit, arena); + if (!sub) return NULL; + validate_MapRules_set_values(msg, sub); + } + return sub; +} + + +/* validate.AnyRules */ + +UPB_INLINE validate_AnyRules *validate_AnyRules_new(upb_arena *arena) { + return (validate_AnyRules *)upb_msg_new(&validate_AnyRules_msginit, arena); +} +UPB_INLINE validate_AnyRules *validate_AnyRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_AnyRules *ret = validate_AnyRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_AnyRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_AnyRules_serialize(const validate_AnyRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_AnyRules_msginit, arena, len); +} + +UPB_INLINE bool validate_AnyRules_has_required(const validate_AnyRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_AnyRules_required(const validate_AnyRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE upb_strview const* validate_AnyRules_in(const validate_AnyRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } +UPB_INLINE upb_strview const* validate_AnyRules_not_in(const validate_AnyRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } + +UPB_INLINE void validate_AnyRules_set_required(validate_AnyRules *msg, bool value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; +} +UPB_INLINE upb_strview* validate_AnyRules_mutable_in(validate_AnyRules *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); +} +UPB_INLINE upb_strview* validate_AnyRules_resize_in(validate_AnyRules *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool validate_AnyRules_add_in(validate_AnyRules *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(4, 8), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} +UPB_INLINE upb_strview* validate_AnyRules_mutable_not_in(validate_AnyRules *msg, size_t *len) { + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); +} +UPB_INLINE upb_strview* validate_AnyRules_resize_not_in(validate_AnyRules *msg, size_t len, upb_arena *arena) { + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); +} +UPB_INLINE bool validate_AnyRules_add_not_in(validate_AnyRules *msg, upb_strview val, upb_arena *arena) { + return _upb_array_append_accessor( + msg, UPB_SIZE(8, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} + + +/* validate.DurationRules */ + +UPB_INLINE validate_DurationRules *validate_DurationRules_new(upb_arena *arena) { + return (validate_DurationRules *)upb_msg_new(&validate_DurationRules_msginit, arena); +} +UPB_INLINE validate_DurationRules *validate_DurationRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_DurationRules *ret = validate_DurationRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_DurationRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_DurationRules_serialize(const validate_DurationRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_DurationRules_msginit, arena, len); +} + +UPB_INLINE bool validate_DurationRules_has_required(const validate_DurationRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_DurationRules_required(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool validate_DurationRules_has_const(const validate_DurationRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_const(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(4, 8)); } +UPB_INLINE bool validate_DurationRules_has_lt(const validate_DurationRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_lt(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); } +UPB_INLINE bool validate_DurationRules_has_lte(const validate_DurationRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_lte(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(12, 24)); } +UPB_INLINE bool validate_DurationRules_has_gt(const validate_DurationRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_gt(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(16, 32)); } +UPB_INLINE bool validate_DurationRules_has_gte(const validate_DurationRules *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_gte(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(20, 40)); } +UPB_INLINE const struct google_protobuf_Duration* const* validate_DurationRules_in(const validate_DurationRules *msg, size_t *len) { return (const struct google_protobuf_Duration* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } +UPB_INLINE const struct google_protobuf_Duration* const* validate_DurationRules_not_in(const validate_DurationRules *msg, size_t *len) { return (const struct google_protobuf_Duration* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } + +UPB_INLINE void validate_DurationRules_set_required(validate_DurationRules *msg, bool value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; +} +UPB_INLINE void validate_DurationRules_set_const(validate_DurationRules *msg, struct google_protobuf_Duration* value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(4, 8)) = value; +} +UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_const(validate_DurationRules *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_const(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + validate_DurationRules_set_const(msg, sub); + } + return sub; +} +UPB_INLINE void validate_DurationRules_set_lt(validate_DurationRules *msg, struct google_protobuf_Duration* value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_lt(validate_DurationRules *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_lt(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + validate_DurationRules_set_lt(msg, sub); + } + return sub; +} +UPB_INLINE void validate_DurationRules_set_lte(validate_DurationRules *msg, struct google_protobuf_Duration* value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 24)) = value; +} +UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_lte(validate_DurationRules *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_lte(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + validate_DurationRules_set_lte(msg, sub); + } + return sub; +} +UPB_INLINE void validate_DurationRules_set_gt(validate_DurationRules *msg, struct google_protobuf_Duration* value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(16, 32)) = value; +} +UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_gt(validate_DurationRules *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_gt(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + validate_DurationRules_set_gt(msg, sub); + } + return sub; +} +UPB_INLINE void validate_DurationRules_set_gte(validate_DurationRules *msg, struct google_protobuf_Duration* value) { + _upb_sethas(msg, 6); + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(20, 40)) = value; +} +UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_gte(validate_DurationRules *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_gte(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + validate_DurationRules_set_gte(msg, sub); + } + return sub; +} +UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_mutable_in(validate_DurationRules *msg, size_t *len) { + return (struct google_protobuf_Duration**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); +} +UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_resize_in(validate_DurationRules *msg, size_t len, upb_arena *arena) { + return (struct google_protobuf_Duration**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_add_in(validate_DurationRules *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_mutable_not_in(validate_DurationRules *msg, size_t *len) { + return (struct google_protobuf_Duration**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); +} +UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_resize_not_in(validate_DurationRules *msg, size_t len, upb_arena *arena) { + return (struct google_protobuf_Duration**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_add_not_in(validate_DurationRules *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} + + +/* validate.TimestampRules */ + +UPB_INLINE validate_TimestampRules *validate_TimestampRules_new(upb_arena *arena) { + return (validate_TimestampRules *)upb_msg_new(&validate_TimestampRules_msginit, arena); +} +UPB_INLINE validate_TimestampRules *validate_TimestampRules_parsenew(upb_strview buf, upb_arena *arena) { + validate_TimestampRules *ret = validate_TimestampRules_new(arena); + return (ret && upb_decode(buf, ret, &validate_TimestampRules_msginit)) ? ret : NULL; +} +UPB_INLINE char *validate_TimestampRules_serialize(const validate_TimestampRules *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &validate_TimestampRules_msginit, arena, len); +} + +UPB_INLINE bool validate_TimestampRules_has_required(const validate_TimestampRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_TimestampRules_required(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } +UPB_INLINE bool validate_TimestampRules_has_const(const validate_TimestampRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_const(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_TimestampRules_has_lt(const validate_TimestampRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_lt(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(12, 16)); } +UPB_INLINE bool validate_TimestampRules_has_lte(const validate_TimestampRules *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_lte(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(16, 24)); } +UPB_INLINE bool validate_TimestampRules_has_gt(const validate_TimestampRules *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_gt(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(20, 32)); } +UPB_INLINE bool validate_TimestampRules_has_gte(const validate_TimestampRules *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_gte(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(24, 40)); } +UPB_INLINE bool validate_TimestampRules_has_lt_now(const validate_TimestampRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_TimestampRules_lt_now(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)); } +UPB_INLINE bool validate_TimestampRules_has_gt_now(const validate_TimestampRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_TimestampRules_gt_now(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)); } +UPB_INLINE bool validate_TimestampRules_has_within(const validate_TimestampRules *msg) { return _upb_has_field(msg, 9); } +UPB_INLINE const struct google_protobuf_Duration* validate_TimestampRules_within(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(28, 48)); } + +UPB_INLINE void validate_TimestampRules_set_required(validate_TimestampRules *msg, bool value) { + _upb_sethas(msg, 1); + UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; +} +UPB_INLINE void validate_TimestampRules_set_const(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) { + _upb_sethas(msg, 4); + UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_const(validate_TimestampRules *msg, upb_arena *arena) { + struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_const(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + if (!sub) return NULL; + validate_TimestampRules_set_const(msg, sub); + } + return sub; +} +UPB_INLINE void validate_TimestampRules_set_lt(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) { + _upb_sethas(msg, 5); + UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(12, 16)) = value; +} +UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lt(validate_TimestampRules *msg, upb_arena *arena) { + struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_lt(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + if (!sub) return NULL; + validate_TimestampRules_set_lt(msg, sub); + } + return sub; +} +UPB_INLINE void validate_TimestampRules_set_lte(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) { + _upb_sethas(msg, 6); + UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(16, 24)) = value; +} +UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lte(validate_TimestampRules *msg, upb_arena *arena) { + struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_lte(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + if (!sub) return NULL; + validate_TimestampRules_set_lte(msg, sub); + } + return sub; +} +UPB_INLINE void validate_TimestampRules_set_gt(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) { + _upb_sethas(msg, 7); + UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(20, 32)) = value; +} +UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gt(validate_TimestampRules *msg, upb_arena *arena) { + struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_gt(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + if (!sub) return NULL; + validate_TimestampRules_set_gt(msg, sub); + } + return sub; +} +UPB_INLINE void validate_TimestampRules_set_gte(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) { + _upb_sethas(msg, 8); + UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(24, 40)) = value; +} +UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gte(validate_TimestampRules *msg, upb_arena *arena) { + struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_gte(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + if (!sub) return NULL; + validate_TimestampRules_set_gte(msg, sub); + } + return sub; +} +UPB_INLINE void validate_TimestampRules_set_lt_now(validate_TimestampRules *msg, bool value) { + _upb_sethas(msg, 2); + UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)) = value; +} +UPB_INLINE void validate_TimestampRules_set_gt_now(validate_TimestampRules *msg, bool value) { + _upb_sethas(msg, 3); + UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value; +} +UPB_INLINE void validate_TimestampRules_set_within(validate_TimestampRules *msg, struct google_protobuf_Duration* value) { + _upb_sethas(msg, 9); + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(28, 48)) = value; +} +UPB_INLINE struct google_protobuf_Duration* validate_TimestampRules_mutable_within(validate_TimestampRules *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_TimestampRules_within(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + validate_TimestampRules_set_within(msg, sub); + } + return sub; +} + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* VALIDATE_VALIDATE_PROTO_UPB_H_ */ diff --git a/tools/codegen/core/gen_upb_api.sh b/tools/codegen/core/gen_upb_api.sh index 9457e06f124..b3466c70566 100755 --- a/tools/codegen/core/gen_upb_api.sh +++ b/tools/codegen/core/gen_upb_api.sh @@ -25,12 +25,25 @@ bazel build :protoc-gen-upb cd ../.. proto_files=( \ + "google/api/annotations.proto" \ + "google/api/http.proto" \ "google/protobuf/any.proto" \ "google/protobuf/struct.proto" \ "google/protobuf/wrappers.proto" \ "google/protobuf/descriptor.proto" \ "google/protobuf/duration.proto" \ - "google/protobuf/timestamp.proto" ) + "google/protobuf/timestamp.proto" \ + "google/rpc/status.proto" \ + "gogoproto/gogo.proto" \ + "validate/validate.proto" \ + "envoy/type/percent.proto" \ + "envoy/type/range.proto" \ + "envoy/api/v2/core/address.proto" \ + "envoy/api/v2/core/base.proto" \ + "envoy/api/v2/core/health_check.proto" \ + "envoy/api/v2/discovery.proto" \ + "envoy/api/v2/eds.proto" \ + "envoy/api/v2/endpoint/endpoint.proto") for i in "${proto_files[@]}" do diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py index fd93cf31e05..aed63474b2d 100755 --- a/tools/distrib/check_copyright.py +++ b/tools/distrib/check_copyright.py @@ -104,20 +104,6 @@ _EXEMPT = frozenset(( # Designer-generated source 'examples/csharp/HelloworldXamarin/Droid/Resources/Resource.designer.cs', 'examples/csharp/HelloworldXamarin/iOS/ViewController.designer.cs', - - # Upb generated source - 'src/core/ext/upb-generated/google/protobuf/any.upb.h', - 'src/core/ext/upb-generated/google/protobuf/any.upb.c', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', )) RE_YEAR = r'Copyright (?P[0-9]+\-)?(?P[0-9]+) ([Tt]he )?gRPC [Aa]uthors(\.|)' @@ -168,6 +154,9 @@ except subprocess.CalledProcessError: for filename in filename_list: if filename in _EXEMPT: continue + # Skip check for upb generated code. + if filename.endswith('.upb.h') or filename.endswith('.upb.c'): + continue ext = os.path.splitext(filename)[1] base = os.path.basename(filename) if ext in RE_LICENSE: diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py index ac166ef3844..94794b1e43f 100755 --- a/tools/distrib/check_include_guards.py +++ b/tools/distrib/check_include_guards.py @@ -165,20 +165,6 @@ KNOWN_BAD = set([ 'src/core/tsi/alts/handshaker/transport_security_common.pb.h', 'include/grpc++/ext/reflection.grpc.pb.h', 'include/grpc++/ext/reflection.pb.h', - - # Upb generated code. - 'src/core/ext/upb-generated/google/protobuf/any.upb.h', - 'src/core/ext/upb-generated/google/protobuf/any.upb.c', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', ]) grep_filter = r"grep -E '^(include|src/core)/.*\.h$'" @@ -204,6 +190,9 @@ validator = GuardValidator() for filename in filename_list: if filename in KNOWN_BAD: continue + # Skip check for upb generated code. + if filename.endswith('.upb.h') or filename.endswith('.upb.c'): + continue ok = ok and validator.check(filename, args.fix) sys.exit(0 if ok else 1)