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 header */ |
| 34 | /* Generated by nanopb-0.3.5-dev */ |
| 35 | |
Alistair Veitch | 44181c02 | 2016-05-26 10:29:38 -0700 | [diff] [blame] | 36 | #ifndef GRPC_CORE_EXT_CENSUS_GEN_CENSUS_PB_H |
| 37 | #define GRPC_CORE_EXT_CENSUS_GEN_CENSUS_PB_H |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 38 | #include "third_party/nanopb/pb.h" |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 39 | #if PB_PROTO_HEADER_VERSION != 30 |
| 40 | #error Regenerate this file with the current version of nanopb generator. |
| 41 | #endif |
| 42 | |
| 43 | #ifdef __cplusplus |
| 44 | extern "C" { |
| 45 | #endif |
| 46 | |
| 47 | /* Enum definitions */ |
| 48 | typedef enum _google_census_Metric_BasicUnit_Measure { |
| 49 | google_census_Metric_BasicUnit_Measure_UNKNOWN = 0, |
| 50 | google_census_Metric_BasicUnit_Measure_BITS = 1, |
| 51 | google_census_Metric_BasicUnit_Measure_BYTES = 2, |
| 52 | google_census_Metric_BasicUnit_Measure_SECS = 3, |
| 53 | google_census_Metric_BasicUnit_Measure_CORES = 4, |
| 54 | google_census_Metric_BasicUnit_Measure_MAX_UNITS = 5 |
| 55 | } google_census_Metric_BasicUnit_Measure; |
| 56 | |
| 57 | /* Struct definitions */ |
| 58 | typedef struct _google_census_AggregationDescriptor_BucketBoundaries { |
| 59 | pb_callback_t bounds; |
| 60 | } google_census_AggregationDescriptor_BucketBoundaries; |
| 61 | |
| 62 | typedef struct _google_census_AggregationDescriptor_IntervalBoundaries { |
| 63 | pb_callback_t window_size; |
| 64 | } google_census_AggregationDescriptor_IntervalBoundaries; |
| 65 | |
| 66 | typedef struct _google_census_IntervalStats { |
| 67 | pb_callback_t window; |
| 68 | } google_census_IntervalStats; |
| 69 | |
| 70 | typedef struct _google_census_AggregationDescriptor { |
| 71 | pb_size_t which_options; |
| 72 | union { |
| 73 | google_census_AggregationDescriptor_BucketBoundaries bucket_boundaries; |
| 74 | google_census_AggregationDescriptor_IntervalBoundaries interval_boundaries; |
| 75 | } options; |
| 76 | } google_census_AggregationDescriptor; |
| 77 | |
| 78 | typedef struct _google_census_Distribution_Range { |
| 79 | bool has_min; |
| 80 | double min; |
| 81 | bool has_max; |
| 82 | double max; |
| 83 | } google_census_Distribution_Range; |
| 84 | |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 85 | typedef struct _google_census_Duration { |
| 86 | bool has_seconds; |
| 87 | int64_t seconds; |
| 88 | bool has_nanos; |
| 89 | int32_t nanos; |
| 90 | } google_census_Duration; |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 91 | |
| 92 | typedef struct _google_census_Metric_BasicUnit { |
| 93 | bool has_type; |
| 94 | google_census_Metric_BasicUnit_Measure type; |
| 95 | } google_census_Metric_BasicUnit; |
| 96 | |
| 97 | typedef struct _google_census_Metric_MeasurementUnit { |
| 98 | bool has_prefix; |
| 99 | int32_t prefix; |
| 100 | pb_callback_t numerator; |
| 101 | pb_callback_t denominator; |
| 102 | } google_census_Metric_MeasurementUnit; |
| 103 | |
| 104 | typedef struct _google_census_Tag { |
| 105 | bool has_key; |
| 106 | char key[255]; |
| 107 | bool has_value; |
| 108 | char value[255]; |
| 109 | } google_census_Tag; |
| 110 | |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 111 | typedef struct _google_census_Timestamp { |
| 112 | bool has_seconds; |
| 113 | int64_t seconds; |
| 114 | bool has_nanos; |
| 115 | int32_t nanos; |
| 116 | } google_census_Timestamp; |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 117 | |
| 118 | typedef struct _google_census_Distribution { |
| 119 | bool has_count; |
| 120 | int64_t count; |
| 121 | bool has_mean; |
| 122 | double mean; |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 123 | bool has_range; |
| 124 | google_census_Distribution_Range range; |
| 125 | pb_callback_t bucket_count; |
| 126 | } google_census_Distribution; |
| 127 | |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 128 | typedef struct _google_census_IntervalStats_Window { |
| 129 | bool has_window_size; |
| 130 | google_census_Duration window_size; |
| 131 | bool has_count; |
| 132 | int64_t count; |
| 133 | bool has_mean; |
| 134 | double mean; |
| 135 | } google_census_IntervalStats_Window; |
| 136 | |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 137 | typedef struct _google_census_Metric { |
| 138 | pb_callback_t name; |
| 139 | pb_callback_t description; |
| 140 | bool has_unit; |
| 141 | google_census_Metric_MeasurementUnit unit; |
| 142 | bool has_id; |
| 143 | int32_t id; |
| 144 | } google_census_Metric; |
| 145 | |
| 146 | typedef struct _google_census_View { |
| 147 | pb_callback_t name; |
| 148 | pb_callback_t description; |
| 149 | bool has_metric_id; |
| 150 | int32_t metric_id; |
| 151 | bool has_aggregation; |
| 152 | google_census_AggregationDescriptor aggregation; |
| 153 | pb_callback_t tag_key; |
| 154 | } google_census_View; |
| 155 | |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 156 | typedef struct _google_census_ViewAggregations { |
| 157 | pb_callback_t aggregation; |
| 158 | bool has_start; |
| 159 | google_census_Timestamp start; |
| 160 | bool has_end; |
| 161 | google_census_Timestamp end; |
| 162 | } google_census_ViewAggregations; |
| 163 | |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 164 | typedef struct _google_census_Aggregation { |
| 165 | pb_callback_t name; |
| 166 | pb_callback_t description; |
| 167 | pb_size_t which_data; |
| 168 | union { |
| 169 | google_census_Distribution distribution; |
| 170 | google_census_IntervalStats interval_stats; |
| 171 | } data; |
| 172 | pb_callback_t tag; |
| 173 | } google_census_Aggregation; |
| 174 | |
| 175 | /* Default values for struct fields */ |
| 176 | |
| 177 | /* Initializer values for message structs */ |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 178 | #define google_census_Duration_init_default {false, 0, false, 0} |
| 179 | #define google_census_Timestamp_init_default {false, 0, false, 0} |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 180 | #define google_census_Metric_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Metric_MeasurementUnit_init_default, false, 0} |
| 181 | #define google_census_Metric_BasicUnit_init_default {false, (google_census_Metric_BasicUnit_Measure)0} |
| 182 | #define google_census_Metric_MeasurementUnit_init_default {false, 0, {{NULL}, NULL}, {{NULL}, NULL}} |
| 183 | #define google_census_AggregationDescriptor_init_default {0, {google_census_AggregationDescriptor_BucketBoundaries_init_default}} |
| 184 | #define google_census_AggregationDescriptor_BucketBoundaries_init_default {{{NULL}, NULL}} |
| 185 | #define google_census_AggregationDescriptor_IntervalBoundaries_init_default {{{NULL}, NULL}} |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 186 | #define google_census_Distribution_init_default {false, 0, false, 0, false, google_census_Distribution_Range_init_default, {{NULL}, NULL}} |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 187 | #define google_census_Distribution_Range_init_default {false, 0, false, 0} |
| 188 | #define google_census_IntervalStats_init_default {{{NULL}, NULL}} |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 189 | #define google_census_IntervalStats_Window_init_default {false, google_census_Duration_init_default, false, 0, false, 0} |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 190 | #define google_census_Tag_init_default {false, "", false, ""} |
| 191 | #define google_census_View_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, 0, false, google_census_AggregationDescriptor_init_default, {{NULL}, NULL}} |
| 192 | #define google_census_Aggregation_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0, {google_census_Distribution_init_default}, {{NULL}, NULL}} |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 193 | #define google_census_ViewAggregations_init_default {{{NULL}, NULL}, false, google_census_Timestamp_init_default, false, google_census_Timestamp_init_default} |
| 194 | #define google_census_Duration_init_zero {false, 0, false, 0} |
| 195 | #define google_census_Timestamp_init_zero {false, 0, false, 0} |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 196 | #define google_census_Metric_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Metric_MeasurementUnit_init_zero, false, 0} |
| 197 | #define google_census_Metric_BasicUnit_init_zero {false, (google_census_Metric_BasicUnit_Measure)0} |
| 198 | #define google_census_Metric_MeasurementUnit_init_zero {false, 0, {{NULL}, NULL}, {{NULL}, NULL}} |
| 199 | #define google_census_AggregationDescriptor_init_zero {0, {google_census_AggregationDescriptor_BucketBoundaries_init_zero}} |
| 200 | #define google_census_AggregationDescriptor_BucketBoundaries_init_zero {{{NULL}, NULL}} |
| 201 | #define google_census_AggregationDescriptor_IntervalBoundaries_init_zero {{{NULL}, NULL}} |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 202 | #define google_census_Distribution_init_zero {false, 0, false, 0, false, google_census_Distribution_Range_init_zero, {{NULL}, NULL}} |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 203 | #define google_census_Distribution_Range_init_zero {false, 0, false, 0} |
| 204 | #define google_census_IntervalStats_init_zero {{{NULL}, NULL}} |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 205 | #define google_census_IntervalStats_Window_init_zero {false, google_census_Duration_init_zero, false, 0, false, 0} |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 206 | #define google_census_Tag_init_zero {false, "", false, ""} |
| 207 | #define google_census_View_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, 0, false, google_census_AggregationDescriptor_init_zero, {{NULL}, NULL}} |
| 208 | #define google_census_Aggregation_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0, {google_census_Distribution_init_zero}, {{NULL}, NULL}} |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 209 | #define google_census_ViewAggregations_init_zero {{{NULL}, NULL}, false, google_census_Timestamp_init_zero, false, google_census_Timestamp_init_zero} |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 210 | |
| 211 | /* Field tags (for use in manual encoding/decoding) */ |
| 212 | #define google_census_AggregationDescriptor_BucketBoundaries_bounds_tag 1 |
| 213 | #define google_census_AggregationDescriptor_IntervalBoundaries_window_size_tag 1 |
| 214 | #define google_census_IntervalStats_window_tag 1 |
| 215 | #define google_census_AggregationDescriptor_bucket_boundaries_tag 1 |
| 216 | |
| 217 | #define google_census_AggregationDescriptor_interval_boundaries_tag 2 |
| 218 | #define google_census_Distribution_Range_min_tag 1 |
| 219 | #define google_census_Distribution_Range_max_tag 2 |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 220 | #define google_census_Duration_seconds_tag 1 |
| 221 | #define google_census_Duration_nanos_tag 2 |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 222 | #define google_census_Metric_BasicUnit_type_tag 1 |
| 223 | #define google_census_Metric_MeasurementUnit_prefix_tag 1 |
| 224 | #define google_census_Metric_MeasurementUnit_numerator_tag 2 |
| 225 | #define google_census_Metric_MeasurementUnit_denominator_tag 3 |
| 226 | #define google_census_Tag_key_tag 1 |
| 227 | #define google_census_Tag_value_tag 2 |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 228 | #define google_census_Timestamp_seconds_tag 1 |
| 229 | #define google_census_Timestamp_nanos_tag 2 |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 230 | #define google_census_Distribution_count_tag 1 |
| 231 | #define google_census_Distribution_mean_tag 2 |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 232 | #define google_census_Distribution_range_tag 3 |
| 233 | #define google_census_Distribution_bucket_count_tag 4 |
| 234 | #define google_census_IntervalStats_Window_window_size_tag 1 |
| 235 | #define google_census_IntervalStats_Window_count_tag 2 |
| 236 | #define google_census_IntervalStats_Window_mean_tag 3 |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 237 | #define google_census_Metric_name_tag 1 |
| 238 | #define google_census_Metric_description_tag 2 |
| 239 | #define google_census_Metric_unit_tag 3 |
| 240 | #define google_census_Metric_id_tag 4 |
| 241 | #define google_census_View_name_tag 1 |
| 242 | #define google_census_View_description_tag 2 |
| 243 | #define google_census_View_metric_id_tag 3 |
| 244 | #define google_census_View_aggregation_tag 4 |
| 245 | #define google_census_View_tag_key_tag 5 |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 246 | #define google_census_ViewAggregations_aggregation_tag 1 |
| 247 | #define google_census_ViewAggregations_start_tag 2 |
| 248 | #define google_census_ViewAggregations_end_tag 3 |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 249 | #define google_census_Aggregation_distribution_tag 3 |
| 250 | |
| 251 | #define google_census_Aggregation_interval_stats_tag 4 |
| 252 | #define google_census_Aggregation_name_tag 1 |
| 253 | #define google_census_Aggregation_description_tag 2 |
| 254 | #define google_census_Aggregation_tag_tag 5 |
| 255 | |
| 256 | /* Struct field encoding specification for nanopb */ |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 257 | extern const pb_field_t google_census_Duration_fields[3]; |
| 258 | extern const pb_field_t google_census_Timestamp_fields[3]; |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 259 | extern const pb_field_t google_census_Metric_fields[5]; |
| 260 | extern const pb_field_t google_census_Metric_BasicUnit_fields[2]; |
| 261 | extern const pb_field_t google_census_Metric_MeasurementUnit_fields[4]; |
| 262 | extern const pb_field_t google_census_AggregationDescriptor_fields[3]; |
| 263 | extern const pb_field_t google_census_AggregationDescriptor_BucketBoundaries_fields[2]; |
| 264 | extern const pb_field_t google_census_AggregationDescriptor_IntervalBoundaries_fields[2]; |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 265 | extern const pb_field_t google_census_Distribution_fields[5]; |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 266 | extern const pb_field_t google_census_Distribution_Range_fields[3]; |
| 267 | extern const pb_field_t google_census_IntervalStats_fields[2]; |
| 268 | extern const pb_field_t google_census_IntervalStats_Window_fields[4]; |
| 269 | extern const pb_field_t google_census_Tag_fields[3]; |
| 270 | extern const pb_field_t google_census_View_fields[6]; |
| 271 | extern const pb_field_t google_census_Aggregation_fields[6]; |
| 272 | extern const pb_field_t google_census_ViewAggregations_fields[4]; |
| 273 | |
| 274 | /* Maximum encoded size of messages (where known) */ |
Alistair Veitch | 30fe632 | 2016-05-23 10:11:28 -0700 | [diff] [blame] | 275 | #define google_census_Duration_size 22 |
| 276 | #define google_census_Timestamp_size 22 |
Alistair Veitch | 013ea77 | 2016-05-23 09:14:25 -0700 | [diff] [blame] | 277 | #define google_census_Metric_BasicUnit_size 2 |
| 278 | #define google_census_Distribution_Range_size 18 |
| 279 | #define google_census_IntervalStats_Window_size 44 |
| 280 | #define google_census_Tag_size 516 |
| 281 | |
| 282 | /* Message IDs (where set with "msgid" option) */ |
| 283 | #ifdef PB_MSGID |
| 284 | |
| 285 | #define CENSUS_MESSAGES \ |
| 286 | |
| 287 | |
| 288 | #endif |
| 289 | |
| 290 | #ifdef __cplusplus |
| 291 | } /* extern "C" */ |
| 292 | #endif |
| 293 | |
| 294 | #endif |