Craig Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 1 | /* |
| 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 Quintas | 0d2df65 | 2016-02-23 17:37:47 -0800 | [diff] [blame] | 34 | /* Generated by nanopb-0.3.5-dev */ |
Craig Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 35 | |
| 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 Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 42 | |
| 43 | |
Craig Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 44 | const pb_field_t grpc_lb_v0_Duration_fields[3] = { |
Craig Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 45 | 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 Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 49 | |
| 50 | const pb_field_t grpc_lb_v0_LoadBalanceRequest_fields[3] = { |
Craig Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 51 | 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 Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 55 | |
| 56 | const pb_field_t grpc_lb_v0_InitialLoadBalanceRequest_fields[2] = { |
Craig Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 57 | PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v0_InitialLoadBalanceRequest, name, name, 0), |
| 58 | PB_LAST_FIELD |
| 59 | }; |
Craig Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 60 | |
| 61 | const pb_field_t grpc_lb_v0_ClientStats_fields[4] = { |
Craig Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 62 | 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 Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 67 | |
| 68 | const pb_field_t grpc_lb_v0_LoadBalanceResponse_fields[3] = { |
Craig Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 69 | 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 Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 73 | |
| 74 | const pb_field_t grpc_lb_v0_InitialLoadBalanceResponse_fields[4] = { |
Craig Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 75 | 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 Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 80 | |
| 81 | const pb_field_t grpc_lb_v0_ServerList_fields[3] = { |
Craig Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 82 | 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 Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 86 | |
| 87 | const pb_field_t grpc_lb_v0_Server_fields[5] = { |
Craig Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 88 | 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 Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 95 | |
| 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 Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 100 | * |
Craig Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 101 | * 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 Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 105 | PB_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 Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 106 | #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 Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 111 | * |
Craig Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 112 | * 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 Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 116 | PB_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 Tiller | eb841e2 | 2016-02-11 15:49:16 -0800 | [diff] [blame] | 117 | #endif |
Craig Tiller | 00c4829 | 2016-02-11 16:20:28 -0800 | [diff] [blame] | 118 | |
| 119 | |