Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [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 */ |
| 34 | /* Generated by nanopb-0.3.5-dev */ |
| 35 | |
Alistair Veitch | 0e6ebde | 2016-05-24 09:43:52 -0700 | [diff] [blame] | 36 | #include "src/core/ext/census/gen/census.pb.h" |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 37 | |
| 38 | #if PB_PROTO_HEADER_VERSION != 30 |
| 39 | #error Regenerate this file with the current version of nanopb generator. |
| 40 | #endif |
| 41 | |
| 42 | |
| 43 | |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 44 | const pb_field_t google_census_Duration_fields[3] = { |
| 45 | PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, google_census_Duration, seconds, seconds, 0), |
| 46 | PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, google_census_Duration, nanos, seconds, 0), |
| 47 | PB_LAST_FIELD |
| 48 | }; |
| 49 | |
| 50 | const pb_field_t google_census_Timestamp_fields[3] = { |
| 51 | PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, google_census_Timestamp, seconds, seconds, 0), |
| 52 | PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, google_census_Timestamp, nanos, seconds, 0), |
| 53 | PB_LAST_FIELD |
| 54 | }; |
| 55 | |
Alistair Veitch | e1ad41a | 2016-06-02 14:16:05 -0700 | [diff] [blame] | 56 | const pb_field_t google_census_Resource_fields[4] = { |
| 57 | PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Resource, name, name, 0), |
| 58 | PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_Resource, description, name, 0), |
| 59 | PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Resource, unit, description, &google_census_Resource_MeasurementUnit_fields), |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 60 | PB_LAST_FIELD |
| 61 | }; |
| 62 | |
Alistair Veitch | e1ad41a | 2016-06-02 14:16:05 -0700 | [diff] [blame] | 63 | const pb_field_t google_census_Resource_MeasurementUnit_fields[4] = { |
| 64 | PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, google_census_Resource_MeasurementUnit, prefix, prefix, 0), |
| 65 | PB_FIELD( 2, UENUM , REPEATED, CALLBACK, OTHER, google_census_Resource_MeasurementUnit, numerator, prefix, 0), |
| 66 | PB_FIELD( 3, UENUM , REPEATED, CALLBACK, OTHER, google_census_Resource_MeasurementUnit, denominator, numerator, 0), |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 67 | PB_LAST_FIELD |
| 68 | }; |
| 69 | |
Alistair Veitch | 4eb67b4 | 2016-06-03 15:45:04 -0700 | [diff] [blame] | 70 | const pb_field_t google_census_AggregationDescriptor_fields[4] = { |
| 71 | PB_FIELD( 1, UENUM , OPTIONAL, STATIC , FIRST, google_census_AggregationDescriptor, type, type, 0), |
| 72 | PB_ONEOF_FIELD(options, 2, MESSAGE , ONEOF, STATIC , OTHER, google_census_AggregationDescriptor, bucket_boundaries, type, &google_census_AggregationDescriptor_BucketBoundaries_fields), |
| 73 | PB_ONEOF_FIELD(options, 3, MESSAGE , ONEOF, STATIC , OTHER, google_census_AggregationDescriptor, interval_boundaries, type, &google_census_AggregationDescriptor_IntervalBoundaries_fields), |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 74 | PB_LAST_FIELD |
| 75 | }; |
| 76 | |
| 77 | const pb_field_t google_census_AggregationDescriptor_BucketBoundaries_fields[2] = { |
| 78 | PB_FIELD( 1, DOUBLE , REPEATED, CALLBACK, FIRST, google_census_AggregationDescriptor_BucketBoundaries, bounds, bounds, 0), |
| 79 | PB_LAST_FIELD |
| 80 | }; |
| 81 | |
| 82 | const pb_field_t google_census_AggregationDescriptor_IntervalBoundaries_fields[2] = { |
| 83 | PB_FIELD( 1, DOUBLE , REPEATED, CALLBACK, FIRST, google_census_AggregationDescriptor_IntervalBoundaries, window_size, window_size, 0), |
| 84 | PB_LAST_FIELD |
| 85 | }; |
| 86 | |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 87 | const pb_field_t google_census_Distribution_fields[5] = { |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 88 | PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, google_census_Distribution, count, count, 0), |
| 89 | PB_FIELD( 2, DOUBLE , OPTIONAL, STATIC , OTHER, google_census_Distribution, mean, count, 0), |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 90 | PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Distribution, range, mean, &google_census_Distribution_Range_fields), |
| 91 | PB_FIELD( 4, INT64 , REPEATED, CALLBACK, OTHER, google_census_Distribution, bucket_count, range, 0), |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 92 | PB_LAST_FIELD |
| 93 | }; |
| 94 | |
| 95 | const pb_field_t google_census_Distribution_Range_fields[3] = { |
| 96 | PB_FIELD( 1, DOUBLE , OPTIONAL, STATIC , FIRST, google_census_Distribution_Range, min, min, 0), |
| 97 | PB_FIELD( 2, DOUBLE , OPTIONAL, STATIC , OTHER, google_census_Distribution_Range, max, min, 0), |
| 98 | PB_LAST_FIELD |
| 99 | }; |
| 100 | |
| 101 | const pb_field_t google_census_IntervalStats_fields[2] = { |
| 102 | PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_census_IntervalStats, window, window, &google_census_IntervalStats_Window_fields), |
| 103 | PB_LAST_FIELD |
| 104 | }; |
| 105 | |
| 106 | const pb_field_t google_census_IntervalStats_Window_fields[4] = { |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 107 | PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, google_census_IntervalStats_Window, window_size, window_size, &google_census_Duration_fields), |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 108 | PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, google_census_IntervalStats_Window, count, window_size, 0), |
| 109 | PB_FIELD( 3, DOUBLE , OPTIONAL, STATIC , OTHER, google_census_IntervalStats_Window, mean, count, 0), |
| 110 | PB_LAST_FIELD |
| 111 | }; |
| 112 | |
| 113 | const pb_field_t google_census_Tag_fields[3] = { |
| 114 | PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, google_census_Tag, key, key, 0), |
| 115 | PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, google_census_Tag, value, key, 0), |
| 116 | PB_LAST_FIELD |
| 117 | }; |
| 118 | |
| 119 | const pb_field_t google_census_View_fields[6] = { |
| 120 | PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_View, name, name, 0), |
| 121 | PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_View, description, name, 0), |
Alistair Veitch | e1ad41a | 2016-06-02 14:16:05 -0700 | [diff] [blame] | 122 | PB_FIELD( 3, STRING , OPTIONAL, CALLBACK, OTHER, google_census_View, resource_name, description, 0), |
| 123 | PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_View, aggregation, resource_name, &google_census_AggregationDescriptor_fields), |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 124 | PB_FIELD( 5, STRING , REPEATED, CALLBACK, OTHER, google_census_View, tag_key, aggregation, 0), |
| 125 | PB_LAST_FIELD |
| 126 | }; |
| 127 | |
Alistair Veitch | 4eb67b4 | 2016-06-03 15:45:04 -0700 | [diff] [blame] | 128 | const pb_field_t google_census_Aggregation_fields[7] = { |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 129 | PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Aggregation, name, name, 0), |
| 130 | PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_Aggregation, description, name, 0), |
Alistair Veitch | 4eb67b4 | 2016-06-03 15:45:04 -0700 | [diff] [blame] | 131 | PB_ONEOF_FIELD(data, 3, UINT64 , ONEOF, STATIC , OTHER, google_census_Aggregation, count, description, 0), |
| 132 | PB_ONEOF_FIELD(data, 4, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, distribution, description, &google_census_Distribution_fields), |
| 133 | PB_ONEOF_FIELD(data, 5, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, interval_stats, description, &google_census_IntervalStats_fields), |
| 134 | PB_FIELD( 6, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Aggregation, tag, data.interval_stats, &google_census_Tag_fields), |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 135 | PB_LAST_FIELD |
| 136 | }; |
| 137 | |
Alistair Veitch | 4eb67b4 | 2016-06-03 15:45:04 -0700 | [diff] [blame] | 138 | const pb_field_t google_census_Metric_fields[5] = { |
| 139 | PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Metric, view_name, view_name, 0), |
| 140 | PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Metric, aggregation, view_name, &google_census_Aggregation_fields), |
| 141 | PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, start, aggregation, &google_census_Timestamp_fields), |
| 142 | PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, end, start, &google_census_Timestamp_fields), |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 143 | PB_LAST_FIELD |
| 144 | }; |
| 145 | |
| 146 | |
| 147 | /* Check that field information fits in pb_field_t */ |
| 148 | #if !defined(PB_FIELD_32BIT) |
| 149 | /* If you get an error here, it means that you need to define PB_FIELD_32BIT |
| 150 | * compile-time option. You can do that in pb.h or on compiler command line. |
| 151 | * |
| 152 | * The reason you need to do this is that some of your messages contain tag |
| 153 | * numbers or field sizes that are larger than what can fit in 8 or 16 bit |
| 154 | * field descriptors. |
| 155 | */ |
Alistair Veitch | e1ad41a | 2016-06-02 14:16:05 -0700 | [diff] [blame] | 156 | PB_STATIC_ASSERT((pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Aggregation, tag) < 65536 && pb_membersize(google_census_Metric, aggregation) < 65536 && pb_membersize(google_census_Metric, start) < 65536 && pb_membersize(google_census_Metric, end) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Resource_google_census_Resource_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_Metric) |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 157 | #endif |
| 158 | |
| 159 | #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) |
| 160 | /* If you get an error here, it means that you need to define PB_FIELD_16BIT |
| 161 | * compile-time option. You can do that in pb.h or on compiler command line. |
| 162 | * |
| 163 | * The reason you need to do this is that some of your messages contain tag |
| 164 | * numbers or field sizes that are larger than what can fit in the default |
| 165 | * 8 bit descriptors. |
| 166 | */ |
Alistair Veitch | e1ad41a | 2016-06-02 14:16:05 -0700 | [diff] [blame] | 167 | PB_STATIC_ASSERT((pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Aggregation, tag) < 256 && pb_membersize(google_census_Metric, aggregation) < 256 && pb_membersize(google_census_Metric, start) < 256 && pb_membersize(google_census_Metric, end) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Resource_google_census_Resource_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_Metric) |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 168 | #endif |
| 169 | |
| 170 | |
| 171 | /* On some platforms (such as AVR), double is really float. |
| 172 | * These are not directly supported by nanopb, but see example_avr_double. |
| 173 | * To get rid of this error, remove any double fields from your .proto. |
| 174 | */ |
| 175 | PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES) |
| 176 | |