Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Side by Side Diff: generated/googleapis_beta/lib/cloudmonitoring/v2beta2.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis_beta.cloudmonitoring.v2beta2; 3 library googleapis_beta.cloudmonitoring.v2beta2;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
11 11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
13 ApiRequestError, DetailedApiRequestError; 13 show ApiRequestError, DetailedApiRequestError;
14 14
15 const core.String USER_AGENT = 'dart-api-client cloudmonitoring/v2beta2'; 15 const core.String USER_AGENT = 'dart-api-client cloudmonitoring/v2beta2';
16 16
17 /** Accesses Google Cloud Monitoring data. */ 17 /// Accesses Google Cloud Monitoring data.
18 class CloudmonitoringApi { 18 class CloudmonitoringApi {
19 /** View and manage your data across Google Cloud Platform services */ 19 /// View and manage your data across Google Cloud Platform services
20 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 20 static const CloudPlatformScope =
21 "https://www.googleapis.com/auth/cloud-platform";
21 22
22 /** 23 /// View and write monitoring data for all of your Google and third-party
23 * View and write monitoring data for all of your Google and third-party Cloud 24 /// Cloud and API projects
24 * and API projects
25 */
26 static const MonitoringScope = "https://www.googleapis.com/auth/monitoring"; 25 static const MonitoringScope = "https://www.googleapis.com/auth/monitoring";
27 26
28
29 final commons.ApiRequester _requester; 27 final commons.ApiRequester _requester;
30 28
31 MetricDescriptorsResourceApi get metricDescriptors => new MetricDescriptorsRes ourceApi(_requester); 29 MetricDescriptorsResourceApi get metricDescriptors =>
30 new MetricDescriptorsResourceApi(_requester);
32 TimeseriesResourceApi get timeseries => new TimeseriesResourceApi(_requester); 31 TimeseriesResourceApi get timeseries => new TimeseriesResourceApi(_requester);
33 TimeseriesDescriptorsResourceApi get timeseriesDescriptors => new TimeseriesDe scriptorsResourceApi(_requester); 32 TimeseriesDescriptorsResourceApi get timeseriesDescriptors =>
33 new TimeseriesDescriptorsResourceApi(_requester);
34 34
35 CloudmonitoringApi(http.Client client, {core.String rootUrl: "https://www.goog leapis.com/", core.String servicePath: "cloudmonitoring/v2beta2/projects/"}) : 35 CloudmonitoringApi(http.Client client,
36 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 36 {core.String rootUrl: "https://www.googleapis.com/",
37 core.String servicePath: "cloudmonitoring/v2beta2/projects/"})
38 : _requester =
39 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
37 } 40 }
38 41
39
40 class MetricDescriptorsResourceApi { 42 class MetricDescriptorsResourceApi {
41 final commons.ApiRequester _requester; 43 final commons.ApiRequester _requester;
42 44
43 MetricDescriptorsResourceApi(commons.ApiRequester client) : 45 MetricDescriptorsResourceApi(commons.ApiRequester client)
44 _requester = client; 46 : _requester = client;
45 47
46 /** 48 /// Create a new metric.
47 * Create a new metric. 49 ///
48 * 50 /// [request] - The metadata request object.
49 * [request] - The metadata request object. 51 ///
50 * 52 /// Request parameters:
51 * Request parameters: 53 ///
52 * 54 /// [project] - The project id. The value can be the numeric project ID or
53 * [project] - The project id. The value can be the numeric project ID or 55 /// string-based project name.
54 * string-based project name. 56 ///
55 * 57 /// Completes with a [MetricDescriptor].
56 * Completes with a [MetricDescriptor]. 58 ///
57 * 59 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
58 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 60 /// an error.
59 * error. 61 ///
60 * 62 /// If the used [http.Client] completes with an error when making a REST
61 * If the used [http.Client] completes with an error when making a REST call, 63 /// call, this method will complete with the same error.
62 * this method will complete with the same error. 64 async.Future<MetricDescriptor> create(
63 */ 65 MetricDescriptor request, core.String project) {
64 async.Future<MetricDescriptor> create(MetricDescriptor request, core.String pr oject) {
65 var _url = null; 66 var _url = null;
66 var _queryParams = new core.Map(); 67 var _queryParams = new core.Map();
67 var _uploadMedia = null; 68 var _uploadMedia = null;
68 var _uploadOptions = null; 69 var _uploadOptions = null;
69 var _downloadOptions = commons.DownloadOptions.Metadata; 70 var _downloadOptions = commons.DownloadOptions.Metadata;
70 var _body = null; 71 var _body = null;
71 72
72 if (request != null) { 73 if (request != null) {
73 _body = convert.JSON.encode((request).toJson()); 74 _body = convert.JSON.encode((request).toJson());
74 } 75 }
75 if (project == null) { 76 if (project == null) {
76 throw new core.ArgumentError("Parameter project is required."); 77 throw new core.ArgumentError("Parameter project is required.");
77 } 78 }
78 79
79 _url = commons.Escaper.ecapeVariable('$project') + '/metricDescriptors'; 80 _url = commons.Escaper.ecapeVariable('$project') + '/metricDescriptors';
80 81
81 var _response = _requester.request(_url, 82 var _response = _requester.request(_url, "POST",
82 "POST", 83 body: _body,
83 body: _body, 84 queryParams: _queryParams,
84 queryParams: _queryParams, 85 uploadOptions: _uploadOptions,
85 uploadOptions: _uploadOptions, 86 uploadMedia: _uploadMedia,
86 uploadMedia: _uploadMedia, 87 downloadOptions: _downloadOptions);
87 downloadOptions: _downloadOptions);
88 return _response.then((data) => new MetricDescriptor.fromJson(data)); 88 return _response.then((data) => new MetricDescriptor.fromJson(data));
89 } 89 }
90 90
91 /** 91 /// Delete an existing metric.
92 * Delete an existing metric. 92 ///
93 * 93 /// Request parameters:
94 * Request parameters: 94 ///
95 * 95 /// [project] - The project ID to which the metric belongs.
96 * [project] - The project ID to which the metric belongs. 96 ///
97 * 97 /// [metric] - Name of the metric.
98 * [metric] - Name of the metric. 98 ///
99 * 99 /// Completes with a [DeleteMetricDescriptorResponse].
100 * Completes with a [DeleteMetricDescriptorResponse]. 100 ///
101 * 101 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
102 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 102 /// an error.
103 * error. 103 ///
104 * 104 /// If the used [http.Client] completes with an error when making a REST
105 * If the used [http.Client] completes with an error when making a REST call, 105 /// call, this method will complete with the same error.
106 * this method will complete with the same error. 106 async.Future<DeleteMetricDescriptorResponse> delete(
107 */ 107 core.String project, core.String metric) {
108 async.Future<DeleteMetricDescriptorResponse> delete(core.String project, core. String metric) {
109 var _url = null; 108 var _url = null;
110 var _queryParams = new core.Map(); 109 var _queryParams = new core.Map();
111 var _uploadMedia = null; 110 var _uploadMedia = null;
112 var _uploadOptions = null; 111 var _uploadOptions = null;
113 var _downloadOptions = commons.DownloadOptions.Metadata; 112 var _downloadOptions = commons.DownloadOptions.Metadata;
114 var _body = null; 113 var _body = null;
115 114
116 if (project == null) { 115 if (project == null) {
117 throw new core.ArgumentError("Parameter project is required."); 116 throw new core.ArgumentError("Parameter project is required.");
118 } 117 }
119 if (metric == null) { 118 if (metric == null) {
120 throw new core.ArgumentError("Parameter metric is required."); 119 throw new core.ArgumentError("Parameter metric is required.");
121 } 120 }
122 121
123 _url = commons.Escaper.ecapeVariable('$project') + '/metricDescriptors/' + c ommons.Escaper.ecapeVariable('$metric'); 122 _url = commons.Escaper.ecapeVariable('$project') +
123 '/metricDescriptors/' +
124 commons.Escaper.ecapeVariable('$metric');
124 125
125 var _response = _requester.request(_url, 126 var _response = _requester.request(_url, "DELETE",
126 "DELETE", 127 body: _body,
127 body: _body, 128 queryParams: _queryParams,
128 queryParams: _queryParams, 129 uploadOptions: _uploadOptions,
129 uploadOptions: _uploadOptions, 130 uploadMedia: _uploadMedia,
130 uploadMedia: _uploadMedia, 131 downloadOptions: _downloadOptions);
131 downloadOptions: _downloadOptions); 132 return _response
132 return _response.then((data) => new DeleteMetricDescriptorResponse.fromJson( data)); 133 .then((data) => new DeleteMetricDescriptorResponse.fromJson(data));
133 } 134 }
134 135
135 /** 136 /// List metric descriptors that match the query. If the query is not set,
136 * List metric descriptors that match the query. If the query is not set, then 137 /// then all of the metric descriptors will be returned. Large responses will
137 * all of the metric descriptors will be returned. Large responses will be 138 /// be paginated, use the nextPageToken returned in the response to request
138 * paginated, use the nextPageToken returned in the response to request 139 /// subsequent pages of results by setting the pageToken query parameter to
139 * subsequent pages of results by setting the pageToken query parameter to the 140 /// the value of the nextPageToken.
140 * value of the nextPageToken. 141 ///
141 * 142 /// [request] - The metadata request object.
142 * [request] - The metadata request object. 143 ///
143 * 144 /// Request parameters:
144 * Request parameters: 145 ///
145 * 146 /// [project] - The project id. The value can be the numeric project ID or
146 * [project] - The project id. The value can be the numeric project ID or 147 /// string-based project name.
147 * string-based project name. 148 ///
148 * 149 /// [count] - Maximum number of metric descriptors per page. Used for
149 * [count] - Maximum number of metric descriptors per page. Used for 150 /// pagination. If not specified, count = 100.
150 * pagination. If not specified, count = 100. 151 /// Value must be between "1" and "1000".
151 * Value must be between "1" and "1000". 152 ///
152 * 153 /// [pageToken] - The pagination token, which is used to page through large
153 * [pageToken] - The pagination token, which is used to page through large 154 /// result sets. Set this value to the value of the nextPageToken to retrieve
154 * result sets. Set this value to the value of the nextPageToken to retrieve 155 /// the next page of results.
155 * the next page of results. 156 ///
156 * 157 /// [query] - The query used to search against existing metrics. Separate
157 * [query] - The query used to search against existing metrics. Separate 158 /// keywords with a space; the service joins all keywords with AND, meaning
158 * keywords with a space; the service joins all keywords with AND, meaning 159 /// that all keywords must match for a metric to be returned. If this field
159 * that all keywords must match for a metric to be returned. If this field is 160 /// is omitted, all metrics are returned. If an empty string is passed with
160 * omitted, all metrics are returned. If an empty string is passed with this 161 /// this field, no metrics are returned.
161 * field, no metrics are returned. 162 ///
162 * 163 /// Completes with a [ListMetricDescriptorsResponse].
163 * Completes with a [ListMetricDescriptorsResponse]. 164 ///
164 * 165 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
165 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 166 /// an error.
166 * error. 167 ///
167 * 168 /// If the used [http.Client] completes with an error when making a REST
168 * If the used [http.Client] completes with an error when making a REST call, 169 /// call, this method will complete with the same error.
169 * this method will complete with the same error. 170 async.Future<ListMetricDescriptorsResponse> list(
170 */ 171 ListMetricDescriptorsRequest request, core.String project,
171 async.Future<ListMetricDescriptorsResponse> list(ListMetricDescriptorsRequest request, core.String project, {core.int count, core.String pageToken, core.Strin g query}) { 172 {core.int count, core.String pageToken, core.String query}) {
172 var _url = null; 173 var _url = null;
173 var _queryParams = new core.Map(); 174 var _queryParams = new core.Map();
174 var _uploadMedia = null; 175 var _uploadMedia = null;
175 var _uploadOptions = null; 176 var _uploadOptions = null;
176 var _downloadOptions = commons.DownloadOptions.Metadata; 177 var _downloadOptions = commons.DownloadOptions.Metadata;
177 var _body = null; 178 var _body = null;
178 179
179 if (request != null) { 180 if (request != null) {
180 _body = convert.JSON.encode((request).toJson()); 181 _body = convert.JSON.encode((request).toJson());
181 } 182 }
182 if (project == null) { 183 if (project == null) {
183 throw new core.ArgumentError("Parameter project is required."); 184 throw new core.ArgumentError("Parameter project is required.");
184 } 185 }
185 if (count != null) { 186 if (count != null) {
186 _queryParams["count"] = ["${count}"]; 187 _queryParams["count"] = ["${count}"];
187 } 188 }
188 if (pageToken != null) { 189 if (pageToken != null) {
189 _queryParams["pageToken"] = [pageToken]; 190 _queryParams["pageToken"] = [pageToken];
190 } 191 }
191 if (query != null) { 192 if (query != null) {
192 _queryParams["query"] = [query]; 193 _queryParams["query"] = [query];
193 } 194 }
194 195
195 _url = commons.Escaper.ecapeVariable('$project') + '/metricDescriptors'; 196 _url = commons.Escaper.ecapeVariable('$project') + '/metricDescriptors';
196 197
197 var _response = _requester.request(_url, 198 var _response = _requester.request(_url, "GET",
198 "GET", 199 body: _body,
199 body: _body, 200 queryParams: _queryParams,
200 queryParams: _queryParams, 201 uploadOptions: _uploadOptions,
201 uploadOptions: _uploadOptions, 202 uploadMedia: _uploadMedia,
202 uploadMedia: _uploadMedia, 203 downloadOptions: _downloadOptions);
203 downloadOptions: _downloadOptions); 204 return _response
204 return _response.then((data) => new ListMetricDescriptorsResponse.fromJson(d ata)); 205 .then((data) => new ListMetricDescriptorsResponse.fromJson(data));
205 } 206 }
206
207 } 207 }
208 208
209
210 class TimeseriesResourceApi { 209 class TimeseriesResourceApi {
211 final commons.ApiRequester _requester; 210 final commons.ApiRequester _requester;
212 211
213 TimeseriesResourceApi(commons.ApiRequester client) : 212 TimeseriesResourceApi(commons.ApiRequester client) : _requester = client;
214 _requester = client;
215 213
216 /** 214 /// List the data points of the time series that match the metric and labels
217 * List the data points of the time series that match the metric and labels 215 /// values and that have data points in the interval. Large responses are
218 * values and that have data points in the interval. Large responses are 216 /// paginated; use the nextPageToken returned in the response to request
219 * paginated; use the nextPageToken returned in the response to request 217 /// subsequent pages of results by setting the pageToken query parameter to
220 * subsequent pages of results by setting the pageToken query parameter to the 218 /// the value of the nextPageToken.
221 * value of the nextPageToken. 219 ///
222 * 220 /// [request] - The metadata request object.
223 * [request] - The metadata request object. 221 ///
224 * 222 /// Request parameters:
225 * Request parameters: 223 ///
226 * 224 /// [project] - The project ID to which this time series belongs. The value
227 * [project] - The project ID to which this time series belongs. The value can 225 /// can be the numeric project ID or string-based project name.
228 * be the numeric project ID or string-based project name. 226 ///
229 * 227 /// [metric] - Metric names are protocol-free URLs as listed in the Supported
230 * [metric] - Metric names are protocol-free URLs as listed in the Supported 228 /// Metrics page. For example,
231 * Metrics page. For example, 229 /// compute.googleapis.com/instance/disk/read_ops_count.
232 * compute.googleapis.com/instance/disk/read_ops_count. 230 ///
233 * 231 /// [youngest] - End of the time interval (inclusive), which is expressed as
234 * [youngest] - End of the time interval (inclusive), which is expressed as an 232 /// an RFC 3339 timestamp.
235 * RFC 3339 timestamp. 233 ///
236 * 234 /// [aggregator] - The aggregation function that will reduce the data points
237 * [aggregator] - The aggregation function that will reduce the data points in 235 /// in each window to a single point. This parameter is only valid for
238 * each window to a single point. This parameter is only valid for 236 /// non-cumulative metrics with a value type of INT64 or DOUBLE.
239 * non-cumulative metrics with a value type of INT64 or DOUBLE. 237 /// Possible string values are:
240 * Possible string values are: 238 /// - "max"
241 * - "max" 239 /// - "mean"
242 * - "mean" 240 /// - "min"
243 * - "min" 241 /// - "sum"
244 * - "sum" 242 ///
245 * 243 /// [count] - Maximum number of data points per page, which is used for
246 * [count] - Maximum number of data points per page, which is used for 244 /// pagination of results.
247 * pagination of results. 245 /// Value must be between "1" and "12000".
248 * Value must be between "1" and "12000". 246 ///
249 * 247 /// [labels] - A collection of labels for the matching time series, which are
250 * [labels] - A collection of labels for the matching time series, which are 248 /// represented as:
251 * represented as: 249 /// - key==value: key equals the value
252 * - key==value: key equals the value 250 /// - key=~value: key regex matches the value
253 * - key=~value: key regex matches the value 251 /// - key!=value: key does not equal the value
254 * - key!=value: key does not equal the value 252 /// - key!~value: key regex does not match the value For example, to list
255 * - key!~value: key regex does not match the value For example, to list all 253 /// all of the time series descriptors for the region us-central1, you could
256 * of the time series descriptors for the region us-central1, you could 254 /// specify:
257 * specify: 255 /// label=cloud.googleapis.com%2Flocation=~us-central1.*
258 * label=cloud.googleapis.com%2Flocation=~us-central1.* 256 /// Value must have pattern "(.+?)(==|=~|!=|!~)(.+)".
259 * Value must have pattern "(.+?)(==|=~|!=|!~)(.+)". 257 ///
260 * 258 /// [oldest] - Start of the time interval (exclusive), which is expressed as
261 * [oldest] - Start of the time interval (exclusive), which is expressed as an 259 /// an RFC 3339 timestamp. If neither oldest nor timespan is specified, the
262 * RFC 3339 timestamp. If neither oldest nor timespan is specified, the 260 /// default time interval will be (youngest - 4 hours, youngest]
263 * default time interval will be (youngest - 4 hours, youngest] 261 ///
264 * 262 /// [pageToken] - The pagination token, which is used to page through large
265 * [pageToken] - The pagination token, which is used to page through large 263 /// result sets. Set this value to the value of the nextPageToken to retrieve
266 * result sets. Set this value to the value of the nextPageToken to retrieve 264 /// the next page of results.
267 * the next page of results. 265 ///
268 * 266 /// [timespan] - Length of the time interval to query, which is an
269 * [timespan] - Length of the time interval to query, which is an alternative 267 /// alternative way to declare the interval: (youngest - timespan, youngest].
270 * way to declare the interval: (youngest - timespan, youngest]. The timespan 268 /// The timespan and oldest parameters should not be used together. Units:
271 * and oldest parameters should not be used together. Units: 269 /// - s: second
272 * - s: second 270 /// - m: minute
273 * - m: minute 271 /// - h: hour
274 * - h: hour 272 /// - d: day
275 * - d: day 273 /// - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example:
276 * - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 274 /// 2w3d is not allowed; you should use 17d instead.
277 * 2w3d is not allowed; you should use 17d instead. 275 ///
278 * 276 /// If neither oldest nor timespan is specified, the default time interval
279 * If neither oldest nor timespan is specified, the default time interval will 277 /// will be (youngest - 4 hours, youngest].
280 * be (youngest - 4 hours, youngest]. 278 /// Value must have pattern "[0-9]+[smhdw]?".
281 * Value must have pattern "[0-9]+[smhdw]?". 279 ///
282 * 280 /// [window] - The sampling window. At most one data point will be returned
283 * [window] - The sampling window. At most one data point will be returned for 281 /// for each window in the requested time interval. This parameter is only
284 * each window in the requested time interval. This parameter is only valid 282 /// valid for non-cumulative metric types. Units:
285 * for non-cumulative metric types. Units: 283 /// - m: minute
286 * - m: minute 284 /// - h: hour
287 * - h: hour 285 /// - d: day
288 * - d: day 286 /// - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d
289 * - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is 287 /// is not allowed; you should use 17d instead.
290 * not allowed; you should use 17d instead. 288 /// Value must have pattern "[0-9]+[mhdw]?".
291 * Value must have pattern "[0-9]+[mhdw]?". 289 ///
292 * 290 /// Completes with a [ListTimeseriesResponse].
293 * Completes with a [ListTimeseriesResponse]. 291 ///
294 * 292 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
295 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 293 /// an error.
296 * error. 294 ///
297 * 295 /// If the used [http.Client] completes with an error when making a REST
298 * If the used [http.Client] completes with an error when making a REST call, 296 /// call, this method will complete with the same error.
299 * this method will complete with the same error. 297 async.Future<ListTimeseriesResponse> list(ListTimeseriesRequest request,
300 */ 298 core.String project, core.String metric, core.String youngest,
301 async.Future<ListTimeseriesResponse> list(ListTimeseriesRequest request, core. String project, core.String metric, core.String youngest, {core.String aggregato r, core.int count, core.List<core.String> labels, core.String oldest, core.Strin g pageToken, core.String timespan, core.String window}) { 299 {core.String aggregator,
300 core.int count,
301 core.List<core.String> labels,
302 core.String oldest,
303 core.String pageToken,
304 core.String timespan,
305 core.String window}) {
302 var _url = null; 306 var _url = null;
303 var _queryParams = new core.Map(); 307 var _queryParams = new core.Map();
304 var _uploadMedia = null; 308 var _uploadMedia = null;
305 var _uploadOptions = null; 309 var _uploadOptions = null;
306 var _downloadOptions = commons.DownloadOptions.Metadata; 310 var _downloadOptions = commons.DownloadOptions.Metadata;
307 var _body = null; 311 var _body = null;
308 312
309 if (request != null) { 313 if (request != null) {
310 _body = convert.JSON.encode((request).toJson()); 314 _body = convert.JSON.encode((request).toJson());
311 } 315 }
(...skipping 22 matching lines...) Expand all
334 if (pageToken != null) { 338 if (pageToken != null) {
335 _queryParams["pageToken"] = [pageToken]; 339 _queryParams["pageToken"] = [pageToken];
336 } 340 }
337 if (timespan != null) { 341 if (timespan != null) {
338 _queryParams["timespan"] = [timespan]; 342 _queryParams["timespan"] = [timespan];
339 } 343 }
340 if (window != null) { 344 if (window != null) {
341 _queryParams["window"] = [window]; 345 _queryParams["window"] = [window];
342 } 346 }
343 347
344 _url = commons.Escaper.ecapeVariable('$project') + '/timeseries/' + commons. Escaper.ecapeVariable('$metric'); 348 _url = commons.Escaper.ecapeVariable('$project') +
349 '/timeseries/' +
350 commons.Escaper.ecapeVariable('$metric');
345 351
346 var _response = _requester.request(_url, 352 var _response = _requester.request(_url, "GET",
347 "GET", 353 body: _body,
348 body: _body, 354 queryParams: _queryParams,
349 queryParams: _queryParams, 355 uploadOptions: _uploadOptions,
350 uploadOptions: _uploadOptions, 356 uploadMedia: _uploadMedia,
351 uploadMedia: _uploadMedia, 357 downloadOptions: _downloadOptions);
352 downloadOptions: _downloadOptions);
353 return _response.then((data) => new ListTimeseriesResponse.fromJson(data)); 358 return _response.then((data) => new ListTimeseriesResponse.fromJson(data));
354 } 359 }
355 360
356 /** 361 /// Put data points to one or more time series for one or more metrics. If a
357 * Put data points to one or more time series for one or more metrics. If a 362 /// time series does not exist, a new time series will be created. It is not
358 * time series does not exist, a new time series will be created. It is not 363 /// allowed to write a time series point that is older than the existing
359 * allowed to write a time series point that is older than the existing 364 /// youngest point of that time series. Points that are older than the
360 * youngest point of that time series. Points that are older than the existing 365 /// existing youngest point of that time series will be discarded silently.
361 * youngest point of that time series will be discarded silently. Therefore, 366 /// Therefore, users should make sure that points of a time series are
362 * users should make sure that points of a time series are written 367 /// written sequentially in the order of their end time.
363 * sequentially in the order of their end time. 368 ///
364 * 369 /// [request] - The metadata request object.
365 * [request] - The metadata request object. 370 ///
366 * 371 /// Request parameters:
367 * Request parameters: 372 ///
368 * 373 /// [project] - The project ID. The value can be the numeric project ID or
369 * [project] - The project ID. The value can be the numeric project ID or 374 /// string-based project name.
370 * string-based project name. 375 ///
371 * 376 /// Completes with a [WriteTimeseriesResponse].
372 * Completes with a [WriteTimeseriesResponse]. 377 ///
373 * 378 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
374 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 379 /// an error.
375 * error. 380 ///
376 * 381 /// If the used [http.Client] completes with an error when making a REST
377 * If the used [http.Client] completes with an error when making a REST call, 382 /// call, this method will complete with the same error.
378 * this method will complete with the same error. 383 async.Future<WriteTimeseriesResponse> write(
379 */ 384 WriteTimeseriesRequest request, core.String project) {
380 async.Future<WriteTimeseriesResponse> write(WriteTimeseriesRequest request, co re.String project) {
381 var _url = null; 385 var _url = null;
382 var _queryParams = new core.Map(); 386 var _queryParams = new core.Map();
383 var _uploadMedia = null; 387 var _uploadMedia = null;
384 var _uploadOptions = null; 388 var _uploadOptions = null;
385 var _downloadOptions = commons.DownloadOptions.Metadata; 389 var _downloadOptions = commons.DownloadOptions.Metadata;
386 var _body = null; 390 var _body = null;
387 391
388 if (request != null) { 392 if (request != null) {
389 _body = convert.JSON.encode((request).toJson()); 393 _body = convert.JSON.encode((request).toJson());
390 } 394 }
391 if (project == null) { 395 if (project == null) {
392 throw new core.ArgumentError("Parameter project is required."); 396 throw new core.ArgumentError("Parameter project is required.");
393 } 397 }
394 398
395 _url = commons.Escaper.ecapeVariable('$project') + '/timeseries:write'; 399 _url = commons.Escaper.ecapeVariable('$project') + '/timeseries:write';
396 400
397 var _response = _requester.request(_url, 401 var _response = _requester.request(_url, "POST",
398 "POST", 402 body: _body,
399 body: _body, 403 queryParams: _queryParams,
400 queryParams: _queryParams, 404 uploadOptions: _uploadOptions,
401 uploadOptions: _uploadOptions, 405 uploadMedia: _uploadMedia,
402 uploadMedia: _uploadMedia, 406 downloadOptions: _downloadOptions);
403 downloadOptions: _downloadOptions);
404 return _response.then((data) => new WriteTimeseriesResponse.fromJson(data)); 407 return _response.then((data) => new WriteTimeseriesResponse.fromJson(data));
405 } 408 }
406
407 } 409 }
408 410
409
410 class TimeseriesDescriptorsResourceApi { 411 class TimeseriesDescriptorsResourceApi {
411 final commons.ApiRequester _requester; 412 final commons.ApiRequester _requester;
412 413
413 TimeseriesDescriptorsResourceApi(commons.ApiRequester client) : 414 TimeseriesDescriptorsResourceApi(commons.ApiRequester client)
414 _requester = client; 415 : _requester = client;
415 416
416 /** 417 /// List the descriptors of the time series that match the metric and labels
417 * List the descriptors of the time series that match the metric and labels 418 /// values and that have data points in the interval. Large responses are
418 * values and that have data points in the interval. Large responses are 419 /// paginated; use the nextPageToken returned in the response to request
419 * paginated; use the nextPageToken returned in the response to request 420 /// subsequent pages of results by setting the pageToken query parameter to
420 * subsequent pages of results by setting the pageToken query parameter to the 421 /// the value of the nextPageToken.
421 * value of the nextPageToken. 422 ///
422 * 423 /// [request] - The metadata request object.
423 * [request] - The metadata request object. 424 ///
424 * 425 /// Request parameters:
425 * Request parameters: 426 ///
426 * 427 /// [project] - The project ID to which this time series belongs. The value
427 * [project] - The project ID to which this time series belongs. The value can 428 /// can be the numeric project ID or string-based project name.
428 * be the numeric project ID or string-based project name. 429 ///
429 * 430 /// [metric] - Metric names are protocol-free URLs as listed in the Supported
430 * [metric] - Metric names are protocol-free URLs as listed in the Supported 431 /// Metrics page. For example,
431 * Metrics page. For example, 432 /// compute.googleapis.com/instance/disk/read_ops_count.
432 * compute.googleapis.com/instance/disk/read_ops_count. 433 ///
433 * 434 /// [youngest] - End of the time interval (inclusive), which is expressed as
434 * [youngest] - End of the time interval (inclusive), which is expressed as an 435 /// an RFC 3339 timestamp.
435 * RFC 3339 timestamp. 436 ///
436 * 437 /// [aggregator] - The aggregation function that will reduce the data points
437 * [aggregator] - The aggregation function that will reduce the data points in 438 /// in each window to a single point. This parameter is only valid for
438 * each window to a single point. This parameter is only valid for 439 /// non-cumulative metrics with a value type of INT64 or DOUBLE.
439 * non-cumulative metrics with a value type of INT64 or DOUBLE. 440 /// Possible string values are:
440 * Possible string values are: 441 /// - "max"
441 * - "max" 442 /// - "mean"
442 * - "mean" 443 /// - "min"
443 * - "min" 444 /// - "sum"
444 * - "sum" 445 ///
445 * 446 /// [count] - Maximum number of time series descriptors per page. Used for
446 * [count] - Maximum number of time series descriptors per page. Used for 447 /// pagination. If not specified, count = 100.
447 * pagination. If not specified, count = 100. 448 /// Value must be between "1" and "1000".
448 * Value must be between "1" and "1000". 449 ///
449 * 450 /// [labels] - A collection of labels for the matching time series, which are
450 * [labels] - A collection of labels for the matching time series, which are 451 /// represented as:
451 * represented as: 452 /// - key==value: key equals the value
452 * - key==value: key equals the value 453 /// - key=~value: key regex matches the value
453 * - key=~value: key regex matches the value 454 /// - key!=value: key does not equal the value
454 * - key!=value: key does not equal the value 455 /// - key!~value: key regex does not match the value For example, to list
455 * - key!~value: key regex does not match the value For example, to list all 456 /// all of the time series descriptors for the region us-central1, you could
456 * of the time series descriptors for the region us-central1, you could 457 /// specify:
457 * specify: 458 /// label=cloud.googleapis.com%2Flocation=~us-central1.*
458 * label=cloud.googleapis.com%2Flocation=~us-central1.* 459 /// Value must have pattern "(.+?)(==|=~|!=|!~)(.+)".
459 * Value must have pattern "(.+?)(==|=~|!=|!~)(.+)". 460 ///
460 * 461 /// [oldest] - Start of the time interval (exclusive), which is expressed as
461 * [oldest] - Start of the time interval (exclusive), which is expressed as an 462 /// an RFC 3339 timestamp. If neither oldest nor timespan is specified, the
462 * RFC 3339 timestamp. If neither oldest nor timespan is specified, the 463 /// default time interval will be (youngest - 4 hours, youngest]
463 * default time interval will be (youngest - 4 hours, youngest] 464 ///
464 * 465 /// [pageToken] - The pagination token, which is used to page through large
465 * [pageToken] - The pagination token, which is used to page through large 466 /// result sets. Set this value to the value of the nextPageToken to retrieve
466 * result sets. Set this value to the value of the nextPageToken to retrieve 467 /// the next page of results.
467 * the next page of results. 468 ///
468 * 469 /// [timespan] - Length of the time interval to query, which is an
469 * [timespan] - Length of the time interval to query, which is an alternative 470 /// alternative way to declare the interval: (youngest - timespan, youngest].
470 * way to declare the interval: (youngest - timespan, youngest]. The timespan 471 /// The timespan and oldest parameters should not be used together. Units:
471 * and oldest parameters should not be used together. Units: 472 /// - s: second
472 * - s: second 473 /// - m: minute
473 * - m: minute 474 /// - h: hour
474 * - h: hour 475 /// - d: day
475 * - d: day 476 /// - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example:
476 * - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 477 /// 2w3d is not allowed; you should use 17d instead.
477 * 2w3d is not allowed; you should use 17d instead. 478 ///
478 * 479 /// If neither oldest nor timespan is specified, the default time interval
479 * If neither oldest nor timespan is specified, the default time interval will 480 /// will be (youngest - 4 hours, youngest].
480 * be (youngest - 4 hours, youngest]. 481 /// Value must have pattern "[0-9]+[smhdw]?".
481 * Value must have pattern "[0-9]+[smhdw]?". 482 ///
482 * 483 /// [window] - The sampling window. At most one data point will be returned
483 * [window] - The sampling window. At most one data point will be returned for 484 /// for each window in the requested time interval. This parameter is only
484 * each window in the requested time interval. This parameter is only valid 485 /// valid for non-cumulative metric types. Units:
485 * for non-cumulative metric types. Units: 486 /// - m: minute
486 * - m: minute 487 /// - h: hour
487 * - h: hour 488 /// - d: day
488 * - d: day 489 /// - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d
489 * - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is 490 /// is not allowed; you should use 17d instead.
490 * not allowed; you should use 17d instead. 491 /// Value must have pattern "[0-9]+[mhdw]?".
491 * Value must have pattern "[0-9]+[mhdw]?". 492 ///
492 * 493 /// Completes with a [ListTimeseriesDescriptorsResponse].
493 * Completes with a [ListTimeseriesDescriptorsResponse]. 494 ///
494 * 495 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
495 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 496 /// an error.
496 * error. 497 ///
497 * 498 /// If the used [http.Client] completes with an error when making a REST
498 * If the used [http.Client] completes with an error when making a REST call, 499 /// call, this method will complete with the same error.
499 * this method will complete with the same error. 500 async.Future<ListTimeseriesDescriptorsResponse> list(
500 */ 501 ListTimeseriesDescriptorsRequest request,
501 async.Future<ListTimeseriesDescriptorsResponse> list(ListTimeseriesDescriptors Request request, core.String project, core.String metric, core.String youngest, {core.String aggregator, core.int count, core.List<core.String> labels, core.Str ing oldest, core.String pageToken, core.String timespan, core.String window}) { 502 core.String project,
503 core.String metric,
504 core.String youngest,
505 {core.String aggregator,
506 core.int count,
507 core.List<core.String> labels,
508 core.String oldest,
509 core.String pageToken,
510 core.String timespan,
511 core.String window}) {
502 var _url = null; 512 var _url = null;
503 var _queryParams = new core.Map(); 513 var _queryParams = new core.Map();
504 var _uploadMedia = null; 514 var _uploadMedia = null;
505 var _uploadOptions = null; 515 var _uploadOptions = null;
506 var _downloadOptions = commons.DownloadOptions.Metadata; 516 var _downloadOptions = commons.DownloadOptions.Metadata;
507 var _body = null; 517 var _body = null;
508 518
509 if (request != null) { 519 if (request != null) {
510 _body = convert.JSON.encode((request).toJson()); 520 _body = convert.JSON.encode((request).toJson());
511 } 521 }
(...skipping 22 matching lines...) Expand all
534 if (pageToken != null) { 544 if (pageToken != null) {
535 _queryParams["pageToken"] = [pageToken]; 545 _queryParams["pageToken"] = [pageToken];
536 } 546 }
537 if (timespan != null) { 547 if (timespan != null) {
538 _queryParams["timespan"] = [timespan]; 548 _queryParams["timespan"] = [timespan];
539 } 549 }
540 if (window != null) { 550 if (window != null) {
541 _queryParams["window"] = [window]; 551 _queryParams["window"] = [window];
542 } 552 }
543 553
544 _url = commons.Escaper.ecapeVariable('$project') + '/timeseriesDescriptors/' + commons.Escaper.ecapeVariable('$metric'); 554 _url = commons.Escaper.ecapeVariable('$project') +
555 '/timeseriesDescriptors/' +
556 commons.Escaper.ecapeVariable('$metric');
545 557
546 var _response = _requester.request(_url, 558 var _response = _requester.request(_url, "GET",
547 "GET", 559 body: _body,
548 body: _body, 560 queryParams: _queryParams,
549 queryParams: _queryParams, 561 uploadOptions: _uploadOptions,
550 uploadOptions: _uploadOptions, 562 uploadMedia: _uploadMedia,
551 uploadMedia: _uploadMedia, 563 downloadOptions: _downloadOptions);
552 downloadOptions: _downloadOptions); 564 return _response
553 return _response.then((data) => new ListTimeseriesDescriptorsResponse.fromJs on(data)); 565 .then((data) => new ListTimeseriesDescriptorsResponse.fromJson(data));
554 } 566 }
555
556 } 567 }
557 568
558 569 /// The response of cloudmonitoring.metricDescriptors.delete.
559
560 /** The response of cloudmonitoring.metricDescriptors.delete. */
561 class DeleteMetricDescriptorResponse { 570 class DeleteMetricDescriptorResponse {
562 /** 571 /// Identifies what kind of resource this is. Value: the fixed string
563 * Identifies what kind of resource this is. Value: the fixed string 572 /// "cloudmonitoring#deleteMetricDescriptorResponse".
564 * "cloudmonitoring#deleteMetricDescriptorResponse".
565 */
566 core.String kind; 573 core.String kind;
567 574
568 DeleteMetricDescriptorResponse(); 575 DeleteMetricDescriptorResponse();
569 576
570 DeleteMetricDescriptorResponse.fromJson(core.Map _json) { 577 DeleteMetricDescriptorResponse.fromJson(core.Map _json) {
571 if (_json.containsKey("kind")) { 578 if (_json.containsKey("kind")) {
572 kind = _json["kind"]; 579 kind = _json["kind"];
573 } 580 }
574 } 581 }
575 582
576 core.Map<core.String, core.Object> toJson() { 583 core.Map<core.String, core.Object> toJson() {
577 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 584 final core.Map<core.String, core.Object> _json =
585 new core.Map<core.String, core.Object>();
578 if (kind != null) { 586 if (kind != null) {
579 _json["kind"] = kind; 587 _json["kind"] = kind;
580 } 588 }
581 return _json; 589 return _json;
582 } 590 }
583 } 591 }
584 592
585 /** The request of cloudmonitoring.metricDescriptors.list. */ 593 /// The request of cloudmonitoring.metricDescriptors.list.
586 class ListMetricDescriptorsRequest { 594 class ListMetricDescriptorsRequest {
587 /** 595 /// Identifies what kind of resource this is. Value: the fixed string
588 * Identifies what kind of resource this is. Value: the fixed string 596 /// "cloudmonitoring#listMetricDescriptorsRequest".
589 * "cloudmonitoring#listMetricDescriptorsRequest".
590 */
591 core.String kind; 597 core.String kind;
592 598
593 ListMetricDescriptorsRequest(); 599 ListMetricDescriptorsRequest();
594 600
595 ListMetricDescriptorsRequest.fromJson(core.Map _json) { 601 ListMetricDescriptorsRequest.fromJson(core.Map _json) {
596 if (_json.containsKey("kind")) { 602 if (_json.containsKey("kind")) {
597 kind = _json["kind"]; 603 kind = _json["kind"];
598 } 604 }
599 } 605 }
600 606
601 core.Map<core.String, core.Object> toJson() { 607 core.Map<core.String, core.Object> toJson() {
602 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 608 final core.Map<core.String, core.Object> _json =
609 new core.Map<core.String, core.Object>();
603 if (kind != null) { 610 if (kind != null) {
604 _json["kind"] = kind; 611 _json["kind"] = kind;
605 } 612 }
606 return _json; 613 return _json;
607 } 614 }
608 } 615 }
609 616
610 /** The response of cloudmonitoring.metricDescriptors.list. */ 617 /// The response of cloudmonitoring.metricDescriptors.list.
611 class ListMetricDescriptorsResponse { 618 class ListMetricDescriptorsResponse {
612 /** 619 /// Identifies what kind of resource this is. Value: the fixed string
613 * Identifies what kind of resource this is. Value: the fixed string 620 /// "cloudmonitoring#listMetricDescriptorsResponse".
614 * "cloudmonitoring#listMetricDescriptorsResponse".
615 */
616 core.String kind; 621 core.String kind;
617 /** The returned metric descriptors. */ 622
623 /// The returned metric descriptors.
618 core.List<MetricDescriptor> metrics; 624 core.List<MetricDescriptor> metrics;
619 /** 625
620 * Pagination token. If present, indicates that additional results are 626 /// Pagination token. If present, indicates that additional results are
621 * available for retrieval. To access the results past the pagination limit, 627 /// available for retrieval. To access the results past the pagination limit,
622 * pass this value to the pageToken query parameter. 628 /// pass this value to the pageToken query parameter.
623 */
624 core.String nextPageToken; 629 core.String nextPageToken;
625 630
626 ListMetricDescriptorsResponse(); 631 ListMetricDescriptorsResponse();
627 632
628 ListMetricDescriptorsResponse.fromJson(core.Map _json) { 633 ListMetricDescriptorsResponse.fromJson(core.Map _json) {
629 if (_json.containsKey("kind")) { 634 if (_json.containsKey("kind")) {
630 kind = _json["kind"]; 635 kind = _json["kind"];
631 } 636 }
632 if (_json.containsKey("metrics")) { 637 if (_json.containsKey("metrics")) {
633 metrics = _json["metrics"].map((value) => new MetricDescriptor.fromJson(va lue)).toList(); 638 metrics = _json["metrics"]
639 .map((value) => new MetricDescriptor.fromJson(value))
640 .toList();
634 } 641 }
635 if (_json.containsKey("nextPageToken")) { 642 if (_json.containsKey("nextPageToken")) {
636 nextPageToken = _json["nextPageToken"]; 643 nextPageToken = _json["nextPageToken"];
637 } 644 }
638 } 645 }
639 646
640 core.Map<core.String, core.Object> toJson() { 647 core.Map<core.String, core.Object> toJson() {
641 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 648 final core.Map<core.String, core.Object> _json =
649 new core.Map<core.String, core.Object>();
642 if (kind != null) { 650 if (kind != null) {
643 _json["kind"] = kind; 651 _json["kind"] = kind;
644 } 652 }
645 if (metrics != null) { 653 if (metrics != null) {
646 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); 654 _json["metrics"] = metrics.map((value) => (value).toJson()).toList();
647 } 655 }
648 if (nextPageToken != null) { 656 if (nextPageToken != null) {
649 _json["nextPageToken"] = nextPageToken; 657 _json["nextPageToken"] = nextPageToken;
650 } 658 }
651 return _json; 659 return _json;
652 } 660 }
653 } 661 }
654 662
655 /** The request of cloudmonitoring.timeseriesDescriptors.list */ 663 /// The request of cloudmonitoring.timeseriesDescriptors.list
656 class ListTimeseriesDescriptorsRequest { 664 class ListTimeseriesDescriptorsRequest {
657 /** 665 /// Identifies what kind of resource this is. Value: the fixed string
658 * Identifies what kind of resource this is. Value: the fixed string 666 /// "cloudmonitoring#listTimeseriesDescriptorsRequest".
659 * "cloudmonitoring#listTimeseriesDescriptorsRequest".
660 */
661 core.String kind; 667 core.String kind;
662 668
663 ListTimeseriesDescriptorsRequest(); 669 ListTimeseriesDescriptorsRequest();
664 670
665 ListTimeseriesDescriptorsRequest.fromJson(core.Map _json) { 671 ListTimeseriesDescriptorsRequest.fromJson(core.Map _json) {
666 if (_json.containsKey("kind")) { 672 if (_json.containsKey("kind")) {
667 kind = _json["kind"]; 673 kind = _json["kind"];
668 } 674 }
669 } 675 }
670 676
671 core.Map<core.String, core.Object> toJson() { 677 core.Map<core.String, core.Object> toJson() {
672 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 678 final core.Map<core.String, core.Object> _json =
679 new core.Map<core.String, core.Object>();
673 if (kind != null) { 680 if (kind != null) {
674 _json["kind"] = kind; 681 _json["kind"] = kind;
675 } 682 }
676 return _json; 683 return _json;
677 } 684 }
678 } 685 }
679 686
680 /** The response of cloudmonitoring.timeseriesDescriptors.list */ 687 /// The response of cloudmonitoring.timeseriesDescriptors.list
681 class ListTimeseriesDescriptorsResponse { 688 class ListTimeseriesDescriptorsResponse {
682 /** 689 /// Identifies what kind of resource this is. Value: the fixed string
683 * Identifies what kind of resource this is. Value: the fixed string 690 /// "cloudmonitoring#listTimeseriesDescriptorsResponse".
684 * "cloudmonitoring#listTimeseriesDescriptorsResponse".
685 */
686 core.String kind; 691 core.String kind;
687 /** 692
688 * Pagination token. If present, indicates that additional results are 693 /// Pagination token. If present, indicates that additional results are
689 * available for retrieval. To access the results past the pagination limit, 694 /// available for retrieval. To access the results past the pagination limit,
690 * set this value to the pageToken query parameter. 695 /// set this value to the pageToken query parameter.
691 */
692 core.String nextPageToken; 696 core.String nextPageToken;
693 /** 697
694 * The oldest timestamp of the interval of this query, as an RFC 3339 string. 698 /// The oldest timestamp of the interval of this query, as an RFC 3339
695 */ 699 /// string.
696 core.DateTime oldest; 700 core.DateTime oldest;
697 /** The returned time series descriptors. */ 701
702 /// The returned time series descriptors.
698 core.List<TimeseriesDescriptor> timeseries; 703 core.List<TimeseriesDescriptor> timeseries;
699 /** 704
700 * The youngest timestamp of the interval of this query, as an RFC 3339 705 /// The youngest timestamp of the interval of this query, as an RFC 3339
701 * string. 706 /// string.
702 */
703 core.DateTime youngest; 707 core.DateTime youngest;
704 708
705 ListTimeseriesDescriptorsResponse(); 709 ListTimeseriesDescriptorsResponse();
706 710
707 ListTimeseriesDescriptorsResponse.fromJson(core.Map _json) { 711 ListTimeseriesDescriptorsResponse.fromJson(core.Map _json) {
708 if (_json.containsKey("kind")) { 712 if (_json.containsKey("kind")) {
709 kind = _json["kind"]; 713 kind = _json["kind"];
710 } 714 }
711 if (_json.containsKey("nextPageToken")) { 715 if (_json.containsKey("nextPageToken")) {
712 nextPageToken = _json["nextPageToken"]; 716 nextPageToken = _json["nextPageToken"];
713 } 717 }
714 if (_json.containsKey("oldest")) { 718 if (_json.containsKey("oldest")) {
715 oldest = core.DateTime.parse(_json["oldest"]); 719 oldest = core.DateTime.parse(_json["oldest"]);
716 } 720 }
717 if (_json.containsKey("timeseries")) { 721 if (_json.containsKey("timeseries")) {
718 timeseries = _json["timeseries"].map((value) => new TimeseriesDescriptor.f romJson(value)).toList(); 722 timeseries = _json["timeseries"]
723 .map((value) => new TimeseriesDescriptor.fromJson(value))
724 .toList();
719 } 725 }
720 if (_json.containsKey("youngest")) { 726 if (_json.containsKey("youngest")) {
721 youngest = core.DateTime.parse(_json["youngest"]); 727 youngest = core.DateTime.parse(_json["youngest"]);
722 } 728 }
723 } 729 }
724 730
725 core.Map<core.String, core.Object> toJson() { 731 core.Map<core.String, core.Object> toJson() {
726 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 732 final core.Map<core.String, core.Object> _json =
733 new core.Map<core.String, core.Object>();
727 if (kind != null) { 734 if (kind != null) {
728 _json["kind"] = kind; 735 _json["kind"] = kind;
729 } 736 }
730 if (nextPageToken != null) { 737 if (nextPageToken != null) {
731 _json["nextPageToken"] = nextPageToken; 738 _json["nextPageToken"] = nextPageToken;
732 } 739 }
733 if (oldest != null) { 740 if (oldest != null) {
734 _json["oldest"] = (oldest).toIso8601String(); 741 _json["oldest"] = (oldest).toIso8601String();
735 } 742 }
736 if (timeseries != null) { 743 if (timeseries != null) {
737 _json["timeseries"] = timeseries.map((value) => (value).toJson()).toList() ; 744 _json["timeseries"] =
745 timeseries.map((value) => (value).toJson()).toList();
738 } 746 }
739 if (youngest != null) { 747 if (youngest != null) {
740 _json["youngest"] = (youngest).toIso8601String(); 748 _json["youngest"] = (youngest).toIso8601String();
741 } 749 }
742 return _json; 750 return _json;
743 } 751 }
744 } 752 }
745 753
746 /** The request of cloudmonitoring.timeseries.list */ 754 /// The request of cloudmonitoring.timeseries.list
747 class ListTimeseriesRequest { 755 class ListTimeseriesRequest {
748 /** 756 /// Identifies what kind of resource this is. Value: the fixed string
749 * Identifies what kind of resource this is. Value: the fixed string 757 /// "cloudmonitoring#listTimeseriesRequest".
750 * "cloudmonitoring#listTimeseriesRequest".
751 */
752 core.String kind; 758 core.String kind;
753 759
754 ListTimeseriesRequest(); 760 ListTimeseriesRequest();
755 761
756 ListTimeseriesRequest.fromJson(core.Map _json) { 762 ListTimeseriesRequest.fromJson(core.Map _json) {
757 if (_json.containsKey("kind")) { 763 if (_json.containsKey("kind")) {
758 kind = _json["kind"]; 764 kind = _json["kind"];
759 } 765 }
760 } 766 }
761 767
762 core.Map<core.String, core.Object> toJson() { 768 core.Map<core.String, core.Object> toJson() {
763 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 769 final core.Map<core.String, core.Object> _json =
770 new core.Map<core.String, core.Object>();
764 if (kind != null) { 771 if (kind != null) {
765 _json["kind"] = kind; 772 _json["kind"] = kind;
766 } 773 }
767 return _json; 774 return _json;
768 } 775 }
769 } 776 }
770 777
771 /** The response of cloudmonitoring.timeseries.list */ 778 /// The response of cloudmonitoring.timeseries.list
772 class ListTimeseriesResponse { 779 class ListTimeseriesResponse {
773 /** 780 /// Identifies what kind of resource this is. Value: the fixed string
774 * Identifies what kind of resource this is. Value: the fixed string 781 /// "cloudmonitoring#listTimeseriesResponse".
775 * "cloudmonitoring#listTimeseriesResponse".
776 */
777 core.String kind; 782 core.String kind;
778 /** 783
779 * Pagination token. If present, indicates that additional results are 784 /// Pagination token. If present, indicates that additional results are
780 * available for retrieval. To access the results past the pagination limit, 785 /// available for retrieval. To access the results past the pagination limit,
781 * set the pageToken query parameter to this value. All of the points of a 786 /// set the pageToken query parameter to this value. All of the points of a
782 * time series will be returned before returning any point of the subsequent 787 /// time series will be returned before returning any point of the subsequent
783 * time series. 788 /// time series.
784 */
785 core.String nextPageToken; 789 core.String nextPageToken;
786 /** 790
787 * The oldest timestamp of the interval of this query as an RFC 3339 string. 791 /// The oldest timestamp of the interval of this query as an RFC 3339 string.
788 */
789 core.DateTime oldest; 792 core.DateTime oldest;
790 /** The returned time series. */ 793
794 /// The returned time series.
791 core.List<Timeseries> timeseries; 795 core.List<Timeseries> timeseries;
792 /** 796
793 * The youngest timestamp of the interval of this query as an RFC 3339 string. 797 /// The youngest timestamp of the interval of this query as an RFC 3339
794 */ 798 /// string.
795 core.DateTime youngest; 799 core.DateTime youngest;
796 800
797 ListTimeseriesResponse(); 801 ListTimeseriesResponse();
798 802
799 ListTimeseriesResponse.fromJson(core.Map _json) { 803 ListTimeseriesResponse.fromJson(core.Map _json) {
800 if (_json.containsKey("kind")) { 804 if (_json.containsKey("kind")) {
801 kind = _json["kind"]; 805 kind = _json["kind"];
802 } 806 }
803 if (_json.containsKey("nextPageToken")) { 807 if (_json.containsKey("nextPageToken")) {
804 nextPageToken = _json["nextPageToken"]; 808 nextPageToken = _json["nextPageToken"];
805 } 809 }
806 if (_json.containsKey("oldest")) { 810 if (_json.containsKey("oldest")) {
807 oldest = core.DateTime.parse(_json["oldest"]); 811 oldest = core.DateTime.parse(_json["oldest"]);
808 } 812 }
809 if (_json.containsKey("timeseries")) { 813 if (_json.containsKey("timeseries")) {
810 timeseries = _json["timeseries"].map((value) => new Timeseries.fromJson(va lue)).toList(); 814 timeseries = _json["timeseries"]
815 .map((value) => new Timeseries.fromJson(value))
816 .toList();
811 } 817 }
812 if (_json.containsKey("youngest")) { 818 if (_json.containsKey("youngest")) {
813 youngest = core.DateTime.parse(_json["youngest"]); 819 youngest = core.DateTime.parse(_json["youngest"]);
814 } 820 }
815 } 821 }
816 822
817 core.Map<core.String, core.Object> toJson() { 823 core.Map<core.String, core.Object> toJson() {
818 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 824 final core.Map<core.String, core.Object> _json =
825 new core.Map<core.String, core.Object>();
819 if (kind != null) { 826 if (kind != null) {
820 _json["kind"] = kind; 827 _json["kind"] = kind;
821 } 828 }
822 if (nextPageToken != null) { 829 if (nextPageToken != null) {
823 _json["nextPageToken"] = nextPageToken; 830 _json["nextPageToken"] = nextPageToken;
824 } 831 }
825 if (oldest != null) { 832 if (oldest != null) {
826 _json["oldest"] = (oldest).toIso8601String(); 833 _json["oldest"] = (oldest).toIso8601String();
827 } 834 }
828 if (timeseries != null) { 835 if (timeseries != null) {
829 _json["timeseries"] = timeseries.map((value) => (value).toJson()).toList() ; 836 _json["timeseries"] =
837 timeseries.map((value) => (value).toJson()).toList();
830 } 838 }
831 if (youngest != null) { 839 if (youngest != null) {
832 _json["youngest"] = (youngest).toIso8601String(); 840 _json["youngest"] = (youngest).toIso8601String();
833 } 841 }
834 return _json; 842 return _json;
835 } 843 }
836 } 844 }
837 845
838 /** 846 /// A metricDescriptor defines the name, label keys, and data type of a
839 * A metricDescriptor defines the name, label keys, and data type of a 847 /// particular metric.
840 * particular metric.
841 */
842 class MetricDescriptor { 848 class MetricDescriptor {
843 /** Description of this metric. */ 849 /// Description of this metric.
844 core.String description; 850 core.String description;
845 /** Labels defined for this metric. */ 851
852 /// Labels defined for this metric.
846 core.List<MetricDescriptorLabelDescriptor> labels; 853 core.List<MetricDescriptorLabelDescriptor> labels;
847 /** The name of this metric. */ 854
855 /// The name of this metric.
848 core.String name; 856 core.String name;
849 /** The project ID to which the metric belongs. */ 857
858 /// The project ID to which the metric belongs.
850 core.String project; 859 core.String project;
851 /** Type description for this metric. */ 860
861 /// Type description for this metric.
852 MetricDescriptorTypeDescriptor typeDescriptor; 862 MetricDescriptorTypeDescriptor typeDescriptor;
853 863
854 MetricDescriptor(); 864 MetricDescriptor();
855 865
856 MetricDescriptor.fromJson(core.Map _json) { 866 MetricDescriptor.fromJson(core.Map _json) {
857 if (_json.containsKey("description")) { 867 if (_json.containsKey("description")) {
858 description = _json["description"]; 868 description = _json["description"];
859 } 869 }
860 if (_json.containsKey("labels")) { 870 if (_json.containsKey("labels")) {
861 labels = _json["labels"].map((value) => new MetricDescriptorLabelDescripto r.fromJson(value)).toList(); 871 labels = _json["labels"]
872 .map((value) => new MetricDescriptorLabelDescriptor.fromJson(value))
873 .toList();
862 } 874 }
863 if (_json.containsKey("name")) { 875 if (_json.containsKey("name")) {
864 name = _json["name"]; 876 name = _json["name"];
865 } 877 }
866 if (_json.containsKey("project")) { 878 if (_json.containsKey("project")) {
867 project = _json["project"]; 879 project = _json["project"];
868 } 880 }
869 if (_json.containsKey("typeDescriptor")) { 881 if (_json.containsKey("typeDescriptor")) {
870 typeDescriptor = new MetricDescriptorTypeDescriptor.fromJson(_json["typeDe scriptor"]); 882 typeDescriptor =
883 new MetricDescriptorTypeDescriptor.fromJson(_json["typeDescriptor"]);
871 } 884 }
872 } 885 }
873 886
874 core.Map<core.String, core.Object> toJson() { 887 core.Map<core.String, core.Object> toJson() {
875 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 888 final core.Map<core.String, core.Object> _json =
889 new core.Map<core.String, core.Object>();
876 if (description != null) { 890 if (description != null) {
877 _json["description"] = description; 891 _json["description"] = description;
878 } 892 }
879 if (labels != null) { 893 if (labels != null) {
880 _json["labels"] = labels.map((value) => (value).toJson()).toList(); 894 _json["labels"] = labels.map((value) => (value).toJson()).toList();
881 } 895 }
882 if (name != null) { 896 if (name != null) {
883 _json["name"] = name; 897 _json["name"] = name;
884 } 898 }
885 if (project != null) { 899 if (project != null) {
886 _json["project"] = project; 900 _json["project"] = project;
887 } 901 }
888 if (typeDescriptor != null) { 902 if (typeDescriptor != null) {
889 _json["typeDescriptor"] = (typeDescriptor).toJson(); 903 _json["typeDescriptor"] = (typeDescriptor).toJson();
890 } 904 }
891 return _json; 905 return _json;
892 } 906 }
893 } 907 }
894 908
895 /** 909 /// A label in a metric is a description of this metric, including the key of
896 * A label in a metric is a description of this metric, including the key of 910 /// this description (what the description is), and the value for this
897 * this description (what the description is), and the value for this 911 /// description.
898 * description.
899 */
900 class MetricDescriptorLabelDescriptor { 912 class MetricDescriptorLabelDescriptor {
901 /** Label description. */ 913 /// Label description.
902 core.String description; 914 core.String description;
903 /** Label key. */ 915
916 /// Label key.
904 core.String key; 917 core.String key;
905 918
906 MetricDescriptorLabelDescriptor(); 919 MetricDescriptorLabelDescriptor();
907 920
908 MetricDescriptorLabelDescriptor.fromJson(core.Map _json) { 921 MetricDescriptorLabelDescriptor.fromJson(core.Map _json) {
909 if (_json.containsKey("description")) { 922 if (_json.containsKey("description")) {
910 description = _json["description"]; 923 description = _json["description"];
911 } 924 }
912 if (_json.containsKey("key")) { 925 if (_json.containsKey("key")) {
913 key = _json["key"]; 926 key = _json["key"];
914 } 927 }
915 } 928 }
916 929
917 core.Map<core.String, core.Object> toJson() { 930 core.Map<core.String, core.Object> toJson() {
918 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 931 final core.Map<core.String, core.Object> _json =
932 new core.Map<core.String, core.Object>();
919 if (description != null) { 933 if (description != null) {
920 _json["description"] = description; 934 _json["description"] = description;
921 } 935 }
922 if (key != null) { 936 if (key != null) {
923 _json["key"] = key; 937 _json["key"] = key;
924 } 938 }
925 return _json; 939 return _json;
926 } 940 }
927 } 941 }
928 942
929 /** 943 /// A type in a metric contains information about how the metric is collected
930 * A type in a metric contains information about how the metric is collected and 944 /// and what its data points look like.
931 * what its data points look like.
932 */
933 class MetricDescriptorTypeDescriptor { 945 class MetricDescriptorTypeDescriptor {
934 /** The method of collecting data for the metric. See Metric types. */ 946 /// The method of collecting data for the metric. See Metric types.
935 core.String metricType; 947 core.String metricType;
936 /** 948
937 * The data type of of individual points in the metric's time series. See 949 /// The data type of of individual points in the metric's time series. See
938 * Metric value types. 950 /// Metric value types.
939 */
940 core.String valueType; 951 core.String valueType;
941 952
942 MetricDescriptorTypeDescriptor(); 953 MetricDescriptorTypeDescriptor();
943 954
944 MetricDescriptorTypeDescriptor.fromJson(core.Map _json) { 955 MetricDescriptorTypeDescriptor.fromJson(core.Map _json) {
945 if (_json.containsKey("metricType")) { 956 if (_json.containsKey("metricType")) {
946 metricType = _json["metricType"]; 957 metricType = _json["metricType"];
947 } 958 }
948 if (_json.containsKey("valueType")) { 959 if (_json.containsKey("valueType")) {
949 valueType = _json["valueType"]; 960 valueType = _json["valueType"];
950 } 961 }
951 } 962 }
952 963
953 core.Map<core.String, core.Object> toJson() { 964 core.Map<core.String, core.Object> toJson() {
954 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 965 final core.Map<core.String, core.Object> _json =
966 new core.Map<core.String, core.Object>();
955 if (metricType != null) { 967 if (metricType != null) {
956 _json["metricType"] = metricType; 968 _json["metricType"] = metricType;
957 } 969 }
958 if (valueType != null) { 970 if (valueType != null) {
959 _json["valueType"] = valueType; 971 _json["valueType"] = valueType;
960 } 972 }
961 return _json; 973 return _json;
962 } 974 }
963 } 975 }
964 976
965 /** 977 /// Point is a single point in a time series. It consists of a start time, an
966 * Point is a single point in a time series. It consists of a start time, an end 978 /// end time, and a value.
967 * time, and a value.
968 */
969 class Point { 979 class Point {
970 /** The value of this data point. Either "true" or "false". */ 980 /// The value of this data point. Either "true" or "false".
971 core.bool boolValue; 981 core.bool boolValue;
972 /** 982
973 * The value of this data point as a distribution. A distribution value can 983 /// The value of this data point as a distribution. A distribution value can
974 * contain a list of buckets and/or an underflowBucket and an overflowBucket. 984 /// contain a list of buckets and/or an underflowBucket and an
975 * The values of these points can be used to create a histogram. 985 /// overflowBucket. The values of these points can be used to create a
976 */ 986 /// histogram.
977 PointDistribution distributionValue; 987 PointDistribution distributionValue;
978 /** 988
979 * The value of this data point as a double-precision floating-point number. 989 /// The value of this data point as a double-precision floating-point number.
980 */
981 core.double doubleValue; 990 core.double doubleValue;
982 /** 991
983 * The interval [start, end] is the time period to which the point's value 992 /// The interval [start, end] is the time period to which the point's value
984 * applies. For gauge metrics, whose values are instantaneous measurements, 993 /// applies. For gauge metrics, whose values are instantaneous measurements,
985 * this interval should be empty (start should equal end). For cumulative 994 /// this interval should be empty (start should equal end). For cumulative
986 * metrics (of which deltas and rates are special cases), the interval should 995 /// metrics (of which deltas and rates are special cases), the interval
987 * be non-empty. Both start and end are RFC 3339 strings. 996 /// should be non-empty. Both start and end are RFC 3339 strings.
988 */
989 core.DateTime end; 997 core.DateTime end;
990 /** The value of this data point as a 64-bit integer. */ 998
999 /// The value of this data point as a 64-bit integer.
991 core.String int64Value; 1000 core.String int64Value;
992 /** 1001
993 * The interval [start, end] is the time period to which the point's value 1002 /// The interval [start, end] is the time period to which the point's value
994 * applies. For gauge metrics, whose values are instantaneous measurements, 1003 /// applies. For gauge metrics, whose values are instantaneous measurements,
995 * this interval should be empty (start should equal end). For cumulative 1004 /// this interval should be empty (start should equal end). For cumulative
996 * metrics (of which deltas and rates are special cases), the interval should 1005 /// metrics (of which deltas and rates are special cases), the interval
997 * be non-empty. Both start and end are RFC 3339 strings. 1006 /// should be non-empty. Both start and end are RFC 3339 strings.
998 */
999 core.DateTime start; 1007 core.DateTime start;
1000 /** The value of this data point in string format. */ 1008
1009 /// The value of this data point in string format.
1001 core.String stringValue; 1010 core.String stringValue;
1002 1011
1003 Point(); 1012 Point();
1004 1013
1005 Point.fromJson(core.Map _json) { 1014 Point.fromJson(core.Map _json) {
1006 if (_json.containsKey("boolValue")) { 1015 if (_json.containsKey("boolValue")) {
1007 boolValue = _json["boolValue"]; 1016 boolValue = _json["boolValue"];
1008 } 1017 }
1009 if (_json.containsKey("distributionValue")) { 1018 if (_json.containsKey("distributionValue")) {
1010 distributionValue = new PointDistribution.fromJson(_json["distributionValu e"]); 1019 distributionValue =
1020 new PointDistribution.fromJson(_json["distributionValue"]);
1011 } 1021 }
1012 if (_json.containsKey("doubleValue")) { 1022 if (_json.containsKey("doubleValue")) {
1013 doubleValue = _json["doubleValue"]; 1023 doubleValue = _json["doubleValue"];
1014 } 1024 }
1015 if (_json.containsKey("end")) { 1025 if (_json.containsKey("end")) {
1016 end = core.DateTime.parse(_json["end"]); 1026 end = core.DateTime.parse(_json["end"]);
1017 } 1027 }
1018 if (_json.containsKey("int64Value")) { 1028 if (_json.containsKey("int64Value")) {
1019 int64Value = _json["int64Value"]; 1029 int64Value = _json["int64Value"];
1020 } 1030 }
1021 if (_json.containsKey("start")) { 1031 if (_json.containsKey("start")) {
1022 start = core.DateTime.parse(_json["start"]); 1032 start = core.DateTime.parse(_json["start"]);
1023 } 1033 }
1024 if (_json.containsKey("stringValue")) { 1034 if (_json.containsKey("stringValue")) {
1025 stringValue = _json["stringValue"]; 1035 stringValue = _json["stringValue"];
1026 } 1036 }
1027 } 1037 }
1028 1038
1029 core.Map<core.String, core.Object> toJson() { 1039 core.Map<core.String, core.Object> toJson() {
1030 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1040 final core.Map<core.String, core.Object> _json =
1041 new core.Map<core.String, core.Object>();
1031 if (boolValue != null) { 1042 if (boolValue != null) {
1032 _json["boolValue"] = boolValue; 1043 _json["boolValue"] = boolValue;
1033 } 1044 }
1034 if (distributionValue != null) { 1045 if (distributionValue != null) {
1035 _json["distributionValue"] = (distributionValue).toJson(); 1046 _json["distributionValue"] = (distributionValue).toJson();
1036 } 1047 }
1037 if (doubleValue != null) { 1048 if (doubleValue != null) {
1038 _json["doubleValue"] = doubleValue; 1049 _json["doubleValue"] = doubleValue;
1039 } 1050 }
1040 if (end != null) { 1051 if (end != null) {
1041 _json["end"] = (end).toIso8601String(); 1052 _json["end"] = (end).toIso8601String();
1042 } 1053 }
1043 if (int64Value != null) { 1054 if (int64Value != null) {
1044 _json["int64Value"] = int64Value; 1055 _json["int64Value"] = int64Value;
1045 } 1056 }
1046 if (start != null) { 1057 if (start != null) {
1047 _json["start"] = (start).toIso8601String(); 1058 _json["start"] = (start).toIso8601String();
1048 } 1059 }
1049 if (stringValue != null) { 1060 if (stringValue != null) {
1050 _json["stringValue"] = stringValue; 1061 _json["stringValue"] = stringValue;
1051 } 1062 }
1052 return _json; 1063 return _json;
1053 } 1064 }
1054 } 1065 }
1055 1066
1056 /** 1067 /// Distribution data point value type. When writing distribution points, try
1057 * Distribution data point value type. When writing distribution points, try to 1068 /// to be consistent with the boundaries of your buckets. If you must modify
1058 * be consistent with the boundaries of your buckets. If you must modify the 1069 /// the bucket boundaries, then do so by merging, partitioning, or appending
1059 * bucket boundaries, then do so by merging, partitioning, or appending rather 1070 /// rather than skewing them.
1060 * than skewing them.
1061 */
1062 class PointDistribution { 1071 class PointDistribution {
1063 /** The finite buckets. */ 1072 /// The finite buckets.
1064 core.List<PointDistributionBucket> buckets; 1073 core.List<PointDistributionBucket> buckets;
1065 /** The overflow bucket. */ 1074
1075 /// The overflow bucket.
1066 PointDistributionOverflowBucket overflowBucket; 1076 PointDistributionOverflowBucket overflowBucket;
1067 /** The underflow bucket. */ 1077
1078 /// The underflow bucket.
1068 PointDistributionUnderflowBucket underflowBucket; 1079 PointDistributionUnderflowBucket underflowBucket;
1069 1080
1070 PointDistribution(); 1081 PointDistribution();
1071 1082
1072 PointDistribution.fromJson(core.Map _json) { 1083 PointDistribution.fromJson(core.Map _json) {
1073 if (_json.containsKey("buckets")) { 1084 if (_json.containsKey("buckets")) {
1074 buckets = _json["buckets"].map((value) => new PointDistributionBucket.from Json(value)).toList(); 1085 buckets = _json["buckets"]
1086 .map((value) => new PointDistributionBucket.fromJson(value))
1087 .toList();
1075 } 1088 }
1076 if (_json.containsKey("overflowBucket")) { 1089 if (_json.containsKey("overflowBucket")) {
1077 overflowBucket = new PointDistributionOverflowBucket.fromJson(_json["overf lowBucket"]); 1090 overflowBucket =
1091 new PointDistributionOverflowBucket.fromJson(_json["overflowBucket"]);
1078 } 1092 }
1079 if (_json.containsKey("underflowBucket")) { 1093 if (_json.containsKey("underflowBucket")) {
1080 underflowBucket = new PointDistributionUnderflowBucket.fromJson(_json["und erflowBucket"]); 1094 underflowBucket = new PointDistributionUnderflowBucket.fromJson(
1095 _json["underflowBucket"]);
1081 } 1096 }
1082 } 1097 }
1083 1098
1084 core.Map<core.String, core.Object> toJson() { 1099 core.Map<core.String, core.Object> toJson() {
1085 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1100 final core.Map<core.String, core.Object> _json =
1101 new core.Map<core.String, core.Object>();
1086 if (buckets != null) { 1102 if (buckets != null) {
1087 _json["buckets"] = buckets.map((value) => (value).toJson()).toList(); 1103 _json["buckets"] = buckets.map((value) => (value).toJson()).toList();
1088 } 1104 }
1089 if (overflowBucket != null) { 1105 if (overflowBucket != null) {
1090 _json["overflowBucket"] = (overflowBucket).toJson(); 1106 _json["overflowBucket"] = (overflowBucket).toJson();
1091 } 1107 }
1092 if (underflowBucket != null) { 1108 if (underflowBucket != null) {
1093 _json["underflowBucket"] = (underflowBucket).toJson(); 1109 _json["underflowBucket"] = (underflowBucket).toJson();
1094 } 1110 }
1095 return _json; 1111 return _json;
1096 } 1112 }
1097 } 1113 }
1098 1114
1099 /** 1115 /// The histogram's bucket. Buckets that form the histogram of a distribution
1100 * The histogram's bucket. Buckets that form the histogram of a distribution 1116 /// value. If the upper bound of a bucket, say U1, does not equal the lower
1101 * value. If the upper bound of a bucket, say U1, does not equal the lower bound 1117 /// bound of the next bucket, say L2, this means that there is no event in [U1,
1102 * of the next bucket, say L2, this means that there is no event in [U1, L2). 1118 /// L2).
1103 */
1104 class PointDistributionBucket { 1119 class PointDistributionBucket {
1105 /** 1120 /// The number of events whose values are in the interval defined by this
1106 * The number of events whose values are in the interval defined by this 1121 /// bucket.
1107 * bucket.
1108 */
1109 core.String count; 1122 core.String count;
1110 /** The lower bound of the value interval of this bucket (inclusive). */ 1123
1124 /// The lower bound of the value interval of this bucket (inclusive).
1111 core.double lowerBound; 1125 core.double lowerBound;
1112 /** The upper bound of the value interval of this bucket (exclusive). */ 1126
1127 /// The upper bound of the value interval of this bucket (exclusive).
1113 core.double upperBound; 1128 core.double upperBound;
1114 1129
1115 PointDistributionBucket(); 1130 PointDistributionBucket();
1116 1131
1117 PointDistributionBucket.fromJson(core.Map _json) { 1132 PointDistributionBucket.fromJson(core.Map _json) {
1118 if (_json.containsKey("count")) { 1133 if (_json.containsKey("count")) {
1119 count = _json["count"]; 1134 count = _json["count"];
1120 } 1135 }
1121 if (_json.containsKey("lowerBound")) { 1136 if (_json.containsKey("lowerBound")) {
1122 lowerBound = _json["lowerBound"]; 1137 lowerBound = _json["lowerBound"];
1123 } 1138 }
1124 if (_json.containsKey("upperBound")) { 1139 if (_json.containsKey("upperBound")) {
1125 upperBound = _json["upperBound"]; 1140 upperBound = _json["upperBound"];
1126 } 1141 }
1127 } 1142 }
1128 1143
1129 core.Map<core.String, core.Object> toJson() { 1144 core.Map<core.String, core.Object> toJson() {
1130 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1145 final core.Map<core.String, core.Object> _json =
1146 new core.Map<core.String, core.Object>();
1131 if (count != null) { 1147 if (count != null) {
1132 _json["count"] = count; 1148 _json["count"] = count;
1133 } 1149 }
1134 if (lowerBound != null) { 1150 if (lowerBound != null) {
1135 _json["lowerBound"] = lowerBound; 1151 _json["lowerBound"] = lowerBound;
1136 } 1152 }
1137 if (upperBound != null) { 1153 if (upperBound != null) {
1138 _json["upperBound"] = upperBound; 1154 _json["upperBound"] = upperBound;
1139 } 1155 }
1140 return _json; 1156 return _json;
1141 } 1157 }
1142 } 1158 }
1143 1159
1144 /** 1160 /// The overflow bucket is a special bucket that does not have the upperBound
1145 * The overflow bucket is a special bucket that does not have the upperBound 1161 /// field; it includes all of the events that are no less than its lower bound.
1146 * field; it includes all of the events that are no less than its lower bound.
1147 */
1148 class PointDistributionOverflowBucket { 1162 class PointDistributionOverflowBucket {
1149 /** 1163 /// The number of events whose values are in the interval defined by this
1150 * The number of events whose values are in the interval defined by this 1164 /// bucket.
1151 * bucket.
1152 */
1153 core.String count; 1165 core.String count;
1154 /** The lower bound of the value interval of this bucket (inclusive). */ 1166
1167 /// The lower bound of the value interval of this bucket (inclusive).
1155 core.double lowerBound; 1168 core.double lowerBound;
1156 1169
1157 PointDistributionOverflowBucket(); 1170 PointDistributionOverflowBucket();
1158 1171
1159 PointDistributionOverflowBucket.fromJson(core.Map _json) { 1172 PointDistributionOverflowBucket.fromJson(core.Map _json) {
1160 if (_json.containsKey("count")) { 1173 if (_json.containsKey("count")) {
1161 count = _json["count"]; 1174 count = _json["count"];
1162 } 1175 }
1163 if (_json.containsKey("lowerBound")) { 1176 if (_json.containsKey("lowerBound")) {
1164 lowerBound = _json["lowerBound"]; 1177 lowerBound = _json["lowerBound"];
1165 } 1178 }
1166 } 1179 }
1167 1180
1168 core.Map<core.String, core.Object> toJson() { 1181 core.Map<core.String, core.Object> toJson() {
1169 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1182 final core.Map<core.String, core.Object> _json =
1183 new core.Map<core.String, core.Object>();
1170 if (count != null) { 1184 if (count != null) {
1171 _json["count"] = count; 1185 _json["count"] = count;
1172 } 1186 }
1173 if (lowerBound != null) { 1187 if (lowerBound != null) {
1174 _json["lowerBound"] = lowerBound; 1188 _json["lowerBound"] = lowerBound;
1175 } 1189 }
1176 return _json; 1190 return _json;
1177 } 1191 }
1178 } 1192 }
1179 1193
1180 /** 1194 /// The underflow bucket is a special bucket that does not have the lowerBound
1181 * The underflow bucket is a special bucket that does not have the lowerBound 1195 /// field; it includes all of the events that are less than its upper bound.
1182 * field; it includes all of the events that are less than its upper bound.
1183 */
1184 class PointDistributionUnderflowBucket { 1196 class PointDistributionUnderflowBucket {
1185 /** 1197 /// The number of events whose values are in the interval defined by this
1186 * The number of events whose values are in the interval defined by this 1198 /// bucket.
1187 * bucket.
1188 */
1189 core.String count; 1199 core.String count;
1190 /** The upper bound of the value interval of this bucket (exclusive). */ 1200
1201 /// The upper bound of the value interval of this bucket (exclusive).
1191 core.double upperBound; 1202 core.double upperBound;
1192 1203
1193 PointDistributionUnderflowBucket(); 1204 PointDistributionUnderflowBucket();
1194 1205
1195 PointDistributionUnderflowBucket.fromJson(core.Map _json) { 1206 PointDistributionUnderflowBucket.fromJson(core.Map _json) {
1196 if (_json.containsKey("count")) { 1207 if (_json.containsKey("count")) {
1197 count = _json["count"]; 1208 count = _json["count"];
1198 } 1209 }
1199 if (_json.containsKey("upperBound")) { 1210 if (_json.containsKey("upperBound")) {
1200 upperBound = _json["upperBound"]; 1211 upperBound = _json["upperBound"];
1201 } 1212 }
1202 } 1213 }
1203 1214
1204 core.Map<core.String, core.Object> toJson() { 1215 core.Map<core.String, core.Object> toJson() {
1205 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1216 final core.Map<core.String, core.Object> _json =
1217 new core.Map<core.String, core.Object>();
1206 if (count != null) { 1218 if (count != null) {
1207 _json["count"] = count; 1219 _json["count"] = count;
1208 } 1220 }
1209 if (upperBound != null) { 1221 if (upperBound != null) {
1210 _json["upperBound"] = upperBound; 1222 _json["upperBound"] = upperBound;
1211 } 1223 }
1212 return _json; 1224 return _json;
1213 } 1225 }
1214 } 1226 }
1215 1227
1216 /** 1228 /// The monitoring data is organized as metrics and stored as data points that
1217 * The monitoring data is organized as metrics and stored as data points that 1229 /// are recorded over time. Each data point represents information like the CPU
1218 * are recorded over time. Each data point represents information like the CPU 1230 /// utilization of your virtual machine. A historical record of these data
1219 * utilization of your virtual machine. A historical record of these data points 1231 /// points is called a time series.
1220 * is called a time series.
1221 */
1222 class Timeseries { 1232 class Timeseries {
1223 /** 1233 /// The data points of this time series. The points are listed in order of
1224 * The data points of this time series. The points are listed in order of 1234 /// their end timestamp, from younger to older.
1225 * their end timestamp, from younger to older.
1226 */
1227 core.List<Point> points; 1235 core.List<Point> points;
1228 /** The descriptor of this time series. */ 1236
1237 /// The descriptor of this time series.
1229 TimeseriesDescriptor timeseriesDesc; 1238 TimeseriesDescriptor timeseriesDesc;
1230 1239
1231 Timeseries(); 1240 Timeseries();
1232 1241
1233 Timeseries.fromJson(core.Map _json) { 1242 Timeseries.fromJson(core.Map _json) {
1234 if (_json.containsKey("points")) { 1243 if (_json.containsKey("points")) {
1235 points = _json["points"].map((value) => new Point.fromJson(value)).toList( ); 1244 points =
1245 _json["points"].map((value) => new Point.fromJson(value)).toList();
1236 } 1246 }
1237 if (_json.containsKey("timeseriesDesc")) { 1247 if (_json.containsKey("timeseriesDesc")) {
1238 timeseriesDesc = new TimeseriesDescriptor.fromJson(_json["timeseriesDesc"] ); 1248 timeseriesDesc =
1249 new TimeseriesDescriptor.fromJson(_json["timeseriesDesc"]);
1239 } 1250 }
1240 } 1251 }
1241 1252
1242 core.Map<core.String, core.Object> toJson() { 1253 core.Map<core.String, core.Object> toJson() {
1243 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1254 final core.Map<core.String, core.Object> _json =
1255 new core.Map<core.String, core.Object>();
1244 if (points != null) { 1256 if (points != null) {
1245 _json["points"] = points.map((value) => (value).toJson()).toList(); 1257 _json["points"] = points.map((value) => (value).toJson()).toList();
1246 } 1258 }
1247 if (timeseriesDesc != null) { 1259 if (timeseriesDesc != null) {
1248 _json["timeseriesDesc"] = (timeseriesDesc).toJson(); 1260 _json["timeseriesDesc"] = (timeseriesDesc).toJson();
1249 } 1261 }
1250 return _json; 1262 return _json;
1251 } 1263 }
1252 } 1264 }
1253 1265
1254 /** TimeseriesDescriptor identifies a single time series. */ 1266 /// TimeseriesDescriptor identifies a single time series.
1255 class TimeseriesDescriptor { 1267 class TimeseriesDescriptor {
1256 /** The label's name. */ 1268 /// The label's name.
1257 core.Map<core.String, core.String> labels; 1269 core.Map<core.String, core.String> labels;
1258 /** The name of the metric. */ 1270
1271 /// The name of the metric.
1259 core.String metric; 1272 core.String metric;
1260 /** 1273
1261 * The Developers Console project number to which this time series belongs. 1274 /// The Developers Console project number to which this time series belongs.
1262 */
1263 core.String project; 1275 core.String project;
1264 1276
1265 TimeseriesDescriptor(); 1277 TimeseriesDescriptor();
1266 1278
1267 TimeseriesDescriptor.fromJson(core.Map _json) { 1279 TimeseriesDescriptor.fromJson(core.Map _json) {
1268 if (_json.containsKey("labels")) { 1280 if (_json.containsKey("labels")) {
1269 labels = _json["labels"]; 1281 labels = _json["labels"];
1270 } 1282 }
1271 if (_json.containsKey("metric")) { 1283 if (_json.containsKey("metric")) {
1272 metric = _json["metric"]; 1284 metric = _json["metric"];
1273 } 1285 }
1274 if (_json.containsKey("project")) { 1286 if (_json.containsKey("project")) {
1275 project = _json["project"]; 1287 project = _json["project"];
1276 } 1288 }
1277 } 1289 }
1278 1290
1279 core.Map<core.String, core.Object> toJson() { 1291 core.Map<core.String, core.Object> toJson() {
1280 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1292 final core.Map<core.String, core.Object> _json =
1293 new core.Map<core.String, core.Object>();
1281 if (labels != null) { 1294 if (labels != null) {
1282 _json["labels"] = labels; 1295 _json["labels"] = labels;
1283 } 1296 }
1284 if (metric != null) { 1297 if (metric != null) {
1285 _json["metric"] = metric; 1298 _json["metric"] = metric;
1286 } 1299 }
1287 if (project != null) { 1300 if (project != null) {
1288 _json["project"] = project; 1301 _json["project"] = project;
1289 } 1302 }
1290 return _json; 1303 return _json;
1291 } 1304 }
1292 } 1305 }
1293 1306
1294 class TimeseriesDescriptorLabel { 1307 class TimeseriesDescriptorLabel {
1295 /** The label's name. */ 1308 /// The label's name.
1296 core.String key; 1309 core.String key;
1297 /** The label's value. */ 1310
1311 /// The label's value.
1298 core.String value; 1312 core.String value;
1299 1313
1300 TimeseriesDescriptorLabel(); 1314 TimeseriesDescriptorLabel();
1301 1315
1302 TimeseriesDescriptorLabel.fromJson(core.Map _json) { 1316 TimeseriesDescriptorLabel.fromJson(core.Map _json) {
1303 if (_json.containsKey("key")) { 1317 if (_json.containsKey("key")) {
1304 key = _json["key"]; 1318 key = _json["key"];
1305 } 1319 }
1306 if (_json.containsKey("value")) { 1320 if (_json.containsKey("value")) {
1307 value = _json["value"]; 1321 value = _json["value"];
1308 } 1322 }
1309 } 1323 }
1310 1324
1311 core.Map<core.String, core.Object> toJson() { 1325 core.Map<core.String, core.Object> toJson() {
1312 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1326 final core.Map<core.String, core.Object> _json =
1327 new core.Map<core.String, core.Object>();
1313 if (key != null) { 1328 if (key != null) {
1314 _json["key"] = key; 1329 _json["key"] = key;
1315 } 1330 }
1316 if (value != null) { 1331 if (value != null) {
1317 _json["value"] = value; 1332 _json["value"] = value;
1318 } 1333 }
1319 return _json; 1334 return _json;
1320 } 1335 }
1321 } 1336 }
1322 1337
1323 /** 1338 /// When writing time series, TimeseriesPoint should be used instead of
1324 * When writing time series, TimeseriesPoint should be used instead of 1339 /// Timeseries, to enforce single point for each time series in the
1325 * Timeseries, to enforce single point for each time series in the 1340 /// timeseries.write request.
1326 * timeseries.write request.
1327 */
1328 class TimeseriesPoint { 1341 class TimeseriesPoint {
1329 /** The data point in this time series snapshot. */ 1342 /// The data point in this time series snapshot.
1330 Point point; 1343 Point point;
1331 /** The descriptor of this time series. */ 1344
1345 /// The descriptor of this time series.
1332 TimeseriesDescriptor timeseriesDesc; 1346 TimeseriesDescriptor timeseriesDesc;
1333 1347
1334 TimeseriesPoint(); 1348 TimeseriesPoint();
1335 1349
1336 TimeseriesPoint.fromJson(core.Map _json) { 1350 TimeseriesPoint.fromJson(core.Map _json) {
1337 if (_json.containsKey("point")) { 1351 if (_json.containsKey("point")) {
1338 point = new Point.fromJson(_json["point"]); 1352 point = new Point.fromJson(_json["point"]);
1339 } 1353 }
1340 if (_json.containsKey("timeseriesDesc")) { 1354 if (_json.containsKey("timeseriesDesc")) {
1341 timeseriesDesc = new TimeseriesDescriptor.fromJson(_json["timeseriesDesc"] ); 1355 timeseriesDesc =
1356 new TimeseriesDescriptor.fromJson(_json["timeseriesDesc"]);
1342 } 1357 }
1343 } 1358 }
1344 1359
1345 core.Map<core.String, core.Object> toJson() { 1360 core.Map<core.String, core.Object> toJson() {
1346 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1361 final core.Map<core.String, core.Object> _json =
1362 new core.Map<core.String, core.Object>();
1347 if (point != null) { 1363 if (point != null) {
1348 _json["point"] = (point).toJson(); 1364 _json["point"] = (point).toJson();
1349 } 1365 }
1350 if (timeseriesDesc != null) { 1366 if (timeseriesDesc != null) {
1351 _json["timeseriesDesc"] = (timeseriesDesc).toJson(); 1367 _json["timeseriesDesc"] = (timeseriesDesc).toJson();
1352 } 1368 }
1353 return _json; 1369 return _json;
1354 } 1370 }
1355 } 1371 }
1356 1372
1357 /** The request of cloudmonitoring.timeseries.write */ 1373 /// The request of cloudmonitoring.timeseries.write
1358 class WriteTimeseriesRequest { 1374 class WriteTimeseriesRequest {
1359 /** The label's name. */ 1375 /// The label's name.
1360 core.Map<core.String, core.String> commonLabels; 1376 core.Map<core.String, core.String> commonLabels;
1361 /** 1377
1362 * Provide time series specific labels and the data points for each time 1378 /// Provide time series specific labels and the data points for each time
1363 * series. The labels in timeseries and the common_labels should form a 1379 /// series. The labels in timeseries and the common_labels should form a
1364 * complete list of labels that required by the metric. 1380 /// complete list of labels that required by the metric.
1365 */
1366 core.List<TimeseriesPoint> timeseries; 1381 core.List<TimeseriesPoint> timeseries;
1367 1382
1368 WriteTimeseriesRequest(); 1383 WriteTimeseriesRequest();
1369 1384
1370 WriteTimeseriesRequest.fromJson(core.Map _json) { 1385 WriteTimeseriesRequest.fromJson(core.Map _json) {
1371 if (_json.containsKey("commonLabels")) { 1386 if (_json.containsKey("commonLabels")) {
1372 commonLabels = _json["commonLabels"]; 1387 commonLabels = _json["commonLabels"];
1373 } 1388 }
1374 if (_json.containsKey("timeseries")) { 1389 if (_json.containsKey("timeseries")) {
1375 timeseries = _json["timeseries"].map((value) => new TimeseriesPoint.fromJs on(value)).toList(); 1390 timeseries = _json["timeseries"]
1391 .map((value) => new TimeseriesPoint.fromJson(value))
1392 .toList();
1376 } 1393 }
1377 } 1394 }
1378 1395
1379 core.Map<core.String, core.Object> toJson() { 1396 core.Map<core.String, core.Object> toJson() {
1380 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1397 final core.Map<core.String, core.Object> _json =
1398 new core.Map<core.String, core.Object>();
1381 if (commonLabels != null) { 1399 if (commonLabels != null) {
1382 _json["commonLabels"] = commonLabels; 1400 _json["commonLabels"] = commonLabels;
1383 } 1401 }
1384 if (timeseries != null) { 1402 if (timeseries != null) {
1385 _json["timeseries"] = timeseries.map((value) => (value).toJson()).toList() ; 1403 _json["timeseries"] =
1404 timeseries.map((value) => (value).toJson()).toList();
1386 } 1405 }
1387 return _json; 1406 return _json;
1388 } 1407 }
1389 } 1408 }
1390 1409
1391 /** The response of cloudmonitoring.timeseries.write */ 1410 /// The response of cloudmonitoring.timeseries.write
1392 class WriteTimeseriesResponse { 1411 class WriteTimeseriesResponse {
1393 /** 1412 /// Identifies what kind of resource this is. Value: the fixed string
1394 * Identifies what kind of resource this is. Value: the fixed string 1413 /// "cloudmonitoring#writeTimeseriesResponse".
1395 * "cloudmonitoring#writeTimeseriesResponse".
1396 */
1397 core.String kind; 1414 core.String kind;
1398 1415
1399 WriteTimeseriesResponse(); 1416 WriteTimeseriesResponse();
1400 1417
1401 WriteTimeseriesResponse.fromJson(core.Map _json) { 1418 WriteTimeseriesResponse.fromJson(core.Map _json) {
1402 if (_json.containsKey("kind")) { 1419 if (_json.containsKey("kind")) {
1403 kind = _json["kind"]; 1420 kind = _json["kind"];
1404 } 1421 }
1405 } 1422 }
1406 1423
1407 core.Map<core.String, core.Object> toJson() { 1424 core.Map<core.String, core.Object> toJson() {
1408 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1425 final core.Map<core.String, core.Object> _json =
1426 new core.Map<core.String, core.Object>();
1409 if (kind != null) { 1427 if (kind != null) {
1410 _json["kind"] = kind; 1428 _json["kind"] = kind;
1411 } 1429 }
1412 return _json; 1430 return _json;
1413 } 1431 }
1414 } 1432 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698