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

Side by Side Diff: generated/googleapis_beta/lib/logging/v2beta1.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis_beta.logging.v2beta1; 3 library googleapis_beta.logging.v2beta1;
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 logging/v2beta1'; 15 const core.String USER_AGENT = 'dart-api-client logging/v2beta1';
16 16
17 /** Writes log entries and manages your Stackdriver Logging configuration. */ 17 /// Writes log entries and manages your Stackdriver Logging configuration.
18 class LoggingApi { 18 class LoggingApi {
19 /** View and manage your data across Google Cloud Platform services */ 19 /// View and manage your data across Google Cloud Platform services
20 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 20 static const CloudPlatformScope =
21 "https://www.googleapis.com/auth/cloud-platform";
21 22
22 /** View your data across Google Cloud Platform services */ 23 /// View your data across Google Cloud Platform services
23 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo ud-platform.read-only"; 24 static const CloudPlatformReadOnlyScope =
25 "https://www.googleapis.com/auth/cloud-platform.read-only";
24 26
25 /** Administrate log data for your projects */ 27 /// Administrate log data for your projects
26 static const LoggingAdminScope = "https://www.googleapis.com/auth/logging.admi n"; 28 static const LoggingAdminScope =
29 "https://www.googleapis.com/auth/logging.admin";
27 30
28 /** View log data for your projects */ 31 /// View log data for your projects
29 static const LoggingReadScope = "https://www.googleapis.com/auth/logging.read" ; 32 static const LoggingReadScope =
33 "https://www.googleapis.com/auth/logging.read";
30 34
31 /** Submit log data for your projects */ 35 /// Submit log data for your projects
32 static const LoggingWriteScope = "https://www.googleapis.com/auth/logging.writ e"; 36 static const LoggingWriteScope =
33 37 "https://www.googleapis.com/auth/logging.write";
34 38
35 final commons.ApiRequester _requester; 39 final commons.ApiRequester _requester;
36 40
37 BillingAccountsResourceApi get billingAccounts => new BillingAccountsResourceA pi(_requester); 41 BillingAccountsResourceApi get billingAccounts =>
42 new BillingAccountsResourceApi(_requester);
38 EntriesResourceApi get entries => new EntriesResourceApi(_requester); 43 EntriesResourceApi get entries => new EntriesResourceApi(_requester);
39 MonitoredResourceDescriptorsResourceApi get monitoredResourceDescriptors => ne w MonitoredResourceDescriptorsResourceApi(_requester); 44 MonitoredResourceDescriptorsResourceApi get monitoredResourceDescriptors =>
40 OrganizationsResourceApi get organizations => new OrganizationsResourceApi(_re quester); 45 new MonitoredResourceDescriptorsResourceApi(_requester);
46 OrganizationsResourceApi get organizations =>
47 new OrganizationsResourceApi(_requester);
41 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); 48 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
42 49
43 LoggingApi(http.Client client, {core.String rootUrl: "https://logging.googleap is.com/", core.String servicePath: ""}) : 50 LoggingApi(http.Client client,
44 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 51 {core.String rootUrl: "https://logging.googleapis.com/",
52 core.String servicePath: ""})
53 : _requester =
54 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
45 } 55 }
46 56
47
48 class BillingAccountsResourceApi { 57 class BillingAccountsResourceApi {
49 final commons.ApiRequester _requester; 58 final commons.ApiRequester _requester;
50 59
51 BillingAccountsLogsResourceApi get logs => new BillingAccountsLogsResourceApi( _requester); 60 BillingAccountsLogsResourceApi get logs =>
61 new BillingAccountsLogsResourceApi(_requester);
52 62
53 BillingAccountsResourceApi(commons.ApiRequester client) : 63 BillingAccountsResourceApi(commons.ApiRequester client) : _requester = client;
54 _requester = client;
55 } 64 }
56 65
57
58 class BillingAccountsLogsResourceApi { 66 class BillingAccountsLogsResourceApi {
59 final commons.ApiRequester _requester; 67 final commons.ApiRequester _requester;
60 68
61 BillingAccountsLogsResourceApi(commons.ApiRequester client) : 69 BillingAccountsLogsResourceApi(commons.ApiRequester client)
62 _requester = client; 70 : _requester = client;
63 71
64 /** 72 /// Deletes all the log entries in a log. The log reappears if it receives
65 * Deletes all the log entries in a log. The log reappears if it receives new 73 /// new entries. Log entries written shortly before the delete operation
66 * entries. Log entries written shortly before the delete operation might not 74 /// might not be deleted.
67 * be deleted. 75 ///
68 * 76 /// Request parameters:
69 * Request parameters: 77 ///
70 * 78 /// [logName] - Required. The resource name of the log to delete:
71 * [logName] - Required. The resource name of the log to delete: 79 /// "projects/[PROJECT_ID]/logs/[LOG_ID]"
72 * "projects/[PROJECT_ID]/logs/[LOG_ID]" 80 /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
73 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" 81 /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
74 * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" 82 /// "folders/[FOLDER_ID]/logs/[LOG_ID]"
75 * "folders/[FOLDER_ID]/logs/[LOG_ID]" 83 /// [LOG_ID] must be URL-encoded. For example,
76 * [LOG_ID] must be URL-encoded. For example, 84 /// "projects/my-project-id/logs/syslog",
77 * "projects/my-project-id/logs/syslog", 85 /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factiv ity".
78 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty". 86 /// For more information about log names, see LogEntry.
79 * For more information about log names, see LogEntry. 87 /// Value must have pattern "^billingAccounts/[^/]+/logs/[^/]+$".
80 * Value must have pattern "^billingAccounts/[^/]+/logs/[^/]+$". 88 ///
81 * 89 /// Completes with a [Empty].
82 * Completes with a [Empty]. 90 ///
83 * 91 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
84 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 92 /// an error.
85 * error. 93 ///
86 * 94 /// If the used [http.Client] completes with an error when making a REST
87 * If the used [http.Client] completes with an error when making a REST call, 95 /// call, this method will complete with the same error.
88 * this method will complete with the same error.
89 */
90 async.Future<Empty> delete(core.String logName) { 96 async.Future<Empty> delete(core.String logName) {
91 var _url = null; 97 var _url = null;
92 var _queryParams = new core.Map(); 98 var _queryParams = new core.Map();
93 var _uploadMedia = null; 99 var _uploadMedia = null;
94 var _uploadOptions = null; 100 var _uploadOptions = null;
95 var _downloadOptions = commons.DownloadOptions.Metadata; 101 var _downloadOptions = commons.DownloadOptions.Metadata;
96 var _body = null; 102 var _body = null;
97 103
98 if (logName == null) { 104 if (logName == null) {
99 throw new core.ArgumentError("Parameter logName is required."); 105 throw new core.ArgumentError("Parameter logName is required.");
100 } 106 }
101 107
102 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$logName'); 108 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$logName');
103 109
104 var _response = _requester.request(_url, 110 var _response = _requester.request(_url, "DELETE",
105 "DELETE", 111 body: _body,
106 body: _body, 112 queryParams: _queryParams,
107 queryParams: _queryParams, 113 uploadOptions: _uploadOptions,
108 uploadOptions: _uploadOptions, 114 uploadMedia: _uploadMedia,
109 uploadMedia: _uploadMedia, 115 downloadOptions: _downloadOptions);
110 downloadOptions: _downloadOptions);
111 return _response.then((data) => new Empty.fromJson(data)); 116 return _response.then((data) => new Empty.fromJson(data));
112 } 117 }
113 118
114 /** 119 /// Lists the logs in projects, organizations, folders, or billing accounts.
115 * Lists the logs in projects, organizations, folders, or billing accounts. 120 /// Only logs that have entries are listed.
116 * Only logs that have entries are listed. 121 ///
117 * 122 /// Request parameters:
118 * Request parameters: 123 ///
119 * 124 /// [parent] - Required. The resource name that owns the logs:
120 * [parent] - Required. The resource name that owns the logs: 125 /// "projects/[PROJECT_ID]"
121 * "projects/[PROJECT_ID]" 126 /// "organizations/[ORGANIZATION_ID]"
122 * "organizations/[ORGANIZATION_ID]" 127 /// "billingAccounts/[BILLING_ACCOUNT_ID]"
123 * "billingAccounts/[BILLING_ACCOUNT_ID]" 128 /// "folders/[FOLDER_ID]"
124 * "folders/[FOLDER_ID]" 129 ///
125 * 130 /// Value must have pattern "^billingAccounts/[^/]+$".
126 * Value must have pattern "^billingAccounts/[^/]+$". 131 ///
127 * 132 /// [pageToken] - Optional. If present, then retrieve the next batch of
128 * [pageSize] - Optional. The maximum number of results to return from this 133 /// results from the preceding call to this method. pageToken must be the
129 * request. Non-positive values are ignored. The presence of nextPageToken in 134 /// value of nextPageToken from the previous response. The values of other
130 * the response indicates that more results might be available. 135 /// method parameters should be identical to those in the previous call.
131 * 136 ///
132 * [pageToken] - Optional. If present, then retrieve the next batch of results 137 /// [pageSize] - Optional. The maximum number of results to return from this
133 * from the preceding call to this method. pageToken must be the value of 138 /// request. Non-positive values are ignored. The presence of nextPageToken
134 * nextPageToken from the previous response. The values of other method 139 /// in the response indicates that more results might be available.
135 * parameters should be identical to those in the previous call. 140 ///
136 * 141 /// Completes with a [ListLogsResponse].
137 * Completes with a [ListLogsResponse]. 142 ///
138 * 143 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
139 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 144 /// an error.
140 * error. 145 ///
141 * 146 /// If the used [http.Client] completes with an error when making a REST
142 * If the used [http.Client] completes with an error when making a REST call, 147 /// call, this method will complete with the same error.
143 * this method will complete with the same error. 148 async.Future<ListLogsResponse> list(core.String parent,
144 */ 149 {core.String pageToken, core.int pageSize}) {
145 async.Future<ListLogsResponse> list(core.String parent, {core.int pageSize, co re.String pageToken}) {
146 var _url = null; 150 var _url = null;
147 var _queryParams = new core.Map(); 151 var _queryParams = new core.Map();
148 var _uploadMedia = null; 152 var _uploadMedia = null;
149 var _uploadOptions = null; 153 var _uploadOptions = null;
150 var _downloadOptions = commons.DownloadOptions.Metadata; 154 var _downloadOptions = commons.DownloadOptions.Metadata;
151 var _body = null; 155 var _body = null;
152 156
153 if (parent == null) { 157 if (parent == null) {
154 throw new core.ArgumentError("Parameter parent is required."); 158 throw new core.ArgumentError("Parameter parent is required.");
155 } 159 }
160 if (pageToken != null) {
161 _queryParams["pageToken"] = [pageToken];
162 }
156 if (pageSize != null) { 163 if (pageSize != null) {
157 _queryParams["pageSize"] = ["${pageSize}"]; 164 _queryParams["pageSize"] = ["${pageSize}"];
158 } 165 }
159 if (pageToken != null) {
160 _queryParams["pageToken"] = [pageToken];
161 }
162 166
163 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/log s'; 167 _url =
168 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs';
164 169
165 var _response = _requester.request(_url, 170 var _response = _requester.request(_url, "GET",
166 "GET", 171 body: _body,
167 body: _body, 172 queryParams: _queryParams,
168 queryParams: _queryParams, 173 uploadOptions: _uploadOptions,
169 uploadOptions: _uploadOptions, 174 uploadMedia: _uploadMedia,
170 uploadMedia: _uploadMedia, 175 downloadOptions: _downloadOptions);
171 downloadOptions: _downloadOptions);
172 return _response.then((data) => new ListLogsResponse.fromJson(data)); 176 return _response.then((data) => new ListLogsResponse.fromJson(data));
173 } 177 }
174
175 } 178 }
176 179
177
178 class EntriesResourceApi { 180 class EntriesResourceApi {
179 final commons.ApiRequester _requester; 181 final commons.ApiRequester _requester;
180 182
181 EntriesResourceApi(commons.ApiRequester client) : 183 EntriesResourceApi(commons.ApiRequester client) : _requester = client;
182 _requester = client;
183 184
184 /** 185 /// Lists log entries. Use this method to retrieve log entries from
185 * Lists log entries. Use this method to retrieve log entries from Stackdriver 186 /// Stackdriver Logging. For ways to export log entries, see Exporting Logs.
186 * Logging. For ways to export log entries, see Exporting Logs. 187 ///
187 * 188 /// [request] - The metadata request object.
188 * [request] - The metadata request object. 189 ///
189 * 190 /// Request parameters:
190 * Request parameters: 191 ///
191 * 192 /// Completes with a [ListLogEntriesResponse].
192 * Completes with a [ListLogEntriesResponse]. 193 ///
193 * 194 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
194 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 195 /// an error.
195 * error. 196 ///
196 * 197 /// If the used [http.Client] completes with an error when making a REST
197 * If the used [http.Client] completes with an error when making a REST call, 198 /// call, this method will complete with the same error.
198 * this method will complete with the same error.
199 */
200 async.Future<ListLogEntriesResponse> list(ListLogEntriesRequest request) { 199 async.Future<ListLogEntriesResponse> list(ListLogEntriesRequest request) {
201 var _url = null; 200 var _url = null;
202 var _queryParams = new core.Map(); 201 var _queryParams = new core.Map();
203 var _uploadMedia = null; 202 var _uploadMedia = null;
204 var _uploadOptions = null; 203 var _uploadOptions = null;
205 var _downloadOptions = commons.DownloadOptions.Metadata; 204 var _downloadOptions = commons.DownloadOptions.Metadata;
206 var _body = null; 205 var _body = null;
207 206
208 if (request != null) { 207 if (request != null) {
209 _body = convert.JSON.encode((request).toJson()); 208 _body = convert.JSON.encode((request).toJson());
210 } 209 }
211 210
212 _url = 'v2beta1/entries:list'; 211 _url = 'v2beta1/entries:list';
213 212
214 var _response = _requester.request(_url, 213 var _response = _requester.request(_url, "POST",
215 "POST", 214 body: _body,
216 body: _body, 215 queryParams: _queryParams,
217 queryParams: _queryParams, 216 uploadOptions: _uploadOptions,
218 uploadOptions: _uploadOptions, 217 uploadMedia: _uploadMedia,
219 uploadMedia: _uploadMedia, 218 downloadOptions: _downloadOptions);
220 downloadOptions: _downloadOptions);
221 return _response.then((data) => new ListLogEntriesResponse.fromJson(data)); 219 return _response.then((data) => new ListLogEntriesResponse.fromJson(data));
222 } 220 }
223 221
224 /** 222 /// Log entry resourcesWrites log entries to Stackdriver Logging. This API
225 * Writes log entries to Stackdriver Logging. 223 /// method is the only way to send log entries to Stackdriver Logging. This
226 * 224 /// method is used, directly or indirectly, by the Stackdriver Logging agent
227 * [request] - The metadata request object. 225 /// (fluentd) and all logging libraries configured to use Stackdriver
228 * 226 /// Logging.
229 * Request parameters: 227 ///
230 * 228 /// [request] - The metadata request object.
231 * Completes with a [WriteLogEntriesResponse]. 229 ///
232 * 230 /// Request parameters:
233 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 231 ///
234 * error. 232 /// Completes with a [WriteLogEntriesResponse].
235 * 233 ///
236 * If the used [http.Client] completes with an error when making a REST call, 234 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
237 * this method will complete with the same error. 235 /// an error.
238 */ 236 ///
237 /// If the used [http.Client] completes with an error when making a REST
238 /// call, this method will complete with the same error.
239 async.Future<WriteLogEntriesResponse> write(WriteLogEntriesRequest request) { 239 async.Future<WriteLogEntriesResponse> write(WriteLogEntriesRequest request) {
240 var _url = null; 240 var _url = null;
241 var _queryParams = new core.Map(); 241 var _queryParams = new core.Map();
242 var _uploadMedia = null; 242 var _uploadMedia = null;
243 var _uploadOptions = null; 243 var _uploadOptions = null;
244 var _downloadOptions = commons.DownloadOptions.Metadata; 244 var _downloadOptions = commons.DownloadOptions.Metadata;
245 var _body = null; 245 var _body = null;
246 246
247 if (request != null) { 247 if (request != null) {
248 _body = convert.JSON.encode((request).toJson()); 248 _body = convert.JSON.encode((request).toJson());
249 } 249 }
250 250
251 _url = 'v2beta1/entries:write'; 251 _url = 'v2beta1/entries:write';
252 252
253 var _response = _requester.request(_url, 253 var _response = _requester.request(_url, "POST",
254 "POST", 254 body: _body,
255 body: _body, 255 queryParams: _queryParams,
256 queryParams: _queryParams, 256 uploadOptions: _uploadOptions,
257 uploadOptions: _uploadOptions, 257 uploadMedia: _uploadMedia,
258 uploadMedia: _uploadMedia, 258 downloadOptions: _downloadOptions);
259 downloadOptions: _downloadOptions);
260 return _response.then((data) => new WriteLogEntriesResponse.fromJson(data)); 259 return _response.then((data) => new WriteLogEntriesResponse.fromJson(data));
261 } 260 }
262
263 } 261 }
264 262
265
266 class MonitoredResourceDescriptorsResourceApi { 263 class MonitoredResourceDescriptorsResourceApi {
267 final commons.ApiRequester _requester; 264 final commons.ApiRequester _requester;
268 265
269 MonitoredResourceDescriptorsResourceApi(commons.ApiRequester client) : 266 MonitoredResourceDescriptorsResourceApi(commons.ApiRequester client)
270 _requester = client; 267 : _requester = client;
271 268
272 /** 269 /// Lists the descriptors for monitored resource types used by Stackdriver
273 * Lists the descriptors for monitored resource types used by Stackdriver 270 /// Logging.
274 * Logging. 271 ///
275 * 272 /// Request parameters:
276 * Request parameters: 273 ///
277 * 274 /// [pageToken] - Optional. If present, then retrieve the next batch of
278 * [pageSize] - Optional. The maximum number of results to return from this 275 /// results from the preceding call to this method. pageToken must be the
279 * request. Non-positive values are ignored. The presence of nextPageToken in 276 /// value of nextPageToken from the previous response. The values of other
280 * the response indicates that more results might be available. 277 /// method parameters should be identical to those in the previous call.
281 * 278 ///
282 * [pageToken] - Optional. If present, then retrieve the next batch of results 279 /// [pageSize] - Optional. The maximum number of results to return from this
283 * from the preceding call to this method. pageToken must be the value of 280 /// request. Non-positive values are ignored. The presence of nextPageToken
284 * nextPageToken from the previous response. The values of other method 281 /// in the response indicates that more results might be available.
285 * parameters should be identical to those in the previous call. 282 ///
286 * 283 /// Completes with a [ListMonitoredResourceDescriptorsResponse].
287 * Completes with a [ListMonitoredResourceDescriptorsResponse]. 284 ///
288 * 285 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
289 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 286 /// an error.
290 * error. 287 ///
291 * 288 /// If the used [http.Client] completes with an error when making a REST
292 * If the used [http.Client] completes with an error when making a REST call, 289 /// call, this method will complete with the same error.
293 * this method will complete with the same error. 290 async.Future<ListMonitoredResourceDescriptorsResponse> list(
294 */ 291 {core.String pageToken, core.int pageSize}) {
295 async.Future<ListMonitoredResourceDescriptorsResponse> list({core.int pageSize , core.String pageToken}) {
296 var _url = null; 292 var _url = null;
297 var _queryParams = new core.Map(); 293 var _queryParams = new core.Map();
298 var _uploadMedia = null; 294 var _uploadMedia = null;
299 var _uploadOptions = null; 295 var _uploadOptions = null;
300 var _downloadOptions = commons.DownloadOptions.Metadata; 296 var _downloadOptions = commons.DownloadOptions.Metadata;
301 var _body = null; 297 var _body = null;
302 298
299 if (pageToken != null) {
300 _queryParams["pageToken"] = [pageToken];
301 }
303 if (pageSize != null) { 302 if (pageSize != null) {
304 _queryParams["pageSize"] = ["${pageSize}"]; 303 _queryParams["pageSize"] = ["${pageSize}"];
305 } 304 }
306 if (pageToken != null) {
307 _queryParams["pageToken"] = [pageToken];
308 }
309 305
310 _url = 'v2beta1/monitoredResourceDescriptors'; 306 _url = 'v2beta1/monitoredResourceDescriptors';
311 307
312 var _response = _requester.request(_url, 308 var _response = _requester.request(_url, "GET",
313 "GET", 309 body: _body,
314 body: _body, 310 queryParams: _queryParams,
315 queryParams: _queryParams, 311 uploadOptions: _uploadOptions,
316 uploadOptions: _uploadOptions, 312 uploadMedia: _uploadMedia,
317 uploadMedia: _uploadMedia, 313 downloadOptions: _downloadOptions);
318 downloadOptions: _downloadOptions); 314 return _response.then(
319 return _response.then((data) => new ListMonitoredResourceDescriptorsResponse .fromJson(data)); 315 (data) => new ListMonitoredResourceDescriptorsResponse.fromJson(data));
320 } 316 }
321
322 } 317 }
323 318
324
325 class OrganizationsResourceApi { 319 class OrganizationsResourceApi {
326 final commons.ApiRequester _requester; 320 final commons.ApiRequester _requester;
327 321
328 OrganizationsLogsResourceApi get logs => new OrganizationsLogsResourceApi(_req uester); 322 OrganizationsLogsResourceApi get logs =>
323 new OrganizationsLogsResourceApi(_requester);
329 324
330 OrganizationsResourceApi(commons.ApiRequester client) : 325 OrganizationsResourceApi(commons.ApiRequester client) : _requester = client;
331 _requester = client;
332 } 326 }
333 327
334
335 class OrganizationsLogsResourceApi { 328 class OrganizationsLogsResourceApi {
336 final commons.ApiRequester _requester; 329 final commons.ApiRequester _requester;
337 330
338 OrganizationsLogsResourceApi(commons.ApiRequester client) : 331 OrganizationsLogsResourceApi(commons.ApiRequester client)
339 _requester = client; 332 : _requester = client;
340 333
341 /** 334 /// Deletes all the log entries in a log. The log reappears if it receives
342 * Deletes all the log entries in a log. The log reappears if it receives new 335 /// new entries. Log entries written shortly before the delete operation
343 * entries. Log entries written shortly before the delete operation might not 336 /// might not be deleted.
344 * be deleted. 337 ///
345 * 338 /// Request parameters:
346 * Request parameters: 339 ///
347 * 340 /// [logName] - Required. The resource name of the log to delete:
348 * [logName] - Required. The resource name of the log to delete: 341 /// "projects/[PROJECT_ID]/logs/[LOG_ID]"
349 * "projects/[PROJECT_ID]/logs/[LOG_ID]" 342 /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
350 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" 343 /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
351 * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" 344 /// "folders/[FOLDER_ID]/logs/[LOG_ID]"
352 * "folders/[FOLDER_ID]/logs/[LOG_ID]" 345 /// [LOG_ID] must be URL-encoded. For example,
353 * [LOG_ID] must be URL-encoded. For example, 346 /// "projects/my-project-id/logs/syslog",
354 * "projects/my-project-id/logs/syslog", 347 /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factiv ity".
355 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty". 348 /// For more information about log names, see LogEntry.
356 * For more information about log names, see LogEntry. 349 /// Value must have pattern "^organizations/[^/]+/logs/[^/]+$".
357 * Value must have pattern "^organizations/[^/]+/logs/[^/]+$". 350 ///
358 * 351 /// Completes with a [Empty].
359 * Completes with a [Empty]. 352 ///
360 * 353 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
361 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 354 /// an error.
362 * error. 355 ///
363 * 356 /// If the used [http.Client] completes with an error when making a REST
364 * If the used [http.Client] completes with an error when making a REST call, 357 /// call, this method will complete with the same error.
365 * this method will complete with the same error.
366 */
367 async.Future<Empty> delete(core.String logName) { 358 async.Future<Empty> delete(core.String logName) {
368 var _url = null; 359 var _url = null;
369 var _queryParams = new core.Map(); 360 var _queryParams = new core.Map();
370 var _uploadMedia = null; 361 var _uploadMedia = null;
371 var _uploadOptions = null; 362 var _uploadOptions = null;
372 var _downloadOptions = commons.DownloadOptions.Metadata; 363 var _downloadOptions = commons.DownloadOptions.Metadata;
373 var _body = null; 364 var _body = null;
374 365
375 if (logName == null) { 366 if (logName == null) {
376 throw new core.ArgumentError("Parameter logName is required."); 367 throw new core.ArgumentError("Parameter logName is required.");
377 } 368 }
378 369
379 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$logName'); 370 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$logName');
380 371
381 var _response = _requester.request(_url, 372 var _response = _requester.request(_url, "DELETE",
382 "DELETE", 373 body: _body,
383 body: _body, 374 queryParams: _queryParams,
384 queryParams: _queryParams, 375 uploadOptions: _uploadOptions,
385 uploadOptions: _uploadOptions, 376 uploadMedia: _uploadMedia,
386 uploadMedia: _uploadMedia, 377 downloadOptions: _downloadOptions);
387 downloadOptions: _downloadOptions);
388 return _response.then((data) => new Empty.fromJson(data)); 378 return _response.then((data) => new Empty.fromJson(data));
389 } 379 }
390 380
391 /** 381 /// Lists the logs in projects, organizations, folders, or billing accounts.
392 * Lists the logs in projects, organizations, folders, or billing accounts. 382 /// Only logs that have entries are listed.
393 * Only logs that have entries are listed. 383 ///
394 * 384 /// Request parameters:
395 * Request parameters: 385 ///
396 * 386 /// [parent] - Required. The resource name that owns the logs:
397 * [parent] - Required. The resource name that owns the logs: 387 /// "projects/[PROJECT_ID]"
398 * "projects/[PROJECT_ID]" 388 /// "organizations/[ORGANIZATION_ID]"
399 * "organizations/[ORGANIZATION_ID]" 389 /// "billingAccounts/[BILLING_ACCOUNT_ID]"
400 * "billingAccounts/[BILLING_ACCOUNT_ID]" 390 /// "folders/[FOLDER_ID]"
401 * "folders/[FOLDER_ID]" 391 ///
402 * 392 /// Value must have pattern "^organizations/[^/]+$".
403 * Value must have pattern "^organizations/[^/]+$". 393 ///
404 * 394 /// [pageToken] - Optional. If present, then retrieve the next batch of
405 * [pageToken] - Optional. If present, then retrieve the next batch of results 395 /// results from the preceding call to this method. pageToken must be the
406 * from the preceding call to this method. pageToken must be the value of 396 /// value of nextPageToken from the previous response. The values of other
407 * nextPageToken from the previous response. The values of other method 397 /// method parameters should be identical to those in the previous call.
408 * parameters should be identical to those in the previous call. 398 ///
409 * 399 /// [pageSize] - Optional. The maximum number of results to return from this
410 * [pageSize] - Optional. The maximum number of results to return from this 400 /// request. Non-positive values are ignored. The presence of nextPageToken
411 * request. Non-positive values are ignored. The presence of nextPageToken in 401 /// in the response indicates that more results might be available.
412 * the response indicates that more results might be available. 402 ///
413 * 403 /// Completes with a [ListLogsResponse].
414 * Completes with a [ListLogsResponse]. 404 ///
415 * 405 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
416 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 406 /// an error.
417 * error. 407 ///
418 * 408 /// If the used [http.Client] completes with an error when making a REST
419 * If the used [http.Client] completes with an error when making a REST call, 409 /// call, this method will complete with the same error.
420 * this method will complete with the same error. 410 async.Future<ListLogsResponse> list(core.String parent,
421 */ 411 {core.String pageToken, core.int pageSize}) {
422 async.Future<ListLogsResponse> list(core.String parent, {core.String pageToken , core.int pageSize}) {
423 var _url = null; 412 var _url = null;
424 var _queryParams = new core.Map(); 413 var _queryParams = new core.Map();
425 var _uploadMedia = null; 414 var _uploadMedia = null;
426 var _uploadOptions = null; 415 var _uploadOptions = null;
427 var _downloadOptions = commons.DownloadOptions.Metadata; 416 var _downloadOptions = commons.DownloadOptions.Metadata;
428 var _body = null; 417 var _body = null;
429 418
430 if (parent == null) { 419 if (parent == null) {
431 throw new core.ArgumentError("Parameter parent is required."); 420 throw new core.ArgumentError("Parameter parent is required.");
432 } 421 }
433 if (pageToken != null) { 422 if (pageToken != null) {
434 _queryParams["pageToken"] = [pageToken]; 423 _queryParams["pageToken"] = [pageToken];
435 } 424 }
436 if (pageSize != null) { 425 if (pageSize != null) {
437 _queryParams["pageSize"] = ["${pageSize}"]; 426 _queryParams["pageSize"] = ["${pageSize}"];
438 } 427 }
439 428
440 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/log s'; 429 _url =
430 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs';
441 431
442 var _response = _requester.request(_url, 432 var _response = _requester.request(_url, "GET",
443 "GET", 433 body: _body,
444 body: _body, 434 queryParams: _queryParams,
445 queryParams: _queryParams, 435 uploadOptions: _uploadOptions,
446 uploadOptions: _uploadOptions, 436 uploadMedia: _uploadMedia,
447 uploadMedia: _uploadMedia, 437 downloadOptions: _downloadOptions);
448 downloadOptions: _downloadOptions);
449 return _response.then((data) => new ListLogsResponse.fromJson(data)); 438 return _response.then((data) => new ListLogsResponse.fromJson(data));
450 } 439 }
451
452 } 440 }
453 441
454
455 class ProjectsResourceApi { 442 class ProjectsResourceApi {
456 final commons.ApiRequester _requester; 443 final commons.ApiRequester _requester;
457 444
458 ProjectsLogsResourceApi get logs => new ProjectsLogsResourceApi(_requester); 445 ProjectsLogsResourceApi get logs => new ProjectsLogsResourceApi(_requester);
459 ProjectsMetricsResourceApi get metrics => new ProjectsMetricsResourceApi(_requ ester); 446 ProjectsMetricsResourceApi get metrics =>
460 ProjectsSinksResourceApi get sinks => new ProjectsSinksResourceApi(_requester) ; 447 new ProjectsMetricsResourceApi(_requester);
448 ProjectsSinksResourceApi get sinks =>
449 new ProjectsSinksResourceApi(_requester);
461 450
462 ProjectsResourceApi(commons.ApiRequester client) : 451 ProjectsResourceApi(commons.ApiRequester client) : _requester = client;
463 _requester = client;
464 } 452 }
465 453
466
467 class ProjectsLogsResourceApi { 454 class ProjectsLogsResourceApi {
468 final commons.ApiRequester _requester; 455 final commons.ApiRequester _requester;
469 456
470 ProjectsLogsResourceApi(commons.ApiRequester client) : 457 ProjectsLogsResourceApi(commons.ApiRequester client) : _requester = client;
471 _requester = client;
472 458
473 /** 459 /// Deletes all the log entries in a log. The log reappears if it receives
474 * Deletes all the log entries in a log. The log reappears if it receives new 460 /// new entries. Log entries written shortly before the delete operation
475 * entries. Log entries written shortly before the delete operation might not 461 /// might not be deleted.
476 * be deleted. 462 ///
477 * 463 /// Request parameters:
478 * Request parameters: 464 ///
479 * 465 /// [logName] - Required. The resource name of the log to delete:
480 * [logName] - Required. The resource name of the log to delete: 466 /// "projects/[PROJECT_ID]/logs/[LOG_ID]"
481 * "projects/[PROJECT_ID]/logs/[LOG_ID]" 467 /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
482 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" 468 /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
483 * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" 469 /// "folders/[FOLDER_ID]/logs/[LOG_ID]"
484 * "folders/[FOLDER_ID]/logs/[LOG_ID]" 470 /// [LOG_ID] must be URL-encoded. For example,
485 * [LOG_ID] must be URL-encoded. For example, 471 /// "projects/my-project-id/logs/syslog",
486 * "projects/my-project-id/logs/syslog", 472 /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factiv ity".
487 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty". 473 /// For more information about log names, see LogEntry.
488 * For more information about log names, see LogEntry. 474 /// Value must have pattern "^projects/[^/]+/logs/[^/]+$".
489 * Value must have pattern "^projects/[^/]+/logs/[^/]+$". 475 ///
490 * 476 /// Completes with a [Empty].
491 * Completes with a [Empty]. 477 ///
492 * 478 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
493 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 479 /// an error.
494 * error. 480 ///
495 * 481 /// If the used [http.Client] completes with an error when making a REST
496 * If the used [http.Client] completes with an error when making a REST call, 482 /// call, this method will complete with the same error.
497 * this method will complete with the same error.
498 */
499 async.Future<Empty> delete(core.String logName) { 483 async.Future<Empty> delete(core.String logName) {
500 var _url = null; 484 var _url = null;
501 var _queryParams = new core.Map(); 485 var _queryParams = new core.Map();
502 var _uploadMedia = null; 486 var _uploadMedia = null;
503 var _uploadOptions = null; 487 var _uploadOptions = null;
504 var _downloadOptions = commons.DownloadOptions.Metadata; 488 var _downloadOptions = commons.DownloadOptions.Metadata;
505 var _body = null; 489 var _body = null;
506 490
507 if (logName == null) { 491 if (logName == null) {
508 throw new core.ArgumentError("Parameter logName is required."); 492 throw new core.ArgumentError("Parameter logName is required.");
509 } 493 }
510 494
511 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$logName'); 495 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$logName');
512 496
513 var _response = _requester.request(_url, 497 var _response = _requester.request(_url, "DELETE",
514 "DELETE", 498 body: _body,
515 body: _body, 499 queryParams: _queryParams,
516 queryParams: _queryParams, 500 uploadOptions: _uploadOptions,
517 uploadOptions: _uploadOptions, 501 uploadMedia: _uploadMedia,
518 uploadMedia: _uploadMedia, 502 downloadOptions: _downloadOptions);
519 downloadOptions: _downloadOptions);
520 return _response.then((data) => new Empty.fromJson(data)); 503 return _response.then((data) => new Empty.fromJson(data));
521 } 504 }
522 505
523 /** 506 /// Lists the logs in projects, organizations, folders, or billing accounts.
524 * Lists the logs in projects, organizations, folders, or billing accounts. 507 /// Only logs that have entries are listed.
525 * Only logs that have entries are listed. 508 ///
526 * 509 /// Request parameters:
527 * Request parameters: 510 ///
528 * 511 /// [parent] - Required. The resource name that owns the logs:
529 * [parent] - Required. The resource name that owns the logs: 512 /// "projects/[PROJECT_ID]"
530 * "projects/[PROJECT_ID]" 513 /// "organizations/[ORGANIZATION_ID]"
531 * "organizations/[ORGANIZATION_ID]" 514 /// "billingAccounts/[BILLING_ACCOUNT_ID]"
532 * "billingAccounts/[BILLING_ACCOUNT_ID]" 515 /// "folders/[FOLDER_ID]"
533 * "folders/[FOLDER_ID]" 516 ///
534 * 517 /// Value must have pattern "^projects/[^/]+$".
535 * Value must have pattern "^projects/[^/]+$". 518 ///
536 * 519 /// [pageToken] - Optional. If present, then retrieve the next batch of
537 * [pageSize] - Optional. The maximum number of results to return from this 520 /// results from the preceding call to this method. pageToken must be the
538 * request. Non-positive values are ignored. The presence of nextPageToken in 521 /// value of nextPageToken from the previous response. The values of other
539 * the response indicates that more results might be available. 522 /// method parameters should be identical to those in the previous call.
540 * 523 ///
541 * [pageToken] - Optional. If present, then retrieve the next batch of results 524 /// [pageSize] - Optional. The maximum number of results to return from this
542 * from the preceding call to this method. pageToken must be the value of 525 /// request. Non-positive values are ignored. The presence of nextPageToken
543 * nextPageToken from the previous response. The values of other method 526 /// in the response indicates that more results might be available.
544 * parameters should be identical to those in the previous call. 527 ///
545 * 528 /// Completes with a [ListLogsResponse].
546 * Completes with a [ListLogsResponse]. 529 ///
547 * 530 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
548 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 531 /// an error.
549 * error. 532 ///
550 * 533 /// If the used [http.Client] completes with an error when making a REST
551 * If the used [http.Client] completes with an error when making a REST call, 534 /// call, this method will complete with the same error.
552 * this method will complete with the same error. 535 async.Future<ListLogsResponse> list(core.String parent,
553 */ 536 {core.String pageToken, core.int pageSize}) {
554 async.Future<ListLogsResponse> list(core.String parent, {core.int pageSize, co re.String pageToken}) {
555 var _url = null; 537 var _url = null;
556 var _queryParams = new core.Map(); 538 var _queryParams = new core.Map();
557 var _uploadMedia = null; 539 var _uploadMedia = null;
558 var _uploadOptions = null; 540 var _uploadOptions = null;
559 var _downloadOptions = commons.DownloadOptions.Metadata; 541 var _downloadOptions = commons.DownloadOptions.Metadata;
560 var _body = null; 542 var _body = null;
561 543
562 if (parent == null) { 544 if (parent == null) {
563 throw new core.ArgumentError("Parameter parent is required."); 545 throw new core.ArgumentError("Parameter parent is required.");
564 } 546 }
547 if (pageToken != null) {
548 _queryParams["pageToken"] = [pageToken];
549 }
565 if (pageSize != null) { 550 if (pageSize != null) {
566 _queryParams["pageSize"] = ["${pageSize}"]; 551 _queryParams["pageSize"] = ["${pageSize}"];
567 } 552 }
568 if (pageToken != null) {
569 _queryParams["pageToken"] = [pageToken];
570 }
571 553
572 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/log s'; 554 _url =
555 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs';
573 556
574 var _response = _requester.request(_url, 557 var _response = _requester.request(_url, "GET",
575 "GET", 558 body: _body,
576 body: _body, 559 queryParams: _queryParams,
577 queryParams: _queryParams, 560 uploadOptions: _uploadOptions,
578 uploadOptions: _uploadOptions, 561 uploadMedia: _uploadMedia,
579 uploadMedia: _uploadMedia, 562 downloadOptions: _downloadOptions);
580 downloadOptions: _downloadOptions);
581 return _response.then((data) => new ListLogsResponse.fromJson(data)); 563 return _response.then((data) => new ListLogsResponse.fromJson(data));
582 } 564 }
583
584 } 565 }
585 566
586
587 class ProjectsMetricsResourceApi { 567 class ProjectsMetricsResourceApi {
588 final commons.ApiRequester _requester; 568 final commons.ApiRequester _requester;
589 569
590 ProjectsMetricsResourceApi(commons.ApiRequester client) : 570 ProjectsMetricsResourceApi(commons.ApiRequester client) : _requester = client;
591 _requester = client;
592 571
593 /** 572 /// Creates a logs-based metric.
594 * Creates a logs-based metric. 573 ///
595 * 574 /// [request] - The metadata request object.
596 * [request] - The metadata request object. 575 ///
597 * 576 /// Request parameters:
598 * Request parameters: 577 ///
599 * 578 /// [parent] - The resource name of the project in which to create the
600 * [parent] - The resource name of the project in which to create the metric: 579 /// metric:
601 * "projects/[PROJECT_ID]" 580 /// "projects/[PROJECT_ID]"
602 * The new metric must be provided in the request. 581 /// The new metric must be provided in the request.
603 * Value must have pattern "^projects/[^/]+$". 582 /// Value must have pattern "^projects/[^/]+$".
604 * 583 ///
605 * Completes with a [LogMetric]. 584 /// Completes with a [LogMetric].
606 * 585 ///
607 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 586 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
608 * error. 587 /// an error.
609 * 588 ///
610 * If the used [http.Client] completes with an error when making a REST call, 589 /// If the used [http.Client] completes with an error when making a REST
611 * this method will complete with the same error. 590 /// call, this method will complete with the same error.
612 */
613 async.Future<LogMetric> create(LogMetric request, core.String parent) { 591 async.Future<LogMetric> create(LogMetric request, core.String parent) {
614 var _url = null; 592 var _url = null;
615 var _queryParams = new core.Map(); 593 var _queryParams = new core.Map();
616 var _uploadMedia = null; 594 var _uploadMedia = null;
617 var _uploadOptions = null; 595 var _uploadOptions = null;
618 var _downloadOptions = commons.DownloadOptions.Metadata; 596 var _downloadOptions = commons.DownloadOptions.Metadata;
619 var _body = null; 597 var _body = null;
620 598
621 if (request != null) { 599 if (request != null) {
622 _body = convert.JSON.encode((request).toJson()); 600 _body = convert.JSON.encode((request).toJson());
623 } 601 }
624 if (parent == null) { 602 if (parent == null) {
625 throw new core.ArgumentError("Parameter parent is required."); 603 throw new core.ArgumentError("Parameter parent is required.");
626 } 604 }
627 605
628 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/met rics'; 606 _url = 'v2beta1/' +
607 commons.Escaper.ecapeVariableReserved('$parent') +
608 '/metrics';
629 609
630 var _response = _requester.request(_url, 610 var _response = _requester.request(_url, "POST",
631 "POST", 611 body: _body,
632 body: _body, 612 queryParams: _queryParams,
633 queryParams: _queryParams, 613 uploadOptions: _uploadOptions,
634 uploadOptions: _uploadOptions, 614 uploadMedia: _uploadMedia,
635 uploadMedia: _uploadMedia, 615 downloadOptions: _downloadOptions);
636 downloadOptions: _downloadOptions);
637 return _response.then((data) => new LogMetric.fromJson(data)); 616 return _response.then((data) => new LogMetric.fromJson(data));
638 } 617 }
639 618
640 /** 619 /// Deletes a logs-based metric.
641 * Deletes a logs-based metric. 620 ///
642 * 621 /// Request parameters:
643 * Request parameters: 622 ///
644 * 623 /// [metricName] - The resource name of the metric to delete:
645 * [metricName] - The resource name of the metric to delete: 624 /// "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
646 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" 625 ///
647 * 626 /// Value must have pattern "^projects/[^/]+/metrics/[^/]+$".
648 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". 627 ///
649 * 628 /// Completes with a [Empty].
650 * Completes with a [Empty]. 629 ///
651 * 630 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
652 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 631 /// an error.
653 * error. 632 ///
654 * 633 /// If the used [http.Client] completes with an error when making a REST
655 * If the used [http.Client] completes with an error when making a REST call, 634 /// call, this method will complete with the same error.
656 * this method will complete with the same error.
657 */
658 async.Future<Empty> delete(core.String metricName) { 635 async.Future<Empty> delete(core.String metricName) {
659 var _url = null; 636 var _url = null;
660 var _queryParams = new core.Map(); 637 var _queryParams = new core.Map();
661 var _uploadMedia = null; 638 var _uploadMedia = null;
662 var _uploadOptions = null; 639 var _uploadOptions = null;
663 var _downloadOptions = commons.DownloadOptions.Metadata; 640 var _downloadOptions = commons.DownloadOptions.Metadata;
664 var _body = null; 641 var _body = null;
665 642
666 if (metricName == null) { 643 if (metricName == null) {
667 throw new core.ArgumentError("Parameter metricName is required."); 644 throw new core.ArgumentError("Parameter metricName is required.");
668 } 645 }
669 646
670 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$metricName'); 647 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$metricName');
671 648
672 var _response = _requester.request(_url, 649 var _response = _requester.request(_url, "DELETE",
673 "DELETE", 650 body: _body,
674 body: _body, 651 queryParams: _queryParams,
675 queryParams: _queryParams, 652 uploadOptions: _uploadOptions,
676 uploadOptions: _uploadOptions, 653 uploadMedia: _uploadMedia,
677 uploadMedia: _uploadMedia, 654 downloadOptions: _downloadOptions);
678 downloadOptions: _downloadOptions);
679 return _response.then((data) => new Empty.fromJson(data)); 655 return _response.then((data) => new Empty.fromJson(data));
680 } 656 }
681 657
682 /** 658 /// Gets a logs-based metric.
683 * Gets a logs-based metric. 659 ///
684 * 660 /// Request parameters:
685 * Request parameters: 661 ///
686 * 662 /// [metricName] - The resource name of the desired metric:
687 * [metricName] - The resource name of the desired metric: 663 /// "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
688 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" 664 ///
689 * 665 /// Value must have pattern "^projects/[^/]+/metrics/[^/]+$".
690 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". 666 ///
691 * 667 /// Completes with a [LogMetric].
692 * Completes with a [LogMetric]. 668 ///
693 * 669 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
694 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 670 /// an error.
695 * error. 671 ///
696 * 672 /// If the used [http.Client] completes with an error when making a REST
697 * If the used [http.Client] completes with an error when making a REST call, 673 /// call, this method will complete with the same error.
698 * this method will complete with the same error.
699 */
700 async.Future<LogMetric> get(core.String metricName) { 674 async.Future<LogMetric> get(core.String metricName) {
701 var _url = null; 675 var _url = null;
702 var _queryParams = new core.Map(); 676 var _queryParams = new core.Map();
703 var _uploadMedia = null; 677 var _uploadMedia = null;
704 var _uploadOptions = null; 678 var _uploadOptions = null;
705 var _downloadOptions = commons.DownloadOptions.Metadata; 679 var _downloadOptions = commons.DownloadOptions.Metadata;
706 var _body = null; 680 var _body = null;
707 681
708 if (metricName == null) { 682 if (metricName == null) {
709 throw new core.ArgumentError("Parameter metricName is required."); 683 throw new core.ArgumentError("Parameter metricName is required.");
710 } 684 }
711 685
712 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$metricName'); 686 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$metricName');
713 687
714 var _response = _requester.request(_url, 688 var _response = _requester.request(_url, "GET",
715 "GET", 689 body: _body,
716 body: _body, 690 queryParams: _queryParams,
717 queryParams: _queryParams, 691 uploadOptions: _uploadOptions,
718 uploadOptions: _uploadOptions, 692 uploadMedia: _uploadMedia,
719 uploadMedia: _uploadMedia, 693 downloadOptions: _downloadOptions);
720 downloadOptions: _downloadOptions);
721 return _response.then((data) => new LogMetric.fromJson(data)); 694 return _response.then((data) => new LogMetric.fromJson(data));
722 } 695 }
723 696
724 /** 697 /// Lists logs-based metrics.
725 * Lists logs-based metrics. 698 ///
726 * 699 /// Request parameters:
727 * Request parameters: 700 ///
728 * 701 /// [parent] - Required. The name of the project containing the metrics:
729 * [parent] - Required. The name of the project containing the metrics: 702 /// "projects/[PROJECT_ID]"
730 * "projects/[PROJECT_ID]" 703 ///
731 * 704 /// Value must have pattern "^projects/[^/]+$".
732 * Value must have pattern "^projects/[^/]+$". 705 ///
733 * 706 /// [pageToken] - Optional. If present, then retrieve the next batch of
734 * [pageToken] - Optional. If present, then retrieve the next batch of results 707 /// results from the preceding call to this method. pageToken must be the
735 * from the preceding call to this method. pageToken must be the value of 708 /// value of nextPageToken from the previous response. The values of other
736 * nextPageToken from the previous response. The values of other method 709 /// method parameters should be identical to those in the previous call.
737 * parameters should be identical to those in the previous call. 710 ///
738 * 711 /// [pageSize] - Optional. The maximum number of results to return from this
739 * [pageSize] - Optional. The maximum number of results to return from this 712 /// request. Non-positive values are ignored. The presence of nextPageToken
740 * request. Non-positive values are ignored. The presence of nextPageToken in 713 /// in the response indicates that more results might be available.
741 * the response indicates that more results might be available. 714 ///
742 * 715 /// Completes with a [ListLogMetricsResponse].
743 * Completes with a [ListLogMetricsResponse]. 716 ///
744 * 717 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
745 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 718 /// an error.
746 * error. 719 ///
747 * 720 /// If the used [http.Client] completes with an error when making a REST
748 * If the used [http.Client] completes with an error when making a REST call, 721 /// call, this method will complete with the same error.
749 * this method will complete with the same error. 722 async.Future<ListLogMetricsResponse> list(core.String parent,
750 */ 723 {core.String pageToken, core.int pageSize}) {
751 async.Future<ListLogMetricsResponse> list(core.String parent, {core.String pag eToken, core.int pageSize}) {
752 var _url = null; 724 var _url = null;
753 var _queryParams = new core.Map(); 725 var _queryParams = new core.Map();
754 var _uploadMedia = null; 726 var _uploadMedia = null;
755 var _uploadOptions = null; 727 var _uploadOptions = null;
756 var _downloadOptions = commons.DownloadOptions.Metadata; 728 var _downloadOptions = commons.DownloadOptions.Metadata;
757 var _body = null; 729 var _body = null;
758 730
759 if (parent == null) { 731 if (parent == null) {
760 throw new core.ArgumentError("Parameter parent is required."); 732 throw new core.ArgumentError("Parameter parent is required.");
761 } 733 }
762 if (pageToken != null) { 734 if (pageToken != null) {
763 _queryParams["pageToken"] = [pageToken]; 735 _queryParams["pageToken"] = [pageToken];
764 } 736 }
765 if (pageSize != null) { 737 if (pageSize != null) {
766 _queryParams["pageSize"] = ["${pageSize}"]; 738 _queryParams["pageSize"] = ["${pageSize}"];
767 } 739 }
768 740
769 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/met rics'; 741 _url = 'v2beta1/' +
742 commons.Escaper.ecapeVariableReserved('$parent') +
743 '/metrics';
770 744
771 var _response = _requester.request(_url, 745 var _response = _requester.request(_url, "GET",
772 "GET", 746 body: _body,
773 body: _body, 747 queryParams: _queryParams,
774 queryParams: _queryParams, 748 uploadOptions: _uploadOptions,
775 uploadOptions: _uploadOptions, 749 uploadMedia: _uploadMedia,
776 uploadMedia: _uploadMedia, 750 downloadOptions: _downloadOptions);
777 downloadOptions: _downloadOptions);
778 return _response.then((data) => new ListLogMetricsResponse.fromJson(data)); 751 return _response.then((data) => new ListLogMetricsResponse.fromJson(data));
779 } 752 }
780 753
781 /** 754 /// Creates or updates a logs-based metric.
782 * Creates or updates a logs-based metric. 755 ///
783 * 756 /// [request] - The metadata request object.
784 * [request] - The metadata request object. 757 ///
785 * 758 /// Request parameters:
786 * Request parameters: 759 ///
787 * 760 /// [metricName] - The resource name of the metric to update:
788 * [metricName] - The resource name of the metric to update: 761 /// "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
789 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" 762 /// The updated metric must be provided in the request and it's name field
790 * The updated metric must be provided in the request and it's name field must 763 /// must be the same as [METRIC_ID] If the metric does not exist in
791 * be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], 764 /// [PROJECT_ID], then a new metric is created.
792 * then a new metric is created. 765 /// Value must have pattern "^projects/[^/]+/metrics/[^/]+$".
793 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". 766 ///
794 * 767 /// Completes with a [LogMetric].
795 * Completes with a [LogMetric]. 768 ///
796 * 769 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
797 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 770 /// an error.
798 * error. 771 ///
799 * 772 /// If the used [http.Client] completes with an error when making a REST
800 * If the used [http.Client] completes with an error when making a REST call, 773 /// call, this method will complete with the same error.
801 * this method will complete with the same error.
802 */
803 async.Future<LogMetric> update(LogMetric request, core.String metricName) { 774 async.Future<LogMetric> update(LogMetric request, core.String metricName) {
804 var _url = null; 775 var _url = null;
805 var _queryParams = new core.Map(); 776 var _queryParams = new core.Map();
806 var _uploadMedia = null; 777 var _uploadMedia = null;
807 var _uploadOptions = null; 778 var _uploadOptions = null;
808 var _downloadOptions = commons.DownloadOptions.Metadata; 779 var _downloadOptions = commons.DownloadOptions.Metadata;
809 var _body = null; 780 var _body = null;
810 781
811 if (request != null) { 782 if (request != null) {
812 _body = convert.JSON.encode((request).toJson()); 783 _body = convert.JSON.encode((request).toJson());
813 } 784 }
814 if (metricName == null) { 785 if (metricName == null) {
815 throw new core.ArgumentError("Parameter metricName is required."); 786 throw new core.ArgumentError("Parameter metricName is required.");
816 } 787 }
817 788
818 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$metricName'); 789 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$metricName');
819 790
820 var _response = _requester.request(_url, 791 var _response = _requester.request(_url, "PUT",
821 "PUT", 792 body: _body,
822 body: _body, 793 queryParams: _queryParams,
823 queryParams: _queryParams, 794 uploadOptions: _uploadOptions,
824 uploadOptions: _uploadOptions, 795 uploadMedia: _uploadMedia,
825 uploadMedia: _uploadMedia, 796 downloadOptions: _downloadOptions);
826 downloadOptions: _downloadOptions);
827 return _response.then((data) => new LogMetric.fromJson(data)); 797 return _response.then((data) => new LogMetric.fromJson(data));
828 } 798 }
829
830 } 799 }
831 800
832
833 class ProjectsSinksResourceApi { 801 class ProjectsSinksResourceApi {
834 final commons.ApiRequester _requester; 802 final commons.ApiRequester _requester;
835 803
836 ProjectsSinksResourceApi(commons.ApiRequester client) : 804 ProjectsSinksResourceApi(commons.ApiRequester client) : _requester = client;
837 _requester = client;
838 805
839 /** 806 /// Creates a sink that exports specified log entries to a destination. The
840 * Creates a sink that exports specified log entries to a destination. The 807 /// export of newly-ingested log entries begins immediately, unless the
841 * export of newly-ingested log entries begins immediately, unless the current 808 /// sink's writer_identity is not permitted to write to the destination. A
842 * time is outside the sink's start and end times or the sink's 809 /// sink can export log entries only from the resource owning the sink.
843 * writer_identity is not permitted to write to the destination. A sink can 810 ///
844 * export log entries only from the resource owning the sink. 811 /// [request] - The metadata request object.
845 * 812 ///
846 * [request] - The metadata request object. 813 /// Request parameters:
847 * 814 ///
848 * Request parameters: 815 /// [parent] - Required. The resource in which to create the sink:
849 * 816 /// "projects/[PROJECT_ID]"
850 * [parent] - Required. The resource in which to create the sink: 817 /// "organizations/[ORGANIZATION_ID]"
851 * "projects/[PROJECT_ID]" 818 /// "billingAccounts/[BILLING_ACCOUNT_ID]"
852 * "organizations/[ORGANIZATION_ID]" 819 /// "folders/[FOLDER_ID]"
853 * "billingAccounts/[BILLING_ACCOUNT_ID]" 820 /// Examples: "projects/my-logging-project", "organizations/123456789".
854 * "folders/[FOLDER_ID]" 821 /// Value must have pattern "^projects/[^/]+$".
855 * Examples: "projects/my-logging-project", "organizations/123456789". 822 ///
856 * Value must have pattern "^projects/[^/]+$". 823 /// [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity
857 * 824 /// returned as writer_identity in the new sink. If this value is omitted or
858 * [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity 825 /// set to false, and if the sink's parent is a project, then the value
859 * returned as writer_identity in the new sink. If this value is omitted or 826 /// returned as writer_identity is the same group or service account used by
860 * set to false, and if the sink's parent is a project, then the value 827 /// Stackdriver Logging before the addition of writer identities to this API.
861 * returned as writer_identity is the same group or service account used by 828 /// The sink's destination must be in the same project as the sink itself.If
862 * Stackdriver Logging before the addition of writer identities to this API. 829 /// this field is set to true, or if the sink is owned by a non-project
863 * The sink's destination must be in the same project as the sink itself.If 830 /// resource such as an organization, then the value of writer_identity will
864 * this field is set to true, or if the sink is owned by a non-project 831 /// be a unique service account used only for exports from the new sink. For
865 * resource such as an organization, then the value of writer_identity will be 832 /// more information, see writer_identity in LogSink.
866 * a unique service account used only for exports from the new sink. For more 833 ///
867 * information, see writer_identity in LogSink. 834 /// Completes with a [LogSink].
868 * 835 ///
869 * Completes with a [LogSink]. 836 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
870 * 837 /// an error.
871 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 838 ///
872 * error. 839 /// If the used [http.Client] completes with an error when making a REST
873 * 840 /// call, this method will complete with the same error.
874 * If the used [http.Client] completes with an error when making a REST call, 841 async.Future<LogSink> create(LogSink request, core.String parent,
875 * this method will complete with the same error. 842 {core.bool uniqueWriterIdentity}) {
876 */
877 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u niqueWriterIdentity}) {
878 var _url = null; 843 var _url = null;
879 var _queryParams = new core.Map(); 844 var _queryParams = new core.Map();
880 var _uploadMedia = null; 845 var _uploadMedia = null;
881 var _uploadOptions = null; 846 var _uploadOptions = null;
882 var _downloadOptions = commons.DownloadOptions.Metadata; 847 var _downloadOptions = commons.DownloadOptions.Metadata;
883 var _body = null; 848 var _body = null;
884 849
885 if (request != null) { 850 if (request != null) {
886 _body = convert.JSON.encode((request).toJson()); 851 _body = convert.JSON.encode((request).toJson());
887 } 852 }
888 if (parent == null) { 853 if (parent == null) {
889 throw new core.ArgumentError("Parameter parent is required."); 854 throw new core.ArgumentError("Parameter parent is required.");
890 } 855 }
891 if (uniqueWriterIdentity != null) { 856 if (uniqueWriterIdentity != null) {
892 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; 857 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"];
893 } 858 }
894 859
895 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sin ks'; 860 _url = 'v2beta1/' +
861 commons.Escaper.ecapeVariableReserved('$parent') +
862 '/sinks';
896 863
897 var _response = _requester.request(_url, 864 var _response = _requester.request(_url, "POST",
898 "POST", 865 body: _body,
899 body: _body, 866 queryParams: _queryParams,
900 queryParams: _queryParams, 867 uploadOptions: _uploadOptions,
901 uploadOptions: _uploadOptions, 868 uploadMedia: _uploadMedia,
902 uploadMedia: _uploadMedia, 869 downloadOptions: _downloadOptions);
903 downloadOptions: _downloadOptions);
904 return _response.then((data) => new LogSink.fromJson(data)); 870 return _response.then((data) => new LogSink.fromJson(data));
905 } 871 }
906 872
907 /** 873 /// Deletes a sink. If the sink has a unique writer_identity, then that
908 * Deletes a sink. If the sink has a unique writer_identity, then that service 874 /// service account is also deleted.
909 * account is also deleted. 875 ///
910 * 876 /// Request parameters:
911 * Request parameters: 877 ///
912 * 878 /// [sinkName] - Required. The full resource name of the sink to delete,
913 * [sinkName] - Required. The full resource name of the sink to delete, 879 /// including the parent resource and the sink identifier:
914 * including the parent resource and the sink identifier: 880 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]"
915 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" 881 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
916 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" 882 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
917 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" 883 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]"
918 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" 884 /// Example: "projects/my-project-id/sinks/my-sink-id".
919 * Example: "projects/my-project-id/sinks/my-sink-id". 885 /// Value must have pattern "^projects/[^/]+/sinks/[^/]+$".
920 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". 886 ///
921 * 887 /// Completes with a [Empty].
922 * Completes with a [Empty]. 888 ///
923 * 889 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
924 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 890 /// an error.
925 * error. 891 ///
926 * 892 /// If the used [http.Client] completes with an error when making a REST
927 * If the used [http.Client] completes with an error when making a REST call, 893 /// call, this method will complete with the same error.
928 * this method will complete with the same error.
929 */
930 async.Future<Empty> delete(core.String sinkName) { 894 async.Future<Empty> delete(core.String sinkName) {
931 var _url = null; 895 var _url = null;
932 var _queryParams = new core.Map(); 896 var _queryParams = new core.Map();
933 var _uploadMedia = null; 897 var _uploadMedia = null;
934 var _uploadOptions = null; 898 var _uploadOptions = null;
935 var _downloadOptions = commons.DownloadOptions.Metadata; 899 var _downloadOptions = commons.DownloadOptions.Metadata;
936 var _body = null; 900 var _body = null;
937 901
938 if (sinkName == null) { 902 if (sinkName == null) {
939 throw new core.ArgumentError("Parameter sinkName is required."); 903 throw new core.ArgumentError("Parameter sinkName is required.");
940 } 904 }
941 905
942 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$sinkName'); 906 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$sinkName');
943 907
944 var _response = _requester.request(_url, 908 var _response = _requester.request(_url, "DELETE",
945 "DELETE", 909 body: _body,
946 body: _body, 910 queryParams: _queryParams,
947 queryParams: _queryParams, 911 uploadOptions: _uploadOptions,
948 uploadOptions: _uploadOptions, 912 uploadMedia: _uploadMedia,
949 uploadMedia: _uploadMedia, 913 downloadOptions: _downloadOptions);
950 downloadOptions: _downloadOptions);
951 return _response.then((data) => new Empty.fromJson(data)); 914 return _response.then((data) => new Empty.fromJson(data));
952 } 915 }
953 916
954 /** 917 /// Gets a sink.
955 * Gets a sink. 918 ///
956 * 919 /// Request parameters:
957 * Request parameters: 920 ///
958 * 921 /// [sinkName] - Required. The resource name of the sink:
959 * [sinkName] - Required. The resource name of the sink: 922 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]"
960 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" 923 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
961 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" 924 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
962 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" 925 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]"
963 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" 926 /// Example: "projects/my-project-id/sinks/my-sink-id".
964 * Example: "projects/my-project-id/sinks/my-sink-id". 927 /// Value must have pattern "^projects/[^/]+/sinks/[^/]+$".
965 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". 928 ///
966 * 929 /// Completes with a [LogSink].
967 * Completes with a [LogSink]. 930 ///
968 * 931 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
969 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 932 /// an error.
970 * error. 933 ///
971 * 934 /// If the used [http.Client] completes with an error when making a REST
972 * If the used [http.Client] completes with an error when making a REST call, 935 /// call, this method will complete with the same error.
973 * this method will complete with the same error.
974 */
975 async.Future<LogSink> get(core.String sinkName) { 936 async.Future<LogSink> get(core.String sinkName) {
976 var _url = null; 937 var _url = null;
977 var _queryParams = new core.Map(); 938 var _queryParams = new core.Map();
978 var _uploadMedia = null; 939 var _uploadMedia = null;
979 var _uploadOptions = null; 940 var _uploadOptions = null;
980 var _downloadOptions = commons.DownloadOptions.Metadata; 941 var _downloadOptions = commons.DownloadOptions.Metadata;
981 var _body = null; 942 var _body = null;
982 943
983 if (sinkName == null) { 944 if (sinkName == null) {
984 throw new core.ArgumentError("Parameter sinkName is required."); 945 throw new core.ArgumentError("Parameter sinkName is required.");
985 } 946 }
986 947
987 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$sinkName'); 948 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$sinkName');
988 949
989 var _response = _requester.request(_url, 950 var _response = _requester.request(_url, "GET",
990 "GET", 951 body: _body,
991 body: _body, 952 queryParams: _queryParams,
992 queryParams: _queryParams, 953 uploadOptions: _uploadOptions,
993 uploadOptions: _uploadOptions, 954 uploadMedia: _uploadMedia,
994 uploadMedia: _uploadMedia, 955 downloadOptions: _downloadOptions);
995 downloadOptions: _downloadOptions);
996 return _response.then((data) => new LogSink.fromJson(data)); 956 return _response.then((data) => new LogSink.fromJson(data));
997 } 957 }
998 958
999 /** 959 /// Lists sinks.
1000 * Lists sinks. 960 ///
1001 * 961 /// Request parameters:
1002 * Request parameters: 962 ///
1003 * 963 /// [parent] - Required. The parent resource whose sinks are to be listed:
1004 * [parent] - Required. The parent resource whose sinks are to be listed: 964 /// "projects/[PROJECT_ID]"
1005 * "projects/[PROJECT_ID]" 965 /// "organizations/[ORGANIZATION_ID]"
1006 * "organizations/[ORGANIZATION_ID]" 966 /// "billingAccounts/[BILLING_ACCOUNT_ID]"
1007 * "billingAccounts/[BILLING_ACCOUNT_ID]" 967 /// "folders/[FOLDER_ID]"
1008 * "folders/[FOLDER_ID]" 968 ///
1009 * 969 /// Value must have pattern "^projects/[^/]+$".
1010 * Value must have pattern "^projects/[^/]+$". 970 ///
1011 * 971 /// [pageToken] - Optional. If present, then retrieve the next batch of
1012 * [pageSize] - Optional. The maximum number of results to return from this 972 /// results from the preceding call to this method. pageToken must be the
1013 * request. Non-positive values are ignored. The presence of nextPageToken in 973 /// value of nextPageToken from the previous response. The values of other
1014 * the response indicates that more results might be available. 974 /// method parameters should be identical to those in the previous call.
1015 * 975 ///
1016 * [pageToken] - Optional. If present, then retrieve the next batch of results 976 /// [pageSize] - Optional. The maximum number of results to return from this
1017 * from the preceding call to this method. pageToken must be the value of 977 /// request. Non-positive values are ignored. The presence of nextPageToken
1018 * nextPageToken from the previous response. The values of other method 978 /// in the response indicates that more results might be available.
1019 * parameters should be identical to those in the previous call. 979 ///
1020 * 980 /// Completes with a [ListSinksResponse].
1021 * Completes with a [ListSinksResponse]. 981 ///
1022 * 982 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1023 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 983 /// an error.
1024 * error. 984 ///
1025 * 985 /// If the used [http.Client] completes with an error when making a REST
1026 * If the used [http.Client] completes with an error when making a REST call, 986 /// call, this method will complete with the same error.
1027 * this method will complete with the same error. 987 async.Future<ListSinksResponse> list(core.String parent,
1028 */ 988 {core.String pageToken, core.int pageSize}) {
1029 async.Future<ListSinksResponse> list(core.String parent, {core.int pageSize, c ore.String pageToken}) {
1030 var _url = null; 989 var _url = null;
1031 var _queryParams = new core.Map(); 990 var _queryParams = new core.Map();
1032 var _uploadMedia = null; 991 var _uploadMedia = null;
1033 var _uploadOptions = null; 992 var _uploadOptions = null;
1034 var _downloadOptions = commons.DownloadOptions.Metadata; 993 var _downloadOptions = commons.DownloadOptions.Metadata;
1035 var _body = null; 994 var _body = null;
1036 995
1037 if (parent == null) { 996 if (parent == null) {
1038 throw new core.ArgumentError("Parameter parent is required."); 997 throw new core.ArgumentError("Parameter parent is required.");
1039 } 998 }
999 if (pageToken != null) {
1000 _queryParams["pageToken"] = [pageToken];
1001 }
1040 if (pageSize != null) { 1002 if (pageSize != null) {
1041 _queryParams["pageSize"] = ["${pageSize}"]; 1003 _queryParams["pageSize"] = ["${pageSize}"];
1042 } 1004 }
1043 if (pageToken != null) {
1044 _queryParams["pageToken"] = [pageToken];
1045 }
1046 1005
1047 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sin ks'; 1006 _url = 'v2beta1/' +
1007 commons.Escaper.ecapeVariableReserved('$parent') +
1008 '/sinks';
1048 1009
1049 var _response = _requester.request(_url, 1010 var _response = _requester.request(_url, "GET",
1050 "GET", 1011 body: _body,
1051 body: _body, 1012 queryParams: _queryParams,
1052 queryParams: _queryParams, 1013 uploadOptions: _uploadOptions,
1053 uploadOptions: _uploadOptions, 1014 uploadMedia: _uploadMedia,
1054 uploadMedia: _uploadMedia, 1015 downloadOptions: _downloadOptions);
1055 downloadOptions: _downloadOptions);
1056 return _response.then((data) => new ListSinksResponse.fromJson(data)); 1016 return _response.then((data) => new ListSinksResponse.fromJson(data));
1057 } 1017 }
1058 1018
1059 /** 1019 /// Updates a sink. This method replaces the following fields in the existing
1060 * Updates a sink. This method replaces the following fields in the existing 1020 /// sink with values from the new sink: destination, and filter. The updated
1061 * sink with values from the new sink: destination, filter, 1021 /// sink might also have a new writer_identity; see the
1062 * output_version_format, start_time, and end_time. The updated sink might 1022 /// unique_writer_identity field.
1063 * also have a new writer_identity; see the unique_writer_identity field. 1023 ///
1064 * 1024 /// [request] - The metadata request object.
1065 * [request] - The metadata request object. 1025 ///
1066 * 1026 /// Request parameters:
1067 * Request parameters: 1027 ///
1068 * 1028 /// [sinkName] - Required. The full resource name of the sink to update,
1069 * [sinkName] - Required. The full resource name of the sink to update, 1029 /// including the parent resource and the sink identifier:
1070 * including the parent resource and the sink identifier: 1030 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1071 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" 1031 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1072 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" 1032 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
1073 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" 1033 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]"
1074 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" 1034 /// Example: "projects/my-project-id/sinks/my-sink-id".
1075 * Example: "projects/my-project-id/sinks/my-sink-id". 1035 /// Value must have pattern "^projects/[^/]+/sinks/[^/]+$".
1076 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". 1036 ///
1077 * 1037 /// [updateMask] - Optional. Field mask that specifies the fields in sink
1078 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of 1038 /// that need an update. A sink field will be overwritten if, and only if, it
1079 * this field. When updating a sink, the effect of this field on the value of 1039 /// is in the update mask. name and output only fields cannot be updated.An
1080 * writer_identity in the updated sink depends on both the old and new values 1040 /// empty updateMask is temporarily treated as using the following mask for
1081 * of this field: 1041 /// backwards compatibility purposes: destination,filter,includeChildren At
1082 * If the old and new values of this field are both false or both true, then 1042 /// some point in the future, behavior will be removed and specifying an
1083 * there is no change to the sink's writer_identity. 1043 /// empty updateMask will be an error.For a detailed FieldMask definition,
1084 * If the old value is false and the new value is true, then writer_identity 1044 /// see
1085 * is changed to a unique service account. 1045 /// https://developers.google.com/protocol-buffers/docs/reference/google.proto buf#fieldmaskExample:
1086 * It is an error if the old value is true and the new value is set to false 1046 /// updateMask=filter.
1087 * or defaulted to false. 1047 ///
1088 * 1048 /// [uniqueWriterIdentity] - Optional. See sinks.create for a description of
1089 * Completes with a [LogSink]. 1049 /// this field. When updating a sink, the effect of this field on the value
1090 * 1050 /// of writer_identity in the updated sink depends on both the old and new
1091 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1051 /// values of this field:
1092 * error. 1052 /// If the old and new values of this field are both false or both true, then
1093 * 1053 /// there is no change to the sink's writer_identity.
1094 * If the used [http.Client] completes with an error when making a REST call, 1054 /// If the old value is false and the new value is true, then writer_identity
1095 * this method will complete with the same error. 1055 /// is changed to a unique service account.
1096 */ 1056 /// It is an error if the old value is true and the new value is set to false
1097 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool uniqueWriterIdentity}) { 1057 /// or defaulted to false.
1058 ///
1059 /// Completes with a [LogSink].
1060 ///
1061 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1062 /// an error.
1063 ///
1064 /// If the used [http.Client] completes with an error when making a REST
1065 /// call, this method will complete with the same error.
1066 async.Future<LogSink> update(LogSink request, core.String sinkName,
1067 {core.String updateMask, core.bool uniqueWriterIdentity}) {
1098 var _url = null; 1068 var _url = null;
1099 var _queryParams = new core.Map(); 1069 var _queryParams = new core.Map();
1100 var _uploadMedia = null; 1070 var _uploadMedia = null;
1101 var _uploadOptions = null; 1071 var _uploadOptions = null;
1102 var _downloadOptions = commons.DownloadOptions.Metadata; 1072 var _downloadOptions = commons.DownloadOptions.Metadata;
1103 var _body = null; 1073 var _body = null;
1104 1074
1105 if (request != null) { 1075 if (request != null) {
1106 _body = convert.JSON.encode((request).toJson()); 1076 _body = convert.JSON.encode((request).toJson());
1107 } 1077 }
1108 if (sinkName == null) { 1078 if (sinkName == null) {
1109 throw new core.ArgumentError("Parameter sinkName is required."); 1079 throw new core.ArgumentError("Parameter sinkName is required.");
1110 } 1080 }
1081 if (updateMask != null) {
1082 _queryParams["updateMask"] = [updateMask];
1083 }
1111 if (uniqueWriterIdentity != null) { 1084 if (uniqueWriterIdentity != null) {
1112 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; 1085 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"];
1113 } 1086 }
1114 1087
1115 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$sinkName'); 1088 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$sinkName');
1116 1089
1117 var _response = _requester.request(_url, 1090 var _response = _requester.request(_url, "PUT",
1118 "PUT", 1091 body: _body,
1119 body: _body, 1092 queryParams: _queryParams,
1120 queryParams: _queryParams, 1093 uploadOptions: _uploadOptions,
1121 uploadOptions: _uploadOptions, 1094 uploadMedia: _uploadMedia,
1122 uploadMedia: _uploadMedia, 1095 downloadOptions: _downloadOptions);
1123 downloadOptions: _downloadOptions);
1124 return _response.then((data) => new LogSink.fromJson(data)); 1096 return _response.then((data) => new LogSink.fromJson(data));
1125 } 1097 }
1126 1098 }
1127 } 1099
1128 1100 /// BucketOptions describes the bucket boundaries used to create a histogram
1129 1101 /// for the distribution. The buckets can be in a linear sequence, an
1130 1102 /// exponential sequence, or each bucket can be specified explicitly.
1131 /** 1103 /// BucketOptions does not include the number of values in each bucket.A bucket
1132 * A generic empty message that you can re-use to avoid defining duplicated 1104 /// has an inclusive lower bound and exclusive upper bound for the values that
1133 * empty messages in your APIs. A typical example is to use it as the request or 1105 /// are counted for that bucket. The upper bound of a bucket must be strictly
1134 * the response type of an API method. For instance: 1106 /// greater than the lower bound. The sequence of N buckets for a distribution
1135 * service Foo { 1107 /// consists of an underflow bucket (number 0), zero or more finite buckets
1136 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 1108 /// (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets
1137 * } 1109 /// are contiguous: the lower bound of bucket i (i > 0) is the same as the
1138 * The JSON representation for Empty is empty JSON object {}. 1110 /// upper bound of bucket i - 1. The buckets span the whole range of finite
1139 */ 1111 /// values: lower bound of the underflow bucket is -infinity and the upper
1112 /// bound of the overflow bucket is +infinity. The finite buckets are so-called
1113 /// because both bounds are finite.
1114 class BucketOptions {
1115 /// The explicit buckets.
1116 Explicit explicitBuckets;
1117
1118 /// The exponential buckets.
1119 Exponential exponentialBuckets;
1120
1121 /// The linear bucket.
1122 Linear linearBuckets;
1123
1124 BucketOptions();
1125
1126 BucketOptions.fromJson(core.Map _json) {
1127 if (_json.containsKey("explicitBuckets")) {
1128 explicitBuckets = new Explicit.fromJson(_json["explicitBuckets"]);
1129 }
1130 if (_json.containsKey("exponentialBuckets")) {
1131 exponentialBuckets =
1132 new Exponential.fromJson(_json["exponentialBuckets"]);
1133 }
1134 if (_json.containsKey("linearBuckets")) {
1135 linearBuckets = new Linear.fromJson(_json["linearBuckets"]);
1136 }
1137 }
1138
1139 core.Map<core.String, core.Object> toJson() {
1140 final core.Map<core.String, core.Object> _json =
1141 new core.Map<core.String, core.Object>();
1142 if (explicitBuckets != null) {
1143 _json["explicitBuckets"] = (explicitBuckets).toJson();
1144 }
1145 if (exponentialBuckets != null) {
1146 _json["exponentialBuckets"] = (exponentialBuckets).toJson();
1147 }
1148 if (linearBuckets != null) {
1149 _json["linearBuckets"] = (linearBuckets).toJson();
1150 }
1151 return _json;
1152 }
1153 }
1154
1155 /// A generic empty message that you can re-use to avoid defining duplicated
1156 /// empty messages in your APIs. A typical example is to use it as the request
1157 /// or the response type of an API method. For instance:
1158 /// service Foo {
1159 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1160 /// }
1161 /// The JSON representation for Empty is empty JSON object {}.
1140 class Empty { 1162 class Empty {
1141
1142 Empty(); 1163 Empty();
1143 1164
1144 Empty.fromJson(core.Map _json) { 1165 Empty.fromJson(core.Map _json) {}
1145 } 1166
1146 1167 core.Map<core.String, core.Object> toJson() {
1147 core.Map<core.String, core.Object> toJson() { 1168 final core.Map<core.String, core.Object> _json =
1148 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1169 new core.Map<core.String, core.Object>();
1149 return _json; 1170 return _json;
1150 } 1171 }
1151 } 1172 }
1152 1173
1153 /** 1174 /// Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1
1154 * A common proto for logging HTTP requests. Only contains semantics defined by 1175 /// (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i <
1155 * the HTTP specification. Product-specific logging information MUST be defined 1176 /// N-1): boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must
1156 * in a separate message. 1177 /// contain at least one element. If bounds has only one element, then there
1157 */ 1178 /// are no finite buckets, and that single element is the common boundary of
1179 /// the overflow and underflow buckets.
1180 class Explicit {
1181 /// The values must be monotonically increasing.
1182 core.List<core.double> bounds;
1183
1184 Explicit();
1185
1186 Explicit.fromJson(core.Map _json) {
1187 if (_json.containsKey("bounds")) {
1188 bounds = _json["bounds"];
1189 }
1190 }
1191
1192 core.Map<core.String, core.Object> toJson() {
1193 final core.Map<core.String, core.Object> _json =
1194 new core.Map<core.String, core.Object>();
1195 if (bounds != null) {
1196 _json["bounds"] = bounds;
1197 }
1198 return _json;
1199 }
1200 }
1201
1202 /// Specifies an exponential sequence of buckets that have a width that is
1203 /// proportional to the value of the lower bound. Each bucket represents a
1204 /// constant relative uncertainty on a specific value in the bucket.There are
1205 /// num_finite_buckets + 2 (= N) buckets. Bucket i has the following
1206 /// boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower
1207 /// bound (1 <= i < N): scale * (growth_factor ^ (i - 1)).
1208 class Exponential {
1209 /// Must be greater than 1.
1210 core.double growthFactor;
1211
1212 /// Must be greater than 0.
1213 core.int numFiniteBuckets;
1214
1215 /// Must be greater than 0.
1216 core.double scale;
1217
1218 Exponential();
1219
1220 Exponential.fromJson(core.Map _json) {
1221 if (_json.containsKey("growthFactor")) {
1222 growthFactor = _json["growthFactor"];
1223 }
1224 if (_json.containsKey("numFiniteBuckets")) {
1225 numFiniteBuckets = _json["numFiniteBuckets"];
1226 }
1227 if (_json.containsKey("scale")) {
1228 scale = _json["scale"];
1229 }
1230 }
1231
1232 core.Map<core.String, core.Object> toJson() {
1233 final core.Map<core.String, core.Object> _json =
1234 new core.Map<core.String, core.Object>();
1235 if (growthFactor != null) {
1236 _json["growthFactor"] = growthFactor;
1237 }
1238 if (numFiniteBuckets != null) {
1239 _json["numFiniteBuckets"] = numFiniteBuckets;
1240 }
1241 if (scale != null) {
1242 _json["scale"] = scale;
1243 }
1244 return _json;
1245 }
1246 }
1247
1248 /// A common proto for logging HTTP requests. Only contains semantics defined
1249 /// by the HTTP specification. Product-specific logging information MUST be
1250 /// defined in a separate message.
1158 class HttpRequest { 1251 class HttpRequest {
1159 /** 1252 /// The number of HTTP response bytes inserted into cache. Set only when a
1160 * The number of HTTP response bytes inserted into cache. Set only when a 1253 /// cache fill was attempted.
1161 * cache fill was attempted.
1162 */
1163 core.String cacheFillBytes; 1254 core.String cacheFillBytes;
1164 /** 1255
1165 * Whether or not an entity was served from cache (with or without 1256 /// Whether or not an entity was served from cache (with or without
1166 * validation). 1257 /// validation).
1167 */
1168 core.bool cacheHit; 1258 core.bool cacheHit;
1169 /** Whether or not a cache lookup was attempted. */ 1259
1260 /// Whether or not a cache lookup was attempted.
1170 core.bool cacheLookup; 1261 core.bool cacheLookup;
1171 /** 1262
1172 * Whether or not the response was validated with the origin server before 1263 /// Whether or not the response was validated with the origin server before
1173 * being served from cache. This field is only meaningful if cache_hit is 1264 /// being served from cache. This field is only meaningful if cache_hit is
1174 * True. 1265 /// True.
1175 */
1176 core.bool cacheValidatedWithOriginServer; 1266 core.bool cacheValidatedWithOriginServer;
1177 /** 1267
1178 * The request processing latency on the server, from the time the request was 1268 /// The request processing latency on the server, from the time the request
1179 * received until the response was sent. 1269 /// was received until the response was sent.
1180 */
1181 core.String latency; 1270 core.String latency;
1182 /** 1271
1183 * Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" 1272 /// Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2",
1184 */ 1273 /// "websocket"
1185 core.String protocol; 1274 core.String protocol;
1186 /** 1275
1187 * The referer URL of the request, as defined in HTTP/1.1 Header Field 1276 /// The referer URL of the request, as defined in HTTP/1.1 Header Field
1188 * Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). 1277 /// Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
1189 */
1190 core.String referer; 1278 core.String referer;
1191 /** 1279
1192 * The IP address (IPv4 or IPv6) of the client that issued the HTTP request. 1280 /// The IP address (IPv4 or IPv6) of the client that issued the HTTP request.
1193 * Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". 1281 /// Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329".
1194 */
1195 core.String remoteIp; 1282 core.String remoteIp;
1196 /** The request method. Examples: "GET", "HEAD", "PUT", "POST". */ 1283
1284 /// The request method. Examples: "GET", "HEAD", "PUT", "POST".
1197 core.String requestMethod; 1285 core.String requestMethod;
1198 /** 1286
1199 * The size of the HTTP request message in bytes, including the request 1287 /// The size of the HTTP request message in bytes, including the request
1200 * headers and the request body. 1288 /// headers and the request body.
1201 */
1202 core.String requestSize; 1289 core.String requestSize;
1203 /** 1290
1204 * The scheme (http, https), the host name, the path and the query portion of 1291 /// The scheme (http, https), the host name, the path and the query portion
1205 * the URL that was requested. Example: 1292 /// of the URL that was requested. Example:
1206 * "http://example.com/some/info?color=red". 1293 /// "http://example.com/some/info?color=red".
1207 */
1208 core.String requestUrl; 1294 core.String requestUrl;
1209 /** 1295
1210 * The size of the HTTP response message sent back to the client, in bytes, 1296 /// The size of the HTTP response message sent back to the client, in bytes,
1211 * including the response headers and the response body. 1297 /// including the response headers and the response body.
1212 */
1213 core.String responseSize; 1298 core.String responseSize;
1214 /** 1299
1215 * The IP address (IPv4 or IPv6) of the origin server that the request was 1300 /// The IP address (IPv4 or IPv6) of the origin server that the request was
1216 * sent to. 1301 /// sent to.
1217 */
1218 core.String serverIp; 1302 core.String serverIp;
1219 /** 1303
1220 * The response code indicating the status of response. Examples: 200, 404. 1304 /// The response code indicating the status of response. Examples: 200, 404.
1221 */
1222 core.int status; 1305 core.int status;
1223 /** 1306
1224 * The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 1307 /// The user agent sent by the client. Example: "Mozilla/4.0 (compatible;
1225 * 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)". 1308 /// MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)".
1226 */
1227 core.String userAgent; 1309 core.String userAgent;
1228 1310
1229 HttpRequest(); 1311 HttpRequest();
1230 1312
1231 HttpRequest.fromJson(core.Map _json) { 1313 HttpRequest.fromJson(core.Map _json) {
1232 if (_json.containsKey("cacheFillBytes")) { 1314 if (_json.containsKey("cacheFillBytes")) {
1233 cacheFillBytes = _json["cacheFillBytes"]; 1315 cacheFillBytes = _json["cacheFillBytes"];
1234 } 1316 }
1235 if (_json.containsKey("cacheHit")) { 1317 if (_json.containsKey("cacheHit")) {
1236 cacheHit = _json["cacheHit"]; 1318 cacheHit = _json["cacheHit"];
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 } 1352 }
1271 if (_json.containsKey("status")) { 1353 if (_json.containsKey("status")) {
1272 status = _json["status"]; 1354 status = _json["status"];
1273 } 1355 }
1274 if (_json.containsKey("userAgent")) { 1356 if (_json.containsKey("userAgent")) {
1275 userAgent = _json["userAgent"]; 1357 userAgent = _json["userAgent"];
1276 } 1358 }
1277 } 1359 }
1278 1360
1279 core.Map<core.String, core.Object> toJson() { 1361 core.Map<core.String, core.Object> toJson() {
1280 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1362 final core.Map<core.String, core.Object> _json =
1363 new core.Map<core.String, core.Object>();
1281 if (cacheFillBytes != null) { 1364 if (cacheFillBytes != null) {
1282 _json["cacheFillBytes"] = cacheFillBytes; 1365 _json["cacheFillBytes"] = cacheFillBytes;
1283 } 1366 }
1284 if (cacheHit != null) { 1367 if (cacheHit != null) {
1285 _json["cacheHit"] = cacheHit; 1368 _json["cacheHit"] = cacheHit;
1286 } 1369 }
1287 if (cacheLookup != null) { 1370 if (cacheLookup != null) {
1288 _json["cacheLookup"] = cacheLookup; 1371 _json["cacheLookup"] = cacheLookup;
1289 } 1372 }
1290 if (cacheValidatedWithOriginServer != null) { 1373 if (cacheValidatedWithOriginServer != null) {
(...skipping 29 matching lines...) Expand all
1320 if (status != null) { 1403 if (status != null) {
1321 _json["status"] = status; 1404 _json["status"] = status;
1322 } 1405 }
1323 if (userAgent != null) { 1406 if (userAgent != null) {
1324 _json["userAgent"] = userAgent; 1407 _json["userAgent"] = userAgent;
1325 } 1408 }
1326 return _json; 1409 return _json;
1327 } 1410 }
1328 } 1411 }
1329 1412
1330 /** A description of a label. */ 1413 /// A description of a label.
1331 class LabelDescriptor { 1414 class LabelDescriptor {
1332 /** A human-readable description for the label. */ 1415 /// A human-readable description for the label.
1333 core.String description; 1416 core.String description;
1334 /** The label key. */ 1417
1418 /// The label key.
1335 core.String key; 1419 core.String key;
1336 /** 1420
1337 * The type of data that can be assigned to the label. 1421 /// The type of data that can be assigned to the label.
1338 * Possible string values are: 1422 /// Possible string values are:
1339 * - "STRING" : A variable-length string. This is the default. 1423 /// - "STRING" : A variable-length string. This is the default.
1340 * - "BOOL" : Boolean; true or false. 1424 /// - "BOOL" : Boolean; true or false.
1341 * - "INT64" : A 64-bit signed integer. 1425 /// - "INT64" : A 64-bit signed integer.
1342 */
1343 core.String valueType; 1426 core.String valueType;
1344 1427
1345 LabelDescriptor(); 1428 LabelDescriptor();
1346 1429
1347 LabelDescriptor.fromJson(core.Map _json) { 1430 LabelDescriptor.fromJson(core.Map _json) {
1348 if (_json.containsKey("description")) { 1431 if (_json.containsKey("description")) {
1349 description = _json["description"]; 1432 description = _json["description"];
1350 } 1433 }
1351 if (_json.containsKey("key")) { 1434 if (_json.containsKey("key")) {
1352 key = _json["key"]; 1435 key = _json["key"];
1353 } 1436 }
1354 if (_json.containsKey("valueType")) { 1437 if (_json.containsKey("valueType")) {
1355 valueType = _json["valueType"]; 1438 valueType = _json["valueType"];
1356 } 1439 }
1357 } 1440 }
1358 1441
1359 core.Map<core.String, core.Object> toJson() { 1442 core.Map<core.String, core.Object> toJson() {
1360 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1443 final core.Map<core.String, core.Object> _json =
1444 new core.Map<core.String, core.Object>();
1361 if (description != null) { 1445 if (description != null) {
1362 _json["description"] = description; 1446 _json["description"] = description;
1363 } 1447 }
1364 if (key != null) { 1448 if (key != null) {
1365 _json["key"] = key; 1449 _json["key"] = key;
1366 } 1450 }
1367 if (valueType != null) { 1451 if (valueType != null) {
1368 _json["valueType"] = valueType; 1452 _json["valueType"] = valueType;
1369 } 1453 }
1370 return _json; 1454 return _json;
1371 } 1455 }
1372 } 1456 }
1373 1457
1374 /** The parameters to ListLogEntries. */ 1458 /// Specifies a linear sequence of buckets that all have the same width (except
1459 /// overflow and underflow). Each bucket represents a constant absolute
1460 /// uncertainty on the specific value in the bucket.There are
1461 /// num_finite_buckets + 2 (= N) buckets. Bucket i has the following
1462 /// boundaries:Upper bound (0 <= i < N-1): offset + (width * i). Lower bound
1463 /// (1 <= i < N): offset + (width * (i - 1)).
1464 class Linear {
1465 /// Must be greater than 0.
1466 core.int numFiniteBuckets;
1467
1468 /// Lower bound of the first bucket.
1469 core.double offset;
1470
1471 /// Must be greater than 0.
1472 core.double width;
1473
1474 Linear();
1475
1476 Linear.fromJson(core.Map _json) {
1477 if (_json.containsKey("numFiniteBuckets")) {
1478 numFiniteBuckets = _json["numFiniteBuckets"];
1479 }
1480 if (_json.containsKey("offset")) {
1481 offset = _json["offset"];
1482 }
1483 if (_json.containsKey("width")) {
1484 width = _json["width"];
1485 }
1486 }
1487
1488 core.Map<core.String, core.Object> toJson() {
1489 final core.Map<core.String, core.Object> _json =
1490 new core.Map<core.String, core.Object>();
1491 if (numFiniteBuckets != null) {
1492 _json["numFiniteBuckets"] = numFiniteBuckets;
1493 }
1494 if (offset != null) {
1495 _json["offset"] = offset;
1496 }
1497 if (width != null) {
1498 _json["width"] = width;
1499 }
1500 return _json;
1501 }
1502 }
1503
1504 /// The parameters to ListLogEntries.
1375 class ListLogEntriesRequest { 1505 class ListLogEntriesRequest {
1376 /** 1506 /// Optional. A filter that chooses which log entries to return. See Advanced
1377 * Optional. A filter that chooses which log entries to return. See Advanced 1507 /// Logs Filters. Only log entries that match the filter are returned. An
1378 * Logs Filters. Only log entries that match the filter are returned. An empty 1508 /// empty filter matches all log entries in the resources listed in
1379 * filter matches all log entries in the resources listed in resource_names. 1509 /// resource_names. Referencing a parent resource that is not listed in
1380 * Referencing a parent resource that is not listed in resource_names will 1510 /// resource_names will cause the filter to return no results. The maximum
1381 * cause the filter to return no results. The maximum length of the filter is 1511 /// length of the filter is 20000 characters.
1382 * 20000 characters.
1383 */
1384 core.String filter; 1512 core.String filter;
1385 /** 1513
1386 * Optional. How the results should be sorted. Presently, the only permitted 1514 /// Optional. How the results should be sorted. Presently, the only permitted
1387 * values are "timestamp asc" (default) and "timestamp desc". The first option 1515 /// values are "timestamp asc" (default) and "timestamp desc". The first
1388 * returns entries in order of increasing values of LogEntry.timestamp (oldest 1516 /// option returns entries in order of increasing values of
1389 * first), and the second option returns entries in order of decreasing 1517 /// LogEntry.timestamp (oldest first), and the second option returns entries
1390 * timestamps (newest first). Entries with equal timestamps are returned in 1518 /// in order of decreasing timestamps (newest first). Entries with equal
1391 * order of their insert_id values. 1519 /// timestamps are returned in order of their insert_id values.
1392 */
1393 core.String orderBy; 1520 core.String orderBy;
1394 /** 1521
1395 * Optional. The maximum number of results to return from this request. 1522 /// Optional. The maximum number of results to return from this request.
1396 * Non-positive values are ignored. The presence of next_page_token in the 1523 /// Non-positive values are ignored. The presence of next_page_token in the
1397 * response indicates that more results might be available. 1524 /// response indicates that more results might be available.
1398 */
1399 core.int pageSize; 1525 core.int pageSize;
1400 /** 1526
1401 * Optional. If present, then retrieve the next batch of results from the 1527 /// Optional. If present, then retrieve the next batch of results from the
1402 * preceding call to this method. page_token must be the value of 1528 /// preceding call to this method. page_token must be the value of
1403 * next_page_token from the previous response. The values of other method 1529 /// next_page_token from the previous response. The values of other method
1404 * parameters should be identical to those in the previous call. 1530 /// parameters should be identical to those in the previous call.
1405 */
1406 core.String pageToken; 1531 core.String pageToken;
1407 /** 1532
1408 * Deprecated. Use resource_names instead. One or more project identifiers or 1533 /// Deprecated. Use resource_names instead. One or more project identifiers
1409 * project numbers from which to retrieve log entries. Example: 1534 /// or project numbers from which to retrieve log entries. Example:
1410 * "my-project-1A". If present, these project identifiers are converted to 1535 /// "my-project-1A". If present, these project identifiers are converted to
1411 * resource name format and added to the list of resources in resource_names. 1536 /// resource name format and added to the list of resources in
1412 */ 1537 /// resource_names.
1413 core.List<core.String> projectIds; 1538 core.List<core.String> projectIds;
1414 /** 1539
1415 * Required. Names of one or more parent resources from which to retrieve log 1540 /// Required. Names of one or more parent resources from which to retrieve
1416 * entries: 1541 /// log entries:
1417 * "projects/[PROJECT_ID]" 1542 /// "projects/[PROJECT_ID]"
1418 * "organizations/[ORGANIZATION_ID]" 1543 /// "organizations/[ORGANIZATION_ID]"
1419 * "billingAccounts/[BILLING_ACCOUNT_ID]" 1544 /// "billingAccounts/[BILLING_ACCOUNT_ID]"
1420 * "folders/[FOLDER_ID]" 1545 /// "folders/[FOLDER_ID]"
1421 * Projects listed in the project_ids field are added to this list. 1546 /// Projects listed in the project_ids field are added to this list.
1422 */
1423 core.List<core.String> resourceNames; 1547 core.List<core.String> resourceNames;
1424 1548
1425 ListLogEntriesRequest(); 1549 ListLogEntriesRequest();
1426 1550
1427 ListLogEntriesRequest.fromJson(core.Map _json) { 1551 ListLogEntriesRequest.fromJson(core.Map _json) {
1428 if (_json.containsKey("filter")) { 1552 if (_json.containsKey("filter")) {
1429 filter = _json["filter"]; 1553 filter = _json["filter"];
1430 } 1554 }
1431 if (_json.containsKey("orderBy")) { 1555 if (_json.containsKey("orderBy")) {
1432 orderBy = _json["orderBy"]; 1556 orderBy = _json["orderBy"];
1433 } 1557 }
1434 if (_json.containsKey("pageSize")) { 1558 if (_json.containsKey("pageSize")) {
1435 pageSize = _json["pageSize"]; 1559 pageSize = _json["pageSize"];
1436 } 1560 }
1437 if (_json.containsKey("pageToken")) { 1561 if (_json.containsKey("pageToken")) {
1438 pageToken = _json["pageToken"]; 1562 pageToken = _json["pageToken"];
1439 } 1563 }
1440 if (_json.containsKey("projectIds")) { 1564 if (_json.containsKey("projectIds")) {
1441 projectIds = _json["projectIds"]; 1565 projectIds = _json["projectIds"];
1442 } 1566 }
1443 if (_json.containsKey("resourceNames")) { 1567 if (_json.containsKey("resourceNames")) {
1444 resourceNames = _json["resourceNames"]; 1568 resourceNames = _json["resourceNames"];
1445 } 1569 }
1446 } 1570 }
1447 1571
1448 core.Map<core.String, core.Object> toJson() { 1572 core.Map<core.String, core.Object> toJson() {
1449 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1573 final core.Map<core.String, core.Object> _json =
1574 new core.Map<core.String, core.Object>();
1450 if (filter != null) { 1575 if (filter != null) {
1451 _json["filter"] = filter; 1576 _json["filter"] = filter;
1452 } 1577 }
1453 if (orderBy != null) { 1578 if (orderBy != null) {
1454 _json["orderBy"] = orderBy; 1579 _json["orderBy"] = orderBy;
1455 } 1580 }
1456 if (pageSize != null) { 1581 if (pageSize != null) {
1457 _json["pageSize"] = pageSize; 1582 _json["pageSize"] = pageSize;
1458 } 1583 }
1459 if (pageToken != null) { 1584 if (pageToken != null) {
1460 _json["pageToken"] = pageToken; 1585 _json["pageToken"] = pageToken;
1461 } 1586 }
1462 if (projectIds != null) { 1587 if (projectIds != null) {
1463 _json["projectIds"] = projectIds; 1588 _json["projectIds"] = projectIds;
1464 } 1589 }
1465 if (resourceNames != null) { 1590 if (resourceNames != null) {
1466 _json["resourceNames"] = resourceNames; 1591 _json["resourceNames"] = resourceNames;
1467 } 1592 }
1468 return _json; 1593 return _json;
1469 } 1594 }
1470 } 1595 }
1471 1596
1472 /** Result returned from ListLogEntries. */ 1597 /// Result returned from ListLogEntries.
1473 class ListLogEntriesResponse { 1598 class ListLogEntriesResponse {
1474 /** A list of log entries. */ 1599 /// A list of log entries. If entries is empty, nextPageToken may still be
1600 /// returned, indicating that more entries may exist. See nextPageToken for
1601 /// more information.
1475 core.List<LogEntry> entries; 1602 core.List<LogEntry> entries;
1476 /** 1603
1477 * If there might be more results than those appearing in this response, then 1604 /// If there might be more results than those appearing in this response,
1478 * nextPageToken is included. To get the next set of results, call this method 1605 /// then nextPageToken is included. To get the next set of results, call this
1479 * again using the value of nextPageToken as pageToken.If a value for 1606 /// method again using the value of nextPageToken as pageToken.If a value for
1480 * next_page_token appears and the entries field is empty, it means that the 1607 /// next_page_token appears and the entries field is empty, it means that the
1481 * search found no log entries so far but it did not have time to search all 1608 /// search found no log entries so far but it did not have time to search all
1482 * the possible log entries. Retry the method with this value for page_token 1609 /// the possible log entries. Retry the method with this value for page_token
1483 * to continue the search. Alternatively, consider speeding up the search by 1610 /// to continue the search. Alternatively, consider speeding up the search by
1484 * changing your filter to specify a single log name or resource type, or to 1611 /// changing your filter to specify a single log name or resource type, or to
1485 * narrow the time range of the search. 1612 /// narrow the time range of the search.
1486 */
1487 core.String nextPageToken; 1613 core.String nextPageToken;
1488 1614
1489 ListLogEntriesResponse(); 1615 ListLogEntriesResponse();
1490 1616
1491 ListLogEntriesResponse.fromJson(core.Map _json) { 1617 ListLogEntriesResponse.fromJson(core.Map _json) {
1492 if (_json.containsKey("entries")) { 1618 if (_json.containsKey("entries")) {
1493 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to List(); 1619 entries = _json["entries"]
1620 .map((value) => new LogEntry.fromJson(value))
1621 .toList();
1494 } 1622 }
1495 if (_json.containsKey("nextPageToken")) { 1623 if (_json.containsKey("nextPageToken")) {
1496 nextPageToken = _json["nextPageToken"]; 1624 nextPageToken = _json["nextPageToken"];
1497 } 1625 }
1498 } 1626 }
1499 1627
1500 core.Map<core.String, core.Object> toJson() { 1628 core.Map<core.String, core.Object> toJson() {
1501 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1629 final core.Map<core.String, core.Object> _json =
1630 new core.Map<core.String, core.Object>();
1502 if (entries != null) { 1631 if (entries != null) {
1503 _json["entries"] = entries.map((value) => (value).toJson()).toList(); 1632 _json["entries"] = entries.map((value) => (value).toJson()).toList();
1504 } 1633 }
1505 if (nextPageToken != null) { 1634 if (nextPageToken != null) {
1506 _json["nextPageToken"] = nextPageToken; 1635 _json["nextPageToken"] = nextPageToken;
1507 } 1636 }
1508 return _json; 1637 return _json;
1509 } 1638 }
1510 } 1639 }
1511 1640
1512 /** Result returned from ListLogMetrics. */ 1641 /// Result returned from ListLogMetrics.
1513 class ListLogMetricsResponse { 1642 class ListLogMetricsResponse {
1514 /** A list of logs-based metrics. */ 1643 /// A list of logs-based metrics.
1515 core.List<LogMetric> metrics; 1644 core.List<LogMetric> metrics;
1516 /** 1645
1517 * If there might be more results than appear in this response, then 1646 /// If there might be more results than appear in this response, then
1518 * nextPageToken is included. To get the next set of results, call this method 1647 /// nextPageToken is included. To get the next set of results, call this
1519 * again using the value of nextPageToken as pageToken. 1648 /// method again using the value of nextPageToken as pageToken.
1520 */
1521 core.String nextPageToken; 1649 core.String nextPageToken;
1522 1650
1523 ListLogMetricsResponse(); 1651 ListLogMetricsResponse();
1524 1652
1525 ListLogMetricsResponse.fromJson(core.Map _json) { 1653 ListLogMetricsResponse.fromJson(core.Map _json) {
1526 if (_json.containsKey("metrics")) { 1654 if (_json.containsKey("metrics")) {
1527 metrics = _json["metrics"].map((value) => new LogMetric.fromJson(value)).t oList(); 1655 metrics = _json["metrics"]
1656 .map((value) => new LogMetric.fromJson(value))
1657 .toList();
1528 } 1658 }
1529 if (_json.containsKey("nextPageToken")) { 1659 if (_json.containsKey("nextPageToken")) {
1530 nextPageToken = _json["nextPageToken"]; 1660 nextPageToken = _json["nextPageToken"];
1531 } 1661 }
1532 } 1662 }
1533 1663
1534 core.Map<core.String, core.Object> toJson() { 1664 core.Map<core.String, core.Object> toJson() {
1535 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1665 final core.Map<core.String, core.Object> _json =
1666 new core.Map<core.String, core.Object>();
1536 if (metrics != null) { 1667 if (metrics != null) {
1537 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); 1668 _json["metrics"] = metrics.map((value) => (value).toJson()).toList();
1538 } 1669 }
1539 if (nextPageToken != null) { 1670 if (nextPageToken != null) {
1540 _json["nextPageToken"] = nextPageToken; 1671 _json["nextPageToken"] = nextPageToken;
1541 } 1672 }
1542 return _json; 1673 return _json;
1543 } 1674 }
1544 } 1675 }
1545 1676
1546 /** Result returned from ListLogs. */ 1677 /// Result returned from ListLogs.
1547 class ListLogsResponse { 1678 class ListLogsResponse {
1548 /** 1679 /// A list of log names. For example, "projects/my-project/syslog" or
1549 * A list of log names. For example, "projects/my-project/syslog" or 1680 /// "organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
1550 * "organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
1551 */
1552 core.List<core.String> logNames; 1681 core.List<core.String> logNames;
1553 /** 1682
1554 * If there might be more results than those appearing in this response, then 1683 /// If there might be more results than those appearing in this response,
1555 * nextPageToken is included. To get the next set of results, call this method 1684 /// then nextPageToken is included. To get the next set of results, call this
1556 * again using the value of nextPageToken as pageToken. 1685 /// method again using the value of nextPageToken as pageToken.
1557 */
1558 core.String nextPageToken; 1686 core.String nextPageToken;
1559 1687
1560 ListLogsResponse(); 1688 ListLogsResponse();
1561 1689
1562 ListLogsResponse.fromJson(core.Map _json) { 1690 ListLogsResponse.fromJson(core.Map _json) {
1563 if (_json.containsKey("logNames")) { 1691 if (_json.containsKey("logNames")) {
1564 logNames = _json["logNames"]; 1692 logNames = _json["logNames"];
1565 } 1693 }
1566 if (_json.containsKey("nextPageToken")) { 1694 if (_json.containsKey("nextPageToken")) {
1567 nextPageToken = _json["nextPageToken"]; 1695 nextPageToken = _json["nextPageToken"];
1568 } 1696 }
1569 } 1697 }
1570 1698
1571 core.Map<core.String, core.Object> toJson() { 1699 core.Map<core.String, core.Object> toJson() {
1572 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1700 final core.Map<core.String, core.Object> _json =
1701 new core.Map<core.String, core.Object>();
1573 if (logNames != null) { 1702 if (logNames != null) {
1574 _json["logNames"] = logNames; 1703 _json["logNames"] = logNames;
1575 } 1704 }
1576 if (nextPageToken != null) { 1705 if (nextPageToken != null) {
1577 _json["nextPageToken"] = nextPageToken; 1706 _json["nextPageToken"] = nextPageToken;
1578 } 1707 }
1579 return _json; 1708 return _json;
1580 } 1709 }
1581 } 1710 }
1582 1711
1583 /** Result returned from ListMonitoredResourceDescriptors. */ 1712 /// Result returned from ListMonitoredResourceDescriptors.
1584 class ListMonitoredResourceDescriptorsResponse { 1713 class ListMonitoredResourceDescriptorsResponse {
1585 /** 1714 /// If there might be more results than those appearing in this response,
1586 * If there might be more results than those appearing in this response, then 1715 /// then nextPageToken is included. To get the next set of results, call this
1587 * nextPageToken is included. To get the next set of results, call this method 1716 /// method again using the value of nextPageToken as pageToken.
1588 * again using the value of nextPageToken as pageToken.
1589 */
1590 core.String nextPageToken; 1717 core.String nextPageToken;
1591 /** A list of resource descriptors. */ 1718
1719 /// A list of resource descriptors.
1592 core.List<MonitoredResourceDescriptor> resourceDescriptors; 1720 core.List<MonitoredResourceDescriptor> resourceDescriptors;
1593 1721
1594 ListMonitoredResourceDescriptorsResponse(); 1722 ListMonitoredResourceDescriptorsResponse();
1595 1723
1596 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) { 1724 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) {
1597 if (_json.containsKey("nextPageToken")) { 1725 if (_json.containsKey("nextPageToken")) {
1598 nextPageToken = _json["nextPageToken"]; 1726 nextPageToken = _json["nextPageToken"];
1599 } 1727 }
1600 if (_json.containsKey("resourceDescriptors")) { 1728 if (_json.containsKey("resourceDescriptors")) {
1601 resourceDescriptors = _json["resourceDescriptors"].map((value) => new Moni toredResourceDescriptor.fromJson(value)).toList(); 1729 resourceDescriptors = _json["resourceDescriptors"]
1730 .map((value) => new MonitoredResourceDescriptor.fromJson(value))
1731 .toList();
1602 } 1732 }
1603 } 1733 }
1604 1734
1605 core.Map<core.String, core.Object> toJson() { 1735 core.Map<core.String, core.Object> toJson() {
1606 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1736 final core.Map<core.String, core.Object> _json =
1737 new core.Map<core.String, core.Object>();
1607 if (nextPageToken != null) { 1738 if (nextPageToken != null) {
1608 _json["nextPageToken"] = nextPageToken; 1739 _json["nextPageToken"] = nextPageToken;
1609 } 1740 }
1610 if (resourceDescriptors != null) { 1741 if (resourceDescriptors != null) {
1611 _json["resourceDescriptors"] = resourceDescriptors.map((value) => (value). toJson()).toList(); 1742 _json["resourceDescriptors"] =
1743 resourceDescriptors.map((value) => (value).toJson()).toList();
1612 } 1744 }
1613 return _json; 1745 return _json;
1614 } 1746 }
1615 } 1747 }
1616 1748
1617 /** Result returned from ListSinks. */ 1749 /// Result returned from ListSinks.
1618 class ListSinksResponse { 1750 class ListSinksResponse {
1619 /** 1751 /// If there might be more results than appear in this response, then
1620 * If there might be more results than appear in this response, then 1752 /// nextPageToken is included. To get the next set of results, call the same
1621 * nextPageToken is included. To get the next set of results, call the same 1753 /// method again using the value of nextPageToken as pageToken.
1622 * method again using the value of nextPageToken as pageToken.
1623 */
1624 core.String nextPageToken; 1754 core.String nextPageToken;
1625 /** A list of sinks. */ 1755
1756 /// A list of sinks.
1626 core.List<LogSink> sinks; 1757 core.List<LogSink> sinks;
1627 1758
1628 ListSinksResponse(); 1759 ListSinksResponse();
1629 1760
1630 ListSinksResponse.fromJson(core.Map _json) { 1761 ListSinksResponse.fromJson(core.Map _json) {
1631 if (_json.containsKey("nextPageToken")) { 1762 if (_json.containsKey("nextPageToken")) {
1632 nextPageToken = _json["nextPageToken"]; 1763 nextPageToken = _json["nextPageToken"];
1633 } 1764 }
1634 if (_json.containsKey("sinks")) { 1765 if (_json.containsKey("sinks")) {
1635 sinks = _json["sinks"].map((value) => new LogSink.fromJson(value)).toList( ); 1766 sinks =
1767 _json["sinks"].map((value) => new LogSink.fromJson(value)).toList();
1636 } 1768 }
1637 } 1769 }
1638 1770
1639 core.Map<core.String, core.Object> toJson() { 1771 core.Map<core.String, core.Object> toJson() {
1640 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1772 final core.Map<core.String, core.Object> _json =
1773 new core.Map<core.String, core.Object>();
1641 if (nextPageToken != null) { 1774 if (nextPageToken != null) {
1642 _json["nextPageToken"] = nextPageToken; 1775 _json["nextPageToken"] = nextPageToken;
1643 } 1776 }
1644 if (sinks != null) { 1777 if (sinks != null) {
1645 _json["sinks"] = sinks.map((value) => (value).toJson()).toList(); 1778 _json["sinks"] = sinks.map((value) => (value).toJson()).toList();
1646 } 1779 }
1647 return _json; 1780 return _json;
1648 } 1781 }
1649 } 1782 }
1650 1783
1651 /** An individual entry in a log. */ 1784 /// An individual entry in a log.
1652 class LogEntry { 1785 class LogEntry {
1653 /** 1786 /// Optional. Information about the HTTP request associated with this log
1654 * Optional. Information about the HTTP request associated with this log 1787 /// entry, if applicable.
1655 * entry, if applicable.
1656 */
1657 HttpRequest httpRequest; 1788 HttpRequest httpRequest;
1658 /** 1789
1659 * Optional. A unique identifier for the log entry. If you provide a value, 1790 /// Optional. A unique identifier for the log entry. If you provide a value,
1660 * then Stackdriver Logging considers other log entries in the same project, 1791 /// then Stackdriver Logging considers other log entries in the same project,
1661 * with the same timestamp, and with the same insert_id to be duplicates which 1792 /// with the same timestamp, and with the same insert_id to be duplicates
1662 * can be removed. If omitted in new log entries, then Stackdriver Logging 1793 /// which can be removed. If omitted in new log entries, then Stackdriver
1663 * will insert its own unique identifier. The insert_id is used to order log 1794 /// Logging assigns its own unique identifier. The insert_id is also used to
1664 * entries that have the same timestamp value. 1795 /// order log entries that have the same timestamp value.
1665 */
1666 core.String insertId; 1796 core.String insertId;
1667 /** 1797
1668 * The log entry payload, represented as a structure that is expressed as a 1798 /// The log entry payload, represented as a structure that is expressed as a
1669 * JSON object. 1799 /// JSON object.
1670 * 1800 ///
1671 * The values for Object must be JSON objects. It can consist of `num`, 1801 /// The values for Object must be JSON objects. It can consist of `num`,
1672 * `String`, `bool` and `null` as well as `Map` and `List` values. 1802 /// `String`, `bool` and `null` as well as `Map` and `List` values.
1673 */
1674 core.Map<core.String, core.Object> jsonPayload; 1803 core.Map<core.String, core.Object> jsonPayload;
1675 /** 1804
1676 * Optional. A set of user-defined (key, value) data that provides additional 1805 /// Optional. A set of user-defined (key, value) data that provides
1677 * information about the log entry. 1806 /// additional information about the log entry.
1678 */
1679 core.Map<core.String, core.String> labels; 1807 core.Map<core.String, core.String> labels;
1680 /** 1808
1681 * Required. The resource name of the log to which this log entry belongs: 1809 /// Required. The resource name of the log to which this log entry belongs:
1682 * "projects/[PROJECT_ID]/logs/[LOG_ID]" 1810 /// "projects/[PROJECT_ID]/logs/[LOG_ID]"
1683 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" 1811 /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
1684 * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" 1812 /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
1685 * "folders/[FOLDER_ID]/logs/[LOG_ID]" 1813 /// "folders/[FOLDER_ID]/logs/[LOG_ID]"
1686 * [LOG_ID] must be URL-encoded within log_name. Example: 1814 /// [LOG_ID] must be URL-encoded within log_name. Example:
1687 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty". 1815 /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factiv ity".
1688 * [LOG_ID] must be less than 512 characters long and can only include the 1816 /// [LOG_ID] must be less than 512 characters long and can only include the
1689 * following characters: upper and lower case alphanumeric characters, 1817 /// following characters: upper and lower case alphanumeric characters,
1690 * forward-slash, underscore, hyphen, and period.For backward compatibility, 1818 /// forward-slash, underscore, hyphen, and period.For backward compatibility,
1691 * if log_name begins with a forward-slash, such as /projects/..., then the 1819 /// if log_name begins with a forward-slash, such as /projects/..., then the
1692 * log entry is ingested as usual but the forward-slash is removed. Listing 1820 /// log entry is ingested as usual but the forward-slash is removed. Listing
1693 * the log entry will not show the leading slash and filtering for a log name 1821 /// the log entry will not show the leading slash and filtering for a log
1694 * with a leading slash will never return any results. 1822 /// name with a leading slash will never return any results.
1695 */
1696 core.String logName; 1823 core.String logName;
1697 /** 1824
1698 * Optional. Information about an operation associated with the log entry, if 1825 /// Optional. Information about an operation associated with the log entry,
1699 * applicable. 1826 /// if applicable.
1700 */
1701 LogEntryOperation operation; 1827 LogEntryOperation operation;
1702 /** 1828
1703 * The log entry payload, represented as a protocol buffer. Some Google Cloud 1829 /// The log entry payload, represented as a protocol buffer. Some Google
1704 * Platform services use this field for their log entry payloads. 1830 /// Cloud Platform services use this field for their log entry payloads.
1705 * 1831 ///
1706 * The values for Object must be JSON objects. It can consist of `num`, 1832 /// The values for Object must be JSON objects. It can consist of `num`,
1707 * `String`, `bool` and `null` as well as `Map` and `List` values. 1833 /// `String`, `bool` and `null` as well as `Map` and `List` values.
1708 */
1709 core.Map<core.String, core.Object> protoPayload; 1834 core.Map<core.String, core.Object> protoPayload;
1710 /** 1835
1711 * Output only. The time the log entry was received by Stackdriver Logging. 1836 /// Output only. The time the log entry was received by Stackdriver Logging.
1712 */
1713 core.String receiveTimestamp; 1837 core.String receiveTimestamp;
1714 /** 1838
1715 * Required. The monitored resource associated with this log entry. Example: a 1839 /// Required. The monitored resource associated with this log entry. Example:
1716 * log entry that reports a database error would be associated with the 1840 /// a log entry that reports a database error would be associated with the
1717 * monitored resource designating the particular database that reported the 1841 /// monitored resource designating the particular database that reported the
1718 * error. 1842 /// error.
1719 */
1720 MonitoredResource resource; 1843 MonitoredResource resource;
1721 /** 1844
1722 * Optional. The severity of the log entry. The default value is 1845 /// Optional. The severity of the log entry. The default value is
1723 * LogSeverity.DEFAULT. 1846 /// LogSeverity.DEFAULT.
1724 * Possible string values are: 1847 /// Possible string values are:
1725 * - "DEFAULT" : (0) The log entry has no assigned severity level. 1848 /// - "DEFAULT" : (0) The log entry has no assigned severity level.
1726 * - "DEBUG" : (100) Debug or trace information. 1849 /// - "DEBUG" : (100) Debug or trace information.
1727 * - "INFO" : (200) Routine information, such as ongoing status or 1850 /// - "INFO" : (200) Routine information, such as ongoing status or
1728 * performance. 1851 /// performance.
1729 * - "NOTICE" : (300) Normal but significant events, such as start up, shut 1852 /// - "NOTICE" : (300) Normal but significant events, such as start up, shut
1730 * down, or a configuration change. 1853 /// down, or a configuration change.
1731 * - "WARNING" : (400) Warning events might cause problems. 1854 /// - "WARNING" : (400) Warning events might cause problems.
1732 * - "ERROR" : (500) Error events are likely to cause problems. 1855 /// - "ERROR" : (500) Error events are likely to cause problems.
1733 * - "CRITICAL" : (600) Critical events cause more severe problems or outages. 1856 /// - "CRITICAL" : (600) Critical events cause more severe problems or
1734 * - "ALERT" : (700) A person must take an action immediately. 1857 /// outages.
1735 * - "EMERGENCY" : (800) One or more systems are unusable. 1858 /// - "ALERT" : (700) A person must take an action immediately.
1736 */ 1859 /// - "EMERGENCY" : (800) One or more systems are unusable.
1737 core.String severity; 1860 core.String severity;
1738 /** 1861
1739 * Optional. Source code location information associated with the log entry, 1862 /// Optional. Source code location information associated with the log entry,
1740 * if any. 1863 /// if any.
1741 */
1742 LogEntrySourceLocation sourceLocation; 1864 LogEntrySourceLocation sourceLocation;
1743 /** The log entry payload, represented as a Unicode string (UTF-8). */ 1865
1866 /// The log entry payload, represented as a Unicode string (UTF-8).
1744 core.String textPayload; 1867 core.String textPayload;
1745 /** 1868
1746 * Optional. The time the event described by the log entry occurred. If 1869 /// Optional. The time the event described by the log entry occurred. This
1747 * omitted in a new log entry, Stackdriver Logging will insert the time the 1870 /// time is used to compute the log entry's age and to enforce the logs
1748 * log entry is received. Stackdriver Logging might reject log entries whose 1871 /// retention period. If this field is omitted in a new log entry, then
1749 * time stamps are more than a couple of hours in the future. Log entries with 1872 /// Stackdriver Logging assigns it the current time.Incoming log entries
1750 * time stamps in the past are accepted. 1873 /// should have timestamps that are no more than the logs retention period in
1751 */ 1874 /// the past, and no more than 24 hours in the future. See the entries.write
1875 /// API method for more information.
1752 core.String timestamp; 1876 core.String timestamp;
1753 /** 1877
1754 * Optional. Resource name of the trace associated with the log entry, if any. 1878 /// Optional. Resource name of the trace associated with the log entry, if
1755 * If it contains a relative resource name, the name is assumed to be relative 1879 /// any. If it contains a relative resource name, the name is assumed to be
1756 * to //tracing.googleapis.com. Example: 1880 /// relative to //tracing.googleapis.com. Example:
1757 * projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 1881 /// projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824
1758 */
1759 core.String trace; 1882 core.String trace;
1760 1883
1761 LogEntry(); 1884 LogEntry();
1762 1885
1763 LogEntry.fromJson(core.Map _json) { 1886 LogEntry.fromJson(core.Map _json) {
1764 if (_json.containsKey("httpRequest")) { 1887 if (_json.containsKey("httpRequest")) {
1765 httpRequest = new HttpRequest.fromJson(_json["httpRequest"]); 1888 httpRequest = new HttpRequest.fromJson(_json["httpRequest"]);
1766 } 1889 }
1767 if (_json.containsKey("insertId")) { 1890 if (_json.containsKey("insertId")) {
1768 insertId = _json["insertId"]; 1891 insertId = _json["insertId"];
(...skipping 16 matching lines...) Expand all
1785 if (_json.containsKey("receiveTimestamp")) { 1908 if (_json.containsKey("receiveTimestamp")) {
1786 receiveTimestamp = _json["receiveTimestamp"]; 1909 receiveTimestamp = _json["receiveTimestamp"];
1787 } 1910 }
1788 if (_json.containsKey("resource")) { 1911 if (_json.containsKey("resource")) {
1789 resource = new MonitoredResource.fromJson(_json["resource"]); 1912 resource = new MonitoredResource.fromJson(_json["resource"]);
1790 } 1913 }
1791 if (_json.containsKey("severity")) { 1914 if (_json.containsKey("severity")) {
1792 severity = _json["severity"]; 1915 severity = _json["severity"];
1793 } 1916 }
1794 if (_json.containsKey("sourceLocation")) { 1917 if (_json.containsKey("sourceLocation")) {
1795 sourceLocation = new LogEntrySourceLocation.fromJson(_json["sourceLocation "]); 1918 sourceLocation =
1919 new LogEntrySourceLocation.fromJson(_json["sourceLocation"]);
1796 } 1920 }
1797 if (_json.containsKey("textPayload")) { 1921 if (_json.containsKey("textPayload")) {
1798 textPayload = _json["textPayload"]; 1922 textPayload = _json["textPayload"];
1799 } 1923 }
1800 if (_json.containsKey("timestamp")) { 1924 if (_json.containsKey("timestamp")) {
1801 timestamp = _json["timestamp"]; 1925 timestamp = _json["timestamp"];
1802 } 1926 }
1803 if (_json.containsKey("trace")) { 1927 if (_json.containsKey("trace")) {
1804 trace = _json["trace"]; 1928 trace = _json["trace"];
1805 } 1929 }
1806 } 1930 }
1807 1931
1808 core.Map<core.String, core.Object> toJson() { 1932 core.Map<core.String, core.Object> toJson() {
1809 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1933 final core.Map<core.String, core.Object> _json =
1934 new core.Map<core.String, core.Object>();
1810 if (httpRequest != null) { 1935 if (httpRequest != null) {
1811 _json["httpRequest"] = (httpRequest).toJson(); 1936 _json["httpRequest"] = (httpRequest).toJson();
1812 } 1937 }
1813 if (insertId != null) { 1938 if (insertId != null) {
1814 _json["insertId"] = insertId; 1939 _json["insertId"] = insertId;
1815 } 1940 }
1816 if (jsonPayload != null) { 1941 if (jsonPayload != null) {
1817 _json["jsonPayload"] = jsonPayload; 1942 _json["jsonPayload"] = jsonPayload;
1818 } 1943 }
1819 if (labels != null) { 1944 if (labels != null) {
(...skipping 26 matching lines...) Expand all
1846 if (timestamp != null) { 1971 if (timestamp != null) {
1847 _json["timestamp"] = timestamp; 1972 _json["timestamp"] = timestamp;
1848 } 1973 }
1849 if (trace != null) { 1974 if (trace != null) {
1850 _json["trace"] = trace; 1975 _json["trace"] = trace;
1851 } 1976 }
1852 return _json; 1977 return _json;
1853 } 1978 }
1854 } 1979 }
1855 1980
1856 /** 1981 /// Additional information about a potentially long-running operation with
1857 * Additional information about a potentially long-running operation with which 1982 /// which a log entry is associated.
1858 * a log entry is associated.
1859 */
1860 class LogEntryOperation { 1983 class LogEntryOperation {
1861 /** 1984 /// Optional. Set this to True if this is the first log entry in the
1862 * Optional. Set this to True if this is the first log entry in the operation. 1985 /// operation.
1863 */
1864 core.bool first; 1986 core.bool first;
1865 /** 1987
1866 * Optional. An arbitrary operation identifier. Log entries with the same 1988 /// Optional. An arbitrary operation identifier. Log entries with the same
1867 * identifier are assumed to be part of the same operation. 1989 /// identifier are assumed to be part of the same operation.
1868 */
1869 core.String id; 1990 core.String id;
1870 /** 1991
1871 * Optional. Set this to True if this is the last log entry in the operation. 1992 /// Optional. Set this to True if this is the last log entry in the
1872 */ 1993 /// operation.
1873 core.bool last; 1994 core.bool last;
1874 /** 1995
1875 * Optional. An arbitrary producer identifier. The combination of id and 1996 /// Optional. An arbitrary producer identifier. The combination of id and
1876 * producer must be globally unique. Examples for producer: 1997 /// producer must be globally unique. Examples for producer:
1877 * "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication". 1998 /// "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication".
1878 */
1879 core.String producer; 1999 core.String producer;
1880 2000
1881 LogEntryOperation(); 2001 LogEntryOperation();
1882 2002
1883 LogEntryOperation.fromJson(core.Map _json) { 2003 LogEntryOperation.fromJson(core.Map _json) {
1884 if (_json.containsKey("first")) { 2004 if (_json.containsKey("first")) {
1885 first = _json["first"]; 2005 first = _json["first"];
1886 } 2006 }
1887 if (_json.containsKey("id")) { 2007 if (_json.containsKey("id")) {
1888 id = _json["id"]; 2008 id = _json["id"];
1889 } 2009 }
1890 if (_json.containsKey("last")) { 2010 if (_json.containsKey("last")) {
1891 last = _json["last"]; 2011 last = _json["last"];
1892 } 2012 }
1893 if (_json.containsKey("producer")) { 2013 if (_json.containsKey("producer")) {
1894 producer = _json["producer"]; 2014 producer = _json["producer"];
1895 } 2015 }
1896 } 2016 }
1897 2017
1898 core.Map<core.String, core.Object> toJson() { 2018 core.Map<core.String, core.Object> toJson() {
1899 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2019 final core.Map<core.String, core.Object> _json =
2020 new core.Map<core.String, core.Object>();
1900 if (first != null) { 2021 if (first != null) {
1901 _json["first"] = first; 2022 _json["first"] = first;
1902 } 2023 }
1903 if (id != null) { 2024 if (id != null) {
1904 _json["id"] = id; 2025 _json["id"] = id;
1905 } 2026 }
1906 if (last != null) { 2027 if (last != null) {
1907 _json["last"] = last; 2028 _json["last"] = last;
1908 } 2029 }
1909 if (producer != null) { 2030 if (producer != null) {
1910 _json["producer"] = producer; 2031 _json["producer"] = producer;
1911 } 2032 }
1912 return _json; 2033 return _json;
1913 } 2034 }
1914 } 2035 }
1915 2036
1916 /** 2037 /// Additional information about the source code location that produced the log
1917 * Additional information about the source code location that produced the log 2038 /// entry.
1918 * entry.
1919 */
1920 class LogEntrySourceLocation { 2039 class LogEntrySourceLocation {
1921 /** 2040 /// Optional. Source file name. Depending on the runtime environment, this
1922 * Optional. Source file name. Depending on the runtime environment, this 2041 /// might be a simple name or a fully-qualified name.
1923 * might be a simple name or a fully-qualified name.
1924 */
1925 core.String file; 2042 core.String file;
1926 /** 2043
1927 * Optional. Human-readable name of the function or method being invoked, with 2044 /// Optional. Human-readable name of the function or method being invoked,
1928 * optional context such as the class or package name. This information may be 2045 /// with optional context such as the class or package name. This information
1929 * used in contexts such as the logs viewer, where a file and line number are 2046 /// may be used in contexts such as the logs viewer, where a file and line
1930 * less meaningful. The format can vary by language. For example: 2047 /// number are less meaningful. The format can vary by language. For example:
1931 * qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python). 2048 /// qual.if.ied.Class.method (Java), dir/package.func (Go), function
1932 */ 2049 /// (Python).
1933 core.String function; 2050 core.String function;
1934 /** 2051
1935 * Optional. Line within the source file. 1-based; 0 indicates no line number 2052 /// Optional. Line within the source file. 1-based; 0 indicates no line
1936 * available. 2053 /// number available.
1937 */
1938 core.String line; 2054 core.String line;
1939 2055
1940 LogEntrySourceLocation(); 2056 LogEntrySourceLocation();
1941 2057
1942 LogEntrySourceLocation.fromJson(core.Map _json) { 2058 LogEntrySourceLocation.fromJson(core.Map _json) {
1943 if (_json.containsKey("file")) { 2059 if (_json.containsKey("file")) {
1944 file = _json["file"]; 2060 file = _json["file"];
1945 } 2061 }
1946 if (_json.containsKey("function")) { 2062 if (_json.containsKey("function")) {
1947 function = _json["function"]; 2063 function = _json["function"];
1948 } 2064 }
1949 if (_json.containsKey("line")) { 2065 if (_json.containsKey("line")) {
1950 line = _json["line"]; 2066 line = _json["line"];
1951 } 2067 }
1952 } 2068 }
1953 2069
1954 core.Map<core.String, core.Object> toJson() { 2070 core.Map<core.String, core.Object> toJson() {
1955 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2071 final core.Map<core.String, core.Object> _json =
2072 new core.Map<core.String, core.Object>();
1956 if (file != null) { 2073 if (file != null) {
1957 _json["file"] = file; 2074 _json["file"] = file;
1958 } 2075 }
1959 if (function != null) { 2076 if (function != null) {
1960 _json["function"] = function; 2077 _json["function"] = function;
1961 } 2078 }
1962 if (line != null) { 2079 if (line != null) {
1963 _json["line"] = line; 2080 _json["line"] = line;
1964 } 2081 }
1965 return _json; 2082 return _json;
1966 } 2083 }
1967 } 2084 }
1968 2085
1969 /** Application log line emitted while processing a request. */ 2086 /// Application log line emitted while processing a request.
1970 class LogLine { 2087 class LogLine {
1971 /** App-provided log message. */ 2088 /// App-provided log message.
1972 core.String logMessage; 2089 core.String logMessage;
1973 /** 2090
1974 * Severity of this log entry. 2091 /// Severity of this log entry.
1975 * Possible string values are: 2092 /// Possible string values are:
1976 * - "DEFAULT" : (0) The log entry has no assigned severity level. 2093 /// - "DEFAULT" : (0) The log entry has no assigned severity level.
1977 * - "DEBUG" : (100) Debug or trace information. 2094 /// - "DEBUG" : (100) Debug or trace information.
1978 * - "INFO" : (200) Routine information, such as ongoing status or 2095 /// - "INFO" : (200) Routine information, such as ongoing status or
1979 * performance. 2096 /// performance.
1980 * - "NOTICE" : (300) Normal but significant events, such as start up, shut 2097 /// - "NOTICE" : (300) Normal but significant events, such as start up, shut
1981 * down, or a configuration change. 2098 /// down, or a configuration change.
1982 * - "WARNING" : (400) Warning events might cause problems. 2099 /// - "WARNING" : (400) Warning events might cause problems.
1983 * - "ERROR" : (500) Error events are likely to cause problems. 2100 /// - "ERROR" : (500) Error events are likely to cause problems.
1984 * - "CRITICAL" : (600) Critical events cause more severe problems or outages. 2101 /// - "CRITICAL" : (600) Critical events cause more severe problems or
1985 * - "ALERT" : (700) A person must take an action immediately. 2102 /// outages.
1986 * - "EMERGENCY" : (800) One or more systems are unusable. 2103 /// - "ALERT" : (700) A person must take an action immediately.
1987 */ 2104 /// - "EMERGENCY" : (800) One or more systems are unusable.
1988 core.String severity; 2105 core.String severity;
1989 /** Where in the source code this log message was written. */ 2106
2107 /// Where in the source code this log message was written.
1990 SourceLocation sourceLocation; 2108 SourceLocation sourceLocation;
1991 /** Approximate time when this log entry was made. */ 2109
2110 /// Approximate time when this log entry was made.
1992 core.String time; 2111 core.String time;
1993 2112
1994 LogLine(); 2113 LogLine();
1995 2114
1996 LogLine.fromJson(core.Map _json) { 2115 LogLine.fromJson(core.Map _json) {
1997 if (_json.containsKey("logMessage")) { 2116 if (_json.containsKey("logMessage")) {
1998 logMessage = _json["logMessage"]; 2117 logMessage = _json["logMessage"];
1999 } 2118 }
2000 if (_json.containsKey("severity")) { 2119 if (_json.containsKey("severity")) {
2001 severity = _json["severity"]; 2120 severity = _json["severity"];
2002 } 2121 }
2003 if (_json.containsKey("sourceLocation")) { 2122 if (_json.containsKey("sourceLocation")) {
2004 sourceLocation = new SourceLocation.fromJson(_json["sourceLocation"]); 2123 sourceLocation = new SourceLocation.fromJson(_json["sourceLocation"]);
2005 } 2124 }
2006 if (_json.containsKey("time")) { 2125 if (_json.containsKey("time")) {
2007 time = _json["time"]; 2126 time = _json["time"];
2008 } 2127 }
2009 } 2128 }
2010 2129
2011 core.Map<core.String, core.Object> toJson() { 2130 core.Map<core.String, core.Object> toJson() {
2012 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2131 final core.Map<core.String, core.Object> _json =
2132 new core.Map<core.String, core.Object>();
2013 if (logMessage != null) { 2133 if (logMessage != null) {
2014 _json["logMessage"] = logMessage; 2134 _json["logMessage"] = logMessage;
2015 } 2135 }
2016 if (severity != null) { 2136 if (severity != null) {
2017 _json["severity"] = severity; 2137 _json["severity"] = severity;
2018 } 2138 }
2019 if (sourceLocation != null) { 2139 if (sourceLocation != null) {
2020 _json["sourceLocation"] = (sourceLocation).toJson(); 2140 _json["sourceLocation"] = (sourceLocation).toJson();
2021 } 2141 }
2022 if (time != null) { 2142 if (time != null) {
2023 _json["time"] = time; 2143 _json["time"] = time;
2024 } 2144 }
2025 return _json; 2145 return _json;
2026 } 2146 }
2027 } 2147 }
2028 2148
2029 /** 2149 /// Describes a logs-based metric. The value of the metric is the number of log
2030 * Describes a logs-based metric. The value of the metric is the number of log 2150 /// entries that match a logs filter in a given time interval.Logs-based metric
2031 * entries that match a logs filter in a given time interval. 2151 /// can also be used to extract values from logs and create a a distribution of
2032 */ 2152 /// the values. The distribution records the statistics of the extracted values
2153 /// along with an optional histogram of the values as specified by the bucket
2154 /// options.
2033 class LogMetric { 2155 class LogMetric {
2034 /** 2156 /// Optional. The bucket_options are required when the logs-based metric is
2035 * Optional. A description of this metric, which is used in documentation. 2157 /// using a DISTRIBUTION value type and it describes the bucket boundaries
2036 */ 2158 /// used to create a histogram of the extracted values.
2159 BucketOptions bucketOptions;
2160
2161 /// Optional. A description of this metric, which is used in documentation.
2037 core.String description; 2162 core.String description;
2038 /** 2163
2039 * Required. An advanced logs filter which is used to match log entries. 2164 /// Required. An advanced logs filter which is used to match log entries.
2040 * Example: 2165 /// Example:
2041 * "resource.type=gae_app AND severity>=ERROR" 2166 /// "resource.type=gae_app AND severity>=ERROR"
2042 * The maximum length of the filter is 20000 characters. 2167 /// The maximum length of the filter is 20000 characters.
2043 */
2044 core.String filter; 2168 core.String filter;
2045 /** 2169
2046 * Required. The client-assigned metric identifier. Examples: "error_count", 2170 /// Optional. A map from a label key string to an extractor expression which
2047 * "nginx/requests".Metric identifiers are limited to 100 characters and can 2171 /// is used to extract data from a log entry field and assign as the label
2048 * include only the following characters: A-Z, a-z, 0-9, and the special 2172 /// value. Each label key specified in the LabelDescriptor must have an
2049 * characters _-.,+!*',()%/. The forward-slash character (/) denotes a 2173 /// associated extractor expression in this map. The syntax of the extractor
2050 * hierarchy of name pieces, and it cannot be the first character of the 2174 /// expression is the same as for the value_extractor field.The extracted
2051 * name.The metric identifier in this field must not be URL-encoded 2175 /// value is converted to the type defined in the label descriptor. If the
2052 * (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric 2176 /// either the extraction or the type conversion fails, the label will have a
2053 * identifier appears as the [METRIC_ID] part of a metric_name API parameter, 2177 /// default value. The default value for a string label is an empty string,
2054 * then the metric identifier must be URL-encoded. Example: 2178 /// for an integer label its 0, and for a boolean label its false.Note that
2055 * "projects/my-project/metrics/nginx%2Frequests". 2179 /// there are upper bounds on the maximum number of labels and the number of
2056 */ 2180 /// active time series that are allowed in a project.
2181 core.Map<core.String, core.String> labelExtractors;
2182
2183 /// Optional. The metric descriptor associated with the logs-based metric. If
2184 /// unspecified, it uses a default metric descriptor with a DELTA metric
2185 /// kind, INT64 value type, with no labels and a unit of "1". Such a metric
2186 /// counts the number of log entries matching the filter expression.The name,
2187 /// type, and description fields in the metric_descriptor are output only,
2188 /// and is constructed using the name and description field in the
2189 /// LogMetric.To create a logs-based metric that records a distribution of
2190 /// log values, a DELTA metric kind with a DISTRIBUTION value type must be
2191 /// used along with a value_extractor expression in the LogMetric.Each label
2192 /// in the metric descriptor must have a matching label name as the key and
2193 /// an extractor expression as the value in the label_extractors map.The
2194 /// metric_kind and value_type fields in the metric_descriptor cannot be
2195 /// updated once initially configured. New labels can be added in the
2196 /// metric_descriptor, but existing labels cannot be modified except for
2197 /// their description.
2198 MetricDescriptor metricDescriptor;
2199
2200 /// Required. The client-assigned metric identifier. Examples: "error_count",
2201 /// "nginx/requests".Metric identifiers are limited to 100 characters and can
2202 /// include only the following characters: A-Z, a-z, 0-9, and the special
2203 /// characters _-.,+!*',()%/. The forward-slash character (/) denotes a
2204 /// hierarchy of name pieces, and it cannot be the first character of the
2205 /// name.The metric identifier in this field must not be URL-encoded
2206 /// (https://en.wikipedia.org/wiki/Percent-encoding). However, when the
2207 /// metric identifier appears as the [METRIC_ID] part of a metric_name API
2208 /// parameter, then the metric identifier must be URL-encoded. Example:
2209 /// "projects/my-project/metrics/nginx%2Frequests".
2057 core.String name; 2210 core.String name;
2058 /** 2211
2059 * Output only. The API version that created or updated this metric. This 2212 /// Optional. A value_extractor is required when using a distribution
2060 * value is currently always set to V2. 2213 /// logs-based metric to extract the values to record from a log entry. Two
2061 * Possible string values are: 2214 /// functions are supported for value extraction: EXTRACT(field) or
2062 * - "V2" : Stackdriver Logging API v2. 2215 /// REGEXP_EXTRACT(field, regex). The argument are: 1. field: The name of
2063 * - "V1" : Stackdriver Logging API v1. 2216 /// the log entry field from which the value is to be extracted. 2. regex:
2064 */ 2217 /// A regular expression using the Google RE2 syntax
2218 /// (https://github.com/google/re2/wiki/Syntax) with a single capture group
2219 /// to extract data from the specified log entry field. The value of the
2220 /// field is converted to a string before applying the regex. It is an error
2221 /// to specify a regex that does not include exactly one capture group.The
2222 /// result of the extraction must be convertible to a double type, as the
2223 /// distribution always records double values. If either the extraction or
2224 /// the conversion to double fails, then those values are not recorded in the
2225 /// distribution.Example: REGEXP_EXTRACT(jsonPayload.request,
2226 /// ".*quantity=(\d+).*")
2227 core.String valueExtractor;
2228
2229 /// Deprecated. The API version that created or updated this metric. The v2
2230 /// format is used by default and cannot be changed.
2231 /// Possible string values are:
2232 /// - "V2" : Stackdriver Logging API v2.
2233 /// - "V1" : Stackdriver Logging API v1.
2065 core.String version; 2234 core.String version;
2066 2235
2067 LogMetric(); 2236 LogMetric();
2068 2237
2069 LogMetric.fromJson(core.Map _json) { 2238 LogMetric.fromJson(core.Map _json) {
2239 if (_json.containsKey("bucketOptions")) {
2240 bucketOptions = new BucketOptions.fromJson(_json["bucketOptions"]);
2241 }
2070 if (_json.containsKey("description")) { 2242 if (_json.containsKey("description")) {
2071 description = _json["description"]; 2243 description = _json["description"];
2072 } 2244 }
2073 if (_json.containsKey("filter")) { 2245 if (_json.containsKey("filter")) {
2074 filter = _json["filter"]; 2246 filter = _json["filter"];
2075 } 2247 }
2248 if (_json.containsKey("labelExtractors")) {
2249 labelExtractors = _json["labelExtractors"];
2250 }
2251 if (_json.containsKey("metricDescriptor")) {
2252 metricDescriptor =
2253 new MetricDescriptor.fromJson(_json["metricDescriptor"]);
2254 }
2076 if (_json.containsKey("name")) { 2255 if (_json.containsKey("name")) {
2077 name = _json["name"]; 2256 name = _json["name"];
2078 } 2257 }
2258 if (_json.containsKey("valueExtractor")) {
2259 valueExtractor = _json["valueExtractor"];
2260 }
2079 if (_json.containsKey("version")) { 2261 if (_json.containsKey("version")) {
2080 version = _json["version"]; 2262 version = _json["version"];
2081 } 2263 }
2082 } 2264 }
2083 2265
2084 core.Map<core.String, core.Object> toJson() { 2266 core.Map<core.String, core.Object> toJson() {
2085 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2267 final core.Map<core.String, core.Object> _json =
2268 new core.Map<core.String, core.Object>();
2269 if (bucketOptions != null) {
2270 _json["bucketOptions"] = (bucketOptions).toJson();
2271 }
2086 if (description != null) { 2272 if (description != null) {
2087 _json["description"] = description; 2273 _json["description"] = description;
2088 } 2274 }
2089 if (filter != null) { 2275 if (filter != null) {
2090 _json["filter"] = filter; 2276 _json["filter"] = filter;
2091 } 2277 }
2278 if (labelExtractors != null) {
2279 _json["labelExtractors"] = labelExtractors;
2280 }
2281 if (metricDescriptor != null) {
2282 _json["metricDescriptor"] = (metricDescriptor).toJson();
2283 }
2092 if (name != null) { 2284 if (name != null) {
2093 _json["name"] = name; 2285 _json["name"] = name;
2094 } 2286 }
2287 if (valueExtractor != null) {
2288 _json["valueExtractor"] = valueExtractor;
2289 }
2095 if (version != null) { 2290 if (version != null) {
2096 _json["version"] = version; 2291 _json["version"] = version;
2097 } 2292 }
2098 return _json; 2293 return _json;
2099 } 2294 }
2100 } 2295 }
2101 2296
2102 /** 2297 /// Describes a sink used to export log entries to one of the following
2103 * Describes a sink used to export log entries to one of the following 2298 /// destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or
2104 * destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a 2299 /// a Cloud Pub/Sub topic. A logs filter controls which log entries are
2105 * Cloud Pub/Sub topic. A logs filter controls which log entries are exported. 2300 /// exported. The sink must be created within a project, organization, billing
2106 * The sink must be created within a project, organization, billing account, or 2301 /// account, or folder.
2107 * folder.
2108 */
2109 class LogSink { 2302 class LogSink {
2110 /** 2303 /// Required. The export destination:
2111 * Required. The export destination: 2304 /// "storage.googleapis.com/[GCS_BUCKET]"
2112 * "storage.googleapis.com/[GCS_BUCKET]" 2305 /// "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
2113 * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" 2306 /// "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
2114 * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" 2307 /// The sink's writer_identity, set when the sink is created, must have
2115 * The sink's writer_identity, set when the sink is created, must have 2308 /// permission to write to the destination or else the log entries are not
2116 * permission to write to the destination or else the log entries are not 2309 /// exported. For more information, see Exporting Logs With Sinks.
2117 * exported. For more information, see Exporting Logs With Sinks.
2118 */
2119 core.String destination; 2310 core.String destination;
2120 /** 2311
2121 * Optional. The time at which this sink will stop exporting log entries. Log 2312 /// Deprecated. This field is ignored when creating or updating sinks.
2122 * entries are exported only if their timestamp is earlier than the end time.
2123 * If this field is not supplied, there is no end time. If both a start time
2124 * and an end time are provided, then the end time must be later than the
2125 * start time.
2126 */
2127 core.String endTime; 2313 core.String endTime;
2128 /** 2314
2129 * Optional. An advanced logs filter. The only exported log entries are those 2315 /// Optional. An advanced logs filter. The only exported log entries are
2130 * that are in the resource owning the sink and that match the filter. The 2316 /// those that are in the resource owning the sink and that match the filter.
2131 * filter must use the log entry format specified by the output_version_format 2317 /// For example:
2132 * parameter. For example, in the v2 format: 2318 /// logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
2133 * logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
2134 */
2135 core.String filter; 2319 core.String filter;
2136 /** 2320
2137 * Optional. This field applies only to sinks owned by organizations and 2321 /// Optional. This field applies only to sinks owned by organizations and
2138 * folders. If the field is false, the default, only the logs owned by the 2322 /// folders. If the field is false, the default, only the logs owned by the
2139 * sink's parent resource are available for export. If the field is true, then 2323 /// sink's parent resource are available for export. If the field is true,
2140 * logs from all the projects, folders, and billing accounts contained in the 2324 /// then logs from all the projects, folders, and billing accounts contained
2141 * sink's parent resource are also available for export. Whether a particular 2325 /// in the sink's parent resource are also available for export. Whether a
2142 * log entry from the children is exported depends on the sink's filter 2326 /// particular log entry from the children is exported depends on the sink's
2143 * expression. For example, if this field is true, then the filter 2327 /// filter expression. For example, if this field is true, then the filter
2144 * resource.type=gce_instance would export all Compute Engine VM instance log 2328 /// resource.type=gce_instance would export all Compute Engine VM instance
2145 * entries from all projects in the sink's parent. To only export entries from 2329 /// log entries from all projects in the sink's parent. To only export
2146 * certain child projects, filter on the project part of the log name: 2330 /// entries from certain child projects, filter on the project part of the
2147 * logName:("projects/test-project1/" OR "projects/test-project2/") AND 2331 /// log name:
2148 * resource.type=gce_instance 2332 /// logName:("projects/test-project1/" OR "projects/test-project2/") AND
2149 */ 2333 /// resource.type=gce_instance
2150 core.bool includeChildren; 2334 core.bool includeChildren;
2151 /** 2335
2152 * Required. The client-assigned sink identifier, unique within the project. 2336 /// Required. The client-assigned sink identifier, unique within the project.
2153 * Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 2337 /// Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to
2154 * characters and can include only the following characters: upper and 2338 /// 100 characters and can include only the following characters: upper and
2155 * lower-case alphanumeric characters, underscores, hyphens, and periods. 2339 /// lower-case alphanumeric characters, underscores, hyphens, and periods.
2156 */
2157 core.String name; 2340 core.String name;
2158 /** 2341
2159 * Deprecated. The log entry format to use for this sink's exported log 2342 /// Deprecated. The log entry format to use for this sink's exported log
2160 * entries. The v2 format is used by default and cannot be changed. 2343 /// entries. The v2 format is used by default and cannot be changed.
2161 * Possible string values are: 2344 /// Possible string values are:
2162 * - "VERSION_FORMAT_UNSPECIFIED" : An unspecified format version that will 2345 /// - "VERSION_FORMAT_UNSPECIFIED" : An unspecified format version that will
2163 * default to V2. 2346 /// default to V2.
2164 * - "V2" : LogEntry version 2 format. 2347 /// - "V2" : LogEntry version 2 format.
2165 * - "V1" : LogEntry version 1 format. 2348 /// - "V1" : LogEntry version 1 format.
2166 */
2167 core.String outputVersionFormat; 2349 core.String outputVersionFormat;
2168 /** 2350
2169 * Optional. The time at which this sink will begin exporting log entries. Log 2351 /// Deprecated. This field is ignored when creating or updating sinks.
2170 * entries are exported only if their timestamp is not earlier than the start
2171 * time. The default value of this field is the time the sink is created or
2172 * updated.
2173 */
2174 core.String startTime; 2352 core.String startTime;
2175 /** 2353
2176 * Output only. An IAM identity&mdash;a service account or group&mdash;under 2354 /// Output only. An IAM identity&mdash;a service account or group&mdash;under
2177 * which Stackdriver Logging writes the exported log entries to the sink's 2355 /// which Stackdriver Logging writes the exported log entries to the sink's
2178 * destination. This field is set by sinks.create and sinks.update, based on 2356 /// destination. This field is set by sinks.create and sinks.update, based on
2179 * the setting of unique_writer_identity in those methods.Until you grant this 2357 /// the setting of unique_writer_identity in those methods.Until you grant
2180 * identity write-access to the destination, log entry exports from this sink 2358 /// this identity write-access to the destination, log entry exports from
2181 * will fail. For more information, see Granting access for a resource. 2359 /// this sink will fail. For more information, see Granting access for a
2182 * Consult the destination service's documentation to determine the 2360 /// resource. Consult the destination service's documentation to determine
2183 * appropriate IAM roles to assign to the identity. 2361 /// the appropriate IAM roles to assign to the identity.
2184 */
2185 core.String writerIdentity; 2362 core.String writerIdentity;
2186 2363
2187 LogSink(); 2364 LogSink();
2188 2365
2189 LogSink.fromJson(core.Map _json) { 2366 LogSink.fromJson(core.Map _json) {
2190 if (_json.containsKey("destination")) { 2367 if (_json.containsKey("destination")) {
2191 destination = _json["destination"]; 2368 destination = _json["destination"];
2192 } 2369 }
2193 if (_json.containsKey("endTime")) { 2370 if (_json.containsKey("endTime")) {
2194 endTime = _json["endTime"]; 2371 endTime = _json["endTime"];
(...skipping 12 matching lines...) Expand all
2207 } 2384 }
2208 if (_json.containsKey("startTime")) { 2385 if (_json.containsKey("startTime")) {
2209 startTime = _json["startTime"]; 2386 startTime = _json["startTime"];
2210 } 2387 }
2211 if (_json.containsKey("writerIdentity")) { 2388 if (_json.containsKey("writerIdentity")) {
2212 writerIdentity = _json["writerIdentity"]; 2389 writerIdentity = _json["writerIdentity"];
2213 } 2390 }
2214 } 2391 }
2215 2392
2216 core.Map<core.String, core.Object> toJson() { 2393 core.Map<core.String, core.Object> toJson() {
2217 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2394 final core.Map<core.String, core.Object> _json =
2395 new core.Map<core.String, core.Object>();
2218 if (destination != null) { 2396 if (destination != null) {
2219 _json["destination"] = destination; 2397 _json["destination"] = destination;
2220 } 2398 }
2221 if (endTime != null) { 2399 if (endTime != null) {
2222 _json["endTime"] = endTime; 2400 _json["endTime"] = endTime;
2223 } 2401 }
2224 if (filter != null) { 2402 if (filter != null) {
2225 _json["filter"] = filter; 2403 _json["filter"] = filter;
2226 } 2404 }
2227 if (includeChildren != null) { 2405 if (includeChildren != null) {
2228 _json["includeChildren"] = includeChildren; 2406 _json["includeChildren"] = includeChildren;
2229 } 2407 }
2230 if (name != null) { 2408 if (name != null) {
2231 _json["name"] = name; 2409 _json["name"] = name;
2232 } 2410 }
2233 if (outputVersionFormat != null) { 2411 if (outputVersionFormat != null) {
2234 _json["outputVersionFormat"] = outputVersionFormat; 2412 _json["outputVersionFormat"] = outputVersionFormat;
2235 } 2413 }
2236 if (startTime != null) { 2414 if (startTime != null) {
2237 _json["startTime"] = startTime; 2415 _json["startTime"] = startTime;
2238 } 2416 }
2239 if (writerIdentity != null) { 2417 if (writerIdentity != null) {
2240 _json["writerIdentity"] = writerIdentity; 2418 _json["writerIdentity"] = writerIdentity;
2241 } 2419 }
2242 return _json; 2420 return _json;
2243 } 2421 }
2244 } 2422 }
2245 2423
2246 /** 2424 /// Defines a metric type and its schema. Once a metric descriptor is created,
2247 * An object representing a resource that can be used for monitoring, logging, 2425 /// deleting or altering it stops data collection and makes the metric type's
2248 * billing, or other purposes. Examples include virtual machine instances, 2426 /// existing data unusable.
2249 * databases, and storage devices such as disks. The type field identifies a 2427 class MetricDescriptor {
2250 * MonitoredResourceDescriptor object that describes the resource's schema. 2428 /// A detailed description of the metric, which can be used in documentation.
2251 * Information in the labels field identifies the actual resource and its 2429 core.String description;
2252 * attributes according to the schema. For example, a particular Compute Engine 2430
2253 * VM instance could be represented by the following object, because the 2431 /// A concise name for the metric, which can be displayed in user interfaces.
2254 * MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and 2432 /// Use sentence case without an ending period, for example "Request count".
2255 * "zone": 2433 core.String displayName;
2256 * { "type": "gce_instance", 2434
2257 * "labels": { "instance_id": "12345678901234", 2435 /// The set of labels that can be used to describe a specific instance of
2258 * "zone": "us-central1-a" }} 2436 /// this metric type. For example, the
2259 */ 2437 /// appengine.googleapis.com/http/server/response_latencies metric type has a
2438 /// label for the HTTP response code, response_code, so you can look at
2439 /// latencies for successful responses or just for responses that failed.
2440 core.List<LabelDescriptor> labels;
2441
2442 /// Whether the metric records instantaneous values, changes to a value, etc.
2443 /// Some combinations of metric_kind and value_type might not be supported.
2444 /// Possible string values are:
2445 /// - "METRIC_KIND_UNSPECIFIED" : Do not use this default value.
2446 /// - "GAUGE" : An instantaneous measurement of a value.
2447 /// - "DELTA" : The change in a value during a time interval.
2448 /// - "CUMULATIVE" : A value accumulated over a time interval. Cumulative
2449 /// measurements in a time series should have the same start time and
2450 /// increasing end times, until an event resets the cumulative value to zero
2451 /// and sets a new start time for the following points.
2452 core.String metricKind;
2453
2454 /// The resource name of the metric descriptor. Depending on the
2455 /// implementation, the name typically includes: (1) the parent resource name
2456 /// that defines the scope of the metric type or of its data; and (2) the
2457 /// metric's URL-encoded type, which also appears in the type field of this
2458 /// descriptor. For example, following is the resource name of a custom
2459 /// metric within the GCP project my-project-id:
2460 /// "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice% 2Fpaid%2Famount"
2461 core.String name;
2462
2463 /// The metric type, including its DNS name prefix. The type is not
2464 /// URL-encoded. All user-defined custom metric types have the DNS name
2465 /// custom.googleapis.com. Metric types should use a natural hierarchical
2466 /// grouping. For example:
2467 /// "custom.googleapis.com/invoice/paid/amount"
2468 /// "appengine.googleapis.com/http/server/response_latencies"
2469 core.String type;
2470
2471 /// The unit in which the metric value is reported. It is only applicable if
2472 /// the value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are
2473 /// a subset of The Unified Code for Units of Measure
2474 /// (http://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT)
2475 /// bit bit
2476 /// By byte
2477 /// s second
2478 /// min minute
2479 /// h hour
2480 /// d dayPrefixes (PREFIX)
2481 /// k kilo (10**3)
2482 /// M mega (10**6)
2483 /// G giga (10**9)
2484 /// T tera (10**12)
2485 /// P peta (10**15)
2486 /// E exa (10**18)
2487 /// Z zetta (10**21)
2488 /// Y yotta (10**24)
2489 /// m milli (10**-3)
2490 /// u micro (10**-6)
2491 /// n nano (10**-9)
2492 /// p pico (10**-12)
2493 /// f femto (10**-15)
2494 /// a atto (10**-18)
2495 /// z zepto (10**-21)
2496 /// y yocto (10**-24)
2497 /// Ki kibi (2**10)
2498 /// Mi mebi (2**20)
2499 /// Gi gibi (2**30)
2500 /// Ti tebi (2**40)GrammarThe grammar includes the dimensionless unit 1, such
2501 /// as 1/s.The grammar also includes these connectors:
2502 /// / division (as an infix operator, e.g. 1/s).
2503 /// . multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit
2504 /// is as follows:
2505 /// Expression = Component { "." Component } { "/" Component } ;
2506 ///
2507 /// Component = [ PREFIX ] UNIT [ Annotation ]
2508 /// | Annotation
2509 /// | "1"
2510 /// ;
2511 ///
2512 /// Annotation = "{" NAME "}" ;
2513 /// Notes:
2514 /// Annotation is just a comment if it follows a UNIT and is equivalent to 1
2515 /// if it is used alone. For examples, {requests}/s == 1/s,
2516 /// By{transmitted}/s == By/s.
2517 /// NAME is a sequence of non-blank printable ASCII characters not
2518 /// containing '{' or '}'.
2519 core.String unit;
2520
2521 /// Whether the measurement is an integer, a floating-point number, etc. Some
2522 /// combinations of metric_kind and value_type might not be supported.
2523 /// Possible string values are:
2524 /// - "VALUE_TYPE_UNSPECIFIED" : Do not use this default value.
2525 /// - "BOOL" : The value is a boolean. This value type can be used only if
2526 /// the metric kind is GAUGE.
2527 /// - "INT64" : The value is a signed 64-bit integer.
2528 /// - "DOUBLE" : The value is a double precision floating point number.
2529 /// - "STRING" : The value is a text string. This value type can be used only
2530 /// if the metric kind is GAUGE.
2531 /// - "DISTRIBUTION" : The value is a Distribution.
2532 /// - "MONEY" : The value is money.
2533 core.String valueType;
2534
2535 MetricDescriptor();
2536
2537 MetricDescriptor.fromJson(core.Map _json) {
2538 if (_json.containsKey("description")) {
2539 description = _json["description"];
2540 }
2541 if (_json.containsKey("displayName")) {
2542 displayName = _json["displayName"];
2543 }
2544 if (_json.containsKey("labels")) {
2545 labels = _json["labels"]
2546 .map((value) => new LabelDescriptor.fromJson(value))
2547 .toList();
2548 }
2549 if (_json.containsKey("metricKind")) {
2550 metricKind = _json["metricKind"];
2551 }
2552 if (_json.containsKey("name")) {
2553 name = _json["name"];
2554 }
2555 if (_json.containsKey("type")) {
2556 type = _json["type"];
2557 }
2558 if (_json.containsKey("unit")) {
2559 unit = _json["unit"];
2560 }
2561 if (_json.containsKey("valueType")) {
2562 valueType = _json["valueType"];
2563 }
2564 }
2565
2566 core.Map<core.String, core.Object> toJson() {
2567 final core.Map<core.String, core.Object> _json =
2568 new core.Map<core.String, core.Object>();
2569 if (description != null) {
2570 _json["description"] = description;
2571 }
2572 if (displayName != null) {
2573 _json["displayName"] = displayName;
2574 }
2575 if (labels != null) {
2576 _json["labels"] = labels.map((value) => (value).toJson()).toList();
2577 }
2578 if (metricKind != null) {
2579 _json["metricKind"] = metricKind;
2580 }
2581 if (name != null) {
2582 _json["name"] = name;
2583 }
2584 if (type != null) {
2585 _json["type"] = type;
2586 }
2587 if (unit != null) {
2588 _json["unit"] = unit;
2589 }
2590 if (valueType != null) {
2591 _json["valueType"] = valueType;
2592 }
2593 return _json;
2594 }
2595 }
2596
2597 /// An object representing a resource that can be used for monitoring, logging,
2598 /// billing, or other purposes. Examples include virtual machine instances,
2599 /// databases, and storage devices such as disks. The type field identifies a
2600 /// MonitoredResourceDescriptor object that describes the resource's schema.
2601 /// Information in the labels field identifies the actual resource and its
2602 /// attributes according to the schema. For example, a particular Compute
2603 /// Engine VM instance could be represented by the following object, because
2604 /// the MonitoredResourceDescriptor for "gce_instance" has labels "instance_id"
2605 /// and "zone":
2606 /// { "type": "gce_instance",
2607 /// "labels": { "instance_id": "12345678901234",
2608 /// "zone": "us-central1-a" }}
2260 class MonitoredResource { 2609 class MonitoredResource {
2261 /** 2610 /// Required. Values for all of the labels listed in the associated monitored
2262 * Required. Values for all of the labels listed in the associated monitored 2611 /// resource descriptor. For example, Compute Engine VM instances use the
2263 * resource descriptor. For example, Compute Engine VM instances use the 2612 /// labels "project_id", "instance_id", and "zone".
2264 * labels "project_id", "instance_id", and "zone".
2265 */
2266 core.Map<core.String, core.String> labels; 2613 core.Map<core.String, core.String> labels;
2267 /** 2614
2268 * Required. The monitored resource type. This field must match the type field 2615 /// Required. The monitored resource type. This field must match the type
2269 * of a MonitoredResourceDescriptor object. For example, the type of a Compute 2616 /// field of a MonitoredResourceDescriptor object. For example, the type of a
2270 * Engine VM instance is gce_instance. 2617 /// Compute Engine VM instance is gce_instance.
2271 */
2272 core.String type; 2618 core.String type;
2273 2619
2274 MonitoredResource(); 2620 MonitoredResource();
2275 2621
2276 MonitoredResource.fromJson(core.Map _json) { 2622 MonitoredResource.fromJson(core.Map _json) {
2277 if (_json.containsKey("labels")) { 2623 if (_json.containsKey("labels")) {
2278 labels = _json["labels"]; 2624 labels = _json["labels"];
2279 } 2625 }
2280 if (_json.containsKey("type")) { 2626 if (_json.containsKey("type")) {
2281 type = _json["type"]; 2627 type = _json["type"];
2282 } 2628 }
2283 } 2629 }
2284 2630
2285 core.Map<core.String, core.Object> toJson() { 2631 core.Map<core.String, core.Object> toJson() {
2286 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2632 final core.Map<core.String, core.Object> _json =
2633 new core.Map<core.String, core.Object>();
2287 if (labels != null) { 2634 if (labels != null) {
2288 _json["labels"] = labels; 2635 _json["labels"] = labels;
2289 } 2636 }
2290 if (type != null) { 2637 if (type != null) {
2291 _json["type"] = type; 2638 _json["type"] = type;
2292 } 2639 }
2293 return _json; 2640 return _json;
2294 } 2641 }
2295 } 2642 }
2296 2643
2297 /** 2644 /// An object that describes the schema of a MonitoredResource object using a
2298 * An object that describes the schema of a MonitoredResource object using a 2645 /// type name and a set of labels. For example, the monitored resource
2299 * type name and a set of labels. For example, the monitored resource descriptor 2646 /// descriptor for Google Compute Engine VM instances has a type of
2300 * for Google Compute Engine VM instances has a type of "gce_instance" and 2647 /// "gce_instance" and specifies the use of the labels "instance_id" and "zone"
2301 * specifies the use of the labels "instance_id" and "zone" to identify 2648 /// to identify particular VM instances.Different APIs can support different
2302 * particular VM instances.Different APIs can support different monitored 2649 /// monitored resource types. APIs generally provide a list method that returns
2303 * resource types. APIs generally provide a list method that returns the 2650 /// the monitored resource descriptors used by the API.
2304 * monitored resource descriptors used by the API.
2305 */
2306 class MonitoredResourceDescriptor { 2651 class MonitoredResourceDescriptor {
2307 /** 2652 /// Optional. A detailed description of the monitored resource type that
2308 * Optional. A detailed description of the monitored resource type that might 2653 /// might be used in documentation.
2309 * be used in documentation.
2310 */
2311 core.String description; 2654 core.String description;
2312 /** 2655
2313 * Optional. A concise name for the monitored resource type that might be 2656 /// Optional. A concise name for the monitored resource type that might be
2314 * displayed in user interfaces. It should be a Title Cased Noun Phrase, 2657 /// displayed in user interfaces. It should be a Title Cased Noun Phrase,
2315 * without any article or other determiners. For example, "Google Cloud SQL 2658 /// without any article or other determiners. For example, "Google Cloud SQL
2316 * Database". 2659 /// Database".
2317 */
2318 core.String displayName; 2660 core.String displayName;
2319 /** 2661
2320 * Required. A set of labels used to describe instances of this monitored 2662 /// Required. A set of labels used to describe instances of this monitored
2321 * resource type. For example, an individual Google Cloud SQL database is 2663 /// resource type. For example, an individual Google Cloud SQL database is
2322 * identified by values for the labels "database_id" and "zone". 2664 /// identified by values for the labels "database_id" and "zone".
2323 */
2324 core.List<LabelDescriptor> labels; 2665 core.List<LabelDescriptor> labels;
2325 /** 2666
2326 * Optional. The resource name of the monitored resource descriptor: 2667 /// Optional. The resource name of the monitored resource descriptor:
2327 * "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is 2668 /// "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type}
2328 * the value of the type field in this object and {project_id} is a project ID 2669 /// is the value of the type field in this object and {project_id} is a
2329 * that provides API-specific context for accessing the type. APIs that do not 2670 /// project ID that provides API-specific context for accessing the type.
2330 * use project information can use the resource name format 2671 /// APIs that do not use project information can use the resource name format
2331 * "monitoredResourceDescriptors/{type}". 2672 /// "monitoredResourceDescriptors/{type}".
2332 */
2333 core.String name; 2673 core.String name;
2334 /** 2674
2335 * Required. The monitored resource type. For example, the type 2675 /// Required. The monitored resource type. For example, the type
2336 * "cloudsql_database" represents databases in Google Cloud SQL. The maximum 2676 /// "cloudsql_database" represents databases in Google Cloud SQL. The maximum
2337 * length of this value is 256 characters. 2677 /// length of this value is 256 characters.
2338 */
2339 core.String type; 2678 core.String type;
2340 2679
2341 MonitoredResourceDescriptor(); 2680 MonitoredResourceDescriptor();
2342 2681
2343 MonitoredResourceDescriptor.fromJson(core.Map _json) { 2682 MonitoredResourceDescriptor.fromJson(core.Map _json) {
2344 if (_json.containsKey("description")) { 2683 if (_json.containsKey("description")) {
2345 description = _json["description"]; 2684 description = _json["description"];
2346 } 2685 }
2347 if (_json.containsKey("displayName")) { 2686 if (_json.containsKey("displayName")) {
2348 displayName = _json["displayName"]; 2687 displayName = _json["displayName"];
2349 } 2688 }
2350 if (_json.containsKey("labels")) { 2689 if (_json.containsKey("labels")) {
2351 labels = _json["labels"].map((value) => new LabelDescriptor.fromJson(value )).toList(); 2690 labels = _json["labels"]
2691 .map((value) => new LabelDescriptor.fromJson(value))
2692 .toList();
2352 } 2693 }
2353 if (_json.containsKey("name")) { 2694 if (_json.containsKey("name")) {
2354 name = _json["name"]; 2695 name = _json["name"];
2355 } 2696 }
2356 if (_json.containsKey("type")) { 2697 if (_json.containsKey("type")) {
2357 type = _json["type"]; 2698 type = _json["type"];
2358 } 2699 }
2359 } 2700 }
2360 2701
2361 core.Map<core.String, core.Object> toJson() { 2702 core.Map<core.String, core.Object> toJson() {
2362 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2703 final core.Map<core.String, core.Object> _json =
2704 new core.Map<core.String, core.Object>();
2363 if (description != null) { 2705 if (description != null) {
2364 _json["description"] = description; 2706 _json["description"] = description;
2365 } 2707 }
2366 if (displayName != null) { 2708 if (displayName != null) {
2367 _json["displayName"] = displayName; 2709 _json["displayName"] = displayName;
2368 } 2710 }
2369 if (labels != null) { 2711 if (labels != null) {
2370 _json["labels"] = labels.map((value) => (value).toJson()).toList(); 2712 _json["labels"] = labels.map((value) => (value).toJson()).toList();
2371 } 2713 }
2372 if (name != null) { 2714 if (name != null) {
2373 _json["name"] = name; 2715 _json["name"] = name;
2374 } 2716 }
2375 if (type != null) { 2717 if (type != null) {
2376 _json["type"] = type; 2718 _json["type"] = type;
2377 } 2719 }
2378 return _json; 2720 return _json;
2379 } 2721 }
2380 } 2722 }
2381 2723
2382 /** 2724 /// Complete log information about a single HTTP request to an App Engine
2383 * Complete log information about a single HTTP request to an App Engine 2725 /// application.
2384 * application.
2385 */
2386 class RequestLog { 2726 class RequestLog {
2387 /** App Engine release version. */ 2727 /// App Engine release version.
2388 core.String appEngineRelease; 2728 core.String appEngineRelease;
2389 /** Application that handled this request. */ 2729
2730 /// Application that handled this request.
2390 core.String appId; 2731 core.String appId;
2391 /** An indication of the relative cost of serving this request. */ 2732
2733 /// An indication of the relative cost of serving this request.
2392 core.double cost; 2734 core.double cost;
2393 /** Time when the request finished. */ 2735
2736 /// Time when the request finished.
2394 core.String endTime; 2737 core.String endTime;
2395 /** Whether this request is finished or active. */ 2738
2739 /// Whether this request is finished or active.
2396 core.bool finished; 2740 core.bool finished;
2397 /** 2741
2398 * Whether this is the first RequestLog entry for this request. If an active 2742 /// Whether this is the first RequestLog entry for this request. If an active
2399 * request has several RequestLog entries written to Stackdriver Logging, then 2743 /// request has several RequestLog entries written to Stackdriver Logging,
2400 * this field will be set for one of them. 2744 /// then this field will be set for one of them.
2401 */
2402 core.bool first; 2745 core.bool first;
2403 /** Internet host and port number of the resource being requested. */ 2746
2747 /// Internet host and port number of the resource being requested.
2404 core.String host; 2748 core.String host;
2405 /** HTTP version of request. Example: "HTTP/1.1". */ 2749
2750 /// HTTP version of request. Example: "HTTP/1.1".
2406 core.String httpVersion; 2751 core.String httpVersion;
2407 /** An identifier for the instance that handled the request. */ 2752
2753 /// An identifier for the instance that handled the request.
2408 core.String instanceId; 2754 core.String instanceId;
2409 /** 2755
2410 * If the instance processing this request belongs to a manually scaled 2756 /// If the instance processing this request belongs to a manually scaled
2411 * module, then this is the 0-based index of the instance. Otherwise, this 2757 /// module, then this is the 0-based index of the instance. Otherwise, this
2412 * value is -1. 2758 /// value is -1.
2413 */
2414 core.int instanceIndex; 2759 core.int instanceIndex;
2415 /** Origin IP address. */ 2760
2761 /// Origin IP address.
2416 core.String ip; 2762 core.String ip;
2417 /** Latency of the request. */ 2763
2764 /// Latency of the request.
2418 core.String latency; 2765 core.String latency;
2419 /** 2766
2420 * A list of log lines emitted by the application while serving this request. 2767 /// A list of log lines emitted by the application while serving this
2421 */ 2768 /// request.
2422 core.List<LogLine> line; 2769 core.List<LogLine> line;
2423 /** Number of CPU megacycles used to process request. */ 2770
2771 /// Number of CPU megacycles used to process request.
2424 core.String megaCycles; 2772 core.String megaCycles;
2425 /** Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". */ 2773
2774 /// Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE".
2426 core.String method; 2775 core.String method;
2427 /** Module of the application that handled this request. */ 2776
2777 /// Module of the application that handled this request.
2428 core.String moduleId; 2778 core.String moduleId;
2429 /** 2779
2430 * The logged-in user who made the request.Most likely, this is the part of 2780 /// The logged-in user who made the request.Most likely, this is the part of
2431 * the user's email before the @ sign. The field value is the same for 2781 /// the user's email before the @ sign. The field value is the same for
2432 * different requests from the same user, but different users can have similar 2782 /// different requests from the same user, but different users can have
2433 * names. This information is also available to the application via the App 2783 /// similar names. This information is also available to the application via
2434 * Engine Users API.This field will be populated starting with App Engine 2784 /// the App Engine Users API.This field will be populated starting with App
2435 * 1.9.21. 2785 /// Engine 1.9.21.
2436 */
2437 core.String nickname; 2786 core.String nickname;
2438 /** Time this request spent in the pending request queue. */ 2787
2788 /// Time this request spent in the pending request queue.
2439 core.String pendingTime; 2789 core.String pendingTime;
2440 /** Referrer URL of request. */ 2790
2791 /// Referrer URL of request.
2441 core.String referrer; 2792 core.String referrer;
2442 /** 2793
2443 * Globally unique identifier for a request, which is based on the request 2794 /// Globally unique identifier for a request, which is based on the request
2444 * start time. Request IDs for requests which started later will compare 2795 /// start time. Request IDs for requests which started later will compare
2445 * greater as strings than those for requests which started earlier. 2796 /// greater as strings than those for requests which started earlier.
2446 */
2447 core.String requestId; 2797 core.String requestId;
2448 /** 2798
2449 * Contains the path and query portion of the URL that was requested. For 2799 /// Contains the path and query portion of the URL that was requested. For
2450 * example, if the URL was "http://example.com/app?name=val", the resource 2800 /// example, if the URL was "http://example.com/app?name=val", the resource
2451 * would be "/app?name=val". The fragment identifier, which is identified by 2801 /// would be "/app?name=val". The fragment identifier, which is identified by
2452 * the # character, is not included. 2802 /// the # character, is not included.
2453 */
2454 core.String resource; 2803 core.String resource;
2455 /** Size in bytes sent back to client by request. */ 2804
2805 /// Size in bytes sent back to client by request.
2456 core.String responseSize; 2806 core.String responseSize;
2457 /** 2807
2458 * Source code for the application that handled this request. There can be 2808 /// Source code for the application that handled this request. There can be
2459 * more than one source reference per deployed application if source code is 2809 /// more than one source reference per deployed application if source code is
2460 * distributed among multiple repositories. 2810 /// distributed among multiple repositories.
2461 */
2462 core.List<SourceReference> sourceReference; 2811 core.List<SourceReference> sourceReference;
2463 /** Time when the request started. */ 2812
2813 /// Time when the request started.
2464 core.String startTime; 2814 core.String startTime;
2465 /** HTTP response status code. Example: 200, 404. */ 2815
2816 /// HTTP response status code. Example: 200, 404.
2466 core.int status; 2817 core.int status;
2467 /** Task name of the request, in the case of an offline request. */ 2818
2819 /// Task name of the request, in the case of an offline request.
2468 core.String taskName; 2820 core.String taskName;
2469 /** Queue name of the request, in the case of an offline request. */ 2821
2822 /// Queue name of the request, in the case of an offline request.
2470 core.String taskQueueName; 2823 core.String taskQueueName;
2471 /** Stackdriver Trace identifier for this request. */ 2824
2825 /// Stackdriver Trace identifier for this request.
2472 core.String traceId; 2826 core.String traceId;
2473 /** File or class that handled the request. */ 2827
2828 /// File or class that handled the request.
2474 core.String urlMapEntry; 2829 core.String urlMapEntry;
2475 /** User agent that made the request. */ 2830
2831 /// User agent that made the request.
2476 core.String userAgent; 2832 core.String userAgent;
2477 /** Version of the application that handled this request. */ 2833
2834 /// Version of the application that handled this request.
2478 core.String versionId; 2835 core.String versionId;
2479 /** Whether this was a loading request for the instance. */ 2836
2837 /// Whether this was a loading request for the instance.
2480 core.bool wasLoadingRequest; 2838 core.bool wasLoadingRequest;
2481 2839
2482 RequestLog(); 2840 RequestLog();
2483 2841
2484 RequestLog.fromJson(core.Map _json) { 2842 RequestLog.fromJson(core.Map _json) {
2485 if (_json.containsKey("appEngineRelease")) { 2843 if (_json.containsKey("appEngineRelease")) {
2486 appEngineRelease = _json["appEngineRelease"]; 2844 appEngineRelease = _json["appEngineRelease"];
2487 } 2845 }
2488 if (_json.containsKey("appId")) { 2846 if (_json.containsKey("appId")) {
2489 appId = _json["appId"]; 2847 appId = _json["appId"];
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2542 if (_json.containsKey("requestId")) { 2900 if (_json.containsKey("requestId")) {
2543 requestId = _json["requestId"]; 2901 requestId = _json["requestId"];
2544 } 2902 }
2545 if (_json.containsKey("resource")) { 2903 if (_json.containsKey("resource")) {
2546 resource = _json["resource"]; 2904 resource = _json["resource"];
2547 } 2905 }
2548 if (_json.containsKey("responseSize")) { 2906 if (_json.containsKey("responseSize")) {
2549 responseSize = _json["responseSize"]; 2907 responseSize = _json["responseSize"];
2550 } 2908 }
2551 if (_json.containsKey("sourceReference")) { 2909 if (_json.containsKey("sourceReference")) {
2552 sourceReference = _json["sourceReference"].map((value) => new SourceRefere nce.fromJson(value)).toList(); 2910 sourceReference = _json["sourceReference"]
2911 .map((value) => new SourceReference.fromJson(value))
2912 .toList();
2553 } 2913 }
2554 if (_json.containsKey("startTime")) { 2914 if (_json.containsKey("startTime")) {
2555 startTime = _json["startTime"]; 2915 startTime = _json["startTime"];
2556 } 2916 }
2557 if (_json.containsKey("status")) { 2917 if (_json.containsKey("status")) {
2558 status = _json["status"]; 2918 status = _json["status"];
2559 } 2919 }
2560 if (_json.containsKey("taskName")) { 2920 if (_json.containsKey("taskName")) {
2561 taskName = _json["taskName"]; 2921 taskName = _json["taskName"];
2562 } 2922 }
(...skipping 11 matching lines...) Expand all
2574 } 2934 }
2575 if (_json.containsKey("versionId")) { 2935 if (_json.containsKey("versionId")) {
2576 versionId = _json["versionId"]; 2936 versionId = _json["versionId"];
2577 } 2937 }
2578 if (_json.containsKey("wasLoadingRequest")) { 2938 if (_json.containsKey("wasLoadingRequest")) {
2579 wasLoadingRequest = _json["wasLoadingRequest"]; 2939 wasLoadingRequest = _json["wasLoadingRequest"];
2580 } 2940 }
2581 } 2941 }
2582 2942
2583 core.Map<core.String, core.Object> toJson() { 2943 core.Map<core.String, core.Object> toJson() {
2584 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2944 final core.Map<core.String, core.Object> _json =
2945 new core.Map<core.String, core.Object>();
2585 if (appEngineRelease != null) { 2946 if (appEngineRelease != null) {
2586 _json["appEngineRelease"] = appEngineRelease; 2947 _json["appEngineRelease"] = appEngineRelease;
2587 } 2948 }
2588 if (appId != null) { 2949 if (appId != null) {
2589 _json["appId"] = appId; 2950 _json["appId"] = appId;
2590 } 2951 }
2591 if (cost != null) { 2952 if (cost != null) {
2592 _json["cost"] = cost; 2953 _json["cost"] = cost;
2593 } 2954 }
2594 if (endTime != null) { 2955 if (endTime != null) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 if (requestId != null) { 3003 if (requestId != null) {
2643 _json["requestId"] = requestId; 3004 _json["requestId"] = requestId;
2644 } 3005 }
2645 if (resource != null) { 3006 if (resource != null) {
2646 _json["resource"] = resource; 3007 _json["resource"] = resource;
2647 } 3008 }
2648 if (responseSize != null) { 3009 if (responseSize != null) {
2649 _json["responseSize"] = responseSize; 3010 _json["responseSize"] = responseSize;
2650 } 3011 }
2651 if (sourceReference != null) { 3012 if (sourceReference != null) {
2652 _json["sourceReference"] = sourceReference.map((value) => (value).toJson() ).toList(); 3013 _json["sourceReference"] =
3014 sourceReference.map((value) => (value).toJson()).toList();
2653 } 3015 }
2654 if (startTime != null) { 3016 if (startTime != null) {
2655 _json["startTime"] = startTime; 3017 _json["startTime"] = startTime;
2656 } 3018 }
2657 if (status != null) { 3019 if (status != null) {
2658 _json["status"] = status; 3020 _json["status"] = status;
2659 } 3021 }
2660 if (taskName != null) { 3022 if (taskName != null) {
2661 _json["taskName"] = taskName; 3023 _json["taskName"] = taskName;
2662 } 3024 }
(...skipping 12 matching lines...) Expand all
2675 if (versionId != null) { 3037 if (versionId != null) {
2676 _json["versionId"] = versionId; 3038 _json["versionId"] = versionId;
2677 } 3039 }
2678 if (wasLoadingRequest != null) { 3040 if (wasLoadingRequest != null) {
2679 _json["wasLoadingRequest"] = wasLoadingRequest; 3041 _json["wasLoadingRequest"] = wasLoadingRequest;
2680 } 3042 }
2681 return _json; 3043 return _json;
2682 } 3044 }
2683 } 3045 }
2684 3046
2685 /** Specifies a location in a source code file. */ 3047 /// Specifies a location in a source code file.
2686 class SourceLocation { 3048 class SourceLocation {
2687 /** 3049 /// Source file name. Depending on the runtime environment, this might be a
2688 * Source file name. Depending on the runtime environment, this might be a 3050 /// simple name or a fully-qualified name.
2689 * simple name or a fully-qualified name.
2690 */
2691 core.String file; 3051 core.String file;
2692 /** 3052
2693 * Human-readable name of the function or method being invoked, with optional 3053 /// Human-readable name of the function or method being invoked, with
2694 * context such as the class or package name. This information is used in 3054 /// optional context such as the class or package name. This information is
2695 * contexts such as the logs viewer, where a file and line number are less 3055 /// used in contexts such as the logs viewer, where a file and line number
2696 * meaningful. The format can vary by language. For example: 3056 /// are less meaningful. The format can vary by language. For example:
2697 * qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python). 3057 /// qual.if.ied.Class.method (Java), dir/package.func (Go), function
2698 */ 3058 /// (Python).
2699 core.String functionName; 3059 core.String functionName;
2700 /** Line within the source file. */ 3060
3061 /// Line within the source file.
2701 core.String line; 3062 core.String line;
2702 3063
2703 SourceLocation(); 3064 SourceLocation();
2704 3065
2705 SourceLocation.fromJson(core.Map _json) { 3066 SourceLocation.fromJson(core.Map _json) {
2706 if (_json.containsKey("file")) { 3067 if (_json.containsKey("file")) {
2707 file = _json["file"]; 3068 file = _json["file"];
2708 } 3069 }
2709 if (_json.containsKey("functionName")) { 3070 if (_json.containsKey("functionName")) {
2710 functionName = _json["functionName"]; 3071 functionName = _json["functionName"];
2711 } 3072 }
2712 if (_json.containsKey("line")) { 3073 if (_json.containsKey("line")) {
2713 line = _json["line"]; 3074 line = _json["line"];
2714 } 3075 }
2715 } 3076 }
2716 3077
2717 core.Map<core.String, core.Object> toJson() { 3078 core.Map<core.String, core.Object> toJson() {
2718 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3079 final core.Map<core.String, core.Object> _json =
3080 new core.Map<core.String, core.Object>();
2719 if (file != null) { 3081 if (file != null) {
2720 _json["file"] = file; 3082 _json["file"] = file;
2721 } 3083 }
2722 if (functionName != null) { 3084 if (functionName != null) {
2723 _json["functionName"] = functionName; 3085 _json["functionName"] = functionName;
2724 } 3086 }
2725 if (line != null) { 3087 if (line != null) {
2726 _json["line"] = line; 3088 _json["line"] = line;
2727 } 3089 }
2728 return _json; 3090 return _json;
2729 } 3091 }
2730 } 3092 }
2731 3093
2732 /** 3094 /// A reference to a particular snapshot of the source tree used to build and
2733 * A reference to a particular snapshot of the source tree used to build and 3095 /// deploy an application.
2734 * deploy an application.
2735 */
2736 class SourceReference { 3096 class SourceReference {
2737 /** 3097 /// Optional. A URI string identifying the repository. Example:
2738 * Optional. A URI string identifying the repository. Example: 3098 /// "https://github.com/GoogleCloudPlatform/kubernetes.git"
2739 * "https://github.com/GoogleCloudPlatform/kubernetes.git"
2740 */
2741 core.String repository; 3099 core.String repository;
2742 /** 3100
2743 * The canonical and persistent identifier of the deployed revision. Example 3101 /// The canonical and persistent identifier of the deployed revision. Example
2744 * (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" 3102 /// (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b"
2745 */
2746 core.String revisionId; 3103 core.String revisionId;
2747 3104
2748 SourceReference(); 3105 SourceReference();
2749 3106
2750 SourceReference.fromJson(core.Map _json) { 3107 SourceReference.fromJson(core.Map _json) {
2751 if (_json.containsKey("repository")) { 3108 if (_json.containsKey("repository")) {
2752 repository = _json["repository"]; 3109 repository = _json["repository"];
2753 } 3110 }
2754 if (_json.containsKey("revisionId")) { 3111 if (_json.containsKey("revisionId")) {
2755 revisionId = _json["revisionId"]; 3112 revisionId = _json["revisionId"];
2756 } 3113 }
2757 } 3114 }
2758 3115
2759 core.Map<core.String, core.Object> toJson() { 3116 core.Map<core.String, core.Object> toJson() {
2760 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3117 final core.Map<core.String, core.Object> _json =
3118 new core.Map<core.String, core.Object>();
2761 if (repository != null) { 3119 if (repository != null) {
2762 _json["repository"] = repository; 3120 _json["repository"] = repository;
2763 } 3121 }
2764 if (revisionId != null) { 3122 if (revisionId != null) {
2765 _json["revisionId"] = revisionId; 3123 _json["revisionId"] = revisionId;
2766 } 3124 }
2767 return _json; 3125 return _json;
2768 } 3126 }
2769 } 3127 }
2770 3128
2771 /** The parameters to WriteLogEntries. */ 3129 /// The parameters to WriteLogEntries.
2772 class WriteLogEntriesRequest { 3130 class WriteLogEntriesRequest {
2773 /** 3131 /// Required. The log entries to send to Stackdriver Logging. The order of
2774 * Required. The log entries to write. Values supplied for the fields 3132 /// log entries in this list does not matter. Values supplied in this
2775 * log_name, resource, and labels in this entries.write request are inserted 3133 /// method's log_name, resource, and labels fields are copied into those log
2776 * into those log entries in this list that do not provide their own 3134 /// entries in this list that do not include values for their corresponding
2777 * values.Stackdriver Logging also creates and inserts values for timestamp 3135 /// fields. For more information, see the LogEntry type.If the timestamp or
2778 * and insert_id if the entries do not provide them. The created insert_id for 3136 /// insert_id fields are missing in log entries, then this method supplies
2779 * the N'th entry in this list will be greater than earlier entries and less 3137 /// the current time or a unique identifier, respectively. The supplied
2780 * than later entries. Otherwise, the order of log entries in this list does 3138 /// values are chosen so that, among the log entries that did not supply
2781 * not matter.To improve throughput and to avoid exceeding the quota limit for 3139 /// their own values, the entries earlier in the list will sort before the
2782 * calls to entries.write, you should write multiple log entries at once 3140 /// entries later in the list. See the entries.list method.Log entries with
2783 * rather than calling this method for each individual log entry. 3141 /// timestamps that are more than the logs retention period in the past or
2784 */ 3142 /// more than 24 hours in the future might be discarded. Discarding does not
3143 /// return an error.To improve throughput and to avoid exceeding the quota
3144 /// limit for calls to entries.write, you should try to include several log
3145 /// entries in this list, rather than calling this method for each individual
3146 /// log entry.
2785 core.List<LogEntry> entries; 3147 core.List<LogEntry> entries;
2786 /** 3148
2787 * Optional. Default labels that are added to the labels field of all log 3149 /// Optional. Default labels that are added to the labels field of all log
2788 * entries in entries. If a log entry already has a label with the same key as 3150 /// entries in entries. If a log entry already has a label with the same key
2789 * a label in this parameter, then the log entry's label is not changed. See 3151 /// as a label in this parameter, then the log entry's label is not changed.
2790 * LogEntry. 3152 /// See LogEntry.
2791 */
2792 core.Map<core.String, core.String> labels; 3153 core.Map<core.String, core.String> labels;
2793 /** 3154
2794 * Optional. A default log resource name that is assigned to all log entries 3155 /// Optional. A default log resource name that is assigned to all log entries
2795 * in entries that do not specify a value for log_name: 3156 /// in entries that do not specify a value for log_name:
2796 * "projects/[PROJECT_ID]/logs/[LOG_ID]" 3157 /// "projects/[PROJECT_ID]/logs/[LOG_ID]"
2797 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" 3158 /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
2798 * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" 3159 /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
2799 * "folders/[FOLDER_ID]/logs/[LOG_ID]" 3160 /// "folders/[FOLDER_ID]/logs/[LOG_ID]"
2800 * [LOG_ID] must be URL-encoded. For example, 3161 /// [LOG_ID] must be URL-encoded. For example,
2801 * "projects/my-project-id/logs/syslog" or 3162 /// "projects/my-project-id/logs/syslog" or
2802 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty". 3163 /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factiv ity".
2803 * For more information about log names, see LogEntry. 3164 /// For more information about log names, see LogEntry.
2804 */
2805 core.String logName; 3165 core.String logName;
2806 /** 3166
2807 * Optional. Whether valid entries should be written even if some other 3167 /// Optional. Whether valid entries should be written even if some other
2808 * entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any 3168 /// entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
2809 * entry is not written, then the response status is the error associated with 3169 /// entry is not written, then the response status is the error associated
2810 * one of the failed entries and the response includes error details keyed by 3170 /// with one of the failed entries and the response includes error details
2811 * the entries' zero-based index in the entries.write method. 3171 /// keyed by the entries' zero-based index in the entries.write method.
2812 */
2813 core.bool partialSuccess; 3172 core.bool partialSuccess;
2814 /** 3173
2815 * Optional. A default monitored resource object that is assigned to all log 3174 /// Optional. A default monitored resource object that is assigned to all log
2816 * entries in entries that do not specify a value for resource. Example: 3175 /// entries in entries that do not specify a value for resource. Example:
2817 * { "type": "gce_instance", 3176 /// { "type": "gce_instance",
2818 * "labels": { 3177 /// "labels": {
2819 * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} 3178 /// "zone": "us-central1-a", "instance_id": "00000000000000000000" }}
2820 * See LogEntry. 3179 /// See LogEntry.
2821 */
2822 MonitoredResource resource; 3180 MonitoredResource resource;
2823 3181
2824 WriteLogEntriesRequest(); 3182 WriteLogEntriesRequest();
2825 3183
2826 WriteLogEntriesRequest.fromJson(core.Map _json) { 3184 WriteLogEntriesRequest.fromJson(core.Map _json) {
2827 if (_json.containsKey("entries")) { 3185 if (_json.containsKey("entries")) {
2828 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to List(); 3186 entries = _json["entries"]
3187 .map((value) => new LogEntry.fromJson(value))
3188 .toList();
2829 } 3189 }
2830 if (_json.containsKey("labels")) { 3190 if (_json.containsKey("labels")) {
2831 labels = _json["labels"]; 3191 labels = _json["labels"];
2832 } 3192 }
2833 if (_json.containsKey("logName")) { 3193 if (_json.containsKey("logName")) {
2834 logName = _json["logName"]; 3194 logName = _json["logName"];
2835 } 3195 }
2836 if (_json.containsKey("partialSuccess")) { 3196 if (_json.containsKey("partialSuccess")) {
2837 partialSuccess = _json["partialSuccess"]; 3197 partialSuccess = _json["partialSuccess"];
2838 } 3198 }
2839 if (_json.containsKey("resource")) { 3199 if (_json.containsKey("resource")) {
2840 resource = new MonitoredResource.fromJson(_json["resource"]); 3200 resource = new MonitoredResource.fromJson(_json["resource"]);
2841 } 3201 }
2842 } 3202 }
2843 3203
2844 core.Map<core.String, core.Object> toJson() { 3204 core.Map<core.String, core.Object> toJson() {
2845 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3205 final core.Map<core.String, core.Object> _json =
3206 new core.Map<core.String, core.Object>();
2846 if (entries != null) { 3207 if (entries != null) {
2847 _json["entries"] = entries.map((value) => (value).toJson()).toList(); 3208 _json["entries"] = entries.map((value) => (value).toJson()).toList();
2848 } 3209 }
2849 if (labels != null) { 3210 if (labels != null) {
2850 _json["labels"] = labels; 3211 _json["labels"] = labels;
2851 } 3212 }
2852 if (logName != null) { 3213 if (logName != null) {
2853 _json["logName"] = logName; 3214 _json["logName"] = logName;
2854 } 3215 }
2855 if (partialSuccess != null) { 3216 if (partialSuccess != null) {
2856 _json["partialSuccess"] = partialSuccess; 3217 _json["partialSuccess"] = partialSuccess;
2857 } 3218 }
2858 if (resource != null) { 3219 if (resource != null) {
2859 _json["resource"] = (resource).toJson(); 3220 _json["resource"] = (resource).toJson();
2860 } 3221 }
2861 return _json; 3222 return _json;
2862 } 3223 }
2863 } 3224 }
2864 3225
2865 /** Result returned from WriteLogEntries. empty */ 3226 /// Result returned from WriteLogEntries. empty
2866 class WriteLogEntriesResponse { 3227 class WriteLogEntriesResponse {
2867
2868 WriteLogEntriesResponse(); 3228 WriteLogEntriesResponse();
2869 3229
2870 WriteLogEntriesResponse.fromJson(core.Map _json) { 3230 WriteLogEntriesResponse.fromJson(core.Map _json) {}
2871 }
2872 3231
2873 core.Map<core.String, core.Object> toJson() { 3232 core.Map<core.String, core.Object> toJson() {
2874 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3233 final core.Map<core.String, core.Object> _json =
3234 new core.Map<core.String, core.Object>();
2875 return _json; 3235 return _json;
2876 } 3236 }
2877 } 3237 }
OLDNEW
« no previous file with comments | « generated/googleapis_beta/lib/language/v1beta2.dart ('k') | generated/googleapis_beta/lib/oslogin/v1alpha.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698