mirror of https://github.com/grpc/grpc.git
commit
31e6b69c8e
219 changed files with 5552 additions and 1887 deletions
@ -0,0 +1,40 @@ |
||||
# xDS Features in gRPC |
||||
|
||||
This document lists the [xDS](https://github.com/envoyproxy/data-plane-api/tree/master/envoy/api/v2) |
||||
features supported in various gRPC language implementations and versions. |
||||
|
||||
Note that a gRPC client will simply ignore the configuration of a feature it |
||||
does not support. The gRPC client does not generate a log |
||||
to indicate that some configuration was ignored. It is impractical to generate |
||||
a log and keep it up-to-date because xDS has a large number of APIs that gRPC |
||||
does not support and the APIs keep evolving too. We recommend reading the |
||||
[first gRFC](https://github.com/grpc/proposal/blob/master/A27-xds-global-load-balancing.md) |
||||
on xDS support in gRPC to understand the design philosophy. |
||||
|
||||
The EDS policy will *not* support |
||||
[overprovisioning](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/overprovisioning), |
||||
which is different from Envoy. Envoy takes the overprovisioning into |
||||
account in both [locality-weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight) |
||||
and [priority failover](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/priority), |
||||
but gRPC assumes that the xDS server will update it to redirect traffic |
||||
when this kind of graceful failover is needed. gRPC will send the |
||||
[`envoy.lb.does_not_support_overprovisioning` client |
||||
feature](https://github.com/envoyproxy/envoy/pull/10136) to the xDS |
||||
server to tell the xDS server that it will not perform graceful failover; |
||||
xDS server implementations may use this to decide whether to perform |
||||
graceful failover themselves. |
||||
|
||||
The EDS policy will not support per-endpoint stats; it will report only |
||||
per-locality stats. |
||||
|
||||
An [`lb_endpoint`](https://github.com/envoyproxy/envoy/blob/12a4bc430eaf440ceb0d11286cfbd4c16b79cdd1/api/envoy/api/v2/endpoint/endpoint_components.proto#L72) |
||||
is ignored if the `health_status` is not HEALTHY or UNKNOWN. |
||||
The optional `load_balancing_weight` is always ignored. |
||||
|
||||
Initially, only `google_default` channel creds will be supported |
||||
to authenticate with the xDS server. |
||||
|
||||
Features | gRFCs | [C++, Python,<br> Ruby, PHP, C#](https://github.com/grpc/grpc/releases) | [Java](https://github.com/grpc/grpc-java/releases) | [Go](https://github.com/grpc/grpc-go/releases) |
||||
---------|--------|--------------|------|------ |
||||
**xDS Infrastructure in gRPC client channel:**<br>LDS->RDS->CDS->EDS flow,<br>ADS stream, | [A27](https://github.com/grpc/proposal/blob/master/A27-xds-global-load-balancing.md) | v1.30.0 | v1.30.0 | v1.30.0 | |
||||
**Load Balancing:**<br>Virtual host matching,<br>Only default path ("" or "/") matching,<br>Priority-based weighted round-robin locality picking,<br>Round-robin endpoint picking within locality,<br>Cluster route action,<br>Client-side Load reporting via [LRS](https://github.com/envoyproxy/data-plane-api/blob/master/envoy/service/load_stats/v2/lrs.proto)| [A27](https://github.com/grpc/proposal/blob/master/A27-xds-global-load-balancing.md) | v1.30.0 | v1.30.0 | v1.30.0 | |
@ -1,3 +1,3 @@ |
||||
# OAuth2 on gRPC: Objective-C |
||||
|
||||
This is the supporting code for the tutorial "[OAuth2 on gRPC: Objective-C](https://grpc.io/docs/tutorials/auth/oauth2-objective-c.html)." |
||||
This is the supporting code for the tutorial "[OAuth2 on gRPC: Objective-C](https://grpc.io/docs/languages/objective-c/oauth2)." |
||||
|
@ -1,4 +1,4 @@ |
||||
# gRPC Basics: Objective-C |
||||
|
||||
This is the supporting code for the tutorial "[gRPC Basics: Objective-C](https://grpc.io/docs/tutorials/basic/objective-c.html)." |
||||
This is the supporting code for the tutorial "[gRPC Basics: Objective-C](https://grpc.io/docs/languages/objective-c/basics)." |
||||
|
||||
|
@ -1 +1 @@ |
||||
[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/quickstart/python.html) |
||||
[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/languages/python/quickstart) |
||||
|
@ -1 +1 @@ |
||||
[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/quickstart/python.html) |
||||
[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/languages/python/quickstart) |
||||
|
@ -1,3 +1,3 @@ |
||||
An example showing two stubs sharing a channel and two servicers sharing a server. |
||||
|
||||
More complete documentation lives at [grpc.io](https://grpc.io/docs/tutorials/basic/python.html). |
||||
More complete documentation lives at [grpc.io](https://grpc.io/docs/languages/python/basics). |
||||
|
@ -1 +1 @@ |
||||
[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/tutorials/basic/python.html) |
||||
[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/languages/python/basics) |
||||
|
@ -0,0 +1,62 @@ |
||||
//
|
||||
// Copyright 2020 gRPC authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#include <grpc/support/port_platform.h> |
||||
|
||||
#include "src/core/ext/filters/client_channel/config_selector.h" |
||||
|
||||
#include "src/core/lib/channel/channel_args.h" |
||||
|
||||
// Channel arg key for ConfigSelector.
|
||||
#define GRPC_ARG_CONFIG_SELECTOR "grpc.internal.config_selector" |
||||
|
||||
namespace grpc_core { |
||||
|
||||
namespace { |
||||
|
||||
void* ConfigSelectorArgCopy(void* p) { |
||||
ConfigSelector* config_selector = static_cast<ConfigSelector*>(p); |
||||
config_selector->Ref().release(); |
||||
return p; |
||||
} |
||||
|
||||
void ConfigSelectorArgDestroy(void* p) { |
||||
ConfigSelector* config_selector = static_cast<ConfigSelector*>(p); |
||||
config_selector->Unref(); |
||||
} |
||||
|
||||
int ConfigSelectorArgCmp(void* p, void* q) { return GPR_ICMP(p, q); } |
||||
|
||||
const grpc_arg_pointer_vtable kChannelArgVtable = { |
||||
ConfigSelectorArgCopy, ConfigSelectorArgDestroy, ConfigSelectorArgCmp}; |
||||
|
||||
} // namespace
|
||||
|
||||
grpc_arg ConfigSelector::MakeChannelArg() const { |
||||
return grpc_channel_arg_pointer_create( |
||||
const_cast<char*>(GRPC_ARG_CONFIG_SELECTOR), |
||||
const_cast<ConfigSelector*>(this), &kChannelArgVtable); |
||||
} |
||||
|
||||
RefCountedPtr<ConfigSelector> ConfigSelector::GetFromChannelArgs( |
||||
const grpc_channel_args& args) { |
||||
ConfigSelector* config_selector = |
||||
grpc_channel_args_find_pointer<ConfigSelector>(&args, |
||||
GRPC_ARG_CONFIG_SELECTOR); |
||||
return config_selector != nullptr ? config_selector->Ref() : nullptr; |
||||
} |
||||
|
||||
} // namespace grpc_core
|
@ -0,0 +1,91 @@ |
||||
//
|
||||
// Copyright 2020 gRPC authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONFIG_SELECTOR_H |
||||
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONFIG_SELECTOR_H |
||||
|
||||
#include <grpc/support/port_platform.h> |
||||
|
||||
#include <functional> |
||||
#include <map> |
||||
|
||||
#include "absl/strings/string_view.h" |
||||
|
||||
#include <grpc/impl/codegen/grpc_types.h> |
||||
#include <grpc/impl/codegen/slice.h> |
||||
|
||||
#include "src/core/ext/filters/client_channel/service_config.h" |
||||
#include "src/core/ext/filters/client_channel/service_config_parser.h" |
||||
#include "src/core/lib/gprpp/ref_counted.h" |
||||
#include "src/core/lib/gprpp/ref_counted_ptr.h" |
||||
#include "src/core/lib/transport/metadata_batch.h" |
||||
|
||||
namespace grpc_core { |
||||
|
||||
// Internal API used to allow resolver implementations to override
|
||||
// MethodConfig and provide input to LB policies on a per-call basis.
|
||||
class ConfigSelector : public RefCounted<ConfigSelector> { |
||||
public: |
||||
struct GetCallConfigArgs { |
||||
grpc_slice* path; |
||||
grpc_metadata_batch* initial_metadata; |
||||
}; |
||||
|
||||
struct CallConfig { |
||||
// Can be set to indicate the call should be failed.
|
||||
grpc_error* error = GRPC_ERROR_NONE; |
||||
// The per-method parsed configs that will be passed to
|
||||
// ServiceConfigCallData.
|
||||
const ServiceConfigParser::ParsedConfigVector* method_configs = nullptr; |
||||
// Call attributes that will be accessible to LB policy implementations.
|
||||
std::map<const char*, absl::string_view> call_attributes; |
||||
// A callback that, if set, will be invoked when the call is
|
||||
// committed (i.e., when we know that we will never again need to
|
||||
// ask the picker for a subchannel for this call).
|
||||
std::function<void()> on_call_committed; |
||||
}; |
||||
|
||||
virtual ~ConfigSelector() = default; |
||||
|
||||
virtual CallConfig GetCallConfig(GetCallConfigArgs args) = 0; |
||||
|
||||
grpc_arg MakeChannelArg() const; |
||||
static RefCountedPtr<ConfigSelector> GetFromChannelArgs( |
||||
const grpc_channel_args& args); |
||||
}; |
||||
|
||||
// Default ConfigSelector that gets the MethodConfig from the service config.
|
||||
class DefaultConfigSelector : public ConfigSelector { |
||||
public: |
||||
explicit DefaultConfigSelector(RefCountedPtr<ServiceConfig> service_config) |
||||
: service_config_(std::move(service_config)) {} |
||||
|
||||
CallConfig GetCallConfig(GetCallConfigArgs args) override { |
||||
CallConfig call_config; |
||||
if (service_config_ != nullptr) { |
||||
call_config.method_configs = |
||||
service_config_->GetMethodParsedConfigVector(*args.path); |
||||
} |
||||
return call_config; |
||||
} |
||||
|
||||
private: |
||||
RefCountedPtr<ServiceConfig> service_config_; |
||||
}; |
||||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONFIG_SELECTOR_H */ |
@ -0,0 +1,142 @@ |
||||
//
|
||||
// Copyright 2020 gRPC authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
// This filter reads GRPC_ARG_SERVICE_CONFIG and populates ServiceConfigCallData
|
||||
// in the call context per call for direct channels.
|
||||
|
||||
#include <grpc/support/port_platform.h> |
||||
|
||||
#include "src/core/ext/filters/client_channel/service_config_call_data.h" |
||||
#include "src/core/lib/channel/channel_args.h" |
||||
#include "src/core/lib/channel/channel_stack.h" |
||||
#include "src/core/lib/channel/channel_stack_builder.h" |
||||
#include "src/core/lib/surface/channel_init.h" |
||||
|
||||
namespace grpc_core { |
||||
|
||||
namespace { |
||||
|
||||
class ServiceConfigChannelArgChannelData { |
||||
public: |
||||
explicit ServiceConfigChannelArgChannelData( |
||||
const grpc_channel_element_args* args) { |
||||
const char* service_config_str = grpc_channel_args_find_string( |
||||
args->channel_args, GRPC_ARG_SERVICE_CONFIG); |
||||
if (service_config_str != nullptr) { |
||||
grpc_error* service_config_error = GRPC_ERROR_NONE; |
||||
auto service_config = |
||||
ServiceConfig::Create(service_config_str, &service_config_error); |
||||
if (service_config_error == GRPC_ERROR_NONE) { |
||||
service_config_ = std::move(service_config); |
||||
} else { |
||||
gpr_log(GPR_ERROR, "%s", grpc_error_string(service_config_error)); |
||||
} |
||||
GRPC_ERROR_UNREF(service_config_error); |
||||
} |
||||
} |
||||
|
||||
RefCountedPtr<ServiceConfig> service_config() const { |
||||
return service_config_; |
||||
} |
||||
|
||||
private: |
||||
RefCountedPtr<ServiceConfig> service_config_; |
||||
}; |
||||
|
||||
class ServiceConfigChannelArgCallData { |
||||
public: |
||||
ServiceConfigChannelArgCallData(grpc_call_element* elem, |
||||
const grpc_call_element_args* args) { |
||||
ServiceConfigChannelArgChannelData* chand = |
||||
static_cast<ServiceConfigChannelArgChannelData*>(elem->channel_data); |
||||
RefCountedPtr<ServiceConfig> service_config = chand->service_config(); |
||||
if (service_config != nullptr) { |
||||
GPR_DEBUG_ASSERT(args->context != nullptr); |
||||
const auto* method_params_vector = |
||||
service_config->GetMethodParsedConfigVector(args->path); |
||||
args->arena->New<ServiceConfigCallData>( |
||||
std::move(service_config), method_params_vector, args->context); |
||||
} |
||||
} |
||||
}; |
||||
|
||||
grpc_error* ServiceConfigChannelArgInitCallElem( |
||||
grpc_call_element* elem, const grpc_call_element_args* args) { |
||||
ServiceConfigChannelArgCallData* calld = |
||||
static_cast<ServiceConfigChannelArgCallData*>(elem->call_data); |
||||
new (calld) ServiceConfigChannelArgCallData(elem, args); |
||||
return GRPC_ERROR_NONE; |
||||
} |
||||
|
||||
void ServiceConfigChannelArgDestroyCallElem( |
||||
grpc_call_element* elem, const grpc_call_final_info* /* final_info */, |
||||
grpc_closure* /* then_schedule_closure */) { |
||||
ServiceConfigChannelArgCallData* calld = |
||||
static_cast<ServiceConfigChannelArgCallData*>(elem->call_data); |
||||
calld->~ServiceConfigChannelArgCallData(); |
||||
} |
||||
|
||||
grpc_error* ServiceConfigChannelArgInitChannelElem( |
||||
grpc_channel_element* elem, grpc_channel_element_args* args) { |
||||
ServiceConfigChannelArgChannelData* chand = |
||||
static_cast<ServiceConfigChannelArgChannelData*>(elem->channel_data); |
||||
new (chand) ServiceConfigChannelArgChannelData(args); |
||||
return GRPC_ERROR_NONE; |
||||
} |
||||
|
||||
void ServiceConfigChannelArgDestroyChannelElem(grpc_channel_element* elem) { |
||||
ServiceConfigChannelArgChannelData* chand = |
||||
static_cast<ServiceConfigChannelArgChannelData*>(elem->channel_data); |
||||
chand->~ServiceConfigChannelArgChannelData(); |
||||
} |
||||
|
||||
const grpc_channel_filter ServiceConfigChannelArgFilter = { |
||||
grpc_call_next_op, |
||||
grpc_channel_next_op, |
||||
sizeof(ServiceConfigChannelArgCallData), |
||||
ServiceConfigChannelArgInitCallElem, |
||||
grpc_call_stack_ignore_set_pollset_or_pollset_set, |
||||
ServiceConfigChannelArgDestroyCallElem, |
||||
sizeof(ServiceConfigChannelArgChannelData), |
||||
ServiceConfigChannelArgInitChannelElem, |
||||
ServiceConfigChannelArgDestroyChannelElem, |
||||
grpc_channel_next_get_info, |
||||
"service_config_channel_arg"}; |
||||
|
||||
bool maybe_add_service_config_channel_arg_filter( |
||||
grpc_channel_stack_builder* builder, void* /* arg */) { |
||||
const grpc_channel_args* channel_args = |
||||
grpc_channel_stack_builder_get_channel_arguments(builder); |
||||
if (grpc_channel_args_want_minimal_stack(channel_args) || |
||||
grpc_channel_args_find_string(channel_args, GRPC_ARG_SERVICE_CONFIG) == |
||||
nullptr) { |
||||
return true; |
||||
} |
||||
return grpc_channel_stack_builder_prepend_filter( |
||||
builder, &ServiceConfigChannelArgFilter, nullptr, nullptr); |
||||
} |
||||
|
||||
} // namespace
|
||||
|
||||
} // namespace grpc_core
|
||||
|
||||
void grpc_service_config_channel_arg_filter_init(void) { |
||||
grpc_channel_init_register_stage( |
||||
GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, |
||||
grpc_core::maybe_add_service_config_channel_arg_filter, nullptr); |
||||
} |
||||
|
||||
void grpc_service_config_channel_arg_filter_shutdown(void) {} |
@ -0,0 +1,173 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/config/rbac/v2/rbac.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#include <stddef.h> |
||||
#include "upb/msg.h" |
||||
#include "envoy/config/rbac/v2/rbac.upb.h" |
||||
#include "envoy/api/v2/core/address.upb.h" |
||||
#include "envoy/api/v2/route/route_components.upb.h" |
||||
#include "envoy/type/matcher/metadata.upb.h" |
||||
#include "envoy/type/matcher/path.upb.h" |
||||
#include "envoy/type/matcher/string.upb.h" |
||||
#include "google/api/expr/v1alpha1/syntax.upb.h" |
||||
#include "udpa/annotations/status.upb.h" |
||||
#include "validate/validate.upb.h" |
||||
|
||||
#include "upb/port_def.inc" |
||||
|
||||
static const upb_msglayout *const envoy_config_rbac_v2_RBAC_submsgs[1] = { |
||||
&envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field envoy_config_rbac_v2_RBAC__fields[2] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 14, 1}, |
||||
{2, UPB_SIZE(8, 8), 0, 0, 11, 3}, |
||||
}; |
||||
|
||||
const upb_msglayout envoy_config_rbac_v2_RBAC_msginit = { |
||||
&envoy_config_rbac_v2_RBAC_submsgs[0], |
||||
&envoy_config_rbac_v2_RBAC__fields[0], |
||||
UPB_SIZE(16, 16), 2, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const envoy_config_rbac_v2_RBAC_PoliciesEntry_submsgs[1] = { |
||||
&envoy_config_rbac_v2_Policy_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field envoy_config_rbac_v2_RBAC_PoliciesEntry__fields[2] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 9, 1}, |
||||
{2, UPB_SIZE(8, 16), 0, 0, 11, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit = { |
||||
&envoy_config_rbac_v2_RBAC_PoliciesEntry_submsgs[0], |
||||
&envoy_config_rbac_v2_RBAC_PoliciesEntry__fields[0], |
||||
UPB_SIZE(16, 32), 2, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const envoy_config_rbac_v2_Policy_submsgs[3] = { |
||||
&envoy_config_rbac_v2_Permission_msginit, |
||||
&envoy_config_rbac_v2_Principal_msginit, |
||||
&google_api_expr_v1alpha1_Expr_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field envoy_config_rbac_v2_Policy__fields[3] = { |
||||
{1, UPB_SIZE(4, 8), 0, 0, 11, 3}, |
||||
{2, UPB_SIZE(8, 16), 0, 1, 11, 3}, |
||||
{3, UPB_SIZE(0, 0), 0, 2, 11, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout envoy_config_rbac_v2_Policy_msginit = { |
||||
&envoy_config_rbac_v2_Policy_submsgs[0], |
||||
&envoy_config_rbac_v2_Policy__fields[0], |
||||
UPB_SIZE(12, 24), 3, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const envoy_config_rbac_v2_Permission_submsgs[8] = { |
||||
&envoy_api_v2_core_CidrRange_msginit, |
||||
&envoy_api_v2_route_HeaderMatcher_msginit, |
||||
&envoy_config_rbac_v2_Permission_msginit, |
||||
&envoy_config_rbac_v2_Permission_Set_msginit, |
||||
&envoy_type_matcher_MetadataMatcher_msginit, |
||||
&envoy_type_matcher_PathMatcher_msginit, |
||||
&envoy_type_matcher_StringMatcher_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field envoy_config_rbac_v2_Permission__fields[10] = { |
||||
{1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, |
||||
{2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, |
||||
{3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 8, 1}, |
||||
{4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, |
||||
{5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, |
||||
{6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 13, 1}, |
||||
{7, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1}, |
||||
{8, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, |
||||
{9, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 6, 11, 1}, |
||||
{10, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout envoy_config_rbac_v2_Permission_msginit = { |
||||
&envoy_config_rbac_v2_Permission_submsgs[0], |
||||
&envoy_config_rbac_v2_Permission__fields[0], |
||||
UPB_SIZE(8, 16), 10, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const envoy_config_rbac_v2_Permission_Set_submsgs[1] = { |
||||
&envoy_config_rbac_v2_Permission_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field envoy_config_rbac_v2_Permission_Set__fields[1] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 11, 3}, |
||||
}; |
||||
|
||||
const upb_msglayout envoy_config_rbac_v2_Permission_Set_msginit = { |
||||
&envoy_config_rbac_v2_Permission_Set_submsgs[0], |
||||
&envoy_config_rbac_v2_Permission_Set__fields[0], |
||||
UPB_SIZE(4, 8), 1, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const envoy_config_rbac_v2_Principal_submsgs[10] = { |
||||
&envoy_api_v2_core_CidrRange_msginit, |
||||
&envoy_api_v2_route_HeaderMatcher_msginit, |
||||
&envoy_config_rbac_v2_Principal_msginit, |
||||
&envoy_config_rbac_v2_Principal_Authenticated_msginit, |
||||
&envoy_config_rbac_v2_Principal_Set_msginit, |
||||
&envoy_type_matcher_MetadataMatcher_msginit, |
||||
&envoy_type_matcher_PathMatcher_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field envoy_config_rbac_v2_Principal__fields[11] = { |
||||
{1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1}, |
||||
{2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1}, |
||||
{3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 8, 1}, |
||||
{4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, |
||||
{5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, |
||||
{6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, |
||||
{7, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1}, |
||||
{8, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, |
||||
{9, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 6, 11, 1}, |
||||
{10, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, |
||||
{11, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout envoy_config_rbac_v2_Principal_msginit = { |
||||
&envoy_config_rbac_v2_Principal_submsgs[0], |
||||
&envoy_config_rbac_v2_Principal__fields[0], |
||||
UPB_SIZE(8, 16), 11, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const envoy_config_rbac_v2_Principal_Set_submsgs[1] = { |
||||
&envoy_config_rbac_v2_Principal_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field envoy_config_rbac_v2_Principal_Set__fields[1] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 11, 3}, |
||||
}; |
||||
|
||||
const upb_msglayout envoy_config_rbac_v2_Principal_Set_msginit = { |
||||
&envoy_config_rbac_v2_Principal_Set_submsgs[0], |
||||
&envoy_config_rbac_v2_Principal_Set__fields[0], |
||||
UPB_SIZE(4, 8), 1, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const envoy_config_rbac_v2_Principal_Authenticated_submsgs[1] = { |
||||
&envoy_type_matcher_StringMatcher_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field envoy_config_rbac_v2_Principal_Authenticated__fields[1] = { |
||||
{2, UPB_SIZE(0, 0), 0, 0, 11, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout envoy_config_rbac_v2_Principal_Authenticated_msginit = { |
||||
&envoy_config_rbac_v2_Principal_Authenticated_submsgs[0], |
||||
&envoy_config_rbac_v2_Principal_Authenticated__fields[0], |
||||
UPB_SIZE(4, 8), 1, false, |
||||
}; |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
@ -0,0 +1,615 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/config/rbac/v2/rbac.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#ifndef ENVOY_CONFIG_RBAC_V2_RBAC_PROTO_UPB_H_ |
||||
#define ENVOY_CONFIG_RBAC_V2_RBAC_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_config_rbac_v2_RBAC; |
||||
struct envoy_config_rbac_v2_RBAC_PoliciesEntry; |
||||
struct envoy_config_rbac_v2_Policy; |
||||
struct envoy_config_rbac_v2_Permission; |
||||
struct envoy_config_rbac_v2_Permission_Set; |
||||
struct envoy_config_rbac_v2_Principal; |
||||
struct envoy_config_rbac_v2_Principal_Set; |
||||
struct envoy_config_rbac_v2_Principal_Authenticated; |
||||
typedef struct envoy_config_rbac_v2_RBAC envoy_config_rbac_v2_RBAC; |
||||
typedef struct envoy_config_rbac_v2_RBAC_PoliciesEntry envoy_config_rbac_v2_RBAC_PoliciesEntry; |
||||
typedef struct envoy_config_rbac_v2_Policy envoy_config_rbac_v2_Policy; |
||||
typedef struct envoy_config_rbac_v2_Permission envoy_config_rbac_v2_Permission; |
||||
typedef struct envoy_config_rbac_v2_Permission_Set envoy_config_rbac_v2_Permission_Set; |
||||
typedef struct envoy_config_rbac_v2_Principal envoy_config_rbac_v2_Principal; |
||||
typedef struct envoy_config_rbac_v2_Principal_Set envoy_config_rbac_v2_Principal_Set; |
||||
typedef struct envoy_config_rbac_v2_Principal_Authenticated envoy_config_rbac_v2_Principal_Authenticated; |
||||
extern const upb_msglayout envoy_config_rbac_v2_RBAC_msginit; |
||||
extern const upb_msglayout envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit; |
||||
extern const upb_msglayout envoy_config_rbac_v2_Policy_msginit; |
||||
extern const upb_msglayout envoy_config_rbac_v2_Permission_msginit; |
||||
extern const upb_msglayout envoy_config_rbac_v2_Permission_Set_msginit; |
||||
extern const upb_msglayout envoy_config_rbac_v2_Principal_msginit; |
||||
extern const upb_msglayout envoy_config_rbac_v2_Principal_Set_msginit; |
||||
extern const upb_msglayout envoy_config_rbac_v2_Principal_Authenticated_msginit; |
||||
struct envoy_api_v2_core_CidrRange; |
||||
struct envoy_api_v2_route_HeaderMatcher; |
||||
struct envoy_type_matcher_MetadataMatcher; |
||||
struct envoy_type_matcher_PathMatcher; |
||||
struct envoy_type_matcher_StringMatcher; |
||||
struct google_api_expr_v1alpha1_Expr; |
||||
extern const upb_msglayout envoy_api_v2_core_CidrRange_msginit; |
||||
extern const upb_msglayout envoy_api_v2_route_HeaderMatcher_msginit; |
||||
extern const upb_msglayout envoy_type_matcher_MetadataMatcher_msginit; |
||||
extern const upb_msglayout envoy_type_matcher_PathMatcher_msginit; |
||||
extern const upb_msglayout envoy_type_matcher_StringMatcher_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_Expr_msginit; |
||||
|
||||
typedef enum { |
||||
envoy_config_rbac_v2_RBAC_ALLOW = 0, |
||||
envoy_config_rbac_v2_RBAC_DENY = 1 |
||||
} envoy_config_rbac_v2_RBAC_Action; |
||||
|
||||
|
||||
/* envoy.config.rbac.v2.RBAC */ |
||||
|
||||
UPB_INLINE envoy_config_rbac_v2_RBAC *envoy_config_rbac_v2_RBAC_new(upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_RBAC *)upb_msg_new(&envoy_config_rbac_v2_RBAC_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_RBAC *envoy_config_rbac_v2_RBAC_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
envoy_config_rbac_v2_RBAC *ret = envoy_config_rbac_v2_RBAC_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v2_RBAC_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *envoy_config_rbac_v2_RBAC_serialize(const envoy_config_rbac_v2_RBAC *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &envoy_config_rbac_v2_RBAC_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE int32_t envoy_config_rbac_v2_RBAC_action(const envoy_config_rbac_v2_RBAC *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } |
||||
UPB_INLINE const envoy_config_rbac_v2_RBAC_PoliciesEntry* const* envoy_config_rbac_v2_RBAC_policies(const envoy_config_rbac_v2_RBAC *msg, size_t *len) { return (const envoy_config_rbac_v2_RBAC_PoliciesEntry* const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); } |
||||
|
||||
UPB_INLINE void envoy_config_rbac_v2_RBAC_set_action(envoy_config_rbac_v2_RBAC *msg, int32_t value) { |
||||
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_RBAC_PoliciesEntry** envoy_config_rbac_v2_RBAC_mutable_policies(envoy_config_rbac_v2_RBAC *msg, size_t *len) { |
||||
return (envoy_config_rbac_v2_RBAC_PoliciesEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_RBAC_PoliciesEntry** envoy_config_rbac_v2_RBAC_resize_policies(envoy_config_rbac_v2_RBAC *msg, size_t len, upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_RBAC_PoliciesEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_RBAC_PoliciesEntry* envoy_config_rbac_v2_RBAC_add_policies(envoy_config_rbac_v2_RBAC *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_RBAC_PoliciesEntry* sub = (struct envoy_config_rbac_v2_RBAC_PoliciesEntry*)upb_msg_new(&envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit, arena); |
||||
bool ok = _upb_array_append_accessor( |
||||
msg, UPB_SIZE(8, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); |
||||
if (!ok) return NULL; |
||||
return sub; |
||||
} |
||||
|
||||
/* envoy.config.rbac.v2.RBAC.PoliciesEntry */ |
||||
|
||||
UPB_INLINE envoy_config_rbac_v2_RBAC_PoliciesEntry *envoy_config_rbac_v2_RBAC_PoliciesEntry_new(upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_RBAC_PoliciesEntry *)upb_msg_new(&envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_RBAC_PoliciesEntry *envoy_config_rbac_v2_RBAC_PoliciesEntry_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
envoy_config_rbac_v2_RBAC_PoliciesEntry *ret = envoy_config_rbac_v2_RBAC_PoliciesEntry_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *envoy_config_rbac_v2_RBAC_PoliciesEntry_serialize(const envoy_config_rbac_v2_RBAC_PoliciesEntry *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE upb_strview envoy_config_rbac_v2_RBAC_PoliciesEntry_key(const envoy_config_rbac_v2_RBAC_PoliciesEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } |
||||
UPB_INLINE const envoy_config_rbac_v2_Policy* envoy_config_rbac_v2_RBAC_PoliciesEntry_value(const envoy_config_rbac_v2_RBAC_PoliciesEntry *msg) { return UPB_FIELD_AT(msg, const envoy_config_rbac_v2_Policy*, UPB_SIZE(8, 16)); } |
||||
|
||||
UPB_INLINE void envoy_config_rbac_v2_RBAC_PoliciesEntry_set_key(envoy_config_rbac_v2_RBAC_PoliciesEntry *msg, upb_strview value) { |
||||
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_RBAC_PoliciesEntry_set_value(envoy_config_rbac_v2_RBAC_PoliciesEntry *msg, envoy_config_rbac_v2_Policy* value) { |
||||
UPB_FIELD_AT(msg, envoy_config_rbac_v2_Policy*, UPB_SIZE(8, 16)) = value; |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Policy* envoy_config_rbac_v2_RBAC_PoliciesEntry_mutable_value(envoy_config_rbac_v2_RBAC_PoliciesEntry *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Policy* sub = (struct envoy_config_rbac_v2_Policy*)envoy_config_rbac_v2_RBAC_PoliciesEntry_value(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_config_rbac_v2_Policy*)upb_msg_new(&envoy_config_rbac_v2_Policy_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_RBAC_PoliciesEntry_set_value(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
/* envoy.config.rbac.v2.Policy */ |
||||
|
||||
UPB_INLINE envoy_config_rbac_v2_Policy *envoy_config_rbac_v2_Policy_new(upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_Policy *)upb_msg_new(&envoy_config_rbac_v2_Policy_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_Policy *envoy_config_rbac_v2_Policy_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
envoy_config_rbac_v2_Policy *ret = envoy_config_rbac_v2_Policy_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v2_Policy_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *envoy_config_rbac_v2_Policy_serialize(const envoy_config_rbac_v2_Policy *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &envoy_config_rbac_v2_Policy_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE const envoy_config_rbac_v2_Permission* const* envoy_config_rbac_v2_Policy_permissions(const envoy_config_rbac_v2_Policy *msg, size_t *len) { return (const envoy_config_rbac_v2_Permission* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } |
||||
UPB_INLINE const envoy_config_rbac_v2_Principal* const* envoy_config_rbac_v2_Policy_principals(const envoy_config_rbac_v2_Policy *msg, size_t *len) { return (const envoy_config_rbac_v2_Principal* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } |
||||
UPB_INLINE const struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v2_Policy_condition(const envoy_config_rbac_v2_Policy *msg) { return UPB_FIELD_AT(msg, const struct google_api_expr_v1alpha1_Expr*, UPB_SIZE(0, 0)); } |
||||
|
||||
UPB_INLINE envoy_config_rbac_v2_Permission** envoy_config_rbac_v2_Policy_mutable_permissions(envoy_config_rbac_v2_Policy *msg, size_t *len) { |
||||
return (envoy_config_rbac_v2_Permission**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_Permission** envoy_config_rbac_v2_Policy_resize_permissions(envoy_config_rbac_v2_Policy *msg, size_t len, upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_Permission**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Permission* envoy_config_rbac_v2_Policy_add_permissions(envoy_config_rbac_v2_Policy *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Permission* sub = (struct envoy_config_rbac_v2_Permission*)upb_msg_new(&envoy_config_rbac_v2_Permission_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 envoy_config_rbac_v2_Principal** envoy_config_rbac_v2_Policy_mutable_principals(envoy_config_rbac_v2_Policy *msg, size_t *len) { |
||||
return (envoy_config_rbac_v2_Principal**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_Principal** envoy_config_rbac_v2_Policy_resize_principals(envoy_config_rbac_v2_Policy *msg, size_t len, upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_Principal**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Principal* envoy_config_rbac_v2_Policy_add_principals(envoy_config_rbac_v2_Policy *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Principal* sub = (struct envoy_config_rbac_v2_Principal*)upb_msg_new(&envoy_config_rbac_v2_Principal_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; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Policy_set_condition(envoy_config_rbac_v2_Policy *msg, struct google_api_expr_v1alpha1_Expr* value) { |
||||
UPB_FIELD_AT(msg, struct google_api_expr_v1alpha1_Expr*, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v2_Policy_mutable_condition(envoy_config_rbac_v2_Policy *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)envoy_config_rbac_v2_Policy_condition(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Policy_set_condition(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
/* envoy.config.rbac.v2.Permission */ |
||||
|
||||
UPB_INLINE envoy_config_rbac_v2_Permission *envoy_config_rbac_v2_Permission_new(upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_Permission *)upb_msg_new(&envoy_config_rbac_v2_Permission_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_Permission *envoy_config_rbac_v2_Permission_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
envoy_config_rbac_v2_Permission *ret = envoy_config_rbac_v2_Permission_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v2_Permission_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *envoy_config_rbac_v2_Permission_serialize(const envoy_config_rbac_v2_Permission *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &envoy_config_rbac_v2_Permission_msginit, arena, len); |
||||
} |
||||
|
||||
typedef enum { |
||||
envoy_config_rbac_v2_Permission_rule_and_rules = 1, |
||||
envoy_config_rbac_v2_Permission_rule_or_rules = 2, |
||||
envoy_config_rbac_v2_Permission_rule_any = 3, |
||||
envoy_config_rbac_v2_Permission_rule_header = 4, |
||||
envoy_config_rbac_v2_Permission_rule_url_path = 10, |
||||
envoy_config_rbac_v2_Permission_rule_destination_ip = 5, |
||||
envoy_config_rbac_v2_Permission_rule_destination_port = 6, |
||||
envoy_config_rbac_v2_Permission_rule_metadata = 7, |
||||
envoy_config_rbac_v2_Permission_rule_not_rule = 8, |
||||
envoy_config_rbac_v2_Permission_rule_requested_server_name = 9, |
||||
envoy_config_rbac_v2_Permission_rule_NOT_SET = 0 |
||||
} envoy_config_rbac_v2_Permission_rule_oneofcases; |
||||
UPB_INLINE envoy_config_rbac_v2_Permission_rule_oneofcases envoy_config_rbac_v2_Permission_rule_case(const envoy_config_rbac_v2_Permission* msg) { return (envoy_config_rbac_v2_Permission_rule_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } |
||||
|
||||
UPB_INLINE bool envoy_config_rbac_v2_Permission_has_and_rules(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } |
||||
UPB_INLINE const envoy_config_rbac_v2_Permission_Set* envoy_config_rbac_v2_Permission_and_rules(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Permission_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Permission_has_or_rules(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } |
||||
UPB_INLINE const envoy_config_rbac_v2_Permission_Set* envoy_config_rbac_v2_Permission_or_rules(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Permission_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Permission_has_any(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Permission_any(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, false); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Permission_has_header(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); } |
||||
UPB_INLINE const struct envoy_api_v2_route_HeaderMatcher* envoy_config_rbac_v2_Permission_header(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Permission_has_destination_ip(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 5); } |
||||
UPB_INLINE const struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Permission_destination_ip(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Permission_has_destination_port(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 6); } |
||||
UPB_INLINE uint32_t envoy_config_rbac_v2_Permission_destination_port(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, 0); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Permission_has_metadata(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 7); } |
||||
UPB_INLINE const struct envoy_type_matcher_MetadataMatcher* envoy_config_rbac_v2_Permission_metadata(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_MetadataMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Permission_has_not_rule(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 8); } |
||||
UPB_INLINE const envoy_config_rbac_v2_Permission* envoy_config_rbac_v2_Permission_not_rule(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Permission*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Permission_has_requested_server_name(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 9); } |
||||
UPB_INLINE const struct envoy_type_matcher_StringMatcher* envoy_config_rbac_v2_Permission_requested_server_name(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_StringMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Permission_has_url_path(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 10); } |
||||
UPB_INLINE const struct envoy_type_matcher_PathMatcher* envoy_config_rbac_v2_Permission_url_path(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_PathMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 10, NULL); } |
||||
|
||||
UPB_INLINE void envoy_config_rbac_v2_Permission_set_and_rules(envoy_config_rbac_v2_Permission *msg, envoy_config_rbac_v2_Permission_Set* value) { |
||||
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v2_Permission_Set*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Permission_Set* envoy_config_rbac_v2_Permission_mutable_and_rules(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Permission_Set* sub = (struct envoy_config_rbac_v2_Permission_Set*)envoy_config_rbac_v2_Permission_and_rules(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_config_rbac_v2_Permission_Set*)upb_msg_new(&envoy_config_rbac_v2_Permission_Set_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Permission_set_and_rules(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Permission_set_or_rules(envoy_config_rbac_v2_Permission *msg, envoy_config_rbac_v2_Permission_Set* value) { |
||||
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v2_Permission_Set*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Permission_Set* envoy_config_rbac_v2_Permission_mutable_or_rules(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Permission_Set* sub = (struct envoy_config_rbac_v2_Permission_Set*)envoy_config_rbac_v2_Permission_or_rules(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_config_rbac_v2_Permission_Set*)upb_msg_new(&envoy_config_rbac_v2_Permission_Set_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Permission_set_or_rules(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Permission_set_any(envoy_config_rbac_v2_Permission *msg, bool value) { |
||||
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3); |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Permission_set_header(envoy_config_rbac_v2_Permission *msg, struct envoy_api_v2_route_HeaderMatcher* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4); |
||||
} |
||||
UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_config_rbac_v2_Permission_mutable_header(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { |
||||
struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)envoy_config_rbac_v2_Permission_header(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Permission_set_header(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Permission_set_destination_ip(envoy_config_rbac_v2_Permission *msg, struct envoy_api_v2_core_CidrRange* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5); |
||||
} |
||||
UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Permission_mutable_destination_ip(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { |
||||
struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)envoy_config_rbac_v2_Permission_destination_ip(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Permission_set_destination_ip(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Permission_set_destination_port(envoy_config_rbac_v2_Permission *msg, uint32_t value) { |
||||
UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 6); |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Permission_set_metadata(envoy_config_rbac_v2_Permission *msg, struct envoy_type_matcher_MetadataMatcher* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_MetadataMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 7); |
||||
} |
||||
UPB_INLINE struct envoy_type_matcher_MetadataMatcher* envoy_config_rbac_v2_Permission_mutable_metadata(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { |
||||
struct envoy_type_matcher_MetadataMatcher* sub = (struct envoy_type_matcher_MetadataMatcher*)envoy_config_rbac_v2_Permission_metadata(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_type_matcher_MetadataMatcher*)upb_msg_new(&envoy_type_matcher_MetadataMatcher_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Permission_set_metadata(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Permission_set_not_rule(envoy_config_rbac_v2_Permission *msg, envoy_config_rbac_v2_Permission* value) { |
||||
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v2_Permission*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 8); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Permission* envoy_config_rbac_v2_Permission_mutable_not_rule(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Permission* sub = (struct envoy_config_rbac_v2_Permission*)envoy_config_rbac_v2_Permission_not_rule(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_config_rbac_v2_Permission*)upb_msg_new(&envoy_config_rbac_v2_Permission_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Permission_set_not_rule(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Permission_set_requested_server_name(envoy_config_rbac_v2_Permission *msg, struct envoy_type_matcher_StringMatcher* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_StringMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 9); |
||||
} |
||||
UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_config_rbac_v2_Permission_mutable_requested_server_name(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { |
||||
struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)envoy_config_rbac_v2_Permission_requested_server_name(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Permission_set_requested_server_name(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Permission_set_url_path(envoy_config_rbac_v2_Permission *msg, struct envoy_type_matcher_PathMatcher* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_PathMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 10); |
||||
} |
||||
UPB_INLINE struct envoy_type_matcher_PathMatcher* envoy_config_rbac_v2_Permission_mutable_url_path(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { |
||||
struct envoy_type_matcher_PathMatcher* sub = (struct envoy_type_matcher_PathMatcher*)envoy_config_rbac_v2_Permission_url_path(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_type_matcher_PathMatcher*)upb_msg_new(&envoy_type_matcher_PathMatcher_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Permission_set_url_path(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
/* envoy.config.rbac.v2.Permission.Set */ |
||||
|
||||
UPB_INLINE envoy_config_rbac_v2_Permission_Set *envoy_config_rbac_v2_Permission_Set_new(upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_Permission_Set *)upb_msg_new(&envoy_config_rbac_v2_Permission_Set_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_Permission_Set *envoy_config_rbac_v2_Permission_Set_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
envoy_config_rbac_v2_Permission_Set *ret = envoy_config_rbac_v2_Permission_Set_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v2_Permission_Set_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *envoy_config_rbac_v2_Permission_Set_serialize(const envoy_config_rbac_v2_Permission_Set *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &envoy_config_rbac_v2_Permission_Set_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE const envoy_config_rbac_v2_Permission* const* envoy_config_rbac_v2_Permission_Set_rules(const envoy_config_rbac_v2_Permission_Set *msg, size_t *len) { return (const envoy_config_rbac_v2_Permission* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } |
||||
|
||||
UPB_INLINE envoy_config_rbac_v2_Permission** envoy_config_rbac_v2_Permission_Set_mutable_rules(envoy_config_rbac_v2_Permission_Set *msg, size_t *len) { |
||||
return (envoy_config_rbac_v2_Permission**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_Permission** envoy_config_rbac_v2_Permission_Set_resize_rules(envoy_config_rbac_v2_Permission_Set *msg, size_t len, upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_Permission**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Permission* envoy_config_rbac_v2_Permission_Set_add_rules(envoy_config_rbac_v2_Permission_Set *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Permission* sub = (struct envoy_config_rbac_v2_Permission*)upb_msg_new(&envoy_config_rbac_v2_Permission_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.config.rbac.v2.Principal */ |
||||
|
||||
UPB_INLINE envoy_config_rbac_v2_Principal *envoy_config_rbac_v2_Principal_new(upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_Principal *)upb_msg_new(&envoy_config_rbac_v2_Principal_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_Principal *envoy_config_rbac_v2_Principal_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
envoy_config_rbac_v2_Principal *ret = envoy_config_rbac_v2_Principal_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v2_Principal_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *envoy_config_rbac_v2_Principal_serialize(const envoy_config_rbac_v2_Principal *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &envoy_config_rbac_v2_Principal_msginit, arena, len); |
||||
} |
||||
|
||||
typedef enum { |
||||
envoy_config_rbac_v2_Principal_identifier_and_ids = 1, |
||||
envoy_config_rbac_v2_Principal_identifier_or_ids = 2, |
||||
envoy_config_rbac_v2_Principal_identifier_any = 3, |
||||
envoy_config_rbac_v2_Principal_identifier_authenticated = 4, |
||||
envoy_config_rbac_v2_Principal_identifier_source_ip = 5, |
||||
envoy_config_rbac_v2_Principal_identifier_direct_remote_ip = 10, |
||||
envoy_config_rbac_v2_Principal_identifier_remote_ip = 11, |
||||
envoy_config_rbac_v2_Principal_identifier_header = 6, |
||||
envoy_config_rbac_v2_Principal_identifier_url_path = 9, |
||||
envoy_config_rbac_v2_Principal_identifier_metadata = 7, |
||||
envoy_config_rbac_v2_Principal_identifier_not_id = 8, |
||||
envoy_config_rbac_v2_Principal_identifier_NOT_SET = 0 |
||||
} envoy_config_rbac_v2_Principal_identifier_oneofcases; |
||||
UPB_INLINE envoy_config_rbac_v2_Principal_identifier_oneofcases envoy_config_rbac_v2_Principal_identifier_case(const envoy_config_rbac_v2_Principal* msg) { return (envoy_config_rbac_v2_Principal_identifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } |
||||
|
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_has_and_ids(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } |
||||
UPB_INLINE const envoy_config_rbac_v2_Principal_Set* envoy_config_rbac_v2_Principal_and_ids(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Principal_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_has_or_ids(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } |
||||
UPB_INLINE const envoy_config_rbac_v2_Principal_Set* envoy_config_rbac_v2_Principal_or_ids(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Principal_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_has_any(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_any(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, false); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_has_authenticated(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); } |
||||
UPB_INLINE const envoy_config_rbac_v2_Principal_Authenticated* envoy_config_rbac_v2_Principal_authenticated(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Principal_Authenticated*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_has_source_ip(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 5); } |
||||
UPB_INLINE const struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_source_ip(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_has_header(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 6); } |
||||
UPB_INLINE const struct envoy_api_v2_route_HeaderMatcher* envoy_config_rbac_v2_Principal_header(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_has_metadata(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 7); } |
||||
UPB_INLINE const struct envoy_type_matcher_MetadataMatcher* envoy_config_rbac_v2_Principal_metadata(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_MetadataMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_has_not_id(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 8); } |
||||
UPB_INLINE const envoy_config_rbac_v2_Principal* envoy_config_rbac_v2_Principal_not_id(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Principal*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_has_url_path(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 9); } |
||||
UPB_INLINE const struct envoy_type_matcher_PathMatcher* envoy_config_rbac_v2_Principal_url_path(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_PathMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_has_direct_remote_ip(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 10); } |
||||
UPB_INLINE const struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_direct_remote_ip(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 10, NULL); } |
||||
UPB_INLINE bool envoy_config_rbac_v2_Principal_has_remote_ip(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 11); } |
||||
UPB_INLINE const struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_remote_ip(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 11, NULL); } |
||||
|
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_set_and_ids(envoy_config_rbac_v2_Principal *msg, envoy_config_rbac_v2_Principal_Set* value) { |
||||
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v2_Principal_Set*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Principal_Set* envoy_config_rbac_v2_Principal_mutable_and_ids(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Principal_Set* sub = (struct envoy_config_rbac_v2_Principal_Set*)envoy_config_rbac_v2_Principal_and_ids(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_config_rbac_v2_Principal_Set*)upb_msg_new(&envoy_config_rbac_v2_Principal_Set_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Principal_set_and_ids(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_set_or_ids(envoy_config_rbac_v2_Principal *msg, envoy_config_rbac_v2_Principal_Set* value) { |
||||
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v2_Principal_Set*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Principal_Set* envoy_config_rbac_v2_Principal_mutable_or_ids(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Principal_Set* sub = (struct envoy_config_rbac_v2_Principal_Set*)envoy_config_rbac_v2_Principal_or_ids(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_config_rbac_v2_Principal_Set*)upb_msg_new(&envoy_config_rbac_v2_Principal_Set_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Principal_set_or_ids(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_set_any(envoy_config_rbac_v2_Principal *msg, bool value) { |
||||
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3); |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_set_authenticated(envoy_config_rbac_v2_Principal *msg, envoy_config_rbac_v2_Principal_Authenticated* value) { |
||||
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v2_Principal_Authenticated*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Principal_Authenticated* envoy_config_rbac_v2_Principal_mutable_authenticated(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Principal_Authenticated* sub = (struct envoy_config_rbac_v2_Principal_Authenticated*)envoy_config_rbac_v2_Principal_authenticated(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_config_rbac_v2_Principal_Authenticated*)upb_msg_new(&envoy_config_rbac_v2_Principal_Authenticated_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Principal_set_authenticated(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_set_source_ip(envoy_config_rbac_v2_Principal *msg, struct envoy_api_v2_core_CidrRange* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5); |
||||
} |
||||
UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_mutable_source_ip(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { |
||||
struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)envoy_config_rbac_v2_Principal_source_ip(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Principal_set_source_ip(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_set_header(envoy_config_rbac_v2_Principal *msg, struct envoy_api_v2_route_HeaderMatcher* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 6); |
||||
} |
||||
UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_config_rbac_v2_Principal_mutable_header(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { |
||||
struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)envoy_config_rbac_v2_Principal_header(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Principal_set_header(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_set_metadata(envoy_config_rbac_v2_Principal *msg, struct envoy_type_matcher_MetadataMatcher* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_MetadataMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 7); |
||||
} |
||||
UPB_INLINE struct envoy_type_matcher_MetadataMatcher* envoy_config_rbac_v2_Principal_mutable_metadata(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { |
||||
struct envoy_type_matcher_MetadataMatcher* sub = (struct envoy_type_matcher_MetadataMatcher*)envoy_config_rbac_v2_Principal_metadata(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_type_matcher_MetadataMatcher*)upb_msg_new(&envoy_type_matcher_MetadataMatcher_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Principal_set_metadata(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_set_not_id(envoy_config_rbac_v2_Principal *msg, envoy_config_rbac_v2_Principal* value) { |
||||
UPB_WRITE_ONEOF(msg, envoy_config_rbac_v2_Principal*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 8); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Principal* envoy_config_rbac_v2_Principal_mutable_not_id(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Principal* sub = (struct envoy_config_rbac_v2_Principal*)envoy_config_rbac_v2_Principal_not_id(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_config_rbac_v2_Principal*)upb_msg_new(&envoy_config_rbac_v2_Principal_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Principal_set_not_id(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_set_url_path(envoy_config_rbac_v2_Principal *msg, struct envoy_type_matcher_PathMatcher* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_PathMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 9); |
||||
} |
||||
UPB_INLINE struct envoy_type_matcher_PathMatcher* envoy_config_rbac_v2_Principal_mutable_url_path(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { |
||||
struct envoy_type_matcher_PathMatcher* sub = (struct envoy_type_matcher_PathMatcher*)envoy_config_rbac_v2_Principal_url_path(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_type_matcher_PathMatcher*)upb_msg_new(&envoy_type_matcher_PathMatcher_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Principal_set_url_path(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_set_direct_remote_ip(envoy_config_rbac_v2_Principal *msg, struct envoy_api_v2_core_CidrRange* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 10); |
||||
} |
||||
UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_mutable_direct_remote_ip(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { |
||||
struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)envoy_config_rbac_v2_Principal_direct_remote_ip(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Principal_set_direct_remote_ip(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_set_remote_ip(envoy_config_rbac_v2_Principal *msg, struct envoy_api_v2_core_CidrRange* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 11); |
||||
} |
||||
UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_mutable_remote_ip(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { |
||||
struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)envoy_config_rbac_v2_Principal_remote_ip(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Principal_set_remote_ip(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
/* envoy.config.rbac.v2.Principal.Set */ |
||||
|
||||
UPB_INLINE envoy_config_rbac_v2_Principal_Set *envoy_config_rbac_v2_Principal_Set_new(upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_Principal_Set *)upb_msg_new(&envoy_config_rbac_v2_Principal_Set_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_Principal_Set *envoy_config_rbac_v2_Principal_Set_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
envoy_config_rbac_v2_Principal_Set *ret = envoy_config_rbac_v2_Principal_Set_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v2_Principal_Set_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *envoy_config_rbac_v2_Principal_Set_serialize(const envoy_config_rbac_v2_Principal_Set *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &envoy_config_rbac_v2_Principal_Set_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE const envoy_config_rbac_v2_Principal* const* envoy_config_rbac_v2_Principal_Set_ids(const envoy_config_rbac_v2_Principal_Set *msg, size_t *len) { return (const envoy_config_rbac_v2_Principal* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } |
||||
|
||||
UPB_INLINE envoy_config_rbac_v2_Principal** envoy_config_rbac_v2_Principal_Set_mutable_ids(envoy_config_rbac_v2_Principal_Set *msg, size_t *len) { |
||||
return (envoy_config_rbac_v2_Principal**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_Principal** envoy_config_rbac_v2_Principal_Set_resize_ids(envoy_config_rbac_v2_Principal_Set *msg, size_t len, upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_Principal**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); |
||||
} |
||||
UPB_INLINE struct envoy_config_rbac_v2_Principal* envoy_config_rbac_v2_Principal_Set_add_ids(envoy_config_rbac_v2_Principal_Set *msg, upb_arena *arena) { |
||||
struct envoy_config_rbac_v2_Principal* sub = (struct envoy_config_rbac_v2_Principal*)upb_msg_new(&envoy_config_rbac_v2_Principal_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.config.rbac.v2.Principal.Authenticated */ |
||||
|
||||
UPB_INLINE envoy_config_rbac_v2_Principal_Authenticated *envoy_config_rbac_v2_Principal_Authenticated_new(upb_arena *arena) { |
||||
return (envoy_config_rbac_v2_Principal_Authenticated *)upb_msg_new(&envoy_config_rbac_v2_Principal_Authenticated_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_config_rbac_v2_Principal_Authenticated *envoy_config_rbac_v2_Principal_Authenticated_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
envoy_config_rbac_v2_Principal_Authenticated *ret = envoy_config_rbac_v2_Principal_Authenticated_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v2_Principal_Authenticated_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *envoy_config_rbac_v2_Principal_Authenticated_serialize(const envoy_config_rbac_v2_Principal_Authenticated *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &envoy_config_rbac_v2_Principal_Authenticated_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE const struct envoy_type_matcher_StringMatcher* envoy_config_rbac_v2_Principal_Authenticated_principal_name(const envoy_config_rbac_v2_Principal_Authenticated *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_matcher_StringMatcher*, UPB_SIZE(0, 0)); } |
||||
|
||||
UPB_INLINE void envoy_config_rbac_v2_Principal_Authenticated_set_principal_name(envoy_config_rbac_v2_Principal_Authenticated *msg, struct envoy_type_matcher_StringMatcher* value) { |
||||
UPB_FIELD_AT(msg, struct envoy_type_matcher_StringMatcher*, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_config_rbac_v2_Principal_Authenticated_mutable_principal_name(envoy_config_rbac_v2_Principal_Authenticated *msg, upb_arena *arena) { |
||||
struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)envoy_config_rbac_v2_Principal_Authenticated_principal_name(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_config_rbac_v2_Principal_Authenticated_set_principal_name(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
#ifdef __cplusplus |
||||
} /* extern "C" */ |
||||
#endif |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
||||
#endif /* ENVOY_CONFIG_RBAC_V2_RBAC_PROTO_UPB_H_ */ |
@ -0,0 +1,33 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/type/matcher/path.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#include <stddef.h> |
||||
#include "upb/msg.h" |
||||
#include "envoy/type/matcher/path.upb.h" |
||||
#include "envoy/type/matcher/string.upb.h" |
||||
#include "udpa/annotations/status.upb.h" |
||||
#include "validate/validate.upb.h" |
||||
|
||||
#include "upb/port_def.inc" |
||||
|
||||
static const upb_msglayout *const envoy_type_matcher_PathMatcher_submsgs[1] = { |
||||
&envoy_type_matcher_StringMatcher_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field envoy_type_matcher_PathMatcher__fields[1] = { |
||||
{1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout envoy_type_matcher_PathMatcher_msginit = { |
||||
&envoy_type_matcher_PathMatcher_submsgs[0], |
||||
&envoy_type_matcher_PathMatcher__fields[0], |
||||
UPB_SIZE(8, 16), 1, false, |
||||
}; |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
@ -0,0 +1,72 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/type/matcher/path.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#ifndef ENVOY_TYPE_MATCHER_PATH_PROTO_UPB_H_ |
||||
#define ENVOY_TYPE_MATCHER_PATH_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_matcher_PathMatcher; |
||||
typedef struct envoy_type_matcher_PathMatcher envoy_type_matcher_PathMatcher; |
||||
extern const upb_msglayout envoy_type_matcher_PathMatcher_msginit; |
||||
struct envoy_type_matcher_StringMatcher; |
||||
extern const upb_msglayout envoy_type_matcher_StringMatcher_msginit; |
||||
|
||||
|
||||
/* envoy.type.matcher.PathMatcher */ |
||||
|
||||
UPB_INLINE envoy_type_matcher_PathMatcher *envoy_type_matcher_PathMatcher_new(upb_arena *arena) { |
||||
return (envoy_type_matcher_PathMatcher *)upb_msg_new(&envoy_type_matcher_PathMatcher_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_type_matcher_PathMatcher *envoy_type_matcher_PathMatcher_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
envoy_type_matcher_PathMatcher *ret = envoy_type_matcher_PathMatcher_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_PathMatcher_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *envoy_type_matcher_PathMatcher_serialize(const envoy_type_matcher_PathMatcher *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &envoy_type_matcher_PathMatcher_msginit, arena, len); |
||||
} |
||||
|
||||
typedef enum { |
||||
envoy_type_matcher_PathMatcher_rule_path = 1, |
||||
envoy_type_matcher_PathMatcher_rule_NOT_SET = 0 |
||||
} envoy_type_matcher_PathMatcher_rule_oneofcases; |
||||
UPB_INLINE envoy_type_matcher_PathMatcher_rule_oneofcases envoy_type_matcher_PathMatcher_rule_case(const envoy_type_matcher_PathMatcher* msg) { return (envoy_type_matcher_PathMatcher_rule_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } |
||||
|
||||
UPB_INLINE bool envoy_type_matcher_PathMatcher_has_path(const envoy_type_matcher_PathMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } |
||||
UPB_INLINE const struct envoy_type_matcher_StringMatcher* envoy_type_matcher_PathMatcher_path(const envoy_type_matcher_PathMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_StringMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } |
||||
|
||||
UPB_INLINE void envoy_type_matcher_PathMatcher_set_path(envoy_type_matcher_PathMatcher *msg, struct envoy_type_matcher_StringMatcher* value) { |
||||
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_StringMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); |
||||
} |
||||
UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_type_matcher_PathMatcher_mutable_path(envoy_type_matcher_PathMatcher *msg, upb_arena *arena) { |
||||
struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)envoy_type_matcher_PathMatcher_path(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_type_matcher_PathMatcher_set_path(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
#ifdef __cplusplus |
||||
} /* extern "C" */ |
||||
#endif |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
||||
#endif /* ENVOY_TYPE_MATCHER_PATH_PROTO_UPB_H_ */ |
@ -0,0 +1,234 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* google/api/expr/v1alpha1/syntax.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#include <stddef.h> |
||||
#include "upb/msg.h" |
||||
#include "google/api/expr/v1alpha1/syntax.upb.h" |
||||
#include "google/protobuf/duration.upb.h" |
||||
#include "google/protobuf/struct.upb.h" |
||||
#include "google/protobuf/timestamp.upb.h" |
||||
|
||||
#include "upb/port_def.inc" |
||||
|
||||
static const upb_msglayout *const google_api_expr_v1alpha1_ParsedExpr_submsgs[2] = { |
||||
&google_api_expr_v1alpha1_Expr_msginit, |
||||
&google_api_expr_v1alpha1_SourceInfo_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_ParsedExpr__fields[2] = { |
||||
{2, UPB_SIZE(0, 0), 0, 0, 11, 1}, |
||||
{3, UPB_SIZE(4, 8), 0, 1, 11, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_ParsedExpr_msginit = { |
||||
&google_api_expr_v1alpha1_ParsedExpr_submsgs[0], |
||||
&google_api_expr_v1alpha1_ParsedExpr__fields[0], |
||||
UPB_SIZE(8, 16), 2, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const google_api_expr_v1alpha1_Expr_submsgs[7] = { |
||||
&google_api_expr_v1alpha1_Constant_msginit, |
||||
&google_api_expr_v1alpha1_Expr_Call_msginit, |
||||
&google_api_expr_v1alpha1_Expr_Comprehension_msginit, |
||||
&google_api_expr_v1alpha1_Expr_CreateList_msginit, |
||||
&google_api_expr_v1alpha1_Expr_CreateStruct_msginit, |
||||
&google_api_expr_v1alpha1_Expr_Ident_msginit, |
||||
&google_api_expr_v1alpha1_Expr_Select_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_Expr__fields[8] = { |
||||
{2, UPB_SIZE(0, 0), 0, 0, 3, 1}, |
||||
{3, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 0, 11, 1}, |
||||
{4, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 5, 11, 1}, |
||||
{5, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 6, 11, 1}, |
||||
{6, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 1, 11, 1}, |
||||
{7, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 3, 11, 1}, |
||||
{8, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 4, 11, 1}, |
||||
{9, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 2, 11, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_Expr_msginit = { |
||||
&google_api_expr_v1alpha1_Expr_submsgs[0], |
||||
&google_api_expr_v1alpha1_Expr__fields[0], |
||||
UPB_SIZE(16, 24), 8, false, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_Ident__fields[1] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 9, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_Expr_Ident_msginit = { |
||||
NULL, |
||||
&google_api_expr_v1alpha1_Expr_Ident__fields[0], |
||||
UPB_SIZE(8, 16), 1, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const google_api_expr_v1alpha1_Expr_Select_submsgs[1] = { |
||||
&google_api_expr_v1alpha1_Expr_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_Select__fields[3] = { |
||||
{1, UPB_SIZE(12, 24), 0, 0, 11, 1}, |
||||
{2, UPB_SIZE(4, 8), 0, 0, 9, 1}, |
||||
{3, UPB_SIZE(0, 0), 0, 0, 8, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_Expr_Select_msginit = { |
||||
&google_api_expr_v1alpha1_Expr_Select_submsgs[0], |
||||
&google_api_expr_v1alpha1_Expr_Select__fields[0], |
||||
UPB_SIZE(16, 32), 3, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const google_api_expr_v1alpha1_Expr_Call_submsgs[2] = { |
||||
&google_api_expr_v1alpha1_Expr_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_Call__fields[3] = { |
||||
{1, UPB_SIZE(8, 16), 0, 0, 11, 1}, |
||||
{2, UPB_SIZE(0, 0), 0, 0, 9, 1}, |
||||
{3, UPB_SIZE(12, 24), 0, 0, 11, 3}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_Expr_Call_msginit = { |
||||
&google_api_expr_v1alpha1_Expr_Call_submsgs[0], |
||||
&google_api_expr_v1alpha1_Expr_Call__fields[0], |
||||
UPB_SIZE(16, 32), 3, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const google_api_expr_v1alpha1_Expr_CreateList_submsgs[1] = { |
||||
&google_api_expr_v1alpha1_Expr_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_CreateList__fields[1] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 11, 3}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_Expr_CreateList_msginit = { |
||||
&google_api_expr_v1alpha1_Expr_CreateList_submsgs[0], |
||||
&google_api_expr_v1alpha1_Expr_CreateList__fields[0], |
||||
UPB_SIZE(4, 8), 1, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const google_api_expr_v1alpha1_Expr_CreateStruct_submsgs[1] = { |
||||
&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_CreateStruct__fields[2] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 9, 1}, |
||||
{2, UPB_SIZE(8, 16), 0, 0, 11, 3}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_Expr_CreateStruct_msginit = { |
||||
&google_api_expr_v1alpha1_Expr_CreateStruct_submsgs[0], |
||||
&google_api_expr_v1alpha1_Expr_CreateStruct__fields[0], |
||||
UPB_SIZE(16, 32), 2, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const google_api_expr_v1alpha1_Expr_CreateStruct_Entry_submsgs[2] = { |
||||
&google_api_expr_v1alpha1_Expr_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_CreateStruct_Entry__fields[4] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 3, 1}, |
||||
{2, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 0, 9, 1}, |
||||
{3, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 0, 11, 1}, |
||||
{4, UPB_SIZE(8, 8), 0, 0, 11, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit = { |
||||
&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_submsgs[0], |
||||
&google_api_expr_v1alpha1_Expr_CreateStruct_Entry__fields[0], |
||||
UPB_SIZE(24, 48), 4, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const google_api_expr_v1alpha1_Expr_Comprehension_submsgs[5] = { |
||||
&google_api_expr_v1alpha1_Expr_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_Comprehension__fields[7] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 9, 1}, |
||||
{2, UPB_SIZE(16, 32), 0, 0, 11, 1}, |
||||
{3, UPB_SIZE(8, 16), 0, 0, 9, 1}, |
||||
{4, UPB_SIZE(20, 40), 0, 0, 11, 1}, |
||||
{5, UPB_SIZE(24, 48), 0, 0, 11, 1}, |
||||
{6, UPB_SIZE(28, 56), 0, 0, 11, 1}, |
||||
{7, UPB_SIZE(32, 64), 0, 0, 11, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_Expr_Comprehension_msginit = { |
||||
&google_api_expr_v1alpha1_Expr_Comprehension_submsgs[0], |
||||
&google_api_expr_v1alpha1_Expr_Comprehension__fields[0], |
||||
UPB_SIZE(40, 80), 7, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const google_api_expr_v1alpha1_Constant_submsgs[2] = { |
||||
&google_protobuf_Duration_msginit, |
||||
&google_protobuf_Timestamp_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_Constant__fields[9] = { |
||||
{1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 14, 1}, |
||||
{2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 8, 1}, |
||||
{3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 3, 1}, |
||||
{4, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 4, 1}, |
||||
{5, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 1, 1}, |
||||
{6, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, |
||||
{7, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 12, 1}, |
||||
{8, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 1}, |
||||
{9, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 1, 11, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_Constant_msginit = { |
||||
&google_api_expr_v1alpha1_Constant_submsgs[0], |
||||
&google_api_expr_v1alpha1_Constant__fields[0], |
||||
UPB_SIZE(16, 32), 9, false, |
||||
}; |
||||
|
||||
static const upb_msglayout *const google_api_expr_v1alpha1_SourceInfo_submsgs[1] = { |
||||
&google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_SourceInfo__fields[4] = { |
||||
{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, 5, 3}, |
||||
{4, UPB_SIZE(20, 40), 0, 0, 11, 3}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_SourceInfo_msginit = { |
||||
&google_api_expr_v1alpha1_SourceInfo_submsgs[0], |
||||
&google_api_expr_v1alpha1_SourceInfo__fields[0], |
||||
UPB_SIZE(24, 48), 4, false, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_SourceInfo_PositionsEntry__fields[2] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 3, 1}, |
||||
{2, UPB_SIZE(8, 8), 0, 0, 5, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit = { |
||||
NULL, |
||||
&google_api_expr_v1alpha1_SourceInfo_PositionsEntry__fields[0], |
||||
UPB_SIZE(16, 16), 2, false, |
||||
}; |
||||
|
||||
static const upb_msglayout_field google_api_expr_v1alpha1_SourcePosition__fields[4] = { |
||||
{1, UPB_SIZE(12, 16), 0, 0, 9, 1}, |
||||
{2, UPB_SIZE(0, 0), 0, 0, 5, 1}, |
||||
{3, UPB_SIZE(4, 4), 0, 0, 5, 1}, |
||||
{4, UPB_SIZE(8, 8), 0, 0, 5, 1}, |
||||
}; |
||||
|
||||
const upb_msglayout google_api_expr_v1alpha1_SourcePosition_msginit = { |
||||
NULL, |
||||
&google_api_expr_v1alpha1_SourcePosition__fields[0], |
||||
UPB_SIZE(24, 32), 4, false, |
||||
}; |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
@ -0,0 +1,760 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* google/api/expr/v1alpha1/syntax.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#ifndef GOOGLE_API_EXPR_V1ALPHA1_SYNTAX_PROTO_UPB_H_ |
||||
#define GOOGLE_API_EXPR_V1ALPHA1_SYNTAX_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_expr_v1alpha1_ParsedExpr; |
||||
struct google_api_expr_v1alpha1_Expr; |
||||
struct google_api_expr_v1alpha1_Expr_Ident; |
||||
struct google_api_expr_v1alpha1_Expr_Select; |
||||
struct google_api_expr_v1alpha1_Expr_Call; |
||||
struct google_api_expr_v1alpha1_Expr_CreateList; |
||||
struct google_api_expr_v1alpha1_Expr_CreateStruct; |
||||
struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry; |
||||
struct google_api_expr_v1alpha1_Expr_Comprehension; |
||||
struct google_api_expr_v1alpha1_Constant; |
||||
struct google_api_expr_v1alpha1_SourceInfo; |
||||
struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry; |
||||
struct google_api_expr_v1alpha1_SourcePosition; |
||||
typedef struct google_api_expr_v1alpha1_ParsedExpr google_api_expr_v1alpha1_ParsedExpr; |
||||
typedef struct google_api_expr_v1alpha1_Expr google_api_expr_v1alpha1_Expr; |
||||
typedef struct google_api_expr_v1alpha1_Expr_Ident google_api_expr_v1alpha1_Expr_Ident; |
||||
typedef struct google_api_expr_v1alpha1_Expr_Select google_api_expr_v1alpha1_Expr_Select; |
||||
typedef struct google_api_expr_v1alpha1_Expr_Call google_api_expr_v1alpha1_Expr_Call; |
||||
typedef struct google_api_expr_v1alpha1_Expr_CreateList google_api_expr_v1alpha1_Expr_CreateList; |
||||
typedef struct google_api_expr_v1alpha1_Expr_CreateStruct google_api_expr_v1alpha1_Expr_CreateStruct; |
||||
typedef struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry google_api_expr_v1alpha1_Expr_CreateStruct_Entry; |
||||
typedef struct google_api_expr_v1alpha1_Expr_Comprehension google_api_expr_v1alpha1_Expr_Comprehension; |
||||
typedef struct google_api_expr_v1alpha1_Constant google_api_expr_v1alpha1_Constant; |
||||
typedef struct google_api_expr_v1alpha1_SourceInfo google_api_expr_v1alpha1_SourceInfo; |
||||
typedef struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry google_api_expr_v1alpha1_SourceInfo_PositionsEntry; |
||||
typedef struct google_api_expr_v1alpha1_SourcePosition google_api_expr_v1alpha1_SourcePosition; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_ParsedExpr_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_Expr_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_Expr_Ident_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_Expr_Select_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_Expr_Call_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_Expr_CreateList_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_Expr_CreateStruct_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_Expr_Comprehension_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_Constant_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_SourceInfo_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit; |
||||
extern const upb_msglayout google_api_expr_v1alpha1_SourcePosition_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; |
||||
|
||||
|
||||
/* google.api.expr.v1alpha1.ParsedExpr */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_ParsedExpr *google_api_expr_v1alpha1_ParsedExpr_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_ParsedExpr *)upb_msg_new(&google_api_expr_v1alpha1_ParsedExpr_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_ParsedExpr *google_api_expr_v1alpha1_ParsedExpr_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_ParsedExpr *ret = google_api_expr_v1alpha1_ParsedExpr_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_ParsedExpr_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_ParsedExpr_serialize(const google_api_expr_v1alpha1_ParsedExpr *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_ParsedExpr_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_ParsedExpr_expr(const google_api_expr_v1alpha1_ParsedExpr *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(0, 0)); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_ParsedExpr_source_info(const google_api_expr_v1alpha1_ParsedExpr *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_SourceInfo*, UPB_SIZE(4, 8)); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_ParsedExpr_set_expr(google_api_expr_v1alpha1_ParsedExpr *msg, google_api_expr_v1alpha1_Expr* value) { |
||||
UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_ParsedExpr_mutable_expr(google_api_expr_v1alpha1_ParsedExpr *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_ParsedExpr_expr(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_ParsedExpr_set_expr(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_ParsedExpr_set_source_info(google_api_expr_v1alpha1_ParsedExpr *msg, google_api_expr_v1alpha1_SourceInfo* value) { |
||||
UPB_FIELD_AT(msg, google_api_expr_v1alpha1_SourceInfo*, UPB_SIZE(4, 8)) = value; |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_ParsedExpr_mutable_source_info(google_api_expr_v1alpha1_ParsedExpr *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_SourceInfo* sub = (struct google_api_expr_v1alpha1_SourceInfo*)google_api_expr_v1alpha1_ParsedExpr_source_info(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_SourceInfo*)upb_msg_new(&google_api_expr_v1alpha1_SourceInfo_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_ParsedExpr_set_source_info(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.Expr */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_Expr *google_api_expr_v1alpha1_Expr_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Expr *)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr *google_api_expr_v1alpha1_Expr_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_Expr *ret = google_api_expr_v1alpha1_Expr_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_Expr_serialize(const google_api_expr_v1alpha1_Expr *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_msginit, arena, len); |
||||
} |
||||
|
||||
typedef enum { |
||||
google_api_expr_v1alpha1_Expr_expr_kind_const_expr = 3, |
||||
google_api_expr_v1alpha1_Expr_expr_kind_ident_expr = 4, |
||||
google_api_expr_v1alpha1_Expr_expr_kind_select_expr = 5, |
||||
google_api_expr_v1alpha1_Expr_expr_kind_call_expr = 6, |
||||
google_api_expr_v1alpha1_Expr_expr_kind_list_expr = 7, |
||||
google_api_expr_v1alpha1_Expr_expr_kind_struct_expr = 8, |
||||
google_api_expr_v1alpha1_Expr_expr_kind_comprehension_expr = 9, |
||||
google_api_expr_v1alpha1_Expr_expr_kind_NOT_SET = 0 |
||||
} google_api_expr_v1alpha1_Expr_expr_kind_oneofcases; |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_expr_kind_oneofcases google_api_expr_v1alpha1_Expr_expr_kind_case(const google_api_expr_v1alpha1_Expr* msg) { return (google_api_expr_v1alpha1_Expr_expr_kind_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 16)); } |
||||
|
||||
UPB_INLINE int64_t google_api_expr_v1alpha1_Expr_id(const google_api_expr_v1alpha1_Expr *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_const_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 3); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Expr_const_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Constant*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 3, NULL); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_ident_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 4); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr_Ident* google_api_expr_v1alpha1_Expr_ident_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Ident*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 4, NULL); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_select_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 5); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr_Select* google_api_expr_v1alpha1_Expr_select_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Select*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 5, NULL); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_call_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 6); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr_Call* google_api_expr_v1alpha1_Expr_call_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Call*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 6, NULL); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_list_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 7); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr_CreateList* google_api_expr_v1alpha1_Expr_list_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_CreateList*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 7, NULL); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_struct_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 8); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr_CreateStruct* google_api_expr_v1alpha1_Expr_struct_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_CreateStruct*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 8, NULL); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_comprehension_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 9); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr_Comprehension* google_api_expr_v1alpha1_Expr_comprehension_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Comprehension*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 9, NULL); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_set_id(google_api_expr_v1alpha1_Expr *msg, int64_t value) { |
||||
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_set_const_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Constant* value) { |
||||
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Constant*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 3); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Expr_mutable_const_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Constant* sub = (struct google_api_expr_v1alpha1_Constant*)google_api_expr_v1alpha1_Expr_const_expr(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Constant*)upb_msg_new(&google_api_expr_v1alpha1_Constant_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_set_const_expr(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_set_ident_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_Ident* value) { |
||||
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Ident*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 4); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr_Ident* google_api_expr_v1alpha1_Expr_mutable_ident_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr_Ident* sub = (struct google_api_expr_v1alpha1_Expr_Ident*)google_api_expr_v1alpha1_Expr_ident_expr(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr_Ident*)upb_msg_new(&google_api_expr_v1alpha1_Expr_Ident_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_set_ident_expr(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_set_select_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_Select* value) { |
||||
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Select*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 5); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr_Select* google_api_expr_v1alpha1_Expr_mutable_select_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr_Select* sub = (struct google_api_expr_v1alpha1_Expr_Select*)google_api_expr_v1alpha1_Expr_select_expr(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr_Select*)upb_msg_new(&google_api_expr_v1alpha1_Expr_Select_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_set_select_expr(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_set_call_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_Call* value) { |
||||
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Call*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 6); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr_Call* google_api_expr_v1alpha1_Expr_mutable_call_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr_Call* sub = (struct google_api_expr_v1alpha1_Expr_Call*)google_api_expr_v1alpha1_Expr_call_expr(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr_Call*)upb_msg_new(&google_api_expr_v1alpha1_Expr_Call_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_set_call_expr(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_set_list_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_CreateList* value) { |
||||
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_CreateList*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 7); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr_CreateList* google_api_expr_v1alpha1_Expr_mutable_list_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr_CreateList* sub = (struct google_api_expr_v1alpha1_Expr_CreateList*)google_api_expr_v1alpha1_Expr_list_expr(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr_CreateList*)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateList_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_set_list_expr(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_set_struct_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_CreateStruct* value) { |
||||
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_CreateStruct*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 8); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr_CreateStruct* google_api_expr_v1alpha1_Expr_mutable_struct_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr_CreateStruct* sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct*)google_api_expr_v1alpha1_Expr_struct_expr(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct*)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_set_struct_expr(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_set_comprehension_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Expr_Comprehension* value) { |
||||
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr_Comprehension*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 9); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr_Comprehension* google_api_expr_v1alpha1_Expr_mutable_comprehension_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr_Comprehension* sub = (struct google_api_expr_v1alpha1_Expr_Comprehension*)google_api_expr_v1alpha1_Expr_comprehension_expr(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr_Comprehension*)upb_msg_new(&google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_set_comprehension_expr(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.Expr.Ident */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_Ident *google_api_expr_v1alpha1_Expr_Ident_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Expr_Ident *)upb_msg_new(&google_api_expr_v1alpha1_Expr_Ident_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_Ident *google_api_expr_v1alpha1_Expr_Ident_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_Expr_Ident *ret = google_api_expr_v1alpha1_Expr_Ident_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Ident_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_Expr_Ident_serialize(const google_api_expr_v1alpha1_Expr_Ident *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Ident_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Ident_name(const google_api_expr_v1alpha1_Expr_Ident *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Ident_set_name(google_api_expr_v1alpha1_Expr_Ident *msg, upb_strview value) { |
||||
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.Expr.Select */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_Select *google_api_expr_v1alpha1_Expr_Select_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Expr_Select *)upb_msg_new(&google_api_expr_v1alpha1_Expr_Select_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_Select *google_api_expr_v1alpha1_Expr_Select_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_Expr_Select *ret = google_api_expr_v1alpha1_Expr_Select_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Select_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_Expr_Select_serialize(const google_api_expr_v1alpha1_Expr_Select *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Select_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Select_operand(const google_api_expr_v1alpha1_Expr_Select *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(12, 24)); } |
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Select_field(const google_api_expr_v1alpha1_Expr_Select *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Expr_Select_test_only(const google_api_expr_v1alpha1_Expr_Select *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_operand(google_api_expr_v1alpha1_Expr_Select *msg, google_api_expr_v1alpha1_Expr* value) { |
||||
UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(12, 24)) = value; |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Select_mutable_operand(google_api_expr_v1alpha1_Expr_Select *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Select_operand(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_Select_set_operand(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_field(google_api_expr_v1alpha1_Expr_Select *msg, upb_strview value) { |
||||
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_test_only(google_api_expr_v1alpha1_Expr_Select *msg, bool value) { |
||||
UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.Expr.Call */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_Call *google_api_expr_v1alpha1_Expr_Call_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Expr_Call *)upb_msg_new(&google_api_expr_v1alpha1_Expr_Call_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_Call *google_api_expr_v1alpha1_Expr_Call_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_Expr_Call *ret = google_api_expr_v1alpha1_Expr_Call_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Call_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_Expr_Call_serialize(const google_api_expr_v1alpha1_Expr_Call *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Call_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_target(const google_api_expr_v1alpha1_Expr_Call *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(8, 16)); } |
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Call_function(const google_api_expr_v1alpha1_Expr_Call *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* const* google_api_expr_v1alpha1_Expr_Call_args(const google_api_expr_v1alpha1_Expr_Call *msg, size_t *len) { return (const google_api_expr_v1alpha1_Expr* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Call_set_target(google_api_expr_v1alpha1_Expr_Call *msg, google_api_expr_v1alpha1_Expr* value) { |
||||
UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(8, 16)) = value; |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_mutable_target(google_api_expr_v1alpha1_Expr_Call *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Call_target(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_Call_set_target(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Call_set_function(google_api_expr_v1alpha1_Expr_Call *msg, upb_strview value) { |
||||
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_Call_mutable_args(google_api_expr_v1alpha1_Expr_Call *msg, size_t *len) { |
||||
return (google_api_expr_v1alpha1_Expr**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_Call_resize_args(google_api_expr_v1alpha1_Expr_Call *msg, size_t len, upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Expr**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_add_args(google_api_expr_v1alpha1_Expr_Call *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_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; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.Expr.CreateList */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_CreateList *google_api_expr_v1alpha1_Expr_CreateList_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Expr_CreateList *)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateList_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_CreateList *google_api_expr_v1alpha1_Expr_CreateList_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_Expr_CreateList *ret = google_api_expr_v1alpha1_Expr_CreateList_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateList_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_Expr_CreateList_serialize(const google_api_expr_v1alpha1_Expr_CreateList *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_CreateList_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* const* google_api_expr_v1alpha1_Expr_CreateList_elements(const google_api_expr_v1alpha1_Expr_CreateList *msg, size_t *len) { return (const google_api_expr_v1alpha1_Expr* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_CreateList_mutable_elements(google_api_expr_v1alpha1_Expr_CreateList *msg, size_t *len) { |
||||
return (google_api_expr_v1alpha1_Expr**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_CreateList_resize_elements(google_api_expr_v1alpha1_Expr_CreateList *msg, size_t len, upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Expr**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateList_add_elements(google_api_expr_v1alpha1_Expr_CreateList *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_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; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.Expr.CreateStruct */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct *google_api_expr_v1alpha1_Expr_CreateStruct_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Expr_CreateStruct *)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct *google_api_expr_v1alpha1_Expr_CreateStruct_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_Expr_CreateStruct *ret = google_api_expr_v1alpha1_Expr_CreateStruct_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_Expr_CreateStruct_serialize(const google_api_expr_v1alpha1_Expr_CreateStruct *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_CreateStruct_message_name(const google_api_expr_v1alpha1_Expr_CreateStruct *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* const* google_api_expr_v1alpha1_Expr_CreateStruct_entries(const google_api_expr_v1alpha1_Expr_CreateStruct *msg, size_t *len) { return (const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_set_message_name(google_api_expr_v1alpha1_Expr_CreateStruct *msg, upb_strview value) { |
||||
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry** google_api_expr_v1alpha1_Expr_CreateStruct_mutable_entries(google_api_expr_v1alpha1_Expr_CreateStruct *msg, size_t *len) { |
||||
return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry** google_api_expr_v1alpha1_Expr_CreateStruct_resize_entries(google_api_expr_v1alpha1_Expr_CreateStruct *msg, size_t len, upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry* google_api_expr_v1alpha1_Expr_CreateStruct_add_entries(google_api_expr_v1alpha1_Expr_CreateStruct *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry* sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry*)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_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; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.Expr.CreateStruct.Entry */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry *google_api_expr_v1alpha1_Expr_CreateStruct_Entry_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry *)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry *google_api_expr_v1alpha1_Expr_CreateStruct_Entry_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_Expr_CreateStruct_Entry *ret = google_api_expr_v1alpha1_Expr_CreateStruct_Entry_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_Expr_CreateStruct_Entry_serialize(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena, len); |
||||
} |
||||
|
||||
typedef enum { |
||||
google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_field_key = 2, |
||||
google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_map_key = 3, |
||||
google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_NOT_SET = 0 |
||||
} google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases; |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_case(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) { return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 32)); } |
||||
|
||||
UPB_INLINE int64_t google_api_expr_v1alpha1_Expr_CreateStruct_Entry_id(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 32), 2); } |
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_CreateStruct_Entry_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 2, upb_strview_make("", strlen(""))); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 32), 3); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 3, NULL); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_value(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(8, 8)); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_id(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, int64_t value) { |
||||
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_field_key(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_strview value) { |
||||
UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 2); |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_map_key(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, google_api_expr_v1alpha1_Expr* value) { |
||||
UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 3); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_mutable_map_key(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_CreateStruct_Entry_map_key(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_map_key(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_value(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, google_api_expr_v1alpha1_Expr* value) { |
||||
UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(8, 8)) = value; |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_mutable_value(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_CreateStruct_Entry_value(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_value(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.Expr.Comprehension */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_Comprehension *google_api_expr_v1alpha1_Expr_Comprehension_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Expr_Comprehension *)upb_msg_new(&google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Expr_Comprehension *google_api_expr_v1alpha1_Expr_Comprehension_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_Expr_Comprehension *ret = google_api_expr_v1alpha1_Expr_Comprehension_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_Expr_Comprehension_serialize(const google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Comprehension_iter_var(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_iter_range(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(16, 32)); } |
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Comprehension_accu_var(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_accu_init(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(20, 40)); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_condition(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(24, 48)); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_step(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(28, 56)); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_result(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(32, 64)); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_iter_var(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_strview value) { |
||||
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_iter_range(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) { |
||||
UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(16, 32)) = value; |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_iter_range(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_iter_range(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_Comprehension_set_iter_range(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_accu_var(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_strview value) { |
||||
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_accu_init(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) { |
||||
UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(20, 40)) = value; |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_accu_init(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_accu_init(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_Comprehension_set_accu_init(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_loop_condition(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) { |
||||
UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(24, 48)) = value; |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_loop_condition(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_loop_condition(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_Comprehension_set_loop_condition(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_loop_step(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) { |
||||
UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(28, 56)) = value; |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_loop_step(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_loop_step(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_Comprehension_set_loop_step(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_result(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) { |
||||
UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(32, 64)) = value; |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_result(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_result(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Expr_Comprehension_set_result(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.Constant */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_Constant *google_api_expr_v1alpha1_Constant_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_Constant *)upb_msg_new(&google_api_expr_v1alpha1_Constant_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_Constant *google_api_expr_v1alpha1_Constant_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_Constant *ret = google_api_expr_v1alpha1_Constant_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Constant_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_Constant_serialize(const google_api_expr_v1alpha1_Constant *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_Constant_msginit, arena, len); |
||||
} |
||||
|
||||
typedef enum { |
||||
google_api_expr_v1alpha1_Constant_constant_kind_null_value = 1, |
||||
google_api_expr_v1alpha1_Constant_constant_kind_bool_value = 2, |
||||
google_api_expr_v1alpha1_Constant_constant_kind_int64_value = 3, |
||||
google_api_expr_v1alpha1_Constant_constant_kind_uint64_value = 4, |
||||
google_api_expr_v1alpha1_Constant_constant_kind_double_value = 5, |
||||
google_api_expr_v1alpha1_Constant_constant_kind_string_value = 6, |
||||
google_api_expr_v1alpha1_Constant_constant_kind_bytes_value = 7, |
||||
google_api_expr_v1alpha1_Constant_constant_kind_duration_value = 8, |
||||
google_api_expr_v1alpha1_Constant_constant_kind_timestamp_value = 9, |
||||
google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET = 0 |
||||
} google_api_expr_v1alpha1_Constant_constant_kind_oneofcases; |
||||
UPB_INLINE google_api_expr_v1alpha1_Constant_constant_kind_oneofcases google_api_expr_v1alpha1_Constant_constant_kind_case(const google_api_expr_v1alpha1_Constant* msg) { return (google_api_expr_v1alpha1_Constant_constant_kind_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 16)); } |
||||
|
||||
UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_null_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } |
||||
UPB_INLINE int32_t google_api_expr_v1alpha1_Constant_null_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, google_protobuf_NULL_VALUE); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_bool_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 2); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Constant_bool_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, false); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_int64_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 3); } |
||||
UPB_INLINE int64_t google_api_expr_v1alpha1_Constant_int64_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, int64_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 3, 0); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_uint64_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 4); } |
||||
UPB_INLINE uint64_t google_api_expr_v1alpha1_Constant_uint64_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, uint64_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 4, 0); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_double_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 5); } |
||||
UPB_INLINE double google_api_expr_v1alpha1_Constant_double_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, double, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 5, 0); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_string_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 6); } |
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_Constant_string_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 6, upb_strview_make("", strlen(""))); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_bytes_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 7); } |
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_Constant_bytes_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 7, upb_strview_make("", strlen(""))); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_duration_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 8); } |
||||
UPB_INLINE const struct google_protobuf_Duration* google_api_expr_v1alpha1_Constant_duration_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Duration*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 8, NULL); } |
||||
UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_timestamp_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 9); } |
||||
UPB_INLINE const struct google_protobuf_Timestamp* google_api_expr_v1alpha1_Constant_timestamp_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 9, NULL); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_Constant_set_null_value(google_api_expr_v1alpha1_Constant *msg, int32_t value) { |
||||
UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1); |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Constant_set_bool_value(google_api_expr_v1alpha1_Constant *msg, bool value) { |
||||
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2); |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Constant_set_int64_value(google_api_expr_v1alpha1_Constant *msg, int64_t value) { |
||||
UPB_WRITE_ONEOF(msg, int64_t, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 3); |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Constant_set_uint64_value(google_api_expr_v1alpha1_Constant *msg, uint64_t value) { |
||||
UPB_WRITE_ONEOF(msg, uint64_t, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 4); |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Constant_set_double_value(google_api_expr_v1alpha1_Constant *msg, double value) { |
||||
UPB_WRITE_ONEOF(msg, double, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 5); |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Constant_set_string_value(google_api_expr_v1alpha1_Constant *msg, upb_strview value) { |
||||
UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 6); |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Constant_set_bytes_value(google_api_expr_v1alpha1_Constant *msg, upb_strview value) { |
||||
UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 7); |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Constant_set_duration_value(google_api_expr_v1alpha1_Constant *msg, struct google_protobuf_Duration* value) { |
||||
UPB_WRITE_ONEOF(msg, struct google_protobuf_Duration*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 8); |
||||
} |
||||
UPB_INLINE struct google_protobuf_Duration* google_api_expr_v1alpha1_Constant_mutable_duration_value(google_api_expr_v1alpha1_Constant *msg, upb_arena *arena) { |
||||
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)google_api_expr_v1alpha1_Constant_duration_value(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Constant_set_duration_value(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_Constant_set_timestamp_value(google_api_expr_v1alpha1_Constant *msg, struct google_protobuf_Timestamp* value) { |
||||
UPB_WRITE_ONEOF(msg, struct google_protobuf_Timestamp*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 9); |
||||
} |
||||
UPB_INLINE struct google_protobuf_Timestamp* google_api_expr_v1alpha1_Constant_mutable_timestamp_value(google_api_expr_v1alpha1_Constant *msg, upb_arena *arena) { |
||||
struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)google_api_expr_v1alpha1_Constant_timestamp_value(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); |
||||
if (!sub) return NULL; |
||||
google_api_expr_v1alpha1_Constant_set_timestamp_value(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.SourceInfo */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_SourceInfo *google_api_expr_v1alpha1_SourceInfo_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_SourceInfo *)upb_msg_new(&google_api_expr_v1alpha1_SourceInfo_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_SourceInfo *google_api_expr_v1alpha1_SourceInfo_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_SourceInfo *ret = google_api_expr_v1alpha1_SourceInfo_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_SourceInfo_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_SourceInfo_serialize(const google_api_expr_v1alpha1_SourceInfo *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_SourceInfo_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_SourceInfo_syntax_version(const google_api_expr_v1alpha1_SourceInfo *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } |
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_SourceInfo_location(const google_api_expr_v1alpha1_SourceInfo *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } |
||||
UPB_INLINE int32_t const* google_api_expr_v1alpha1_SourceInfo_line_offsets(const google_api_expr_v1alpha1_SourceInfo *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } |
||||
UPB_INLINE const google_api_expr_v1alpha1_SourceInfo_PositionsEntry* const* google_api_expr_v1alpha1_SourceInfo_positions(const google_api_expr_v1alpha1_SourceInfo *msg, size_t *len) { return (const google_api_expr_v1alpha1_SourceInfo_PositionsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_set_syntax_version(google_api_expr_v1alpha1_SourceInfo *msg, upb_strview value) { |
||||
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_set_location(google_api_expr_v1alpha1_SourceInfo *msg, upb_strview value) { |
||||
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; |
||||
} |
||||
UPB_INLINE int32_t* google_api_expr_v1alpha1_SourceInfo_mutable_line_offsets(google_api_expr_v1alpha1_SourceInfo *msg, size_t *len) { |
||||
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); |
||||
} |
||||
UPB_INLINE int32_t* google_api_expr_v1alpha1_SourceInfo_resize_line_offsets(google_api_expr_v1alpha1_SourceInfo *msg, size_t len, upb_arena *arena) { |
||||
return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); |
||||
} |
||||
UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_add_line_offsets(google_api_expr_v1alpha1_SourceInfo *msg, int32_t val, upb_arena *arena) { |
||||
return _upb_array_append_accessor( |
||||
msg, UPB_SIZE(16, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_SourceInfo_PositionsEntry** google_api_expr_v1alpha1_SourceInfo_mutable_positions(google_api_expr_v1alpha1_SourceInfo *msg, size_t *len) { |
||||
return (google_api_expr_v1alpha1_SourceInfo_PositionsEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_SourceInfo_PositionsEntry** google_api_expr_v1alpha1_SourceInfo_resize_positions(google_api_expr_v1alpha1_SourceInfo *msg, size_t len, upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_SourceInfo_PositionsEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); |
||||
} |
||||
UPB_INLINE struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry* google_api_expr_v1alpha1_SourceInfo_add_positions(google_api_expr_v1alpha1_SourceInfo *msg, upb_arena *arena) { |
||||
struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry* sub = (struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry*)upb_msg_new(&google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit, arena); |
||||
bool ok = _upb_array_append_accessor( |
||||
msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); |
||||
if (!ok) return NULL; |
||||
return sub; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.SourceInfo.PositionsEntry */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_SourceInfo_PositionsEntry *google_api_expr_v1alpha1_SourceInfo_PositionsEntry_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_SourceInfo_PositionsEntry *)upb_msg_new(&google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_SourceInfo_PositionsEntry *google_api_expr_v1alpha1_SourceInfo_PositionsEntry_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_SourceInfo_PositionsEntry *ret = google_api_expr_v1alpha1_SourceInfo_PositionsEntry_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_SourceInfo_PositionsEntry_serialize(const google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE int64_t google_api_expr_v1alpha1_SourceInfo_PositionsEntry_key(const google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } |
||||
UPB_INLINE int32_t google_api_expr_v1alpha1_SourceInfo_PositionsEntry_value(const google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_PositionsEntry_set_key(google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg, int64_t value) { |
||||
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_PositionsEntry_set_value(google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg, int32_t value) { |
||||
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; |
||||
} |
||||
|
||||
/* google.api.expr.v1alpha1.SourcePosition */ |
||||
|
||||
UPB_INLINE google_api_expr_v1alpha1_SourcePosition *google_api_expr_v1alpha1_SourcePosition_new(upb_arena *arena) { |
||||
return (google_api_expr_v1alpha1_SourcePosition *)upb_msg_new(&google_api_expr_v1alpha1_SourcePosition_msginit, arena); |
||||
} |
||||
UPB_INLINE google_api_expr_v1alpha1_SourcePosition *google_api_expr_v1alpha1_SourcePosition_parse(const char *buf, size_t size, |
||||
upb_arena *arena) { |
||||
google_api_expr_v1alpha1_SourcePosition *ret = google_api_expr_v1alpha1_SourcePosition_new(arena); |
||||
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_SourcePosition_msginit, arena)) ? ret : NULL; |
||||
} |
||||
UPB_INLINE char *google_api_expr_v1alpha1_SourcePosition_serialize(const google_api_expr_v1alpha1_SourcePosition *msg, upb_arena *arena, size_t *len) { |
||||
return upb_encode(msg, &google_api_expr_v1alpha1_SourcePosition_msginit, arena, len); |
||||
} |
||||
|
||||
UPB_INLINE upb_strview google_api_expr_v1alpha1_SourcePosition_location(const google_api_expr_v1alpha1_SourcePosition *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); } |
||||
UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_offset(const google_api_expr_v1alpha1_SourcePosition *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } |
||||
UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_line(const google_api_expr_v1alpha1_SourcePosition *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } |
||||
UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_column(const google_api_expr_v1alpha1_SourcePosition *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } |
||||
|
||||
UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_location(google_api_expr_v1alpha1_SourcePosition *msg, upb_strview value) { |
||||
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_offset(google_api_expr_v1alpha1_SourcePosition *msg, int32_t value) { |
||||
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_line(google_api_expr_v1alpha1_SourcePosition *msg, int32_t value) { |
||||
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; |
||||
} |
||||
UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_column(google_api_expr_v1alpha1_SourcePosition *msg, int32_t value) { |
||||
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; |
||||
} |
||||
|
||||
#ifdef __cplusplus |
||||
} /* extern "C" */ |
||||
#endif |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
||||
#endif /* GOOGLE_API_EXPR_V1ALPHA1_SYNTAX_PROTO_UPB_H_ */ |
@ -0,0 +1,52 @@ |
||||
/*
|
||||
* Copyright 2019 gRPC authors. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
* |
||||
*/ |
||||
|
||||
#include <grpcpp/impl/codegen/client_callback_impl.h> |
||||
|
||||
#include "src/core/lib/iomgr/closure.h" |
||||
#include "src/core/lib/iomgr/exec_ctx.h" |
||||
#include "src/core/lib/iomgr/executor.h" |
||||
|
||||
namespace grpc_impl { |
||||
namespace internal { |
||||
|
||||
void ClientReactor::InternalScheduleOnDone(grpc::Status s) { |
||||
// Unlike other uses of closure, do not Ref or Unref here since the reactor
|
||||
// object's lifetime is controlled by user code.
|
||||
grpc_core::ExecCtx exec_ctx; |
||||
struct ClosureWithArg { |
||||
grpc_closure closure; |
||||
ClientReactor* const reactor; |
||||
const grpc::Status status; |
||||
ClosureWithArg(ClientReactor* reactor_arg, grpc::Status s) |
||||
: reactor(reactor_arg), status(std::move(s)) { |
||||
GRPC_CLOSURE_INIT(&closure, |
||||
[](void* void_arg, grpc_error*) { |
||||
ClosureWithArg* arg = |
||||
static_cast<ClosureWithArg*>(void_arg); |
||||
arg->reactor->OnDone(arg->status); |
||||
delete arg; |
||||
}, |
||||
this, grpc_schedule_on_exec_ctx); |
||||
} |
||||
}; |
||||
ClosureWithArg* arg = new ClosureWithArg(this, std::move(s)); |
||||
grpc_core::Executor::Run(&arg->closure, GRPC_ERROR_NONE); |
||||
} |
||||
|
||||
} // namespace internal
|
||||
} // namespace grpc_impl
|
@ -0,0 +1,71 @@ |
||||
#region Copyright notice and license |
||||
|
||||
// Copyright 2018 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
|
||||
#endregion |
||||
|
||||
using System.Reflection; |
||||
using NUnitLite; |
||||
using System; |
||||
using System.IO; |
||||
using System.Runtime.InteropServices; |
||||
|
||||
namespace Grpc.Tools.Tests |
||||
{ |
||||
static class MsBuildAssemblyHelper |
||||
{ |
||||
[DllImport("__Internal")] |
||||
extern static void mono_set_assemblies_path(string path); |
||||
|
||||
public static void TweakAssemblyPathIfOnMono() |
||||
{ |
||||
// Below is a hack to allow the tests to run under Mono Framework build. |
||||
// Mono unfortunately comes with broken Microsoft.Build.* assemblies installed in |
||||
// the GAC, so we need to tweak the assembly search path to make sure the right |
||||
// msbuild assemblies are loaded (and the tests work). |
||||
#if NET45 |
||||
// only run this under .NET framework; under mono |
||||
bool isMono = Type.GetType("Mono.Runtime") != null; |
||||
if (isMono) |
||||
{ |
||||
var mscorlibDir = Path.GetDirectoryName(typeof(Array).Assembly.Location); |
||||
// Construct the location of MsBuild assemblies from the location of mscorlib assembly. |
||||
var msbuildToolPath = Path.Combine(mscorlibDir, "..", "msbuild", "Current", "bin"); |
||||
|
||||
if (!Directory.Exists(msbuildToolPath)) |
||||
{ |
||||
// with older versions of mono for Mac (e.g. mono 5.16.0 which is currently |
||||
// installed on the kokoro mac workers) the "Current" symlink doesn't exist |
||||
// so also try specifying the msbuild version explicitly |
||||
msbuildToolPath = Path.Combine(mscorlibDir, "..", "msbuild", "15.0", "bin"); |
||||
} |
||||
|
||||
// To make sure we've constructed the right path, make sure the assemblies we're interested |
||||
// in are there. |
||||
foreach(var assemblyName in new [] {"Microsoft.Build.Framework.dll", "Microsoft.Build.Utilities.v4.0.dll", "Microsoft.Build.Utilities.Core.dll"}) |
||||
{ |
||||
if (!File.Exists(Path.Combine(msbuildToolPath, assemblyName))) |
||||
{ |
||||
throw new InvalidOperationException($"Could not locate assembly {assemblyName} under {msbuildToolPath}"); |
||||
} |
||||
} |
||||
// Normally the assembly search path can be changed by MONO_PATH environment variable, but it needs to be done |
||||
// before the process starts. The following internal method allows us to do the same thing. |
||||
mono_set_assemblies_path(msbuildToolPath); |
||||
} |
||||
#endif |
||||
} |
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue