blob: 59aae30cff97c35d1b98b7bb7613199b53c725f7 [file] [log] [blame]
Craig Tillereb841e22016-02-11 15:49:16 -08001/*
2 *
3 * Copyright 2016, Google Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above
13 * copyright notice, this list of conditions and the following disclaimer
14 * in the documentation and/or other materials provided with the
15 * distribution.
16 * * Neither the name of Google Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 */
33/* Automatically generated nanopb constant definitions */
David Garcia Quintas0d2df652016-02-23 17:37:47 -080034/* Generated by nanopb-0.3.5-dev */
Craig Tillereb841e22016-02-11 15:49:16 -080035
36#include "src/core/proto/grpc/lb/v0/load_balancer.pb.h"
37
38#if PB_PROTO_HEADER_VERSION != 30
39#error Regenerate this file with the current version of nanopb generator.
40#endif
41
Craig Tiller00c48292016-02-11 16:20:28 -080042
43
Craig Tillereb841e22016-02-11 15:49:16 -080044const pb_field_t grpc_lb_v0_Duration_fields[3] = {
Craig Tiller00c48292016-02-11 16:20:28 -080045 PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, grpc_lb_v0_Duration, seconds, seconds, 0),
46 PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Duration, nanos, seconds, 0),
47 PB_LAST_FIELD
48};
Craig Tillereb841e22016-02-11 15:49:16 -080049
50const pb_field_t grpc_lb_v0_LoadBalanceRequest_fields[3] = {
Craig Tiller00c48292016-02-11 16:20:28 -080051 PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v0_LoadBalanceRequest, initial_request, initial_request, &grpc_lb_v0_InitialLoadBalanceRequest_fields),
52 PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_LoadBalanceRequest, client_stats, initial_request, &grpc_lb_v0_ClientStats_fields),
53 PB_LAST_FIELD
54};
Craig Tillereb841e22016-02-11 15:49:16 -080055
56const pb_field_t grpc_lb_v0_InitialLoadBalanceRequest_fields[2] = {
Craig Tiller00c48292016-02-11 16:20:28 -080057 PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v0_InitialLoadBalanceRequest, name, name, 0),
58 PB_LAST_FIELD
59};
Craig Tillereb841e22016-02-11 15:49:16 -080060
61const pb_field_t grpc_lb_v0_ClientStats_fields[4] = {
Craig Tiller00c48292016-02-11 16:20:28 -080062 PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, grpc_lb_v0_ClientStats, total_requests, total_requests, 0),
63 PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_ClientStats, client_rpc_errors, total_requests, 0),
64 PB_FIELD( 3, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_ClientStats, dropped_requests, client_rpc_errors, 0),
65 PB_LAST_FIELD
66};
Craig Tillereb841e22016-02-11 15:49:16 -080067
68const pb_field_t grpc_lb_v0_LoadBalanceResponse_fields[3] = {
Craig Tiller00c48292016-02-11 16:20:28 -080069 PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v0_LoadBalanceResponse, initial_response, initial_response, &grpc_lb_v0_InitialLoadBalanceResponse_fields),
70 PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_LoadBalanceResponse, server_list, initial_response, &grpc_lb_v0_ServerList_fields),
71 PB_LAST_FIELD
72};
Craig Tillereb841e22016-02-11 15:49:16 -080073
74const pb_field_t grpc_lb_v0_InitialLoadBalanceResponse_fields[4] = {
Craig Tiller00c48292016-02-11 16:20:28 -080075 PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v0_InitialLoadBalanceResponse, client_config, client_config, 0),
76 PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, grpc_lb_v0_InitialLoadBalanceResponse, load_balancer_delegate, client_config, 0),
77 PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_InitialLoadBalanceResponse, client_stats_report_interval, load_balancer_delegate, &grpc_lb_v0_Duration_fields),
78 PB_LAST_FIELD
79};
Craig Tillereb841e22016-02-11 15:49:16 -080080
81const pb_field_t grpc_lb_v0_ServerList_fields[3] = {
Craig Tiller00c48292016-02-11 16:20:28 -080082 PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, grpc_lb_v0_ServerList, servers, servers, &grpc_lb_v0_Server_fields),
83 PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_ServerList, expiration_interval, servers, &grpc_lb_v0_Duration_fields),
84 PB_LAST_FIELD
85};
Craig Tillereb841e22016-02-11 15:49:16 -080086
87const pb_field_t grpc_lb_v0_Server_fields[5] = {
Craig Tiller00c48292016-02-11 16:20:28 -080088 PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v0_Server, ip_address, ip_address, 0),
89 PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Server, port, ip_address, 0),
90 PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Server, load_balance_token, port, 0),
91 PB_FIELD( 4, BOOL , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Server, drop_request, load_balance_token, 0),
92 PB_LAST_FIELD
93};
94
Craig Tillereb841e22016-02-11 15:49:16 -080095
96/* Check that field information fits in pb_field_t */
97#if !defined(PB_FIELD_32BIT)
98/* If you get an error here, it means that you need to define PB_FIELD_32BIT
99 * compile-time option. You can do that in pb.h or on compiler command line.
Craig Tiller00c48292016-02-11 16:20:28 -0800100 *
Craig Tillereb841e22016-02-11 15:49:16 -0800101 * The reason you need to do this is that some of your messages contain tag
102 * numbers or field sizes that are larger than what can fit in 8 or 16 bit
103 * field descriptors.
104 */
Craig Tiller00c48292016-02-11 16:20:28 -0800105PB_STATIC_ASSERT((pb_membersize(grpc_lb_v0_LoadBalanceRequest, initial_request) < 65536 && pb_membersize(grpc_lb_v0_LoadBalanceRequest, client_stats) < 65536 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, initial_response) < 65536 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, server_list) < 65536 && pb_membersize(grpc_lb_v0_InitialLoadBalanceResponse, client_stats_report_interval) < 65536 && pb_membersize(grpc_lb_v0_ServerList, servers) < 65536 && pb_membersize(grpc_lb_v0_ServerList, expiration_interval) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_grpc_lb_v0_Duration_grpc_lb_v0_LoadBalanceRequest_grpc_lb_v0_InitialLoadBalanceRequest_grpc_lb_v0_ClientStats_grpc_lb_v0_LoadBalanceResponse_grpc_lb_v0_InitialLoadBalanceResponse_grpc_lb_v0_ServerList_grpc_lb_v0_Server)
Craig Tillereb841e22016-02-11 15:49:16 -0800106#endif
107
108#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
109/* If you get an error here, it means that you need to define PB_FIELD_16BIT
110 * compile-time option. You can do that in pb.h or on compiler command line.
Craig Tiller00c48292016-02-11 16:20:28 -0800111 *
Craig Tillereb841e22016-02-11 15:49:16 -0800112 * The reason you need to do this is that some of your messages contain tag
113 * numbers or field sizes that are larger than what can fit in the default
114 * 8 bit descriptors.
115 */
Craig Tiller00c48292016-02-11 16:20:28 -0800116PB_STATIC_ASSERT((pb_membersize(grpc_lb_v0_LoadBalanceRequest, initial_request) < 256 && pb_membersize(grpc_lb_v0_LoadBalanceRequest, client_stats) < 256 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, initial_response) < 256 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, server_list) < 256 && pb_membersize(grpc_lb_v0_InitialLoadBalanceResponse, client_stats_report_interval) < 256 && pb_membersize(grpc_lb_v0_ServerList, servers) < 256 && pb_membersize(grpc_lb_v0_ServerList, expiration_interval) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_lb_v0_Duration_grpc_lb_v0_LoadBalanceRequest_grpc_lb_v0_InitialLoadBalanceRequest_grpc_lb_v0_ClientStats_grpc_lb_v0_LoadBalanceResponse_grpc_lb_v0_InitialLoadBalanceResponse_grpc_lb_v0_ServerList_grpc_lb_v0_Server)
Craig Tillereb841e22016-02-11 15:49:16 -0800117#endif
Craig Tiller00c48292016-02-11 16:20:28 -0800118
119