| OLD | NEW |
| 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.monitoring.v3; | 3 library googleapis.monitoring.v3; |
| 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 monitoring/v3'; | 15 const core.String USER_AGENT = 'dart-api-client monitoring/v3'; |
| 16 | 16 |
| 17 /** | 17 /// Manages your Stackdriver Monitoring data and configurations. Most projects |
| 18 * Manages your Stackdriver Monitoring data and configurations. Most projects | 18 /// must be associated with a Stackdriver account, with a few exceptions as |
| 19 * must be associated with a Stackdriver account, with a few exceptions as noted | 19 /// noted on the individual method pages. |
| 20 * on the individual method pages. | |
| 21 */ | |
| 22 class MonitoringApi { | 20 class MonitoringApi { |
| 23 /** View and manage your data across Google Cloud Platform services */ | 21 /// View and manage your data across Google Cloud Platform services |
| 24 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 22 static const CloudPlatformScope = |
| 23 "https://www.googleapis.com/auth/cloud-platform"; |
| 25 | 24 |
| 26 /** | 25 /// View and write monitoring data for all of your Google and third-party |
| 27 * View and write monitoring data for all of your Google and third-party Cloud | 26 /// Cloud and API projects |
| 28 * and API projects | |
| 29 */ | |
| 30 static const MonitoringScope = "https://www.googleapis.com/auth/monitoring"; | 27 static const MonitoringScope = "https://www.googleapis.com/auth/monitoring"; |
| 31 | 28 |
| 32 /** | 29 /// View monitoring data for all of your Google Cloud and third-party |
| 33 * View monitoring data for all of your Google Cloud and third-party projects | 30 /// projects |
| 34 */ | 31 static const MonitoringReadScope = |
| 35 static const MonitoringReadScope = "https://www.googleapis.com/auth/monitoring
.read"; | 32 "https://www.googleapis.com/auth/monitoring.read"; |
| 36 | 33 |
| 37 /** Publish metric data to your Google Cloud projects */ | 34 /// Publish metric data to your Google Cloud projects |
| 38 static const MonitoringWriteScope = "https://www.googleapis.com/auth/monitorin
g.write"; | 35 static const MonitoringWriteScope = |
| 39 | 36 "https://www.googleapis.com/auth/monitoring.write"; |
| 40 | 37 |
| 41 final commons.ApiRequester _requester; | 38 final commons.ApiRequester _requester; |
| 42 | 39 |
| 43 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 40 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
| 44 | 41 |
| 45 MonitoringApi(http.Client client, {core.String rootUrl: "https://monitoring.go
ogleapis.com/", core.String servicePath: ""}) : | 42 MonitoringApi(http.Client client, |
| 46 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 43 {core.String rootUrl: "https://monitoring.googleapis.com/", |
| 44 core.String servicePath: ""}) |
| 45 : _requester = |
| 46 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
| 47 } | 47 } |
| 48 | 48 |
| 49 | |
| 50 class ProjectsResourceApi { | 49 class ProjectsResourceApi { |
| 51 final commons.ApiRequester _requester; | 50 final commons.ApiRequester _requester; |
| 52 | 51 |
| 53 ProjectsCollectdTimeSeriesResourceApi get collectdTimeSeries => new ProjectsCo
llectdTimeSeriesResourceApi(_requester); | 52 ProjectsCollectdTimeSeriesResourceApi get collectdTimeSeries => |
| 54 ProjectsGroupsResourceApi get groups => new ProjectsGroupsResourceApi(_request
er); | 53 new ProjectsCollectdTimeSeriesResourceApi(_requester); |
| 55 ProjectsMetricDescriptorsResourceApi get metricDescriptors => new ProjectsMetr
icDescriptorsResourceApi(_requester); | 54 ProjectsGroupsResourceApi get groups => |
| 56 ProjectsMonitoredResourceDescriptorsResourceApi get monitoredResourceDescripto
rs => new ProjectsMonitoredResourceDescriptorsResourceApi(_requester); | 55 new ProjectsGroupsResourceApi(_requester); |
| 57 ProjectsTimeSeriesResourceApi get timeSeries => new ProjectsTimeSeriesResource
Api(_requester); | 56 ProjectsMetricDescriptorsResourceApi get metricDescriptors => |
| 57 new ProjectsMetricDescriptorsResourceApi(_requester); |
| 58 ProjectsMonitoredResourceDescriptorsResourceApi |
| 59 get monitoredResourceDescriptors => |
| 60 new ProjectsMonitoredResourceDescriptorsResourceApi(_requester); |
| 61 ProjectsTimeSeriesResourceApi get timeSeries => |
| 62 new ProjectsTimeSeriesResourceApi(_requester); |
| 58 | 63 |
| 59 ProjectsResourceApi(commons.ApiRequester client) : | 64 ProjectsResourceApi(commons.ApiRequester client) : _requester = client; |
| 60 _requester = client; | |
| 61 } | 65 } |
| 62 | 66 |
| 63 | |
| 64 class ProjectsCollectdTimeSeriesResourceApi { | 67 class ProjectsCollectdTimeSeriesResourceApi { |
| 65 final commons.ApiRequester _requester; | 68 final commons.ApiRequester _requester; |
| 66 | 69 |
| 67 ProjectsCollectdTimeSeriesResourceApi(commons.ApiRequester client) : | 70 ProjectsCollectdTimeSeriesResourceApi(commons.ApiRequester client) |
| 68 _requester = client; | 71 : _requester = client; |
| 69 | 72 |
| 70 /** | 73 /// Stackdriver Monitoring Agent only: Creates a new time series.<aside |
| 71 * Stackdriver Monitoring Agent only: Creates a new time series.<aside | 74 /// class="caution">This method is only for use by the Stackdriver Monitoring |
| 72 * class="caution">This method is only for use by the Stackdriver Monitoring | 75 /// Agent. Use projects.timeSeries.create instead.</aside> |
| 73 * Agent. Use projects.timeSeries.create instead.</aside> | 76 /// |
| 74 * | 77 /// [request] - The metadata request object. |
| 75 * [request] - The metadata request object. | 78 /// |
| 76 * | 79 /// Request parameters: |
| 77 * Request parameters: | 80 /// |
| 78 * | 81 /// [name] - The project in which to create the time series. The format is |
| 79 * [name] - The project in which to create the time series. The format is | 82 /// "projects/PROJECT_ID_OR_NUMBER". |
| 80 * "projects/PROJECT_ID_OR_NUMBER". | 83 /// Value must have pattern "^projects/[^/]+$". |
| 81 * Value must have pattern "^projects/[^/]+$". | 84 /// |
| 82 * | 85 /// Completes with a [CreateCollectdTimeSeriesResponse]. |
| 83 * Completes with a [Empty]. | 86 /// |
| 84 * | 87 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 85 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 88 /// an error. |
| 86 * error. | 89 /// |
| 87 * | 90 /// If the used [http.Client] completes with an error when making a REST |
| 88 * If the used [http.Client] completes with an error when making a REST call, | 91 /// call, this method will complete with the same error. |
| 89 * this method will complete with the same error. | 92 async.Future<CreateCollectdTimeSeriesResponse> create( |
| 90 */ | 93 CreateCollectdTimeSeriesRequest request, core.String name) { |
| 91 async.Future<Empty> create(CreateCollectdTimeSeriesRequest request, core.Strin
g name) { | |
| 92 var _url = null; | 94 var _url = null; |
| 93 var _queryParams = new core.Map(); | 95 var _queryParams = new core.Map(); |
| 94 var _uploadMedia = null; | 96 var _uploadMedia = null; |
| 95 var _uploadOptions = null; | 97 var _uploadOptions = null; |
| 96 var _downloadOptions = commons.DownloadOptions.Metadata; | 98 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 97 var _body = null; | 99 var _body = null; |
| 98 | 100 |
| 99 if (request != null) { | 101 if (request != null) { |
| 100 _body = convert.JSON.encode((request).toJson()); | 102 _body = convert.JSON.encode((request).toJson()); |
| 101 } | 103 } |
| 102 if (name == null) { | 104 if (name == null) { |
| 103 throw new core.ArgumentError("Parameter name is required."); | 105 throw new core.ArgumentError("Parameter name is required."); |
| 104 } | 106 } |
| 105 | 107 |
| 106 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/collectdTi
meSeries'; | 108 _url = 'v3/' + |
| 109 commons.Escaper.ecapeVariableReserved('$name') + |
| 110 '/collectdTimeSeries'; |
| 107 | 111 |
| 108 var _response = _requester.request(_url, | 112 var _response = _requester.request(_url, "POST", |
| 109 "POST", | 113 body: _body, |
| 110 body: _body, | 114 queryParams: _queryParams, |
| 111 queryParams: _queryParams, | 115 uploadOptions: _uploadOptions, |
| 112 uploadOptions: _uploadOptions, | 116 uploadMedia: _uploadMedia, |
| 113 uploadMedia: _uploadMedia, | 117 downloadOptions: _downloadOptions); |
| 114 downloadOptions: _downloadOptions); | 118 return _response |
| 115 return _response.then((data) => new Empty.fromJson(data)); | 119 .then((data) => new CreateCollectdTimeSeriesResponse.fromJson(data)); |
| 116 } | 120 } |
| 117 | |
| 118 } | 121 } |
| 119 | 122 |
| 120 | |
| 121 class ProjectsGroupsResourceApi { | 123 class ProjectsGroupsResourceApi { |
| 122 final commons.ApiRequester _requester; | 124 final commons.ApiRequester _requester; |
| 123 | 125 |
| 124 ProjectsGroupsMembersResourceApi get members => new ProjectsGroupsMembersResou
rceApi(_requester); | 126 ProjectsGroupsMembersResourceApi get members => |
| 127 new ProjectsGroupsMembersResourceApi(_requester); |
| 125 | 128 |
| 126 ProjectsGroupsResourceApi(commons.ApiRequester client) : | 129 ProjectsGroupsResourceApi(commons.ApiRequester client) : _requester = client; |
| 127 _requester = client; | |
| 128 | 130 |
| 129 /** | 131 /// Creates a new group. |
| 130 * Creates a new group. | 132 /// |
| 131 * | 133 /// [request] - The metadata request object. |
| 132 * [request] - The metadata request object. | 134 /// |
| 133 * | 135 /// Request parameters: |
| 134 * Request parameters: | 136 /// |
| 135 * | 137 /// [name] - The project in which to create the group. The format is |
| 136 * [name] - The project in which to create the group. The format is | 138 /// "projects/{project_id_or_number}". |
| 137 * "projects/{project_id_or_number}". | 139 /// Value must have pattern "^projects/[^/]+$". |
| 138 * Value must have pattern "^projects/[^/]+$". | 140 /// |
| 139 * | 141 /// [validateOnly] - If true, validate this request but do not create the |
| 140 * [validateOnly] - If true, validate this request but do not create the | 142 /// group. |
| 141 * group. | 143 /// |
| 142 * | 144 /// Completes with a [Group]. |
| 143 * Completes with a [Group]. | 145 /// |
| 144 * | 146 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 145 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 147 /// an error. |
| 146 * error. | 148 /// |
| 147 * | 149 /// If the used [http.Client] completes with an error when making a REST |
| 148 * If the used [http.Client] completes with an error when making a REST call, | 150 /// call, this method will complete with the same error. |
| 149 * this method will complete with the same error. | 151 async.Future<Group> create(Group request, core.String name, |
| 150 */ | 152 {core.bool validateOnly}) { |
| 151 async.Future<Group> create(Group request, core.String name, {core.bool validat
eOnly}) { | |
| 152 var _url = null; | 153 var _url = null; |
| 153 var _queryParams = new core.Map(); | 154 var _queryParams = new core.Map(); |
| 154 var _uploadMedia = null; | 155 var _uploadMedia = null; |
| 155 var _uploadOptions = null; | 156 var _uploadOptions = null; |
| 156 var _downloadOptions = commons.DownloadOptions.Metadata; | 157 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 157 var _body = null; | 158 var _body = null; |
| 158 | 159 |
| 159 if (request != null) { | 160 if (request != null) { |
| 160 _body = convert.JSON.encode((request).toJson()); | 161 _body = convert.JSON.encode((request).toJson()); |
| 161 } | 162 } |
| 162 if (name == null) { | 163 if (name == null) { |
| 163 throw new core.ArgumentError("Parameter name is required."); | 164 throw new core.ArgumentError("Parameter name is required."); |
| 164 } | 165 } |
| 165 if (validateOnly != null) { | 166 if (validateOnly != null) { |
| 166 _queryParams["validateOnly"] = ["${validateOnly}"]; | 167 _queryParams["validateOnly"] = ["${validateOnly}"]; |
| 167 } | 168 } |
| 168 | 169 |
| 169 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/groups'; | 170 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/groups'; |
| 170 | 171 |
| 171 var _response = _requester.request(_url, | 172 var _response = _requester.request(_url, "POST", |
| 172 "POST", | 173 body: _body, |
| 173 body: _body, | 174 queryParams: _queryParams, |
| 174 queryParams: _queryParams, | 175 uploadOptions: _uploadOptions, |
| 175 uploadOptions: _uploadOptions, | 176 uploadMedia: _uploadMedia, |
| 176 uploadMedia: _uploadMedia, | 177 downloadOptions: _downloadOptions); |
| 177 downloadOptions: _downloadOptions); | |
| 178 return _response.then((data) => new Group.fromJson(data)); | 178 return _response.then((data) => new Group.fromJson(data)); |
| 179 } | 179 } |
| 180 | 180 |
| 181 /** | 181 /// Deletes an existing group. |
| 182 * Deletes an existing group. | 182 /// |
| 183 * | 183 /// Request parameters: |
| 184 * Request parameters: | 184 /// |
| 185 * | 185 /// [name] - The group to delete. The format is |
| 186 * [name] - The group to delete. The format is | 186 /// "projects/{project_id_or_number}/groups/{group_id}". |
| 187 * "projects/{project_id_or_number}/groups/{group_id}". | 187 /// Value must have pattern "^projects/[^/]+/groups/[^/]+$". |
| 188 * Value must have pattern "^projects/[^/]+/groups/[^/]+$". | 188 /// |
| 189 * | 189 /// Completes with a [Empty]. |
| 190 * Completes with a [Empty]. | 190 /// |
| 191 * | 191 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 192 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 192 /// an error. |
| 193 * error. | 193 /// |
| 194 * | 194 /// If the used [http.Client] completes with an error when making a REST |
| 195 * If the used [http.Client] completes with an error when making a REST call, | 195 /// call, this method will complete with the same error. |
| 196 * this method will complete with the same error. | |
| 197 */ | |
| 198 async.Future<Empty> delete(core.String name) { | 196 async.Future<Empty> delete(core.String name) { |
| 199 var _url = null; | 197 var _url = null; |
| 200 var _queryParams = new core.Map(); | 198 var _queryParams = new core.Map(); |
| 201 var _uploadMedia = null; | 199 var _uploadMedia = null; |
| 202 var _uploadOptions = null; | 200 var _uploadOptions = null; |
| 203 var _downloadOptions = commons.DownloadOptions.Metadata; | 201 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 204 var _body = null; | 202 var _body = null; |
| 205 | 203 |
| 206 if (name == null) { | 204 if (name == null) { |
| 207 throw new core.ArgumentError("Parameter name is required."); | 205 throw new core.ArgumentError("Parameter name is required."); |
| 208 } | 206 } |
| 209 | 207 |
| 210 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); | 208 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 211 | 209 |
| 212 var _response = _requester.request(_url, | 210 var _response = _requester.request(_url, "DELETE", |
| 213 "DELETE", | 211 body: _body, |
| 214 body: _body, | 212 queryParams: _queryParams, |
| 215 queryParams: _queryParams, | 213 uploadOptions: _uploadOptions, |
| 216 uploadOptions: _uploadOptions, | 214 uploadMedia: _uploadMedia, |
| 217 uploadMedia: _uploadMedia, | 215 downloadOptions: _downloadOptions); |
| 218 downloadOptions: _downloadOptions); | |
| 219 return _response.then((data) => new Empty.fromJson(data)); | 216 return _response.then((data) => new Empty.fromJson(data)); |
| 220 } | 217 } |
| 221 | 218 |
| 222 /** | 219 /// Gets a single group. |
| 223 * Gets a single group. | 220 /// |
| 224 * | 221 /// Request parameters: |
| 225 * Request parameters: | 222 /// |
| 226 * | 223 /// [name] - The group to retrieve. The format is |
| 227 * [name] - The group to retrieve. The format is | 224 /// "projects/{project_id_or_number}/groups/{group_id}". |
| 228 * "projects/{project_id_or_number}/groups/{group_id}". | 225 /// Value must have pattern "^projects/[^/]+/groups/[^/]+$". |
| 229 * Value must have pattern "^projects/[^/]+/groups/[^/]+$". | 226 /// |
| 230 * | 227 /// Completes with a [Group]. |
| 231 * Completes with a [Group]. | 228 /// |
| 232 * | 229 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 233 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 230 /// an error. |
| 234 * error. | 231 /// |
| 235 * | 232 /// If the used [http.Client] completes with an error when making a REST |
| 236 * If the used [http.Client] completes with an error when making a REST call, | 233 /// call, this method will complete with the same error. |
| 237 * this method will complete with the same error. | |
| 238 */ | |
| 239 async.Future<Group> get(core.String name) { | 234 async.Future<Group> get(core.String name) { |
| 240 var _url = null; | 235 var _url = null; |
| 241 var _queryParams = new core.Map(); | 236 var _queryParams = new core.Map(); |
| 242 var _uploadMedia = null; | 237 var _uploadMedia = null; |
| 243 var _uploadOptions = null; | 238 var _uploadOptions = null; |
| 244 var _downloadOptions = commons.DownloadOptions.Metadata; | 239 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 245 var _body = null; | 240 var _body = null; |
| 246 | 241 |
| 247 if (name == null) { | 242 if (name == null) { |
| 248 throw new core.ArgumentError("Parameter name is required."); | 243 throw new core.ArgumentError("Parameter name is required."); |
| 249 } | 244 } |
| 250 | 245 |
| 251 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); | 246 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 252 | 247 |
| 253 var _response = _requester.request(_url, | 248 var _response = _requester.request(_url, "GET", |
| 254 "GET", | 249 body: _body, |
| 255 body: _body, | 250 queryParams: _queryParams, |
| 256 queryParams: _queryParams, | 251 uploadOptions: _uploadOptions, |
| 257 uploadOptions: _uploadOptions, | 252 uploadMedia: _uploadMedia, |
| 258 uploadMedia: _uploadMedia, | 253 downloadOptions: _downloadOptions); |
| 259 downloadOptions: _downloadOptions); | |
| 260 return _response.then((data) => new Group.fromJson(data)); | 254 return _response.then((data) => new Group.fromJson(data)); |
| 261 } | 255 } |
| 262 | 256 |
| 263 /** | 257 /// Lists the existing groups. |
| 264 * Lists the existing groups. | 258 /// |
| 265 * | 259 /// Request parameters: |
| 266 * Request parameters: | 260 /// |
| 267 * | 261 /// [name] - The project whose groups are to be listed. The format is |
| 268 * [name] - The project whose groups are to be listed. The format is | 262 /// "projects/{project_id_or_number}". |
| 269 * "projects/{project_id_or_number}". | 263 /// Value must have pattern "^projects/[^/]+$". |
| 270 * Value must have pattern "^projects/[^/]+$". | 264 /// |
| 271 * | 265 /// [descendantsOfGroup] - A group name: |
| 272 * [childrenOfGroup] - A group name: | 266 /// "projects/{project_id_or_number}/groups/{group_id}". Returns the |
| 273 * "projects/{project_id_or_number}/groups/{group_id}". Returns groups whose | 267 /// descendants of the specified group. This is a superset of the results |
| 274 * parentName field contains the group name. If no groups have this parent, | 268 /// returned by the childrenOfGroup filter, and includes |
| 275 * the results are empty. | 269 /// children-of-children, and so forth. |
| 276 * | 270 /// |
| 277 * [descendantsOfGroup] - A group name: | 271 /// [pageToken] - If this field is not empty then it must contain the |
| 278 * "projects/{project_id_or_number}/groups/{group_id}". Returns the | 272 /// nextPageToken value returned by a previous call to this method. Using |
| 279 * descendants of the specified group. This is a superset of the results | 273 /// this field causes the method to return additional results from the |
| 280 * returned by the childrenOfGroup filter, and includes children-of-children, | 274 /// previous method call. |
| 281 * and so forth. | 275 /// |
| 282 * | 276 /// [pageSize] - A positive number that is the maximum number of results to |
| 283 * [pageToken] - If this field is not empty then it must contain the | 277 /// return. |
| 284 * nextPageToken value returned by a previous call to this method. Using this | 278 /// |
| 285 * field causes the method to return additional results from the previous | 279 /// [ancestorsOfGroup] - A group name: |
| 286 * method call. | 280 /// "projects/{project_id_or_number}/groups/{group_id}". Returns groups that |
| 287 * | 281 /// are ancestors of the specified group. The groups are returned in order, |
| 288 * [pageSize] - A positive number that is the maximum number of results to | 282 /// starting with the immediate parent and ending with the most distant |
| 289 * return. | 283 /// ancestor. If the specified group has no immediate parent, the results are |
| 290 * | 284 /// empty. |
| 291 * [ancestorsOfGroup] - A group name: | 285 /// |
| 292 * "projects/{project_id_or_number}/groups/{group_id}". Returns groups that | 286 /// [childrenOfGroup] - A group name: |
| 293 * are ancestors of the specified group. The groups are returned in order, | 287 /// "projects/{project_id_or_number}/groups/{group_id}". Returns groups whose |
| 294 * starting with the immediate parent and ending with the most distant | 288 /// parentName field contains the group name. If no groups have this parent, |
| 295 * ancestor. If the specified group has no immediate parent, the results are | 289 /// the results are empty. |
| 296 * empty. | 290 /// |
| 297 * | 291 /// Completes with a [ListGroupsResponse]. |
| 298 * Completes with a [ListGroupsResponse]. | 292 /// |
| 299 * | 293 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 300 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 294 /// an error. |
| 301 * error. | 295 /// |
| 302 * | 296 /// If the used [http.Client] completes with an error when making a REST |
| 303 * If the used [http.Client] completes with an error when making a REST call, | 297 /// call, this method will complete with the same error. |
| 304 * this method will complete with the same error. | 298 async.Future<ListGroupsResponse> list(core.String name, |
| 305 */ | 299 {core.String descendantsOfGroup, |
| 306 async.Future<ListGroupsResponse> list(core.String name, {core.String childrenO
fGroup, core.String descendantsOfGroup, core.String pageToken, core.int pageSize
, core.String ancestorsOfGroup}) { | 300 core.String pageToken, |
| 301 core.int pageSize, |
| 302 core.String ancestorsOfGroup, |
| 303 core.String childrenOfGroup}) { |
| 307 var _url = null; | 304 var _url = null; |
| 308 var _queryParams = new core.Map(); | 305 var _queryParams = new core.Map(); |
| 309 var _uploadMedia = null; | 306 var _uploadMedia = null; |
| 310 var _uploadOptions = null; | 307 var _uploadOptions = null; |
| 311 var _downloadOptions = commons.DownloadOptions.Metadata; | 308 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 312 var _body = null; | 309 var _body = null; |
| 313 | 310 |
| 314 if (name == null) { | 311 if (name == null) { |
| 315 throw new core.ArgumentError("Parameter name is required."); | 312 throw new core.ArgumentError("Parameter name is required."); |
| 316 } | 313 } |
| 317 if (childrenOfGroup != null) { | |
| 318 _queryParams["childrenOfGroup"] = [childrenOfGroup]; | |
| 319 } | |
| 320 if (descendantsOfGroup != null) { | 314 if (descendantsOfGroup != null) { |
| 321 _queryParams["descendantsOfGroup"] = [descendantsOfGroup]; | 315 _queryParams["descendantsOfGroup"] = [descendantsOfGroup]; |
| 322 } | 316 } |
| 323 if (pageToken != null) { | 317 if (pageToken != null) { |
| 324 _queryParams["pageToken"] = [pageToken]; | 318 _queryParams["pageToken"] = [pageToken]; |
| 325 } | 319 } |
| 326 if (pageSize != null) { | 320 if (pageSize != null) { |
| 327 _queryParams["pageSize"] = ["${pageSize}"]; | 321 _queryParams["pageSize"] = ["${pageSize}"]; |
| 328 } | 322 } |
| 329 if (ancestorsOfGroup != null) { | 323 if (ancestorsOfGroup != null) { |
| 330 _queryParams["ancestorsOfGroup"] = [ancestorsOfGroup]; | 324 _queryParams["ancestorsOfGroup"] = [ancestorsOfGroup]; |
| 331 } | 325 } |
| 326 if (childrenOfGroup != null) { |
| 327 _queryParams["childrenOfGroup"] = [childrenOfGroup]; |
| 328 } |
| 332 | 329 |
| 333 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/groups'; | 330 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/groups'; |
| 334 | 331 |
| 335 var _response = _requester.request(_url, | 332 var _response = _requester.request(_url, "GET", |
| 336 "GET", | 333 body: _body, |
| 337 body: _body, | 334 queryParams: _queryParams, |
| 338 queryParams: _queryParams, | 335 uploadOptions: _uploadOptions, |
| 339 uploadOptions: _uploadOptions, | 336 uploadMedia: _uploadMedia, |
| 340 uploadMedia: _uploadMedia, | 337 downloadOptions: _downloadOptions); |
| 341 downloadOptions: _downloadOptions); | |
| 342 return _response.then((data) => new ListGroupsResponse.fromJson(data)); | 338 return _response.then((data) => new ListGroupsResponse.fromJson(data)); |
| 343 } | 339 } |
| 344 | 340 |
| 345 /** | 341 /// Updates an existing group. You can change any group attributes except |
| 346 * Updates an existing group. You can change any group attributes except name. | 342 /// name. |
| 347 * | 343 /// |
| 348 * [request] - The metadata request object. | 344 /// [request] - The metadata request object. |
| 349 * | 345 /// |
| 350 * Request parameters: | 346 /// Request parameters: |
| 351 * | 347 /// |
| 352 * [name] - Output only. The name of this group. The format is | 348 /// [name] - Output only. The name of this group. The format is |
| 353 * "projects/{project_id_or_number}/groups/{group_id}". When creating a group, | 349 /// "projects/{project_id_or_number}/groups/{group_id}". When creating a |
| 354 * this field is ignored and a new name is created consisting of the project | 350 /// group, this field is ignored and a new name is created consisting of the |
| 355 * specified in the call to CreateGroup and a unique {group_id} that is | 351 /// project specified in the call to CreateGroup and a unique {group_id} that |
| 356 * generated automatically. | 352 /// is generated automatically. |
| 357 * Value must have pattern "^projects/[^/]+/groups/[^/]+$". | 353 /// Value must have pattern "^projects/[^/]+/groups/[^/]+$". |
| 358 * | 354 /// |
| 359 * [validateOnly] - If true, validate this request but do not update the | 355 /// [validateOnly] - If true, validate this request but do not update the |
| 360 * existing group. | 356 /// existing group. |
| 361 * | 357 /// |
| 362 * Completes with a [Group]. | 358 /// Completes with a [Group]. |
| 363 * | 359 /// |
| 364 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 360 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 365 * error. | 361 /// an error. |
| 366 * | 362 /// |
| 367 * If the used [http.Client] completes with an error when making a REST call, | 363 /// If the used [http.Client] completes with an error when making a REST |
| 368 * this method will complete with the same error. | 364 /// call, this method will complete with the same error. |
| 369 */ | 365 async.Future<Group> update(Group request, core.String name, |
| 370 async.Future<Group> update(Group request, core.String name, {core.bool validat
eOnly}) { | 366 {core.bool validateOnly}) { |
| 371 var _url = null; | 367 var _url = null; |
| 372 var _queryParams = new core.Map(); | 368 var _queryParams = new core.Map(); |
| 373 var _uploadMedia = null; | 369 var _uploadMedia = null; |
| 374 var _uploadOptions = null; | 370 var _uploadOptions = null; |
| 375 var _downloadOptions = commons.DownloadOptions.Metadata; | 371 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 376 var _body = null; | 372 var _body = null; |
| 377 | 373 |
| 378 if (request != null) { | 374 if (request != null) { |
| 379 _body = convert.JSON.encode((request).toJson()); | 375 _body = convert.JSON.encode((request).toJson()); |
| 380 } | 376 } |
| 381 if (name == null) { | 377 if (name == null) { |
| 382 throw new core.ArgumentError("Parameter name is required."); | 378 throw new core.ArgumentError("Parameter name is required."); |
| 383 } | 379 } |
| 384 if (validateOnly != null) { | 380 if (validateOnly != null) { |
| 385 _queryParams["validateOnly"] = ["${validateOnly}"]; | 381 _queryParams["validateOnly"] = ["${validateOnly}"]; |
| 386 } | 382 } |
| 387 | 383 |
| 388 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); | 384 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 389 | 385 |
| 390 var _response = _requester.request(_url, | 386 var _response = _requester.request(_url, "PUT", |
| 391 "PUT", | 387 body: _body, |
| 392 body: _body, | 388 queryParams: _queryParams, |
| 393 queryParams: _queryParams, | 389 uploadOptions: _uploadOptions, |
| 394 uploadOptions: _uploadOptions, | 390 uploadMedia: _uploadMedia, |
| 395 uploadMedia: _uploadMedia, | 391 downloadOptions: _downloadOptions); |
| 396 downloadOptions: _downloadOptions); | |
| 397 return _response.then((data) => new Group.fromJson(data)); | 392 return _response.then((data) => new Group.fromJson(data)); |
| 398 } | 393 } |
| 399 | |
| 400 } | 394 } |
| 401 | 395 |
| 402 | |
| 403 class ProjectsGroupsMembersResourceApi { | 396 class ProjectsGroupsMembersResourceApi { |
| 404 final commons.ApiRequester _requester; | 397 final commons.ApiRequester _requester; |
| 405 | 398 |
| 406 ProjectsGroupsMembersResourceApi(commons.ApiRequester client) : | 399 ProjectsGroupsMembersResourceApi(commons.ApiRequester client) |
| 407 _requester = client; | 400 : _requester = client; |
| 408 | 401 |
| 409 /** | 402 /// Lists the monitored resources that are members of a group. |
| 410 * Lists the monitored resources that are members of a group. | 403 /// |
| 411 * | 404 /// Request parameters: |
| 412 * Request parameters: | 405 /// |
| 413 * | 406 /// [name] - The group whose members are listed. The format is |
| 414 * [name] - The group whose members are listed. The format is | 407 /// "projects/{project_id_or_number}/groups/{group_id}". |
| 415 * "projects/{project_id_or_number}/groups/{group_id}". | 408 /// Value must have pattern "^projects/[^/]+/groups/[^/]+$". |
| 416 * Value must have pattern "^projects/[^/]+/groups/[^/]+$". | 409 /// |
| 417 * | 410 /// [interval_endTime] - Required. The end of the time interval. |
| 418 * [interval_endTime] - Required. The end of the time interval. | 411 /// |
| 419 * | 412 /// [filter] - An optional list filter describing the members to be returned. |
| 420 * [filter] - An optional list filter describing the members to be returned. | 413 /// The filter may reference the type, labels, and metadata of monitored |
| 421 * The filter may reference the type, labels, and metadata of monitored | 414 /// resources that comprise the group. For example, to return only resources |
| 422 * resources that comprise the group. For example, to return only resources | 415 /// representing Compute Engine VM instances, use this filter: |
| 423 * representing Compute Engine VM instances, use this filter: | 416 /// resource.type = "gce_instance" |
| 424 * resource.type = "gce_instance" | 417 /// |
| 425 * | 418 /// [pageToken] - If this field is not empty then it must contain the |
| 426 * [pageToken] - If this field is not empty then it must contain the | 419 /// nextPageToken value returned by a previous call to this method. Using |
| 427 * nextPageToken value returned by a previous call to this method. Using this | 420 /// this field causes the method to return additional results from the |
| 428 * field causes the method to return additional results from the previous | 421 /// previous method call. |
| 429 * method call. | 422 /// |
| 430 * | 423 /// [pageSize] - A positive number that is the maximum number of results to |
| 431 * [pageSize] - A positive number that is the maximum number of results to | 424 /// return. |
| 432 * return. | 425 /// |
| 433 * | 426 /// [interval_startTime] - Optional. The beginning of the time interval. The |
| 434 * [interval_startTime] - Optional. The beginning of the time interval. The | 427 /// default value for the start time is the end time. The start time must not |
| 435 * default value for the start time is the end time. The start time must not | 428 /// be later than the end time. |
| 436 * be later than the end time. | 429 /// |
| 437 * | 430 /// Completes with a [ListGroupMembersResponse]. |
| 438 * Completes with a [ListGroupMembersResponse]. | 431 /// |
| 439 * | 432 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 440 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 433 /// an error. |
| 441 * error. | 434 /// |
| 442 * | 435 /// If the used [http.Client] completes with an error when making a REST |
| 443 * If the used [http.Client] completes with an error when making a REST call, | 436 /// call, this method will complete with the same error. |
| 444 * this method will complete with the same error. | 437 async.Future<ListGroupMembersResponse> list(core.String name, |
| 445 */ | 438 {core.String interval_endTime, |
| 446 async.Future<ListGroupMembersResponse> list(core.String name, {core.String int
erval_endTime, core.String filter, core.String pageToken, core.int pageSize, cor
e.String interval_startTime}) { | 439 core.String filter, |
| 440 core.String pageToken, |
| 441 core.int pageSize, |
| 442 core.String interval_startTime}) { |
| 447 var _url = null; | 443 var _url = null; |
| 448 var _queryParams = new core.Map(); | 444 var _queryParams = new core.Map(); |
| 449 var _uploadMedia = null; | 445 var _uploadMedia = null; |
| 450 var _uploadOptions = null; | 446 var _uploadOptions = null; |
| 451 var _downloadOptions = commons.DownloadOptions.Metadata; | 447 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 452 var _body = null; | 448 var _body = null; |
| 453 | 449 |
| 454 if (name == null) { | 450 if (name == null) { |
| 455 throw new core.ArgumentError("Parameter name is required."); | 451 throw new core.ArgumentError("Parameter name is required."); |
| 456 } | 452 } |
| 457 if (interval_endTime != null) { | 453 if (interval_endTime != null) { |
| 458 _queryParams["interval.endTime"] = [interval_endTime]; | 454 _queryParams["interval.endTime"] = [interval_endTime]; |
| 459 } | 455 } |
| 460 if (filter != null) { | 456 if (filter != null) { |
| 461 _queryParams["filter"] = [filter]; | 457 _queryParams["filter"] = [filter]; |
| 462 } | 458 } |
| 463 if (pageToken != null) { | 459 if (pageToken != null) { |
| 464 _queryParams["pageToken"] = [pageToken]; | 460 _queryParams["pageToken"] = [pageToken]; |
| 465 } | 461 } |
| 466 if (pageSize != null) { | 462 if (pageSize != null) { |
| 467 _queryParams["pageSize"] = ["${pageSize}"]; | 463 _queryParams["pageSize"] = ["${pageSize}"]; |
| 468 } | 464 } |
| 469 if (interval_startTime != null) { | 465 if (interval_startTime != null) { |
| 470 _queryParams["interval.startTime"] = [interval_startTime]; | 466 _queryParams["interval.startTime"] = [interval_startTime]; |
| 471 } | 467 } |
| 472 | 468 |
| 473 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/members'; | 469 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/members'; |
| 474 | 470 |
| 475 var _response = _requester.request(_url, | 471 var _response = _requester.request(_url, "GET", |
| 476 "GET", | 472 body: _body, |
| 477 body: _body, | 473 queryParams: _queryParams, |
| 478 queryParams: _queryParams, | 474 uploadOptions: _uploadOptions, |
| 479 uploadOptions: _uploadOptions, | 475 uploadMedia: _uploadMedia, |
| 480 uploadMedia: _uploadMedia, | 476 downloadOptions: _downloadOptions); |
| 481 downloadOptions: _downloadOptions); | 477 return _response |
| 482 return _response.then((data) => new ListGroupMembersResponse.fromJson(data))
; | 478 .then((data) => new ListGroupMembersResponse.fromJson(data)); |
| 483 } | 479 } |
| 484 | |
| 485 } | 480 } |
| 486 | 481 |
| 487 | |
| 488 class ProjectsMetricDescriptorsResourceApi { | 482 class ProjectsMetricDescriptorsResourceApi { |
| 489 final commons.ApiRequester _requester; | 483 final commons.ApiRequester _requester; |
| 490 | 484 |
| 491 ProjectsMetricDescriptorsResourceApi(commons.ApiRequester client) : | 485 ProjectsMetricDescriptorsResourceApi(commons.ApiRequester client) |
| 492 _requester = client; | 486 : _requester = client; |
| 493 | 487 |
| 494 /** | 488 /// Creates a new metric descriptor. User-created metric descriptors define |
| 495 * Creates a new metric descriptor. User-created metric descriptors define | 489 /// custom metrics. |
| 496 * custom metrics. | 490 /// |
| 497 * | 491 /// [request] - The metadata request object. |
| 498 * [request] - The metadata request object. | 492 /// |
| 499 * | 493 /// Request parameters: |
| 500 * Request parameters: | 494 /// |
| 501 * | 495 /// [name] - The project on which to execute the request. The format is |
| 502 * [name] - The project on which to execute the request. The format is | 496 /// "projects/{project_id_or_number}". |
| 503 * "projects/{project_id_or_number}". | 497 /// Value must have pattern "^projects/[^/]+$". |
| 504 * Value must have pattern "^projects/[^/]+$". | 498 /// |
| 505 * | 499 /// Completes with a [MetricDescriptor]. |
| 506 * Completes with a [MetricDescriptor]. | 500 /// |
| 507 * | 501 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 508 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 502 /// an error. |
| 509 * error. | 503 /// |
| 510 * | 504 /// If the used [http.Client] completes with an error when making a REST |
| 511 * If the used [http.Client] completes with an error when making a REST call, | 505 /// call, this method will complete with the same error. |
| 512 * this method will complete with the same error. | 506 async.Future<MetricDescriptor> create( |
| 513 */ | 507 MetricDescriptor request, core.String name) { |
| 514 async.Future<MetricDescriptor> create(MetricDescriptor request, core.String na
me) { | |
| 515 var _url = null; | 508 var _url = null; |
| 516 var _queryParams = new core.Map(); | 509 var _queryParams = new core.Map(); |
| 517 var _uploadMedia = null; | 510 var _uploadMedia = null; |
| 518 var _uploadOptions = null; | 511 var _uploadOptions = null; |
| 519 var _downloadOptions = commons.DownloadOptions.Metadata; | 512 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 520 var _body = null; | 513 var _body = null; |
| 521 | 514 |
| 522 if (request != null) { | 515 if (request != null) { |
| 523 _body = convert.JSON.encode((request).toJson()); | 516 _body = convert.JSON.encode((request).toJson()); |
| 524 } | 517 } |
| 525 if (name == null) { | 518 if (name == null) { |
| 526 throw new core.ArgumentError("Parameter name is required."); | 519 throw new core.ArgumentError("Parameter name is required."); |
| 527 } | 520 } |
| 528 | 521 |
| 529 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/metricDesc
riptors'; | 522 _url = 'v3/' + |
| 523 commons.Escaper.ecapeVariableReserved('$name') + |
| 524 '/metricDescriptors'; |
| 530 | 525 |
| 531 var _response = _requester.request(_url, | 526 var _response = _requester.request(_url, "POST", |
| 532 "POST", | 527 body: _body, |
| 533 body: _body, | 528 queryParams: _queryParams, |
| 534 queryParams: _queryParams, | 529 uploadOptions: _uploadOptions, |
| 535 uploadOptions: _uploadOptions, | 530 uploadMedia: _uploadMedia, |
| 536 uploadMedia: _uploadMedia, | 531 downloadOptions: _downloadOptions); |
| 537 downloadOptions: _downloadOptions); | |
| 538 return _response.then((data) => new MetricDescriptor.fromJson(data)); | 532 return _response.then((data) => new MetricDescriptor.fromJson(data)); |
| 539 } | 533 } |
| 540 | 534 |
| 541 /** | 535 /// Deletes a metric descriptor. Only user-created custom metrics can be |
| 542 * Deletes a metric descriptor. Only user-created custom metrics can be | 536 /// deleted. |
| 543 * deleted. | 537 /// |
| 544 * | 538 /// Request parameters: |
| 545 * Request parameters: | 539 /// |
| 546 * | 540 /// [name] - The metric descriptor on which to execute the request. The |
| 547 * [name] - The metric descriptor on which to execute the request. The format | 541 /// format is |
| 548 * is "projects/{project_id_or_number}/metricDescriptors/{metric_id}". An | 542 /// "projects/{project_id_or_number}/metricDescriptors/{metric_id}". An |
| 549 * example of {metric_id} is: "custom.googleapis.com/my_test_metric". | 543 /// example of {metric_id} is: "custom.googleapis.com/my_test_metric". |
| 550 * Value must have pattern "^projects/[^/]+/metricDescriptors/.+$". | 544 /// Value must have pattern "^projects/[^/]+/metricDescriptors/.+$". |
| 551 * | 545 /// |
| 552 * Completes with a [Empty]. | 546 /// Completes with a [Empty]. |
| 553 * | 547 /// |
| 554 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 548 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 555 * error. | 549 /// an error. |
| 556 * | 550 /// |
| 557 * If the used [http.Client] completes with an error when making a REST call, | 551 /// If the used [http.Client] completes with an error when making a REST |
| 558 * this method will complete with the same error. | 552 /// call, this method will complete with the same error. |
| 559 */ | |
| 560 async.Future<Empty> delete(core.String name) { | 553 async.Future<Empty> delete(core.String name) { |
| 561 var _url = null; | 554 var _url = null; |
| 562 var _queryParams = new core.Map(); | 555 var _queryParams = new core.Map(); |
| 563 var _uploadMedia = null; | 556 var _uploadMedia = null; |
| 564 var _uploadOptions = null; | 557 var _uploadOptions = null; |
| 565 var _downloadOptions = commons.DownloadOptions.Metadata; | 558 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 566 var _body = null; | 559 var _body = null; |
| 567 | 560 |
| 568 if (name == null) { | 561 if (name == null) { |
| 569 throw new core.ArgumentError("Parameter name is required."); | 562 throw new core.ArgumentError("Parameter name is required."); |
| 570 } | 563 } |
| 571 | 564 |
| 572 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); | 565 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 573 | 566 |
| 574 var _response = _requester.request(_url, | 567 var _response = _requester.request(_url, "DELETE", |
| 575 "DELETE", | 568 body: _body, |
| 576 body: _body, | 569 queryParams: _queryParams, |
| 577 queryParams: _queryParams, | 570 uploadOptions: _uploadOptions, |
| 578 uploadOptions: _uploadOptions, | 571 uploadMedia: _uploadMedia, |
| 579 uploadMedia: _uploadMedia, | 572 downloadOptions: _downloadOptions); |
| 580 downloadOptions: _downloadOptions); | |
| 581 return _response.then((data) => new Empty.fromJson(data)); | 573 return _response.then((data) => new Empty.fromJson(data)); |
| 582 } | 574 } |
| 583 | 575 |
| 584 /** | 576 /// Gets a single metric descriptor. This method does not require a |
| 585 * Gets a single metric descriptor. This method does not require a Stackdriver | 577 /// Stackdriver account. |
| 586 * account. | 578 /// |
| 587 * | 579 /// Request parameters: |
| 588 * Request parameters: | 580 /// |
| 589 * | 581 /// [name] - The metric descriptor on which to execute the request. The |
| 590 * [name] - The metric descriptor on which to execute the request. The format | 582 /// format is |
| 591 * is "projects/{project_id_or_number}/metricDescriptors/{metric_id}". An | 583 /// "projects/{project_id_or_number}/metricDescriptors/{metric_id}". An |
| 592 * example value of {metric_id} is | 584 /// example value of {metric_id} is |
| 593 * "compute.googleapis.com/instance/disk/read_bytes_count". | 585 /// "compute.googleapis.com/instance/disk/read_bytes_count". |
| 594 * Value must have pattern "^projects/[^/]+/metricDescriptors/.+$". | 586 /// Value must have pattern "^projects/[^/]+/metricDescriptors/.+$". |
| 595 * | 587 /// |
| 596 * Completes with a [MetricDescriptor]. | 588 /// Completes with a [MetricDescriptor]. |
| 597 * | 589 /// |
| 598 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 590 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 599 * error. | 591 /// an error. |
| 600 * | 592 /// |
| 601 * If the used [http.Client] completes with an error when making a REST call, | 593 /// If the used [http.Client] completes with an error when making a REST |
| 602 * this method will complete with the same error. | 594 /// call, this method will complete with the same error. |
| 603 */ | |
| 604 async.Future<MetricDescriptor> get(core.String name) { | 595 async.Future<MetricDescriptor> get(core.String name) { |
| 605 var _url = null; | 596 var _url = null; |
| 606 var _queryParams = new core.Map(); | 597 var _queryParams = new core.Map(); |
| 607 var _uploadMedia = null; | 598 var _uploadMedia = null; |
| 608 var _uploadOptions = null; | 599 var _uploadOptions = null; |
| 609 var _downloadOptions = commons.DownloadOptions.Metadata; | 600 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 610 var _body = null; | 601 var _body = null; |
| 611 | 602 |
| 612 if (name == null) { | 603 if (name == null) { |
| 613 throw new core.ArgumentError("Parameter name is required."); | 604 throw new core.ArgumentError("Parameter name is required."); |
| 614 } | 605 } |
| 615 | 606 |
| 616 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); | 607 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 617 | 608 |
| 618 var _response = _requester.request(_url, | 609 var _response = _requester.request(_url, "GET", |
| 619 "GET", | 610 body: _body, |
| 620 body: _body, | 611 queryParams: _queryParams, |
| 621 queryParams: _queryParams, | 612 uploadOptions: _uploadOptions, |
| 622 uploadOptions: _uploadOptions, | 613 uploadMedia: _uploadMedia, |
| 623 uploadMedia: _uploadMedia, | 614 downloadOptions: _downloadOptions); |
| 624 downloadOptions: _downloadOptions); | |
| 625 return _response.then((data) => new MetricDescriptor.fromJson(data)); | 615 return _response.then((data) => new MetricDescriptor.fromJson(data)); |
| 626 } | 616 } |
| 627 | 617 |
| 628 /** | 618 /// Lists metric descriptors that match a filter. This method does not |
| 629 * Lists metric descriptors that match a filter. This method does not require | 619 /// require a Stackdriver account. |
| 630 * a Stackdriver account. | 620 /// |
| 631 * | 621 /// Request parameters: |
| 632 * Request parameters: | 622 /// |
| 633 * | 623 /// [name] - The project on which to execute the request. The format is |
| 634 * [name] - The project on which to execute the request. The format is | 624 /// "projects/{project_id_or_number}". |
| 635 * "projects/{project_id_or_number}". | 625 /// Value must have pattern "^projects/[^/]+$". |
| 636 * Value must have pattern "^projects/[^/]+$". | 626 /// |
| 637 * | 627 /// [pageToken] - If this field is not empty then it must contain the |
| 638 * [pageToken] - If this field is not empty then it must contain the | 628 /// nextPageToken value returned by a previous call to this method. Using |
| 639 * nextPageToken value returned by a previous call to this method. Using this | 629 /// this field causes the method to return additional results from the |
| 640 * field causes the method to return additional results from the previous | 630 /// previous method call. |
| 641 * method call. | 631 /// |
| 642 * | 632 /// [pageSize] - A positive number that is the maximum number of results to |
| 643 * [pageSize] - A positive number that is the maximum number of results to | 633 /// return. |
| 644 * return. | 634 /// |
| 645 * | 635 /// [filter] - If this field is empty, all custom and system-defined metric |
| 646 * [filter] - If this field is empty, all custom and system-defined metric | 636 /// descriptors are returned. Otherwise, the filter specifies which metric |
| 647 * descriptors are returned. Otherwise, the filter specifies which metric | 637 /// descriptors are to be returned. For example, the following filter matches |
| 648 * descriptors are to be returned. For example, the following filter matches | 638 /// all custom metrics: |
| 649 * all custom metrics: | 639 /// metric.type = starts_with("custom.googleapis.com/") |
| 650 * metric.type = starts_with("custom.googleapis.com/") | 640 /// |
| 651 * | 641 /// Completes with a [ListMetricDescriptorsResponse]. |
| 652 * Completes with a [ListMetricDescriptorsResponse]. | 642 /// |
| 653 * | 643 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 654 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 644 /// an error. |
| 655 * error. | 645 /// |
| 656 * | 646 /// If the used [http.Client] completes with an error when making a REST |
| 657 * If the used [http.Client] completes with an error when making a REST call, | 647 /// call, this method will complete with the same error. |
| 658 * this method will complete with the same error. | 648 async.Future<ListMetricDescriptorsResponse> list(core.String name, |
| 659 */ | 649 {core.String pageToken, core.int pageSize, core.String filter}) { |
| 660 async.Future<ListMetricDescriptorsResponse> list(core.String name, {core.Strin
g pageToken, core.int pageSize, core.String filter}) { | |
| 661 var _url = null; | 650 var _url = null; |
| 662 var _queryParams = new core.Map(); | 651 var _queryParams = new core.Map(); |
| 663 var _uploadMedia = null; | 652 var _uploadMedia = null; |
| 664 var _uploadOptions = null; | 653 var _uploadOptions = null; |
| 665 var _downloadOptions = commons.DownloadOptions.Metadata; | 654 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 666 var _body = null; | 655 var _body = null; |
| 667 | 656 |
| 668 if (name == null) { | 657 if (name == null) { |
| 669 throw new core.ArgumentError("Parameter name is required."); | 658 throw new core.ArgumentError("Parameter name is required."); |
| 670 } | 659 } |
| 671 if (pageToken != null) { | 660 if (pageToken != null) { |
| 672 _queryParams["pageToken"] = [pageToken]; | 661 _queryParams["pageToken"] = [pageToken]; |
| 673 } | 662 } |
| 674 if (pageSize != null) { | 663 if (pageSize != null) { |
| 675 _queryParams["pageSize"] = ["${pageSize}"]; | 664 _queryParams["pageSize"] = ["${pageSize}"]; |
| 676 } | 665 } |
| 677 if (filter != null) { | 666 if (filter != null) { |
| 678 _queryParams["filter"] = [filter]; | 667 _queryParams["filter"] = [filter]; |
| 679 } | 668 } |
| 680 | 669 |
| 681 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/metricDesc
riptors'; | 670 _url = 'v3/' + |
| 671 commons.Escaper.ecapeVariableReserved('$name') + |
| 672 '/metricDescriptors'; |
| 682 | 673 |
| 683 var _response = _requester.request(_url, | 674 var _response = _requester.request(_url, "GET", |
| 684 "GET", | 675 body: _body, |
| 685 body: _body, | 676 queryParams: _queryParams, |
| 686 queryParams: _queryParams, | 677 uploadOptions: _uploadOptions, |
| 687 uploadOptions: _uploadOptions, | 678 uploadMedia: _uploadMedia, |
| 688 uploadMedia: _uploadMedia, | 679 downloadOptions: _downloadOptions); |
| 689 downloadOptions: _downloadOptions); | 680 return _response |
| 690 return _response.then((data) => new ListMetricDescriptorsResponse.fromJson(d
ata)); | 681 .then((data) => new ListMetricDescriptorsResponse.fromJson(data)); |
| 691 } | 682 } |
| 692 | |
| 693 } | 683 } |
| 694 | 684 |
| 695 | |
| 696 class ProjectsMonitoredResourceDescriptorsResourceApi { | 685 class ProjectsMonitoredResourceDescriptorsResourceApi { |
| 697 final commons.ApiRequester _requester; | 686 final commons.ApiRequester _requester; |
| 698 | 687 |
| 699 ProjectsMonitoredResourceDescriptorsResourceApi(commons.ApiRequester client) :
| 688 ProjectsMonitoredResourceDescriptorsResourceApi(commons.ApiRequester client) |
| 700 _requester = client; | 689 : _requester = client; |
| 701 | 690 |
| 702 /** | 691 /// Gets a single monitored resource descriptor. This method does not require |
| 703 * Gets a single monitored resource descriptor. This method does not require a | 692 /// a Stackdriver account. |
| 704 * Stackdriver account. | 693 /// |
| 705 * | 694 /// Request parameters: |
| 706 * Request parameters: | 695 /// |
| 707 * | 696 /// [name] - The monitored resource descriptor to get. The format is |
| 708 * [name] - The monitored resource descriptor to get. The format is | 697 /// "projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_ty
pe}". |
| 709 * "projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_typ
e}". | 698 /// The {resource_type} is a predefined type, such as cloudsql_database. |
| 710 * The {resource_type} is a predefined type, such as cloudsql_database. | 699 /// Value must have pattern |
| 711 * Value must have pattern | 700 /// "^projects/[^/]+/monitoredResourceDescriptors/[^/]+$". |
| 712 * "^projects/[^/]+/monitoredResourceDescriptors/[^/]+$". | 701 /// |
| 713 * | 702 /// Completes with a [MonitoredResourceDescriptor]. |
| 714 * Completes with a [MonitoredResourceDescriptor]. | 703 /// |
| 715 * | 704 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 716 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 705 /// an error. |
| 717 * error. | 706 /// |
| 718 * | 707 /// If the used [http.Client] completes with an error when making a REST |
| 719 * If the used [http.Client] completes with an error when making a REST call, | 708 /// call, this method will complete with the same error. |
| 720 * this method will complete with the same error. | |
| 721 */ | |
| 722 async.Future<MonitoredResourceDescriptor> get(core.String name) { | 709 async.Future<MonitoredResourceDescriptor> get(core.String name) { |
| 723 var _url = null; | 710 var _url = null; |
| 724 var _queryParams = new core.Map(); | 711 var _queryParams = new core.Map(); |
| 725 var _uploadMedia = null; | 712 var _uploadMedia = null; |
| 726 var _uploadOptions = null; | 713 var _uploadOptions = null; |
| 727 var _downloadOptions = commons.DownloadOptions.Metadata; | 714 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 728 var _body = null; | 715 var _body = null; |
| 729 | 716 |
| 730 if (name == null) { | 717 if (name == null) { |
| 731 throw new core.ArgumentError("Parameter name is required."); | 718 throw new core.ArgumentError("Parameter name is required."); |
| 732 } | 719 } |
| 733 | 720 |
| 734 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); | 721 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 735 | 722 |
| 736 var _response = _requester.request(_url, | 723 var _response = _requester.request(_url, "GET", |
| 737 "GET", | 724 body: _body, |
| 738 body: _body, | 725 queryParams: _queryParams, |
| 739 queryParams: _queryParams, | 726 uploadOptions: _uploadOptions, |
| 740 uploadOptions: _uploadOptions, | 727 uploadMedia: _uploadMedia, |
| 741 uploadMedia: _uploadMedia, | 728 downloadOptions: _downloadOptions); |
| 742 downloadOptions: _downloadOptions); | 729 return _response |
| 743 return _response.then((data) => new MonitoredResourceDescriptor.fromJson(dat
a)); | 730 .then((data) => new MonitoredResourceDescriptor.fromJson(data)); |
| 744 } | 731 } |
| 745 | 732 |
| 746 /** | 733 /// Lists monitored resource descriptors that match a filter. This method |
| 747 * Lists monitored resource descriptors that match a filter. This method does | 734 /// does not require a Stackdriver account. |
| 748 * not require a Stackdriver account. | 735 /// |
| 749 * | 736 /// Request parameters: |
| 750 * Request parameters: | 737 /// |
| 751 * | 738 /// [name] - The project on which to execute the request. The format is |
| 752 * [name] - The project on which to execute the request. The format is | 739 /// "projects/{project_id_or_number}". |
| 753 * "projects/{project_id_or_number}". | 740 /// Value must have pattern "^projects/[^/]+$". |
| 754 * Value must have pattern "^projects/[^/]+$". | 741 /// |
| 755 * | 742 /// [pageToken] - If this field is not empty then it must contain the |
| 756 * [filter] - An optional filter describing the descriptors to be returned. | 743 /// nextPageToken value returned by a previous call to this method. Using |
| 757 * The filter can reference the descriptor's type and labels. For example, the | 744 /// this field causes the method to return additional results from the |
| 758 * following filter returns only Google Compute Engine descriptors that have | 745 /// previous method call. |
| 759 * an id label: | 746 /// |
| 760 * resource.type = starts_with("gce_") AND resource.label:id | 747 /// [pageSize] - A positive number that is the maximum number of results to |
| 761 * | 748 /// return. |
| 762 * [pageToken] - If this field is not empty then it must contain the | 749 /// |
| 763 * nextPageToken value returned by a previous call to this method. Using this | 750 /// [filter] - An optional filter describing the descriptors to be returned. |
| 764 * field causes the method to return additional results from the previous | 751 /// The filter can reference the descriptor's type and labels. For example, |
| 765 * method call. | 752 /// the following filter returns only Google Compute Engine descriptors that |
| 766 * | 753 /// have an id label: |
| 767 * [pageSize] - A positive number that is the maximum number of results to | 754 /// resource.type = starts_with("gce_") AND resource.label:id |
| 768 * return. | 755 /// |
| 769 * | 756 /// Completes with a [ListMonitoredResourceDescriptorsResponse]. |
| 770 * Completes with a [ListMonitoredResourceDescriptorsResponse]. | 757 /// |
| 771 * | 758 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 772 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 759 /// an error. |
| 773 * error. | 760 /// |
| 774 * | 761 /// If the used [http.Client] completes with an error when making a REST |
| 775 * If the used [http.Client] completes with an error when making a REST call, | 762 /// call, this method will complete with the same error. |
| 776 * this method will complete with the same error. | 763 async.Future<ListMonitoredResourceDescriptorsResponse> list(core.String name, |
| 777 */ | 764 {core.String pageToken, core.int pageSize, core.String filter}) { |
| 778 async.Future<ListMonitoredResourceDescriptorsResponse> list(core.String name,
{core.String filter, core.String pageToken, core.int pageSize}) { | |
| 779 var _url = null; | 765 var _url = null; |
| 780 var _queryParams = new core.Map(); | 766 var _queryParams = new core.Map(); |
| 781 var _uploadMedia = null; | 767 var _uploadMedia = null; |
| 782 var _uploadOptions = null; | 768 var _uploadOptions = null; |
| 783 var _downloadOptions = commons.DownloadOptions.Metadata; | 769 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 784 var _body = null; | 770 var _body = null; |
| 785 | 771 |
| 786 if (name == null) { | 772 if (name == null) { |
| 787 throw new core.ArgumentError("Parameter name is required."); | 773 throw new core.ArgumentError("Parameter name is required."); |
| 788 } | 774 } |
| 789 if (filter != null) { | |
| 790 _queryParams["filter"] = [filter]; | |
| 791 } | |
| 792 if (pageToken != null) { | 775 if (pageToken != null) { |
| 793 _queryParams["pageToken"] = [pageToken]; | 776 _queryParams["pageToken"] = [pageToken]; |
| 794 } | 777 } |
| 795 if (pageSize != null) { | 778 if (pageSize != null) { |
| 796 _queryParams["pageSize"] = ["${pageSize}"]; | 779 _queryParams["pageSize"] = ["${pageSize}"]; |
| 797 } | 780 } |
| 781 if (filter != null) { |
| 782 _queryParams["filter"] = [filter]; |
| 783 } |
| 798 | 784 |
| 799 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/monitoredR
esourceDescriptors'; | 785 _url = 'v3/' + |
| 786 commons.Escaper.ecapeVariableReserved('$name') + |
| 787 '/monitoredResourceDescriptors'; |
| 800 | 788 |
| 801 var _response = _requester.request(_url, | 789 var _response = _requester.request(_url, "GET", |
| 802 "GET", | 790 body: _body, |
| 803 body: _body, | 791 queryParams: _queryParams, |
| 804 queryParams: _queryParams, | 792 uploadOptions: _uploadOptions, |
| 805 uploadOptions: _uploadOptions, | 793 uploadMedia: _uploadMedia, |
| 806 uploadMedia: _uploadMedia, | 794 downloadOptions: _downloadOptions); |
| 807 downloadOptions: _downloadOptions); | 795 return _response.then( |
| 808 return _response.then((data) => new ListMonitoredResourceDescriptorsResponse
.fromJson(data)); | 796 (data) => new ListMonitoredResourceDescriptorsResponse.fromJson(data)); |
| 809 } | 797 } |
| 810 | |
| 811 } | 798 } |
| 812 | 799 |
| 813 | |
| 814 class ProjectsTimeSeriesResourceApi { | 800 class ProjectsTimeSeriesResourceApi { |
| 815 final commons.ApiRequester _requester; | 801 final commons.ApiRequester _requester; |
| 816 | 802 |
| 817 ProjectsTimeSeriesResourceApi(commons.ApiRequester client) : | 803 ProjectsTimeSeriesResourceApi(commons.ApiRequester client) |
| 818 _requester = client; | 804 : _requester = client; |
| 819 | 805 |
| 820 /** | 806 /// Creates or adds data to one or more time series. The response is empty if |
| 821 * Creates or adds data to one or more time series. The response is empty if | 807 /// all time series in the request were written. If any time series could not |
| 822 * all time series in the request were written. If any time series could not | 808 /// be written, a corresponding failure message is included in the error |
| 823 * be written, a corresponding failure message is included in the error | 809 /// response. |
| 824 * response. | 810 /// |
| 825 * | 811 /// [request] - The metadata request object. |
| 826 * [request] - The metadata request object. | 812 /// |
| 827 * | 813 /// Request parameters: |
| 828 * Request parameters: | 814 /// |
| 829 * | 815 /// [name] - The project on which to execute the request. The format is |
| 830 * [name] - The project on which to execute the request. The format is | 816 /// "projects/{project_id_or_number}". |
| 831 * "projects/{project_id_or_number}". | 817 /// Value must have pattern "^projects/[^/]+$". |
| 832 * Value must have pattern "^projects/[^/]+$". | 818 /// |
| 833 * | 819 /// Completes with a [Empty]. |
| 834 * Completes with a [Empty]. | 820 /// |
| 835 * | 821 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 836 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 822 /// an error. |
| 837 * error. | 823 /// |
| 838 * | 824 /// If the used [http.Client] completes with an error when making a REST |
| 839 * If the used [http.Client] completes with an error when making a REST call, | 825 /// call, this method will complete with the same error. |
| 840 * this method will complete with the same error. | 826 async.Future<Empty> create( |
| 841 */ | 827 CreateTimeSeriesRequest request, core.String name) { |
| 842 async.Future<Empty> create(CreateTimeSeriesRequest request, core.String name)
{ | |
| 843 var _url = null; | 828 var _url = null; |
| 844 var _queryParams = new core.Map(); | 829 var _queryParams = new core.Map(); |
| 845 var _uploadMedia = null; | 830 var _uploadMedia = null; |
| 846 var _uploadOptions = null; | 831 var _uploadOptions = null; |
| 847 var _downloadOptions = commons.DownloadOptions.Metadata; | 832 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 848 var _body = null; | 833 var _body = null; |
| 849 | 834 |
| 850 if (request != null) { | 835 if (request != null) { |
| 851 _body = convert.JSON.encode((request).toJson()); | 836 _body = convert.JSON.encode((request).toJson()); |
| 852 } | 837 } |
| 853 if (name == null) { | 838 if (name == null) { |
| 854 throw new core.ArgumentError("Parameter name is required."); | 839 throw new core.ArgumentError("Parameter name is required."); |
| 855 } | 840 } |
| 856 | 841 |
| 857 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/timeSeries
'; | 842 _url = |
| 843 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/timeSeries'; |
| 858 | 844 |
| 859 var _response = _requester.request(_url, | 845 var _response = _requester.request(_url, "POST", |
| 860 "POST", | 846 body: _body, |
| 861 body: _body, | 847 queryParams: _queryParams, |
| 862 queryParams: _queryParams, | 848 uploadOptions: _uploadOptions, |
| 863 uploadOptions: _uploadOptions, | 849 uploadMedia: _uploadMedia, |
| 864 uploadMedia: _uploadMedia, | 850 downloadOptions: _downloadOptions); |
| 865 downloadOptions: _downloadOptions); | |
| 866 return _response.then((data) => new Empty.fromJson(data)); | 851 return _response.then((data) => new Empty.fromJson(data)); |
| 867 } | 852 } |
| 868 | 853 |
| 869 /** | 854 /// Lists time series that match a filter. This method does not require a |
| 870 * Lists time series that match a filter. This method does not require a | 855 /// Stackdriver account. |
| 871 * Stackdriver account. | 856 /// |
| 872 * | 857 /// Request parameters: |
| 873 * Request parameters: | 858 /// |
| 874 * | 859 /// [name] - The project on which to execute the request. The format is |
| 875 * [name] - The project on which to execute the request. The format is | 860 /// "projects/{project_id_or_number}". |
| 876 * "projects/{project_id_or_number}". | 861 /// Value must have pattern "^projects/[^/]+$". |
| 877 * Value must have pattern "^projects/[^/]+$". | 862 /// |
| 878 * | 863 /// [aggregation_crossSeriesReducer] - The approach to be used to combine |
| 879 * [pageToken] - If this field is not empty then it must contain the | 864 /// time series. Not all reducer functions may be applied to all time series, |
| 880 * nextPageToken value returned by a previous call to this method. Using this | 865 /// depending on the metric type and the value type of the original time |
| 881 * field causes the method to return additional results from the previous | 866 /// series. Reduction may change the metric type of value type of the time |
| 882 * method call. | 867 /// series.Time series data must be aligned in order to perform cross-time |
| 883 * | 868 /// series reduction. If crossSeriesReducer is specified, then |
| 884 * [aggregation_perSeriesAligner] - The approach to be used to align | 869 /// perSeriesAligner must be specified and not equal ALIGN_NONE and |
| 885 * individual time series. Not all alignment functions may be applied to all | 870 /// alignmentPeriod must be specified; otherwise, an error is returned. |
| 886 * time series, depending on the metric type and value type of the original | 871 /// Possible string values are: |
| 887 * time series. Alignment may change the metric type or the value type of the | 872 /// - "REDUCE_NONE" : A REDUCE_NONE. |
| 888 * time series.Time series data must be aligned in order to perform cross-time | 873 /// - "REDUCE_MEAN" : A REDUCE_MEAN. |
| 889 * series reduction. If crossSeriesReducer is specified, then perSeriesAligner | 874 /// - "REDUCE_MIN" : A REDUCE_MIN. |
| 890 * must be specified and not equal ALIGN_NONE and alignmentPeriod must be | 875 /// - "REDUCE_MAX" : A REDUCE_MAX. |
| 891 * specified; otherwise, an error is returned. | 876 /// - "REDUCE_SUM" : A REDUCE_SUM. |
| 892 * Possible string values are: | 877 /// - "REDUCE_STDDEV" : A REDUCE_STDDEV. |
| 893 * - "ALIGN_NONE" : A ALIGN_NONE. | 878 /// - "REDUCE_COUNT" : A REDUCE_COUNT. |
| 894 * - "ALIGN_DELTA" : A ALIGN_DELTA. | 879 /// - "REDUCE_COUNT_TRUE" : A REDUCE_COUNT_TRUE. |
| 895 * - "ALIGN_RATE" : A ALIGN_RATE. | 880 /// - "REDUCE_FRACTION_TRUE" : A REDUCE_FRACTION_TRUE. |
| 896 * - "ALIGN_INTERPOLATE" : A ALIGN_INTERPOLATE. | 881 /// - "REDUCE_PERCENTILE_99" : A REDUCE_PERCENTILE_99. |
| 897 * - "ALIGN_NEXT_OLDER" : A ALIGN_NEXT_OLDER. | 882 /// - "REDUCE_PERCENTILE_95" : A REDUCE_PERCENTILE_95. |
| 898 * - "ALIGN_MIN" : A ALIGN_MIN. | 883 /// - "REDUCE_PERCENTILE_50" : A REDUCE_PERCENTILE_50. |
| 899 * - "ALIGN_MAX" : A ALIGN_MAX. | 884 /// - "REDUCE_PERCENTILE_05" : A REDUCE_PERCENTILE_05. |
| 900 * - "ALIGN_MEAN" : A ALIGN_MEAN. | 885 /// |
| 901 * - "ALIGN_COUNT" : A ALIGN_COUNT. | 886 /// [filter] - A monitoring filter that specifies which time series should be |
| 902 * - "ALIGN_SUM" : A ALIGN_SUM. | 887 /// returned. The filter must specify a single metric type, and can |
| 903 * - "ALIGN_STDDEV" : A ALIGN_STDDEV. | 888 /// additionally specify metric labels and other information. For example: |
| 904 * - "ALIGN_COUNT_TRUE" : A ALIGN_COUNT_TRUE. | 889 /// metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND |
| 905 * - "ALIGN_FRACTION_TRUE" : A ALIGN_FRACTION_TRUE. | 890 /// metric.label.instance_name = "my-instance-name" |
| 906 * - "ALIGN_PERCENTILE_99" : A ALIGN_PERCENTILE_99. | 891 /// |
| 907 * - "ALIGN_PERCENTILE_95" : A ALIGN_PERCENTILE_95. | 892 /// [aggregation_perSeriesAligner] - The approach to be used to align |
| 908 * - "ALIGN_PERCENTILE_50" : A ALIGN_PERCENTILE_50. | 893 /// individual time series. Not all alignment functions may be applied to all |
| 909 * - "ALIGN_PERCENTILE_05" : A ALIGN_PERCENTILE_05. | 894 /// time series, depending on the metric type and value type of the original |
| 910 * | 895 /// time series. Alignment may change the metric type or the value type of |
| 911 * [interval_startTime] - Optional. The beginning of the time interval. The | 896 /// the time series.Time series data must be aligned in order to perform |
| 912 * default value for the start time is the end time. The start time must not | 897 /// cross-time series reduction. If crossSeriesReducer is specified, then |
| 913 * be later than the end time. | 898 /// perSeriesAligner must be specified and not equal ALIGN_NONE and |
| 914 * | 899 /// alignmentPeriod must be specified; otherwise, an error is returned. |
| 915 * [view] - Specifies which information is returned about the time series. | 900 /// Possible string values are: |
| 916 * Possible string values are: | 901 /// - "ALIGN_NONE" : A ALIGN_NONE. |
| 917 * - "FULL" : A FULL. | 902 /// - "ALIGN_DELTA" : A ALIGN_DELTA. |
| 918 * - "HEADERS" : A HEADERS. | 903 /// - "ALIGN_RATE" : A ALIGN_RATE. |
| 919 * | 904 /// - "ALIGN_INTERPOLATE" : A ALIGN_INTERPOLATE. |
| 920 * [aggregation_groupByFields] - The set of fields to preserve when | 905 /// - "ALIGN_NEXT_OLDER" : A ALIGN_NEXT_OLDER. |
| 921 * crossSeriesReducer is specified. The groupByFields determine how the time | 906 /// - "ALIGN_MIN" : A ALIGN_MIN. |
| 922 * series are partitioned into subsets prior to applying the aggregation | 907 /// - "ALIGN_MAX" : A ALIGN_MAX. |
| 923 * function. Each subset contains time series that have the same value for | 908 /// - "ALIGN_MEAN" : A ALIGN_MEAN. |
| 924 * each of the grouping fields. Each individual time series is a member of | 909 /// - "ALIGN_COUNT" : A ALIGN_COUNT. |
| 925 * exactly one subset. The crossSeriesReducer is applied to each subset of | 910 /// - "ALIGN_SUM" : A ALIGN_SUM. |
| 926 * time series. It is not possible to reduce across different resource types, | 911 /// - "ALIGN_STDDEV" : A ALIGN_STDDEV. |
| 927 * so this field implicitly contains resource.type. Fields not specified in | 912 /// - "ALIGN_COUNT_TRUE" : A ALIGN_COUNT_TRUE. |
| 928 * groupByFields are aggregated away. If groupByFields is not specified and | 913 /// - "ALIGN_FRACTION_TRUE" : A ALIGN_FRACTION_TRUE. |
| 929 * all the time series have the same resource type, then the time series are | 914 /// - "ALIGN_PERCENTILE_99" : A ALIGN_PERCENTILE_99. |
| 930 * aggregated into a single output time series. If crossSeriesReducer is not | 915 /// - "ALIGN_PERCENTILE_95" : A ALIGN_PERCENTILE_95. |
| 931 * defined, this field is ignored. | 916 /// - "ALIGN_PERCENTILE_50" : A ALIGN_PERCENTILE_50. |
| 932 * | 917 /// - "ALIGN_PERCENTILE_05" : A ALIGN_PERCENTILE_05. |
| 933 * [interval_endTime] - Required. The end of the time interval. | 918 /// |
| 934 * | 919 /// [pageToken] - If this field is not empty then it must contain the |
| 935 * [aggregation_alignmentPeriod] - The alignment period for per-time series | 920 /// nextPageToken value returned by a previous call to this method. Using |
| 936 * alignment. If present, alignmentPeriod must be at least 60 seconds. After | 921 /// this field causes the method to return additional results from the |
| 937 * per-time series alignment, each time series will contain data points only | 922 /// previous method call. |
| 938 * on the period boundaries. If perSeriesAligner is not specified or equals | 923 /// |
| 939 * ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified | 924 /// [interval_startTime] - Optional. The beginning of the time interval. The |
| 940 * and does not equal ALIGN_NONE, then this field must be defined; otherwise | 925 /// default value for the start time is the end time. The start time must not |
| 941 * an error is returned. | 926 /// be later than the end time. |
| 942 * | 927 /// |
| 943 * [pageSize] - A positive number that is the maximum number of results to | 928 /// [view] - Specifies which information is returned about the time series. |
| 944 * return. When view field sets to FULL, it limits the number of Points server | 929 /// Possible string values are: |
| 945 * will return; if view field is HEADERS, it limits the number of TimeSeries | 930 /// - "FULL" : A FULL. |
| 946 * server will return. | 931 /// - "HEADERS" : A HEADERS. |
| 947 * | 932 /// |
| 948 * [orderBy] - Specifies the order in which the points of the time series | 933 /// [aggregation_groupByFields] - The set of fields to preserve when |
| 949 * should be returned. By default, results are not ordered. Currently, this | 934 /// crossSeriesReducer is specified. The groupByFields determine how the time |
| 950 * field must be left blank. | 935 /// series are partitioned into subsets prior to applying the aggregation |
| 951 * | 936 /// function. Each subset contains time series that have the same value for |
| 952 * [aggregation_crossSeriesReducer] - The approach to be used to combine time | 937 /// each of the grouping fields. Each individual time series is a member of |
| 953 * series. Not all reducer functions may be applied to all time series, | 938 /// exactly one subset. The crossSeriesReducer is applied to each subset of |
| 954 * depending on the metric type and the value type of the original time | 939 /// time series. It is not possible to reduce across different resource |
| 955 * series. Reduction may change the metric type of value type of the time | 940 /// types, so this field implicitly contains resource.type. Fields not |
| 956 * series.Time series data must be aligned in order to perform cross-time | 941 /// specified in groupByFields are aggregated away. If groupByFields is not |
| 957 * series reduction. If crossSeriesReducer is specified, then perSeriesAligner | 942 /// specified and all the time series have the same resource type, then the |
| 958 * must be specified and not equal ALIGN_NONE and alignmentPeriod must be | 943 /// time series are aggregated into a single output time series. If |
| 959 * specified; otherwise, an error is returned. | 944 /// crossSeriesReducer is not defined, this field is ignored. |
| 960 * Possible string values are: | 945 /// |
| 961 * - "REDUCE_NONE" : A REDUCE_NONE. | 946 /// [interval_endTime] - Required. The end of the time interval. |
| 962 * - "REDUCE_MEAN" : A REDUCE_MEAN. | 947 /// |
| 963 * - "REDUCE_MIN" : A REDUCE_MIN. | 948 /// [aggregation_alignmentPeriod] - The alignment period for per-time series |
| 964 * - "REDUCE_MAX" : A REDUCE_MAX. | 949 /// alignment. If present, alignmentPeriod must be at least 60 seconds. After |
| 965 * - "REDUCE_SUM" : A REDUCE_SUM. | 950 /// per-time series alignment, each time series will contain data points only |
| 966 * - "REDUCE_STDDEV" : A REDUCE_STDDEV. | 951 /// on the period boundaries. If perSeriesAligner is not specified or equals |
| 967 * - "REDUCE_COUNT" : A REDUCE_COUNT. | 952 /// ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified |
| 968 * - "REDUCE_COUNT_TRUE" : A REDUCE_COUNT_TRUE. | 953 /// and does not equal ALIGN_NONE, then this field must be defined; otherwise |
| 969 * - "REDUCE_FRACTION_TRUE" : A REDUCE_FRACTION_TRUE. | 954 /// an error is returned. |
| 970 * - "REDUCE_PERCENTILE_99" : A REDUCE_PERCENTILE_99. | 955 /// |
| 971 * - "REDUCE_PERCENTILE_95" : A REDUCE_PERCENTILE_95. | 956 /// [pageSize] - A positive number that is the maximum number of results to |
| 972 * - "REDUCE_PERCENTILE_50" : A REDUCE_PERCENTILE_50. | 957 /// return. When view field sets to FULL, it limits the number of Points |
| 973 * - "REDUCE_PERCENTILE_05" : A REDUCE_PERCENTILE_05. | 958 /// server will return; if view field is HEADERS, it limits the number of |
| 974 * | 959 /// TimeSeries server will return. |
| 975 * [filter] - A monitoring filter that specifies which time series should be | 960 /// |
| 976 * returned. The filter must specify a single metric type, and can | 961 /// [orderBy] - Specifies the order in which the points of the time series |
| 977 * additionally specify metric labels and other information. For example: | 962 /// should be returned. By default, results are not ordered. Currently, this |
| 978 * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND | 963 /// field must be left blank. |
| 979 * metric.label.instance_name = "my-instance-name" | 964 /// |
| 980 * | 965 /// Completes with a [ListTimeSeriesResponse]. |
| 981 * Completes with a [ListTimeSeriesResponse]. | 966 /// |
| 982 * | 967 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 983 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 968 /// an error. |
| 984 * error. | 969 /// |
| 985 * | 970 /// If the used [http.Client] completes with an error when making a REST |
| 986 * If the used [http.Client] completes with an error when making a REST call, | 971 /// call, this method will complete with the same error. |
| 987 * this method will complete with the same error. | 972 async.Future<ListTimeSeriesResponse> list(core.String name, |
| 988 */ | 973 {core.String aggregation_crossSeriesReducer, |
| 989 async.Future<ListTimeSeriesResponse> list(core.String name, {core.String pageT
oken, core.String aggregation_perSeriesAligner, core.String interval_startTime,
core.String view, core.List<core.String> aggregation_groupByFields, core.String
interval_endTime, core.String aggregation_alignmentPeriod, core.int pageSize, co
re.String orderBy, core.String aggregation_crossSeriesReducer, core.String filte
r}) { | 974 core.String filter, |
| 975 core.String aggregation_perSeriesAligner, |
| 976 core.String pageToken, |
| 977 core.String interval_startTime, |
| 978 core.String view, |
| 979 core.List<core.String> aggregation_groupByFields, |
| 980 core.String interval_endTime, |
| 981 core.String aggregation_alignmentPeriod, |
| 982 core.int pageSize, |
| 983 core.String orderBy}) { |
| 990 var _url = null; | 984 var _url = null; |
| 991 var _queryParams = new core.Map(); | 985 var _queryParams = new core.Map(); |
| 992 var _uploadMedia = null; | 986 var _uploadMedia = null; |
| 993 var _uploadOptions = null; | 987 var _uploadOptions = null; |
| 994 var _downloadOptions = commons.DownloadOptions.Metadata; | 988 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 995 var _body = null; | 989 var _body = null; |
| 996 | 990 |
| 997 if (name == null) { | 991 if (name == null) { |
| 998 throw new core.ArgumentError("Parameter name is required."); | 992 throw new core.ArgumentError("Parameter name is required."); |
| 999 } | 993 } |
| 994 if (aggregation_crossSeriesReducer != null) { |
| 995 _queryParams["aggregation.crossSeriesReducer"] = [ |
| 996 aggregation_crossSeriesReducer |
| 997 ]; |
| 998 } |
| 999 if (filter != null) { |
| 1000 _queryParams["filter"] = [filter]; |
| 1001 } |
| 1002 if (aggregation_perSeriesAligner != null) { |
| 1003 _queryParams["aggregation.perSeriesAligner"] = [ |
| 1004 aggregation_perSeriesAligner |
| 1005 ]; |
| 1006 } |
| 1000 if (pageToken != null) { | 1007 if (pageToken != null) { |
| 1001 _queryParams["pageToken"] = [pageToken]; | 1008 _queryParams["pageToken"] = [pageToken]; |
| 1002 } | 1009 } |
| 1003 if (aggregation_perSeriesAligner != null) { | |
| 1004 _queryParams["aggregation.perSeriesAligner"] = [aggregation_perSeriesAlign
er]; | |
| 1005 } | |
| 1006 if (interval_startTime != null) { | 1010 if (interval_startTime != null) { |
| 1007 _queryParams["interval.startTime"] = [interval_startTime]; | 1011 _queryParams["interval.startTime"] = [interval_startTime]; |
| 1008 } | 1012 } |
| 1009 if (view != null) { | 1013 if (view != null) { |
| 1010 _queryParams["view"] = [view]; | 1014 _queryParams["view"] = [view]; |
| 1011 } | 1015 } |
| 1012 if (aggregation_groupByFields != null) { | 1016 if (aggregation_groupByFields != null) { |
| 1013 _queryParams["aggregation.groupByFields"] = aggregation_groupByFields; | 1017 _queryParams["aggregation.groupByFields"] = aggregation_groupByFields; |
| 1014 } | 1018 } |
| 1015 if (interval_endTime != null) { | 1019 if (interval_endTime != null) { |
| 1016 _queryParams["interval.endTime"] = [interval_endTime]; | 1020 _queryParams["interval.endTime"] = [interval_endTime]; |
| 1017 } | 1021 } |
| 1018 if (aggregation_alignmentPeriod != null) { | 1022 if (aggregation_alignmentPeriod != null) { |
| 1019 _queryParams["aggregation.alignmentPeriod"] = [aggregation_alignmentPeriod
]; | 1023 _queryParams["aggregation.alignmentPeriod"] = [ |
| 1024 aggregation_alignmentPeriod |
| 1025 ]; |
| 1020 } | 1026 } |
| 1021 if (pageSize != null) { | 1027 if (pageSize != null) { |
| 1022 _queryParams["pageSize"] = ["${pageSize}"]; | 1028 _queryParams["pageSize"] = ["${pageSize}"]; |
| 1023 } | 1029 } |
| 1024 if (orderBy != null) { | 1030 if (orderBy != null) { |
| 1025 _queryParams["orderBy"] = [orderBy]; | 1031 _queryParams["orderBy"] = [orderBy]; |
| 1026 } | 1032 } |
| 1027 if (aggregation_crossSeriesReducer != null) { | |
| 1028 _queryParams["aggregation.crossSeriesReducer"] = [aggregation_crossSeriesR
educer]; | |
| 1029 } | |
| 1030 if (filter != null) { | |
| 1031 _queryParams["filter"] = [filter]; | |
| 1032 } | |
| 1033 | 1033 |
| 1034 _url = 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/timeSeries
'; | 1034 _url = |
| 1035 'v3/' + commons.Escaper.ecapeVariableReserved('$name') + '/timeSeries'; |
| 1035 | 1036 |
| 1036 var _response = _requester.request(_url, | 1037 var _response = _requester.request(_url, "GET", |
| 1037 "GET", | 1038 body: _body, |
| 1038 body: _body, | 1039 queryParams: _queryParams, |
| 1039 queryParams: _queryParams, | 1040 uploadOptions: _uploadOptions, |
| 1040 uploadOptions: _uploadOptions, | 1041 uploadMedia: _uploadMedia, |
| 1041 uploadMedia: _uploadMedia, | 1042 downloadOptions: _downloadOptions); |
| 1042 downloadOptions: _downloadOptions); | |
| 1043 return _response.then((data) => new ListTimeSeriesResponse.fromJson(data)); | 1043 return _response.then((data) => new ListTimeSeriesResponse.fromJson(data)); |
| 1044 } | 1044 } |
| 1045 | |
| 1046 } | 1045 } |
| 1047 | 1046 |
| 1047 /// BucketOptions describes the bucket boundaries used to create a histogram |
| 1048 /// for the distribution. The buckets can be in a linear sequence, an |
| 1049 /// exponential sequence, or each bucket can be specified explicitly. |
| 1050 /// BucketOptions does not include the number of values in each bucket.A bucket |
| 1051 /// has an inclusive lower bound and exclusive upper bound for the values that |
| 1052 /// are counted for that bucket. The upper bound of a bucket must be strictly |
| 1053 /// greater than the lower bound. The sequence of N buckets for a distribution |
| 1054 /// consists of an underflow bucket (number 0), zero or more finite buckets |
| 1055 /// (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets |
| 1056 /// are contiguous: the lower bound of bucket i (i > 0) is the same as the |
| 1057 /// upper bound of bucket i - 1. The buckets span the whole range of finite |
| 1058 /// values: lower bound of the underflow bucket is -infinity and the upper |
| 1059 /// bound of the overflow bucket is +infinity. The finite buckets are so-called |
| 1060 /// because both bounds are finite. |
| 1061 class BucketOptions { |
| 1062 /// The explicit buckets. |
| 1063 Explicit explicitBuckets; |
| 1048 | 1064 |
| 1065 /// The exponential buckets. |
| 1066 Exponential exponentialBuckets; |
| 1049 | 1067 |
| 1050 /** | 1068 /// The linear bucket. |
| 1051 * BucketOptions describes the bucket boundaries used to create a histogram for | |
| 1052 * the distribution. The buckets can be in a linear sequence, an exponential | |
| 1053 * sequence, or each bucket can be specified explicitly. BucketOptions does not | |
| 1054 * include the number of values in each bucket.A bucket has an inclusive lower | |
| 1055 * bound and exclusive upper bound for the values that are counted for that | |
| 1056 * bucket. The upper bound of a bucket must be strictly greater than the lower | |
| 1057 * bound. The sequence of N buckets for a distribution consists of an underflow | |
| 1058 * bucket (number 0), zero or more finite buckets (number 1 through N - 2) and | |
| 1059 * an overflow bucket (number N - 1). The buckets are contiguous: the lower | |
| 1060 * bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. The | |
| 1061 * buckets span the whole range of finite values: lower bound of the underflow | |
| 1062 * bucket is -infinity and the upper bound of the overflow bucket is +infinity. | |
| 1063 * The finite buckets are so-called because both bounds are finite. | |
| 1064 */ | |
| 1065 class BucketOptions { | |
| 1066 /** The explicit buckets. */ | |
| 1067 Explicit explicitBuckets; | |
| 1068 /** The exponential buckets. */ | |
| 1069 Exponential exponentialBuckets; | |
| 1070 /** The linear bucket. */ | |
| 1071 Linear linearBuckets; | 1069 Linear linearBuckets; |
| 1072 | 1070 |
| 1073 BucketOptions(); | 1071 BucketOptions(); |
| 1074 | 1072 |
| 1075 BucketOptions.fromJson(core.Map _json) { | 1073 BucketOptions.fromJson(core.Map _json) { |
| 1076 if (_json.containsKey("explicitBuckets")) { | 1074 if (_json.containsKey("explicitBuckets")) { |
| 1077 explicitBuckets = new Explicit.fromJson(_json["explicitBuckets"]); | 1075 explicitBuckets = new Explicit.fromJson(_json["explicitBuckets"]); |
| 1078 } | 1076 } |
| 1079 if (_json.containsKey("exponentialBuckets")) { | 1077 if (_json.containsKey("exponentialBuckets")) { |
| 1080 exponentialBuckets = new Exponential.fromJson(_json["exponentialBuckets"])
; | 1078 exponentialBuckets = |
| 1079 new Exponential.fromJson(_json["exponentialBuckets"]); |
| 1081 } | 1080 } |
| 1082 if (_json.containsKey("linearBuckets")) { | 1081 if (_json.containsKey("linearBuckets")) { |
| 1083 linearBuckets = new Linear.fromJson(_json["linearBuckets"]); | 1082 linearBuckets = new Linear.fromJson(_json["linearBuckets"]); |
| 1084 } | 1083 } |
| 1085 } | 1084 } |
| 1086 | 1085 |
| 1087 core.Map<core.String, core.Object> toJson() { | 1086 core.Map<core.String, core.Object> toJson() { |
| 1088 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1087 final core.Map<core.String, core.Object> _json = |
| 1088 new core.Map<core.String, core.Object>(); |
| 1089 if (explicitBuckets != null) { | 1089 if (explicitBuckets != null) { |
| 1090 _json["explicitBuckets"] = (explicitBuckets).toJson(); | 1090 _json["explicitBuckets"] = (explicitBuckets).toJson(); |
| 1091 } | 1091 } |
| 1092 if (exponentialBuckets != null) { | 1092 if (exponentialBuckets != null) { |
| 1093 _json["exponentialBuckets"] = (exponentialBuckets).toJson(); | 1093 _json["exponentialBuckets"] = (exponentialBuckets).toJson(); |
| 1094 } | 1094 } |
| 1095 if (linearBuckets != null) { | 1095 if (linearBuckets != null) { |
| 1096 _json["linearBuckets"] = (linearBuckets).toJson(); | 1096 _json["linearBuckets"] = (linearBuckets).toJson(); |
| 1097 } | 1097 } |
| 1098 return _json; | 1098 return _json; |
| 1099 } | 1099 } |
| 1100 } | 1100 } |
| 1101 | 1101 |
| 1102 /** | 1102 /// A collection of data points sent from a collectd-based plugin. See the |
| 1103 * A collection of data points sent from a collectd-based plugin. See the | 1103 /// collectd documentation for more information. |
| 1104 * collectd documentation for more information. | |
| 1105 */ | |
| 1106 class CollectdPayload { | 1104 class CollectdPayload { |
| 1107 /** The end time of the interval. */ | 1105 /// The end time of the interval. |
| 1108 core.String endTime; | 1106 core.String endTime; |
| 1109 /** The measurement metadata. Example: "process_id" -> 12345 */ | 1107 |
| 1108 /// The measurement metadata. Example: "process_id" -> 12345 |
| 1110 core.Map<core.String, TypedValue> metadata; | 1109 core.Map<core.String, TypedValue> metadata; |
| 1111 /** The name of the plugin. Example: "disk". */ | 1110 |
| 1111 /// The name of the plugin. Example: "disk". |
| 1112 core.String plugin; | 1112 core.String plugin; |
| 1113 /** The instance name of the plugin Example: "hdcl". */ | 1113 |
| 1114 /// The instance name of the plugin Example: "hdcl". |
| 1114 core.String pluginInstance; | 1115 core.String pluginInstance; |
| 1115 /** The start time of the interval. */ | 1116 |
| 1117 /// The start time of the interval. |
| 1116 core.String startTime; | 1118 core.String startTime; |
| 1117 /** The measurement type. Example: "memory". */ | 1119 |
| 1120 /// The measurement type. Example: "memory". |
| 1118 core.String type; | 1121 core.String type; |
| 1119 /** The measurement type instance. Example: "used". */ | 1122 |
| 1123 /// The measurement type instance. Example: "used". |
| 1120 core.String typeInstance; | 1124 core.String typeInstance; |
| 1121 /** | 1125 |
| 1122 * The measured values during this time interval. Each value must have a | 1126 /// The measured values during this time interval. Each value must have a |
| 1123 * different dataSourceName. | 1127 /// different dataSourceName. |
| 1124 */ | |
| 1125 core.List<CollectdValue> values; | 1128 core.List<CollectdValue> values; |
| 1126 | 1129 |
| 1127 CollectdPayload(); | 1130 CollectdPayload(); |
| 1128 | 1131 |
| 1129 CollectdPayload.fromJson(core.Map _json) { | 1132 CollectdPayload.fromJson(core.Map _json) { |
| 1130 if (_json.containsKey("endTime")) { | 1133 if (_json.containsKey("endTime")) { |
| 1131 endTime = _json["endTime"]; | 1134 endTime = _json["endTime"]; |
| 1132 } | 1135 } |
| 1133 if (_json.containsKey("metadata")) { | 1136 if (_json.containsKey("metadata")) { |
| 1134 metadata = commons.mapMap<core.Map<core.String, core.Object>, TypedValue>(
_json["metadata"], (core.Map<core.String, core.Object> item) => new TypedValue.f
romJson(item)); | 1137 metadata = commons.mapMap<core.Map<core.String, core.Object>, TypedValue>( |
| 1138 _json["metadata"], |
| 1139 (core.Map<core.String, core.Object> item) => |
| 1140 new TypedValue.fromJson(item)); |
| 1135 } | 1141 } |
| 1136 if (_json.containsKey("plugin")) { | 1142 if (_json.containsKey("plugin")) { |
| 1137 plugin = _json["plugin"]; | 1143 plugin = _json["plugin"]; |
| 1138 } | 1144 } |
| 1139 if (_json.containsKey("pluginInstance")) { | 1145 if (_json.containsKey("pluginInstance")) { |
| 1140 pluginInstance = _json["pluginInstance"]; | 1146 pluginInstance = _json["pluginInstance"]; |
| 1141 } | 1147 } |
| 1142 if (_json.containsKey("startTime")) { | 1148 if (_json.containsKey("startTime")) { |
| 1143 startTime = _json["startTime"]; | 1149 startTime = _json["startTime"]; |
| 1144 } | 1150 } |
| 1145 if (_json.containsKey("type")) { | 1151 if (_json.containsKey("type")) { |
| 1146 type = _json["type"]; | 1152 type = _json["type"]; |
| 1147 } | 1153 } |
| 1148 if (_json.containsKey("typeInstance")) { | 1154 if (_json.containsKey("typeInstance")) { |
| 1149 typeInstance = _json["typeInstance"]; | 1155 typeInstance = _json["typeInstance"]; |
| 1150 } | 1156 } |
| 1151 if (_json.containsKey("values")) { | 1157 if (_json.containsKey("values")) { |
| 1152 values = _json["values"].map((value) => new CollectdValue.fromJson(value))
.toList(); | 1158 values = _json["values"] |
| 1159 .map((value) => new CollectdValue.fromJson(value)) |
| 1160 .toList(); |
| 1153 } | 1161 } |
| 1154 } | 1162 } |
| 1155 | 1163 |
| 1156 core.Map<core.String, core.Object> toJson() { | 1164 core.Map<core.String, core.Object> toJson() { |
| 1157 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1165 final core.Map<core.String, core.Object> _json = |
| 1166 new core.Map<core.String, core.Object>(); |
| 1158 if (endTime != null) { | 1167 if (endTime != null) { |
| 1159 _json["endTime"] = endTime; | 1168 _json["endTime"] = endTime; |
| 1160 } | 1169 } |
| 1161 if (metadata != null) { | 1170 if (metadata != null) { |
| 1162 _json["metadata"] = commons.mapMap<TypedValue, core.Map<core.String, core.
Object>>(metadata, (TypedValue item) => (item).toJson()); | 1171 _json["metadata"] = |
| 1172 commons.mapMap<TypedValue, core.Map<core.String, core.Object>>( |
| 1173 metadata, (TypedValue item) => (item).toJson()); |
| 1163 } | 1174 } |
| 1164 if (plugin != null) { | 1175 if (plugin != null) { |
| 1165 _json["plugin"] = plugin; | 1176 _json["plugin"] = plugin; |
| 1166 } | 1177 } |
| 1167 if (pluginInstance != null) { | 1178 if (pluginInstance != null) { |
| 1168 _json["pluginInstance"] = pluginInstance; | 1179 _json["pluginInstance"] = pluginInstance; |
| 1169 } | 1180 } |
| 1170 if (startTime != null) { | 1181 if (startTime != null) { |
| 1171 _json["startTime"] = startTime; | 1182 _json["startTime"] = startTime; |
| 1172 } | 1183 } |
| 1173 if (type != null) { | 1184 if (type != null) { |
| 1174 _json["type"] = type; | 1185 _json["type"] = type; |
| 1175 } | 1186 } |
| 1176 if (typeInstance != null) { | 1187 if (typeInstance != null) { |
| 1177 _json["typeInstance"] = typeInstance; | 1188 _json["typeInstance"] = typeInstance; |
| 1178 } | 1189 } |
| 1179 if (values != null) { | 1190 if (values != null) { |
| 1180 _json["values"] = values.map((value) => (value).toJson()).toList(); | 1191 _json["values"] = values.map((value) => (value).toJson()).toList(); |
| 1181 } | 1192 } |
| 1182 return _json; | 1193 return _json; |
| 1183 } | 1194 } |
| 1184 } | 1195 } |
| 1185 | 1196 |
| 1186 /** A single data point from a collectd-based plugin. */ | 1197 /// Describes the error status for payloads that were not written. |
| 1198 class CollectdPayloadError { |
| 1199 /// Records the error status for the payload. If this field is present, the |
| 1200 /// partial errors for nested values won't be populated. |
| 1201 Status error; |
| 1202 |
| 1203 /// The zero-based index in |
| 1204 /// CreateCollectdTimeSeriesRequest.collectd_payloads. |
| 1205 core.int index; |
| 1206 |
| 1207 /// Records the error status for values that were not written due to an |
| 1208 /// error.Failed payloads for which nothing is written will not include |
| 1209 /// partial value errors. |
| 1210 core.List<CollectdValueError> valueErrors; |
| 1211 |
| 1212 CollectdPayloadError(); |
| 1213 |
| 1214 CollectdPayloadError.fromJson(core.Map _json) { |
| 1215 if (_json.containsKey("error")) { |
| 1216 error = new Status.fromJson(_json["error"]); |
| 1217 } |
| 1218 if (_json.containsKey("index")) { |
| 1219 index = _json["index"]; |
| 1220 } |
| 1221 if (_json.containsKey("valueErrors")) { |
| 1222 valueErrors = _json["valueErrors"] |
| 1223 .map((value) => new CollectdValueError.fromJson(value)) |
| 1224 .toList(); |
| 1225 } |
| 1226 } |
| 1227 |
| 1228 core.Map<core.String, core.Object> toJson() { |
| 1229 final core.Map<core.String, core.Object> _json = |
| 1230 new core.Map<core.String, core.Object>(); |
| 1231 if (error != null) { |
| 1232 _json["error"] = (error).toJson(); |
| 1233 } |
| 1234 if (index != null) { |
| 1235 _json["index"] = index; |
| 1236 } |
| 1237 if (valueErrors != null) { |
| 1238 _json["valueErrors"] = |
| 1239 valueErrors.map((value) => (value).toJson()).toList(); |
| 1240 } |
| 1241 return _json; |
| 1242 } |
| 1243 } |
| 1244 |
| 1245 /// A single data point from a collectd-based plugin. |
| 1187 class CollectdValue { | 1246 class CollectdValue { |
| 1188 /** | 1247 /// The data source for the collectd value. For example there are two data |
| 1189 * The data source for the collectd value. For example there are two data | 1248 /// sources for network measurements: "rx" and "tx". |
| 1190 * sources for network measurements: "rx" and "tx". | |
| 1191 */ | |
| 1192 core.String dataSourceName; | 1249 core.String dataSourceName; |
| 1193 /** | 1250 |
| 1194 * The type of measurement. | 1251 /// The type of measurement. |
| 1195 * Possible string values are: | 1252 /// Possible string values are: |
| 1196 * - "UNSPECIFIED_DATA_SOURCE_TYPE" : An unspecified data source type. This | 1253 /// - "UNSPECIFIED_DATA_SOURCE_TYPE" : An unspecified data source type. This |
| 1197 * corresponds to | 1254 /// corresponds to |
| 1198 * google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED. | 1255 /// google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED. |
| 1199 * - "GAUGE" : An instantaneous measurement of a varying quantity. This | 1256 /// - "GAUGE" : An instantaneous measurement of a varying quantity. This |
| 1200 * corresponds to google.api.MetricDescriptor.MetricKind.GAUGE. | 1257 /// corresponds to google.api.MetricDescriptor.MetricKind.GAUGE. |
| 1201 * - "COUNTER" : A cumulative value over time. This corresponds to | 1258 /// - "COUNTER" : A cumulative value over time. This corresponds to |
| 1202 * google.api.MetricDescriptor.MetricKind.CUMULATIVE. | 1259 /// google.api.MetricDescriptor.MetricKind.CUMULATIVE. |
| 1203 * - "DERIVE" : A rate of change of the measurement. | 1260 /// - "DERIVE" : A rate of change of the measurement. |
| 1204 * - "ABSOLUTE" : An amount of change since the last measurement interval. | 1261 /// - "ABSOLUTE" : An amount of change since the last measurement interval. |
| 1205 * This corresponds to google.api.MetricDescriptor.MetricKind.DELTA. | 1262 /// This corresponds to google.api.MetricDescriptor.MetricKind.DELTA. |
| 1206 */ | |
| 1207 core.String dataSourceType; | 1263 core.String dataSourceType; |
| 1208 /** The measurement value. */ | 1264 |
| 1265 /// The measurement value. |
| 1209 TypedValue value; | 1266 TypedValue value; |
| 1210 | 1267 |
| 1211 CollectdValue(); | 1268 CollectdValue(); |
| 1212 | 1269 |
| 1213 CollectdValue.fromJson(core.Map _json) { | 1270 CollectdValue.fromJson(core.Map _json) { |
| 1214 if (_json.containsKey("dataSourceName")) { | 1271 if (_json.containsKey("dataSourceName")) { |
| 1215 dataSourceName = _json["dataSourceName"]; | 1272 dataSourceName = _json["dataSourceName"]; |
| 1216 } | 1273 } |
| 1217 if (_json.containsKey("dataSourceType")) { | 1274 if (_json.containsKey("dataSourceType")) { |
| 1218 dataSourceType = _json["dataSourceType"]; | 1275 dataSourceType = _json["dataSourceType"]; |
| 1219 } | 1276 } |
| 1220 if (_json.containsKey("value")) { | 1277 if (_json.containsKey("value")) { |
| 1221 value = new TypedValue.fromJson(_json["value"]); | 1278 value = new TypedValue.fromJson(_json["value"]); |
| 1222 } | 1279 } |
| 1223 } | 1280 } |
| 1224 | 1281 |
| 1225 core.Map<core.String, core.Object> toJson() { | 1282 core.Map<core.String, core.Object> toJson() { |
| 1226 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1283 final core.Map<core.String, core.Object> _json = |
| 1284 new core.Map<core.String, core.Object>(); |
| 1227 if (dataSourceName != null) { | 1285 if (dataSourceName != null) { |
| 1228 _json["dataSourceName"] = dataSourceName; | 1286 _json["dataSourceName"] = dataSourceName; |
| 1229 } | 1287 } |
| 1230 if (dataSourceType != null) { | 1288 if (dataSourceType != null) { |
| 1231 _json["dataSourceType"] = dataSourceType; | 1289 _json["dataSourceType"] = dataSourceType; |
| 1232 } | 1290 } |
| 1233 if (value != null) { | 1291 if (value != null) { |
| 1234 _json["value"] = (value).toJson(); | 1292 _json["value"] = (value).toJson(); |
| 1235 } | 1293 } |
| 1236 return _json; | 1294 return _json; |
| 1237 } | 1295 } |
| 1238 } | 1296 } |
| 1239 | 1297 |
| 1240 /** The CreateCollectdTimeSeries request. */ | 1298 /// Describes the error status for values that were not written. |
| 1299 class CollectdValueError { |
| 1300 /// Records the error status for the value. |
| 1301 Status error; |
| 1302 |
| 1303 /// The zero-based index in CollectdPayload.values within the parent |
| 1304 /// CreateCollectdTimeSeriesRequest.collectd_payloads. |
| 1305 core.int index; |
| 1306 |
| 1307 CollectdValueError(); |
| 1308 |
| 1309 CollectdValueError.fromJson(core.Map _json) { |
| 1310 if (_json.containsKey("error")) { |
| 1311 error = new Status.fromJson(_json["error"]); |
| 1312 } |
| 1313 if (_json.containsKey("index")) { |
| 1314 index = _json["index"]; |
| 1315 } |
| 1316 } |
| 1317 |
| 1318 core.Map<core.String, core.Object> toJson() { |
| 1319 final core.Map<core.String, core.Object> _json = |
| 1320 new core.Map<core.String, core.Object>(); |
| 1321 if (error != null) { |
| 1322 _json["error"] = (error).toJson(); |
| 1323 } |
| 1324 if (index != null) { |
| 1325 _json["index"] = index; |
| 1326 } |
| 1327 return _json; |
| 1328 } |
| 1329 } |
| 1330 |
| 1331 /// The CreateCollectdTimeSeries request. |
| 1241 class CreateCollectdTimeSeriesRequest { | 1332 class CreateCollectdTimeSeriesRequest { |
| 1242 /** | 1333 /// The collectd payloads representing the time series data. You must not |
| 1243 * The collectd payloads representing the time series data. You must not | 1334 /// include more than a single point for each time series, so no two payloads |
| 1244 * include more than a single point for each time series, so no two payloads | 1335 /// can have the same values for all of the fields plugin, plugin_instance, |
| 1245 * can have the same values for all of the fields plugin, plugin_instance, | 1336 /// type, and type_instance. |
| 1246 * type, and type_instance. | |
| 1247 */ | |
| 1248 core.List<CollectdPayload> collectdPayloads; | 1337 core.List<CollectdPayload> collectdPayloads; |
| 1249 /** | 1338 |
| 1250 * The version of collectd that collected the data. Example: "5.3.0-192.el6". | 1339 /// The version of collectd that collected the data. Example: |
| 1251 */ | 1340 /// "5.3.0-192.el6". |
| 1252 core.String collectdVersion; | 1341 core.String collectdVersion; |
| 1253 /** The monitored resource associated with the time series. */ | 1342 |
| 1343 /// The monitored resource associated with the time series. |
| 1254 MonitoredResource resource; | 1344 MonitoredResource resource; |
| 1255 | 1345 |
| 1256 CreateCollectdTimeSeriesRequest(); | 1346 CreateCollectdTimeSeriesRequest(); |
| 1257 | 1347 |
| 1258 CreateCollectdTimeSeriesRequest.fromJson(core.Map _json) { | 1348 CreateCollectdTimeSeriesRequest.fromJson(core.Map _json) { |
| 1259 if (_json.containsKey("collectdPayloads")) { | 1349 if (_json.containsKey("collectdPayloads")) { |
| 1260 collectdPayloads = _json["collectdPayloads"].map((value) => new CollectdPa
yload.fromJson(value)).toList(); | 1350 collectdPayloads = _json["collectdPayloads"] |
| 1351 .map((value) => new CollectdPayload.fromJson(value)) |
| 1352 .toList(); |
| 1261 } | 1353 } |
| 1262 if (_json.containsKey("collectdVersion")) { | 1354 if (_json.containsKey("collectdVersion")) { |
| 1263 collectdVersion = _json["collectdVersion"]; | 1355 collectdVersion = _json["collectdVersion"]; |
| 1264 } | 1356 } |
| 1265 if (_json.containsKey("resource")) { | 1357 if (_json.containsKey("resource")) { |
| 1266 resource = new MonitoredResource.fromJson(_json["resource"]); | 1358 resource = new MonitoredResource.fromJson(_json["resource"]); |
| 1267 } | 1359 } |
| 1268 } | 1360 } |
| 1269 | 1361 |
| 1270 core.Map<core.String, core.Object> toJson() { | 1362 core.Map<core.String, core.Object> toJson() { |
| 1271 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1363 final core.Map<core.String, core.Object> _json = |
| 1364 new core.Map<core.String, core.Object>(); |
| 1272 if (collectdPayloads != null) { | 1365 if (collectdPayloads != null) { |
| 1273 _json["collectdPayloads"] = collectdPayloads.map((value) => (value).toJson
()).toList(); | 1366 _json["collectdPayloads"] = |
| 1367 collectdPayloads.map((value) => (value).toJson()).toList(); |
| 1274 } | 1368 } |
| 1275 if (collectdVersion != null) { | 1369 if (collectdVersion != null) { |
| 1276 _json["collectdVersion"] = collectdVersion; | 1370 _json["collectdVersion"] = collectdVersion; |
| 1277 } | 1371 } |
| 1278 if (resource != null) { | 1372 if (resource != null) { |
| 1279 _json["resource"] = (resource).toJson(); | 1373 _json["resource"] = (resource).toJson(); |
| 1280 } | 1374 } |
| 1281 return _json; | 1375 return _json; |
| 1282 } | 1376 } |
| 1283 } | 1377 } |
| 1284 | 1378 |
| 1285 /** The CreateTimeSeries request. */ | 1379 /// The CreateCollectdTimeSeries response. |
| 1380 class CreateCollectdTimeSeriesResponse { |
| 1381 /// Records the error status for points that were not written due to an |
| 1382 /// error.Failed requests for which nothing is written will return an error |
| 1383 /// response instead. |
| 1384 core.List<CollectdPayloadError> payloadErrors; |
| 1385 |
| 1386 CreateCollectdTimeSeriesResponse(); |
| 1387 |
| 1388 CreateCollectdTimeSeriesResponse.fromJson(core.Map _json) { |
| 1389 if (_json.containsKey("payloadErrors")) { |
| 1390 payloadErrors = _json["payloadErrors"] |
| 1391 .map((value) => new CollectdPayloadError.fromJson(value)) |
| 1392 .toList(); |
| 1393 } |
| 1394 } |
| 1395 |
| 1396 core.Map<core.String, core.Object> toJson() { |
| 1397 final core.Map<core.String, core.Object> _json = |
| 1398 new core.Map<core.String, core.Object>(); |
| 1399 if (payloadErrors != null) { |
| 1400 _json["payloadErrors"] = |
| 1401 payloadErrors.map((value) => (value).toJson()).toList(); |
| 1402 } |
| 1403 return _json; |
| 1404 } |
| 1405 } |
| 1406 |
| 1407 /// The CreateTimeSeries request. |
| 1286 class CreateTimeSeriesRequest { | 1408 class CreateTimeSeriesRequest { |
| 1287 /** | 1409 /// The new data to be added to a list of time series. Adds at most one data |
| 1288 * The new data to be added to a list of time series. Adds at most one data | 1410 /// point to each of several time series. The new data point must be more |
| 1289 * point to each of several time series. The new data point must be more | 1411 /// recent than any other point in its time series. Each TimeSeries value |
| 1290 * recent than any other point in its time series. Each TimeSeries value must | 1412 /// must fully specify a unique time series by supplying all label values for |
| 1291 * fully specify a unique time series by supplying all label values for the | 1413 /// the metric and the monitored resource. |
| 1292 * metric and the monitored resource. | |
| 1293 */ | |
| 1294 core.List<TimeSeries> timeSeries; | 1414 core.List<TimeSeries> timeSeries; |
| 1295 | 1415 |
| 1296 CreateTimeSeriesRequest(); | 1416 CreateTimeSeriesRequest(); |
| 1297 | 1417 |
| 1298 CreateTimeSeriesRequest.fromJson(core.Map _json) { | 1418 CreateTimeSeriesRequest.fromJson(core.Map _json) { |
| 1299 if (_json.containsKey("timeSeries")) { | 1419 if (_json.containsKey("timeSeries")) { |
| 1300 timeSeries = _json["timeSeries"].map((value) => new TimeSeries.fromJson(va
lue)).toList(); | 1420 timeSeries = _json["timeSeries"] |
| 1421 .map((value) => new TimeSeries.fromJson(value)) |
| 1422 .toList(); |
| 1301 } | 1423 } |
| 1302 } | 1424 } |
| 1303 | 1425 |
| 1304 core.Map<core.String, core.Object> toJson() { | 1426 core.Map<core.String, core.Object> toJson() { |
| 1305 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1427 final core.Map<core.String, core.Object> _json = |
| 1428 new core.Map<core.String, core.Object>(); |
| 1306 if (timeSeries != null) { | 1429 if (timeSeries != null) { |
| 1307 _json["timeSeries"] = timeSeries.map((value) => (value).toJson()).toList()
; | 1430 _json["timeSeries"] = |
| 1431 timeSeries.map((value) => (value).toJson()).toList(); |
| 1308 } | 1432 } |
| 1309 return _json; | 1433 return _json; |
| 1310 } | 1434 } |
| 1311 } | 1435 } |
| 1312 | 1436 |
| 1313 /** | 1437 /// Distribution contains summary statistics for a population of values. It |
| 1314 * Distribution contains summary statistics for a population of values. It | 1438 /// optionally contains a histogram representing the distribution of those |
| 1315 * optionally contains a histogram representing the distribution of those values | 1439 /// values across a set of buckets.The summary statistics are the count, mean, |
| 1316 * across a set of buckets.The summary statistics are the count, mean, sum of | 1440 /// sum of the squared deviation from the mean, the minimum, and the maximum of |
| 1317 * the squared deviation from the mean, the minimum, and the maximum of the set | 1441 /// the set of population of values. The histogram is based on a sequence of |
| 1318 * of population of values. The histogram is based on a sequence of buckets and | 1442 /// buckets and gives a count of values that fall into each bucket. The |
| 1319 * gives a count of values that fall into each bucket. The boundaries of the | 1443 /// boundaries of the buckets are given either explicitly or by formulas for |
| 1320 * buckets are given either explicitly or by formulas for buckets of fixed or | 1444 /// buckets of fixed or exponentially increasing widths.Although it is not |
| 1321 * exponentially increasing widths.Although it is not forbidden, it is generally | 1445 /// forbidden, it is generally a bad idea to include non-finite values |
| 1322 * a bad idea to include non-finite values (infinities or NaNs) in the | 1446 /// (infinities or NaNs) in the population of values, as this will render the |
| 1323 * population of values, as this will render the mean and | 1447 /// mean and sum_of_squared_deviation fields meaningless. |
| 1324 * sum_of_squared_deviation fields meaningless. | |
| 1325 */ | |
| 1326 class Distribution { | 1448 class Distribution { |
| 1327 /** | 1449 /// Required in the Stackdriver Monitoring API v3. The values for each bucket |
| 1328 * Required in the Stackdriver Monitoring API v3. The values for each bucket | 1450 /// specified in bucket_options. The sum of the values in bucketCounts must |
| 1329 * specified in bucket_options. The sum of the values in bucketCounts must | 1451 /// equal the value in the count field of the Distribution object. The order |
| 1330 * equal the value in the count field of the Distribution object. The order of | 1452 /// of the bucket counts follows the numbering schemes described for the |
| 1331 * the bucket counts follows the numbering schemes described for the three | 1453 /// three bucket types. The underflow bucket has number 0; the finite |
| 1332 * bucket types. The underflow bucket has number 0; the finite buckets, if | 1454 /// buckets, if any, have numbers 1 through N-2; and the overflow bucket has |
| 1333 * any, have numbers 1 through N-2; and the overflow bucket has number N-1. | 1455 /// number N-1. The size of bucket_counts must not be greater than N. If the |
| 1334 * The size of bucket_counts must not be greater than N. If the size is less | 1456 /// size is less than N, then the remaining buckets are assigned values of |
| 1335 * than N, then the remaining buckets are assigned values of zero. | 1457 /// zero. |
| 1336 */ | |
| 1337 core.List<core.String> bucketCounts; | 1458 core.List<core.String> bucketCounts; |
| 1338 /** | 1459 |
| 1339 * Required in the Stackdriver Monitoring API v3. Defines the histogram bucket | 1460 /// Required in the Stackdriver Monitoring API v3. Defines the histogram |
| 1340 * boundaries. | 1461 /// bucket boundaries. |
| 1341 */ | |
| 1342 BucketOptions bucketOptions; | 1462 BucketOptions bucketOptions; |
| 1343 /** | 1463 |
| 1344 * The number of values in the population. Must be non-negative. This value | 1464 /// The number of values in the population. Must be non-negative. This value |
| 1345 * must equal the sum of the values in bucket_counts if a histogram is | 1465 /// must equal the sum of the values in bucket_counts if a histogram is |
| 1346 * provided. | 1466 /// provided. |
| 1347 */ | |
| 1348 core.String count; | 1467 core.String count; |
| 1349 /** | 1468 |
| 1350 * The arithmetic mean of the values in the population. If count is zero then | 1469 /// The arithmetic mean of the values in the population. If count is zero |
| 1351 * this field must be zero. | 1470 /// then this field must be zero. |
| 1352 */ | |
| 1353 core.double mean; | 1471 core.double mean; |
| 1354 /** | 1472 |
| 1355 * If specified, contains the range of the population values. The field must | 1473 /// If specified, contains the range of the population values. The field must |
| 1356 * not be present if the count is zero. This field is presently ignored by the | 1474 /// not be present if the count is zero. This field is presently ignored by |
| 1357 * Stackdriver Monitoring API v3. | 1475 /// the Stackdriver Monitoring API v3. |
| 1358 */ | |
| 1359 Range range; | 1476 Range range; |
| 1360 /** | 1477 |
| 1361 * The sum of squared deviations from the mean of the values in the | 1478 /// The sum of squared deviations from the mean of the values in the |
| 1362 * population. For values x_i this is: | 1479 /// population. For values x_i this is: |
| 1363 * Sum[i=1..n]((x_i - mean)^2) | 1480 /// Sum[i=1..n]((x_i - mean)^2) |
| 1364 * Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition | 1481 /// Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition |
| 1365 * describes Welford's method for accumulating this sum in one pass.If count | 1482 /// describes Welford's method for accumulating this sum in one pass.If count |
| 1366 * is zero then this field must be zero. | 1483 /// is zero then this field must be zero. |
| 1367 */ | |
| 1368 core.double sumOfSquaredDeviation; | 1484 core.double sumOfSquaredDeviation; |
| 1369 | 1485 |
| 1370 Distribution(); | 1486 Distribution(); |
| 1371 | 1487 |
| 1372 Distribution.fromJson(core.Map _json) { | 1488 Distribution.fromJson(core.Map _json) { |
| 1373 if (_json.containsKey("bucketCounts")) { | 1489 if (_json.containsKey("bucketCounts")) { |
| 1374 bucketCounts = _json["bucketCounts"]; | 1490 bucketCounts = _json["bucketCounts"]; |
| 1375 } | 1491 } |
| 1376 if (_json.containsKey("bucketOptions")) { | 1492 if (_json.containsKey("bucketOptions")) { |
| 1377 bucketOptions = new BucketOptions.fromJson(_json["bucketOptions"]); | 1493 bucketOptions = new BucketOptions.fromJson(_json["bucketOptions"]); |
| 1378 } | 1494 } |
| 1379 if (_json.containsKey("count")) { | 1495 if (_json.containsKey("count")) { |
| 1380 count = _json["count"]; | 1496 count = _json["count"]; |
| 1381 } | 1497 } |
| 1382 if (_json.containsKey("mean")) { | 1498 if (_json.containsKey("mean")) { |
| 1383 mean = _json["mean"]; | 1499 mean = _json["mean"]; |
| 1384 } | 1500 } |
| 1385 if (_json.containsKey("range")) { | 1501 if (_json.containsKey("range")) { |
| 1386 range = new Range.fromJson(_json["range"]); | 1502 range = new Range.fromJson(_json["range"]); |
| 1387 } | 1503 } |
| 1388 if (_json.containsKey("sumOfSquaredDeviation")) { | 1504 if (_json.containsKey("sumOfSquaredDeviation")) { |
| 1389 sumOfSquaredDeviation = _json["sumOfSquaredDeviation"]; | 1505 sumOfSquaredDeviation = _json["sumOfSquaredDeviation"]; |
| 1390 } | 1506 } |
| 1391 } | 1507 } |
| 1392 | 1508 |
| 1393 core.Map<core.String, core.Object> toJson() { | 1509 core.Map<core.String, core.Object> toJson() { |
| 1394 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1510 final core.Map<core.String, core.Object> _json = |
| 1511 new core.Map<core.String, core.Object>(); |
| 1395 if (bucketCounts != null) { | 1512 if (bucketCounts != null) { |
| 1396 _json["bucketCounts"] = bucketCounts; | 1513 _json["bucketCounts"] = bucketCounts; |
| 1397 } | 1514 } |
| 1398 if (bucketOptions != null) { | 1515 if (bucketOptions != null) { |
| 1399 _json["bucketOptions"] = (bucketOptions).toJson(); | 1516 _json["bucketOptions"] = (bucketOptions).toJson(); |
| 1400 } | 1517 } |
| 1401 if (count != null) { | 1518 if (count != null) { |
| 1402 _json["count"] = count; | 1519 _json["count"] = count; |
| 1403 } | 1520 } |
| 1404 if (mean != null) { | 1521 if (mean != null) { |
| 1405 _json["mean"] = mean; | 1522 _json["mean"] = mean; |
| 1406 } | 1523 } |
| 1407 if (range != null) { | 1524 if (range != null) { |
| 1408 _json["range"] = (range).toJson(); | 1525 _json["range"] = (range).toJson(); |
| 1409 } | 1526 } |
| 1410 if (sumOfSquaredDeviation != null) { | 1527 if (sumOfSquaredDeviation != null) { |
| 1411 _json["sumOfSquaredDeviation"] = sumOfSquaredDeviation; | 1528 _json["sumOfSquaredDeviation"] = sumOfSquaredDeviation; |
| 1412 } | 1529 } |
| 1413 return _json; | 1530 return _json; |
| 1414 } | 1531 } |
| 1415 } | 1532 } |
| 1416 | 1533 |
| 1417 /** | 1534 /// A generic empty message that you can re-use to avoid defining duplicated |
| 1418 * A generic empty message that you can re-use to avoid defining duplicated | 1535 /// empty messages in your APIs. A typical example is to use it as the request |
| 1419 * empty messages in your APIs. A typical example is to use it as the request or | 1536 /// or the response type of an API method. For instance: |
| 1420 * the response type of an API method. For instance: | 1537 /// service Foo { |
| 1421 * service Foo { | 1538 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 1422 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 1539 /// } |
| 1423 * } | 1540 /// The JSON representation for Empty is empty JSON object {}. |
| 1424 * The JSON representation for Empty is empty JSON object {}. | |
| 1425 */ | |
| 1426 class Empty { | 1541 class Empty { |
| 1427 | |
| 1428 Empty(); | 1542 Empty(); |
| 1429 | 1543 |
| 1430 Empty.fromJson(core.Map _json) { | 1544 Empty.fromJson(core.Map _json) {} |
| 1431 } | |
| 1432 | 1545 |
| 1433 core.Map<core.String, core.Object> toJson() { | 1546 core.Map<core.String, core.Object> toJson() { |
| 1434 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1547 final core.Map<core.String, core.Object> _json = |
| 1548 new core.Map<core.String, core.Object>(); |
| 1435 return _json; | 1549 return _json; |
| 1436 } | 1550 } |
| 1437 } | 1551 } |
| 1438 | 1552 |
| 1439 /** | 1553 /// Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 |
| 1440 * Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 | 1554 /// (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < |
| 1441 * (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < | 1555 /// N-1): boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must |
| 1442 * N-1): boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must | 1556 /// contain at least one element. If bounds has only one element, then there |
| 1443 * contain at least one element. If bounds has only one element, then there are | 1557 /// are no finite buckets, and that single element is the common boundary of |
| 1444 * no finite buckets, and that single element is the common boundary of the | 1558 /// the overflow and underflow buckets. |
| 1445 * overflow and underflow buckets. | |
| 1446 */ | |
| 1447 class Explicit { | 1559 class Explicit { |
| 1448 /** The values must be monotonically increasing. */ | 1560 /// The values must be monotonically increasing. |
| 1449 core.List<core.double> bounds; | 1561 core.List<core.double> bounds; |
| 1450 | 1562 |
| 1451 Explicit(); | 1563 Explicit(); |
| 1452 | 1564 |
| 1453 Explicit.fromJson(core.Map _json) { | 1565 Explicit.fromJson(core.Map _json) { |
| 1454 if (_json.containsKey("bounds")) { | 1566 if (_json.containsKey("bounds")) { |
| 1455 bounds = _json["bounds"]; | 1567 bounds = _json["bounds"]; |
| 1456 } | 1568 } |
| 1457 } | 1569 } |
| 1458 | 1570 |
| 1459 core.Map<core.String, core.Object> toJson() { | 1571 core.Map<core.String, core.Object> toJson() { |
| 1460 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1572 final core.Map<core.String, core.Object> _json = |
| 1573 new core.Map<core.String, core.Object>(); |
| 1461 if (bounds != null) { | 1574 if (bounds != null) { |
| 1462 _json["bounds"] = bounds; | 1575 _json["bounds"] = bounds; |
| 1463 } | 1576 } |
| 1464 return _json; | 1577 return _json; |
| 1465 } | 1578 } |
| 1466 } | 1579 } |
| 1467 | 1580 |
| 1468 /** | 1581 /// Specifies an exponential sequence of buckets that have a width that is |
| 1469 * Specifies an exponential sequence of buckets that have a width that is | 1582 /// proportional to the value of the lower bound. Each bucket represents a |
| 1470 * proportional to the value of the lower bound. Each bucket represents a | 1583 /// constant relative uncertainty on a specific value in the bucket.There are |
| 1471 * constant relative uncertainty on a specific value in the bucket.There are | 1584 /// num_finite_buckets + 2 (= N) buckets. Bucket i has the following |
| 1472 * num_finite_buckets + 2 (= N) buckets. Bucket i has the following | 1585 /// boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower |
| 1473 * boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower | 1586 /// bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). |
| 1474 * bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). | |
| 1475 */ | |
| 1476 class Exponential { | 1587 class Exponential { |
| 1477 /** Must be greater than 1. */ | 1588 /// Must be greater than 1. |
| 1478 core.double growthFactor; | 1589 core.double growthFactor; |
| 1479 /** Must be greater than 0. */ | 1590 |
| 1591 /// Must be greater than 0. |
| 1480 core.int numFiniteBuckets; | 1592 core.int numFiniteBuckets; |
| 1481 /** Must be greater than 0. */ | 1593 |
| 1594 /// Must be greater than 0. |
| 1482 core.double scale; | 1595 core.double scale; |
| 1483 | 1596 |
| 1484 Exponential(); | 1597 Exponential(); |
| 1485 | 1598 |
| 1486 Exponential.fromJson(core.Map _json) { | 1599 Exponential.fromJson(core.Map _json) { |
| 1487 if (_json.containsKey("growthFactor")) { | 1600 if (_json.containsKey("growthFactor")) { |
| 1488 growthFactor = _json["growthFactor"]; | 1601 growthFactor = _json["growthFactor"]; |
| 1489 } | 1602 } |
| 1490 if (_json.containsKey("numFiniteBuckets")) { | 1603 if (_json.containsKey("numFiniteBuckets")) { |
| 1491 numFiniteBuckets = _json["numFiniteBuckets"]; | 1604 numFiniteBuckets = _json["numFiniteBuckets"]; |
| 1492 } | 1605 } |
| 1493 if (_json.containsKey("scale")) { | 1606 if (_json.containsKey("scale")) { |
| 1494 scale = _json["scale"]; | 1607 scale = _json["scale"]; |
| 1495 } | 1608 } |
| 1496 } | 1609 } |
| 1497 | 1610 |
| 1498 core.Map<core.String, core.Object> toJson() { | 1611 core.Map<core.String, core.Object> toJson() { |
| 1499 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1612 final core.Map<core.String, core.Object> _json = |
| 1613 new core.Map<core.String, core.Object>(); |
| 1500 if (growthFactor != null) { | 1614 if (growthFactor != null) { |
| 1501 _json["growthFactor"] = growthFactor; | 1615 _json["growthFactor"] = growthFactor; |
| 1502 } | 1616 } |
| 1503 if (numFiniteBuckets != null) { | 1617 if (numFiniteBuckets != null) { |
| 1504 _json["numFiniteBuckets"] = numFiniteBuckets; | 1618 _json["numFiniteBuckets"] = numFiniteBuckets; |
| 1505 } | 1619 } |
| 1506 if (scale != null) { | 1620 if (scale != null) { |
| 1507 _json["scale"] = scale; | 1621 _json["scale"] = scale; |
| 1508 } | 1622 } |
| 1509 return _json; | 1623 return _json; |
| 1510 } | 1624 } |
| 1511 } | 1625 } |
| 1512 | 1626 |
| 1513 /** A single field of a message type. */ | 1627 /// A single field of a message type. |
| 1514 class Field { | 1628 class Field { |
| 1515 /** | 1629 /// The field cardinality. |
| 1516 * The field cardinality. | 1630 /// Possible string values are: |
| 1517 * Possible string values are: | 1631 /// - "CARDINALITY_UNKNOWN" : For fields with unknown cardinality. |
| 1518 * - "CARDINALITY_UNKNOWN" : For fields with unknown cardinality. | 1632 /// - "CARDINALITY_OPTIONAL" : For optional fields. |
| 1519 * - "CARDINALITY_OPTIONAL" : For optional fields. | 1633 /// - "CARDINALITY_REQUIRED" : For required fields. Proto2 syntax only. |
| 1520 * - "CARDINALITY_REQUIRED" : For required fields. Proto2 syntax only. | 1634 /// - "CARDINALITY_REPEATED" : For repeated fields. |
| 1521 * - "CARDINALITY_REPEATED" : For repeated fields. | |
| 1522 */ | |
| 1523 core.String cardinality; | 1635 core.String cardinality; |
| 1524 /** | 1636 |
| 1525 * The string value of the default value of this field. Proto2 syntax only. | 1637 /// The string value of the default value of this field. Proto2 syntax only. |
| 1526 */ | |
| 1527 core.String defaultValue; | 1638 core.String defaultValue; |
| 1528 /** The field JSON name. */ | 1639 |
| 1640 /// The field JSON name. |
| 1529 core.String jsonName; | 1641 core.String jsonName; |
| 1530 /** | 1642 |
| 1531 * The field type. | 1643 /// The field type. |
| 1532 * Possible string values are: | 1644 /// Possible string values are: |
| 1533 * - "TYPE_UNKNOWN" : Field type unknown. | 1645 /// - "TYPE_UNKNOWN" : Field type unknown. |
| 1534 * - "TYPE_DOUBLE" : Field type double. | 1646 /// - "TYPE_DOUBLE" : Field type double. |
| 1535 * - "TYPE_FLOAT" : Field type float. | 1647 /// - "TYPE_FLOAT" : Field type float. |
| 1536 * - "TYPE_INT64" : Field type int64. | 1648 /// - "TYPE_INT64" : Field type int64. |
| 1537 * - "TYPE_UINT64" : Field type uint64. | 1649 /// - "TYPE_UINT64" : Field type uint64. |
| 1538 * - "TYPE_INT32" : Field type int32. | 1650 /// - "TYPE_INT32" : Field type int32. |
| 1539 * - "TYPE_FIXED64" : Field type fixed64. | 1651 /// - "TYPE_FIXED64" : Field type fixed64. |
| 1540 * - "TYPE_FIXED32" : Field type fixed32. | 1652 /// - "TYPE_FIXED32" : Field type fixed32. |
| 1541 * - "TYPE_BOOL" : Field type bool. | 1653 /// - "TYPE_BOOL" : Field type bool. |
| 1542 * - "TYPE_STRING" : Field type string. | 1654 /// - "TYPE_STRING" : Field type string. |
| 1543 * - "TYPE_GROUP" : Field type group. Proto2 syntax only, and deprecated. | 1655 /// - "TYPE_GROUP" : Field type group. Proto2 syntax only, and deprecated. |
| 1544 * - "TYPE_MESSAGE" : Field type message. | 1656 /// - "TYPE_MESSAGE" : Field type message. |
| 1545 * - "TYPE_BYTES" : Field type bytes. | 1657 /// - "TYPE_BYTES" : Field type bytes. |
| 1546 * - "TYPE_UINT32" : Field type uint32. | 1658 /// - "TYPE_UINT32" : Field type uint32. |
| 1547 * - "TYPE_ENUM" : Field type enum. | 1659 /// - "TYPE_ENUM" : Field type enum. |
| 1548 * - "TYPE_SFIXED32" : Field type sfixed32. | 1660 /// - "TYPE_SFIXED32" : Field type sfixed32. |
| 1549 * - "TYPE_SFIXED64" : Field type sfixed64. | 1661 /// - "TYPE_SFIXED64" : Field type sfixed64. |
| 1550 * - "TYPE_SINT32" : Field type sint32. | 1662 /// - "TYPE_SINT32" : Field type sint32. |
| 1551 * - "TYPE_SINT64" : Field type sint64. | 1663 /// - "TYPE_SINT64" : Field type sint64. |
| 1552 */ | |
| 1553 core.String kind; | 1664 core.String kind; |
| 1554 /** The field name. */ | 1665 |
| 1666 /// The field name. |
| 1555 core.String name; | 1667 core.String name; |
| 1556 /** The field number. */ | 1668 |
| 1669 /// The field number. |
| 1557 core.int number; | 1670 core.int number; |
| 1558 /** | 1671 |
| 1559 * The index of the field type in Type.oneofs, for message or enumeration | 1672 /// The index of the field type in Type.oneofs, for message or enumeration |
| 1560 * types. The first type has index 1; zero means the type is not in the list. | 1673 /// types. The first type has index 1; zero means the type is not in the |
| 1561 */ | 1674 /// list. |
| 1562 core.int oneofIndex; | 1675 core.int oneofIndex; |
| 1563 /** The protocol buffer options. */ | 1676 |
| 1677 /// The protocol buffer options. |
| 1564 core.List<Option> options; | 1678 core.List<Option> options; |
| 1565 /** Whether to use alternative packed wire representation. */ | 1679 |
| 1680 /// Whether to use alternative packed wire representation. |
| 1566 core.bool packed; | 1681 core.bool packed; |
| 1567 /** | 1682 |
| 1568 * The field type URL, without the scheme, for message or enumeration types. | 1683 /// The field type URL, without the scheme, for message or enumeration types. |
| 1569 * Example: "type.googleapis.com/google.protobuf.Timestamp". | 1684 /// Example: "type.googleapis.com/google.protobuf.Timestamp". |
| 1570 */ | |
| 1571 core.String typeUrl; | 1685 core.String typeUrl; |
| 1572 | 1686 |
| 1573 Field(); | 1687 Field(); |
| 1574 | 1688 |
| 1575 Field.fromJson(core.Map _json) { | 1689 Field.fromJson(core.Map _json) { |
| 1576 if (_json.containsKey("cardinality")) { | 1690 if (_json.containsKey("cardinality")) { |
| 1577 cardinality = _json["cardinality"]; | 1691 cardinality = _json["cardinality"]; |
| 1578 } | 1692 } |
| 1579 if (_json.containsKey("defaultValue")) { | 1693 if (_json.containsKey("defaultValue")) { |
| 1580 defaultValue = _json["defaultValue"]; | 1694 defaultValue = _json["defaultValue"]; |
| 1581 } | 1695 } |
| 1582 if (_json.containsKey("jsonName")) { | 1696 if (_json.containsKey("jsonName")) { |
| 1583 jsonName = _json["jsonName"]; | 1697 jsonName = _json["jsonName"]; |
| 1584 } | 1698 } |
| 1585 if (_json.containsKey("kind")) { | 1699 if (_json.containsKey("kind")) { |
| 1586 kind = _json["kind"]; | 1700 kind = _json["kind"]; |
| 1587 } | 1701 } |
| 1588 if (_json.containsKey("name")) { | 1702 if (_json.containsKey("name")) { |
| 1589 name = _json["name"]; | 1703 name = _json["name"]; |
| 1590 } | 1704 } |
| 1591 if (_json.containsKey("number")) { | 1705 if (_json.containsKey("number")) { |
| 1592 number = _json["number"]; | 1706 number = _json["number"]; |
| 1593 } | 1707 } |
| 1594 if (_json.containsKey("oneofIndex")) { | 1708 if (_json.containsKey("oneofIndex")) { |
| 1595 oneofIndex = _json["oneofIndex"]; | 1709 oneofIndex = _json["oneofIndex"]; |
| 1596 } | 1710 } |
| 1597 if (_json.containsKey("options")) { | 1711 if (_json.containsKey("options")) { |
| 1598 options = _json["options"].map((value) => new Option.fromJson(value)).toLi
st(); | 1712 options = |
| 1713 _json["options"].map((value) => new Option.fromJson(value)).toList(); |
| 1599 } | 1714 } |
| 1600 if (_json.containsKey("packed")) { | 1715 if (_json.containsKey("packed")) { |
| 1601 packed = _json["packed"]; | 1716 packed = _json["packed"]; |
| 1602 } | 1717 } |
| 1603 if (_json.containsKey("typeUrl")) { | 1718 if (_json.containsKey("typeUrl")) { |
| 1604 typeUrl = _json["typeUrl"]; | 1719 typeUrl = _json["typeUrl"]; |
| 1605 } | 1720 } |
| 1606 } | 1721 } |
| 1607 | 1722 |
| 1608 core.Map<core.String, core.Object> toJson() { | 1723 core.Map<core.String, core.Object> toJson() { |
| 1609 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1724 final core.Map<core.String, core.Object> _json = |
| 1725 new core.Map<core.String, core.Object>(); |
| 1610 if (cardinality != null) { | 1726 if (cardinality != null) { |
| 1611 _json["cardinality"] = cardinality; | 1727 _json["cardinality"] = cardinality; |
| 1612 } | 1728 } |
| 1613 if (defaultValue != null) { | 1729 if (defaultValue != null) { |
| 1614 _json["defaultValue"] = defaultValue; | 1730 _json["defaultValue"] = defaultValue; |
| 1615 } | 1731 } |
| 1616 if (jsonName != null) { | 1732 if (jsonName != null) { |
| 1617 _json["jsonName"] = jsonName; | 1733 _json["jsonName"] = jsonName; |
| 1618 } | 1734 } |
| 1619 if (kind != null) { | 1735 if (kind != null) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1634 if (packed != null) { | 1750 if (packed != null) { |
| 1635 _json["packed"] = packed; | 1751 _json["packed"] = packed; |
| 1636 } | 1752 } |
| 1637 if (typeUrl != null) { | 1753 if (typeUrl != null) { |
| 1638 _json["typeUrl"] = typeUrl; | 1754 _json["typeUrl"] = typeUrl; |
| 1639 } | 1755 } |
| 1640 return _json; | 1756 return _json; |
| 1641 } | 1757 } |
| 1642 } | 1758 } |
| 1643 | 1759 |
| 1644 /** | 1760 /// The description of a dynamic collection of monitored resources. Each group |
| 1645 * The description of a dynamic collection of monitored resources. Each group | 1761 /// has a filter that is matched against monitored resources and their |
| 1646 * has a filter that is matched against monitored resources and their associated | 1762 /// associated metadata. If a group's filter matches an available monitored |
| 1647 * metadata. If a group's filter matches an available monitored resource, then | 1763 /// resource, then that resource is a member of that group. Groups can contain |
| 1648 * that resource is a member of that group. Groups can contain any number of | 1764 /// any number of monitored resources, and each monitored resource can be a |
| 1649 * monitored resources, and each monitored resource can be a member of any | 1765 /// member of any number of groups.Groups can be nested in parent-child |
| 1650 * number of groups.Groups can be nested in parent-child hierarchies. The | 1766 /// hierarchies. The parentName field identifies an optional parent for each |
| 1651 * parentName field identifies an optional parent for each group. If a group has | 1767 /// group. If a group has a parent, then the only monitored resources available |
| 1652 * a parent, then the only monitored resources available to be matched by the | 1768 /// to be matched by the group's filter are the resources contained in the |
| 1653 * group's filter are the resources contained in the parent group. In other | 1769 /// parent group. In other words, a group contains the monitored resources that |
| 1654 * words, a group contains the monitored resources that match its filter and the | 1770 /// match its filter and the filters of all the group's ancestors. A group |
| 1655 * filters of all the group's ancestors. A group without a parent can contain | 1771 /// without a parent can contain any monitored resource.For example, consider |
| 1656 * any monitored resource.For example, consider an infrastructure running a set | 1772 /// an infrastructure running a set of instances with two user-defined tags: |
| 1657 * of instances with two user-defined tags: "environment" and "role". A parent | 1773 /// "environment" and "role". A parent group has a filter, |
| 1658 * group has a filter, environment="production". A child of that parent group | 1774 /// environment="production". A child of that parent group has a filter, |
| 1659 * has a filter, role="transcoder". The parent group contains all instances in | 1775 /// role="transcoder". The parent group contains all instances in the |
| 1660 * the production environment, regardless of their roles. The child group | 1776 /// production environment, regardless of their roles. The child group contains |
| 1661 * contains instances that have the transcoder role and are in the production | 1777 /// instances that have the transcoder role and are in the production |
| 1662 * environment.The monitored resources contained in a group can change at any | 1778 /// environment.The monitored resources contained in a group can change at any |
| 1663 * moment, depending on what resources exist and what filters are associated | 1779 /// moment, depending on what resources exist and what filters are associated |
| 1664 * with the group and its ancestors. | 1780 /// with the group and its ancestors. |
| 1665 */ | |
| 1666 class Group { | 1781 class Group { |
| 1667 /** A user-assigned name for this group, used only for display purposes. */ | 1782 /// A user-assigned name for this group, used only for display purposes. |
| 1668 core.String displayName; | 1783 core.String displayName; |
| 1669 /** | 1784 |
| 1670 * The filter used to determine which monitored resources belong to this | 1785 /// The filter used to determine which monitored resources belong to this |
| 1671 * group. | 1786 /// group. |
| 1672 */ | |
| 1673 core.String filter; | 1787 core.String filter; |
| 1674 /** | 1788 |
| 1675 * If true, the members of this group are considered to be a cluster. The | 1789 /// If true, the members of this group are considered to be a cluster. The |
| 1676 * system can perform additional analysis on groups that are clusters. | 1790 /// system can perform additional analysis on groups that are clusters. |
| 1677 */ | |
| 1678 core.bool isCluster; | 1791 core.bool isCluster; |
| 1679 /** | 1792 |
| 1680 * Output only. The name of this group. The format is | 1793 /// Output only. The name of this group. The format is |
| 1681 * "projects/{project_id_or_number}/groups/{group_id}". When creating a group, | 1794 /// "projects/{project_id_or_number}/groups/{group_id}". When creating a |
| 1682 * this field is ignored and a new name is created consisting of the project | 1795 /// group, this field is ignored and a new name is created consisting of the |
| 1683 * specified in the call to CreateGroup and a unique {group_id} that is | 1796 /// project specified in the call to CreateGroup and a unique {group_id} that |
| 1684 * generated automatically. | 1797 /// is generated automatically. |
| 1685 */ | |
| 1686 core.String name; | 1798 core.String name; |
| 1687 /** | 1799 |
| 1688 * The name of the group's parent, if it has one. The format is | 1800 /// The name of the group's parent, if it has one. The format is |
| 1689 * "projects/{project_id_or_number}/groups/{group_id}". For groups with no | 1801 /// "projects/{project_id_or_number}/groups/{group_id}". For groups with no |
| 1690 * parent, parentName is the empty string, "". | 1802 /// parent, parentName is the empty string, "". |
| 1691 */ | |
| 1692 core.String parentName; | 1803 core.String parentName; |
| 1693 | 1804 |
| 1694 Group(); | 1805 Group(); |
| 1695 | 1806 |
| 1696 Group.fromJson(core.Map _json) { | 1807 Group.fromJson(core.Map _json) { |
| 1697 if (_json.containsKey("displayName")) { | 1808 if (_json.containsKey("displayName")) { |
| 1698 displayName = _json["displayName"]; | 1809 displayName = _json["displayName"]; |
| 1699 } | 1810 } |
| 1700 if (_json.containsKey("filter")) { | 1811 if (_json.containsKey("filter")) { |
| 1701 filter = _json["filter"]; | 1812 filter = _json["filter"]; |
| 1702 } | 1813 } |
| 1703 if (_json.containsKey("isCluster")) { | 1814 if (_json.containsKey("isCluster")) { |
| 1704 isCluster = _json["isCluster"]; | 1815 isCluster = _json["isCluster"]; |
| 1705 } | 1816 } |
| 1706 if (_json.containsKey("name")) { | 1817 if (_json.containsKey("name")) { |
| 1707 name = _json["name"]; | 1818 name = _json["name"]; |
| 1708 } | 1819 } |
| 1709 if (_json.containsKey("parentName")) { | 1820 if (_json.containsKey("parentName")) { |
| 1710 parentName = _json["parentName"]; | 1821 parentName = _json["parentName"]; |
| 1711 } | 1822 } |
| 1712 } | 1823 } |
| 1713 | 1824 |
| 1714 core.Map<core.String, core.Object> toJson() { | 1825 core.Map<core.String, core.Object> toJson() { |
| 1715 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1826 final core.Map<core.String, core.Object> _json = |
| 1827 new core.Map<core.String, core.Object>(); |
| 1716 if (displayName != null) { | 1828 if (displayName != null) { |
| 1717 _json["displayName"] = displayName; | 1829 _json["displayName"] = displayName; |
| 1718 } | 1830 } |
| 1719 if (filter != null) { | 1831 if (filter != null) { |
| 1720 _json["filter"] = filter; | 1832 _json["filter"] = filter; |
| 1721 } | 1833 } |
| 1722 if (isCluster != null) { | 1834 if (isCluster != null) { |
| 1723 _json["isCluster"] = isCluster; | 1835 _json["isCluster"] = isCluster; |
| 1724 } | 1836 } |
| 1725 if (name != null) { | 1837 if (name != null) { |
| 1726 _json["name"] = name; | 1838 _json["name"] = name; |
| 1727 } | 1839 } |
| 1728 if (parentName != null) { | 1840 if (parentName != null) { |
| 1729 _json["parentName"] = parentName; | 1841 _json["parentName"] = parentName; |
| 1730 } | 1842 } |
| 1731 return _json; | 1843 return _json; |
| 1732 } | 1844 } |
| 1733 } | 1845 } |
| 1734 | 1846 |
| 1735 /** A description of a label. */ | 1847 /// A description of a label. |
| 1736 class LabelDescriptor { | 1848 class LabelDescriptor { |
| 1737 /** A human-readable description for the label. */ | 1849 /// A human-readable description for the label. |
| 1738 core.String description; | 1850 core.String description; |
| 1739 /** The label key. */ | 1851 |
| 1852 /// The label key. |
| 1740 core.String key; | 1853 core.String key; |
| 1741 /** | 1854 |
| 1742 * The type of data that can be assigned to the label. | 1855 /// The type of data that can be assigned to the label. |
| 1743 * Possible string values are: | 1856 /// Possible string values are: |
| 1744 * - "STRING" : A variable-length string. This is the default. | 1857 /// - "STRING" : A variable-length string. This is the default. |
| 1745 * - "BOOL" : Boolean; true or false. | 1858 /// - "BOOL" : Boolean; true or false. |
| 1746 * - "INT64" : A 64-bit signed integer. | 1859 /// - "INT64" : A 64-bit signed integer. |
| 1747 */ | |
| 1748 core.String valueType; | 1860 core.String valueType; |
| 1749 | 1861 |
| 1750 LabelDescriptor(); | 1862 LabelDescriptor(); |
| 1751 | 1863 |
| 1752 LabelDescriptor.fromJson(core.Map _json) { | 1864 LabelDescriptor.fromJson(core.Map _json) { |
| 1753 if (_json.containsKey("description")) { | 1865 if (_json.containsKey("description")) { |
| 1754 description = _json["description"]; | 1866 description = _json["description"]; |
| 1755 } | 1867 } |
| 1756 if (_json.containsKey("key")) { | 1868 if (_json.containsKey("key")) { |
| 1757 key = _json["key"]; | 1869 key = _json["key"]; |
| 1758 } | 1870 } |
| 1759 if (_json.containsKey("valueType")) { | 1871 if (_json.containsKey("valueType")) { |
| 1760 valueType = _json["valueType"]; | 1872 valueType = _json["valueType"]; |
| 1761 } | 1873 } |
| 1762 } | 1874 } |
| 1763 | 1875 |
| 1764 core.Map<core.String, core.Object> toJson() { | 1876 core.Map<core.String, core.Object> toJson() { |
| 1765 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1877 final core.Map<core.String, core.Object> _json = |
| 1878 new core.Map<core.String, core.Object>(); |
| 1766 if (description != null) { | 1879 if (description != null) { |
| 1767 _json["description"] = description; | 1880 _json["description"] = description; |
| 1768 } | 1881 } |
| 1769 if (key != null) { | 1882 if (key != null) { |
| 1770 _json["key"] = key; | 1883 _json["key"] = key; |
| 1771 } | 1884 } |
| 1772 if (valueType != null) { | 1885 if (valueType != null) { |
| 1773 _json["valueType"] = valueType; | 1886 _json["valueType"] = valueType; |
| 1774 } | 1887 } |
| 1775 return _json; | 1888 return _json; |
| 1776 } | 1889 } |
| 1777 } | 1890 } |
| 1778 | 1891 |
| 1779 /** | 1892 /// Specifies a linear sequence of buckets that all have the same width (except |
| 1780 * Specifies a linear sequence of buckets that all have the same width (except | 1893 /// overflow and underflow). Each bucket represents a constant absolute |
| 1781 * overflow and underflow). Each bucket represents a constant absolute | 1894 /// uncertainty on the specific value in the bucket.There are |
| 1782 * uncertainty on the specific value in the bucket.There are num_finite_buckets | 1895 /// num_finite_buckets + 2 (= N) buckets. Bucket i has the following |
| 1783 * + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i | 1896 /// boundaries:Upper bound (0 <= i < N-1): offset + (width * i). Lower bound |
| 1784 * < N-1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i | 1897 /// (1 <= i < N): offset + (width * (i - 1)). |
| 1785 * - 1)). | |
| 1786 */ | |
| 1787 class Linear { | 1898 class Linear { |
| 1788 /** Must be greater than 0. */ | 1899 /// Must be greater than 0. |
| 1789 core.int numFiniteBuckets; | 1900 core.int numFiniteBuckets; |
| 1790 /** Lower bound of the first bucket. */ | 1901 |
| 1902 /// Lower bound of the first bucket. |
| 1791 core.double offset; | 1903 core.double offset; |
| 1792 /** Must be greater than 0. */ | 1904 |
| 1905 /// Must be greater than 0. |
| 1793 core.double width; | 1906 core.double width; |
| 1794 | 1907 |
| 1795 Linear(); | 1908 Linear(); |
| 1796 | 1909 |
| 1797 Linear.fromJson(core.Map _json) { | 1910 Linear.fromJson(core.Map _json) { |
| 1798 if (_json.containsKey("numFiniteBuckets")) { | 1911 if (_json.containsKey("numFiniteBuckets")) { |
| 1799 numFiniteBuckets = _json["numFiniteBuckets"]; | 1912 numFiniteBuckets = _json["numFiniteBuckets"]; |
| 1800 } | 1913 } |
| 1801 if (_json.containsKey("offset")) { | 1914 if (_json.containsKey("offset")) { |
| 1802 offset = _json["offset"]; | 1915 offset = _json["offset"]; |
| 1803 } | 1916 } |
| 1804 if (_json.containsKey("width")) { | 1917 if (_json.containsKey("width")) { |
| 1805 width = _json["width"]; | 1918 width = _json["width"]; |
| 1806 } | 1919 } |
| 1807 } | 1920 } |
| 1808 | 1921 |
| 1809 core.Map<core.String, core.Object> toJson() { | 1922 core.Map<core.String, core.Object> toJson() { |
| 1810 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1923 final core.Map<core.String, core.Object> _json = |
| 1924 new core.Map<core.String, core.Object>(); |
| 1811 if (numFiniteBuckets != null) { | 1925 if (numFiniteBuckets != null) { |
| 1812 _json["numFiniteBuckets"] = numFiniteBuckets; | 1926 _json["numFiniteBuckets"] = numFiniteBuckets; |
| 1813 } | 1927 } |
| 1814 if (offset != null) { | 1928 if (offset != null) { |
| 1815 _json["offset"] = offset; | 1929 _json["offset"] = offset; |
| 1816 } | 1930 } |
| 1817 if (width != null) { | 1931 if (width != null) { |
| 1818 _json["width"] = width; | 1932 _json["width"] = width; |
| 1819 } | 1933 } |
| 1820 return _json; | 1934 return _json; |
| 1821 } | 1935 } |
| 1822 } | 1936 } |
| 1823 | 1937 |
| 1824 /** The ListGroupMembers response. */ | 1938 /// The ListGroupMembers response. |
| 1825 class ListGroupMembersResponse { | 1939 class ListGroupMembersResponse { |
| 1826 /** A set of monitored resources in the group. */ | 1940 /// A set of monitored resources in the group. |
| 1827 core.List<MonitoredResource> members; | 1941 core.List<MonitoredResource> members; |
| 1828 /** | 1942 |
| 1829 * If there are more results than have been returned, then this field is set | 1943 /// If there are more results than have been returned, then this field is set |
| 1830 * to a non-empty value. To see the additional results, use that value as | 1944 /// to a non-empty value. To see the additional results, use that value as |
| 1831 * pageToken in the next call to this method. | 1945 /// pageToken in the next call to this method. |
| 1832 */ | |
| 1833 core.String nextPageToken; | 1946 core.String nextPageToken; |
| 1834 /** The total number of elements matching this request. */ | 1947 |
| 1948 /// The total number of elements matching this request. |
| 1835 core.int totalSize; | 1949 core.int totalSize; |
| 1836 | 1950 |
| 1837 ListGroupMembersResponse(); | 1951 ListGroupMembersResponse(); |
| 1838 | 1952 |
| 1839 ListGroupMembersResponse.fromJson(core.Map _json) { | 1953 ListGroupMembersResponse.fromJson(core.Map _json) { |
| 1840 if (_json.containsKey("members")) { | 1954 if (_json.containsKey("members")) { |
| 1841 members = _json["members"].map((value) => new MonitoredResource.fromJson(v
alue)).toList(); | 1955 members = _json["members"] |
| 1956 .map((value) => new MonitoredResource.fromJson(value)) |
| 1957 .toList(); |
| 1842 } | 1958 } |
| 1843 if (_json.containsKey("nextPageToken")) { | 1959 if (_json.containsKey("nextPageToken")) { |
| 1844 nextPageToken = _json["nextPageToken"]; | 1960 nextPageToken = _json["nextPageToken"]; |
| 1845 } | 1961 } |
| 1846 if (_json.containsKey("totalSize")) { | 1962 if (_json.containsKey("totalSize")) { |
| 1847 totalSize = _json["totalSize"]; | 1963 totalSize = _json["totalSize"]; |
| 1848 } | 1964 } |
| 1849 } | 1965 } |
| 1850 | 1966 |
| 1851 core.Map<core.String, core.Object> toJson() { | 1967 core.Map<core.String, core.Object> toJson() { |
| 1852 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1968 final core.Map<core.String, core.Object> _json = |
| 1969 new core.Map<core.String, core.Object>(); |
| 1853 if (members != null) { | 1970 if (members != null) { |
| 1854 _json["members"] = members.map((value) => (value).toJson()).toList(); | 1971 _json["members"] = members.map((value) => (value).toJson()).toList(); |
| 1855 } | 1972 } |
| 1856 if (nextPageToken != null) { | 1973 if (nextPageToken != null) { |
| 1857 _json["nextPageToken"] = nextPageToken; | 1974 _json["nextPageToken"] = nextPageToken; |
| 1858 } | 1975 } |
| 1859 if (totalSize != null) { | 1976 if (totalSize != null) { |
| 1860 _json["totalSize"] = totalSize; | 1977 _json["totalSize"] = totalSize; |
| 1861 } | 1978 } |
| 1862 return _json; | 1979 return _json; |
| 1863 } | 1980 } |
| 1864 } | 1981 } |
| 1865 | 1982 |
| 1866 /** The ListGroups response. */ | 1983 /// The ListGroups response. |
| 1867 class ListGroupsResponse { | 1984 class ListGroupsResponse { |
| 1868 /** The groups that match the specified filters. */ | 1985 /// The groups that match the specified filters. |
| 1869 core.List<Group> group; | 1986 core.List<Group> group; |
| 1870 /** | 1987 |
| 1871 * If there are more results than have been returned, then this field is set | 1988 /// If there are more results than have been returned, then this field is set |
| 1872 * to a non-empty value. To see the additional results, use that value as | 1989 /// to a non-empty value. To see the additional results, use that value as |
| 1873 * pageToken in the next call to this method. | 1990 /// pageToken in the next call to this method. |
| 1874 */ | |
| 1875 core.String nextPageToken; | 1991 core.String nextPageToken; |
| 1876 | 1992 |
| 1877 ListGroupsResponse(); | 1993 ListGroupsResponse(); |
| 1878 | 1994 |
| 1879 ListGroupsResponse.fromJson(core.Map _json) { | 1995 ListGroupsResponse.fromJson(core.Map _json) { |
| 1880 if (_json.containsKey("group")) { | 1996 if (_json.containsKey("group")) { |
| 1881 group = _json["group"].map((value) => new Group.fromJson(value)).toList(); | 1997 group = _json["group"].map((value) => new Group.fromJson(value)).toList(); |
| 1882 } | 1998 } |
| 1883 if (_json.containsKey("nextPageToken")) { | 1999 if (_json.containsKey("nextPageToken")) { |
| 1884 nextPageToken = _json["nextPageToken"]; | 2000 nextPageToken = _json["nextPageToken"]; |
| 1885 } | 2001 } |
| 1886 } | 2002 } |
| 1887 | 2003 |
| 1888 core.Map<core.String, core.Object> toJson() { | 2004 core.Map<core.String, core.Object> toJson() { |
| 1889 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2005 final core.Map<core.String, core.Object> _json = |
| 2006 new core.Map<core.String, core.Object>(); |
| 1890 if (group != null) { | 2007 if (group != null) { |
| 1891 _json["group"] = group.map((value) => (value).toJson()).toList(); | 2008 _json["group"] = group.map((value) => (value).toJson()).toList(); |
| 1892 } | 2009 } |
| 1893 if (nextPageToken != null) { | 2010 if (nextPageToken != null) { |
| 1894 _json["nextPageToken"] = nextPageToken; | 2011 _json["nextPageToken"] = nextPageToken; |
| 1895 } | 2012 } |
| 1896 return _json; | 2013 return _json; |
| 1897 } | 2014 } |
| 1898 } | 2015 } |
| 1899 | 2016 |
| 1900 /** The ListMetricDescriptors response. */ | 2017 /// The ListMetricDescriptors response. |
| 1901 class ListMetricDescriptorsResponse { | 2018 class ListMetricDescriptorsResponse { |
| 1902 /** | 2019 /// The metric descriptors that are available to the project and that match |
| 1903 * The metric descriptors that are available to the project and that match the | 2020 /// the value of filter, if present. |
| 1904 * value of filter, if present. | |
| 1905 */ | |
| 1906 core.List<MetricDescriptor> metricDescriptors; | 2021 core.List<MetricDescriptor> metricDescriptors; |
| 1907 /** | 2022 |
| 1908 * If there are more results than have been returned, then this field is set | 2023 /// If there are more results than have been returned, then this field is set |
| 1909 * to a non-empty value. To see the additional results, use that value as | 2024 /// to a non-empty value. To see the additional results, use that value as |
| 1910 * pageToken in the next call to this method. | 2025 /// pageToken in the next call to this method. |
| 1911 */ | |
| 1912 core.String nextPageToken; | 2026 core.String nextPageToken; |
| 1913 | 2027 |
| 1914 ListMetricDescriptorsResponse(); | 2028 ListMetricDescriptorsResponse(); |
| 1915 | 2029 |
| 1916 ListMetricDescriptorsResponse.fromJson(core.Map _json) { | 2030 ListMetricDescriptorsResponse.fromJson(core.Map _json) { |
| 1917 if (_json.containsKey("metricDescriptors")) { | 2031 if (_json.containsKey("metricDescriptors")) { |
| 1918 metricDescriptors = _json["metricDescriptors"].map((value) => new MetricDe
scriptor.fromJson(value)).toList(); | 2032 metricDescriptors = _json["metricDescriptors"] |
| 2033 .map((value) => new MetricDescriptor.fromJson(value)) |
| 2034 .toList(); |
| 1919 } | 2035 } |
| 1920 if (_json.containsKey("nextPageToken")) { | 2036 if (_json.containsKey("nextPageToken")) { |
| 1921 nextPageToken = _json["nextPageToken"]; | 2037 nextPageToken = _json["nextPageToken"]; |
| 1922 } | 2038 } |
| 1923 } | 2039 } |
| 1924 | 2040 |
| 1925 core.Map<core.String, core.Object> toJson() { | 2041 core.Map<core.String, core.Object> toJson() { |
| 1926 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2042 final core.Map<core.String, core.Object> _json = |
| 2043 new core.Map<core.String, core.Object>(); |
| 1927 if (metricDescriptors != null) { | 2044 if (metricDescriptors != null) { |
| 1928 _json["metricDescriptors"] = metricDescriptors.map((value) => (value).toJs
on()).toList(); | 2045 _json["metricDescriptors"] = |
| 2046 metricDescriptors.map((value) => (value).toJson()).toList(); |
| 1929 } | 2047 } |
| 1930 if (nextPageToken != null) { | 2048 if (nextPageToken != null) { |
| 1931 _json["nextPageToken"] = nextPageToken; | 2049 _json["nextPageToken"] = nextPageToken; |
| 1932 } | 2050 } |
| 1933 return _json; | 2051 return _json; |
| 1934 } | 2052 } |
| 1935 } | 2053 } |
| 1936 | 2054 |
| 1937 /** The ListMonitoredResourceDescriptors response. */ | 2055 /// The ListMonitoredResourceDescriptors response. |
| 1938 class ListMonitoredResourceDescriptorsResponse { | 2056 class ListMonitoredResourceDescriptorsResponse { |
| 1939 /** | 2057 /// If there are more results than have been returned, then this field is set |
| 1940 * If there are more results than have been returned, then this field is set | 2058 /// to a non-empty value. To see the additional results, use that value as |
| 1941 * to a non-empty value. To see the additional results, use that value as | 2059 /// pageToken in the next call to this method. |
| 1942 * pageToken in the next call to this method. | |
| 1943 */ | |
| 1944 core.String nextPageToken; | 2060 core.String nextPageToken; |
| 1945 /** | 2061 |
| 1946 * The monitored resource descriptors that are available to this project and | 2062 /// The monitored resource descriptors that are available to this project and |
| 1947 * that match filter, if present. | 2063 /// that match filter, if present. |
| 1948 */ | |
| 1949 core.List<MonitoredResourceDescriptor> resourceDescriptors; | 2064 core.List<MonitoredResourceDescriptor> resourceDescriptors; |
| 1950 | 2065 |
| 1951 ListMonitoredResourceDescriptorsResponse(); | 2066 ListMonitoredResourceDescriptorsResponse(); |
| 1952 | 2067 |
| 1953 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) { | 2068 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) { |
| 1954 if (_json.containsKey("nextPageToken")) { | 2069 if (_json.containsKey("nextPageToken")) { |
| 1955 nextPageToken = _json["nextPageToken"]; | 2070 nextPageToken = _json["nextPageToken"]; |
| 1956 } | 2071 } |
| 1957 if (_json.containsKey("resourceDescriptors")) { | 2072 if (_json.containsKey("resourceDescriptors")) { |
| 1958 resourceDescriptors = _json["resourceDescriptors"].map((value) => new Moni
toredResourceDescriptor.fromJson(value)).toList(); | 2073 resourceDescriptors = _json["resourceDescriptors"] |
| 2074 .map((value) => new MonitoredResourceDescriptor.fromJson(value)) |
| 2075 .toList(); |
| 1959 } | 2076 } |
| 1960 } | 2077 } |
| 1961 | 2078 |
| 1962 core.Map<core.String, core.Object> toJson() { | 2079 core.Map<core.String, core.Object> toJson() { |
| 1963 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2080 final core.Map<core.String, core.Object> _json = |
| 2081 new core.Map<core.String, core.Object>(); |
| 1964 if (nextPageToken != null) { | 2082 if (nextPageToken != null) { |
| 1965 _json["nextPageToken"] = nextPageToken; | 2083 _json["nextPageToken"] = nextPageToken; |
| 1966 } | 2084 } |
| 1967 if (resourceDescriptors != null) { | 2085 if (resourceDescriptors != null) { |
| 1968 _json["resourceDescriptors"] = resourceDescriptors.map((value) => (value).
toJson()).toList(); | 2086 _json["resourceDescriptors"] = |
| 2087 resourceDescriptors.map((value) => (value).toJson()).toList(); |
| 1969 } | 2088 } |
| 1970 return _json; | 2089 return _json; |
| 1971 } | 2090 } |
| 1972 } | 2091 } |
| 1973 | 2092 |
| 1974 /** The ListTimeSeries response. */ | 2093 /// The ListTimeSeries response. |
| 1975 class ListTimeSeriesResponse { | 2094 class ListTimeSeriesResponse { |
| 1976 /** | 2095 /// If there are more results than have been returned, then this field is set |
| 1977 * If there are more results than have been returned, then this field is set | 2096 /// to a non-empty value. To see the additional results, use that value as |
| 1978 * to a non-empty value. To see the additional results, use that value as | 2097 /// pageToken in the next call to this method. |
| 1979 * pageToken in the next call to this method. | |
| 1980 */ | |
| 1981 core.String nextPageToken; | 2098 core.String nextPageToken; |
| 1982 /** One or more time series that match the filter included in the request. */ | 2099 |
| 2100 /// One or more time series that match the filter included in the request. |
| 1983 core.List<TimeSeries> timeSeries; | 2101 core.List<TimeSeries> timeSeries; |
| 1984 | 2102 |
| 1985 ListTimeSeriesResponse(); | 2103 ListTimeSeriesResponse(); |
| 1986 | 2104 |
| 1987 ListTimeSeriesResponse.fromJson(core.Map _json) { | 2105 ListTimeSeriesResponse.fromJson(core.Map _json) { |
| 1988 if (_json.containsKey("nextPageToken")) { | 2106 if (_json.containsKey("nextPageToken")) { |
| 1989 nextPageToken = _json["nextPageToken"]; | 2107 nextPageToken = _json["nextPageToken"]; |
| 1990 } | 2108 } |
| 1991 if (_json.containsKey("timeSeries")) { | 2109 if (_json.containsKey("timeSeries")) { |
| 1992 timeSeries = _json["timeSeries"].map((value) => new TimeSeries.fromJson(va
lue)).toList(); | 2110 timeSeries = _json["timeSeries"] |
| 2111 .map((value) => new TimeSeries.fromJson(value)) |
| 2112 .toList(); |
| 1993 } | 2113 } |
| 1994 } | 2114 } |
| 1995 | 2115 |
| 1996 core.Map<core.String, core.Object> toJson() { | 2116 core.Map<core.String, core.Object> toJson() { |
| 1997 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2117 final core.Map<core.String, core.Object> _json = |
| 2118 new core.Map<core.String, core.Object>(); |
| 1998 if (nextPageToken != null) { | 2119 if (nextPageToken != null) { |
| 1999 _json["nextPageToken"] = nextPageToken; | 2120 _json["nextPageToken"] = nextPageToken; |
| 2000 } | 2121 } |
| 2001 if (timeSeries != null) { | 2122 if (timeSeries != null) { |
| 2002 _json["timeSeries"] = timeSeries.map((value) => (value).toJson()).toList()
; | 2123 _json["timeSeries"] = |
| 2124 timeSeries.map((value) => (value).toJson()).toList(); |
| 2003 } | 2125 } |
| 2004 return _json; | 2126 return _json; |
| 2005 } | 2127 } |
| 2006 } | 2128 } |
| 2007 | 2129 |
| 2008 /** | 2130 /// A specific metric, identified by specifying values for all of the labels of |
| 2009 * A specific metric, identified by specifying values for all of the labels of a | 2131 /// a MetricDescriptor. |
| 2010 * MetricDescriptor. | |
| 2011 */ | |
| 2012 class Metric { | 2132 class Metric { |
| 2013 /** | 2133 /// The set of label values that uniquely identify this metric. All labels |
| 2014 * The set of label values that uniquely identify this metric. All labels | 2134 /// listed in the MetricDescriptor must be assigned values. |
| 2015 * listed in the MetricDescriptor must be assigned values. | |
| 2016 */ | |
| 2017 core.Map<core.String, core.String> labels; | 2135 core.Map<core.String, core.String> labels; |
| 2018 /** | 2136 |
| 2019 * An existing metric type, see google.api.MetricDescriptor. For example, | 2137 /// An existing metric type, see google.api.MetricDescriptor. For example, |
| 2020 * custom.googleapis.com/invoice/paid/amount. | 2138 /// custom.googleapis.com/invoice/paid/amount. |
| 2021 */ | |
| 2022 core.String type; | 2139 core.String type; |
| 2023 | 2140 |
| 2024 Metric(); | 2141 Metric(); |
| 2025 | 2142 |
| 2026 Metric.fromJson(core.Map _json) { | 2143 Metric.fromJson(core.Map _json) { |
| 2027 if (_json.containsKey("labels")) { | 2144 if (_json.containsKey("labels")) { |
| 2028 labels = _json["labels"]; | 2145 labels = _json["labels"]; |
| 2029 } | 2146 } |
| 2030 if (_json.containsKey("type")) { | 2147 if (_json.containsKey("type")) { |
| 2031 type = _json["type"]; | 2148 type = _json["type"]; |
| 2032 } | 2149 } |
| 2033 } | 2150 } |
| 2034 | 2151 |
| 2035 core.Map<core.String, core.Object> toJson() { | 2152 core.Map<core.String, core.Object> toJson() { |
| 2036 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2153 final core.Map<core.String, core.Object> _json = |
| 2154 new core.Map<core.String, core.Object>(); |
| 2037 if (labels != null) { | 2155 if (labels != null) { |
| 2038 _json["labels"] = labels; | 2156 _json["labels"] = labels; |
| 2039 } | 2157 } |
| 2040 if (type != null) { | 2158 if (type != null) { |
| 2041 _json["type"] = type; | 2159 _json["type"] = type; |
| 2042 } | 2160 } |
| 2043 return _json; | 2161 return _json; |
| 2044 } | 2162 } |
| 2045 } | 2163 } |
| 2046 | 2164 |
| 2047 /** | 2165 /// Defines a metric type and its schema. Once a metric descriptor is created, |
| 2048 * Defines a metric type and its schema. Once a metric descriptor is created, | 2166 /// deleting or altering it stops data collection and makes the metric type's |
| 2049 * deleting or altering it stops data collection and makes the metric type's | 2167 /// existing data unusable. |
| 2050 * existing data unusable. | |
| 2051 */ | |
| 2052 class MetricDescriptor { | 2168 class MetricDescriptor { |
| 2053 /** | 2169 /// A detailed description of the metric, which can be used in documentation. |
| 2054 * A detailed description of the metric, which can be used in documentation. | |
| 2055 */ | |
| 2056 core.String description; | 2170 core.String description; |
| 2057 /** | 2171 |
| 2058 * A concise name for the metric, which can be displayed in user interfaces. | 2172 /// A concise name for the metric, which can be displayed in user interfaces. |
| 2059 * Use sentence case without an ending period, for example "Request count". | 2173 /// Use sentence case without an ending period, for example "Request count". |
| 2060 */ | |
| 2061 core.String displayName; | 2174 core.String displayName; |
| 2062 /** | 2175 |
| 2063 * The set of labels that can be used to describe a specific instance of this | 2176 /// The set of labels that can be used to describe a specific instance of |
| 2064 * metric type. For example, the | 2177 /// this metric type. For example, the |
| 2065 * appengine.googleapis.com/http/server/response_latencies metric type has a | 2178 /// appengine.googleapis.com/http/server/response_latencies metric type has a |
| 2066 * label for the HTTP response code, response_code, so you can look at | 2179 /// label for the HTTP response code, response_code, so you can look at |
| 2067 * latencies for successful responses or just for responses that failed. | 2180 /// latencies for successful responses or just for responses that failed. |
| 2068 */ | |
| 2069 core.List<LabelDescriptor> labels; | 2181 core.List<LabelDescriptor> labels; |
| 2070 /** | 2182 |
| 2071 * Whether the metric records instantaneous values, changes to a value, etc. | 2183 /// Whether the metric records instantaneous values, changes to a value, etc. |
| 2072 * Some combinations of metric_kind and value_type might not be supported. | 2184 /// Some combinations of metric_kind and value_type might not be supported. |
| 2073 * Possible string values are: | 2185 /// Possible string values are: |
| 2074 * - "METRIC_KIND_UNSPECIFIED" : Do not use this default value. | 2186 /// - "METRIC_KIND_UNSPECIFIED" : Do not use this default value. |
| 2075 * - "GAUGE" : An instantaneous measurement of a value. | 2187 /// - "GAUGE" : An instantaneous measurement of a value. |
| 2076 * - "DELTA" : The change in a value during a time interval. | 2188 /// - "DELTA" : The change in a value during a time interval. |
| 2077 * - "CUMULATIVE" : A value accumulated over a time interval. Cumulative | 2189 /// - "CUMULATIVE" : A value accumulated over a time interval. Cumulative |
| 2078 * measurements in a time series should have the same start time and | 2190 /// measurements in a time series should have the same start time and |
| 2079 * increasing end times, until an event resets the cumulative value to zero | 2191 /// increasing end times, until an event resets the cumulative value to zero |
| 2080 * and sets a new start time for the following points. | 2192 /// and sets a new start time for the following points. |
| 2081 */ | |
| 2082 core.String metricKind; | 2193 core.String metricKind; |
| 2083 /** | 2194 |
| 2084 * The resource name of the metric descriptor. Depending on the | 2195 /// The resource name of the metric descriptor. Depending on the |
| 2085 * implementation, the name typically includes: (1) the parent resource name | 2196 /// implementation, the name typically includes: (1) the parent resource name |
| 2086 * that defines the scope of the metric type or of its data; and (2) the | 2197 /// that defines the scope of the metric type or of its data; and (2) the |
| 2087 * metric's URL-encoded type, which also appears in the type field of this | 2198 /// metric's URL-encoded type, which also appears in the type field of this |
| 2088 * descriptor. For example, following is the resource name of a custom metric | 2199 /// descriptor. For example, following is the resource name of a custom |
| 2089 * within the GCP project my-project-id: | 2200 /// metric within the GCP project my-project-id: |
| 2090 * "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2
Fpaid%2Famount" | 2201 /// "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%
2Fpaid%2Famount" |
| 2091 */ | |
| 2092 core.String name; | 2202 core.String name; |
| 2093 /** | 2203 |
| 2094 * The metric type, including its DNS name prefix. The type is not | 2204 /// The metric type, including its DNS name prefix. The type is not |
| 2095 * URL-encoded. All user-defined custom metric types have the DNS name | 2205 /// URL-encoded. All user-defined custom metric types have the DNS name |
| 2096 * custom.googleapis.com. Metric types should use a natural hierarchical | 2206 /// custom.googleapis.com. Metric types should use a natural hierarchical |
| 2097 * grouping. For example: | 2207 /// grouping. For example: |
| 2098 * "custom.googleapis.com/invoice/paid/amount" | 2208 /// "custom.googleapis.com/invoice/paid/amount" |
| 2099 * "appengine.googleapis.com/http/server/response_latencies" | 2209 /// "appengine.googleapis.com/http/server/response_latencies" |
| 2100 */ | |
| 2101 core.String type; | 2210 core.String type; |
| 2102 /** | 2211 |
| 2103 * The unit in which the metric value is reported. It is only applicable if | 2212 /// The unit in which the metric value is reported. It is only applicable if |
| 2104 * the value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a | 2213 /// the value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are |
| 2105 * subset of The Unified Code for Units of Measure | 2214 /// a subset of The Unified Code for Units of Measure |
| 2106 * (http://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT) | 2215 /// (http://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT) |
| 2107 * bit bit | 2216 /// bit bit |
| 2108 * By byte | 2217 /// By byte |
| 2109 * s second | 2218 /// s second |
| 2110 * min minute | 2219 /// min minute |
| 2111 * h hour | 2220 /// h hour |
| 2112 * d dayPrefixes (PREFIX) | 2221 /// d dayPrefixes (PREFIX) |
| 2113 * k kilo (10**3) | 2222 /// k kilo (10**3) |
| 2114 * M mega (10**6) | 2223 /// M mega (10**6) |
| 2115 * G giga (10**9) | 2224 /// G giga (10**9) |
| 2116 * T tera (10**12) | 2225 /// T tera (10**12) |
| 2117 * P peta (10**15) | 2226 /// P peta (10**15) |
| 2118 * E exa (10**18) | 2227 /// E exa (10**18) |
| 2119 * Z zetta (10**21) | 2228 /// Z zetta (10**21) |
| 2120 * Y yotta (10**24) | 2229 /// Y yotta (10**24) |
| 2121 * m milli (10**-3) | 2230 /// m milli (10**-3) |
| 2122 * u micro (10**-6) | 2231 /// u micro (10**-6) |
| 2123 * n nano (10**-9) | 2232 /// n nano (10**-9) |
| 2124 * p pico (10**-12) | 2233 /// p pico (10**-12) |
| 2125 * f femto (10**-15) | 2234 /// f femto (10**-15) |
| 2126 * a atto (10**-18) | 2235 /// a atto (10**-18) |
| 2127 * z zepto (10**-21) | 2236 /// z zepto (10**-21) |
| 2128 * y yocto (10**-24) | 2237 /// y yocto (10**-24) |
| 2129 * Ki kibi (2**10) | 2238 /// Ki kibi (2**10) |
| 2130 * Mi mebi (2**20) | 2239 /// Mi mebi (2**20) |
| 2131 * Gi gibi (2**30) | 2240 /// Gi gibi (2**30) |
| 2132 * Ti tebi (2**40)GrammarThe grammar includes the dimensionless unit 1, such | 2241 /// Ti tebi (2**40)GrammarThe grammar includes the dimensionless unit 1, such |
| 2133 * as 1/s.The grammar also includes these connectors: | 2242 /// as 1/s.The grammar also includes these connectors: |
| 2134 * / division (as an infix operator, e.g. 1/s). | 2243 /// / division (as an infix operator, e.g. 1/s). |
| 2135 * . multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit | 2244 /// . multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit |
| 2136 * is as follows: | 2245 /// is as follows: |
| 2137 * Expression = Component { "." Component } { "/" Component } ; | 2246 /// Expression = Component { "." Component } { "/" Component } ; |
| 2138 * | 2247 /// |
| 2139 * Component = [ PREFIX ] UNIT [ Annotation ] | 2248 /// Component = [ PREFIX ] UNIT [ Annotation ] |
| 2140 * | Annotation | 2249 /// | Annotation |
| 2141 * | "1" | 2250 /// | "1" |
| 2142 * ; | 2251 /// ; |
| 2143 * | 2252 /// |
| 2144 * Annotation = "{" NAME "}" ; | 2253 /// Annotation = "{" NAME "}" ; |
| 2145 * Notes: | 2254 /// Notes: |
| 2146 * Annotation is just a comment if it follows a UNIT and is equivalent to 1 | 2255 /// Annotation is just a comment if it follows a UNIT and is equivalent to 1 |
| 2147 * if it is used alone. For examples, {requests}/s == 1/s, By{transmitted}/s | 2256 /// if it is used alone. For examples, {requests}/s == 1/s, |
| 2148 * == By/s. | 2257 /// By{transmitted}/s == By/s. |
| 2149 * NAME is a sequence of non-blank printable ASCII characters not containing | 2258 /// NAME is a sequence of non-blank printable ASCII characters not |
| 2150 * '{' or '}'. | 2259 /// containing '{' or '}'. |
| 2151 */ | |
| 2152 core.String unit; | 2260 core.String unit; |
| 2153 /** | 2261 |
| 2154 * Whether the measurement is an integer, a floating-point number, etc. Some | 2262 /// Whether the measurement is an integer, a floating-point number, etc. Some |
| 2155 * combinations of metric_kind and value_type might not be supported. | 2263 /// combinations of metric_kind and value_type might not be supported. |
| 2156 * Possible string values are: | 2264 /// Possible string values are: |
| 2157 * - "VALUE_TYPE_UNSPECIFIED" : Do not use this default value. | 2265 /// - "VALUE_TYPE_UNSPECIFIED" : Do not use this default value. |
| 2158 * - "BOOL" : The value is a boolean. This value type can be used only if the | 2266 /// - "BOOL" : The value is a boolean. This value type can be used only if |
| 2159 * metric kind is GAUGE. | 2267 /// the metric kind is GAUGE. |
| 2160 * - "INT64" : The value is a signed 64-bit integer. | 2268 /// - "INT64" : The value is a signed 64-bit integer. |
| 2161 * - "DOUBLE" : The value is a double precision floating point number. | 2269 /// - "DOUBLE" : The value is a double precision floating point number. |
| 2162 * - "STRING" : The value is a text string. This value type can be used only | 2270 /// - "STRING" : The value is a text string. This value type can be used only |
| 2163 * if the metric kind is GAUGE. | 2271 /// if the metric kind is GAUGE. |
| 2164 * - "DISTRIBUTION" : The value is a Distribution. | 2272 /// - "DISTRIBUTION" : The value is a Distribution. |
| 2165 * - "MONEY" : The value is money. | 2273 /// - "MONEY" : The value is money. |
| 2166 */ | |
| 2167 core.String valueType; | 2274 core.String valueType; |
| 2168 | 2275 |
| 2169 MetricDescriptor(); | 2276 MetricDescriptor(); |
| 2170 | 2277 |
| 2171 MetricDescriptor.fromJson(core.Map _json) { | 2278 MetricDescriptor.fromJson(core.Map _json) { |
| 2172 if (_json.containsKey("description")) { | 2279 if (_json.containsKey("description")) { |
| 2173 description = _json["description"]; | 2280 description = _json["description"]; |
| 2174 } | 2281 } |
| 2175 if (_json.containsKey("displayName")) { | 2282 if (_json.containsKey("displayName")) { |
| 2176 displayName = _json["displayName"]; | 2283 displayName = _json["displayName"]; |
| 2177 } | 2284 } |
| 2178 if (_json.containsKey("labels")) { | 2285 if (_json.containsKey("labels")) { |
| 2179 labels = _json["labels"].map((value) => new LabelDescriptor.fromJson(value
)).toList(); | 2286 labels = _json["labels"] |
| 2287 .map((value) => new LabelDescriptor.fromJson(value)) |
| 2288 .toList(); |
| 2180 } | 2289 } |
| 2181 if (_json.containsKey("metricKind")) { | 2290 if (_json.containsKey("metricKind")) { |
| 2182 metricKind = _json["metricKind"]; | 2291 metricKind = _json["metricKind"]; |
| 2183 } | 2292 } |
| 2184 if (_json.containsKey("name")) { | 2293 if (_json.containsKey("name")) { |
| 2185 name = _json["name"]; | 2294 name = _json["name"]; |
| 2186 } | 2295 } |
| 2187 if (_json.containsKey("type")) { | 2296 if (_json.containsKey("type")) { |
| 2188 type = _json["type"]; | 2297 type = _json["type"]; |
| 2189 } | 2298 } |
| 2190 if (_json.containsKey("unit")) { | 2299 if (_json.containsKey("unit")) { |
| 2191 unit = _json["unit"]; | 2300 unit = _json["unit"]; |
| 2192 } | 2301 } |
| 2193 if (_json.containsKey("valueType")) { | 2302 if (_json.containsKey("valueType")) { |
| 2194 valueType = _json["valueType"]; | 2303 valueType = _json["valueType"]; |
| 2195 } | 2304 } |
| 2196 } | 2305 } |
| 2197 | 2306 |
| 2198 core.Map<core.String, core.Object> toJson() { | 2307 core.Map<core.String, core.Object> toJson() { |
| 2199 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2308 final core.Map<core.String, core.Object> _json = |
| 2309 new core.Map<core.String, core.Object>(); |
| 2200 if (description != null) { | 2310 if (description != null) { |
| 2201 _json["description"] = description; | 2311 _json["description"] = description; |
| 2202 } | 2312 } |
| 2203 if (displayName != null) { | 2313 if (displayName != null) { |
| 2204 _json["displayName"] = displayName; | 2314 _json["displayName"] = displayName; |
| 2205 } | 2315 } |
| 2206 if (labels != null) { | 2316 if (labels != null) { |
| 2207 _json["labels"] = labels.map((value) => (value).toJson()).toList(); | 2317 _json["labels"] = labels.map((value) => (value).toJson()).toList(); |
| 2208 } | 2318 } |
| 2209 if (metricKind != null) { | 2319 if (metricKind != null) { |
| 2210 _json["metricKind"] = metricKind; | 2320 _json["metricKind"] = metricKind; |
| 2211 } | 2321 } |
| 2212 if (name != null) { | 2322 if (name != null) { |
| 2213 _json["name"] = name; | 2323 _json["name"] = name; |
| 2214 } | 2324 } |
| 2215 if (type != null) { | 2325 if (type != null) { |
| 2216 _json["type"] = type; | 2326 _json["type"] = type; |
| 2217 } | 2327 } |
| 2218 if (unit != null) { | 2328 if (unit != null) { |
| 2219 _json["unit"] = unit; | 2329 _json["unit"] = unit; |
| 2220 } | 2330 } |
| 2221 if (valueType != null) { | 2331 if (valueType != null) { |
| 2222 _json["valueType"] = valueType; | 2332 _json["valueType"] = valueType; |
| 2223 } | 2333 } |
| 2224 return _json; | 2334 return _json; |
| 2225 } | 2335 } |
| 2226 } | 2336 } |
| 2227 | 2337 |
| 2228 /** | 2338 /// An object representing a resource that can be used for monitoring, logging, |
| 2229 * An object representing a resource that can be used for monitoring, logging, | 2339 /// billing, or other purposes. Examples include virtual machine instances, |
| 2230 * billing, or other purposes. Examples include virtual machine instances, | 2340 /// databases, and storage devices such as disks. The type field identifies a |
| 2231 * databases, and storage devices such as disks. The type field identifies a | 2341 /// MonitoredResourceDescriptor object that describes the resource's schema. |
| 2232 * MonitoredResourceDescriptor object that describes the resource's schema. | 2342 /// Information in the labels field identifies the actual resource and its |
| 2233 * Information in the labels field identifies the actual resource and its | 2343 /// attributes according to the schema. For example, a particular Compute |
| 2234 * attributes according to the schema. For example, a particular Compute Engine | 2344 /// Engine VM instance could be represented by the following object, because |
| 2235 * VM instance could be represented by the following object, because the | 2345 /// the MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" |
| 2236 * MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and | 2346 /// and "zone": |
| 2237 * "zone": | 2347 /// { "type": "gce_instance", |
| 2238 * { "type": "gce_instance", | 2348 /// "labels": { "instance_id": "12345678901234", |
| 2239 * "labels": { "instance_id": "12345678901234", | 2349 /// "zone": "us-central1-a" }} |
| 2240 * "zone": "us-central1-a" }} | |
| 2241 */ | |
| 2242 class MonitoredResource { | 2350 class MonitoredResource { |
| 2243 /** | 2351 /// Required. Values for all of the labels listed in the associated monitored |
| 2244 * Required. Values for all of the labels listed in the associated monitored | 2352 /// resource descriptor. For example, Compute Engine VM instances use the |
| 2245 * resource descriptor. For example, Compute Engine VM instances use the | 2353 /// labels "project_id", "instance_id", and "zone". |
| 2246 * labels "project_id", "instance_id", and "zone". | |
| 2247 */ | |
| 2248 core.Map<core.String, core.String> labels; | 2354 core.Map<core.String, core.String> labels; |
| 2249 /** | 2355 |
| 2250 * Required. The monitored resource type. This field must match the type field | 2356 /// Required. The monitored resource type. This field must match the type |
| 2251 * of a MonitoredResourceDescriptor object. For example, the type of a Compute | 2357 /// field of a MonitoredResourceDescriptor object. For example, the type of a |
| 2252 * Engine VM instance is gce_instance. | 2358 /// Compute Engine VM instance is gce_instance. |
| 2253 */ | |
| 2254 core.String type; | 2359 core.String type; |
| 2255 | 2360 |
| 2256 MonitoredResource(); | 2361 MonitoredResource(); |
| 2257 | 2362 |
| 2258 MonitoredResource.fromJson(core.Map _json) { | 2363 MonitoredResource.fromJson(core.Map _json) { |
| 2259 if (_json.containsKey("labels")) { | 2364 if (_json.containsKey("labels")) { |
| 2260 labels = _json["labels"]; | 2365 labels = _json["labels"]; |
| 2261 } | 2366 } |
| 2262 if (_json.containsKey("type")) { | 2367 if (_json.containsKey("type")) { |
| 2263 type = _json["type"]; | 2368 type = _json["type"]; |
| 2264 } | 2369 } |
| 2265 } | 2370 } |
| 2266 | 2371 |
| 2267 core.Map<core.String, core.Object> toJson() { | 2372 core.Map<core.String, core.Object> toJson() { |
| 2268 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2373 final core.Map<core.String, core.Object> _json = |
| 2374 new core.Map<core.String, core.Object>(); |
| 2269 if (labels != null) { | 2375 if (labels != null) { |
| 2270 _json["labels"] = labels; | 2376 _json["labels"] = labels; |
| 2271 } | 2377 } |
| 2272 if (type != null) { | 2378 if (type != null) { |
| 2273 _json["type"] = type; | 2379 _json["type"] = type; |
| 2274 } | 2380 } |
| 2275 return _json; | 2381 return _json; |
| 2276 } | 2382 } |
| 2277 } | 2383 } |
| 2278 | 2384 |
| 2279 /** | 2385 /// An object that describes the schema of a MonitoredResource object using a |
| 2280 * An object that describes the schema of a MonitoredResource object using a | 2386 /// type name and a set of labels. For example, the monitored resource |
| 2281 * type name and a set of labels. For example, the monitored resource descriptor | 2387 /// descriptor for Google Compute Engine VM instances has a type of |
| 2282 * for Google Compute Engine VM instances has a type of "gce_instance" and | 2388 /// "gce_instance" and specifies the use of the labels "instance_id" and "zone" |
| 2283 * specifies the use of the labels "instance_id" and "zone" to identify | 2389 /// to identify particular VM instances.Different APIs can support different |
| 2284 * particular VM instances.Different APIs can support different monitored | 2390 /// monitored resource types. APIs generally provide a list method that returns |
| 2285 * resource types. APIs generally provide a list method that returns the | 2391 /// the monitored resource descriptors used by the API. |
| 2286 * monitored resource descriptors used by the API. | |
| 2287 */ | |
| 2288 class MonitoredResourceDescriptor { | 2392 class MonitoredResourceDescriptor { |
| 2289 /** | 2393 /// Optional. A detailed description of the monitored resource type that |
| 2290 * Optional. A detailed description of the monitored resource type that might | 2394 /// might be used in documentation. |
| 2291 * be used in documentation. | |
| 2292 */ | |
| 2293 core.String description; | 2395 core.String description; |
| 2294 /** | 2396 |
| 2295 * Optional. A concise name for the monitored resource type that might be | 2397 /// Optional. A concise name for the monitored resource type that might be |
| 2296 * displayed in user interfaces. It should be a Title Cased Noun Phrase, | 2398 /// displayed in user interfaces. It should be a Title Cased Noun Phrase, |
| 2297 * without any article or other determiners. For example, "Google Cloud SQL | 2399 /// without any article or other determiners. For example, "Google Cloud SQL |
| 2298 * Database". | 2400 /// Database". |
| 2299 */ | |
| 2300 core.String displayName; | 2401 core.String displayName; |
| 2301 /** | 2402 |
| 2302 * Required. A set of labels used to describe instances of this monitored | 2403 /// Required. A set of labels used to describe instances of this monitored |
| 2303 * resource type. For example, an individual Google Cloud SQL database is | 2404 /// resource type. For example, an individual Google Cloud SQL database is |
| 2304 * identified by values for the labels "database_id" and "zone". | 2405 /// identified by values for the labels "database_id" and "zone". |
| 2305 */ | |
| 2306 core.List<LabelDescriptor> labels; | 2406 core.List<LabelDescriptor> labels; |
| 2307 /** | 2407 |
| 2308 * Optional. The resource name of the monitored resource descriptor: | 2408 /// Optional. The resource name of the monitored resource descriptor: |
| 2309 * "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is | 2409 /// "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} |
| 2310 * the value of the type field in this object and {project_id} is a project ID | 2410 /// is the value of the type field in this object and {project_id} is a |
| 2311 * that provides API-specific context for accessing the type. APIs that do not | 2411 /// project ID that provides API-specific context for accessing the type. |
| 2312 * use project information can use the resource name format | 2412 /// APIs that do not use project information can use the resource name format |
| 2313 * "monitoredResourceDescriptors/{type}". | 2413 /// "monitoredResourceDescriptors/{type}". |
| 2314 */ | |
| 2315 core.String name; | 2414 core.String name; |
| 2316 /** | 2415 |
| 2317 * Required. The monitored resource type. For example, the type | 2416 /// Required. The monitored resource type. For example, the type |
| 2318 * "cloudsql_database" represents databases in Google Cloud SQL. The maximum | 2417 /// "cloudsql_database" represents databases in Google Cloud SQL. The maximum |
| 2319 * length of this value is 256 characters. | 2418 /// length of this value is 256 characters. |
| 2320 */ | |
| 2321 core.String type; | 2419 core.String type; |
| 2322 | 2420 |
| 2323 MonitoredResourceDescriptor(); | 2421 MonitoredResourceDescriptor(); |
| 2324 | 2422 |
| 2325 MonitoredResourceDescriptor.fromJson(core.Map _json) { | 2423 MonitoredResourceDescriptor.fromJson(core.Map _json) { |
| 2326 if (_json.containsKey("description")) { | 2424 if (_json.containsKey("description")) { |
| 2327 description = _json["description"]; | 2425 description = _json["description"]; |
| 2328 } | 2426 } |
| 2329 if (_json.containsKey("displayName")) { | 2427 if (_json.containsKey("displayName")) { |
| 2330 displayName = _json["displayName"]; | 2428 displayName = _json["displayName"]; |
| 2331 } | 2429 } |
| 2332 if (_json.containsKey("labels")) { | 2430 if (_json.containsKey("labels")) { |
| 2333 labels = _json["labels"].map((value) => new LabelDescriptor.fromJson(value
)).toList(); | 2431 labels = _json["labels"] |
| 2432 .map((value) => new LabelDescriptor.fromJson(value)) |
| 2433 .toList(); |
| 2334 } | 2434 } |
| 2335 if (_json.containsKey("name")) { | 2435 if (_json.containsKey("name")) { |
| 2336 name = _json["name"]; | 2436 name = _json["name"]; |
| 2337 } | 2437 } |
| 2338 if (_json.containsKey("type")) { | 2438 if (_json.containsKey("type")) { |
| 2339 type = _json["type"]; | 2439 type = _json["type"]; |
| 2340 } | 2440 } |
| 2341 } | 2441 } |
| 2342 | 2442 |
| 2343 core.Map<core.String, core.Object> toJson() { | 2443 core.Map<core.String, core.Object> toJson() { |
| 2344 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2444 final core.Map<core.String, core.Object> _json = |
| 2445 new core.Map<core.String, core.Object>(); |
| 2345 if (description != null) { | 2446 if (description != null) { |
| 2346 _json["description"] = description; | 2447 _json["description"] = description; |
| 2347 } | 2448 } |
| 2348 if (displayName != null) { | 2449 if (displayName != null) { |
| 2349 _json["displayName"] = displayName; | 2450 _json["displayName"] = displayName; |
| 2350 } | 2451 } |
| 2351 if (labels != null) { | 2452 if (labels != null) { |
| 2352 _json["labels"] = labels.map((value) => (value).toJson()).toList(); | 2453 _json["labels"] = labels.map((value) => (value).toJson()).toList(); |
| 2353 } | 2454 } |
| 2354 if (name != null) { | 2455 if (name != null) { |
| 2355 _json["name"] = name; | 2456 _json["name"] = name; |
| 2356 } | 2457 } |
| 2357 if (type != null) { | 2458 if (type != null) { |
| 2358 _json["type"] = type; | 2459 _json["type"] = type; |
| 2359 } | 2460 } |
| 2360 return _json; | 2461 return _json; |
| 2361 } | 2462 } |
| 2362 } | 2463 } |
| 2363 | 2464 |
| 2364 /** | 2465 /// A protocol buffer option, which can be attached to a message, field, |
| 2365 * A protocol buffer option, which can be attached to a message, field, | 2466 /// enumeration, etc. |
| 2366 * enumeration, etc. | |
| 2367 */ | |
| 2368 class Option { | 2467 class Option { |
| 2369 /** | 2468 /// The option's name. For protobuf built-in options (options defined in |
| 2370 * The option's name. For protobuf built-in options (options defined in | 2469 /// descriptor.proto), this is the short name. For example, "map_entry". For |
| 2371 * descriptor.proto), this is the short name. For example, "map_entry". For | 2470 /// custom options, it should be the fully-qualified name. For example, |
| 2372 * custom options, it should be the fully-qualified name. For example, | 2471 /// "google.api.http". |
| 2373 * "google.api.http". | |
| 2374 */ | |
| 2375 core.String name; | 2472 core.String name; |
| 2376 /** | 2473 |
| 2377 * The option's value packed in an Any message. If the value is a primitive, | 2474 /// The option's value packed in an Any message. If the value is a primitive, |
| 2378 * the corresponding wrapper type defined in google/protobuf/wrappers.proto | 2475 /// the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 2379 * should be used. If the value is an enum, it should be stored as an int32 | 2476 /// should be used. If the value is an enum, it should be stored as an int32 |
| 2380 * value using the google.protobuf.Int32Value type. | 2477 /// value using the google.protobuf.Int32Value type. |
| 2381 * | 2478 /// |
| 2382 * The values for Object must be JSON objects. It can consist of `num`, | 2479 /// The values for Object must be JSON objects. It can consist of `num`, |
| 2383 * `String`, `bool` and `null` as well as `Map` and `List` values. | 2480 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 2384 */ | |
| 2385 core.Map<core.String, core.Object> value; | 2481 core.Map<core.String, core.Object> value; |
| 2386 | 2482 |
| 2387 Option(); | 2483 Option(); |
| 2388 | 2484 |
| 2389 Option.fromJson(core.Map _json) { | 2485 Option.fromJson(core.Map _json) { |
| 2390 if (_json.containsKey("name")) { | 2486 if (_json.containsKey("name")) { |
| 2391 name = _json["name"]; | 2487 name = _json["name"]; |
| 2392 } | 2488 } |
| 2393 if (_json.containsKey("value")) { | 2489 if (_json.containsKey("value")) { |
| 2394 value = _json["value"]; | 2490 value = _json["value"]; |
| 2395 } | 2491 } |
| 2396 } | 2492 } |
| 2397 | 2493 |
| 2398 core.Map<core.String, core.Object> toJson() { | 2494 core.Map<core.String, core.Object> toJson() { |
| 2399 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2495 final core.Map<core.String, core.Object> _json = |
| 2496 new core.Map<core.String, core.Object>(); |
| 2400 if (name != null) { | 2497 if (name != null) { |
| 2401 _json["name"] = name; | 2498 _json["name"] = name; |
| 2402 } | 2499 } |
| 2403 if (value != null) { | 2500 if (value != null) { |
| 2404 _json["value"] = value; | 2501 _json["value"] = value; |
| 2405 } | 2502 } |
| 2406 return _json; | 2503 return _json; |
| 2407 } | 2504 } |
| 2408 } | 2505 } |
| 2409 | 2506 |
| 2410 /** A single data point in a time series. */ | 2507 /// A single data point in a time series. |
| 2411 class Point { | 2508 class Point { |
| 2412 /** | 2509 /// The time interval to which the data point applies. For GAUGE metrics, |
| 2413 * The time interval to which the data point applies. For GAUGE metrics, only | 2510 /// only the end time of the interval is used. For DELTA metrics, the start |
| 2414 * the end time of the interval is used. For DELTA metrics, the start and end | 2511 /// and end time should specify a non-zero interval, with subsequent points |
| 2415 * time should specify a non-zero interval, with subsequent points specifying | 2512 /// specifying contiguous and non-overlapping intervals. For CUMULATIVE |
| 2416 * contiguous and non-overlapping intervals. For CUMULATIVE metrics, the start | 2513 /// metrics, the start and end time should specify a non-zero interval, with |
| 2417 * and end time should specify a non-zero interval, with subsequent points | 2514 /// subsequent points specifying the same start time and increasing end |
| 2418 * specifying the same start time and increasing end times, until an event | 2515 /// times, until an event resets the cumulative value to zero and sets a new |
| 2419 * resets the cumulative value to zero and sets a new start time for the | 2516 /// start time for the following points. |
| 2420 * following points. | |
| 2421 */ | |
| 2422 TimeInterval interval; | 2517 TimeInterval interval; |
| 2423 /** The value of the data point. */ | 2518 |
| 2519 /// The value of the data point. |
| 2424 TypedValue value; | 2520 TypedValue value; |
| 2425 | 2521 |
| 2426 Point(); | 2522 Point(); |
| 2427 | 2523 |
| 2428 Point.fromJson(core.Map _json) { | 2524 Point.fromJson(core.Map _json) { |
| 2429 if (_json.containsKey("interval")) { | 2525 if (_json.containsKey("interval")) { |
| 2430 interval = new TimeInterval.fromJson(_json["interval"]); | 2526 interval = new TimeInterval.fromJson(_json["interval"]); |
| 2431 } | 2527 } |
| 2432 if (_json.containsKey("value")) { | 2528 if (_json.containsKey("value")) { |
| 2433 value = new TypedValue.fromJson(_json["value"]); | 2529 value = new TypedValue.fromJson(_json["value"]); |
| 2434 } | 2530 } |
| 2435 } | 2531 } |
| 2436 | 2532 |
| 2437 core.Map<core.String, core.Object> toJson() { | 2533 core.Map<core.String, core.Object> toJson() { |
| 2438 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2534 final core.Map<core.String, core.Object> _json = |
| 2535 new core.Map<core.String, core.Object>(); |
| 2439 if (interval != null) { | 2536 if (interval != null) { |
| 2440 _json["interval"] = (interval).toJson(); | 2537 _json["interval"] = (interval).toJson(); |
| 2441 } | 2538 } |
| 2442 if (value != null) { | 2539 if (value != null) { |
| 2443 _json["value"] = (value).toJson(); | 2540 _json["value"] = (value).toJson(); |
| 2444 } | 2541 } |
| 2445 return _json; | 2542 return _json; |
| 2446 } | 2543 } |
| 2447 } | 2544 } |
| 2448 | 2545 |
| 2449 /** The range of the population values. */ | 2546 /// The range of the population values. |
| 2450 class Range { | 2547 class Range { |
| 2451 /** The maximum of the population values. */ | 2548 /// The maximum of the population values. |
| 2452 core.double max; | 2549 core.double max; |
| 2453 /** The minimum of the population values. */ | 2550 |
| 2551 /// The minimum of the population values. |
| 2454 core.double min; | 2552 core.double min; |
| 2455 | 2553 |
| 2456 Range(); | 2554 Range(); |
| 2457 | 2555 |
| 2458 Range.fromJson(core.Map _json) { | 2556 Range.fromJson(core.Map _json) { |
| 2459 if (_json.containsKey("max")) { | 2557 if (_json.containsKey("max")) { |
| 2460 max = _json["max"]; | 2558 max = _json["max"]; |
| 2461 } | 2559 } |
| 2462 if (_json.containsKey("min")) { | 2560 if (_json.containsKey("min")) { |
| 2463 min = _json["min"]; | 2561 min = _json["min"]; |
| 2464 } | 2562 } |
| 2465 } | 2563 } |
| 2466 | 2564 |
| 2467 core.Map<core.String, core.Object> toJson() { | 2565 core.Map<core.String, core.Object> toJson() { |
| 2468 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2566 final core.Map<core.String, core.Object> _json = |
| 2567 new core.Map<core.String, core.Object>(); |
| 2469 if (max != null) { | 2568 if (max != null) { |
| 2470 _json["max"] = max; | 2569 _json["max"] = max; |
| 2471 } | 2570 } |
| 2472 if (min != null) { | 2571 if (min != null) { |
| 2473 _json["min"] = min; | 2572 _json["min"] = min; |
| 2474 } | 2573 } |
| 2475 return _json; | 2574 return _json; |
| 2476 } | 2575 } |
| 2477 } | 2576 } |
| 2478 | 2577 |
| 2479 /** | 2578 /// SourceContext represents information about the source of a protobuf |
| 2480 * SourceContext represents information about the source of a protobuf element, | 2579 /// element, like the file in which it is defined. |
| 2481 * like the file in which it is defined. | |
| 2482 */ | |
| 2483 class SourceContext { | 2580 class SourceContext { |
| 2484 /** | 2581 /// The path-qualified name of the .proto file that contained the associated |
| 2485 * The path-qualified name of the .proto file that contained the associated | 2582 /// protobuf element. For example: "google/protobuf/source_context.proto". |
| 2486 * protobuf element. For example: "google/protobuf/source_context.proto". | |
| 2487 */ | |
| 2488 core.String fileName; | 2583 core.String fileName; |
| 2489 | 2584 |
| 2490 SourceContext(); | 2585 SourceContext(); |
| 2491 | 2586 |
| 2492 SourceContext.fromJson(core.Map _json) { | 2587 SourceContext.fromJson(core.Map _json) { |
| 2493 if (_json.containsKey("fileName")) { | 2588 if (_json.containsKey("fileName")) { |
| 2494 fileName = _json["fileName"]; | 2589 fileName = _json["fileName"]; |
| 2495 } | 2590 } |
| 2496 } | 2591 } |
| 2497 | 2592 |
| 2498 core.Map<core.String, core.Object> toJson() { | 2593 core.Map<core.String, core.Object> toJson() { |
| 2499 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2594 final core.Map<core.String, core.Object> _json = |
| 2595 new core.Map<core.String, core.Object>(); |
| 2500 if (fileName != null) { | 2596 if (fileName != null) { |
| 2501 _json["fileName"] = fileName; | 2597 _json["fileName"] = fileName; |
| 2502 } | 2598 } |
| 2503 return _json; | 2599 return _json; |
| 2504 } | 2600 } |
| 2505 } | 2601 } |
| 2506 | 2602 |
| 2507 /** | 2603 /// The Status type defines a logical error model that is suitable for |
| 2508 * A time interval extending just after a start time through an end time. If the | 2604 /// different programming environments, including REST APIs and RPC APIs. It is |
| 2509 * start time is the same as the end time, then the interval represents a single | 2605 /// used by gRPC (https://github.com/grpc). The error model is designed to be: |
| 2510 * point in time. | 2606 /// Simple to use and understand for most users |
| 2511 */ | 2607 /// Flexible enough to meet unexpected needsOverviewThe Status message contains |
| 2608 /// three pieces of data: error code, error message, and error details. The |
| 2609 /// error code should be an enum value of google.rpc.Code, but it may accept |
| 2610 /// additional error codes if needed. The error message should be a |
| 2611 /// developer-facing English message that helps developers understand and |
| 2612 /// resolve the error. If a localized user-facing error message is needed, put |
| 2613 /// the localized message in the error details or localize it in the client. |
| 2614 /// The optional error details may contain arbitrary information about the |
| 2615 /// error. There is a predefined set of error detail types in the package |
| 2616 /// google.rpc that can be used for common error conditions.Language mappingThe |
| 2617 /// Status message is the logical representation of the error model, but it is |
| 2618 /// not necessarily the actual wire format. When the Status message is exposed |
| 2619 /// in different client libraries and different wire protocols, it can be |
| 2620 /// mapped differently. For example, it will likely be mapped to some |
| 2621 /// exceptions in Java, but more likely mapped to some error codes in C.Other |
| 2622 /// usesThe error model and the Status message can be used in a variety of |
| 2623 /// environments, either with or without APIs, to provide a consistent |
| 2624 /// developer experience across different environments.Example uses of this |
| 2625 /// error model include: |
| 2626 /// Partial errors. If a service needs to return partial errors to the client, |
| 2627 /// it may embed the Status in the normal response to indicate the partial |
| 2628 /// errors. |
| 2629 /// Workflow errors. A typical workflow has multiple steps. Each step may have |
| 2630 /// a Status message for error reporting. |
| 2631 /// Batch operations. If a client uses batch request and batch response, the |
| 2632 /// Status message should be used directly inside batch response, one for each |
| 2633 /// error sub-response. |
| 2634 /// Asynchronous operations. If an API call embeds asynchronous operation |
| 2635 /// results in its response, the status of those operations should be |
| 2636 /// represented directly using the Status message. |
| 2637 /// Logging. If some API errors are stored in logs, the message Status could be |
| 2638 /// used directly after any stripping needed for security/privacy reasons. |
| 2639 class Status { |
| 2640 /// The status code, which should be an enum value of google.rpc.Code. |
| 2641 core.int code; |
| 2642 |
| 2643 /// A list of messages that carry the error details. There is a common set of |
| 2644 /// message types for APIs to use. |
| 2645 /// |
| 2646 /// The values for Object must be JSON objects. It can consist of `num`, |
| 2647 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 2648 core.List<core.Map<core.String, core.Object>> details; |
| 2649 |
| 2650 /// A developer-facing error message, which should be in English. Any |
| 2651 /// user-facing error message should be localized and sent in the |
| 2652 /// google.rpc.Status.details field, or localized by the client. |
| 2653 core.String message; |
| 2654 |
| 2655 Status(); |
| 2656 |
| 2657 Status.fromJson(core.Map _json) { |
| 2658 if (_json.containsKey("code")) { |
| 2659 code = _json["code"]; |
| 2660 } |
| 2661 if (_json.containsKey("details")) { |
| 2662 details = _json["details"]; |
| 2663 } |
| 2664 if (_json.containsKey("message")) { |
| 2665 message = _json["message"]; |
| 2666 } |
| 2667 } |
| 2668 |
| 2669 core.Map<core.String, core.Object> toJson() { |
| 2670 final core.Map<core.String, core.Object> _json = |
| 2671 new core.Map<core.String, core.Object>(); |
| 2672 if (code != null) { |
| 2673 _json["code"] = code; |
| 2674 } |
| 2675 if (details != null) { |
| 2676 _json["details"] = details; |
| 2677 } |
| 2678 if (message != null) { |
| 2679 _json["message"] = message; |
| 2680 } |
| 2681 return _json; |
| 2682 } |
| 2683 } |
| 2684 |
| 2685 /// A time interval extending just after a start time through an end time. If |
| 2686 /// the start time is the same as the end time, then the interval represents a |
| 2687 /// single point in time. |
| 2512 class TimeInterval { | 2688 class TimeInterval { |
| 2513 /** Required. The end of the time interval. */ | 2689 /// Required. The end of the time interval. |
| 2514 core.String endTime; | 2690 core.String endTime; |
| 2515 /** | 2691 |
| 2516 * Optional. The beginning of the time interval. The default value for the | 2692 /// Optional. The beginning of the time interval. The default value for the |
| 2517 * start time is the end time. The start time must not be later than the end | 2693 /// start time is the end time. The start time must not be later than the end |
| 2518 * time. | 2694 /// time. |
| 2519 */ | |
| 2520 core.String startTime; | 2695 core.String startTime; |
| 2521 | 2696 |
| 2522 TimeInterval(); | 2697 TimeInterval(); |
| 2523 | 2698 |
| 2524 TimeInterval.fromJson(core.Map _json) { | 2699 TimeInterval.fromJson(core.Map _json) { |
| 2525 if (_json.containsKey("endTime")) { | 2700 if (_json.containsKey("endTime")) { |
| 2526 endTime = _json["endTime"]; | 2701 endTime = _json["endTime"]; |
| 2527 } | 2702 } |
| 2528 if (_json.containsKey("startTime")) { | 2703 if (_json.containsKey("startTime")) { |
| 2529 startTime = _json["startTime"]; | 2704 startTime = _json["startTime"]; |
| 2530 } | 2705 } |
| 2531 } | 2706 } |
| 2532 | 2707 |
| 2533 core.Map<core.String, core.Object> toJson() { | 2708 core.Map<core.String, core.Object> toJson() { |
| 2534 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2709 final core.Map<core.String, core.Object> _json = |
| 2710 new core.Map<core.String, core.Object>(); |
| 2535 if (endTime != null) { | 2711 if (endTime != null) { |
| 2536 _json["endTime"] = endTime; | 2712 _json["endTime"] = endTime; |
| 2537 } | 2713 } |
| 2538 if (startTime != null) { | 2714 if (startTime != null) { |
| 2539 _json["startTime"] = startTime; | 2715 _json["startTime"] = startTime; |
| 2540 } | 2716 } |
| 2541 return _json; | 2717 return _json; |
| 2542 } | 2718 } |
| 2543 } | 2719 } |
| 2544 | 2720 |
| 2545 /** | 2721 /// A collection of data points that describes the time-varying values of a |
| 2546 * A collection of data points that describes the time-varying values of a | 2722 /// metric. A time series is identified by a combination of a fully-specified |
| 2547 * metric. A time series is identified by a combination of a fully-specified | 2723 /// monitored resource and a fully-specified metric. This type is used for both |
| 2548 * monitored resource and a fully-specified metric. This type is used for both | 2724 /// listing and creating time series. |
| 2549 * listing and creating time series. | |
| 2550 */ | |
| 2551 class TimeSeries { | 2725 class TimeSeries { |
| 2552 /** | 2726 /// The associated metric. A fully-specified metric used to identify the time |
| 2553 * The associated metric. A fully-specified metric used to identify the time | 2727 /// series. |
| 2554 * series. | |
| 2555 */ | |
| 2556 Metric metric; | 2728 Metric metric; |
| 2557 /** | 2729 |
| 2558 * The metric kind of the time series. When listing time series, this metric | 2730 /// The metric kind of the time series. When listing time series, this metric |
| 2559 * kind might be different from the metric kind of the associated metric if | 2731 /// kind might be different from the metric kind of the associated metric if |
| 2560 * this time series is an alignment or reduction of other time series.When | 2732 /// this time series is an alignment or reduction of other time series.When |
| 2561 * creating a time series, this field is optional. If present, it must be the | 2733 /// creating a time series, this field is optional. If present, it must be |
| 2562 * same as the metric kind of the associated metric. If the associated | 2734 /// the same as the metric kind of the associated metric. If the associated |
| 2563 * metric's descriptor must be auto-created, then this field specifies the | 2735 /// metric's descriptor must be auto-created, then this field specifies the |
| 2564 * metric kind of the new descriptor and must be either GAUGE (the default) or | 2736 /// metric kind of the new descriptor and must be either GAUGE (the default) |
| 2565 * CUMULATIVE. | 2737 /// or CUMULATIVE. |
| 2566 * Possible string values are: | 2738 /// Possible string values are: |
| 2567 * - "METRIC_KIND_UNSPECIFIED" : Do not use this default value. | 2739 /// - "METRIC_KIND_UNSPECIFIED" : Do not use this default value. |
| 2568 * - "GAUGE" : An instantaneous measurement of a value. | 2740 /// - "GAUGE" : An instantaneous measurement of a value. |
| 2569 * - "DELTA" : The change in a value during a time interval. | 2741 /// - "DELTA" : The change in a value during a time interval. |
| 2570 * - "CUMULATIVE" : A value accumulated over a time interval. Cumulative | 2742 /// - "CUMULATIVE" : A value accumulated over a time interval. Cumulative |
| 2571 * measurements in a time series should have the same start time and | 2743 /// measurements in a time series should have the same start time and |
| 2572 * increasing end times, until an event resets the cumulative value to zero | 2744 /// increasing end times, until an event resets the cumulative value to zero |
| 2573 * and sets a new start time for the following points. | 2745 /// and sets a new start time for the following points. |
| 2574 */ | |
| 2575 core.String metricKind; | 2746 core.String metricKind; |
| 2576 /** | 2747 |
| 2577 * The data points of this time series. When listing time series, the order of | 2748 /// The data points of this time series. When listing time series, the order |
| 2578 * the points is specified by the list method.When creating a time series, | 2749 /// of the points is specified by the list method.When creating a time |
| 2579 * this field must contain exactly one point and the point's type must be the | 2750 /// series, this field must contain exactly one point and the point's type |
| 2580 * same as the value type of the associated metric. If the associated metric's | 2751 /// must be the same as the value type of the associated metric. If the |
| 2581 * descriptor must be auto-created, then the value type of the descriptor is | 2752 /// associated metric's descriptor must be auto-created, then the value type |
| 2582 * determined by the point's type, which must be BOOL, INT64, DOUBLE, or | 2753 /// of the descriptor is determined by the point's type, which must be BOOL, |
| 2583 * DISTRIBUTION. | 2754 /// INT64, DOUBLE, or DISTRIBUTION. |
| 2584 */ | |
| 2585 core.List<Point> points; | 2755 core.List<Point> points; |
| 2586 /** | 2756 |
| 2587 * The associated monitored resource. Custom metrics can use only certain | 2757 /// The associated monitored resource. Custom metrics can use only certain |
| 2588 * monitored resource types in their time series data. | 2758 /// monitored resource types in their time series data. |
| 2589 */ | |
| 2590 MonitoredResource resource; | 2759 MonitoredResource resource; |
| 2591 /** | 2760 |
| 2592 * The value type of the time series. When listing time series, this value | 2761 /// The value type of the time series. When listing time series, this value |
| 2593 * type might be different from the value type of the associated metric if | 2762 /// type might be different from the value type of the associated metric if |
| 2594 * this time series is an alignment or reduction of other time series.When | 2763 /// this time series is an alignment or reduction of other time series.When |
| 2595 * creating a time series, this field is optional. If present, it must be the | 2764 /// creating a time series, this field is optional. If present, it must be |
| 2596 * same as the type of the data in the points field. | 2765 /// the same as the type of the data in the points field. |
| 2597 * Possible string values are: | 2766 /// Possible string values are: |
| 2598 * - "VALUE_TYPE_UNSPECIFIED" : Do not use this default value. | 2767 /// - "VALUE_TYPE_UNSPECIFIED" : Do not use this default value. |
| 2599 * - "BOOL" : The value is a boolean. This value type can be used only if the | 2768 /// - "BOOL" : The value is a boolean. This value type can be used only if |
| 2600 * metric kind is GAUGE. | 2769 /// the metric kind is GAUGE. |
| 2601 * - "INT64" : The value is a signed 64-bit integer. | 2770 /// - "INT64" : The value is a signed 64-bit integer. |
| 2602 * - "DOUBLE" : The value is a double precision floating point number. | 2771 /// - "DOUBLE" : The value is a double precision floating point number. |
| 2603 * - "STRING" : The value is a text string. This value type can be used only | 2772 /// - "STRING" : The value is a text string. This value type can be used only |
| 2604 * if the metric kind is GAUGE. | 2773 /// if the metric kind is GAUGE. |
| 2605 * - "DISTRIBUTION" : The value is a Distribution. | 2774 /// - "DISTRIBUTION" : The value is a Distribution. |
| 2606 * - "MONEY" : The value is money. | 2775 /// - "MONEY" : The value is money. |
| 2607 */ | |
| 2608 core.String valueType; | 2776 core.String valueType; |
| 2609 | 2777 |
| 2610 TimeSeries(); | 2778 TimeSeries(); |
| 2611 | 2779 |
| 2612 TimeSeries.fromJson(core.Map _json) { | 2780 TimeSeries.fromJson(core.Map _json) { |
| 2613 if (_json.containsKey("metric")) { | 2781 if (_json.containsKey("metric")) { |
| 2614 metric = new Metric.fromJson(_json["metric"]); | 2782 metric = new Metric.fromJson(_json["metric"]); |
| 2615 } | 2783 } |
| 2616 if (_json.containsKey("metricKind")) { | 2784 if (_json.containsKey("metricKind")) { |
| 2617 metricKind = _json["metricKind"]; | 2785 metricKind = _json["metricKind"]; |
| 2618 } | 2786 } |
| 2619 if (_json.containsKey("points")) { | 2787 if (_json.containsKey("points")) { |
| 2620 points = _json["points"].map((value) => new Point.fromJson(value)).toList(
); | 2788 points = |
| 2789 _json["points"].map((value) => new Point.fromJson(value)).toList(); |
| 2621 } | 2790 } |
| 2622 if (_json.containsKey("resource")) { | 2791 if (_json.containsKey("resource")) { |
| 2623 resource = new MonitoredResource.fromJson(_json["resource"]); | 2792 resource = new MonitoredResource.fromJson(_json["resource"]); |
| 2624 } | 2793 } |
| 2625 if (_json.containsKey("valueType")) { | 2794 if (_json.containsKey("valueType")) { |
| 2626 valueType = _json["valueType"]; | 2795 valueType = _json["valueType"]; |
| 2627 } | 2796 } |
| 2628 } | 2797 } |
| 2629 | 2798 |
| 2630 core.Map<core.String, core.Object> toJson() { | 2799 core.Map<core.String, core.Object> toJson() { |
| 2631 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2800 final core.Map<core.String, core.Object> _json = |
| 2801 new core.Map<core.String, core.Object>(); |
| 2632 if (metric != null) { | 2802 if (metric != null) { |
| 2633 _json["metric"] = (metric).toJson(); | 2803 _json["metric"] = (metric).toJson(); |
| 2634 } | 2804 } |
| 2635 if (metricKind != null) { | 2805 if (metricKind != null) { |
| 2636 _json["metricKind"] = metricKind; | 2806 _json["metricKind"] = metricKind; |
| 2637 } | 2807 } |
| 2638 if (points != null) { | 2808 if (points != null) { |
| 2639 _json["points"] = points.map((value) => (value).toJson()).toList(); | 2809 _json["points"] = points.map((value) => (value).toJson()).toList(); |
| 2640 } | 2810 } |
| 2641 if (resource != null) { | 2811 if (resource != null) { |
| 2642 _json["resource"] = (resource).toJson(); | 2812 _json["resource"] = (resource).toJson(); |
| 2643 } | 2813 } |
| 2644 if (valueType != null) { | 2814 if (valueType != null) { |
| 2645 _json["valueType"] = valueType; | 2815 _json["valueType"] = valueType; |
| 2646 } | 2816 } |
| 2647 return _json; | 2817 return _json; |
| 2648 } | 2818 } |
| 2649 } | 2819 } |
| 2650 | 2820 |
| 2651 /** A protocol buffer message type. */ | 2821 /// A protocol buffer message type. |
| 2652 class Type { | 2822 class Type { |
| 2653 /** The list of fields. */ | 2823 /// The list of fields. |
| 2654 core.List<Field> fields; | 2824 core.List<Field> fields; |
| 2655 /** The fully qualified message name. */ | 2825 |
| 2826 /// The fully qualified message name. |
| 2656 core.String name; | 2827 core.String name; |
| 2657 /** The list of types appearing in oneof definitions in this type. */ | 2828 |
| 2829 /// The list of types appearing in oneof definitions in this type. |
| 2658 core.List<core.String> oneofs; | 2830 core.List<core.String> oneofs; |
| 2659 /** The protocol buffer options. */ | 2831 |
| 2832 /// The protocol buffer options. |
| 2660 core.List<Option> options; | 2833 core.List<Option> options; |
| 2661 /** The source context. */ | 2834 |
| 2835 /// The source context. |
| 2662 SourceContext sourceContext; | 2836 SourceContext sourceContext; |
| 2663 /** | 2837 |
| 2664 * The source syntax. | 2838 /// The source syntax. |
| 2665 * Possible string values are: | 2839 /// Possible string values are: |
| 2666 * - "SYNTAX_PROTO2" : Syntax proto2. | 2840 /// - "SYNTAX_PROTO2" : Syntax proto2. |
| 2667 * - "SYNTAX_PROTO3" : Syntax proto3. | 2841 /// - "SYNTAX_PROTO3" : Syntax proto3. |
| 2668 */ | |
| 2669 core.String syntax; | 2842 core.String syntax; |
| 2670 | 2843 |
| 2671 Type(); | 2844 Type(); |
| 2672 | 2845 |
| 2673 Type.fromJson(core.Map _json) { | 2846 Type.fromJson(core.Map _json) { |
| 2674 if (_json.containsKey("fields")) { | 2847 if (_json.containsKey("fields")) { |
| 2675 fields = _json["fields"].map((value) => new Field.fromJson(value)).toList(
); | 2848 fields = |
| 2849 _json["fields"].map((value) => new Field.fromJson(value)).toList(); |
| 2676 } | 2850 } |
| 2677 if (_json.containsKey("name")) { | 2851 if (_json.containsKey("name")) { |
| 2678 name = _json["name"]; | 2852 name = _json["name"]; |
| 2679 } | 2853 } |
| 2680 if (_json.containsKey("oneofs")) { | 2854 if (_json.containsKey("oneofs")) { |
| 2681 oneofs = _json["oneofs"]; | 2855 oneofs = _json["oneofs"]; |
| 2682 } | 2856 } |
| 2683 if (_json.containsKey("options")) { | 2857 if (_json.containsKey("options")) { |
| 2684 options = _json["options"].map((value) => new Option.fromJson(value)).toLi
st(); | 2858 options = |
| 2859 _json["options"].map((value) => new Option.fromJson(value)).toList(); |
| 2685 } | 2860 } |
| 2686 if (_json.containsKey("sourceContext")) { | 2861 if (_json.containsKey("sourceContext")) { |
| 2687 sourceContext = new SourceContext.fromJson(_json["sourceContext"]); | 2862 sourceContext = new SourceContext.fromJson(_json["sourceContext"]); |
| 2688 } | 2863 } |
| 2689 if (_json.containsKey("syntax")) { | 2864 if (_json.containsKey("syntax")) { |
| 2690 syntax = _json["syntax"]; | 2865 syntax = _json["syntax"]; |
| 2691 } | 2866 } |
| 2692 } | 2867 } |
| 2693 | 2868 |
| 2694 core.Map<core.String, core.Object> toJson() { | 2869 core.Map<core.String, core.Object> toJson() { |
| 2695 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2870 final core.Map<core.String, core.Object> _json = |
| 2871 new core.Map<core.String, core.Object>(); |
| 2696 if (fields != null) { | 2872 if (fields != null) { |
| 2697 _json["fields"] = fields.map((value) => (value).toJson()).toList(); | 2873 _json["fields"] = fields.map((value) => (value).toJson()).toList(); |
| 2698 } | 2874 } |
| 2699 if (name != null) { | 2875 if (name != null) { |
| 2700 _json["name"] = name; | 2876 _json["name"] = name; |
| 2701 } | 2877 } |
| 2702 if (oneofs != null) { | 2878 if (oneofs != null) { |
| 2703 _json["oneofs"] = oneofs; | 2879 _json["oneofs"] = oneofs; |
| 2704 } | 2880 } |
| 2705 if (options != null) { | 2881 if (options != null) { |
| 2706 _json["options"] = options.map((value) => (value).toJson()).toList(); | 2882 _json["options"] = options.map((value) => (value).toJson()).toList(); |
| 2707 } | 2883 } |
| 2708 if (sourceContext != null) { | 2884 if (sourceContext != null) { |
| 2709 _json["sourceContext"] = (sourceContext).toJson(); | 2885 _json["sourceContext"] = (sourceContext).toJson(); |
| 2710 } | 2886 } |
| 2711 if (syntax != null) { | 2887 if (syntax != null) { |
| 2712 _json["syntax"] = syntax; | 2888 _json["syntax"] = syntax; |
| 2713 } | 2889 } |
| 2714 return _json; | 2890 return _json; |
| 2715 } | 2891 } |
| 2716 } | 2892 } |
| 2717 | 2893 |
| 2718 /** A single strongly-typed value. */ | 2894 /// A single strongly-typed value. |
| 2719 class TypedValue { | 2895 class TypedValue { |
| 2720 /** A Boolean value: true or false. */ | 2896 /// A Boolean value: true or false. |
| 2721 core.bool boolValue; | 2897 core.bool boolValue; |
| 2722 /** A distribution value. */ | 2898 |
| 2899 /// A distribution value. |
| 2723 Distribution distributionValue; | 2900 Distribution distributionValue; |
| 2724 /** | 2901 |
| 2725 * A 64-bit double-precision floating-point number. Its magnitude is | 2902 /// A 64-bit double-precision floating-point number. Its magnitude is |
| 2726 * approximately ±10<sup>±300</sup> and it has 16 significant | 2903 /// approximately ±10<sup>±300</sup> and it has 16 significant |
| 2727 * digits of precision. | 2904 /// digits of precision. |
| 2728 */ | |
| 2729 core.double doubleValue; | 2905 core.double doubleValue; |
| 2730 /** | 2906 |
| 2731 * A 64-bit integer. Its range is approximately ±9.2x10<sup>18</sup>. | 2907 /// A 64-bit integer. Its range is approximately ±9.2x10<sup>18</sup>. |
| 2732 */ | |
| 2733 core.String int64Value; | 2908 core.String int64Value; |
| 2734 /** A variable-length string value. */ | 2909 |
| 2910 /// A variable-length string value. |
| 2735 core.String stringValue; | 2911 core.String stringValue; |
| 2736 | 2912 |
| 2737 TypedValue(); | 2913 TypedValue(); |
| 2738 | 2914 |
| 2739 TypedValue.fromJson(core.Map _json) { | 2915 TypedValue.fromJson(core.Map _json) { |
| 2740 if (_json.containsKey("boolValue")) { | 2916 if (_json.containsKey("boolValue")) { |
| 2741 boolValue = _json["boolValue"]; | 2917 boolValue = _json["boolValue"]; |
| 2742 } | 2918 } |
| 2743 if (_json.containsKey("distributionValue")) { | 2919 if (_json.containsKey("distributionValue")) { |
| 2744 distributionValue = new Distribution.fromJson(_json["distributionValue"]); | 2920 distributionValue = new Distribution.fromJson(_json["distributionValue"]); |
| 2745 } | 2921 } |
| 2746 if (_json.containsKey("doubleValue")) { | 2922 if (_json.containsKey("doubleValue")) { |
| 2747 doubleValue = _json["doubleValue"]; | 2923 doubleValue = _json["doubleValue"]; |
| 2748 } | 2924 } |
| 2749 if (_json.containsKey("int64Value")) { | 2925 if (_json.containsKey("int64Value")) { |
| 2750 int64Value = _json["int64Value"]; | 2926 int64Value = _json["int64Value"]; |
| 2751 } | 2927 } |
| 2752 if (_json.containsKey("stringValue")) { | 2928 if (_json.containsKey("stringValue")) { |
| 2753 stringValue = _json["stringValue"]; | 2929 stringValue = _json["stringValue"]; |
| 2754 } | 2930 } |
| 2755 } | 2931 } |
| 2756 | 2932 |
| 2757 core.Map<core.String, core.Object> toJson() { | 2933 core.Map<core.String, core.Object> toJson() { |
| 2758 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2934 final core.Map<core.String, core.Object> _json = |
| 2935 new core.Map<core.String, core.Object>(); |
| 2759 if (boolValue != null) { | 2936 if (boolValue != null) { |
| 2760 _json["boolValue"] = boolValue; | 2937 _json["boolValue"] = boolValue; |
| 2761 } | 2938 } |
| 2762 if (distributionValue != null) { | 2939 if (distributionValue != null) { |
| 2763 _json["distributionValue"] = (distributionValue).toJson(); | 2940 _json["distributionValue"] = (distributionValue).toJson(); |
| 2764 } | 2941 } |
| 2765 if (doubleValue != null) { | 2942 if (doubleValue != null) { |
| 2766 _json["doubleValue"] = doubleValue; | 2943 _json["doubleValue"] = doubleValue; |
| 2767 } | 2944 } |
| 2768 if (int64Value != null) { | 2945 if (int64Value != null) { |
| 2769 _json["int64Value"] = int64Value; | 2946 _json["int64Value"] = int64Value; |
| 2770 } | 2947 } |
| 2771 if (stringValue != null) { | 2948 if (stringValue != null) { |
| 2772 _json["stringValue"] = stringValue; | 2949 _json["stringValue"] = stringValue; |
| 2773 } | 2950 } |
| 2774 return _json; | 2951 return _json; |
| 2775 } | 2952 } |
| 2776 } | 2953 } |
| OLD | NEW |