blob: d040fe29e74ada3f9d1015513e6e56cb9c307916 [file] [log] [blame]
Alistair Veitch013ea772016-05-23 09:14:25 -07001/*
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 Veitch44181c022016-05-26 10:29:38 -070036#ifndef GRPC_CORE_EXT_CENSUS_GEN_CENSUS_PB_H
37#define GRPC_CORE_EXT_CENSUS_GEN_CENSUS_PB_H
Alistair Veitch013ea772016-05-23 09:14:25 -070038#include "third_party/nanopb/pb.h"
Alistair Veitch013ea772016-05-23 09:14:25 -070039#if PB_PROTO_HEADER_VERSION != 30
40#error Regenerate this file with the current version of nanopb generator.
41#endif
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47/* Enum definitions */
48typedef 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 */
58typedef struct _google_census_AggregationDescriptor_BucketBoundaries {
59 pb_callback_t bounds;
60} google_census_AggregationDescriptor_BucketBoundaries;
61
62typedef struct _google_census_AggregationDescriptor_IntervalBoundaries {
63 pb_callback_t window_size;
64} google_census_AggregationDescriptor_IntervalBoundaries;
65
66typedef struct _google_census_IntervalStats {
67 pb_callback_t window;
68} google_census_IntervalStats;
69
70typedef 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
78typedef 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 Veitch30fe6322016-05-23 10:11:28 -070085typedef 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 Veitch013ea772016-05-23 09:14:25 -070091
92typedef struct _google_census_Metric_BasicUnit {
93 bool has_type;
94 google_census_Metric_BasicUnit_Measure type;
95} google_census_Metric_BasicUnit;
96
97typedef 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
104typedef 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 Veitch30fe6322016-05-23 10:11:28 -0700111typedef 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 Veitch013ea772016-05-23 09:14:25 -0700117
118typedef struct _google_census_Distribution {
119 bool has_count;
120 int64_t count;
121 bool has_mean;
122 double mean;
Alistair Veitch013ea772016-05-23 09:14:25 -0700123 bool has_range;
124 google_census_Distribution_Range range;
125 pb_callback_t bucket_count;
126} google_census_Distribution;
127
Alistair Veitch30fe6322016-05-23 10:11:28 -0700128typedef 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 Veitch013ea772016-05-23 09:14:25 -0700137typedef 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
146typedef 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 Veitch30fe6322016-05-23 10:11:28 -0700156typedef 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 Veitch013ea772016-05-23 09:14:25 -0700164typedef 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 Veitch30fe6322016-05-23 10:11:28 -0700178#define google_census_Duration_init_default {false, 0, false, 0}
179#define google_census_Timestamp_init_default {false, 0, false, 0}
Alistair Veitch013ea772016-05-23 09:14:25 -0700180#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 Veitch30fe6322016-05-23 10:11:28 -0700186#define google_census_Distribution_init_default {false, 0, false, 0, false, google_census_Distribution_Range_init_default, {{NULL}, NULL}}
Alistair Veitch013ea772016-05-23 09:14:25 -0700187#define google_census_Distribution_Range_init_default {false, 0, false, 0}
188#define google_census_IntervalStats_init_default {{{NULL}, NULL}}
Alistair Veitch30fe6322016-05-23 10:11:28 -0700189#define google_census_IntervalStats_Window_init_default {false, google_census_Duration_init_default, false, 0, false, 0}
Alistair Veitch013ea772016-05-23 09:14:25 -0700190#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 Veitch30fe6322016-05-23 10:11:28 -0700193#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 Veitch013ea772016-05-23 09:14:25 -0700196#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 Veitch30fe6322016-05-23 10:11:28 -0700202#define google_census_Distribution_init_zero {false, 0, false, 0, false, google_census_Distribution_Range_init_zero, {{NULL}, NULL}}
Alistair Veitch013ea772016-05-23 09:14:25 -0700203#define google_census_Distribution_Range_init_zero {false, 0, false, 0}
204#define google_census_IntervalStats_init_zero {{{NULL}, NULL}}
Alistair Veitch30fe6322016-05-23 10:11:28 -0700205#define google_census_IntervalStats_Window_init_zero {false, google_census_Duration_init_zero, false, 0, false, 0}
Alistair Veitch013ea772016-05-23 09:14:25 -0700206#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 Veitch30fe6322016-05-23 10:11:28 -0700209#define google_census_ViewAggregations_init_zero {{{NULL}, NULL}, false, google_census_Timestamp_init_zero, false, google_census_Timestamp_init_zero}
Alistair Veitch013ea772016-05-23 09:14:25 -0700210
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 Veitch30fe6322016-05-23 10:11:28 -0700220#define google_census_Duration_seconds_tag 1
221#define google_census_Duration_nanos_tag 2
Alistair Veitch013ea772016-05-23 09:14:25 -0700222#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 Veitch30fe6322016-05-23 10:11:28 -0700228#define google_census_Timestamp_seconds_tag 1
229#define google_census_Timestamp_nanos_tag 2
Alistair Veitch013ea772016-05-23 09:14:25 -0700230#define google_census_Distribution_count_tag 1
231#define google_census_Distribution_mean_tag 2
Alistair Veitch30fe6322016-05-23 10:11:28 -0700232#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 Veitch013ea772016-05-23 09:14:25 -0700237#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 Veitch30fe6322016-05-23 10:11:28 -0700246#define google_census_ViewAggregations_aggregation_tag 1
247#define google_census_ViewAggregations_start_tag 2
248#define google_census_ViewAggregations_end_tag 3
Alistair Veitch013ea772016-05-23 09:14:25 -0700249#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 Veitch30fe6322016-05-23 10:11:28 -0700257extern const pb_field_t google_census_Duration_fields[3];
258extern const pb_field_t google_census_Timestamp_fields[3];
Alistair Veitch013ea772016-05-23 09:14:25 -0700259extern const pb_field_t google_census_Metric_fields[5];
260extern const pb_field_t google_census_Metric_BasicUnit_fields[2];
261extern const pb_field_t google_census_Metric_MeasurementUnit_fields[4];
262extern const pb_field_t google_census_AggregationDescriptor_fields[3];
263extern const pb_field_t google_census_AggregationDescriptor_BucketBoundaries_fields[2];
264extern const pb_field_t google_census_AggregationDescriptor_IntervalBoundaries_fields[2];
Alistair Veitch30fe6322016-05-23 10:11:28 -0700265extern const pb_field_t google_census_Distribution_fields[5];
Alistair Veitch013ea772016-05-23 09:14:25 -0700266extern const pb_field_t google_census_Distribution_Range_fields[3];
267extern const pb_field_t google_census_IntervalStats_fields[2];
268extern const pb_field_t google_census_IntervalStats_Window_fields[4];
269extern const pb_field_t google_census_Tag_fields[3];
270extern const pb_field_t google_census_View_fields[6];
271extern const pb_field_t google_census_Aggregation_fields[6];
272extern const pb_field_t google_census_ViewAggregations_fields[4];
273
274/* Maximum encoded size of messages (where known) */
Alistair Veitch30fe6322016-05-23 10:11:28 -0700275#define google_census_Duration_size 22
276#define google_census_Timestamp_size 22
Alistair Veitch013ea772016-05-23 09:14:25 -0700277#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