OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.logging.v2; | 3 library googleapis.logging.v2; |
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/v2'; | 15 const core.String USER_AGENT = 'dart-api-client logging/v2'; |
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 | 21 "https://www.googleapis.com/auth/cloud-platform"; |
22 /** View your data across Google Cloud Platform services */ | 22 |
23 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo
ud-platform.read-only"; | 23 /// View your data across Google Cloud Platform services |
24 | 24 static const CloudPlatformReadOnlyScope = |
25 /** Administrate log data for your projects */ | 25 "https://www.googleapis.com/auth/cloud-platform.read-only"; |
26 static const LoggingAdminScope = "https://www.googleapis.com/auth/logging.admi
n"; | 26 |
27 | 27 /// Administrate log data for your projects |
28 /** View log data for your projects */ | 28 static const LoggingAdminScope = |
29 static const LoggingReadScope = "https://www.googleapis.com/auth/logging.read"
; | 29 "https://www.googleapis.com/auth/logging.admin"; |
30 | 30 |
31 /** Submit log data for your projects */ | 31 /// View log data for your projects |
32 static const LoggingWriteScope = "https://www.googleapis.com/auth/logging.writ
e"; | 32 static const LoggingReadScope = |
33 | 33 "https://www.googleapis.com/auth/logging.read"; |
| 34 |
| 35 /// Submit log data for your projects |
| 36 static const LoggingWriteScope = |
| 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 FoldersResourceApi get folders => new FoldersResourceApi(_requester); | 44 FoldersResourceApi get folders => new FoldersResourceApi(_requester); |
40 MonitoredResourceDescriptorsResourceApi get monitoredResourceDescriptors => ne
w MonitoredResourceDescriptorsResourceApi(_requester); | 45 MonitoredResourceDescriptorsResourceApi get monitoredResourceDescriptors => |
41 OrganizationsResourceApi get organizations => new OrganizationsResourceApi(_re
quester); | 46 new MonitoredResourceDescriptorsResourceApi(_requester); |
| 47 OrganizationsResourceApi get organizations => |
| 48 new OrganizationsResourceApi(_requester); |
42 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 49 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
43 | 50 |
44 LoggingApi(http.Client client, {core.String rootUrl: "https://logging.googleap
is.com/", core.String servicePath: ""}) : | 51 LoggingApi(http.Client client, |
45 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 52 {core.String rootUrl: "https://logging.googleapis.com/", |
| 53 core.String servicePath: ""}) |
| 54 : _requester = |
| 55 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
46 } | 56 } |
47 | 57 |
48 | |
49 class BillingAccountsResourceApi { | 58 class BillingAccountsResourceApi { |
50 final commons.ApiRequester _requester; | 59 final commons.ApiRequester _requester; |
51 | 60 |
52 BillingAccountsLogsResourceApi get logs => new BillingAccountsLogsResourceApi(
_requester); | 61 BillingAccountsExclusionsResourceApi get exclusions => |
53 BillingAccountsSinksResourceApi get sinks => new BillingAccountsSinksResourceA
pi(_requester); | 62 new BillingAccountsExclusionsResourceApi(_requester); |
54 | 63 BillingAccountsLogsResourceApi get logs => |
55 BillingAccountsResourceApi(commons.ApiRequester client) : | 64 new BillingAccountsLogsResourceApi(_requester); |
56 _requester = client; | 65 BillingAccountsSinksResourceApi get sinks => |
| 66 new BillingAccountsSinksResourceApi(_requester); |
| 67 |
| 68 BillingAccountsResourceApi(commons.ApiRequester client) : _requester = client; |
57 } | 69 } |
58 | 70 |
| 71 class BillingAccountsExclusionsResourceApi { |
| 72 final commons.ApiRequester _requester; |
| 73 |
| 74 BillingAccountsExclusionsResourceApi(commons.ApiRequester client) |
| 75 : _requester = client; |
| 76 |
| 77 /// Creates a new exclusion in a specified parent resource. Only log entries |
| 78 /// belonging to that resource can be excluded. You can have up to 10 |
| 79 /// exclusions in a resource. |
| 80 /// |
| 81 /// [request] - The metadata request object. |
| 82 /// |
| 83 /// Request parameters: |
| 84 /// |
| 85 /// [parent] - Required. The parent resource in which to create the |
| 86 /// exclusion: |
| 87 /// "projects/[PROJECT_ID]" |
| 88 /// "organizations/[ORGANIZATION_ID]" |
| 89 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
| 90 /// "folders/[FOLDER_ID]" |
| 91 /// Examples: "projects/my-logging-project", "organizations/123456789". |
| 92 /// Value must have pattern "^billingAccounts/[^/]+$". |
| 93 /// |
| 94 /// Completes with a [LogExclusion]. |
| 95 /// |
| 96 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 97 /// an error. |
| 98 /// |
| 99 /// If the used [http.Client] completes with an error when making a REST |
| 100 /// call, this method will complete with the same error. |
| 101 async.Future<LogExclusion> create(LogExclusion request, core.String parent) { |
| 102 var _url = null; |
| 103 var _queryParams = new core.Map(); |
| 104 var _uploadMedia = null; |
| 105 var _uploadOptions = null; |
| 106 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 107 var _body = null; |
| 108 |
| 109 if (request != null) { |
| 110 _body = convert.JSON.encode((request).toJson()); |
| 111 } |
| 112 if (parent == null) { |
| 113 throw new core.ArgumentError("Parameter parent is required."); |
| 114 } |
| 115 |
| 116 _url = 'v2/' + |
| 117 commons.Escaper.ecapeVariableReserved('$parent') + |
| 118 '/exclusions'; |
| 119 |
| 120 var _response = _requester.request(_url, "POST", |
| 121 body: _body, |
| 122 queryParams: _queryParams, |
| 123 uploadOptions: _uploadOptions, |
| 124 uploadMedia: _uploadMedia, |
| 125 downloadOptions: _downloadOptions); |
| 126 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 127 } |
| 128 |
| 129 /// Deletes an exclusion. |
| 130 /// |
| 131 /// Request parameters: |
| 132 /// |
| 133 /// [name] - Required. The resource name of an existing exclusion to delete: |
| 134 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 135 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 136 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 137 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 138 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 139 /// Value must have pattern "^billingAccounts/[^/]+/exclusions/[^/]+$". |
| 140 /// |
| 141 /// Completes with a [Empty]. |
| 142 /// |
| 143 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 144 /// an error. |
| 145 /// |
| 146 /// If the used [http.Client] completes with an error when making a REST |
| 147 /// call, this method will complete with the same error. |
| 148 async.Future<Empty> delete(core.String name) { |
| 149 var _url = null; |
| 150 var _queryParams = new core.Map(); |
| 151 var _uploadMedia = null; |
| 152 var _uploadOptions = null; |
| 153 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 154 var _body = null; |
| 155 |
| 156 if (name == null) { |
| 157 throw new core.ArgumentError("Parameter name is required."); |
| 158 } |
| 159 |
| 160 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 161 |
| 162 var _response = _requester.request(_url, "DELETE", |
| 163 body: _body, |
| 164 queryParams: _queryParams, |
| 165 uploadOptions: _uploadOptions, |
| 166 uploadMedia: _uploadMedia, |
| 167 downloadOptions: _downloadOptions); |
| 168 return _response.then((data) => new Empty.fromJson(data)); |
| 169 } |
| 170 |
| 171 /// Gets the description of an exclusion. |
| 172 /// |
| 173 /// Request parameters: |
| 174 /// |
| 175 /// [name] - Required. The resource name of an existing exclusion: |
| 176 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 177 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 178 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 179 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 180 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 181 /// Value must have pattern "^billingAccounts/[^/]+/exclusions/[^/]+$". |
| 182 /// |
| 183 /// Completes with a [LogExclusion]. |
| 184 /// |
| 185 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 186 /// an error. |
| 187 /// |
| 188 /// If the used [http.Client] completes with an error when making a REST |
| 189 /// call, this method will complete with the same error. |
| 190 async.Future<LogExclusion> get(core.String name) { |
| 191 var _url = null; |
| 192 var _queryParams = new core.Map(); |
| 193 var _uploadMedia = null; |
| 194 var _uploadOptions = null; |
| 195 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 196 var _body = null; |
| 197 |
| 198 if (name == null) { |
| 199 throw new core.ArgumentError("Parameter name is required."); |
| 200 } |
| 201 |
| 202 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 203 |
| 204 var _response = _requester.request(_url, "GET", |
| 205 body: _body, |
| 206 queryParams: _queryParams, |
| 207 uploadOptions: _uploadOptions, |
| 208 uploadMedia: _uploadMedia, |
| 209 downloadOptions: _downloadOptions); |
| 210 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 211 } |
| 212 |
| 213 /// Lists all the exclusions in a parent resource. |
| 214 /// |
| 215 /// Request parameters: |
| 216 /// |
| 217 /// [parent] - Required. The parent resource whose exclusions are to be |
| 218 /// listed. |
| 219 /// "projects/[PROJECT_ID]" |
| 220 /// "organizations/[ORGANIZATION_ID]" |
| 221 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
| 222 /// "folders/[FOLDER_ID]" |
| 223 /// |
| 224 /// Value must have pattern "^billingAccounts/[^/]+$". |
| 225 /// |
| 226 /// [pageToken] - Optional. If present, then retrieve the next batch of |
| 227 /// results from the preceding call to this method. pageToken must be the |
| 228 /// value of nextPageToken from the previous response. The values of other |
| 229 /// method parameters should be identical to those in the previous call. |
| 230 /// |
| 231 /// [pageSize] - Optional. The maximum number of results to return from this |
| 232 /// request. Non-positive values are ignored. The presence of nextPageToken |
| 233 /// in the response indicates that more results might be available. |
| 234 /// |
| 235 /// Completes with a [ListExclusionsResponse]. |
| 236 /// |
| 237 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 238 /// an error. |
| 239 /// |
| 240 /// If the used [http.Client] completes with an error when making a REST |
| 241 /// call, this method will complete with the same error. |
| 242 async.Future<ListExclusionsResponse> list(core.String parent, |
| 243 {core.String pageToken, core.int pageSize}) { |
| 244 var _url = null; |
| 245 var _queryParams = new core.Map(); |
| 246 var _uploadMedia = null; |
| 247 var _uploadOptions = null; |
| 248 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 249 var _body = null; |
| 250 |
| 251 if (parent == null) { |
| 252 throw new core.ArgumentError("Parameter parent is required."); |
| 253 } |
| 254 if (pageToken != null) { |
| 255 _queryParams["pageToken"] = [pageToken]; |
| 256 } |
| 257 if (pageSize != null) { |
| 258 _queryParams["pageSize"] = ["${pageSize}"]; |
| 259 } |
| 260 |
| 261 _url = 'v2/' + |
| 262 commons.Escaper.ecapeVariableReserved('$parent') + |
| 263 '/exclusions'; |
| 264 |
| 265 var _response = _requester.request(_url, "GET", |
| 266 body: _body, |
| 267 queryParams: _queryParams, |
| 268 uploadOptions: _uploadOptions, |
| 269 uploadMedia: _uploadMedia, |
| 270 downloadOptions: _downloadOptions); |
| 271 return _response.then((data) => new ListExclusionsResponse.fromJson(data)); |
| 272 } |
| 273 |
| 274 /// Changes one or more properties of an existing exclusion. |
| 275 /// |
| 276 /// [request] - The metadata request object. |
| 277 /// |
| 278 /// Request parameters: |
| 279 /// |
| 280 /// [name] - Required. The resource name of the exclusion to update: |
| 281 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 282 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 283 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 284 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 285 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 286 /// Value must have pattern "^billingAccounts/[^/]+/exclusions/[^/]+$". |
| 287 /// |
| 288 /// [updateMask] - Required. A nonempty list of fields to change in the |
| 289 /// existing exclusion. New values for the fields are taken from the |
| 290 /// corresponding fields in the LogExclusion included in this request. Fields |
| 291 /// not mentioned in update_mask are not changed and are ignored in the |
| 292 /// request.For example, to change the filter and description of an |
| 293 /// exclusion, specify an update_mask of "filter,description". |
| 294 /// |
| 295 /// Completes with a [LogExclusion]. |
| 296 /// |
| 297 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 298 /// an error. |
| 299 /// |
| 300 /// If the used [http.Client] completes with an error when making a REST |
| 301 /// call, this method will complete with the same error. |
| 302 async.Future<LogExclusion> patch(LogExclusion request, core.String name, |
| 303 {core.String updateMask}) { |
| 304 var _url = null; |
| 305 var _queryParams = new core.Map(); |
| 306 var _uploadMedia = null; |
| 307 var _uploadOptions = null; |
| 308 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 309 var _body = null; |
| 310 |
| 311 if (request != null) { |
| 312 _body = convert.JSON.encode((request).toJson()); |
| 313 } |
| 314 if (name == null) { |
| 315 throw new core.ArgumentError("Parameter name is required."); |
| 316 } |
| 317 if (updateMask != null) { |
| 318 _queryParams["updateMask"] = [updateMask]; |
| 319 } |
| 320 |
| 321 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 322 |
| 323 var _response = _requester.request(_url, "PATCH", |
| 324 body: _body, |
| 325 queryParams: _queryParams, |
| 326 uploadOptions: _uploadOptions, |
| 327 uploadMedia: _uploadMedia, |
| 328 downloadOptions: _downloadOptions); |
| 329 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 330 } |
| 331 } |
59 | 332 |
60 class BillingAccountsLogsResourceApi { | 333 class BillingAccountsLogsResourceApi { |
61 final commons.ApiRequester _requester; | 334 final commons.ApiRequester _requester; |
62 | 335 |
63 BillingAccountsLogsResourceApi(commons.ApiRequester client) : | 336 BillingAccountsLogsResourceApi(commons.ApiRequester client) |
64 _requester = client; | 337 : _requester = client; |
65 | 338 |
66 /** | 339 /// Deletes all the log entries in a log. The log reappears if it receives |
67 * Deletes all the log entries in a log. The log reappears if it receives new | 340 /// new entries. Log entries written shortly before the delete operation |
68 * entries. Log entries written shortly before the delete operation might not | 341 /// might not be deleted. |
69 * be deleted. | 342 /// |
70 * | 343 /// Request parameters: |
71 * Request parameters: | 344 /// |
72 * | 345 /// [logName] - Required. The resource name of the log to delete: |
73 * [logName] - Required. The resource name of the log to delete: | 346 /// "projects/[PROJECT_ID]/logs/[LOG_ID]" |
74 * "projects/[PROJECT_ID]/logs/[LOG_ID]" | 347 /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" |
75 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" | 348 /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" |
76 * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" | 349 /// "folders/[FOLDER_ID]/logs/[LOG_ID]" |
77 * "folders/[FOLDER_ID]/logs/[LOG_ID]" | 350 /// [LOG_ID] must be URL-encoded. For example, |
78 * [LOG_ID] must be URL-encoded. For example, | 351 /// "projects/my-project-id/logs/syslog", |
79 * "projects/my-project-id/logs/syslog", | 352 /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factiv
ity". |
80 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi
ty". | 353 /// For more information about log names, see LogEntry. |
81 * For more information about log names, see LogEntry. | 354 /// Value must have pattern "^billingAccounts/[^/]+/logs/[^/]+$". |
82 * Value must have pattern "^billingAccounts/[^/]+/logs/[^/]+$". | 355 /// |
83 * | 356 /// Completes with a [Empty]. |
84 * Completes with a [Empty]. | 357 /// |
85 * | 358 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
86 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 359 /// an error. |
87 * error. | 360 /// |
88 * | 361 /// If the used [http.Client] completes with an error when making a REST |
89 * If the used [http.Client] completes with an error when making a REST call, | 362 /// call, this method will complete with the same error. |
90 * this method will complete with the same error. | |
91 */ | |
92 async.Future<Empty> delete(core.String logName) { | 363 async.Future<Empty> delete(core.String logName) { |
93 var _url = null; | 364 var _url = null; |
94 var _queryParams = new core.Map(); | 365 var _queryParams = new core.Map(); |
95 var _uploadMedia = null; | 366 var _uploadMedia = null; |
96 var _uploadOptions = null; | 367 var _uploadOptions = null; |
97 var _downloadOptions = commons.DownloadOptions.Metadata; | 368 var _downloadOptions = commons.DownloadOptions.Metadata; |
98 var _body = null; | 369 var _body = null; |
99 | 370 |
100 if (logName == null) { | 371 if (logName == null) { |
101 throw new core.ArgumentError("Parameter logName is required."); | 372 throw new core.ArgumentError("Parameter logName is required."); |
102 } | 373 } |
103 | 374 |
104 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$logName'); | 375 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$logName'); |
105 | 376 |
106 var _response = _requester.request(_url, | 377 var _response = _requester.request(_url, "DELETE", |
107 "DELETE", | 378 body: _body, |
108 body: _body, | 379 queryParams: _queryParams, |
109 queryParams: _queryParams, | 380 uploadOptions: _uploadOptions, |
110 uploadOptions: _uploadOptions, | 381 uploadMedia: _uploadMedia, |
111 uploadMedia: _uploadMedia, | 382 downloadOptions: _downloadOptions); |
112 downloadOptions: _downloadOptions); | |
113 return _response.then((data) => new Empty.fromJson(data)); | 383 return _response.then((data) => new Empty.fromJson(data)); |
114 } | 384 } |
115 | 385 |
116 /** | 386 /// Lists the logs in projects, organizations, folders, or billing accounts. |
117 * Lists the logs in projects, organizations, folders, or billing accounts. | 387 /// Only logs that have entries are listed. |
118 * Only logs that have entries are listed. | 388 /// |
119 * | 389 /// Request parameters: |
120 * Request parameters: | 390 /// |
121 * | 391 /// [parent] - Required. The resource name that owns the logs: |
122 * [parent] - Required. The resource name that owns the logs: | 392 /// "projects/[PROJECT_ID]" |
123 * "projects/[PROJECT_ID]" | 393 /// "organizations/[ORGANIZATION_ID]" |
124 * "organizations/[ORGANIZATION_ID]" | 394 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
125 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 395 /// "folders/[FOLDER_ID]" |
126 * "folders/[FOLDER_ID]" | 396 /// |
127 * | 397 /// Value must have pattern "^billingAccounts/[^/]+$". |
128 * Value must have pattern "^billingAccounts/[^/]+$". | 398 /// |
129 * | 399 /// [pageToken] - Optional. If present, then retrieve the next batch of |
130 * [pageToken] - Optional. If present, then retrieve the next batch of results | 400 /// results from the preceding call to this method. pageToken must be the |
131 * from the preceding call to this method. pageToken must be the value of | 401 /// value of nextPageToken from the previous response. The values of other |
132 * nextPageToken from the previous response. The values of other method | 402 /// method parameters should be identical to those in the previous call. |
133 * parameters should be identical to those in the previous call. | 403 /// |
134 * | 404 /// [pageSize] - Optional. The maximum number of results to return from this |
135 * [pageSize] - Optional. The maximum number of results to return from this | 405 /// request. Non-positive values are ignored. The presence of nextPageToken |
136 * request. Non-positive values are ignored. The presence of nextPageToken in | 406 /// in the response indicates that more results might be available. |
137 * the response indicates that more results might be available. | 407 /// |
138 * | 408 /// Completes with a [ListLogsResponse]. |
139 * Completes with a [ListLogsResponse]. | 409 /// |
140 * | 410 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
141 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 411 /// an error. |
142 * error. | 412 /// |
143 * | 413 /// If the used [http.Client] completes with an error when making a REST |
144 * If the used [http.Client] completes with an error when making a REST call, | 414 /// call, this method will complete with the same error. |
145 * this method will complete with the same error. | 415 async.Future<ListLogsResponse> list(core.String parent, |
146 */ | 416 {core.String pageToken, core.int pageSize}) { |
147 async.Future<ListLogsResponse> list(core.String parent, {core.String pageToken
, core.int pageSize}) { | |
148 var _url = null; | 417 var _url = null; |
149 var _queryParams = new core.Map(); | 418 var _queryParams = new core.Map(); |
150 var _uploadMedia = null; | 419 var _uploadMedia = null; |
151 var _uploadOptions = null; | 420 var _uploadOptions = null; |
152 var _downloadOptions = commons.DownloadOptions.Metadata; | 421 var _downloadOptions = commons.DownloadOptions.Metadata; |
153 var _body = null; | 422 var _body = null; |
154 | 423 |
155 if (parent == null) { | 424 if (parent == null) { |
156 throw new core.ArgumentError("Parameter parent is required."); | 425 throw new core.ArgumentError("Parameter parent is required."); |
157 } | 426 } |
158 if (pageToken != null) { | 427 if (pageToken != null) { |
159 _queryParams["pageToken"] = [pageToken]; | 428 _queryParams["pageToken"] = [pageToken]; |
160 } | 429 } |
161 if (pageSize != null) { | 430 if (pageSize != null) { |
162 _queryParams["pageSize"] = ["${pageSize}"]; | 431 _queryParams["pageSize"] = ["${pageSize}"]; |
163 } | 432 } |
164 | 433 |
165 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs'; | 434 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs'; |
166 | 435 |
167 var _response = _requester.request(_url, | 436 var _response = _requester.request(_url, "GET", |
168 "GET", | 437 body: _body, |
169 body: _body, | 438 queryParams: _queryParams, |
170 queryParams: _queryParams, | 439 uploadOptions: _uploadOptions, |
171 uploadOptions: _uploadOptions, | 440 uploadMedia: _uploadMedia, |
172 uploadMedia: _uploadMedia, | 441 downloadOptions: _downloadOptions); |
173 downloadOptions: _downloadOptions); | |
174 return _response.then((data) => new ListLogsResponse.fromJson(data)); | 442 return _response.then((data) => new ListLogsResponse.fromJson(data)); |
175 } | 443 } |
176 | |
177 } | 444 } |
178 | 445 |
179 | |
180 class BillingAccountsSinksResourceApi { | 446 class BillingAccountsSinksResourceApi { |
181 final commons.ApiRequester _requester; | 447 final commons.ApiRequester _requester; |
182 | 448 |
183 BillingAccountsSinksResourceApi(commons.ApiRequester client) : | 449 BillingAccountsSinksResourceApi(commons.ApiRequester client) |
184 _requester = client; | 450 : _requester = client; |
185 | 451 |
186 /** | 452 /// Creates a sink that exports specified log entries to a destination. The |
187 * Creates a sink that exports specified log entries to a destination. The | 453 /// export of newly-ingested log entries begins immediately, unless the |
188 * export of newly-ingested log entries begins immediately, unless the current | 454 /// sink's writer_identity is not permitted to write to the destination. A |
189 * time is outside the sink's start and end times or the sink's | 455 /// sink can export log entries only from the resource owning the sink. |
190 * writer_identity is not permitted to write to the destination. A sink can | 456 /// |
191 * export log entries only from the resource owning the sink. | 457 /// [request] - The metadata request object. |
192 * | 458 /// |
193 * [request] - The metadata request object. | 459 /// Request parameters: |
194 * | 460 /// |
195 * Request parameters: | 461 /// [parent] - Required. The resource in which to create the sink: |
196 * | 462 /// "projects/[PROJECT_ID]" |
197 * [parent] - Required. The resource in which to create the sink: | 463 /// "organizations/[ORGANIZATION_ID]" |
198 * "projects/[PROJECT_ID]" | 464 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
199 * "organizations/[ORGANIZATION_ID]" | 465 /// "folders/[FOLDER_ID]" |
200 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 466 /// Examples: "projects/my-logging-project", "organizations/123456789". |
201 * "folders/[FOLDER_ID]" | 467 /// Value must have pattern "^billingAccounts/[^/]+$". |
202 * Examples: "projects/my-logging-project", "organizations/123456789". | 468 /// |
203 * Value must have pattern "^billingAccounts/[^/]+$". | 469 /// [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity |
204 * | 470 /// returned as writer_identity in the new sink. If this value is omitted or |
205 * [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity | 471 /// set to false, and if the sink's parent is a project, then the value |
206 * returned as writer_identity in the new sink. If this value is omitted or | 472 /// returned as writer_identity is the same group or service account used by |
207 * set to false, and if the sink's parent is a project, then the value | 473 /// Stackdriver Logging before the addition of writer identities to this API. |
208 * returned as writer_identity is the same group or service account used by | 474 /// The sink's destination must be in the same project as the sink itself.If |
209 * Stackdriver Logging before the addition of writer identities to this API. | 475 /// this field is set to true, or if the sink is owned by a non-project |
210 * The sink's destination must be in the same project as the sink itself.If | 476 /// resource such as an organization, then the value of writer_identity will |
211 * this field is set to true, or if the sink is owned by a non-project | 477 /// be a unique service account used only for exports from the new sink. For |
212 * resource such as an organization, then the value of writer_identity will be | 478 /// more information, see writer_identity in LogSink. |
213 * a unique service account used only for exports from the new sink. For more | 479 /// |
214 * information, see writer_identity in LogSink. | 480 /// Completes with a [LogSink]. |
215 * | 481 /// |
216 * Completes with a [LogSink]. | 482 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
217 * | 483 /// an error. |
218 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 484 /// |
219 * error. | 485 /// If the used [http.Client] completes with an error when making a REST |
220 * | 486 /// call, this method will complete with the same error. |
221 * If the used [http.Client] completes with an error when making a REST call, | 487 async.Future<LogSink> create(LogSink request, core.String parent, |
222 * this method will complete with the same error. | 488 {core.bool uniqueWriterIdentity}) { |
223 */ | |
224 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u
niqueWriterIdentity}) { | |
225 var _url = null; | 489 var _url = null; |
226 var _queryParams = new core.Map(); | 490 var _queryParams = new core.Map(); |
227 var _uploadMedia = null; | 491 var _uploadMedia = null; |
228 var _uploadOptions = null; | 492 var _uploadOptions = null; |
229 var _downloadOptions = commons.DownloadOptions.Metadata; | 493 var _downloadOptions = commons.DownloadOptions.Metadata; |
230 var _body = null; | 494 var _body = null; |
231 | 495 |
232 if (request != null) { | 496 if (request != null) { |
233 _body = convert.JSON.encode((request).toJson()); | 497 _body = convert.JSON.encode((request).toJson()); |
234 } | 498 } |
235 if (parent == null) { | 499 if (parent == null) { |
236 throw new core.ArgumentError("Parameter parent is required."); | 500 throw new core.ArgumentError("Parameter parent is required."); |
237 } | 501 } |
238 if (uniqueWriterIdentity != null) { | 502 if (uniqueWriterIdentity != null) { |
239 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 503 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
240 } | 504 } |
241 | 505 |
242 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; | 506 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; |
243 | 507 |
244 var _response = _requester.request(_url, | 508 var _response = _requester.request(_url, "POST", |
245 "POST", | 509 body: _body, |
246 body: _body, | 510 queryParams: _queryParams, |
247 queryParams: _queryParams, | 511 uploadOptions: _uploadOptions, |
248 uploadOptions: _uploadOptions, | 512 uploadMedia: _uploadMedia, |
249 uploadMedia: _uploadMedia, | 513 downloadOptions: _downloadOptions); |
250 downloadOptions: _downloadOptions); | |
251 return _response.then((data) => new LogSink.fromJson(data)); | 514 return _response.then((data) => new LogSink.fromJson(data)); |
252 } | 515 } |
253 | 516 |
254 /** | 517 /// Deletes a sink. If the sink has a unique writer_identity, then that |
255 * Deletes a sink. If the sink has a unique writer_identity, then that service | 518 /// service account is also deleted. |
256 * account is also deleted. | 519 /// |
257 * | 520 /// Request parameters: |
258 * Request parameters: | 521 /// |
259 * | 522 /// [sinkName] - Required. The full resource name of the sink to delete, |
260 * [sinkName] - Required. The full resource name of the sink to delete, | 523 /// including the parent resource and the sink identifier: |
261 * including the parent resource and the sink identifier: | 524 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
262 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 525 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
263 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 526 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
264 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 527 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
265 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 528 /// Example: "projects/my-project-id/sinks/my-sink-id". |
266 * Example: "projects/my-project-id/sinks/my-sink-id". | 529 /// Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$". |
267 * Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$". | 530 /// |
268 * | 531 /// Completes with a [Empty]. |
269 * Completes with a [Empty]. | 532 /// |
270 * | 533 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
271 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 534 /// an error. |
272 * error. | 535 /// |
273 * | 536 /// If the used [http.Client] completes with an error when making a REST |
274 * If the used [http.Client] completes with an error when making a REST call, | 537 /// call, this method will complete with the same error. |
275 * this method will complete with the same error. | |
276 */ | |
277 async.Future<Empty> delete(core.String sinkName) { | 538 async.Future<Empty> delete(core.String sinkName) { |
278 var _url = null; | 539 var _url = null; |
279 var _queryParams = new core.Map(); | 540 var _queryParams = new core.Map(); |
280 var _uploadMedia = null; | 541 var _uploadMedia = null; |
281 var _uploadOptions = null; | 542 var _uploadOptions = null; |
282 var _downloadOptions = commons.DownloadOptions.Metadata; | 543 var _downloadOptions = commons.DownloadOptions.Metadata; |
283 var _body = null; | 544 var _body = null; |
284 | 545 |
285 if (sinkName == null) { | 546 if (sinkName == null) { |
286 throw new core.ArgumentError("Parameter sinkName is required."); | 547 throw new core.ArgumentError("Parameter sinkName is required."); |
287 } | 548 } |
288 | 549 |
289 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 550 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
290 | 551 |
291 var _response = _requester.request(_url, | 552 var _response = _requester.request(_url, "DELETE", |
292 "DELETE", | 553 body: _body, |
293 body: _body, | 554 queryParams: _queryParams, |
294 queryParams: _queryParams, | 555 uploadOptions: _uploadOptions, |
295 uploadOptions: _uploadOptions, | 556 uploadMedia: _uploadMedia, |
296 uploadMedia: _uploadMedia, | 557 downloadOptions: _downloadOptions); |
297 downloadOptions: _downloadOptions); | |
298 return _response.then((data) => new Empty.fromJson(data)); | 558 return _response.then((data) => new Empty.fromJson(data)); |
299 } | 559 } |
300 | 560 |
301 /** | 561 /// Gets a sink. |
302 * Gets a sink. | 562 /// |
303 * | 563 /// Request parameters: |
304 * Request parameters: | 564 /// |
305 * | 565 /// [sinkName] - Required. The resource name of the sink: |
306 * [sinkName] - Required. The resource name of the sink: | 566 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
307 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 567 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
308 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 568 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
309 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 569 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
310 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 570 /// Example: "projects/my-project-id/sinks/my-sink-id". |
311 * Example: "projects/my-project-id/sinks/my-sink-id". | 571 /// Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$". |
312 * Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$". | 572 /// |
313 * | 573 /// Completes with a [LogSink]. |
314 * Completes with a [LogSink]. | 574 /// |
315 * | 575 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
316 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 576 /// an error. |
317 * error. | 577 /// |
318 * | 578 /// If the used [http.Client] completes with an error when making a REST |
319 * If the used [http.Client] completes with an error when making a REST call, | 579 /// call, this method will complete with the same error. |
320 * this method will complete with the same error. | |
321 */ | |
322 async.Future<LogSink> get(core.String sinkName) { | 580 async.Future<LogSink> get(core.String sinkName) { |
323 var _url = null; | 581 var _url = null; |
324 var _queryParams = new core.Map(); | 582 var _queryParams = new core.Map(); |
325 var _uploadMedia = null; | 583 var _uploadMedia = null; |
326 var _uploadOptions = null; | 584 var _uploadOptions = null; |
327 var _downloadOptions = commons.DownloadOptions.Metadata; | 585 var _downloadOptions = commons.DownloadOptions.Metadata; |
328 var _body = null; | 586 var _body = null; |
329 | 587 |
330 if (sinkName == null) { | 588 if (sinkName == null) { |
331 throw new core.ArgumentError("Parameter sinkName is required."); | 589 throw new core.ArgumentError("Parameter sinkName is required."); |
332 } | 590 } |
333 | 591 |
334 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 592 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
335 | 593 |
336 var _response = _requester.request(_url, | 594 var _response = _requester.request(_url, "GET", |
337 "GET", | 595 body: _body, |
338 body: _body, | 596 queryParams: _queryParams, |
339 queryParams: _queryParams, | 597 uploadOptions: _uploadOptions, |
340 uploadOptions: _uploadOptions, | 598 uploadMedia: _uploadMedia, |
341 uploadMedia: _uploadMedia, | 599 downloadOptions: _downloadOptions); |
342 downloadOptions: _downloadOptions); | |
343 return _response.then((data) => new LogSink.fromJson(data)); | 600 return _response.then((data) => new LogSink.fromJson(data)); |
344 } | 601 } |
345 | 602 |
346 /** | 603 /// Lists sinks. |
347 * Lists sinks. | 604 /// |
348 * | 605 /// Request parameters: |
349 * Request parameters: | 606 /// |
350 * | 607 /// [parent] - Required. The parent resource whose sinks are to be listed: |
351 * [parent] - Required. The parent resource whose sinks are to be listed: | 608 /// "projects/[PROJECT_ID]" |
352 * "projects/[PROJECT_ID]" | 609 /// "organizations/[ORGANIZATION_ID]" |
353 * "organizations/[ORGANIZATION_ID]" | 610 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
354 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 611 /// "folders/[FOLDER_ID]" |
355 * "folders/[FOLDER_ID]" | 612 /// |
356 * | 613 /// Value must have pattern "^billingAccounts/[^/]+$". |
357 * Value must have pattern "^billingAccounts/[^/]+$". | 614 /// |
358 * | 615 /// [pageToken] - Optional. If present, then retrieve the next batch of |
359 * [pageToken] - Optional. If present, then retrieve the next batch of results | 616 /// results from the preceding call to this method. pageToken must be the |
360 * from the preceding call to this method. pageToken must be the value of | 617 /// value of nextPageToken from the previous response. The values of other |
361 * nextPageToken from the previous response. The values of other method | 618 /// method parameters should be identical to those in the previous call. |
362 * parameters should be identical to those in the previous call. | 619 /// |
363 * | 620 /// [pageSize] - Optional. The maximum number of results to return from this |
364 * [pageSize] - Optional. The maximum number of results to return from this | 621 /// request. Non-positive values are ignored. The presence of nextPageToken |
365 * request. Non-positive values are ignored. The presence of nextPageToken in | 622 /// in the response indicates that more results might be available. |
366 * the response indicates that more results might be available. | 623 /// |
367 * | 624 /// Completes with a [ListSinksResponse]. |
368 * Completes with a [ListSinksResponse]. | 625 /// |
369 * | 626 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
370 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 627 /// an error. |
371 * error. | 628 /// |
372 * | 629 /// If the used [http.Client] completes with an error when making a REST |
373 * If the used [http.Client] completes with an error when making a REST call, | 630 /// call, this method will complete with the same error. |
374 * this method will complete with the same error. | 631 async.Future<ListSinksResponse> list(core.String parent, |
375 */ | 632 {core.String pageToken, core.int pageSize}) { |
376 async.Future<ListSinksResponse> list(core.String parent, {core.String pageToke
n, core.int pageSize}) { | |
377 var _url = null; | 633 var _url = null; |
378 var _queryParams = new core.Map(); | 634 var _queryParams = new core.Map(); |
379 var _uploadMedia = null; | 635 var _uploadMedia = null; |
380 var _uploadOptions = null; | 636 var _uploadOptions = null; |
381 var _downloadOptions = commons.DownloadOptions.Metadata; | 637 var _downloadOptions = commons.DownloadOptions.Metadata; |
382 var _body = null; | 638 var _body = null; |
383 | 639 |
384 if (parent == null) { | 640 if (parent == null) { |
385 throw new core.ArgumentError("Parameter parent is required."); | 641 throw new core.ArgumentError("Parameter parent is required."); |
386 } | 642 } |
387 if (pageToken != null) { | 643 if (pageToken != null) { |
388 _queryParams["pageToken"] = [pageToken]; | 644 _queryParams["pageToken"] = [pageToken]; |
389 } | 645 } |
390 if (pageSize != null) { | 646 if (pageSize != null) { |
391 _queryParams["pageSize"] = ["${pageSize}"]; | 647 _queryParams["pageSize"] = ["${pageSize}"]; |
392 } | 648 } |
393 | 649 |
394 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; | 650 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; |
395 | 651 |
396 var _response = _requester.request(_url, | 652 var _response = _requester.request(_url, "GET", |
397 "GET", | 653 body: _body, |
398 body: _body, | 654 queryParams: _queryParams, |
399 queryParams: _queryParams, | 655 uploadOptions: _uploadOptions, |
400 uploadOptions: _uploadOptions, | 656 uploadMedia: _uploadMedia, |
401 uploadMedia: _uploadMedia, | 657 downloadOptions: _downloadOptions); |
402 downloadOptions: _downloadOptions); | |
403 return _response.then((data) => new ListSinksResponse.fromJson(data)); | 658 return _response.then((data) => new ListSinksResponse.fromJson(data)); |
404 } | 659 } |
405 | 660 |
406 /** | 661 /// Updates a sink. This method replaces the following fields in the existing |
407 * Updates a sink. This method replaces the following fields in the existing | 662 /// sink with values from the new sink: destination, and filter. The updated |
408 * sink with values from the new sink: destination, filter, | 663 /// sink might also have a new writer_identity; see the |
409 * output_version_format, start_time, and end_time. The updated sink might | 664 /// unique_writer_identity field. |
410 * also have a new writer_identity; see the unique_writer_identity field. | 665 /// |
411 * | 666 /// [request] - The metadata request object. |
412 * [request] - The metadata request object. | 667 /// |
413 * | 668 /// Request parameters: |
414 * Request parameters: | 669 /// |
415 * | 670 /// [sinkName] - Required. The full resource name of the sink to update, |
416 * [sinkName] - Required. The full resource name of the sink to update, | 671 /// including the parent resource and the sink identifier: |
417 * including the parent resource and the sink identifier: | 672 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
418 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 673 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
419 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 674 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
420 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 675 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
421 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 676 /// Example: "projects/my-project-id/sinks/my-sink-id". |
422 * Example: "projects/my-project-id/sinks/my-sink-id". | 677 /// Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$". |
423 * Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$". | 678 /// |
424 * | 679 /// [updateMask] - Optional. Field mask that specifies the fields in sink |
425 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of | 680 /// that need an update. A sink field will be overwritten if, and only if, it |
426 * this field. When updating a sink, the effect of this field on the value of | 681 /// is in the update mask. name and output only fields cannot be updated.An |
427 * writer_identity in the updated sink depends on both the old and new values | 682 /// empty updateMask is temporarily treated as using the following mask for |
428 * of this field: | 683 /// backwards compatibility purposes: destination,filter,includeChildren At |
429 * If the old and new values of this field are both false or both true, then | 684 /// some point in the future, behavior will be removed and specifying an |
430 * there is no change to the sink's writer_identity. | 685 /// empty updateMask will be an error.For a detailed FieldMask definition, |
431 * If the old value is false and the new value is true, then writer_identity | 686 /// see |
432 * is changed to a unique service account. | 687 /// https://developers.google.com/protocol-buffers/docs/reference/google.proto
buf#fieldmaskExample: |
433 * It is an error if the old value is true and the new value is set to false | 688 /// updateMask=filter. |
434 * or defaulted to false. | 689 /// |
435 * | 690 /// [uniqueWriterIdentity] - Optional. See sinks.create for a description of |
436 * Completes with a [LogSink]. | 691 /// this field. When updating a sink, the effect of this field on the value |
437 * | 692 /// of writer_identity in the updated sink depends on both the old and new |
438 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 693 /// values of this field: |
439 * error. | 694 /// If the old and new values of this field are both false or both true, then |
440 * | 695 /// there is no change to the sink's writer_identity. |
441 * If the used [http.Client] completes with an error when making a REST call, | 696 /// If the old value is false and the new value is true, then writer_identity |
442 * this method will complete with the same error. | 697 /// is changed to a unique service account. |
443 */ | 698 /// It is an error if the old value is true and the new value is set to false |
444 async.Future<LogSink> patch(LogSink request, core.String sinkName, {core.bool
uniqueWriterIdentity}) { | 699 /// or defaulted to false. |
| 700 /// |
| 701 /// Completes with a [LogSink]. |
| 702 /// |
| 703 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 704 /// an error. |
| 705 /// |
| 706 /// If the used [http.Client] completes with an error when making a REST |
| 707 /// call, this method will complete with the same error. |
| 708 async.Future<LogSink> patch(LogSink request, core.String sinkName, |
| 709 {core.String updateMask, core.bool uniqueWriterIdentity}) { |
445 var _url = null; | 710 var _url = null; |
446 var _queryParams = new core.Map(); | 711 var _queryParams = new core.Map(); |
447 var _uploadMedia = null; | 712 var _uploadMedia = null; |
448 var _uploadOptions = null; | 713 var _uploadOptions = null; |
449 var _downloadOptions = commons.DownloadOptions.Metadata; | 714 var _downloadOptions = commons.DownloadOptions.Metadata; |
450 var _body = null; | 715 var _body = null; |
451 | 716 |
452 if (request != null) { | 717 if (request != null) { |
453 _body = convert.JSON.encode((request).toJson()); | 718 _body = convert.JSON.encode((request).toJson()); |
454 } | 719 } |
455 if (sinkName == null) { | 720 if (sinkName == null) { |
456 throw new core.ArgumentError("Parameter sinkName is required."); | 721 throw new core.ArgumentError("Parameter sinkName is required."); |
457 } | 722 } |
| 723 if (updateMask != null) { |
| 724 _queryParams["updateMask"] = [updateMask]; |
| 725 } |
458 if (uniqueWriterIdentity != null) { | 726 if (uniqueWriterIdentity != null) { |
459 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 727 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
460 } | 728 } |
461 | 729 |
462 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 730 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
463 | 731 |
464 var _response = _requester.request(_url, | 732 var _response = _requester.request(_url, "PATCH", |
465 "PATCH", | 733 body: _body, |
466 body: _body, | 734 queryParams: _queryParams, |
467 queryParams: _queryParams, | 735 uploadOptions: _uploadOptions, |
468 uploadOptions: _uploadOptions, | 736 uploadMedia: _uploadMedia, |
469 uploadMedia: _uploadMedia, | 737 downloadOptions: _downloadOptions); |
470 downloadOptions: _downloadOptions); | |
471 return _response.then((data) => new LogSink.fromJson(data)); | 738 return _response.then((data) => new LogSink.fromJson(data)); |
472 } | 739 } |
473 | 740 |
474 /** | 741 /// Updates a sink. This method replaces the following fields in the existing |
475 * Updates a sink. This method replaces the following fields in the existing | 742 /// sink with values from the new sink: destination, and filter. The updated |
476 * sink with values from the new sink: destination, filter, | 743 /// sink might also have a new writer_identity; see the |
477 * output_version_format, start_time, and end_time. The updated sink might | 744 /// unique_writer_identity field. |
478 * also have a new writer_identity; see the unique_writer_identity field. | 745 /// |
479 * | 746 /// [request] - The metadata request object. |
480 * [request] - The metadata request object. | 747 /// |
481 * | 748 /// Request parameters: |
482 * Request parameters: | 749 /// |
483 * | 750 /// [sinkName] - Required. The full resource name of the sink to update, |
484 * [sinkName] - Required. The full resource name of the sink to update, | 751 /// including the parent resource and the sink identifier: |
485 * including the parent resource and the sink identifier: | 752 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
486 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 753 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
487 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 754 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
488 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 755 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
489 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 756 /// Example: "projects/my-project-id/sinks/my-sink-id". |
490 * Example: "projects/my-project-id/sinks/my-sink-id". | 757 /// Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$". |
491 * Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$". | 758 /// |
492 * | 759 /// [updateMask] - Optional. Field mask that specifies the fields in sink |
493 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of | 760 /// that need an update. A sink field will be overwritten if, and only if, it |
494 * this field. When updating a sink, the effect of this field on the value of | 761 /// is in the update mask. name and output only fields cannot be updated.An |
495 * writer_identity in the updated sink depends on both the old and new values | 762 /// empty updateMask is temporarily treated as using the following mask for |
496 * of this field: | 763 /// backwards compatibility purposes: destination,filter,includeChildren At |
497 * If the old and new values of this field are both false or both true, then | 764 /// some point in the future, behavior will be removed and specifying an |
498 * there is no change to the sink's writer_identity. | 765 /// empty updateMask will be an error.For a detailed FieldMask definition, |
499 * If the old value is false and the new value is true, then writer_identity | 766 /// see |
500 * is changed to a unique service account. | 767 /// https://developers.google.com/protocol-buffers/docs/reference/google.proto
buf#fieldmaskExample: |
501 * It is an error if the old value is true and the new value is set to false | 768 /// updateMask=filter. |
502 * or defaulted to false. | 769 /// |
503 * | 770 /// [uniqueWriterIdentity] - Optional. See sinks.create for a description of |
504 * Completes with a [LogSink]. | 771 /// this field. When updating a sink, the effect of this field on the value |
505 * | 772 /// of writer_identity in the updated sink depends on both the old and new |
506 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 773 /// values of this field: |
507 * error. | 774 /// If the old and new values of this field are both false or both true, then |
508 * | 775 /// there is no change to the sink's writer_identity. |
509 * If the used [http.Client] completes with an error when making a REST call, | 776 /// If the old value is false and the new value is true, then writer_identity |
510 * this method will complete with the same error. | 777 /// is changed to a unique service account. |
511 */ | 778 /// It is an error if the old value is true and the new value is set to false |
512 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool
uniqueWriterIdentity}) { | 779 /// or defaulted to false. |
| 780 /// |
| 781 /// Completes with a [LogSink]. |
| 782 /// |
| 783 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 784 /// an error. |
| 785 /// |
| 786 /// If the used [http.Client] completes with an error when making a REST |
| 787 /// call, this method will complete with the same error. |
| 788 async.Future<LogSink> update(LogSink request, core.String sinkName, |
| 789 {core.String updateMask, core.bool uniqueWriterIdentity}) { |
513 var _url = null; | 790 var _url = null; |
514 var _queryParams = new core.Map(); | 791 var _queryParams = new core.Map(); |
515 var _uploadMedia = null; | 792 var _uploadMedia = null; |
516 var _uploadOptions = null; | 793 var _uploadOptions = null; |
517 var _downloadOptions = commons.DownloadOptions.Metadata; | 794 var _downloadOptions = commons.DownloadOptions.Metadata; |
518 var _body = null; | 795 var _body = null; |
519 | 796 |
520 if (request != null) { | 797 if (request != null) { |
521 _body = convert.JSON.encode((request).toJson()); | 798 _body = convert.JSON.encode((request).toJson()); |
522 } | 799 } |
523 if (sinkName == null) { | 800 if (sinkName == null) { |
524 throw new core.ArgumentError("Parameter sinkName is required."); | 801 throw new core.ArgumentError("Parameter sinkName is required."); |
525 } | 802 } |
| 803 if (updateMask != null) { |
| 804 _queryParams["updateMask"] = [updateMask]; |
| 805 } |
526 if (uniqueWriterIdentity != null) { | 806 if (uniqueWriterIdentity != null) { |
527 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 807 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
528 } | 808 } |
529 | 809 |
530 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 810 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
531 | 811 |
532 var _response = _requester.request(_url, | 812 var _response = _requester.request(_url, "PUT", |
533 "PUT", | 813 body: _body, |
534 body: _body, | 814 queryParams: _queryParams, |
535 queryParams: _queryParams, | 815 uploadOptions: _uploadOptions, |
536 uploadOptions: _uploadOptions, | 816 uploadMedia: _uploadMedia, |
537 uploadMedia: _uploadMedia, | 817 downloadOptions: _downloadOptions); |
538 downloadOptions: _downloadOptions); | |
539 return _response.then((data) => new LogSink.fromJson(data)); | 818 return _response.then((data) => new LogSink.fromJson(data)); |
540 } | 819 } |
541 | |
542 } | 820 } |
543 | 821 |
544 | |
545 class EntriesResourceApi { | 822 class EntriesResourceApi { |
546 final commons.ApiRequester _requester; | 823 final commons.ApiRequester _requester; |
547 | 824 |
548 EntriesResourceApi(commons.ApiRequester client) : | 825 EntriesResourceApi(commons.ApiRequester client) : _requester = client; |
549 _requester = client; | |
550 | 826 |
551 /** | 827 /// Lists log entries. Use this method to retrieve log entries from |
552 * Lists log entries. Use this method to retrieve log entries from Stackdriver | 828 /// Stackdriver Logging. For ways to export log entries, see Exporting Logs. |
553 * Logging. For ways to export log entries, see Exporting Logs. | 829 /// |
554 * | 830 /// [request] - The metadata request object. |
555 * [request] - The metadata request object. | 831 /// |
556 * | 832 /// Request parameters: |
557 * Request parameters: | 833 /// |
558 * | 834 /// Completes with a [ListLogEntriesResponse]. |
559 * Completes with a [ListLogEntriesResponse]. | 835 /// |
560 * | 836 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
561 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 837 /// an error. |
562 * error. | 838 /// |
563 * | 839 /// If the used [http.Client] completes with an error when making a REST |
564 * If the used [http.Client] completes with an error when making a REST call, | 840 /// call, this method will complete with the same error. |
565 * this method will complete with the same error. | |
566 */ | |
567 async.Future<ListLogEntriesResponse> list(ListLogEntriesRequest request) { | 841 async.Future<ListLogEntriesResponse> list(ListLogEntriesRequest request) { |
568 var _url = null; | 842 var _url = null; |
569 var _queryParams = new core.Map(); | 843 var _queryParams = new core.Map(); |
570 var _uploadMedia = null; | 844 var _uploadMedia = null; |
571 var _uploadOptions = null; | 845 var _uploadOptions = null; |
572 var _downloadOptions = commons.DownloadOptions.Metadata; | 846 var _downloadOptions = commons.DownloadOptions.Metadata; |
573 var _body = null; | 847 var _body = null; |
574 | 848 |
575 if (request != null) { | 849 if (request != null) { |
576 _body = convert.JSON.encode((request).toJson()); | 850 _body = convert.JSON.encode((request).toJson()); |
577 } | 851 } |
578 | 852 |
579 _url = 'v2/entries:list'; | 853 _url = 'v2/entries:list'; |
580 | 854 |
581 var _response = _requester.request(_url, | 855 var _response = _requester.request(_url, "POST", |
582 "POST", | 856 body: _body, |
583 body: _body, | 857 queryParams: _queryParams, |
584 queryParams: _queryParams, | 858 uploadOptions: _uploadOptions, |
585 uploadOptions: _uploadOptions, | 859 uploadMedia: _uploadMedia, |
586 uploadMedia: _uploadMedia, | 860 downloadOptions: _downloadOptions); |
587 downloadOptions: _downloadOptions); | |
588 return _response.then((data) => new ListLogEntriesResponse.fromJson(data)); | 861 return _response.then((data) => new ListLogEntriesResponse.fromJson(data)); |
589 } | 862 } |
590 | 863 |
591 /** | 864 /// Log entry resourcesWrites log entries to Stackdriver Logging. This API |
592 * Writes log entries to Stackdriver Logging. | 865 /// method is the only way to send log entries to Stackdriver Logging. This |
593 * | 866 /// method is used, directly or indirectly, by the Stackdriver Logging agent |
594 * [request] - The metadata request object. | 867 /// (fluentd) and all logging libraries configured to use Stackdriver |
595 * | 868 /// Logging. |
596 * Request parameters: | 869 /// |
597 * | 870 /// [request] - The metadata request object. |
598 * Completes with a [WriteLogEntriesResponse]. | 871 /// |
599 * | 872 /// Request parameters: |
600 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 873 /// |
601 * error. | 874 /// Completes with a [WriteLogEntriesResponse]. |
602 * | 875 /// |
603 * If the used [http.Client] completes with an error when making a REST call, | 876 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
604 * this method will complete with the same error. | 877 /// an error. |
605 */ | 878 /// |
| 879 /// If the used [http.Client] completes with an error when making a REST |
| 880 /// call, this method will complete with the same error. |
606 async.Future<WriteLogEntriesResponse> write(WriteLogEntriesRequest request) { | 881 async.Future<WriteLogEntriesResponse> write(WriteLogEntriesRequest request) { |
607 var _url = null; | 882 var _url = null; |
608 var _queryParams = new core.Map(); | 883 var _queryParams = new core.Map(); |
609 var _uploadMedia = null; | 884 var _uploadMedia = null; |
610 var _uploadOptions = null; | 885 var _uploadOptions = null; |
611 var _downloadOptions = commons.DownloadOptions.Metadata; | 886 var _downloadOptions = commons.DownloadOptions.Metadata; |
612 var _body = null; | 887 var _body = null; |
613 | 888 |
614 if (request != null) { | 889 if (request != null) { |
615 _body = convert.JSON.encode((request).toJson()); | 890 _body = convert.JSON.encode((request).toJson()); |
616 } | 891 } |
617 | 892 |
618 _url = 'v2/entries:write'; | 893 _url = 'v2/entries:write'; |
619 | 894 |
620 var _response = _requester.request(_url, | 895 var _response = _requester.request(_url, "POST", |
621 "POST", | 896 body: _body, |
622 body: _body, | 897 queryParams: _queryParams, |
623 queryParams: _queryParams, | 898 uploadOptions: _uploadOptions, |
624 uploadOptions: _uploadOptions, | 899 uploadMedia: _uploadMedia, |
625 uploadMedia: _uploadMedia, | 900 downloadOptions: _downloadOptions); |
626 downloadOptions: _downloadOptions); | |
627 return _response.then((data) => new WriteLogEntriesResponse.fromJson(data)); | 901 return _response.then((data) => new WriteLogEntriesResponse.fromJson(data)); |
628 } | 902 } |
629 | |
630 } | 903 } |
631 | 904 |
632 | |
633 class FoldersResourceApi { | 905 class FoldersResourceApi { |
634 final commons.ApiRequester _requester; | 906 final commons.ApiRequester _requester; |
635 | 907 |
| 908 FoldersExclusionsResourceApi get exclusions => |
| 909 new FoldersExclusionsResourceApi(_requester); |
636 FoldersLogsResourceApi get logs => new FoldersLogsResourceApi(_requester); | 910 FoldersLogsResourceApi get logs => new FoldersLogsResourceApi(_requester); |
637 FoldersSinksResourceApi get sinks => new FoldersSinksResourceApi(_requester); | 911 FoldersSinksResourceApi get sinks => new FoldersSinksResourceApi(_requester); |
638 | 912 |
639 FoldersResourceApi(commons.ApiRequester client) : | 913 FoldersResourceApi(commons.ApiRequester client) : _requester = client; |
640 _requester = client; | |
641 } | 914 } |
642 | 915 |
| 916 class FoldersExclusionsResourceApi { |
| 917 final commons.ApiRequester _requester; |
| 918 |
| 919 FoldersExclusionsResourceApi(commons.ApiRequester client) |
| 920 : _requester = client; |
| 921 |
| 922 /// Creates a new exclusion in a specified parent resource. Only log entries |
| 923 /// belonging to that resource can be excluded. You can have up to 10 |
| 924 /// exclusions in a resource. |
| 925 /// |
| 926 /// [request] - The metadata request object. |
| 927 /// |
| 928 /// Request parameters: |
| 929 /// |
| 930 /// [parent] - Required. The parent resource in which to create the |
| 931 /// exclusion: |
| 932 /// "projects/[PROJECT_ID]" |
| 933 /// "organizations/[ORGANIZATION_ID]" |
| 934 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
| 935 /// "folders/[FOLDER_ID]" |
| 936 /// Examples: "projects/my-logging-project", "organizations/123456789". |
| 937 /// Value must have pattern "^folders/[^/]+$". |
| 938 /// |
| 939 /// Completes with a [LogExclusion]. |
| 940 /// |
| 941 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 942 /// an error. |
| 943 /// |
| 944 /// If the used [http.Client] completes with an error when making a REST |
| 945 /// call, this method will complete with the same error. |
| 946 async.Future<LogExclusion> create(LogExclusion request, core.String parent) { |
| 947 var _url = null; |
| 948 var _queryParams = new core.Map(); |
| 949 var _uploadMedia = null; |
| 950 var _uploadOptions = null; |
| 951 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 952 var _body = null; |
| 953 |
| 954 if (request != null) { |
| 955 _body = convert.JSON.encode((request).toJson()); |
| 956 } |
| 957 if (parent == null) { |
| 958 throw new core.ArgumentError("Parameter parent is required."); |
| 959 } |
| 960 |
| 961 _url = 'v2/' + |
| 962 commons.Escaper.ecapeVariableReserved('$parent') + |
| 963 '/exclusions'; |
| 964 |
| 965 var _response = _requester.request(_url, "POST", |
| 966 body: _body, |
| 967 queryParams: _queryParams, |
| 968 uploadOptions: _uploadOptions, |
| 969 uploadMedia: _uploadMedia, |
| 970 downloadOptions: _downloadOptions); |
| 971 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 972 } |
| 973 |
| 974 /// Deletes an exclusion. |
| 975 /// |
| 976 /// Request parameters: |
| 977 /// |
| 978 /// [name] - Required. The resource name of an existing exclusion to delete: |
| 979 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 980 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 981 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 982 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 983 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 984 /// Value must have pattern "^folders/[^/]+/exclusions/[^/]+$". |
| 985 /// |
| 986 /// Completes with a [Empty]. |
| 987 /// |
| 988 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 989 /// an error. |
| 990 /// |
| 991 /// If the used [http.Client] completes with an error when making a REST |
| 992 /// call, this method will complete with the same error. |
| 993 async.Future<Empty> delete(core.String name) { |
| 994 var _url = null; |
| 995 var _queryParams = new core.Map(); |
| 996 var _uploadMedia = null; |
| 997 var _uploadOptions = null; |
| 998 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 999 var _body = null; |
| 1000 |
| 1001 if (name == null) { |
| 1002 throw new core.ArgumentError("Parameter name is required."); |
| 1003 } |
| 1004 |
| 1005 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 1006 |
| 1007 var _response = _requester.request(_url, "DELETE", |
| 1008 body: _body, |
| 1009 queryParams: _queryParams, |
| 1010 uploadOptions: _uploadOptions, |
| 1011 uploadMedia: _uploadMedia, |
| 1012 downloadOptions: _downloadOptions); |
| 1013 return _response.then((data) => new Empty.fromJson(data)); |
| 1014 } |
| 1015 |
| 1016 /// Gets the description of an exclusion. |
| 1017 /// |
| 1018 /// Request parameters: |
| 1019 /// |
| 1020 /// [name] - Required. The resource name of an existing exclusion: |
| 1021 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 1022 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 1023 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 1024 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 1025 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 1026 /// Value must have pattern "^folders/[^/]+/exclusions/[^/]+$". |
| 1027 /// |
| 1028 /// Completes with a [LogExclusion]. |
| 1029 /// |
| 1030 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1031 /// an error. |
| 1032 /// |
| 1033 /// If the used [http.Client] completes with an error when making a REST |
| 1034 /// call, this method will complete with the same error. |
| 1035 async.Future<LogExclusion> get(core.String name) { |
| 1036 var _url = null; |
| 1037 var _queryParams = new core.Map(); |
| 1038 var _uploadMedia = null; |
| 1039 var _uploadOptions = null; |
| 1040 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1041 var _body = null; |
| 1042 |
| 1043 if (name == null) { |
| 1044 throw new core.ArgumentError("Parameter name is required."); |
| 1045 } |
| 1046 |
| 1047 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 1048 |
| 1049 var _response = _requester.request(_url, "GET", |
| 1050 body: _body, |
| 1051 queryParams: _queryParams, |
| 1052 uploadOptions: _uploadOptions, |
| 1053 uploadMedia: _uploadMedia, |
| 1054 downloadOptions: _downloadOptions); |
| 1055 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 1056 } |
| 1057 |
| 1058 /// Lists all the exclusions in a parent resource. |
| 1059 /// |
| 1060 /// Request parameters: |
| 1061 /// |
| 1062 /// [parent] - Required. The parent resource whose exclusions are to be |
| 1063 /// listed. |
| 1064 /// "projects/[PROJECT_ID]" |
| 1065 /// "organizations/[ORGANIZATION_ID]" |
| 1066 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
| 1067 /// "folders/[FOLDER_ID]" |
| 1068 /// |
| 1069 /// Value must have pattern "^folders/[^/]+$". |
| 1070 /// |
| 1071 /// [pageToken] - Optional. If present, then retrieve the next batch of |
| 1072 /// results from the preceding call to this method. pageToken must be the |
| 1073 /// value of nextPageToken from the previous response. The values of other |
| 1074 /// method parameters should be identical to those in the previous call. |
| 1075 /// |
| 1076 /// [pageSize] - Optional. The maximum number of results to return from this |
| 1077 /// request. Non-positive values are ignored. The presence of nextPageToken |
| 1078 /// in the response indicates that more results might be available. |
| 1079 /// |
| 1080 /// Completes with a [ListExclusionsResponse]. |
| 1081 /// |
| 1082 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1083 /// an error. |
| 1084 /// |
| 1085 /// If the used [http.Client] completes with an error when making a REST |
| 1086 /// call, this method will complete with the same error. |
| 1087 async.Future<ListExclusionsResponse> list(core.String parent, |
| 1088 {core.String pageToken, core.int pageSize}) { |
| 1089 var _url = null; |
| 1090 var _queryParams = new core.Map(); |
| 1091 var _uploadMedia = null; |
| 1092 var _uploadOptions = null; |
| 1093 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1094 var _body = null; |
| 1095 |
| 1096 if (parent == null) { |
| 1097 throw new core.ArgumentError("Parameter parent is required."); |
| 1098 } |
| 1099 if (pageToken != null) { |
| 1100 _queryParams["pageToken"] = [pageToken]; |
| 1101 } |
| 1102 if (pageSize != null) { |
| 1103 _queryParams["pageSize"] = ["${pageSize}"]; |
| 1104 } |
| 1105 |
| 1106 _url = 'v2/' + |
| 1107 commons.Escaper.ecapeVariableReserved('$parent') + |
| 1108 '/exclusions'; |
| 1109 |
| 1110 var _response = _requester.request(_url, "GET", |
| 1111 body: _body, |
| 1112 queryParams: _queryParams, |
| 1113 uploadOptions: _uploadOptions, |
| 1114 uploadMedia: _uploadMedia, |
| 1115 downloadOptions: _downloadOptions); |
| 1116 return _response.then((data) => new ListExclusionsResponse.fromJson(data)); |
| 1117 } |
| 1118 |
| 1119 /// Changes one or more properties of an existing exclusion. |
| 1120 /// |
| 1121 /// [request] - The metadata request object. |
| 1122 /// |
| 1123 /// Request parameters: |
| 1124 /// |
| 1125 /// [name] - Required. The resource name of the exclusion to update: |
| 1126 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 1127 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 1128 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 1129 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 1130 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 1131 /// Value must have pattern "^folders/[^/]+/exclusions/[^/]+$". |
| 1132 /// |
| 1133 /// [updateMask] - Required. A nonempty list of fields to change in the |
| 1134 /// existing exclusion. New values for the fields are taken from the |
| 1135 /// corresponding fields in the LogExclusion included in this request. Fields |
| 1136 /// not mentioned in update_mask are not changed and are ignored in the |
| 1137 /// request.For example, to change the filter and description of an |
| 1138 /// exclusion, specify an update_mask of "filter,description". |
| 1139 /// |
| 1140 /// Completes with a [LogExclusion]. |
| 1141 /// |
| 1142 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1143 /// an error. |
| 1144 /// |
| 1145 /// If the used [http.Client] completes with an error when making a REST |
| 1146 /// call, this method will complete with the same error. |
| 1147 async.Future<LogExclusion> patch(LogExclusion request, core.String name, |
| 1148 {core.String updateMask}) { |
| 1149 var _url = null; |
| 1150 var _queryParams = new core.Map(); |
| 1151 var _uploadMedia = null; |
| 1152 var _uploadOptions = null; |
| 1153 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1154 var _body = null; |
| 1155 |
| 1156 if (request != null) { |
| 1157 _body = convert.JSON.encode((request).toJson()); |
| 1158 } |
| 1159 if (name == null) { |
| 1160 throw new core.ArgumentError("Parameter name is required."); |
| 1161 } |
| 1162 if (updateMask != null) { |
| 1163 _queryParams["updateMask"] = [updateMask]; |
| 1164 } |
| 1165 |
| 1166 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 1167 |
| 1168 var _response = _requester.request(_url, "PATCH", |
| 1169 body: _body, |
| 1170 queryParams: _queryParams, |
| 1171 uploadOptions: _uploadOptions, |
| 1172 uploadMedia: _uploadMedia, |
| 1173 downloadOptions: _downloadOptions); |
| 1174 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 1175 } |
| 1176 } |
643 | 1177 |
644 class FoldersLogsResourceApi { | 1178 class FoldersLogsResourceApi { |
645 final commons.ApiRequester _requester; | 1179 final commons.ApiRequester _requester; |
646 | 1180 |
647 FoldersLogsResourceApi(commons.ApiRequester client) : | 1181 FoldersLogsResourceApi(commons.ApiRequester client) : _requester = client; |
648 _requester = client; | 1182 |
649 | 1183 /// Deletes all the log entries in a log. The log reappears if it receives |
650 /** | 1184 /// new entries. Log entries written shortly before the delete operation |
651 * Deletes all the log entries in a log. The log reappears if it receives new | 1185 /// might not be deleted. |
652 * entries. Log entries written shortly before the delete operation might not | 1186 /// |
653 * be deleted. | 1187 /// Request parameters: |
654 * | 1188 /// |
655 * Request parameters: | 1189 /// [logName] - Required. The resource name of the log to delete: |
656 * | 1190 /// "projects/[PROJECT_ID]/logs/[LOG_ID]" |
657 * [logName] - Required. The resource name of the log to delete: | 1191 /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" |
658 * "projects/[PROJECT_ID]/logs/[LOG_ID]" | 1192 /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" |
659 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" | 1193 /// "folders/[FOLDER_ID]/logs/[LOG_ID]" |
660 * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" | 1194 /// [LOG_ID] must be URL-encoded. For example, |
661 * "folders/[FOLDER_ID]/logs/[LOG_ID]" | 1195 /// "projects/my-project-id/logs/syslog", |
662 * [LOG_ID] must be URL-encoded. For example, | 1196 /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factiv
ity". |
663 * "projects/my-project-id/logs/syslog", | 1197 /// For more information about log names, see LogEntry. |
664 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi
ty". | 1198 /// Value must have pattern "^folders/[^/]+/logs/[^/]+$". |
665 * For more information about log names, see LogEntry. | 1199 /// |
666 * Value must have pattern "^folders/[^/]+/logs/[^/]+$". | 1200 /// Completes with a [Empty]. |
667 * | 1201 /// |
668 * Completes with a [Empty]. | 1202 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
669 * | 1203 /// an error. |
670 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1204 /// |
671 * error. | 1205 /// If the used [http.Client] completes with an error when making a REST |
672 * | 1206 /// call, this method will complete with the same error. |
673 * If the used [http.Client] completes with an error when making a REST call, | |
674 * this method will complete with the same error. | |
675 */ | |
676 async.Future<Empty> delete(core.String logName) { | 1207 async.Future<Empty> delete(core.String logName) { |
677 var _url = null; | 1208 var _url = null; |
678 var _queryParams = new core.Map(); | 1209 var _queryParams = new core.Map(); |
679 var _uploadMedia = null; | 1210 var _uploadMedia = null; |
680 var _uploadOptions = null; | 1211 var _uploadOptions = null; |
681 var _downloadOptions = commons.DownloadOptions.Metadata; | 1212 var _downloadOptions = commons.DownloadOptions.Metadata; |
682 var _body = null; | 1213 var _body = null; |
683 | 1214 |
684 if (logName == null) { | 1215 if (logName == null) { |
685 throw new core.ArgumentError("Parameter logName is required."); | 1216 throw new core.ArgumentError("Parameter logName is required."); |
686 } | 1217 } |
687 | 1218 |
688 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$logName'); | 1219 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$logName'); |
689 | 1220 |
690 var _response = _requester.request(_url, | 1221 var _response = _requester.request(_url, "DELETE", |
691 "DELETE", | 1222 body: _body, |
692 body: _body, | 1223 queryParams: _queryParams, |
693 queryParams: _queryParams, | 1224 uploadOptions: _uploadOptions, |
694 uploadOptions: _uploadOptions, | 1225 uploadMedia: _uploadMedia, |
695 uploadMedia: _uploadMedia, | 1226 downloadOptions: _downloadOptions); |
696 downloadOptions: _downloadOptions); | |
697 return _response.then((data) => new Empty.fromJson(data)); | 1227 return _response.then((data) => new Empty.fromJson(data)); |
698 } | 1228 } |
699 | 1229 |
700 /** | 1230 /// Lists the logs in projects, organizations, folders, or billing accounts. |
701 * Lists the logs in projects, organizations, folders, or billing accounts. | 1231 /// Only logs that have entries are listed. |
702 * Only logs that have entries are listed. | 1232 /// |
703 * | 1233 /// Request parameters: |
704 * Request parameters: | 1234 /// |
705 * | 1235 /// [parent] - Required. The resource name that owns the logs: |
706 * [parent] - Required. The resource name that owns the logs: | 1236 /// "projects/[PROJECT_ID]" |
707 * "projects/[PROJECT_ID]" | 1237 /// "organizations/[ORGANIZATION_ID]" |
708 * "organizations/[ORGANIZATION_ID]" | 1238 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
709 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 1239 /// "folders/[FOLDER_ID]" |
710 * "folders/[FOLDER_ID]" | 1240 /// |
711 * | 1241 /// Value must have pattern "^folders/[^/]+$". |
712 * Value must have pattern "^folders/[^/]+$". | 1242 /// |
713 * | 1243 /// [pageToken] - Optional. If present, then retrieve the next batch of |
714 * [pageToken] - Optional. If present, then retrieve the next batch of results | 1244 /// results from the preceding call to this method. pageToken must be the |
715 * from the preceding call to this method. pageToken must be the value of | 1245 /// value of nextPageToken from the previous response. The values of other |
716 * nextPageToken from the previous response. The values of other method | 1246 /// method parameters should be identical to those in the previous call. |
717 * parameters should be identical to those in the previous call. | 1247 /// |
718 * | 1248 /// [pageSize] - Optional. The maximum number of results to return from this |
719 * [pageSize] - Optional. The maximum number of results to return from this | 1249 /// request. Non-positive values are ignored. The presence of nextPageToken |
720 * request. Non-positive values are ignored. The presence of nextPageToken in | 1250 /// in the response indicates that more results might be available. |
721 * the response indicates that more results might be available. | 1251 /// |
722 * | 1252 /// Completes with a [ListLogsResponse]. |
723 * Completes with a [ListLogsResponse]. | 1253 /// |
724 * | 1254 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
725 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1255 /// an error. |
726 * error. | 1256 /// |
727 * | 1257 /// If the used [http.Client] completes with an error when making a REST |
728 * If the used [http.Client] completes with an error when making a REST call, | 1258 /// call, this method will complete with the same error. |
729 * this method will complete with the same error. | 1259 async.Future<ListLogsResponse> list(core.String parent, |
730 */ | 1260 {core.String pageToken, core.int pageSize}) { |
731 async.Future<ListLogsResponse> list(core.String parent, {core.String pageToken
, core.int pageSize}) { | |
732 var _url = null; | 1261 var _url = null; |
733 var _queryParams = new core.Map(); | 1262 var _queryParams = new core.Map(); |
734 var _uploadMedia = null; | 1263 var _uploadMedia = null; |
735 var _uploadOptions = null; | 1264 var _uploadOptions = null; |
736 var _downloadOptions = commons.DownloadOptions.Metadata; | 1265 var _downloadOptions = commons.DownloadOptions.Metadata; |
737 var _body = null; | 1266 var _body = null; |
738 | 1267 |
739 if (parent == null) { | 1268 if (parent == null) { |
740 throw new core.ArgumentError("Parameter parent is required."); | 1269 throw new core.ArgumentError("Parameter parent is required."); |
741 } | 1270 } |
742 if (pageToken != null) { | 1271 if (pageToken != null) { |
743 _queryParams["pageToken"] = [pageToken]; | 1272 _queryParams["pageToken"] = [pageToken]; |
744 } | 1273 } |
745 if (pageSize != null) { | 1274 if (pageSize != null) { |
746 _queryParams["pageSize"] = ["${pageSize}"]; | 1275 _queryParams["pageSize"] = ["${pageSize}"]; |
747 } | 1276 } |
748 | 1277 |
749 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs'; | 1278 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs'; |
750 | 1279 |
751 var _response = _requester.request(_url, | 1280 var _response = _requester.request(_url, "GET", |
752 "GET", | 1281 body: _body, |
753 body: _body, | 1282 queryParams: _queryParams, |
754 queryParams: _queryParams, | 1283 uploadOptions: _uploadOptions, |
755 uploadOptions: _uploadOptions, | 1284 uploadMedia: _uploadMedia, |
756 uploadMedia: _uploadMedia, | 1285 downloadOptions: _downloadOptions); |
757 downloadOptions: _downloadOptions); | |
758 return _response.then((data) => new ListLogsResponse.fromJson(data)); | 1286 return _response.then((data) => new ListLogsResponse.fromJson(data)); |
759 } | 1287 } |
760 | |
761 } | 1288 } |
762 | 1289 |
763 | |
764 class FoldersSinksResourceApi { | 1290 class FoldersSinksResourceApi { |
765 final commons.ApiRequester _requester; | 1291 final commons.ApiRequester _requester; |
766 | 1292 |
767 FoldersSinksResourceApi(commons.ApiRequester client) : | 1293 FoldersSinksResourceApi(commons.ApiRequester client) : _requester = client; |
768 _requester = client; | |
769 | 1294 |
770 /** | 1295 /// Creates a sink that exports specified log entries to a destination. The |
771 * Creates a sink that exports specified log entries to a destination. The | 1296 /// export of newly-ingested log entries begins immediately, unless the |
772 * export of newly-ingested log entries begins immediately, unless the current | 1297 /// sink's writer_identity is not permitted to write to the destination. A |
773 * time is outside the sink's start and end times or the sink's | 1298 /// sink can export log entries only from the resource owning the sink. |
774 * writer_identity is not permitted to write to the destination. A sink can | 1299 /// |
775 * export log entries only from the resource owning the sink. | 1300 /// [request] - The metadata request object. |
776 * | 1301 /// |
777 * [request] - The metadata request object. | 1302 /// Request parameters: |
778 * | 1303 /// |
779 * Request parameters: | 1304 /// [parent] - Required. The resource in which to create the sink: |
780 * | 1305 /// "projects/[PROJECT_ID]" |
781 * [parent] - Required. The resource in which to create the sink: | 1306 /// "organizations/[ORGANIZATION_ID]" |
782 * "projects/[PROJECT_ID]" | 1307 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
783 * "organizations/[ORGANIZATION_ID]" | 1308 /// "folders/[FOLDER_ID]" |
784 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 1309 /// Examples: "projects/my-logging-project", "organizations/123456789". |
785 * "folders/[FOLDER_ID]" | 1310 /// Value must have pattern "^folders/[^/]+$". |
786 * Examples: "projects/my-logging-project", "organizations/123456789". | 1311 /// |
787 * Value must have pattern "^folders/[^/]+$". | 1312 /// [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity |
788 * | 1313 /// returned as writer_identity in the new sink. If this value is omitted or |
789 * [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity | 1314 /// set to false, and if the sink's parent is a project, then the value |
790 * returned as writer_identity in the new sink. If this value is omitted or | 1315 /// returned as writer_identity is the same group or service account used by |
791 * set to false, and if the sink's parent is a project, then the value | 1316 /// Stackdriver Logging before the addition of writer identities to this API. |
792 * returned as writer_identity is the same group or service account used by | 1317 /// The sink's destination must be in the same project as the sink itself.If |
793 * Stackdriver Logging before the addition of writer identities to this API. | 1318 /// this field is set to true, or if the sink is owned by a non-project |
794 * The sink's destination must be in the same project as the sink itself.If | 1319 /// resource such as an organization, then the value of writer_identity will |
795 * this field is set to true, or if the sink is owned by a non-project | 1320 /// be a unique service account used only for exports from the new sink. For |
796 * resource such as an organization, then the value of writer_identity will be | 1321 /// more information, see writer_identity in LogSink. |
797 * a unique service account used only for exports from the new sink. For more | 1322 /// |
798 * information, see writer_identity in LogSink. | 1323 /// Completes with a [LogSink]. |
799 * | 1324 /// |
800 * Completes with a [LogSink]. | 1325 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
801 * | 1326 /// an error. |
802 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1327 /// |
803 * error. | 1328 /// If the used [http.Client] completes with an error when making a REST |
804 * | 1329 /// call, this method will complete with the same error. |
805 * If the used [http.Client] completes with an error when making a REST call, | 1330 async.Future<LogSink> create(LogSink request, core.String parent, |
806 * this method will complete with the same error. | 1331 {core.bool uniqueWriterIdentity}) { |
807 */ | |
808 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u
niqueWriterIdentity}) { | |
809 var _url = null; | 1332 var _url = null; |
810 var _queryParams = new core.Map(); | 1333 var _queryParams = new core.Map(); |
811 var _uploadMedia = null; | 1334 var _uploadMedia = null; |
812 var _uploadOptions = null; | 1335 var _uploadOptions = null; |
813 var _downloadOptions = commons.DownloadOptions.Metadata; | 1336 var _downloadOptions = commons.DownloadOptions.Metadata; |
814 var _body = null; | 1337 var _body = null; |
815 | 1338 |
816 if (request != null) { | 1339 if (request != null) { |
817 _body = convert.JSON.encode((request).toJson()); | 1340 _body = convert.JSON.encode((request).toJson()); |
818 } | 1341 } |
819 if (parent == null) { | 1342 if (parent == null) { |
820 throw new core.ArgumentError("Parameter parent is required."); | 1343 throw new core.ArgumentError("Parameter parent is required."); |
821 } | 1344 } |
822 if (uniqueWriterIdentity != null) { | 1345 if (uniqueWriterIdentity != null) { |
823 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 1346 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
824 } | 1347 } |
825 | 1348 |
826 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; | 1349 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; |
827 | 1350 |
828 var _response = _requester.request(_url, | 1351 var _response = _requester.request(_url, "POST", |
829 "POST", | 1352 body: _body, |
830 body: _body, | 1353 queryParams: _queryParams, |
831 queryParams: _queryParams, | 1354 uploadOptions: _uploadOptions, |
832 uploadOptions: _uploadOptions, | 1355 uploadMedia: _uploadMedia, |
833 uploadMedia: _uploadMedia, | 1356 downloadOptions: _downloadOptions); |
834 downloadOptions: _downloadOptions); | |
835 return _response.then((data) => new LogSink.fromJson(data)); | 1357 return _response.then((data) => new LogSink.fromJson(data)); |
836 } | 1358 } |
837 | 1359 |
838 /** | 1360 /// Deletes a sink. If the sink has a unique writer_identity, then that |
839 * Deletes a sink. If the sink has a unique writer_identity, then that service | 1361 /// service account is also deleted. |
840 * account is also deleted. | 1362 /// |
841 * | 1363 /// Request parameters: |
842 * Request parameters: | 1364 /// |
843 * | 1365 /// [sinkName] - Required. The full resource name of the sink to delete, |
844 * [sinkName] - Required. The full resource name of the sink to delete, | 1366 /// including the parent resource and the sink identifier: |
845 * including the parent resource and the sink identifier: | 1367 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
846 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 1368 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
847 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 1369 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
848 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 1370 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
849 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 1371 /// Example: "projects/my-project-id/sinks/my-sink-id". |
850 * Example: "projects/my-project-id/sinks/my-sink-id". | 1372 /// Value must have pattern "^folders/[^/]+/sinks/[^/]+$". |
851 * Value must have pattern "^folders/[^/]+/sinks/[^/]+$". | 1373 /// |
852 * | 1374 /// Completes with a [Empty]. |
853 * Completes with a [Empty]. | 1375 /// |
854 * | 1376 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
855 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1377 /// an error. |
856 * error. | 1378 /// |
857 * | 1379 /// If the used [http.Client] completes with an error when making a REST |
858 * If the used [http.Client] completes with an error when making a REST call, | 1380 /// call, this method will complete with the same error. |
859 * this method will complete with the same error. | |
860 */ | |
861 async.Future<Empty> delete(core.String sinkName) { | 1381 async.Future<Empty> delete(core.String sinkName) { |
862 var _url = null; | 1382 var _url = null; |
863 var _queryParams = new core.Map(); | 1383 var _queryParams = new core.Map(); |
864 var _uploadMedia = null; | 1384 var _uploadMedia = null; |
865 var _uploadOptions = null; | 1385 var _uploadOptions = null; |
866 var _downloadOptions = commons.DownloadOptions.Metadata; | 1386 var _downloadOptions = commons.DownloadOptions.Metadata; |
867 var _body = null; | 1387 var _body = null; |
868 | 1388 |
869 if (sinkName == null) { | 1389 if (sinkName == null) { |
870 throw new core.ArgumentError("Parameter sinkName is required."); | 1390 throw new core.ArgumentError("Parameter sinkName is required."); |
871 } | 1391 } |
872 | 1392 |
873 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 1393 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
874 | 1394 |
875 var _response = _requester.request(_url, | 1395 var _response = _requester.request(_url, "DELETE", |
876 "DELETE", | 1396 body: _body, |
877 body: _body, | 1397 queryParams: _queryParams, |
878 queryParams: _queryParams, | 1398 uploadOptions: _uploadOptions, |
879 uploadOptions: _uploadOptions, | 1399 uploadMedia: _uploadMedia, |
880 uploadMedia: _uploadMedia, | 1400 downloadOptions: _downloadOptions); |
881 downloadOptions: _downloadOptions); | |
882 return _response.then((data) => new Empty.fromJson(data)); | 1401 return _response.then((data) => new Empty.fromJson(data)); |
883 } | 1402 } |
884 | 1403 |
885 /** | 1404 /// Gets a sink. |
886 * Gets a sink. | 1405 /// |
887 * | 1406 /// Request parameters: |
888 * Request parameters: | 1407 /// |
889 * | 1408 /// [sinkName] - Required. The resource name of the sink: |
890 * [sinkName] - Required. The resource name of the sink: | 1409 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
891 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 1410 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
892 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 1411 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
893 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 1412 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
894 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 1413 /// Example: "projects/my-project-id/sinks/my-sink-id". |
895 * Example: "projects/my-project-id/sinks/my-sink-id". | 1414 /// Value must have pattern "^folders/[^/]+/sinks/[^/]+$". |
896 * Value must have pattern "^folders/[^/]+/sinks/[^/]+$". | 1415 /// |
897 * | 1416 /// Completes with a [LogSink]. |
898 * Completes with a [LogSink]. | 1417 /// |
899 * | 1418 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
900 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1419 /// an error. |
901 * error. | 1420 /// |
902 * | 1421 /// If the used [http.Client] completes with an error when making a REST |
903 * If the used [http.Client] completes with an error when making a REST call, | 1422 /// call, this method will complete with the same error. |
904 * this method will complete with the same error. | |
905 */ | |
906 async.Future<LogSink> get(core.String sinkName) { | 1423 async.Future<LogSink> get(core.String sinkName) { |
907 var _url = null; | 1424 var _url = null; |
908 var _queryParams = new core.Map(); | 1425 var _queryParams = new core.Map(); |
909 var _uploadMedia = null; | 1426 var _uploadMedia = null; |
910 var _uploadOptions = null; | 1427 var _uploadOptions = null; |
911 var _downloadOptions = commons.DownloadOptions.Metadata; | 1428 var _downloadOptions = commons.DownloadOptions.Metadata; |
912 var _body = null; | 1429 var _body = null; |
913 | 1430 |
914 if (sinkName == null) { | 1431 if (sinkName == null) { |
915 throw new core.ArgumentError("Parameter sinkName is required."); | 1432 throw new core.ArgumentError("Parameter sinkName is required."); |
916 } | 1433 } |
917 | 1434 |
918 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 1435 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
919 | 1436 |
920 var _response = _requester.request(_url, | 1437 var _response = _requester.request(_url, "GET", |
921 "GET", | 1438 body: _body, |
922 body: _body, | 1439 queryParams: _queryParams, |
923 queryParams: _queryParams, | 1440 uploadOptions: _uploadOptions, |
924 uploadOptions: _uploadOptions, | 1441 uploadMedia: _uploadMedia, |
925 uploadMedia: _uploadMedia, | 1442 downloadOptions: _downloadOptions); |
926 downloadOptions: _downloadOptions); | |
927 return _response.then((data) => new LogSink.fromJson(data)); | 1443 return _response.then((data) => new LogSink.fromJson(data)); |
928 } | 1444 } |
929 | 1445 |
930 /** | 1446 /// Lists sinks. |
931 * Lists sinks. | 1447 /// |
932 * | 1448 /// Request parameters: |
933 * Request parameters: | 1449 /// |
934 * | 1450 /// [parent] - Required. The parent resource whose sinks are to be listed: |
935 * [parent] - Required. The parent resource whose sinks are to be listed: | 1451 /// "projects/[PROJECT_ID]" |
936 * "projects/[PROJECT_ID]" | 1452 /// "organizations/[ORGANIZATION_ID]" |
937 * "organizations/[ORGANIZATION_ID]" | 1453 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
938 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 1454 /// "folders/[FOLDER_ID]" |
939 * "folders/[FOLDER_ID]" | 1455 /// |
940 * | 1456 /// Value must have pattern "^folders/[^/]+$". |
941 * Value must have pattern "^folders/[^/]+$". | 1457 /// |
942 * | 1458 /// [pageToken] - Optional. If present, then retrieve the next batch of |
943 * [pageToken] - Optional. If present, then retrieve the next batch of results | 1459 /// results from the preceding call to this method. pageToken must be the |
944 * from the preceding call to this method. pageToken must be the value of | 1460 /// value of nextPageToken from the previous response. The values of other |
945 * nextPageToken from the previous response. The values of other method | 1461 /// method parameters should be identical to those in the previous call. |
946 * parameters should be identical to those in the previous call. | 1462 /// |
947 * | 1463 /// [pageSize] - Optional. The maximum number of results to return from this |
948 * [pageSize] - Optional. The maximum number of results to return from this | 1464 /// request. Non-positive values are ignored. The presence of nextPageToken |
949 * request. Non-positive values are ignored. The presence of nextPageToken in | 1465 /// in the response indicates that more results might be available. |
950 * the response indicates that more results might be available. | 1466 /// |
951 * | 1467 /// Completes with a [ListSinksResponse]. |
952 * Completes with a [ListSinksResponse]. | 1468 /// |
953 * | 1469 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
954 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1470 /// an error. |
955 * error. | 1471 /// |
956 * | 1472 /// If the used [http.Client] completes with an error when making a REST |
957 * If the used [http.Client] completes with an error when making a REST call, | 1473 /// call, this method will complete with the same error. |
958 * this method will complete with the same error. | 1474 async.Future<ListSinksResponse> list(core.String parent, |
959 */ | 1475 {core.String pageToken, core.int pageSize}) { |
960 async.Future<ListSinksResponse> list(core.String parent, {core.String pageToke
n, core.int pageSize}) { | |
961 var _url = null; | 1476 var _url = null; |
962 var _queryParams = new core.Map(); | 1477 var _queryParams = new core.Map(); |
963 var _uploadMedia = null; | 1478 var _uploadMedia = null; |
964 var _uploadOptions = null; | 1479 var _uploadOptions = null; |
965 var _downloadOptions = commons.DownloadOptions.Metadata; | 1480 var _downloadOptions = commons.DownloadOptions.Metadata; |
966 var _body = null; | 1481 var _body = null; |
967 | 1482 |
968 if (parent == null) { | 1483 if (parent == null) { |
969 throw new core.ArgumentError("Parameter parent is required."); | 1484 throw new core.ArgumentError("Parameter parent is required."); |
970 } | 1485 } |
971 if (pageToken != null) { | 1486 if (pageToken != null) { |
972 _queryParams["pageToken"] = [pageToken]; | 1487 _queryParams["pageToken"] = [pageToken]; |
973 } | 1488 } |
974 if (pageSize != null) { | 1489 if (pageSize != null) { |
975 _queryParams["pageSize"] = ["${pageSize}"]; | 1490 _queryParams["pageSize"] = ["${pageSize}"]; |
976 } | 1491 } |
977 | 1492 |
978 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; | 1493 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; |
979 | 1494 |
980 var _response = _requester.request(_url, | 1495 var _response = _requester.request(_url, "GET", |
981 "GET", | 1496 body: _body, |
982 body: _body, | 1497 queryParams: _queryParams, |
983 queryParams: _queryParams, | 1498 uploadOptions: _uploadOptions, |
984 uploadOptions: _uploadOptions, | 1499 uploadMedia: _uploadMedia, |
985 uploadMedia: _uploadMedia, | 1500 downloadOptions: _downloadOptions); |
986 downloadOptions: _downloadOptions); | |
987 return _response.then((data) => new ListSinksResponse.fromJson(data)); | 1501 return _response.then((data) => new ListSinksResponse.fromJson(data)); |
988 } | 1502 } |
989 | 1503 |
990 /** | 1504 /// Updates a sink. This method replaces the following fields in the existing |
991 * Updates a sink. This method replaces the following fields in the existing | 1505 /// sink with values from the new sink: destination, and filter. The updated |
992 * sink with values from the new sink: destination, filter, | 1506 /// sink might also have a new writer_identity; see the |
993 * output_version_format, start_time, and end_time. The updated sink might | 1507 /// unique_writer_identity field. |
994 * also have a new writer_identity; see the unique_writer_identity field. | 1508 /// |
995 * | 1509 /// [request] - The metadata request object. |
996 * [request] - The metadata request object. | 1510 /// |
997 * | 1511 /// Request parameters: |
998 * Request parameters: | 1512 /// |
999 * | 1513 /// [sinkName] - Required. The full resource name of the sink to update, |
1000 * [sinkName] - Required. The full resource name of the sink to update, | 1514 /// including the parent resource and the sink identifier: |
1001 * including the parent resource and the sink identifier: | 1515 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
1002 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 1516 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
1003 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 1517 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
1004 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 1518 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
1005 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 1519 /// Example: "projects/my-project-id/sinks/my-sink-id". |
1006 * Example: "projects/my-project-id/sinks/my-sink-id". | 1520 /// Value must have pattern "^folders/[^/]+/sinks/[^/]+$". |
1007 * Value must have pattern "^folders/[^/]+/sinks/[^/]+$". | 1521 /// |
1008 * | 1522 /// [updateMask] - Optional. Field mask that specifies the fields in sink |
1009 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of | 1523 /// that need an update. A sink field will be overwritten if, and only if, it |
1010 * this field. When updating a sink, the effect of this field on the value of | 1524 /// is in the update mask. name and output only fields cannot be updated.An |
1011 * writer_identity in the updated sink depends on both the old and new values | 1525 /// empty updateMask is temporarily treated as using the following mask for |
1012 * of this field: | 1526 /// backwards compatibility purposes: destination,filter,includeChildren At |
1013 * If the old and new values of this field are both false or both true, then | 1527 /// some point in the future, behavior will be removed and specifying an |
1014 * there is no change to the sink's writer_identity. | 1528 /// empty updateMask will be an error.For a detailed FieldMask definition, |
1015 * If the old value is false and the new value is true, then writer_identity | 1529 /// see |
1016 * is changed to a unique service account. | 1530 /// https://developers.google.com/protocol-buffers/docs/reference/google.proto
buf#fieldmaskExample: |
1017 * It is an error if the old value is true and the new value is set to false | 1531 /// updateMask=filter. |
1018 * or defaulted to false. | 1532 /// |
1019 * | 1533 /// [uniqueWriterIdentity] - Optional. See sinks.create for a description of |
1020 * Completes with a [LogSink]. | 1534 /// this field. When updating a sink, the effect of this field on the value |
1021 * | 1535 /// of writer_identity in the updated sink depends on both the old and new |
1022 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1536 /// values of this field: |
1023 * error. | 1537 /// If the old and new values of this field are both false or both true, then |
1024 * | 1538 /// there is no change to the sink's writer_identity. |
1025 * If the used [http.Client] completes with an error when making a REST call, | 1539 /// If the old value is false and the new value is true, then writer_identity |
1026 * this method will complete with the same error. | 1540 /// is changed to a unique service account. |
1027 */ | 1541 /// It is an error if the old value is true and the new value is set to false |
1028 async.Future<LogSink> patch(LogSink request, core.String sinkName, {core.bool
uniqueWriterIdentity}) { | 1542 /// or defaulted to false. |
| 1543 /// |
| 1544 /// Completes with a [LogSink]. |
| 1545 /// |
| 1546 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1547 /// an error. |
| 1548 /// |
| 1549 /// If the used [http.Client] completes with an error when making a REST |
| 1550 /// call, this method will complete with the same error. |
| 1551 async.Future<LogSink> patch(LogSink request, core.String sinkName, |
| 1552 {core.String updateMask, core.bool uniqueWriterIdentity}) { |
1029 var _url = null; | 1553 var _url = null; |
1030 var _queryParams = new core.Map(); | 1554 var _queryParams = new core.Map(); |
1031 var _uploadMedia = null; | 1555 var _uploadMedia = null; |
1032 var _uploadOptions = null; | 1556 var _uploadOptions = null; |
1033 var _downloadOptions = commons.DownloadOptions.Metadata; | 1557 var _downloadOptions = commons.DownloadOptions.Metadata; |
1034 var _body = null; | 1558 var _body = null; |
1035 | 1559 |
1036 if (request != null) { | 1560 if (request != null) { |
1037 _body = convert.JSON.encode((request).toJson()); | 1561 _body = convert.JSON.encode((request).toJson()); |
1038 } | 1562 } |
1039 if (sinkName == null) { | 1563 if (sinkName == null) { |
1040 throw new core.ArgumentError("Parameter sinkName is required."); | 1564 throw new core.ArgumentError("Parameter sinkName is required."); |
1041 } | 1565 } |
| 1566 if (updateMask != null) { |
| 1567 _queryParams["updateMask"] = [updateMask]; |
| 1568 } |
1042 if (uniqueWriterIdentity != null) { | 1569 if (uniqueWriterIdentity != null) { |
1043 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 1570 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
1044 } | 1571 } |
1045 | 1572 |
1046 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 1573 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
1047 | 1574 |
1048 var _response = _requester.request(_url, | 1575 var _response = _requester.request(_url, "PATCH", |
1049 "PATCH", | 1576 body: _body, |
1050 body: _body, | 1577 queryParams: _queryParams, |
1051 queryParams: _queryParams, | 1578 uploadOptions: _uploadOptions, |
1052 uploadOptions: _uploadOptions, | 1579 uploadMedia: _uploadMedia, |
1053 uploadMedia: _uploadMedia, | 1580 downloadOptions: _downloadOptions); |
1054 downloadOptions: _downloadOptions); | |
1055 return _response.then((data) => new LogSink.fromJson(data)); | 1581 return _response.then((data) => new LogSink.fromJson(data)); |
1056 } | 1582 } |
1057 | 1583 |
1058 /** | 1584 /// Updates a sink. This method replaces the following fields in the existing |
1059 * Updates a sink. This method replaces the following fields in the existing | 1585 /// sink with values from the new sink: destination, and filter. The updated |
1060 * sink with values from the new sink: destination, filter, | 1586 /// sink might also have a new writer_identity; see the |
1061 * output_version_format, start_time, and end_time. The updated sink might | 1587 /// unique_writer_identity field. |
1062 * also have a new writer_identity; see the unique_writer_identity field. | 1588 /// |
1063 * | 1589 /// [request] - The metadata request object. |
1064 * [request] - The metadata request object. | 1590 /// |
1065 * | 1591 /// Request parameters: |
1066 * Request parameters: | 1592 /// |
1067 * | 1593 /// [sinkName] - Required. The full resource name of the sink to update, |
1068 * [sinkName] - Required. The full resource name of the sink to update, | 1594 /// including the parent resource and the sink identifier: |
1069 * including the parent resource and the sink identifier: | 1595 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
1070 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 1596 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
1071 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 1597 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
1072 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 1598 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
1073 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 1599 /// Example: "projects/my-project-id/sinks/my-sink-id". |
1074 * Example: "projects/my-project-id/sinks/my-sink-id". | 1600 /// Value must have pattern "^folders/[^/]+/sinks/[^/]+$". |
1075 * Value must have pattern "^folders/[^/]+/sinks/[^/]+$". | 1601 /// |
1076 * | 1602 /// [updateMask] - Optional. Field mask that specifies the fields in sink |
1077 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of | 1603 /// that need an update. A sink field will be overwritten if, and only if, it |
1078 * this field. When updating a sink, the effect of this field on the value of | 1604 /// is in the update mask. name and output only fields cannot be updated.An |
1079 * writer_identity in the updated sink depends on both the old and new values | 1605 /// empty updateMask is temporarily treated as using the following mask for |
1080 * of this field: | 1606 /// backwards compatibility purposes: destination,filter,includeChildren At |
1081 * If the old and new values of this field are both false or both true, then | 1607 /// some point in the future, behavior will be removed and specifying an |
1082 * there is no change to the sink's writer_identity. | 1608 /// empty updateMask will be an error.For a detailed FieldMask definition, |
1083 * If the old value is false and the new value is true, then writer_identity | 1609 /// see |
1084 * is changed to a unique service account. | 1610 /// https://developers.google.com/protocol-buffers/docs/reference/google.proto
buf#fieldmaskExample: |
1085 * It is an error if the old value is true and the new value is set to false | 1611 /// updateMask=filter. |
1086 * or defaulted to false. | 1612 /// |
1087 * | 1613 /// [uniqueWriterIdentity] - Optional. See sinks.create for a description of |
1088 * Completes with a [LogSink]. | 1614 /// this field. When updating a sink, the effect of this field on the value |
1089 * | 1615 /// of writer_identity in the updated sink depends on both the old and new |
1090 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1616 /// values of this field: |
1091 * error. | 1617 /// If the old and new values of this field are both false or both true, then |
1092 * | 1618 /// there is no change to the sink's writer_identity. |
1093 * If the used [http.Client] completes with an error when making a REST call, | 1619 /// If the old value is false and the new value is true, then writer_identity |
1094 * this method will complete with the same error. | 1620 /// is changed to a unique service account. |
1095 */ | 1621 /// It is an error if the old value is true and the new value is set to false |
1096 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool
uniqueWriterIdentity}) { | 1622 /// or defaulted to false. |
| 1623 /// |
| 1624 /// Completes with a [LogSink]. |
| 1625 /// |
| 1626 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1627 /// an error. |
| 1628 /// |
| 1629 /// If the used [http.Client] completes with an error when making a REST |
| 1630 /// call, this method will complete with the same error. |
| 1631 async.Future<LogSink> update(LogSink request, core.String sinkName, |
| 1632 {core.String updateMask, core.bool uniqueWriterIdentity}) { |
1097 var _url = null; | 1633 var _url = null; |
1098 var _queryParams = new core.Map(); | 1634 var _queryParams = new core.Map(); |
1099 var _uploadMedia = null; | 1635 var _uploadMedia = null; |
1100 var _uploadOptions = null; | 1636 var _uploadOptions = null; |
1101 var _downloadOptions = commons.DownloadOptions.Metadata; | 1637 var _downloadOptions = commons.DownloadOptions.Metadata; |
1102 var _body = null; | 1638 var _body = null; |
1103 | 1639 |
1104 if (request != null) { | 1640 if (request != null) { |
1105 _body = convert.JSON.encode((request).toJson()); | 1641 _body = convert.JSON.encode((request).toJson()); |
1106 } | 1642 } |
1107 if (sinkName == null) { | 1643 if (sinkName == null) { |
1108 throw new core.ArgumentError("Parameter sinkName is required."); | 1644 throw new core.ArgumentError("Parameter sinkName is required."); |
1109 } | 1645 } |
| 1646 if (updateMask != null) { |
| 1647 _queryParams["updateMask"] = [updateMask]; |
| 1648 } |
1110 if (uniqueWriterIdentity != null) { | 1649 if (uniqueWriterIdentity != null) { |
1111 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 1650 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
1112 } | 1651 } |
1113 | 1652 |
1114 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 1653 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
1115 | 1654 |
1116 var _response = _requester.request(_url, | 1655 var _response = _requester.request(_url, "PUT", |
1117 "PUT", | 1656 body: _body, |
1118 body: _body, | 1657 queryParams: _queryParams, |
1119 queryParams: _queryParams, | 1658 uploadOptions: _uploadOptions, |
1120 uploadOptions: _uploadOptions, | 1659 uploadMedia: _uploadMedia, |
1121 uploadMedia: _uploadMedia, | 1660 downloadOptions: _downloadOptions); |
1122 downloadOptions: _downloadOptions); | |
1123 return _response.then((data) => new LogSink.fromJson(data)); | 1661 return _response.then((data) => new LogSink.fromJson(data)); |
1124 } | 1662 } |
1125 | |
1126 } | 1663 } |
1127 | 1664 |
1128 | |
1129 class MonitoredResourceDescriptorsResourceApi { | 1665 class MonitoredResourceDescriptorsResourceApi { |
1130 final commons.ApiRequester _requester; | 1666 final commons.ApiRequester _requester; |
1131 | 1667 |
1132 MonitoredResourceDescriptorsResourceApi(commons.ApiRequester client) : | 1668 MonitoredResourceDescriptorsResourceApi(commons.ApiRequester client) |
1133 _requester = client; | 1669 : _requester = client; |
1134 | 1670 |
1135 /** | 1671 /// Lists the descriptors for monitored resource types used by Stackdriver |
1136 * Lists the descriptors for monitored resource types used by Stackdriver | 1672 /// Logging. |
1137 * Logging. | 1673 /// |
1138 * | 1674 /// Request parameters: |
1139 * Request parameters: | 1675 /// |
1140 * | 1676 /// [pageToken] - Optional. If present, then retrieve the next batch of |
1141 * [pageToken] - Optional. If present, then retrieve the next batch of results | 1677 /// results from the preceding call to this method. pageToken must be the |
1142 * from the preceding call to this method. pageToken must be the value of | 1678 /// value of nextPageToken from the previous response. The values of other |
1143 * nextPageToken from the previous response. The values of other method | 1679 /// method parameters should be identical to those in the previous call. |
1144 * parameters should be identical to those in the previous call. | 1680 /// |
1145 * | 1681 /// [pageSize] - Optional. The maximum number of results to return from this |
1146 * [pageSize] - Optional. The maximum number of results to return from this | 1682 /// request. Non-positive values are ignored. The presence of nextPageToken |
1147 * request. Non-positive values are ignored. The presence of nextPageToken in | 1683 /// in the response indicates that more results might be available. |
1148 * the response indicates that more results might be available. | 1684 /// |
1149 * | 1685 /// Completes with a [ListMonitoredResourceDescriptorsResponse]. |
1150 * Completes with a [ListMonitoredResourceDescriptorsResponse]. | 1686 /// |
1151 * | 1687 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1152 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1688 /// an error. |
1153 * error. | 1689 /// |
1154 * | 1690 /// If the used [http.Client] completes with an error when making a REST |
1155 * If the used [http.Client] completes with an error when making a REST call, | 1691 /// call, this method will complete with the same error. |
1156 * this method will complete with the same error. | 1692 async.Future<ListMonitoredResourceDescriptorsResponse> list( |
1157 */ | 1693 {core.String pageToken, core.int pageSize}) { |
1158 async.Future<ListMonitoredResourceDescriptorsResponse> list({core.String pageT
oken, core.int pageSize}) { | |
1159 var _url = null; | 1694 var _url = null; |
1160 var _queryParams = new core.Map(); | 1695 var _queryParams = new core.Map(); |
1161 var _uploadMedia = null; | 1696 var _uploadMedia = null; |
1162 var _uploadOptions = null; | 1697 var _uploadOptions = null; |
1163 var _downloadOptions = commons.DownloadOptions.Metadata; | 1698 var _downloadOptions = commons.DownloadOptions.Metadata; |
1164 var _body = null; | 1699 var _body = null; |
1165 | 1700 |
1166 if (pageToken != null) { | 1701 if (pageToken != null) { |
1167 _queryParams["pageToken"] = [pageToken]; | 1702 _queryParams["pageToken"] = [pageToken]; |
1168 } | 1703 } |
1169 if (pageSize != null) { | 1704 if (pageSize != null) { |
1170 _queryParams["pageSize"] = ["${pageSize}"]; | 1705 _queryParams["pageSize"] = ["${pageSize}"]; |
1171 } | 1706 } |
1172 | 1707 |
1173 _url = 'v2/monitoredResourceDescriptors'; | 1708 _url = 'v2/monitoredResourceDescriptors'; |
1174 | 1709 |
1175 var _response = _requester.request(_url, | 1710 var _response = _requester.request(_url, "GET", |
1176 "GET", | 1711 body: _body, |
1177 body: _body, | 1712 queryParams: _queryParams, |
1178 queryParams: _queryParams, | 1713 uploadOptions: _uploadOptions, |
1179 uploadOptions: _uploadOptions, | 1714 uploadMedia: _uploadMedia, |
1180 uploadMedia: _uploadMedia, | 1715 downloadOptions: _downloadOptions); |
1181 downloadOptions: _downloadOptions); | 1716 return _response.then( |
1182 return _response.then((data) => new ListMonitoredResourceDescriptorsResponse
.fromJson(data)); | 1717 (data) => new ListMonitoredResourceDescriptorsResponse.fromJson(data)); |
1183 } | 1718 } |
1184 | |
1185 } | 1719 } |
1186 | 1720 |
1187 | |
1188 class OrganizationsResourceApi { | 1721 class OrganizationsResourceApi { |
1189 final commons.ApiRequester _requester; | 1722 final commons.ApiRequester _requester; |
1190 | 1723 |
1191 OrganizationsLogsResourceApi get logs => new OrganizationsLogsResourceApi(_req
uester); | 1724 OrganizationsExclusionsResourceApi get exclusions => |
1192 OrganizationsSinksResourceApi get sinks => new OrganizationsSinksResourceApi(_
requester); | 1725 new OrganizationsExclusionsResourceApi(_requester); |
1193 | 1726 OrganizationsLogsResourceApi get logs => |
1194 OrganizationsResourceApi(commons.ApiRequester client) : | 1727 new OrganizationsLogsResourceApi(_requester); |
1195 _requester = client; | 1728 OrganizationsSinksResourceApi get sinks => |
| 1729 new OrganizationsSinksResourceApi(_requester); |
| 1730 |
| 1731 OrganizationsResourceApi(commons.ApiRequester client) : _requester = client; |
1196 } | 1732 } |
1197 | 1733 |
| 1734 class OrganizationsExclusionsResourceApi { |
| 1735 final commons.ApiRequester _requester; |
| 1736 |
| 1737 OrganizationsExclusionsResourceApi(commons.ApiRequester client) |
| 1738 : _requester = client; |
| 1739 |
| 1740 /// Creates a new exclusion in a specified parent resource. Only log entries |
| 1741 /// belonging to that resource can be excluded. You can have up to 10 |
| 1742 /// exclusions in a resource. |
| 1743 /// |
| 1744 /// [request] - The metadata request object. |
| 1745 /// |
| 1746 /// Request parameters: |
| 1747 /// |
| 1748 /// [parent] - Required. The parent resource in which to create the |
| 1749 /// exclusion: |
| 1750 /// "projects/[PROJECT_ID]" |
| 1751 /// "organizations/[ORGANIZATION_ID]" |
| 1752 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
| 1753 /// "folders/[FOLDER_ID]" |
| 1754 /// Examples: "projects/my-logging-project", "organizations/123456789". |
| 1755 /// Value must have pattern "^organizations/[^/]+$". |
| 1756 /// |
| 1757 /// Completes with a [LogExclusion]. |
| 1758 /// |
| 1759 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1760 /// an error. |
| 1761 /// |
| 1762 /// If the used [http.Client] completes with an error when making a REST |
| 1763 /// call, this method will complete with the same error. |
| 1764 async.Future<LogExclusion> create(LogExclusion request, core.String parent) { |
| 1765 var _url = null; |
| 1766 var _queryParams = new core.Map(); |
| 1767 var _uploadMedia = null; |
| 1768 var _uploadOptions = null; |
| 1769 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1770 var _body = null; |
| 1771 |
| 1772 if (request != null) { |
| 1773 _body = convert.JSON.encode((request).toJson()); |
| 1774 } |
| 1775 if (parent == null) { |
| 1776 throw new core.ArgumentError("Parameter parent is required."); |
| 1777 } |
| 1778 |
| 1779 _url = 'v2/' + |
| 1780 commons.Escaper.ecapeVariableReserved('$parent') + |
| 1781 '/exclusions'; |
| 1782 |
| 1783 var _response = _requester.request(_url, "POST", |
| 1784 body: _body, |
| 1785 queryParams: _queryParams, |
| 1786 uploadOptions: _uploadOptions, |
| 1787 uploadMedia: _uploadMedia, |
| 1788 downloadOptions: _downloadOptions); |
| 1789 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 1790 } |
| 1791 |
| 1792 /// Deletes an exclusion. |
| 1793 /// |
| 1794 /// Request parameters: |
| 1795 /// |
| 1796 /// [name] - Required. The resource name of an existing exclusion to delete: |
| 1797 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 1798 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 1799 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 1800 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 1801 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 1802 /// Value must have pattern "^organizations/[^/]+/exclusions/[^/]+$". |
| 1803 /// |
| 1804 /// Completes with a [Empty]. |
| 1805 /// |
| 1806 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1807 /// an error. |
| 1808 /// |
| 1809 /// If the used [http.Client] completes with an error when making a REST |
| 1810 /// call, this method will complete with the same error. |
| 1811 async.Future<Empty> delete(core.String name) { |
| 1812 var _url = null; |
| 1813 var _queryParams = new core.Map(); |
| 1814 var _uploadMedia = null; |
| 1815 var _uploadOptions = null; |
| 1816 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1817 var _body = null; |
| 1818 |
| 1819 if (name == null) { |
| 1820 throw new core.ArgumentError("Parameter name is required."); |
| 1821 } |
| 1822 |
| 1823 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 1824 |
| 1825 var _response = _requester.request(_url, "DELETE", |
| 1826 body: _body, |
| 1827 queryParams: _queryParams, |
| 1828 uploadOptions: _uploadOptions, |
| 1829 uploadMedia: _uploadMedia, |
| 1830 downloadOptions: _downloadOptions); |
| 1831 return _response.then((data) => new Empty.fromJson(data)); |
| 1832 } |
| 1833 |
| 1834 /// Gets the description of an exclusion. |
| 1835 /// |
| 1836 /// Request parameters: |
| 1837 /// |
| 1838 /// [name] - Required. The resource name of an existing exclusion: |
| 1839 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 1840 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 1841 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 1842 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 1843 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 1844 /// Value must have pattern "^organizations/[^/]+/exclusions/[^/]+$". |
| 1845 /// |
| 1846 /// Completes with a [LogExclusion]. |
| 1847 /// |
| 1848 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1849 /// an error. |
| 1850 /// |
| 1851 /// If the used [http.Client] completes with an error when making a REST |
| 1852 /// call, this method will complete with the same error. |
| 1853 async.Future<LogExclusion> get(core.String name) { |
| 1854 var _url = null; |
| 1855 var _queryParams = new core.Map(); |
| 1856 var _uploadMedia = null; |
| 1857 var _uploadOptions = null; |
| 1858 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1859 var _body = null; |
| 1860 |
| 1861 if (name == null) { |
| 1862 throw new core.ArgumentError("Parameter name is required."); |
| 1863 } |
| 1864 |
| 1865 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 1866 |
| 1867 var _response = _requester.request(_url, "GET", |
| 1868 body: _body, |
| 1869 queryParams: _queryParams, |
| 1870 uploadOptions: _uploadOptions, |
| 1871 uploadMedia: _uploadMedia, |
| 1872 downloadOptions: _downloadOptions); |
| 1873 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 1874 } |
| 1875 |
| 1876 /// Lists all the exclusions in a parent resource. |
| 1877 /// |
| 1878 /// Request parameters: |
| 1879 /// |
| 1880 /// [parent] - Required. The parent resource whose exclusions are to be |
| 1881 /// listed. |
| 1882 /// "projects/[PROJECT_ID]" |
| 1883 /// "organizations/[ORGANIZATION_ID]" |
| 1884 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
| 1885 /// "folders/[FOLDER_ID]" |
| 1886 /// |
| 1887 /// Value must have pattern "^organizations/[^/]+$". |
| 1888 /// |
| 1889 /// [pageToken] - Optional. If present, then retrieve the next batch of |
| 1890 /// results from the preceding call to this method. pageToken must be the |
| 1891 /// value of nextPageToken from the previous response. The values of other |
| 1892 /// method parameters should be identical to those in the previous call. |
| 1893 /// |
| 1894 /// [pageSize] - Optional. The maximum number of results to return from this |
| 1895 /// request. Non-positive values are ignored. The presence of nextPageToken |
| 1896 /// in the response indicates that more results might be available. |
| 1897 /// |
| 1898 /// Completes with a [ListExclusionsResponse]. |
| 1899 /// |
| 1900 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1901 /// an error. |
| 1902 /// |
| 1903 /// If the used [http.Client] completes with an error when making a REST |
| 1904 /// call, this method will complete with the same error. |
| 1905 async.Future<ListExclusionsResponse> list(core.String parent, |
| 1906 {core.String pageToken, core.int pageSize}) { |
| 1907 var _url = null; |
| 1908 var _queryParams = new core.Map(); |
| 1909 var _uploadMedia = null; |
| 1910 var _uploadOptions = null; |
| 1911 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1912 var _body = null; |
| 1913 |
| 1914 if (parent == null) { |
| 1915 throw new core.ArgumentError("Parameter parent is required."); |
| 1916 } |
| 1917 if (pageToken != null) { |
| 1918 _queryParams["pageToken"] = [pageToken]; |
| 1919 } |
| 1920 if (pageSize != null) { |
| 1921 _queryParams["pageSize"] = ["${pageSize}"]; |
| 1922 } |
| 1923 |
| 1924 _url = 'v2/' + |
| 1925 commons.Escaper.ecapeVariableReserved('$parent') + |
| 1926 '/exclusions'; |
| 1927 |
| 1928 var _response = _requester.request(_url, "GET", |
| 1929 body: _body, |
| 1930 queryParams: _queryParams, |
| 1931 uploadOptions: _uploadOptions, |
| 1932 uploadMedia: _uploadMedia, |
| 1933 downloadOptions: _downloadOptions); |
| 1934 return _response.then((data) => new ListExclusionsResponse.fromJson(data)); |
| 1935 } |
| 1936 |
| 1937 /// Changes one or more properties of an existing exclusion. |
| 1938 /// |
| 1939 /// [request] - The metadata request object. |
| 1940 /// |
| 1941 /// Request parameters: |
| 1942 /// |
| 1943 /// [name] - Required. The resource name of the exclusion to update: |
| 1944 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 1945 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 1946 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 1947 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 1948 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 1949 /// Value must have pattern "^organizations/[^/]+/exclusions/[^/]+$". |
| 1950 /// |
| 1951 /// [updateMask] - Required. A nonempty list of fields to change in the |
| 1952 /// existing exclusion. New values for the fields are taken from the |
| 1953 /// corresponding fields in the LogExclusion included in this request. Fields |
| 1954 /// not mentioned in update_mask are not changed and are ignored in the |
| 1955 /// request.For example, to change the filter and description of an |
| 1956 /// exclusion, specify an update_mask of "filter,description". |
| 1957 /// |
| 1958 /// Completes with a [LogExclusion]. |
| 1959 /// |
| 1960 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1961 /// an error. |
| 1962 /// |
| 1963 /// If the used [http.Client] completes with an error when making a REST |
| 1964 /// call, this method will complete with the same error. |
| 1965 async.Future<LogExclusion> patch(LogExclusion request, core.String name, |
| 1966 {core.String updateMask}) { |
| 1967 var _url = null; |
| 1968 var _queryParams = new core.Map(); |
| 1969 var _uploadMedia = null; |
| 1970 var _uploadOptions = null; |
| 1971 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1972 var _body = null; |
| 1973 |
| 1974 if (request != null) { |
| 1975 _body = convert.JSON.encode((request).toJson()); |
| 1976 } |
| 1977 if (name == null) { |
| 1978 throw new core.ArgumentError("Parameter name is required."); |
| 1979 } |
| 1980 if (updateMask != null) { |
| 1981 _queryParams["updateMask"] = [updateMask]; |
| 1982 } |
| 1983 |
| 1984 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 1985 |
| 1986 var _response = _requester.request(_url, "PATCH", |
| 1987 body: _body, |
| 1988 queryParams: _queryParams, |
| 1989 uploadOptions: _uploadOptions, |
| 1990 uploadMedia: _uploadMedia, |
| 1991 downloadOptions: _downloadOptions); |
| 1992 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 1993 } |
| 1994 } |
1198 | 1995 |
1199 class OrganizationsLogsResourceApi { | 1996 class OrganizationsLogsResourceApi { |
1200 final commons.ApiRequester _requester; | 1997 final commons.ApiRequester _requester; |
1201 | 1998 |
1202 OrganizationsLogsResourceApi(commons.ApiRequester client) : | 1999 OrganizationsLogsResourceApi(commons.ApiRequester client) |
1203 _requester = client; | 2000 : _requester = client; |
1204 | 2001 |
1205 /** | 2002 /// Deletes all the log entries in a log. The log reappears if it receives |
1206 * Deletes all the log entries in a log. The log reappears if it receives new | 2003 /// new entries. Log entries written shortly before the delete operation |
1207 * entries. Log entries written shortly before the delete operation might not | 2004 /// might not be deleted. |
1208 * be deleted. | 2005 /// |
1209 * | 2006 /// Request parameters: |
1210 * Request parameters: | 2007 /// |
1211 * | 2008 /// [logName] - Required. The resource name of the log to delete: |
1212 * [logName] - Required. The resource name of the log to delete: | 2009 /// "projects/[PROJECT_ID]/logs/[LOG_ID]" |
1213 * "projects/[PROJECT_ID]/logs/[LOG_ID]" | 2010 /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" |
1214 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" | 2011 /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" |
1215 * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" | 2012 /// "folders/[FOLDER_ID]/logs/[LOG_ID]" |
1216 * "folders/[FOLDER_ID]/logs/[LOG_ID]" | 2013 /// [LOG_ID] must be URL-encoded. For example, |
1217 * [LOG_ID] must be URL-encoded. For example, | 2014 /// "projects/my-project-id/logs/syslog", |
1218 * "projects/my-project-id/logs/syslog", | 2015 /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factiv
ity". |
1219 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi
ty". | 2016 /// For more information about log names, see LogEntry. |
1220 * For more information about log names, see LogEntry. | 2017 /// Value must have pattern "^organizations/[^/]+/logs/[^/]+$". |
1221 * Value must have pattern "^organizations/[^/]+/logs/[^/]+$". | 2018 /// |
1222 * | 2019 /// Completes with a [Empty]. |
1223 * Completes with a [Empty]. | 2020 /// |
1224 * | 2021 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1225 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2022 /// an error. |
1226 * error. | 2023 /// |
1227 * | 2024 /// If the used [http.Client] completes with an error when making a REST |
1228 * If the used [http.Client] completes with an error when making a REST call, | 2025 /// call, this method will complete with the same error. |
1229 * this method will complete with the same error. | |
1230 */ | |
1231 async.Future<Empty> delete(core.String logName) { | 2026 async.Future<Empty> delete(core.String logName) { |
1232 var _url = null; | 2027 var _url = null; |
1233 var _queryParams = new core.Map(); | 2028 var _queryParams = new core.Map(); |
1234 var _uploadMedia = null; | 2029 var _uploadMedia = null; |
1235 var _uploadOptions = null; | 2030 var _uploadOptions = null; |
1236 var _downloadOptions = commons.DownloadOptions.Metadata; | 2031 var _downloadOptions = commons.DownloadOptions.Metadata; |
1237 var _body = null; | 2032 var _body = null; |
1238 | 2033 |
1239 if (logName == null) { | 2034 if (logName == null) { |
1240 throw new core.ArgumentError("Parameter logName is required."); | 2035 throw new core.ArgumentError("Parameter logName is required."); |
1241 } | 2036 } |
1242 | 2037 |
1243 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$logName'); | 2038 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$logName'); |
1244 | 2039 |
1245 var _response = _requester.request(_url, | 2040 var _response = _requester.request(_url, "DELETE", |
1246 "DELETE", | 2041 body: _body, |
1247 body: _body, | 2042 queryParams: _queryParams, |
1248 queryParams: _queryParams, | 2043 uploadOptions: _uploadOptions, |
1249 uploadOptions: _uploadOptions, | 2044 uploadMedia: _uploadMedia, |
1250 uploadMedia: _uploadMedia, | 2045 downloadOptions: _downloadOptions); |
1251 downloadOptions: _downloadOptions); | |
1252 return _response.then((data) => new Empty.fromJson(data)); | 2046 return _response.then((data) => new Empty.fromJson(data)); |
1253 } | 2047 } |
1254 | 2048 |
1255 /** | 2049 /// Lists the logs in projects, organizations, folders, or billing accounts. |
1256 * Lists the logs in projects, organizations, folders, or billing accounts. | 2050 /// Only logs that have entries are listed. |
1257 * Only logs that have entries are listed. | 2051 /// |
1258 * | 2052 /// Request parameters: |
1259 * Request parameters: | 2053 /// |
1260 * | 2054 /// [parent] - Required. The resource name that owns the logs: |
1261 * [parent] - Required. The resource name that owns the logs: | 2055 /// "projects/[PROJECT_ID]" |
1262 * "projects/[PROJECT_ID]" | 2056 /// "organizations/[ORGANIZATION_ID]" |
1263 * "organizations/[ORGANIZATION_ID]" | 2057 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
1264 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 2058 /// "folders/[FOLDER_ID]" |
1265 * "folders/[FOLDER_ID]" | 2059 /// |
1266 * | 2060 /// Value must have pattern "^organizations/[^/]+$". |
1267 * Value must have pattern "^organizations/[^/]+$". | 2061 /// |
1268 * | 2062 /// [pageToken] - Optional. If present, then retrieve the next batch of |
1269 * [pageToken] - Optional. If present, then retrieve the next batch of results | 2063 /// results from the preceding call to this method. pageToken must be the |
1270 * from the preceding call to this method. pageToken must be the value of | 2064 /// value of nextPageToken from the previous response. The values of other |
1271 * nextPageToken from the previous response. The values of other method | 2065 /// method parameters should be identical to those in the previous call. |
1272 * parameters should be identical to those in the previous call. | 2066 /// |
1273 * | 2067 /// [pageSize] - Optional. The maximum number of results to return from this |
1274 * [pageSize] - Optional. The maximum number of results to return from this | 2068 /// request. Non-positive values are ignored. The presence of nextPageToken |
1275 * request. Non-positive values are ignored. The presence of nextPageToken in | 2069 /// in the response indicates that more results might be available. |
1276 * the response indicates that more results might be available. | 2070 /// |
1277 * | 2071 /// Completes with a [ListLogsResponse]. |
1278 * Completes with a [ListLogsResponse]. | 2072 /// |
1279 * | 2073 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1280 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2074 /// an error. |
1281 * error. | 2075 /// |
1282 * | 2076 /// If the used [http.Client] completes with an error when making a REST |
1283 * If the used [http.Client] completes with an error when making a REST call, | 2077 /// call, this method will complete with the same error. |
1284 * this method will complete with the same error. | 2078 async.Future<ListLogsResponse> list(core.String parent, |
1285 */ | 2079 {core.String pageToken, core.int pageSize}) { |
1286 async.Future<ListLogsResponse> list(core.String parent, {core.String pageToken
, core.int pageSize}) { | |
1287 var _url = null; | 2080 var _url = null; |
1288 var _queryParams = new core.Map(); | 2081 var _queryParams = new core.Map(); |
1289 var _uploadMedia = null; | 2082 var _uploadMedia = null; |
1290 var _uploadOptions = null; | 2083 var _uploadOptions = null; |
1291 var _downloadOptions = commons.DownloadOptions.Metadata; | 2084 var _downloadOptions = commons.DownloadOptions.Metadata; |
1292 var _body = null; | 2085 var _body = null; |
1293 | 2086 |
1294 if (parent == null) { | 2087 if (parent == null) { |
1295 throw new core.ArgumentError("Parameter parent is required."); | 2088 throw new core.ArgumentError("Parameter parent is required."); |
1296 } | 2089 } |
1297 if (pageToken != null) { | 2090 if (pageToken != null) { |
1298 _queryParams["pageToken"] = [pageToken]; | 2091 _queryParams["pageToken"] = [pageToken]; |
1299 } | 2092 } |
1300 if (pageSize != null) { | 2093 if (pageSize != null) { |
1301 _queryParams["pageSize"] = ["${pageSize}"]; | 2094 _queryParams["pageSize"] = ["${pageSize}"]; |
1302 } | 2095 } |
1303 | 2096 |
1304 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs'; | 2097 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs'; |
1305 | 2098 |
1306 var _response = _requester.request(_url, | 2099 var _response = _requester.request(_url, "GET", |
1307 "GET", | 2100 body: _body, |
1308 body: _body, | 2101 queryParams: _queryParams, |
1309 queryParams: _queryParams, | 2102 uploadOptions: _uploadOptions, |
1310 uploadOptions: _uploadOptions, | 2103 uploadMedia: _uploadMedia, |
1311 uploadMedia: _uploadMedia, | 2104 downloadOptions: _downloadOptions); |
1312 downloadOptions: _downloadOptions); | |
1313 return _response.then((data) => new ListLogsResponse.fromJson(data)); | 2105 return _response.then((data) => new ListLogsResponse.fromJson(data)); |
1314 } | 2106 } |
1315 | |
1316 } | 2107 } |
1317 | 2108 |
1318 | |
1319 class OrganizationsSinksResourceApi { | 2109 class OrganizationsSinksResourceApi { |
1320 final commons.ApiRequester _requester; | 2110 final commons.ApiRequester _requester; |
1321 | 2111 |
1322 OrganizationsSinksResourceApi(commons.ApiRequester client) : | 2112 OrganizationsSinksResourceApi(commons.ApiRequester client) |
1323 _requester = client; | 2113 : _requester = client; |
1324 | 2114 |
1325 /** | 2115 /// Creates a sink that exports specified log entries to a destination. The |
1326 * Creates a sink that exports specified log entries to a destination. The | 2116 /// export of newly-ingested log entries begins immediately, unless the |
1327 * export of newly-ingested log entries begins immediately, unless the current | 2117 /// sink's writer_identity is not permitted to write to the destination. A |
1328 * time is outside the sink's start and end times or the sink's | 2118 /// sink can export log entries only from the resource owning the sink. |
1329 * writer_identity is not permitted to write to the destination. A sink can | 2119 /// |
1330 * export log entries only from the resource owning the sink. | 2120 /// [request] - The metadata request object. |
1331 * | 2121 /// |
1332 * [request] - The metadata request object. | 2122 /// Request parameters: |
1333 * | 2123 /// |
1334 * Request parameters: | 2124 /// [parent] - Required. The resource in which to create the sink: |
1335 * | 2125 /// "projects/[PROJECT_ID]" |
1336 * [parent] - Required. The resource in which to create the sink: | 2126 /// "organizations/[ORGANIZATION_ID]" |
1337 * "projects/[PROJECT_ID]" | 2127 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
1338 * "organizations/[ORGANIZATION_ID]" | 2128 /// "folders/[FOLDER_ID]" |
1339 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 2129 /// Examples: "projects/my-logging-project", "organizations/123456789". |
1340 * "folders/[FOLDER_ID]" | 2130 /// Value must have pattern "^organizations/[^/]+$". |
1341 * Examples: "projects/my-logging-project", "organizations/123456789". | 2131 /// |
1342 * Value must have pattern "^organizations/[^/]+$". | 2132 /// [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity |
1343 * | 2133 /// returned as writer_identity in the new sink. If this value is omitted or |
1344 * [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity | 2134 /// set to false, and if the sink's parent is a project, then the value |
1345 * returned as writer_identity in the new sink. If this value is omitted or | 2135 /// returned as writer_identity is the same group or service account used by |
1346 * set to false, and if the sink's parent is a project, then the value | 2136 /// Stackdriver Logging before the addition of writer identities to this API. |
1347 * returned as writer_identity is the same group or service account used by | 2137 /// The sink's destination must be in the same project as the sink itself.If |
1348 * Stackdriver Logging before the addition of writer identities to this API. | 2138 /// this field is set to true, or if the sink is owned by a non-project |
1349 * The sink's destination must be in the same project as the sink itself.If | 2139 /// resource such as an organization, then the value of writer_identity will |
1350 * this field is set to true, or if the sink is owned by a non-project | 2140 /// be a unique service account used only for exports from the new sink. For |
1351 * resource such as an organization, then the value of writer_identity will be | 2141 /// more information, see writer_identity in LogSink. |
1352 * a unique service account used only for exports from the new sink. For more | 2142 /// |
1353 * information, see writer_identity in LogSink. | 2143 /// Completes with a [LogSink]. |
1354 * | 2144 /// |
1355 * Completes with a [LogSink]. | 2145 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1356 * | 2146 /// an error. |
1357 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2147 /// |
1358 * error. | 2148 /// If the used [http.Client] completes with an error when making a REST |
1359 * | 2149 /// call, this method will complete with the same error. |
1360 * If the used [http.Client] completes with an error when making a REST call, | 2150 async.Future<LogSink> create(LogSink request, core.String parent, |
1361 * this method will complete with the same error. | 2151 {core.bool uniqueWriterIdentity}) { |
1362 */ | |
1363 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u
niqueWriterIdentity}) { | |
1364 var _url = null; | 2152 var _url = null; |
1365 var _queryParams = new core.Map(); | 2153 var _queryParams = new core.Map(); |
1366 var _uploadMedia = null; | 2154 var _uploadMedia = null; |
1367 var _uploadOptions = null; | 2155 var _uploadOptions = null; |
1368 var _downloadOptions = commons.DownloadOptions.Metadata; | 2156 var _downloadOptions = commons.DownloadOptions.Metadata; |
1369 var _body = null; | 2157 var _body = null; |
1370 | 2158 |
1371 if (request != null) { | 2159 if (request != null) { |
1372 _body = convert.JSON.encode((request).toJson()); | 2160 _body = convert.JSON.encode((request).toJson()); |
1373 } | 2161 } |
1374 if (parent == null) { | 2162 if (parent == null) { |
1375 throw new core.ArgumentError("Parameter parent is required."); | 2163 throw new core.ArgumentError("Parameter parent is required."); |
1376 } | 2164 } |
1377 if (uniqueWriterIdentity != null) { | 2165 if (uniqueWriterIdentity != null) { |
1378 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 2166 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
1379 } | 2167 } |
1380 | 2168 |
1381 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; | 2169 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; |
1382 | 2170 |
1383 var _response = _requester.request(_url, | 2171 var _response = _requester.request(_url, "POST", |
1384 "POST", | 2172 body: _body, |
1385 body: _body, | 2173 queryParams: _queryParams, |
1386 queryParams: _queryParams, | 2174 uploadOptions: _uploadOptions, |
1387 uploadOptions: _uploadOptions, | 2175 uploadMedia: _uploadMedia, |
1388 uploadMedia: _uploadMedia, | 2176 downloadOptions: _downloadOptions); |
1389 downloadOptions: _downloadOptions); | |
1390 return _response.then((data) => new LogSink.fromJson(data)); | 2177 return _response.then((data) => new LogSink.fromJson(data)); |
1391 } | 2178 } |
1392 | 2179 |
1393 /** | 2180 /// Deletes a sink. If the sink has a unique writer_identity, then that |
1394 * Deletes a sink. If the sink has a unique writer_identity, then that service | 2181 /// service account is also deleted. |
1395 * account is also deleted. | 2182 /// |
1396 * | 2183 /// Request parameters: |
1397 * Request parameters: | 2184 /// |
1398 * | 2185 /// [sinkName] - Required. The full resource name of the sink to delete, |
1399 * [sinkName] - Required. The full resource name of the sink to delete, | 2186 /// including the parent resource and the sink identifier: |
1400 * including the parent resource and the sink identifier: | 2187 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
1401 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 2188 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
1402 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 2189 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
1403 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 2190 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
1404 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 2191 /// Example: "projects/my-project-id/sinks/my-sink-id". |
1405 * Example: "projects/my-project-id/sinks/my-sink-id". | 2192 /// Value must have pattern "^organizations/[^/]+/sinks/[^/]+$". |
1406 * Value must have pattern "^organizations/[^/]+/sinks/[^/]+$". | 2193 /// |
1407 * | 2194 /// Completes with a [Empty]. |
1408 * Completes with a [Empty]. | 2195 /// |
1409 * | 2196 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1410 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2197 /// an error. |
1411 * error. | 2198 /// |
1412 * | 2199 /// If the used [http.Client] completes with an error when making a REST |
1413 * If the used [http.Client] completes with an error when making a REST call, | 2200 /// call, this method will complete with the same error. |
1414 * this method will complete with the same error. | |
1415 */ | |
1416 async.Future<Empty> delete(core.String sinkName) { | 2201 async.Future<Empty> delete(core.String sinkName) { |
1417 var _url = null; | 2202 var _url = null; |
1418 var _queryParams = new core.Map(); | 2203 var _queryParams = new core.Map(); |
1419 var _uploadMedia = null; | 2204 var _uploadMedia = null; |
1420 var _uploadOptions = null; | 2205 var _uploadOptions = null; |
1421 var _downloadOptions = commons.DownloadOptions.Metadata; | 2206 var _downloadOptions = commons.DownloadOptions.Metadata; |
1422 var _body = null; | 2207 var _body = null; |
1423 | 2208 |
1424 if (sinkName == null) { | 2209 if (sinkName == null) { |
1425 throw new core.ArgumentError("Parameter sinkName is required."); | 2210 throw new core.ArgumentError("Parameter sinkName is required."); |
1426 } | 2211 } |
1427 | 2212 |
1428 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 2213 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
1429 | 2214 |
1430 var _response = _requester.request(_url, | 2215 var _response = _requester.request(_url, "DELETE", |
1431 "DELETE", | 2216 body: _body, |
1432 body: _body, | 2217 queryParams: _queryParams, |
1433 queryParams: _queryParams, | 2218 uploadOptions: _uploadOptions, |
1434 uploadOptions: _uploadOptions, | 2219 uploadMedia: _uploadMedia, |
1435 uploadMedia: _uploadMedia, | 2220 downloadOptions: _downloadOptions); |
1436 downloadOptions: _downloadOptions); | |
1437 return _response.then((data) => new Empty.fromJson(data)); | 2221 return _response.then((data) => new Empty.fromJson(data)); |
1438 } | 2222 } |
1439 | 2223 |
1440 /** | 2224 /// Gets a sink. |
1441 * Gets a sink. | 2225 /// |
1442 * | 2226 /// Request parameters: |
1443 * Request parameters: | 2227 /// |
1444 * | 2228 /// [sinkName] - Required. The resource name of the sink: |
1445 * [sinkName] - Required. The resource name of the sink: | 2229 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
1446 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 2230 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
1447 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 2231 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
1448 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 2232 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
1449 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 2233 /// Example: "projects/my-project-id/sinks/my-sink-id". |
1450 * Example: "projects/my-project-id/sinks/my-sink-id". | 2234 /// Value must have pattern "^organizations/[^/]+/sinks/[^/]+$". |
1451 * Value must have pattern "^organizations/[^/]+/sinks/[^/]+$". | 2235 /// |
1452 * | 2236 /// Completes with a [LogSink]. |
1453 * Completes with a [LogSink]. | 2237 /// |
1454 * | 2238 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1455 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2239 /// an error. |
1456 * error. | 2240 /// |
1457 * | 2241 /// If the used [http.Client] completes with an error when making a REST |
1458 * If the used [http.Client] completes with an error when making a REST call, | 2242 /// call, this method will complete with the same error. |
1459 * this method will complete with the same error. | |
1460 */ | |
1461 async.Future<LogSink> get(core.String sinkName) { | 2243 async.Future<LogSink> get(core.String sinkName) { |
1462 var _url = null; | 2244 var _url = null; |
1463 var _queryParams = new core.Map(); | 2245 var _queryParams = new core.Map(); |
1464 var _uploadMedia = null; | 2246 var _uploadMedia = null; |
1465 var _uploadOptions = null; | 2247 var _uploadOptions = null; |
1466 var _downloadOptions = commons.DownloadOptions.Metadata; | 2248 var _downloadOptions = commons.DownloadOptions.Metadata; |
1467 var _body = null; | 2249 var _body = null; |
1468 | 2250 |
1469 if (sinkName == null) { | 2251 if (sinkName == null) { |
1470 throw new core.ArgumentError("Parameter sinkName is required."); | 2252 throw new core.ArgumentError("Parameter sinkName is required."); |
1471 } | 2253 } |
1472 | 2254 |
1473 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 2255 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
1474 | 2256 |
1475 var _response = _requester.request(_url, | 2257 var _response = _requester.request(_url, "GET", |
1476 "GET", | 2258 body: _body, |
1477 body: _body, | 2259 queryParams: _queryParams, |
1478 queryParams: _queryParams, | 2260 uploadOptions: _uploadOptions, |
1479 uploadOptions: _uploadOptions, | 2261 uploadMedia: _uploadMedia, |
1480 uploadMedia: _uploadMedia, | 2262 downloadOptions: _downloadOptions); |
1481 downloadOptions: _downloadOptions); | |
1482 return _response.then((data) => new LogSink.fromJson(data)); | 2263 return _response.then((data) => new LogSink.fromJson(data)); |
1483 } | 2264 } |
1484 | 2265 |
1485 /** | 2266 /// Lists sinks. |
1486 * Lists sinks. | 2267 /// |
1487 * | 2268 /// Request parameters: |
1488 * Request parameters: | 2269 /// |
1489 * | 2270 /// [parent] - Required. The parent resource whose sinks are to be listed: |
1490 * [parent] - Required. The parent resource whose sinks are to be listed: | 2271 /// "projects/[PROJECT_ID]" |
1491 * "projects/[PROJECT_ID]" | 2272 /// "organizations/[ORGANIZATION_ID]" |
1492 * "organizations/[ORGANIZATION_ID]" | 2273 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
1493 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 2274 /// "folders/[FOLDER_ID]" |
1494 * "folders/[FOLDER_ID]" | 2275 /// |
1495 * | 2276 /// Value must have pattern "^organizations/[^/]+$". |
1496 * Value must have pattern "^organizations/[^/]+$". | 2277 /// |
1497 * | 2278 /// [pageToken] - Optional. If present, then retrieve the next batch of |
1498 * [pageToken] - Optional. If present, then retrieve the next batch of results | 2279 /// results from the preceding call to this method. pageToken must be the |
1499 * from the preceding call to this method. pageToken must be the value of | 2280 /// value of nextPageToken from the previous response. The values of other |
1500 * nextPageToken from the previous response. The values of other method | 2281 /// method parameters should be identical to those in the previous call. |
1501 * parameters should be identical to those in the previous call. | 2282 /// |
1502 * | 2283 /// [pageSize] - Optional. The maximum number of results to return from this |
1503 * [pageSize] - Optional. The maximum number of results to return from this | 2284 /// request. Non-positive values are ignored. The presence of nextPageToken |
1504 * request. Non-positive values are ignored. The presence of nextPageToken in | 2285 /// in the response indicates that more results might be available. |
1505 * the response indicates that more results might be available. | 2286 /// |
1506 * | 2287 /// Completes with a [ListSinksResponse]. |
1507 * Completes with a [ListSinksResponse]. | 2288 /// |
1508 * | 2289 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1509 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2290 /// an error. |
1510 * error. | 2291 /// |
1511 * | 2292 /// If the used [http.Client] completes with an error when making a REST |
1512 * If the used [http.Client] completes with an error when making a REST call, | 2293 /// call, this method will complete with the same error. |
1513 * this method will complete with the same error. | 2294 async.Future<ListSinksResponse> list(core.String parent, |
1514 */ | 2295 {core.String pageToken, core.int pageSize}) { |
1515 async.Future<ListSinksResponse> list(core.String parent, {core.String pageToke
n, core.int pageSize}) { | |
1516 var _url = null; | 2296 var _url = null; |
1517 var _queryParams = new core.Map(); | 2297 var _queryParams = new core.Map(); |
1518 var _uploadMedia = null; | 2298 var _uploadMedia = null; |
1519 var _uploadOptions = null; | 2299 var _uploadOptions = null; |
1520 var _downloadOptions = commons.DownloadOptions.Metadata; | 2300 var _downloadOptions = commons.DownloadOptions.Metadata; |
1521 var _body = null; | 2301 var _body = null; |
1522 | 2302 |
1523 if (parent == null) { | 2303 if (parent == null) { |
1524 throw new core.ArgumentError("Parameter parent is required."); | 2304 throw new core.ArgumentError("Parameter parent is required."); |
1525 } | 2305 } |
1526 if (pageToken != null) { | 2306 if (pageToken != null) { |
1527 _queryParams["pageToken"] = [pageToken]; | 2307 _queryParams["pageToken"] = [pageToken]; |
1528 } | 2308 } |
1529 if (pageSize != null) { | 2309 if (pageSize != null) { |
1530 _queryParams["pageSize"] = ["${pageSize}"]; | 2310 _queryParams["pageSize"] = ["${pageSize}"]; |
1531 } | 2311 } |
1532 | 2312 |
1533 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; | 2313 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; |
1534 | 2314 |
1535 var _response = _requester.request(_url, | 2315 var _response = _requester.request(_url, "GET", |
1536 "GET", | 2316 body: _body, |
1537 body: _body, | 2317 queryParams: _queryParams, |
1538 queryParams: _queryParams, | 2318 uploadOptions: _uploadOptions, |
1539 uploadOptions: _uploadOptions, | 2319 uploadMedia: _uploadMedia, |
1540 uploadMedia: _uploadMedia, | 2320 downloadOptions: _downloadOptions); |
1541 downloadOptions: _downloadOptions); | |
1542 return _response.then((data) => new ListSinksResponse.fromJson(data)); | 2321 return _response.then((data) => new ListSinksResponse.fromJson(data)); |
1543 } | 2322 } |
1544 | 2323 |
1545 /** | 2324 /// Updates a sink. This method replaces the following fields in the existing |
1546 * Updates a sink. This method replaces the following fields in the existing | 2325 /// sink with values from the new sink: destination, and filter. The updated |
1547 * sink with values from the new sink: destination, filter, | 2326 /// sink might also have a new writer_identity; see the |
1548 * output_version_format, start_time, and end_time. The updated sink might | 2327 /// unique_writer_identity field. |
1549 * also have a new writer_identity; see the unique_writer_identity field. | 2328 /// |
1550 * | 2329 /// [request] - The metadata request object. |
1551 * [request] - The metadata request object. | 2330 /// |
1552 * | 2331 /// Request parameters: |
1553 * Request parameters: | 2332 /// |
1554 * | 2333 /// [sinkName] - Required. The full resource name of the sink to update, |
1555 * [sinkName] - Required. The full resource name of the sink to update, | 2334 /// including the parent resource and the sink identifier: |
1556 * including the parent resource and the sink identifier: | 2335 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
1557 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 2336 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
1558 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 2337 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
1559 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 2338 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
1560 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 2339 /// Example: "projects/my-project-id/sinks/my-sink-id". |
1561 * Example: "projects/my-project-id/sinks/my-sink-id". | 2340 /// Value must have pattern "^organizations/[^/]+/sinks/[^/]+$". |
1562 * Value must have pattern "^organizations/[^/]+/sinks/[^/]+$". | 2341 /// |
1563 * | 2342 /// [updateMask] - Optional. Field mask that specifies the fields in sink |
1564 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of | 2343 /// that need an update. A sink field will be overwritten if, and only if, it |
1565 * this field. When updating a sink, the effect of this field on the value of | 2344 /// is in the update mask. name and output only fields cannot be updated.An |
1566 * writer_identity in the updated sink depends on both the old and new values | 2345 /// empty updateMask is temporarily treated as using the following mask for |
1567 * of this field: | 2346 /// backwards compatibility purposes: destination,filter,includeChildren At |
1568 * If the old and new values of this field are both false or both true, then | 2347 /// some point in the future, behavior will be removed and specifying an |
1569 * there is no change to the sink's writer_identity. | 2348 /// empty updateMask will be an error.For a detailed FieldMask definition, |
1570 * If the old value is false and the new value is true, then writer_identity | 2349 /// see |
1571 * is changed to a unique service account. | 2350 /// https://developers.google.com/protocol-buffers/docs/reference/google.proto
buf#fieldmaskExample: |
1572 * It is an error if the old value is true and the new value is set to false | 2351 /// updateMask=filter. |
1573 * or defaulted to false. | 2352 /// |
1574 * | 2353 /// [uniqueWriterIdentity] - Optional. See sinks.create for a description of |
1575 * Completes with a [LogSink]. | 2354 /// this field. When updating a sink, the effect of this field on the value |
1576 * | 2355 /// of writer_identity in the updated sink depends on both the old and new |
1577 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2356 /// values of this field: |
1578 * error. | 2357 /// If the old and new values of this field are both false or both true, then |
1579 * | 2358 /// there is no change to the sink's writer_identity. |
1580 * If the used [http.Client] completes with an error when making a REST call, | 2359 /// If the old value is false and the new value is true, then writer_identity |
1581 * this method will complete with the same error. | 2360 /// is changed to a unique service account. |
1582 */ | 2361 /// It is an error if the old value is true and the new value is set to false |
1583 async.Future<LogSink> patch(LogSink request, core.String sinkName, {core.bool
uniqueWriterIdentity}) { | 2362 /// or defaulted to false. |
| 2363 /// |
| 2364 /// Completes with a [LogSink]. |
| 2365 /// |
| 2366 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2367 /// an error. |
| 2368 /// |
| 2369 /// If the used [http.Client] completes with an error when making a REST |
| 2370 /// call, this method will complete with the same error. |
| 2371 async.Future<LogSink> patch(LogSink request, core.String sinkName, |
| 2372 {core.String updateMask, core.bool uniqueWriterIdentity}) { |
1584 var _url = null; | 2373 var _url = null; |
1585 var _queryParams = new core.Map(); | 2374 var _queryParams = new core.Map(); |
1586 var _uploadMedia = null; | 2375 var _uploadMedia = null; |
1587 var _uploadOptions = null; | 2376 var _uploadOptions = null; |
1588 var _downloadOptions = commons.DownloadOptions.Metadata; | 2377 var _downloadOptions = commons.DownloadOptions.Metadata; |
1589 var _body = null; | 2378 var _body = null; |
1590 | 2379 |
1591 if (request != null) { | 2380 if (request != null) { |
1592 _body = convert.JSON.encode((request).toJson()); | 2381 _body = convert.JSON.encode((request).toJson()); |
1593 } | 2382 } |
1594 if (sinkName == null) { | 2383 if (sinkName == null) { |
1595 throw new core.ArgumentError("Parameter sinkName is required."); | 2384 throw new core.ArgumentError("Parameter sinkName is required."); |
1596 } | 2385 } |
| 2386 if (updateMask != null) { |
| 2387 _queryParams["updateMask"] = [updateMask]; |
| 2388 } |
1597 if (uniqueWriterIdentity != null) { | 2389 if (uniqueWriterIdentity != null) { |
1598 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 2390 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
1599 } | 2391 } |
1600 | 2392 |
1601 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 2393 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
1602 | 2394 |
1603 var _response = _requester.request(_url, | 2395 var _response = _requester.request(_url, "PATCH", |
1604 "PATCH", | 2396 body: _body, |
1605 body: _body, | 2397 queryParams: _queryParams, |
1606 queryParams: _queryParams, | 2398 uploadOptions: _uploadOptions, |
1607 uploadOptions: _uploadOptions, | 2399 uploadMedia: _uploadMedia, |
1608 uploadMedia: _uploadMedia, | 2400 downloadOptions: _downloadOptions); |
1609 downloadOptions: _downloadOptions); | |
1610 return _response.then((data) => new LogSink.fromJson(data)); | 2401 return _response.then((data) => new LogSink.fromJson(data)); |
1611 } | 2402 } |
1612 | 2403 |
1613 /** | 2404 /// Updates a sink. This method replaces the following fields in the existing |
1614 * Updates a sink. This method replaces the following fields in the existing | 2405 /// sink with values from the new sink: destination, and filter. The updated |
1615 * sink with values from the new sink: destination, filter, | 2406 /// sink might also have a new writer_identity; see the |
1616 * output_version_format, start_time, and end_time. The updated sink might | 2407 /// unique_writer_identity field. |
1617 * also have a new writer_identity; see the unique_writer_identity field. | 2408 /// |
1618 * | 2409 /// [request] - The metadata request object. |
1619 * [request] - The metadata request object. | 2410 /// |
1620 * | 2411 /// Request parameters: |
1621 * Request parameters: | 2412 /// |
1622 * | 2413 /// [sinkName] - Required. The full resource name of the sink to update, |
1623 * [sinkName] - Required. The full resource name of the sink to update, | 2414 /// including the parent resource and the sink identifier: |
1624 * including the parent resource and the sink identifier: | 2415 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
1625 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 2416 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
1626 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 2417 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
1627 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 2418 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
1628 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 2419 /// Example: "projects/my-project-id/sinks/my-sink-id". |
1629 * Example: "projects/my-project-id/sinks/my-sink-id". | 2420 /// Value must have pattern "^organizations/[^/]+/sinks/[^/]+$". |
1630 * Value must have pattern "^organizations/[^/]+/sinks/[^/]+$". | 2421 /// |
1631 * | 2422 /// [updateMask] - Optional. Field mask that specifies the fields in sink |
1632 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of | 2423 /// that need an update. A sink field will be overwritten if, and only if, it |
1633 * this field. When updating a sink, the effect of this field on the value of | 2424 /// is in the update mask. name and output only fields cannot be updated.An |
1634 * writer_identity in the updated sink depends on both the old and new values | 2425 /// empty updateMask is temporarily treated as using the following mask for |
1635 * of this field: | 2426 /// backwards compatibility purposes: destination,filter,includeChildren At |
1636 * If the old and new values of this field are both false or both true, then | 2427 /// some point in the future, behavior will be removed and specifying an |
1637 * there is no change to the sink's writer_identity. | 2428 /// empty updateMask will be an error.For a detailed FieldMask definition, |
1638 * If the old value is false and the new value is true, then writer_identity | 2429 /// see |
1639 * is changed to a unique service account. | 2430 /// https://developers.google.com/protocol-buffers/docs/reference/google.proto
buf#fieldmaskExample: |
1640 * It is an error if the old value is true and the new value is set to false | 2431 /// updateMask=filter. |
1641 * or defaulted to false. | 2432 /// |
1642 * | 2433 /// [uniqueWriterIdentity] - Optional. See sinks.create for a description of |
1643 * Completes with a [LogSink]. | 2434 /// this field. When updating a sink, the effect of this field on the value |
1644 * | 2435 /// of writer_identity in the updated sink depends on both the old and new |
1645 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2436 /// values of this field: |
1646 * error. | 2437 /// If the old and new values of this field are both false or both true, then |
1647 * | 2438 /// there is no change to the sink's writer_identity. |
1648 * If the used [http.Client] completes with an error when making a REST call, | 2439 /// If the old value is false and the new value is true, then writer_identity |
1649 * this method will complete with the same error. | 2440 /// is changed to a unique service account. |
1650 */ | 2441 /// It is an error if the old value is true and the new value is set to false |
1651 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool
uniqueWriterIdentity}) { | 2442 /// or defaulted to false. |
| 2443 /// |
| 2444 /// Completes with a [LogSink]. |
| 2445 /// |
| 2446 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2447 /// an error. |
| 2448 /// |
| 2449 /// If the used [http.Client] completes with an error when making a REST |
| 2450 /// call, this method will complete with the same error. |
| 2451 async.Future<LogSink> update(LogSink request, core.String sinkName, |
| 2452 {core.String updateMask, core.bool uniqueWriterIdentity}) { |
1652 var _url = null; | 2453 var _url = null; |
1653 var _queryParams = new core.Map(); | 2454 var _queryParams = new core.Map(); |
1654 var _uploadMedia = null; | 2455 var _uploadMedia = null; |
1655 var _uploadOptions = null; | 2456 var _uploadOptions = null; |
1656 var _downloadOptions = commons.DownloadOptions.Metadata; | 2457 var _downloadOptions = commons.DownloadOptions.Metadata; |
1657 var _body = null; | 2458 var _body = null; |
1658 | 2459 |
1659 if (request != null) { | 2460 if (request != null) { |
1660 _body = convert.JSON.encode((request).toJson()); | 2461 _body = convert.JSON.encode((request).toJson()); |
1661 } | 2462 } |
1662 if (sinkName == null) { | 2463 if (sinkName == null) { |
1663 throw new core.ArgumentError("Parameter sinkName is required."); | 2464 throw new core.ArgumentError("Parameter sinkName is required."); |
1664 } | 2465 } |
| 2466 if (updateMask != null) { |
| 2467 _queryParams["updateMask"] = [updateMask]; |
| 2468 } |
1665 if (uniqueWriterIdentity != null) { | 2469 if (uniqueWriterIdentity != null) { |
1666 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 2470 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
1667 } | 2471 } |
1668 | 2472 |
1669 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 2473 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
1670 | 2474 |
1671 var _response = _requester.request(_url, | 2475 var _response = _requester.request(_url, "PUT", |
1672 "PUT", | 2476 body: _body, |
1673 body: _body, | 2477 queryParams: _queryParams, |
1674 queryParams: _queryParams, | 2478 uploadOptions: _uploadOptions, |
1675 uploadOptions: _uploadOptions, | 2479 uploadMedia: _uploadMedia, |
1676 uploadMedia: _uploadMedia, | 2480 downloadOptions: _downloadOptions); |
1677 downloadOptions: _downloadOptions); | |
1678 return _response.then((data) => new LogSink.fromJson(data)); | 2481 return _response.then((data) => new LogSink.fromJson(data)); |
1679 } | 2482 } |
1680 | |
1681 } | 2483 } |
1682 | 2484 |
1683 | |
1684 class ProjectsResourceApi { | 2485 class ProjectsResourceApi { |
1685 final commons.ApiRequester _requester; | 2486 final commons.ApiRequester _requester; |
1686 | 2487 |
| 2488 ProjectsExclusionsResourceApi get exclusions => |
| 2489 new ProjectsExclusionsResourceApi(_requester); |
1687 ProjectsLogsResourceApi get logs => new ProjectsLogsResourceApi(_requester); | 2490 ProjectsLogsResourceApi get logs => new ProjectsLogsResourceApi(_requester); |
1688 ProjectsMetricsResourceApi get metrics => new ProjectsMetricsResourceApi(_requ
ester); | 2491 ProjectsMetricsResourceApi get metrics => |
1689 ProjectsSinksResourceApi get sinks => new ProjectsSinksResourceApi(_requester)
; | 2492 new ProjectsMetricsResourceApi(_requester); |
1690 | 2493 ProjectsSinksResourceApi get sinks => |
1691 ProjectsResourceApi(commons.ApiRequester client) : | 2494 new ProjectsSinksResourceApi(_requester); |
1692 _requester = client; | 2495 |
| 2496 ProjectsResourceApi(commons.ApiRequester client) : _requester = client; |
1693 } | 2497 } |
1694 | 2498 |
| 2499 class ProjectsExclusionsResourceApi { |
| 2500 final commons.ApiRequester _requester; |
| 2501 |
| 2502 ProjectsExclusionsResourceApi(commons.ApiRequester client) |
| 2503 : _requester = client; |
| 2504 |
| 2505 /// Creates a new exclusion in a specified parent resource. Only log entries |
| 2506 /// belonging to that resource can be excluded. You can have up to 10 |
| 2507 /// exclusions in a resource. |
| 2508 /// |
| 2509 /// [request] - The metadata request object. |
| 2510 /// |
| 2511 /// Request parameters: |
| 2512 /// |
| 2513 /// [parent] - Required. The parent resource in which to create the |
| 2514 /// exclusion: |
| 2515 /// "projects/[PROJECT_ID]" |
| 2516 /// "organizations/[ORGANIZATION_ID]" |
| 2517 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
| 2518 /// "folders/[FOLDER_ID]" |
| 2519 /// Examples: "projects/my-logging-project", "organizations/123456789". |
| 2520 /// Value must have pattern "^projects/[^/]+$". |
| 2521 /// |
| 2522 /// Completes with a [LogExclusion]. |
| 2523 /// |
| 2524 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2525 /// an error. |
| 2526 /// |
| 2527 /// If the used [http.Client] completes with an error when making a REST |
| 2528 /// call, this method will complete with the same error. |
| 2529 async.Future<LogExclusion> create(LogExclusion request, core.String parent) { |
| 2530 var _url = null; |
| 2531 var _queryParams = new core.Map(); |
| 2532 var _uploadMedia = null; |
| 2533 var _uploadOptions = null; |
| 2534 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2535 var _body = null; |
| 2536 |
| 2537 if (request != null) { |
| 2538 _body = convert.JSON.encode((request).toJson()); |
| 2539 } |
| 2540 if (parent == null) { |
| 2541 throw new core.ArgumentError("Parameter parent is required."); |
| 2542 } |
| 2543 |
| 2544 _url = 'v2/' + |
| 2545 commons.Escaper.ecapeVariableReserved('$parent') + |
| 2546 '/exclusions'; |
| 2547 |
| 2548 var _response = _requester.request(_url, "POST", |
| 2549 body: _body, |
| 2550 queryParams: _queryParams, |
| 2551 uploadOptions: _uploadOptions, |
| 2552 uploadMedia: _uploadMedia, |
| 2553 downloadOptions: _downloadOptions); |
| 2554 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 2555 } |
| 2556 |
| 2557 /// Deletes an exclusion. |
| 2558 /// |
| 2559 /// Request parameters: |
| 2560 /// |
| 2561 /// [name] - Required. The resource name of an existing exclusion to delete: |
| 2562 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 2563 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 2564 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 2565 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 2566 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 2567 /// Value must have pattern "^projects/[^/]+/exclusions/[^/]+$". |
| 2568 /// |
| 2569 /// Completes with a [Empty]. |
| 2570 /// |
| 2571 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2572 /// an error. |
| 2573 /// |
| 2574 /// If the used [http.Client] completes with an error when making a REST |
| 2575 /// call, this method will complete with the same error. |
| 2576 async.Future<Empty> delete(core.String name) { |
| 2577 var _url = null; |
| 2578 var _queryParams = new core.Map(); |
| 2579 var _uploadMedia = null; |
| 2580 var _uploadOptions = null; |
| 2581 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2582 var _body = null; |
| 2583 |
| 2584 if (name == null) { |
| 2585 throw new core.ArgumentError("Parameter name is required."); |
| 2586 } |
| 2587 |
| 2588 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 2589 |
| 2590 var _response = _requester.request(_url, "DELETE", |
| 2591 body: _body, |
| 2592 queryParams: _queryParams, |
| 2593 uploadOptions: _uploadOptions, |
| 2594 uploadMedia: _uploadMedia, |
| 2595 downloadOptions: _downloadOptions); |
| 2596 return _response.then((data) => new Empty.fromJson(data)); |
| 2597 } |
| 2598 |
| 2599 /// Gets the description of an exclusion. |
| 2600 /// |
| 2601 /// Request parameters: |
| 2602 /// |
| 2603 /// [name] - Required. The resource name of an existing exclusion: |
| 2604 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 2605 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 2606 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 2607 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 2608 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 2609 /// Value must have pattern "^projects/[^/]+/exclusions/[^/]+$". |
| 2610 /// |
| 2611 /// Completes with a [LogExclusion]. |
| 2612 /// |
| 2613 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2614 /// an error. |
| 2615 /// |
| 2616 /// If the used [http.Client] completes with an error when making a REST |
| 2617 /// call, this method will complete with the same error. |
| 2618 async.Future<LogExclusion> get(core.String name) { |
| 2619 var _url = null; |
| 2620 var _queryParams = new core.Map(); |
| 2621 var _uploadMedia = null; |
| 2622 var _uploadOptions = null; |
| 2623 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2624 var _body = null; |
| 2625 |
| 2626 if (name == null) { |
| 2627 throw new core.ArgumentError("Parameter name is required."); |
| 2628 } |
| 2629 |
| 2630 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 2631 |
| 2632 var _response = _requester.request(_url, "GET", |
| 2633 body: _body, |
| 2634 queryParams: _queryParams, |
| 2635 uploadOptions: _uploadOptions, |
| 2636 uploadMedia: _uploadMedia, |
| 2637 downloadOptions: _downloadOptions); |
| 2638 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 2639 } |
| 2640 |
| 2641 /// Lists all the exclusions in a parent resource. |
| 2642 /// |
| 2643 /// Request parameters: |
| 2644 /// |
| 2645 /// [parent] - Required. The parent resource whose exclusions are to be |
| 2646 /// listed. |
| 2647 /// "projects/[PROJECT_ID]" |
| 2648 /// "organizations/[ORGANIZATION_ID]" |
| 2649 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
| 2650 /// "folders/[FOLDER_ID]" |
| 2651 /// |
| 2652 /// Value must have pattern "^projects/[^/]+$". |
| 2653 /// |
| 2654 /// [pageToken] - Optional. If present, then retrieve the next batch of |
| 2655 /// results from the preceding call to this method. pageToken must be the |
| 2656 /// value of nextPageToken from the previous response. The values of other |
| 2657 /// method parameters should be identical to those in the previous call. |
| 2658 /// |
| 2659 /// [pageSize] - Optional. The maximum number of results to return from this |
| 2660 /// request. Non-positive values are ignored. The presence of nextPageToken |
| 2661 /// in the response indicates that more results might be available. |
| 2662 /// |
| 2663 /// Completes with a [ListExclusionsResponse]. |
| 2664 /// |
| 2665 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2666 /// an error. |
| 2667 /// |
| 2668 /// If the used [http.Client] completes with an error when making a REST |
| 2669 /// call, this method will complete with the same error. |
| 2670 async.Future<ListExclusionsResponse> list(core.String parent, |
| 2671 {core.String pageToken, core.int pageSize}) { |
| 2672 var _url = null; |
| 2673 var _queryParams = new core.Map(); |
| 2674 var _uploadMedia = null; |
| 2675 var _uploadOptions = null; |
| 2676 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2677 var _body = null; |
| 2678 |
| 2679 if (parent == null) { |
| 2680 throw new core.ArgumentError("Parameter parent is required."); |
| 2681 } |
| 2682 if (pageToken != null) { |
| 2683 _queryParams["pageToken"] = [pageToken]; |
| 2684 } |
| 2685 if (pageSize != null) { |
| 2686 _queryParams["pageSize"] = ["${pageSize}"]; |
| 2687 } |
| 2688 |
| 2689 _url = 'v2/' + |
| 2690 commons.Escaper.ecapeVariableReserved('$parent') + |
| 2691 '/exclusions'; |
| 2692 |
| 2693 var _response = _requester.request(_url, "GET", |
| 2694 body: _body, |
| 2695 queryParams: _queryParams, |
| 2696 uploadOptions: _uploadOptions, |
| 2697 uploadMedia: _uploadMedia, |
| 2698 downloadOptions: _downloadOptions); |
| 2699 return _response.then((data) => new ListExclusionsResponse.fromJson(data)); |
| 2700 } |
| 2701 |
| 2702 /// Changes one or more properties of an existing exclusion. |
| 2703 /// |
| 2704 /// [request] - The metadata request object. |
| 2705 /// |
| 2706 /// Request parameters: |
| 2707 /// |
| 2708 /// [name] - Required. The resource name of the exclusion to update: |
| 2709 /// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" |
| 2710 /// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" |
| 2711 /// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" |
| 2712 /// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" |
| 2713 /// Example: "projects/my-project-id/exclusions/my-exclusion-id". |
| 2714 /// Value must have pattern "^projects/[^/]+/exclusions/[^/]+$". |
| 2715 /// |
| 2716 /// [updateMask] - Required. A nonempty list of fields to change in the |
| 2717 /// existing exclusion. New values for the fields are taken from the |
| 2718 /// corresponding fields in the LogExclusion included in this request. Fields |
| 2719 /// not mentioned in update_mask are not changed and are ignored in the |
| 2720 /// request.For example, to change the filter and description of an |
| 2721 /// exclusion, specify an update_mask of "filter,description". |
| 2722 /// |
| 2723 /// Completes with a [LogExclusion]. |
| 2724 /// |
| 2725 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2726 /// an error. |
| 2727 /// |
| 2728 /// If the used [http.Client] completes with an error when making a REST |
| 2729 /// call, this method will complete with the same error. |
| 2730 async.Future<LogExclusion> patch(LogExclusion request, core.String name, |
| 2731 {core.String updateMask}) { |
| 2732 var _url = null; |
| 2733 var _queryParams = new core.Map(); |
| 2734 var _uploadMedia = null; |
| 2735 var _uploadOptions = null; |
| 2736 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2737 var _body = null; |
| 2738 |
| 2739 if (request != null) { |
| 2740 _body = convert.JSON.encode((request).toJson()); |
| 2741 } |
| 2742 if (name == null) { |
| 2743 throw new core.ArgumentError("Parameter name is required."); |
| 2744 } |
| 2745 if (updateMask != null) { |
| 2746 _queryParams["updateMask"] = [updateMask]; |
| 2747 } |
| 2748 |
| 2749 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 2750 |
| 2751 var _response = _requester.request(_url, "PATCH", |
| 2752 body: _body, |
| 2753 queryParams: _queryParams, |
| 2754 uploadOptions: _uploadOptions, |
| 2755 uploadMedia: _uploadMedia, |
| 2756 downloadOptions: _downloadOptions); |
| 2757 return _response.then((data) => new LogExclusion.fromJson(data)); |
| 2758 } |
| 2759 } |
1695 | 2760 |
1696 class ProjectsLogsResourceApi { | 2761 class ProjectsLogsResourceApi { |
1697 final commons.ApiRequester _requester; | 2762 final commons.ApiRequester _requester; |
1698 | 2763 |
1699 ProjectsLogsResourceApi(commons.ApiRequester client) : | 2764 ProjectsLogsResourceApi(commons.ApiRequester client) : _requester = client; |
1700 _requester = client; | 2765 |
1701 | 2766 /// Deletes all the log entries in a log. The log reappears if it receives |
1702 /** | 2767 /// new entries. Log entries written shortly before the delete operation |
1703 * Deletes all the log entries in a log. The log reappears if it receives new | 2768 /// might not be deleted. |
1704 * entries. Log entries written shortly before the delete operation might not | 2769 /// |
1705 * be deleted. | 2770 /// Request parameters: |
1706 * | 2771 /// |
1707 * Request parameters: | 2772 /// [logName] - Required. The resource name of the log to delete: |
1708 * | 2773 /// "projects/[PROJECT_ID]/logs/[LOG_ID]" |
1709 * [logName] - Required. The resource name of the log to delete: | 2774 /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" |
1710 * "projects/[PROJECT_ID]/logs/[LOG_ID]" | 2775 /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" |
1711 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" | 2776 /// "folders/[FOLDER_ID]/logs/[LOG_ID]" |
1712 * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" | 2777 /// [LOG_ID] must be URL-encoded. For example, |
1713 * "folders/[FOLDER_ID]/logs/[LOG_ID]" | 2778 /// "projects/my-project-id/logs/syslog", |
1714 * [LOG_ID] must be URL-encoded. For example, | 2779 /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factiv
ity". |
1715 * "projects/my-project-id/logs/syslog", | 2780 /// For more information about log names, see LogEntry. |
1716 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi
ty". | 2781 /// Value must have pattern "^projects/[^/]+/logs/[^/]+$". |
1717 * For more information about log names, see LogEntry. | 2782 /// |
1718 * Value must have pattern "^projects/[^/]+/logs/[^/]+$". | 2783 /// Completes with a [Empty]. |
1719 * | 2784 /// |
1720 * Completes with a [Empty]. | 2785 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1721 * | 2786 /// an error. |
1722 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2787 /// |
1723 * error. | 2788 /// If the used [http.Client] completes with an error when making a REST |
1724 * | 2789 /// call, this method will complete with the same error. |
1725 * If the used [http.Client] completes with an error when making a REST call, | |
1726 * this method will complete with the same error. | |
1727 */ | |
1728 async.Future<Empty> delete(core.String logName) { | 2790 async.Future<Empty> delete(core.String logName) { |
1729 var _url = null; | 2791 var _url = null; |
1730 var _queryParams = new core.Map(); | 2792 var _queryParams = new core.Map(); |
1731 var _uploadMedia = null; | 2793 var _uploadMedia = null; |
1732 var _uploadOptions = null; | 2794 var _uploadOptions = null; |
1733 var _downloadOptions = commons.DownloadOptions.Metadata; | 2795 var _downloadOptions = commons.DownloadOptions.Metadata; |
1734 var _body = null; | 2796 var _body = null; |
1735 | 2797 |
1736 if (logName == null) { | 2798 if (logName == null) { |
1737 throw new core.ArgumentError("Parameter logName is required."); | 2799 throw new core.ArgumentError("Parameter logName is required."); |
1738 } | 2800 } |
1739 | 2801 |
1740 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$logName'); | 2802 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$logName'); |
1741 | 2803 |
1742 var _response = _requester.request(_url, | 2804 var _response = _requester.request(_url, "DELETE", |
1743 "DELETE", | 2805 body: _body, |
1744 body: _body, | 2806 queryParams: _queryParams, |
1745 queryParams: _queryParams, | 2807 uploadOptions: _uploadOptions, |
1746 uploadOptions: _uploadOptions, | 2808 uploadMedia: _uploadMedia, |
1747 uploadMedia: _uploadMedia, | 2809 downloadOptions: _downloadOptions); |
1748 downloadOptions: _downloadOptions); | |
1749 return _response.then((data) => new Empty.fromJson(data)); | 2810 return _response.then((data) => new Empty.fromJson(data)); |
1750 } | 2811 } |
1751 | 2812 |
1752 /** | 2813 /// Lists the logs in projects, organizations, folders, or billing accounts. |
1753 * Lists the logs in projects, organizations, folders, or billing accounts. | 2814 /// Only logs that have entries are listed. |
1754 * Only logs that have entries are listed. | 2815 /// |
1755 * | 2816 /// Request parameters: |
1756 * Request parameters: | 2817 /// |
1757 * | 2818 /// [parent] - Required. The resource name that owns the logs: |
1758 * [parent] - Required. The resource name that owns the logs: | 2819 /// "projects/[PROJECT_ID]" |
1759 * "projects/[PROJECT_ID]" | 2820 /// "organizations/[ORGANIZATION_ID]" |
1760 * "organizations/[ORGANIZATION_ID]" | 2821 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
1761 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 2822 /// "folders/[FOLDER_ID]" |
1762 * "folders/[FOLDER_ID]" | 2823 /// |
1763 * | 2824 /// Value must have pattern "^projects/[^/]+$". |
1764 * Value must have pattern "^projects/[^/]+$". | 2825 /// |
1765 * | 2826 /// [pageToken] - Optional. If present, then retrieve the next batch of |
1766 * [pageToken] - Optional. If present, then retrieve the next batch of results | 2827 /// results from the preceding call to this method. pageToken must be the |
1767 * from the preceding call to this method. pageToken must be the value of | 2828 /// value of nextPageToken from the previous response. The values of other |
1768 * nextPageToken from the previous response. The values of other method | 2829 /// method parameters should be identical to those in the previous call. |
1769 * parameters should be identical to those in the previous call. | 2830 /// |
1770 * | 2831 /// [pageSize] - Optional. The maximum number of results to return from this |
1771 * [pageSize] - Optional. The maximum number of results to return from this | 2832 /// request. Non-positive values are ignored. The presence of nextPageToken |
1772 * request. Non-positive values are ignored. The presence of nextPageToken in | 2833 /// in the response indicates that more results might be available. |
1773 * the response indicates that more results might be available. | 2834 /// |
1774 * | 2835 /// Completes with a [ListLogsResponse]. |
1775 * Completes with a [ListLogsResponse]. | 2836 /// |
1776 * | 2837 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1777 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2838 /// an error. |
1778 * error. | 2839 /// |
1779 * | 2840 /// If the used [http.Client] completes with an error when making a REST |
1780 * If the used [http.Client] completes with an error when making a REST call, | 2841 /// call, this method will complete with the same error. |
1781 * this method will complete with the same error. | 2842 async.Future<ListLogsResponse> list(core.String parent, |
1782 */ | 2843 {core.String pageToken, core.int pageSize}) { |
1783 async.Future<ListLogsResponse> list(core.String parent, {core.String pageToken
, core.int pageSize}) { | |
1784 var _url = null; | 2844 var _url = null; |
1785 var _queryParams = new core.Map(); | 2845 var _queryParams = new core.Map(); |
1786 var _uploadMedia = null; | 2846 var _uploadMedia = null; |
1787 var _uploadOptions = null; | 2847 var _uploadOptions = null; |
1788 var _downloadOptions = commons.DownloadOptions.Metadata; | 2848 var _downloadOptions = commons.DownloadOptions.Metadata; |
1789 var _body = null; | 2849 var _body = null; |
1790 | 2850 |
1791 if (parent == null) { | 2851 if (parent == null) { |
1792 throw new core.ArgumentError("Parameter parent is required."); | 2852 throw new core.ArgumentError("Parameter parent is required."); |
1793 } | 2853 } |
1794 if (pageToken != null) { | 2854 if (pageToken != null) { |
1795 _queryParams["pageToken"] = [pageToken]; | 2855 _queryParams["pageToken"] = [pageToken]; |
1796 } | 2856 } |
1797 if (pageSize != null) { | 2857 if (pageSize != null) { |
1798 _queryParams["pageSize"] = ["${pageSize}"]; | 2858 _queryParams["pageSize"] = ["${pageSize}"]; |
1799 } | 2859 } |
1800 | 2860 |
1801 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs'; | 2861 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs'; |
1802 | 2862 |
1803 var _response = _requester.request(_url, | 2863 var _response = _requester.request(_url, "GET", |
1804 "GET", | 2864 body: _body, |
1805 body: _body, | 2865 queryParams: _queryParams, |
1806 queryParams: _queryParams, | 2866 uploadOptions: _uploadOptions, |
1807 uploadOptions: _uploadOptions, | 2867 uploadMedia: _uploadMedia, |
1808 uploadMedia: _uploadMedia, | 2868 downloadOptions: _downloadOptions); |
1809 downloadOptions: _downloadOptions); | |
1810 return _response.then((data) => new ListLogsResponse.fromJson(data)); | 2869 return _response.then((data) => new ListLogsResponse.fromJson(data)); |
1811 } | 2870 } |
1812 | |
1813 } | 2871 } |
1814 | 2872 |
1815 | |
1816 class ProjectsMetricsResourceApi { | 2873 class ProjectsMetricsResourceApi { |
1817 final commons.ApiRequester _requester; | 2874 final commons.ApiRequester _requester; |
1818 | 2875 |
1819 ProjectsMetricsResourceApi(commons.ApiRequester client) : | 2876 ProjectsMetricsResourceApi(commons.ApiRequester client) : _requester = client; |
1820 _requester = client; | |
1821 | 2877 |
1822 /** | 2878 /// Creates a logs-based metric. |
1823 * Creates a logs-based metric. | 2879 /// |
1824 * | 2880 /// [request] - The metadata request object. |
1825 * [request] - The metadata request object. | 2881 /// |
1826 * | 2882 /// Request parameters: |
1827 * Request parameters: | 2883 /// |
1828 * | 2884 /// [parent] - The resource name of the project in which to create the |
1829 * [parent] - The resource name of the project in which to create the metric: | 2885 /// metric: |
1830 * "projects/[PROJECT_ID]" | 2886 /// "projects/[PROJECT_ID]" |
1831 * The new metric must be provided in the request. | 2887 /// The new metric must be provided in the request. |
1832 * Value must have pattern "^projects/[^/]+$". | 2888 /// Value must have pattern "^projects/[^/]+$". |
1833 * | 2889 /// |
1834 * Completes with a [LogMetric]. | 2890 /// Completes with a [LogMetric]. |
1835 * | 2891 /// |
1836 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2892 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1837 * error. | 2893 /// an error. |
1838 * | 2894 /// |
1839 * If the used [http.Client] completes with an error when making a REST call, | 2895 /// If the used [http.Client] completes with an error when making a REST |
1840 * this method will complete with the same error. | 2896 /// call, this method will complete with the same error. |
1841 */ | |
1842 async.Future<LogMetric> create(LogMetric request, core.String parent) { | 2897 async.Future<LogMetric> create(LogMetric request, core.String parent) { |
1843 var _url = null; | 2898 var _url = null; |
1844 var _queryParams = new core.Map(); | 2899 var _queryParams = new core.Map(); |
1845 var _uploadMedia = null; | 2900 var _uploadMedia = null; |
1846 var _uploadOptions = null; | 2901 var _uploadOptions = null; |
1847 var _downloadOptions = commons.DownloadOptions.Metadata; | 2902 var _downloadOptions = commons.DownloadOptions.Metadata; |
1848 var _body = null; | 2903 var _body = null; |
1849 | 2904 |
1850 if (request != null) { | 2905 if (request != null) { |
1851 _body = convert.JSON.encode((request).toJson()); | 2906 _body = convert.JSON.encode((request).toJson()); |
1852 } | 2907 } |
1853 if (parent == null) { | 2908 if (parent == null) { |
1854 throw new core.ArgumentError("Parameter parent is required."); | 2909 throw new core.ArgumentError("Parameter parent is required."); |
1855 } | 2910 } |
1856 | 2911 |
1857 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/metrics'
; | 2912 _url = |
| 2913 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/metrics'; |
1858 | 2914 |
1859 var _response = _requester.request(_url, | 2915 var _response = _requester.request(_url, "POST", |
1860 "POST", | 2916 body: _body, |
1861 body: _body, | 2917 queryParams: _queryParams, |
1862 queryParams: _queryParams, | 2918 uploadOptions: _uploadOptions, |
1863 uploadOptions: _uploadOptions, | 2919 uploadMedia: _uploadMedia, |
1864 uploadMedia: _uploadMedia, | 2920 downloadOptions: _downloadOptions); |
1865 downloadOptions: _downloadOptions); | |
1866 return _response.then((data) => new LogMetric.fromJson(data)); | 2921 return _response.then((data) => new LogMetric.fromJson(data)); |
1867 } | 2922 } |
1868 | 2923 |
1869 /** | 2924 /// Deletes a logs-based metric. |
1870 * Deletes a logs-based metric. | 2925 /// |
1871 * | 2926 /// Request parameters: |
1872 * Request parameters: | 2927 /// |
1873 * | 2928 /// [metricName] - The resource name of the metric to delete: |
1874 * [metricName] - The resource name of the metric to delete: | 2929 /// "projects/[PROJECT_ID]/metrics/[METRIC_ID]" |
1875 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" | 2930 /// |
1876 * | 2931 /// Value must have pattern "^projects/[^/]+/metrics/[^/]+$". |
1877 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". | 2932 /// |
1878 * | 2933 /// Completes with a [Empty]. |
1879 * Completes with a [Empty]. | 2934 /// |
1880 * | 2935 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1881 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2936 /// an error. |
1882 * error. | 2937 /// |
1883 * | 2938 /// If the used [http.Client] completes with an error when making a REST |
1884 * If the used [http.Client] completes with an error when making a REST call, | 2939 /// call, this method will complete with the same error. |
1885 * this method will complete with the same error. | |
1886 */ | |
1887 async.Future<Empty> delete(core.String metricName) { | 2940 async.Future<Empty> delete(core.String metricName) { |
1888 var _url = null; | 2941 var _url = null; |
1889 var _queryParams = new core.Map(); | 2942 var _queryParams = new core.Map(); |
1890 var _uploadMedia = null; | 2943 var _uploadMedia = null; |
1891 var _uploadOptions = null; | 2944 var _uploadOptions = null; |
1892 var _downloadOptions = commons.DownloadOptions.Metadata; | 2945 var _downloadOptions = commons.DownloadOptions.Metadata; |
1893 var _body = null; | 2946 var _body = null; |
1894 | 2947 |
1895 if (metricName == null) { | 2948 if (metricName == null) { |
1896 throw new core.ArgumentError("Parameter metricName is required."); | 2949 throw new core.ArgumentError("Parameter metricName is required."); |
1897 } | 2950 } |
1898 | 2951 |
1899 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$metricName'); | 2952 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$metricName'); |
1900 | 2953 |
1901 var _response = _requester.request(_url, | 2954 var _response = _requester.request(_url, "DELETE", |
1902 "DELETE", | 2955 body: _body, |
1903 body: _body, | 2956 queryParams: _queryParams, |
1904 queryParams: _queryParams, | 2957 uploadOptions: _uploadOptions, |
1905 uploadOptions: _uploadOptions, | 2958 uploadMedia: _uploadMedia, |
1906 uploadMedia: _uploadMedia, | 2959 downloadOptions: _downloadOptions); |
1907 downloadOptions: _downloadOptions); | |
1908 return _response.then((data) => new Empty.fromJson(data)); | 2960 return _response.then((data) => new Empty.fromJson(data)); |
1909 } | 2961 } |
1910 | 2962 |
1911 /** | 2963 /// Gets a logs-based metric. |
1912 * Gets a logs-based metric. | 2964 /// |
1913 * | 2965 /// Request parameters: |
1914 * Request parameters: | 2966 /// |
1915 * | 2967 /// [metricName] - The resource name of the desired metric: |
1916 * [metricName] - The resource name of the desired metric: | 2968 /// "projects/[PROJECT_ID]/metrics/[METRIC_ID]" |
1917 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" | 2969 /// |
1918 * | 2970 /// Value must have pattern "^projects/[^/]+/metrics/[^/]+$". |
1919 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". | 2971 /// |
1920 * | 2972 /// Completes with a [LogMetric]. |
1921 * Completes with a [LogMetric]. | 2973 /// |
1922 * | 2974 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1923 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2975 /// an error. |
1924 * error. | 2976 /// |
1925 * | 2977 /// If the used [http.Client] completes with an error when making a REST |
1926 * If the used [http.Client] completes with an error when making a REST call, | 2978 /// call, this method will complete with the same error. |
1927 * this method will complete with the same error. | |
1928 */ | |
1929 async.Future<LogMetric> get(core.String metricName) { | 2979 async.Future<LogMetric> get(core.String metricName) { |
1930 var _url = null; | 2980 var _url = null; |
1931 var _queryParams = new core.Map(); | 2981 var _queryParams = new core.Map(); |
1932 var _uploadMedia = null; | 2982 var _uploadMedia = null; |
1933 var _uploadOptions = null; | 2983 var _uploadOptions = null; |
1934 var _downloadOptions = commons.DownloadOptions.Metadata; | 2984 var _downloadOptions = commons.DownloadOptions.Metadata; |
1935 var _body = null; | 2985 var _body = null; |
1936 | 2986 |
1937 if (metricName == null) { | 2987 if (metricName == null) { |
1938 throw new core.ArgumentError("Parameter metricName is required."); | 2988 throw new core.ArgumentError("Parameter metricName is required."); |
1939 } | 2989 } |
1940 | 2990 |
1941 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$metricName'); | 2991 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$metricName'); |
1942 | 2992 |
1943 var _response = _requester.request(_url, | 2993 var _response = _requester.request(_url, "GET", |
1944 "GET", | 2994 body: _body, |
1945 body: _body, | 2995 queryParams: _queryParams, |
1946 queryParams: _queryParams, | 2996 uploadOptions: _uploadOptions, |
1947 uploadOptions: _uploadOptions, | 2997 uploadMedia: _uploadMedia, |
1948 uploadMedia: _uploadMedia, | 2998 downloadOptions: _downloadOptions); |
1949 downloadOptions: _downloadOptions); | |
1950 return _response.then((data) => new LogMetric.fromJson(data)); | 2999 return _response.then((data) => new LogMetric.fromJson(data)); |
1951 } | 3000 } |
1952 | 3001 |
1953 /** | 3002 /// Lists logs-based metrics. |
1954 * Lists logs-based metrics. | 3003 /// |
1955 * | 3004 /// Request parameters: |
1956 * Request parameters: | 3005 /// |
1957 * | 3006 /// [parent] - Required. The name of the project containing the metrics: |
1958 * [parent] - Required. The name of the project containing the metrics: | 3007 /// "projects/[PROJECT_ID]" |
1959 * "projects/[PROJECT_ID]" | 3008 /// |
1960 * | 3009 /// Value must have pattern "^projects/[^/]+$". |
1961 * Value must have pattern "^projects/[^/]+$". | 3010 /// |
1962 * | 3011 /// [pageToken] - Optional. If present, then retrieve the next batch of |
1963 * [pageToken] - Optional. If present, then retrieve the next batch of results | 3012 /// results from the preceding call to this method. pageToken must be the |
1964 * from the preceding call to this method. pageToken must be the value of | 3013 /// value of nextPageToken from the previous response. The values of other |
1965 * nextPageToken from the previous response. The values of other method | 3014 /// method parameters should be identical to those in the previous call. |
1966 * parameters should be identical to those in the previous call. | 3015 /// |
1967 * | 3016 /// [pageSize] - Optional. The maximum number of results to return from this |
1968 * [pageSize] - Optional. The maximum number of results to return from this | 3017 /// request. Non-positive values are ignored. The presence of nextPageToken |
1969 * request. Non-positive values are ignored. The presence of nextPageToken in | 3018 /// in the response indicates that more results might be available. |
1970 * the response indicates that more results might be available. | 3019 /// |
1971 * | 3020 /// Completes with a [ListLogMetricsResponse]. |
1972 * Completes with a [ListLogMetricsResponse]. | 3021 /// |
1973 * | 3022 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1974 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3023 /// an error. |
1975 * error. | 3024 /// |
1976 * | 3025 /// If the used [http.Client] completes with an error when making a REST |
1977 * If the used [http.Client] completes with an error when making a REST call, | 3026 /// call, this method will complete with the same error. |
1978 * this method will complete with the same error. | 3027 async.Future<ListLogMetricsResponse> list(core.String parent, |
1979 */ | 3028 {core.String pageToken, core.int pageSize}) { |
1980 async.Future<ListLogMetricsResponse> list(core.String parent, {core.String pag
eToken, core.int pageSize}) { | |
1981 var _url = null; | 3029 var _url = null; |
1982 var _queryParams = new core.Map(); | 3030 var _queryParams = new core.Map(); |
1983 var _uploadMedia = null; | 3031 var _uploadMedia = null; |
1984 var _uploadOptions = null; | 3032 var _uploadOptions = null; |
1985 var _downloadOptions = commons.DownloadOptions.Metadata; | 3033 var _downloadOptions = commons.DownloadOptions.Metadata; |
1986 var _body = null; | 3034 var _body = null; |
1987 | 3035 |
1988 if (parent == null) { | 3036 if (parent == null) { |
1989 throw new core.ArgumentError("Parameter parent is required."); | 3037 throw new core.ArgumentError("Parameter parent is required."); |
1990 } | 3038 } |
1991 if (pageToken != null) { | 3039 if (pageToken != null) { |
1992 _queryParams["pageToken"] = [pageToken]; | 3040 _queryParams["pageToken"] = [pageToken]; |
1993 } | 3041 } |
1994 if (pageSize != null) { | 3042 if (pageSize != null) { |
1995 _queryParams["pageSize"] = ["${pageSize}"]; | 3043 _queryParams["pageSize"] = ["${pageSize}"]; |
1996 } | 3044 } |
1997 | 3045 |
1998 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/metrics'
; | 3046 _url = |
| 3047 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/metrics'; |
1999 | 3048 |
2000 var _response = _requester.request(_url, | 3049 var _response = _requester.request(_url, "GET", |
2001 "GET", | 3050 body: _body, |
2002 body: _body, | 3051 queryParams: _queryParams, |
2003 queryParams: _queryParams, | 3052 uploadOptions: _uploadOptions, |
2004 uploadOptions: _uploadOptions, | 3053 uploadMedia: _uploadMedia, |
2005 uploadMedia: _uploadMedia, | 3054 downloadOptions: _downloadOptions); |
2006 downloadOptions: _downloadOptions); | |
2007 return _response.then((data) => new ListLogMetricsResponse.fromJson(data)); | 3055 return _response.then((data) => new ListLogMetricsResponse.fromJson(data)); |
2008 } | 3056 } |
2009 | 3057 |
2010 /** | 3058 /// Creates or updates a logs-based metric. |
2011 * Creates or updates a logs-based metric. | 3059 /// |
2012 * | 3060 /// [request] - The metadata request object. |
2013 * [request] - The metadata request object. | 3061 /// |
2014 * | 3062 /// Request parameters: |
2015 * Request parameters: | 3063 /// |
2016 * | 3064 /// [metricName] - The resource name of the metric to update: |
2017 * [metricName] - The resource name of the metric to update: | 3065 /// "projects/[PROJECT_ID]/metrics/[METRIC_ID]" |
2018 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" | 3066 /// The updated metric must be provided in the request and it's name field |
2019 * The updated metric must be provided in the request and it's name field must | 3067 /// must be the same as [METRIC_ID] If the metric does not exist in |
2020 * be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], | 3068 /// [PROJECT_ID], then a new metric is created. |
2021 * then a new metric is created. | 3069 /// Value must have pattern "^projects/[^/]+/metrics/[^/]+$". |
2022 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". | 3070 /// |
2023 * | 3071 /// Completes with a [LogMetric]. |
2024 * Completes with a [LogMetric]. | 3072 /// |
2025 * | 3073 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2026 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3074 /// an error. |
2027 * error. | 3075 /// |
2028 * | 3076 /// If the used [http.Client] completes with an error when making a REST |
2029 * If the used [http.Client] completes with an error when making a REST call, | 3077 /// call, this method will complete with the same error. |
2030 * this method will complete with the same error. | |
2031 */ | |
2032 async.Future<LogMetric> update(LogMetric request, core.String metricName) { | 3078 async.Future<LogMetric> update(LogMetric request, core.String metricName) { |
2033 var _url = null; | 3079 var _url = null; |
2034 var _queryParams = new core.Map(); | 3080 var _queryParams = new core.Map(); |
2035 var _uploadMedia = null; | 3081 var _uploadMedia = null; |
2036 var _uploadOptions = null; | 3082 var _uploadOptions = null; |
2037 var _downloadOptions = commons.DownloadOptions.Metadata; | 3083 var _downloadOptions = commons.DownloadOptions.Metadata; |
2038 var _body = null; | 3084 var _body = null; |
2039 | 3085 |
2040 if (request != null) { | 3086 if (request != null) { |
2041 _body = convert.JSON.encode((request).toJson()); | 3087 _body = convert.JSON.encode((request).toJson()); |
2042 } | 3088 } |
2043 if (metricName == null) { | 3089 if (metricName == null) { |
2044 throw new core.ArgumentError("Parameter metricName is required."); | 3090 throw new core.ArgumentError("Parameter metricName is required."); |
2045 } | 3091 } |
2046 | 3092 |
2047 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$metricName'); | 3093 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$metricName'); |
2048 | 3094 |
2049 var _response = _requester.request(_url, | 3095 var _response = _requester.request(_url, "PUT", |
2050 "PUT", | 3096 body: _body, |
2051 body: _body, | 3097 queryParams: _queryParams, |
2052 queryParams: _queryParams, | 3098 uploadOptions: _uploadOptions, |
2053 uploadOptions: _uploadOptions, | 3099 uploadMedia: _uploadMedia, |
2054 uploadMedia: _uploadMedia, | 3100 downloadOptions: _downloadOptions); |
2055 downloadOptions: _downloadOptions); | |
2056 return _response.then((data) => new LogMetric.fromJson(data)); | 3101 return _response.then((data) => new LogMetric.fromJson(data)); |
2057 } | 3102 } |
2058 | |
2059 } | 3103 } |
2060 | 3104 |
2061 | |
2062 class ProjectsSinksResourceApi { | 3105 class ProjectsSinksResourceApi { |
2063 final commons.ApiRequester _requester; | 3106 final commons.ApiRequester _requester; |
2064 | 3107 |
2065 ProjectsSinksResourceApi(commons.ApiRequester client) : | 3108 ProjectsSinksResourceApi(commons.ApiRequester client) : _requester = client; |
2066 _requester = client; | |
2067 | 3109 |
2068 /** | 3110 /// Creates a sink that exports specified log entries to a destination. The |
2069 * Creates a sink that exports specified log entries to a destination. The | 3111 /// export of newly-ingested log entries begins immediately, unless the |
2070 * export of newly-ingested log entries begins immediately, unless the current | 3112 /// sink's writer_identity is not permitted to write to the destination. A |
2071 * time is outside the sink's start and end times or the sink's | 3113 /// sink can export log entries only from the resource owning the sink. |
2072 * writer_identity is not permitted to write to the destination. A sink can | 3114 /// |
2073 * export log entries only from the resource owning the sink. | 3115 /// [request] - The metadata request object. |
2074 * | 3116 /// |
2075 * [request] - The metadata request object. | 3117 /// Request parameters: |
2076 * | 3118 /// |
2077 * Request parameters: | 3119 /// [parent] - Required. The resource in which to create the sink: |
2078 * | 3120 /// "projects/[PROJECT_ID]" |
2079 * [parent] - Required. The resource in which to create the sink: | 3121 /// "organizations/[ORGANIZATION_ID]" |
2080 * "projects/[PROJECT_ID]" | 3122 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
2081 * "organizations/[ORGANIZATION_ID]" | 3123 /// "folders/[FOLDER_ID]" |
2082 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 3124 /// Examples: "projects/my-logging-project", "organizations/123456789". |
2083 * "folders/[FOLDER_ID]" | 3125 /// Value must have pattern "^projects/[^/]+$". |
2084 * Examples: "projects/my-logging-project", "organizations/123456789". | 3126 /// |
2085 * Value must have pattern "^projects/[^/]+$". | 3127 /// [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity |
2086 * | 3128 /// returned as writer_identity in the new sink. If this value is omitted or |
2087 * [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity | 3129 /// set to false, and if the sink's parent is a project, then the value |
2088 * returned as writer_identity in the new sink. If this value is omitted or | 3130 /// returned as writer_identity is the same group or service account used by |
2089 * set to false, and if the sink's parent is a project, then the value | 3131 /// Stackdriver Logging before the addition of writer identities to this API. |
2090 * returned as writer_identity is the same group or service account used by | 3132 /// The sink's destination must be in the same project as the sink itself.If |
2091 * Stackdriver Logging before the addition of writer identities to this API. | 3133 /// this field is set to true, or if the sink is owned by a non-project |
2092 * The sink's destination must be in the same project as the sink itself.If | 3134 /// resource such as an organization, then the value of writer_identity will |
2093 * this field is set to true, or if the sink is owned by a non-project | 3135 /// be a unique service account used only for exports from the new sink. For |
2094 * resource such as an organization, then the value of writer_identity will be | 3136 /// more information, see writer_identity in LogSink. |
2095 * a unique service account used only for exports from the new sink. For more | 3137 /// |
2096 * information, see writer_identity in LogSink. | 3138 /// Completes with a [LogSink]. |
2097 * | 3139 /// |
2098 * Completes with a [LogSink]. | 3140 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2099 * | 3141 /// an error. |
2100 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3142 /// |
2101 * error. | 3143 /// If the used [http.Client] completes with an error when making a REST |
2102 * | 3144 /// call, this method will complete with the same error. |
2103 * If the used [http.Client] completes with an error when making a REST call, | 3145 async.Future<LogSink> create(LogSink request, core.String parent, |
2104 * this method will complete with the same error. | 3146 {core.bool uniqueWriterIdentity}) { |
2105 */ | |
2106 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u
niqueWriterIdentity}) { | |
2107 var _url = null; | 3147 var _url = null; |
2108 var _queryParams = new core.Map(); | 3148 var _queryParams = new core.Map(); |
2109 var _uploadMedia = null; | 3149 var _uploadMedia = null; |
2110 var _uploadOptions = null; | 3150 var _uploadOptions = null; |
2111 var _downloadOptions = commons.DownloadOptions.Metadata; | 3151 var _downloadOptions = commons.DownloadOptions.Metadata; |
2112 var _body = null; | 3152 var _body = null; |
2113 | 3153 |
2114 if (request != null) { | 3154 if (request != null) { |
2115 _body = convert.JSON.encode((request).toJson()); | 3155 _body = convert.JSON.encode((request).toJson()); |
2116 } | 3156 } |
2117 if (parent == null) { | 3157 if (parent == null) { |
2118 throw new core.ArgumentError("Parameter parent is required."); | 3158 throw new core.ArgumentError("Parameter parent is required."); |
2119 } | 3159 } |
2120 if (uniqueWriterIdentity != null) { | 3160 if (uniqueWriterIdentity != null) { |
2121 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 3161 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
2122 } | 3162 } |
2123 | 3163 |
2124 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; | 3164 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; |
2125 | 3165 |
2126 var _response = _requester.request(_url, | 3166 var _response = _requester.request(_url, "POST", |
2127 "POST", | 3167 body: _body, |
2128 body: _body, | 3168 queryParams: _queryParams, |
2129 queryParams: _queryParams, | 3169 uploadOptions: _uploadOptions, |
2130 uploadOptions: _uploadOptions, | 3170 uploadMedia: _uploadMedia, |
2131 uploadMedia: _uploadMedia, | 3171 downloadOptions: _downloadOptions); |
2132 downloadOptions: _downloadOptions); | |
2133 return _response.then((data) => new LogSink.fromJson(data)); | 3172 return _response.then((data) => new LogSink.fromJson(data)); |
2134 } | 3173 } |
2135 | 3174 |
2136 /** | 3175 /// Deletes a sink. If the sink has a unique writer_identity, then that |
2137 * Deletes a sink. If the sink has a unique writer_identity, then that service | 3176 /// service account is also deleted. |
2138 * account is also deleted. | 3177 /// |
2139 * | 3178 /// Request parameters: |
2140 * Request parameters: | 3179 /// |
2141 * | 3180 /// [sinkName] - Required. The full resource name of the sink to delete, |
2142 * [sinkName] - Required. The full resource name of the sink to delete, | 3181 /// including the parent resource and the sink identifier: |
2143 * including the parent resource and the sink identifier: | 3182 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
2144 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 3183 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
2145 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 3184 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
2146 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 3185 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
2147 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 3186 /// Example: "projects/my-project-id/sinks/my-sink-id". |
2148 * Example: "projects/my-project-id/sinks/my-sink-id". | 3187 /// Value must have pattern "^projects/[^/]+/sinks/[^/]+$". |
2149 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". | 3188 /// |
2150 * | 3189 /// Completes with a [Empty]. |
2151 * Completes with a [Empty]. | 3190 /// |
2152 * | 3191 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2153 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3192 /// an error. |
2154 * error. | 3193 /// |
2155 * | 3194 /// If the used [http.Client] completes with an error when making a REST |
2156 * If the used [http.Client] completes with an error when making a REST call, | 3195 /// call, this method will complete with the same error. |
2157 * this method will complete with the same error. | |
2158 */ | |
2159 async.Future<Empty> delete(core.String sinkName) { | 3196 async.Future<Empty> delete(core.String sinkName) { |
2160 var _url = null; | 3197 var _url = null; |
2161 var _queryParams = new core.Map(); | 3198 var _queryParams = new core.Map(); |
2162 var _uploadMedia = null; | 3199 var _uploadMedia = null; |
2163 var _uploadOptions = null; | 3200 var _uploadOptions = null; |
2164 var _downloadOptions = commons.DownloadOptions.Metadata; | 3201 var _downloadOptions = commons.DownloadOptions.Metadata; |
2165 var _body = null; | 3202 var _body = null; |
2166 | 3203 |
2167 if (sinkName == null) { | 3204 if (sinkName == null) { |
2168 throw new core.ArgumentError("Parameter sinkName is required."); | 3205 throw new core.ArgumentError("Parameter sinkName is required."); |
2169 } | 3206 } |
2170 | 3207 |
2171 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 3208 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
2172 | 3209 |
2173 var _response = _requester.request(_url, | 3210 var _response = _requester.request(_url, "DELETE", |
2174 "DELETE", | 3211 body: _body, |
2175 body: _body, | 3212 queryParams: _queryParams, |
2176 queryParams: _queryParams, | 3213 uploadOptions: _uploadOptions, |
2177 uploadOptions: _uploadOptions, | 3214 uploadMedia: _uploadMedia, |
2178 uploadMedia: _uploadMedia, | 3215 downloadOptions: _downloadOptions); |
2179 downloadOptions: _downloadOptions); | |
2180 return _response.then((data) => new Empty.fromJson(data)); | 3216 return _response.then((data) => new Empty.fromJson(data)); |
2181 } | 3217 } |
2182 | 3218 |
2183 /** | 3219 /// Gets a sink. |
2184 * Gets a sink. | 3220 /// |
2185 * | 3221 /// Request parameters: |
2186 * Request parameters: | 3222 /// |
2187 * | 3223 /// [sinkName] - Required. The resource name of the sink: |
2188 * [sinkName] - Required. The resource name of the sink: | 3224 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
2189 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 3225 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
2190 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 3226 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
2191 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 3227 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
2192 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 3228 /// Example: "projects/my-project-id/sinks/my-sink-id". |
2193 * Example: "projects/my-project-id/sinks/my-sink-id". | 3229 /// Value must have pattern "^projects/[^/]+/sinks/[^/]+$". |
2194 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". | 3230 /// |
2195 * | 3231 /// Completes with a [LogSink]. |
2196 * Completes with a [LogSink]. | 3232 /// |
2197 * | 3233 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2198 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3234 /// an error. |
2199 * error. | 3235 /// |
2200 * | 3236 /// If the used [http.Client] completes with an error when making a REST |
2201 * If the used [http.Client] completes with an error when making a REST call, | 3237 /// call, this method will complete with the same error. |
2202 * this method will complete with the same error. | |
2203 */ | |
2204 async.Future<LogSink> get(core.String sinkName) { | 3238 async.Future<LogSink> get(core.String sinkName) { |
2205 var _url = null; | 3239 var _url = null; |
2206 var _queryParams = new core.Map(); | 3240 var _queryParams = new core.Map(); |
2207 var _uploadMedia = null; | 3241 var _uploadMedia = null; |
2208 var _uploadOptions = null; | 3242 var _uploadOptions = null; |
2209 var _downloadOptions = commons.DownloadOptions.Metadata; | 3243 var _downloadOptions = commons.DownloadOptions.Metadata; |
2210 var _body = null; | 3244 var _body = null; |
2211 | 3245 |
2212 if (sinkName == null) { | 3246 if (sinkName == null) { |
2213 throw new core.ArgumentError("Parameter sinkName is required."); | 3247 throw new core.ArgumentError("Parameter sinkName is required."); |
2214 } | 3248 } |
2215 | 3249 |
2216 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 3250 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
2217 | 3251 |
2218 var _response = _requester.request(_url, | 3252 var _response = _requester.request(_url, "GET", |
2219 "GET", | 3253 body: _body, |
2220 body: _body, | 3254 queryParams: _queryParams, |
2221 queryParams: _queryParams, | 3255 uploadOptions: _uploadOptions, |
2222 uploadOptions: _uploadOptions, | 3256 uploadMedia: _uploadMedia, |
2223 uploadMedia: _uploadMedia, | 3257 downloadOptions: _downloadOptions); |
2224 downloadOptions: _downloadOptions); | |
2225 return _response.then((data) => new LogSink.fromJson(data)); | 3258 return _response.then((data) => new LogSink.fromJson(data)); |
2226 } | 3259 } |
2227 | 3260 |
2228 /** | 3261 /// Lists sinks. |
2229 * Lists sinks. | 3262 /// |
2230 * | 3263 /// Request parameters: |
2231 * Request parameters: | 3264 /// |
2232 * | 3265 /// [parent] - Required. The parent resource whose sinks are to be listed: |
2233 * [parent] - Required. The parent resource whose sinks are to be listed: | 3266 /// "projects/[PROJECT_ID]" |
2234 * "projects/[PROJECT_ID]" | 3267 /// "organizations/[ORGANIZATION_ID]" |
2235 * "organizations/[ORGANIZATION_ID]" | 3268 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
2236 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 3269 /// "folders/[FOLDER_ID]" |
2237 * "folders/[FOLDER_ID]" | 3270 /// |
2238 * | 3271 /// Value must have pattern "^projects/[^/]+$". |
2239 * Value must have pattern "^projects/[^/]+$". | 3272 /// |
2240 * | 3273 /// [pageToken] - Optional. If present, then retrieve the next batch of |
2241 * [pageToken] - Optional. If present, then retrieve the next batch of results | 3274 /// results from the preceding call to this method. pageToken must be the |
2242 * from the preceding call to this method. pageToken must be the value of | 3275 /// value of nextPageToken from the previous response. The values of other |
2243 * nextPageToken from the previous response. The values of other method | 3276 /// method parameters should be identical to those in the previous call. |
2244 * parameters should be identical to those in the previous call. | 3277 /// |
2245 * | 3278 /// [pageSize] - Optional. The maximum number of results to return from this |
2246 * [pageSize] - Optional. The maximum number of results to return from this | 3279 /// request. Non-positive values are ignored. The presence of nextPageToken |
2247 * request. Non-positive values are ignored. The presence of nextPageToken in | 3280 /// in the response indicates that more results might be available. |
2248 * the response indicates that more results might be available. | 3281 /// |
2249 * | 3282 /// Completes with a [ListSinksResponse]. |
2250 * Completes with a [ListSinksResponse]. | 3283 /// |
2251 * | 3284 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2252 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3285 /// an error. |
2253 * error. | 3286 /// |
2254 * | 3287 /// If the used [http.Client] completes with an error when making a REST |
2255 * If the used [http.Client] completes with an error when making a REST call, | 3288 /// call, this method will complete with the same error. |
2256 * this method will complete with the same error. | 3289 async.Future<ListSinksResponse> list(core.String parent, |
2257 */ | 3290 {core.String pageToken, core.int pageSize}) { |
2258 async.Future<ListSinksResponse> list(core.String parent, {core.String pageToke
n, core.int pageSize}) { | |
2259 var _url = null; | 3291 var _url = null; |
2260 var _queryParams = new core.Map(); | 3292 var _queryParams = new core.Map(); |
2261 var _uploadMedia = null; | 3293 var _uploadMedia = null; |
2262 var _uploadOptions = null; | 3294 var _uploadOptions = null; |
2263 var _downloadOptions = commons.DownloadOptions.Metadata; | 3295 var _downloadOptions = commons.DownloadOptions.Metadata; |
2264 var _body = null; | 3296 var _body = null; |
2265 | 3297 |
2266 if (parent == null) { | 3298 if (parent == null) { |
2267 throw new core.ArgumentError("Parameter parent is required."); | 3299 throw new core.ArgumentError("Parameter parent is required."); |
2268 } | 3300 } |
2269 if (pageToken != null) { | 3301 if (pageToken != null) { |
2270 _queryParams["pageToken"] = [pageToken]; | 3302 _queryParams["pageToken"] = [pageToken]; |
2271 } | 3303 } |
2272 if (pageSize != null) { | 3304 if (pageSize != null) { |
2273 _queryParams["pageSize"] = ["${pageSize}"]; | 3305 _queryParams["pageSize"] = ["${pageSize}"]; |
2274 } | 3306 } |
2275 | 3307 |
2276 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; | 3308 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks'; |
2277 | 3309 |
2278 var _response = _requester.request(_url, | 3310 var _response = _requester.request(_url, "GET", |
2279 "GET", | 3311 body: _body, |
2280 body: _body, | 3312 queryParams: _queryParams, |
2281 queryParams: _queryParams, | 3313 uploadOptions: _uploadOptions, |
2282 uploadOptions: _uploadOptions, | 3314 uploadMedia: _uploadMedia, |
2283 uploadMedia: _uploadMedia, | 3315 downloadOptions: _downloadOptions); |
2284 downloadOptions: _downloadOptions); | |
2285 return _response.then((data) => new ListSinksResponse.fromJson(data)); | 3316 return _response.then((data) => new ListSinksResponse.fromJson(data)); |
2286 } | 3317 } |
2287 | 3318 |
2288 /** | 3319 /// Updates a sink. This method replaces the following fields in the existing |
2289 * Updates a sink. This method replaces the following fields in the existing | 3320 /// sink with values from the new sink: destination, and filter. The updated |
2290 * sink with values from the new sink: destination, filter, | 3321 /// sink might also have a new writer_identity; see the |
2291 * output_version_format, start_time, and end_time. The updated sink might | 3322 /// unique_writer_identity field. |
2292 * also have a new writer_identity; see the unique_writer_identity field. | 3323 /// |
2293 * | 3324 /// [request] - The metadata request object. |
2294 * [request] - The metadata request object. | 3325 /// |
2295 * | 3326 /// Request parameters: |
2296 * Request parameters: | 3327 /// |
2297 * | 3328 /// [sinkName] - Required. The full resource name of the sink to update, |
2298 * [sinkName] - Required. The full resource name of the sink to update, | 3329 /// including the parent resource and the sink identifier: |
2299 * including the parent resource and the sink identifier: | 3330 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
2300 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 3331 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
2301 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 3332 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
2302 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 3333 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
2303 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 3334 /// Example: "projects/my-project-id/sinks/my-sink-id". |
2304 * Example: "projects/my-project-id/sinks/my-sink-id". | 3335 /// Value must have pattern "^projects/[^/]+/sinks/[^/]+$". |
2305 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". | 3336 /// |
2306 * | 3337 /// [updateMask] - Optional. Field mask that specifies the fields in sink |
2307 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of | 3338 /// that need an update. A sink field will be overwritten if, and only if, it |
2308 * this field. When updating a sink, the effect of this field on the value of | 3339 /// is in the update mask. name and output only fields cannot be updated.An |
2309 * writer_identity in the updated sink depends on both the old and new values | 3340 /// empty updateMask is temporarily treated as using the following mask for |
2310 * of this field: | 3341 /// backwards compatibility purposes: destination,filter,includeChildren At |
2311 * If the old and new values of this field are both false or both true, then | 3342 /// some point in the future, behavior will be removed and specifying an |
2312 * there is no change to the sink's writer_identity. | 3343 /// empty updateMask will be an error.For a detailed FieldMask definition, |
2313 * If the old value is false and the new value is true, then writer_identity | 3344 /// see |
2314 * is changed to a unique service account. | 3345 /// https://developers.google.com/protocol-buffers/docs/reference/google.proto
buf#fieldmaskExample: |
2315 * It is an error if the old value is true and the new value is set to false | 3346 /// updateMask=filter. |
2316 * or defaulted to false. | 3347 /// |
2317 * | 3348 /// [uniqueWriterIdentity] - Optional. See sinks.create for a description of |
2318 * Completes with a [LogSink]. | 3349 /// this field. When updating a sink, the effect of this field on the value |
2319 * | 3350 /// of writer_identity in the updated sink depends on both the old and new |
2320 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3351 /// values of this field: |
2321 * error. | 3352 /// If the old and new values of this field are both false or both true, then |
2322 * | 3353 /// there is no change to the sink's writer_identity. |
2323 * If the used [http.Client] completes with an error when making a REST call, | 3354 /// If the old value is false and the new value is true, then writer_identity |
2324 * this method will complete with the same error. | 3355 /// is changed to a unique service account. |
2325 */ | 3356 /// It is an error if the old value is true and the new value is set to false |
2326 async.Future<LogSink> patch(LogSink request, core.String sinkName, {core.bool
uniqueWriterIdentity}) { | 3357 /// or defaulted to false. |
| 3358 /// |
| 3359 /// Completes with a [LogSink]. |
| 3360 /// |
| 3361 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 3362 /// an error. |
| 3363 /// |
| 3364 /// If the used [http.Client] completes with an error when making a REST |
| 3365 /// call, this method will complete with the same error. |
| 3366 async.Future<LogSink> patch(LogSink request, core.String sinkName, |
| 3367 {core.String updateMask, core.bool uniqueWriterIdentity}) { |
2327 var _url = null; | 3368 var _url = null; |
2328 var _queryParams = new core.Map(); | 3369 var _queryParams = new core.Map(); |
2329 var _uploadMedia = null; | 3370 var _uploadMedia = null; |
2330 var _uploadOptions = null; | 3371 var _uploadOptions = null; |
2331 var _downloadOptions = commons.DownloadOptions.Metadata; | 3372 var _downloadOptions = commons.DownloadOptions.Metadata; |
2332 var _body = null; | 3373 var _body = null; |
2333 | 3374 |
2334 if (request != null) { | 3375 if (request != null) { |
2335 _body = convert.JSON.encode((request).toJson()); | 3376 _body = convert.JSON.encode((request).toJson()); |
2336 } | 3377 } |
2337 if (sinkName == null) { | 3378 if (sinkName == null) { |
2338 throw new core.ArgumentError("Parameter sinkName is required."); | 3379 throw new core.ArgumentError("Parameter sinkName is required."); |
2339 } | 3380 } |
| 3381 if (updateMask != null) { |
| 3382 _queryParams["updateMask"] = [updateMask]; |
| 3383 } |
2340 if (uniqueWriterIdentity != null) { | 3384 if (uniqueWriterIdentity != null) { |
2341 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 3385 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
2342 } | 3386 } |
2343 | 3387 |
2344 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 3388 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
2345 | 3389 |
2346 var _response = _requester.request(_url, | 3390 var _response = _requester.request(_url, "PATCH", |
2347 "PATCH", | 3391 body: _body, |
2348 body: _body, | 3392 queryParams: _queryParams, |
2349 queryParams: _queryParams, | 3393 uploadOptions: _uploadOptions, |
2350 uploadOptions: _uploadOptions, | 3394 uploadMedia: _uploadMedia, |
2351 uploadMedia: _uploadMedia, | 3395 downloadOptions: _downloadOptions); |
2352 downloadOptions: _downloadOptions); | |
2353 return _response.then((data) => new LogSink.fromJson(data)); | 3396 return _response.then((data) => new LogSink.fromJson(data)); |
2354 } | 3397 } |
2355 | 3398 |
2356 /** | 3399 /// Updates a sink. This method replaces the following fields in the existing |
2357 * Updates a sink. This method replaces the following fields in the existing | 3400 /// sink with values from the new sink: destination, and filter. The updated |
2358 * sink with values from the new sink: destination, filter, | 3401 /// sink might also have a new writer_identity; see the |
2359 * output_version_format, start_time, and end_time. The updated sink might | 3402 /// unique_writer_identity field. |
2360 * also have a new writer_identity; see the unique_writer_identity field. | 3403 /// |
2361 * | 3404 /// [request] - The metadata request object. |
2362 * [request] - The metadata request object. | 3405 /// |
2363 * | 3406 /// Request parameters: |
2364 * Request parameters: | 3407 /// |
2365 * | 3408 /// [sinkName] - Required. The full resource name of the sink to update, |
2366 * [sinkName] - Required. The full resource name of the sink to update, | 3409 /// including the parent resource and the sink identifier: |
2367 * including the parent resource and the sink identifier: | 3410 /// "projects/[PROJECT_ID]/sinks/[SINK_ID]" |
2368 * "projects/[PROJECT_ID]/sinks/[SINK_ID]" | 3411 /// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" |
2369 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" | 3412 /// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" |
2370 * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" | 3413 /// "folders/[FOLDER_ID]/sinks/[SINK_ID]" |
2371 * "folders/[FOLDER_ID]/sinks/[SINK_ID]" | 3414 /// Example: "projects/my-project-id/sinks/my-sink-id". |
2372 * Example: "projects/my-project-id/sinks/my-sink-id". | 3415 /// Value must have pattern "^projects/[^/]+/sinks/[^/]+$". |
2373 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". | 3416 /// |
2374 * | 3417 /// [updateMask] - Optional. Field mask that specifies the fields in sink |
2375 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of | 3418 /// that need an update. A sink field will be overwritten if, and only if, it |
2376 * this field. When updating a sink, the effect of this field on the value of | 3419 /// is in the update mask. name and output only fields cannot be updated.An |
2377 * writer_identity in the updated sink depends on both the old and new values | 3420 /// empty updateMask is temporarily treated as using the following mask for |
2378 * of this field: | 3421 /// backwards compatibility purposes: destination,filter,includeChildren At |
2379 * If the old and new values of this field are both false or both true, then | 3422 /// some point in the future, behavior will be removed and specifying an |
2380 * there is no change to the sink's writer_identity. | 3423 /// empty updateMask will be an error.For a detailed FieldMask definition, |
2381 * If the old value is false and the new value is true, then writer_identity | 3424 /// see |
2382 * is changed to a unique service account. | 3425 /// https://developers.google.com/protocol-buffers/docs/reference/google.proto
buf#fieldmaskExample: |
2383 * It is an error if the old value is true and the new value is set to false | 3426 /// updateMask=filter. |
2384 * or defaulted to false. | 3427 /// |
2385 * | 3428 /// [uniqueWriterIdentity] - Optional. See sinks.create for a description of |
2386 * Completes with a [LogSink]. | 3429 /// this field. When updating a sink, the effect of this field on the value |
2387 * | 3430 /// of writer_identity in the updated sink depends on both the old and new |
2388 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3431 /// values of this field: |
2389 * error. | 3432 /// If the old and new values of this field are both false or both true, then |
2390 * | 3433 /// there is no change to the sink's writer_identity. |
2391 * If the used [http.Client] completes with an error when making a REST call, | 3434 /// If the old value is false and the new value is true, then writer_identity |
2392 * this method will complete with the same error. | 3435 /// is changed to a unique service account. |
2393 */ | 3436 /// It is an error if the old value is true and the new value is set to false |
2394 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool
uniqueWriterIdentity}) { | 3437 /// or defaulted to false. |
| 3438 /// |
| 3439 /// Completes with a [LogSink]. |
| 3440 /// |
| 3441 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 3442 /// an error. |
| 3443 /// |
| 3444 /// If the used [http.Client] completes with an error when making a REST |
| 3445 /// call, this method will complete with the same error. |
| 3446 async.Future<LogSink> update(LogSink request, core.String sinkName, |
| 3447 {core.String updateMask, core.bool uniqueWriterIdentity}) { |
2395 var _url = null; | 3448 var _url = null; |
2396 var _queryParams = new core.Map(); | 3449 var _queryParams = new core.Map(); |
2397 var _uploadMedia = null; | 3450 var _uploadMedia = null; |
2398 var _uploadOptions = null; | 3451 var _uploadOptions = null; |
2399 var _downloadOptions = commons.DownloadOptions.Metadata; | 3452 var _downloadOptions = commons.DownloadOptions.Metadata; |
2400 var _body = null; | 3453 var _body = null; |
2401 | 3454 |
2402 if (request != null) { | 3455 if (request != null) { |
2403 _body = convert.JSON.encode((request).toJson()); | 3456 _body = convert.JSON.encode((request).toJson()); |
2404 } | 3457 } |
2405 if (sinkName == null) { | 3458 if (sinkName == null) { |
2406 throw new core.ArgumentError("Parameter sinkName is required."); | 3459 throw new core.ArgumentError("Parameter sinkName is required."); |
2407 } | 3460 } |
| 3461 if (updateMask != null) { |
| 3462 _queryParams["updateMask"] = [updateMask]; |
| 3463 } |
2408 if (uniqueWriterIdentity != null) { | 3464 if (uniqueWriterIdentity != null) { |
2409 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; | 3465 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
2410 } | 3466 } |
2411 | 3467 |
2412 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 3468 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
2413 | 3469 |
2414 var _response = _requester.request(_url, | 3470 var _response = _requester.request(_url, "PUT", |
2415 "PUT", | 3471 body: _body, |
2416 body: _body, | 3472 queryParams: _queryParams, |
2417 queryParams: _queryParams, | 3473 uploadOptions: _uploadOptions, |
2418 uploadOptions: _uploadOptions, | 3474 uploadMedia: _uploadMedia, |
2419 uploadMedia: _uploadMedia, | 3475 downloadOptions: _downloadOptions); |
2420 downloadOptions: _downloadOptions); | |
2421 return _response.then((data) => new LogSink.fromJson(data)); | 3476 return _response.then((data) => new LogSink.fromJson(data)); |
2422 } | 3477 } |
2423 | 3478 } |
2424 } | 3479 |
2425 | 3480 /// BucketOptions describes the bucket boundaries used to create a histogram |
2426 | 3481 /// for the distribution. The buckets can be in a linear sequence, an |
2427 | 3482 /// exponential sequence, or each bucket can be specified explicitly. |
2428 /** | 3483 /// BucketOptions does not include the number of values in each bucket.A bucket |
2429 * A generic empty message that you can re-use to avoid defining duplicated | 3484 /// has an inclusive lower bound and exclusive upper bound for the values that |
2430 * empty messages in your APIs. A typical example is to use it as the request or | 3485 /// are counted for that bucket. The upper bound of a bucket must be strictly |
2431 * the response type of an API method. For instance: | 3486 /// greater than the lower bound. The sequence of N buckets for a distribution |
2432 * service Foo { | 3487 /// consists of an underflow bucket (number 0), zero or more finite buckets |
2433 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 3488 /// (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets |
2434 * } | 3489 /// are contiguous: the lower bound of bucket i (i > 0) is the same as the |
2435 * The JSON representation for Empty is empty JSON object {}. | 3490 /// upper bound of bucket i - 1. The buckets span the whole range of finite |
2436 */ | 3491 /// values: lower bound of the underflow bucket is -infinity and the upper |
| 3492 /// bound of the overflow bucket is +infinity. The finite buckets are so-called |
| 3493 /// because both bounds are finite. |
| 3494 class BucketOptions { |
| 3495 /// The explicit buckets. |
| 3496 Explicit explicitBuckets; |
| 3497 |
| 3498 /// The exponential buckets. |
| 3499 Exponential exponentialBuckets; |
| 3500 |
| 3501 /// The linear bucket. |
| 3502 Linear linearBuckets; |
| 3503 |
| 3504 BucketOptions(); |
| 3505 |
| 3506 BucketOptions.fromJson(core.Map _json) { |
| 3507 if (_json.containsKey("explicitBuckets")) { |
| 3508 explicitBuckets = new Explicit.fromJson(_json["explicitBuckets"]); |
| 3509 } |
| 3510 if (_json.containsKey("exponentialBuckets")) { |
| 3511 exponentialBuckets = |
| 3512 new Exponential.fromJson(_json["exponentialBuckets"]); |
| 3513 } |
| 3514 if (_json.containsKey("linearBuckets")) { |
| 3515 linearBuckets = new Linear.fromJson(_json["linearBuckets"]); |
| 3516 } |
| 3517 } |
| 3518 |
| 3519 core.Map<core.String, core.Object> toJson() { |
| 3520 final core.Map<core.String, core.Object> _json = |
| 3521 new core.Map<core.String, core.Object>(); |
| 3522 if (explicitBuckets != null) { |
| 3523 _json["explicitBuckets"] = (explicitBuckets).toJson(); |
| 3524 } |
| 3525 if (exponentialBuckets != null) { |
| 3526 _json["exponentialBuckets"] = (exponentialBuckets).toJson(); |
| 3527 } |
| 3528 if (linearBuckets != null) { |
| 3529 _json["linearBuckets"] = (linearBuckets).toJson(); |
| 3530 } |
| 3531 return _json; |
| 3532 } |
| 3533 } |
| 3534 |
| 3535 /// A generic empty message that you can re-use to avoid defining duplicated |
| 3536 /// empty messages in your APIs. A typical example is to use it as the request |
| 3537 /// or the response type of an API method. For instance: |
| 3538 /// service Foo { |
| 3539 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 3540 /// } |
| 3541 /// The JSON representation for Empty is empty JSON object {}. |
2437 class Empty { | 3542 class Empty { |
2438 | |
2439 Empty(); | 3543 Empty(); |
2440 | 3544 |
2441 Empty.fromJson(core.Map _json) { | 3545 Empty.fromJson(core.Map _json) {} |
2442 } | 3546 |
2443 | 3547 core.Map<core.String, core.Object> toJson() { |
2444 core.Map<core.String, core.Object> toJson() { | 3548 final core.Map<core.String, core.Object> _json = |
2445 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3549 new core.Map<core.String, core.Object>(); |
2446 return _json; | 3550 return _json; |
2447 } | 3551 } |
2448 } | 3552 } |
2449 | 3553 |
2450 /** | 3554 /// Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 |
2451 * A common proto for logging HTTP requests. Only contains semantics defined by | 3555 /// (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < |
2452 * the HTTP specification. Product-specific logging information MUST be defined | 3556 /// N-1): boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must |
2453 * in a separate message. | 3557 /// contain at least one element. If bounds has only one element, then there |
2454 */ | 3558 /// are no finite buckets, and that single element is the common boundary of |
| 3559 /// the overflow and underflow buckets. |
| 3560 class Explicit { |
| 3561 /// The values must be monotonically increasing. |
| 3562 core.List<core.double> bounds; |
| 3563 |
| 3564 Explicit(); |
| 3565 |
| 3566 Explicit.fromJson(core.Map _json) { |
| 3567 if (_json.containsKey("bounds")) { |
| 3568 bounds = _json["bounds"]; |
| 3569 } |
| 3570 } |
| 3571 |
| 3572 core.Map<core.String, core.Object> toJson() { |
| 3573 final core.Map<core.String, core.Object> _json = |
| 3574 new core.Map<core.String, core.Object>(); |
| 3575 if (bounds != null) { |
| 3576 _json["bounds"] = bounds; |
| 3577 } |
| 3578 return _json; |
| 3579 } |
| 3580 } |
| 3581 |
| 3582 /// Specifies an exponential sequence of buckets that have a width that is |
| 3583 /// proportional to the value of the lower bound. Each bucket represents a |
| 3584 /// constant relative uncertainty on a specific value in the bucket.There are |
| 3585 /// num_finite_buckets + 2 (= N) buckets. Bucket i has the following |
| 3586 /// boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower |
| 3587 /// bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). |
| 3588 class Exponential { |
| 3589 /// Must be greater than 1. |
| 3590 core.double growthFactor; |
| 3591 |
| 3592 /// Must be greater than 0. |
| 3593 core.int numFiniteBuckets; |
| 3594 |
| 3595 /// Must be greater than 0. |
| 3596 core.double scale; |
| 3597 |
| 3598 Exponential(); |
| 3599 |
| 3600 Exponential.fromJson(core.Map _json) { |
| 3601 if (_json.containsKey("growthFactor")) { |
| 3602 growthFactor = _json["growthFactor"]; |
| 3603 } |
| 3604 if (_json.containsKey("numFiniteBuckets")) { |
| 3605 numFiniteBuckets = _json["numFiniteBuckets"]; |
| 3606 } |
| 3607 if (_json.containsKey("scale")) { |
| 3608 scale = _json["scale"]; |
| 3609 } |
| 3610 } |
| 3611 |
| 3612 core.Map<core.String, core.Object> toJson() { |
| 3613 final core.Map<core.String, core.Object> _json = |
| 3614 new core.Map<core.String, core.Object>(); |
| 3615 if (growthFactor != null) { |
| 3616 _json["growthFactor"] = growthFactor; |
| 3617 } |
| 3618 if (numFiniteBuckets != null) { |
| 3619 _json["numFiniteBuckets"] = numFiniteBuckets; |
| 3620 } |
| 3621 if (scale != null) { |
| 3622 _json["scale"] = scale; |
| 3623 } |
| 3624 return _json; |
| 3625 } |
| 3626 } |
| 3627 |
| 3628 /// A common proto for logging HTTP requests. Only contains semantics defined |
| 3629 /// by the HTTP specification. Product-specific logging information MUST be |
| 3630 /// defined in a separate message. |
2455 class HttpRequest { | 3631 class HttpRequest { |
2456 /** | 3632 /// The number of HTTP response bytes inserted into cache. Set only when a |
2457 * The number of HTTP response bytes inserted into cache. Set only when a | 3633 /// cache fill was attempted. |
2458 * cache fill was attempted. | |
2459 */ | |
2460 core.String cacheFillBytes; | 3634 core.String cacheFillBytes; |
2461 /** | 3635 |
2462 * Whether or not an entity was served from cache (with or without | 3636 /// Whether or not an entity was served from cache (with or without |
2463 * validation). | 3637 /// validation). |
2464 */ | |
2465 core.bool cacheHit; | 3638 core.bool cacheHit; |
2466 /** Whether or not a cache lookup was attempted. */ | 3639 |
| 3640 /// Whether or not a cache lookup was attempted. |
2467 core.bool cacheLookup; | 3641 core.bool cacheLookup; |
2468 /** | 3642 |
2469 * Whether or not the response was validated with the origin server before | 3643 /// Whether or not the response was validated with the origin server before |
2470 * being served from cache. This field is only meaningful if cache_hit is | 3644 /// being served from cache. This field is only meaningful if cache_hit is |
2471 * True. | 3645 /// True. |
2472 */ | |
2473 core.bool cacheValidatedWithOriginServer; | 3646 core.bool cacheValidatedWithOriginServer; |
2474 /** | 3647 |
2475 * The request processing latency on the server, from the time the request was | 3648 /// The request processing latency on the server, from the time the request |
2476 * received until the response was sent. | 3649 /// was received until the response was sent. |
2477 */ | |
2478 core.String latency; | 3650 core.String latency; |
2479 /** | 3651 |
2480 * Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" | 3652 /// Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", |
2481 */ | 3653 /// "websocket" |
2482 core.String protocol; | 3654 core.String protocol; |
2483 /** | 3655 |
2484 * The referer URL of the request, as defined in HTTP/1.1 Header Field | 3656 /// The referer URL of the request, as defined in HTTP/1.1 Header Field |
2485 * Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). | 3657 /// Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). |
2486 */ | |
2487 core.String referer; | 3658 core.String referer; |
2488 /** | 3659 |
2489 * The IP address (IPv4 or IPv6) of the client that issued the HTTP request. | 3660 /// The IP address (IPv4 or IPv6) of the client that issued the HTTP request. |
2490 * Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". | 3661 /// Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". |
2491 */ | |
2492 core.String remoteIp; | 3662 core.String remoteIp; |
2493 /** The request method. Examples: "GET", "HEAD", "PUT", "POST". */ | 3663 |
| 3664 /// The request method. Examples: "GET", "HEAD", "PUT", "POST". |
2494 core.String requestMethod; | 3665 core.String requestMethod; |
2495 /** | 3666 |
2496 * The size of the HTTP request message in bytes, including the request | 3667 /// The size of the HTTP request message in bytes, including the request |
2497 * headers and the request body. | 3668 /// headers and the request body. |
2498 */ | |
2499 core.String requestSize; | 3669 core.String requestSize; |
2500 /** | 3670 |
2501 * The scheme (http, https), the host name, the path and the query portion of | 3671 /// The scheme (http, https), the host name, the path and the query portion |
2502 * the URL that was requested. Example: | 3672 /// of the URL that was requested. Example: |
2503 * "http://example.com/some/info?color=red". | 3673 /// "http://example.com/some/info?color=red". |
2504 */ | |
2505 core.String requestUrl; | 3674 core.String requestUrl; |
2506 /** | 3675 |
2507 * The size of the HTTP response message sent back to the client, in bytes, | 3676 /// The size of the HTTP response message sent back to the client, in bytes, |
2508 * including the response headers and the response body. | 3677 /// including the response headers and the response body. |
2509 */ | |
2510 core.String responseSize; | 3678 core.String responseSize; |
2511 /** | 3679 |
2512 * The IP address (IPv4 or IPv6) of the origin server that the request was | 3680 /// The IP address (IPv4 or IPv6) of the origin server that the request was |
2513 * sent to. | 3681 /// sent to. |
2514 */ | |
2515 core.String serverIp; | 3682 core.String serverIp; |
2516 /** | 3683 |
2517 * The response code indicating the status of response. Examples: 200, 404. | 3684 /// The response code indicating the status of response. Examples: 200, 404. |
2518 */ | |
2519 core.int status; | 3685 core.int status; |
2520 /** | 3686 |
2521 * The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE | 3687 /// The user agent sent by the client. Example: "Mozilla/4.0 (compatible; |
2522 * 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)". | 3688 /// MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)". |
2523 */ | |
2524 core.String userAgent; | 3689 core.String userAgent; |
2525 | 3690 |
2526 HttpRequest(); | 3691 HttpRequest(); |
2527 | 3692 |
2528 HttpRequest.fromJson(core.Map _json) { | 3693 HttpRequest.fromJson(core.Map _json) { |
2529 if (_json.containsKey("cacheFillBytes")) { | 3694 if (_json.containsKey("cacheFillBytes")) { |
2530 cacheFillBytes = _json["cacheFillBytes"]; | 3695 cacheFillBytes = _json["cacheFillBytes"]; |
2531 } | 3696 } |
2532 if (_json.containsKey("cacheHit")) { | 3697 if (_json.containsKey("cacheHit")) { |
2533 cacheHit = _json["cacheHit"]; | 3698 cacheHit = _json["cacheHit"]; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2567 } | 3732 } |
2568 if (_json.containsKey("status")) { | 3733 if (_json.containsKey("status")) { |
2569 status = _json["status"]; | 3734 status = _json["status"]; |
2570 } | 3735 } |
2571 if (_json.containsKey("userAgent")) { | 3736 if (_json.containsKey("userAgent")) { |
2572 userAgent = _json["userAgent"]; | 3737 userAgent = _json["userAgent"]; |
2573 } | 3738 } |
2574 } | 3739 } |
2575 | 3740 |
2576 core.Map<core.String, core.Object> toJson() { | 3741 core.Map<core.String, core.Object> toJson() { |
2577 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3742 final core.Map<core.String, core.Object> _json = |
| 3743 new core.Map<core.String, core.Object>(); |
2578 if (cacheFillBytes != null) { | 3744 if (cacheFillBytes != null) { |
2579 _json["cacheFillBytes"] = cacheFillBytes; | 3745 _json["cacheFillBytes"] = cacheFillBytes; |
2580 } | 3746 } |
2581 if (cacheHit != null) { | 3747 if (cacheHit != null) { |
2582 _json["cacheHit"] = cacheHit; | 3748 _json["cacheHit"] = cacheHit; |
2583 } | 3749 } |
2584 if (cacheLookup != null) { | 3750 if (cacheLookup != null) { |
2585 _json["cacheLookup"] = cacheLookup; | 3751 _json["cacheLookup"] = cacheLookup; |
2586 } | 3752 } |
2587 if (cacheValidatedWithOriginServer != null) { | 3753 if (cacheValidatedWithOriginServer != null) { |
(...skipping 29 matching lines...) Expand all Loading... |
2617 if (status != null) { | 3783 if (status != null) { |
2618 _json["status"] = status; | 3784 _json["status"] = status; |
2619 } | 3785 } |
2620 if (userAgent != null) { | 3786 if (userAgent != null) { |
2621 _json["userAgent"] = userAgent; | 3787 _json["userAgent"] = userAgent; |
2622 } | 3788 } |
2623 return _json; | 3789 return _json; |
2624 } | 3790 } |
2625 } | 3791 } |
2626 | 3792 |
2627 /** A description of a label. */ | 3793 /// A description of a label. |
2628 class LabelDescriptor { | 3794 class LabelDescriptor { |
2629 /** A human-readable description for the label. */ | 3795 /// A human-readable description for the label. |
2630 core.String description; | 3796 core.String description; |
2631 /** The label key. */ | 3797 |
| 3798 /// The label key. |
2632 core.String key; | 3799 core.String key; |
2633 /** | 3800 |
2634 * The type of data that can be assigned to the label. | 3801 /// The type of data that can be assigned to the label. |
2635 * Possible string values are: | 3802 /// Possible string values are: |
2636 * - "STRING" : A variable-length string. This is the default. | 3803 /// - "STRING" : A variable-length string. This is the default. |
2637 * - "BOOL" : Boolean; true or false. | 3804 /// - "BOOL" : Boolean; true or false. |
2638 * - "INT64" : A 64-bit signed integer. | 3805 /// - "INT64" : A 64-bit signed integer. |
2639 */ | |
2640 core.String valueType; | 3806 core.String valueType; |
2641 | 3807 |
2642 LabelDescriptor(); | 3808 LabelDescriptor(); |
2643 | 3809 |
2644 LabelDescriptor.fromJson(core.Map _json) { | 3810 LabelDescriptor.fromJson(core.Map _json) { |
2645 if (_json.containsKey("description")) { | 3811 if (_json.containsKey("description")) { |
2646 description = _json["description"]; | 3812 description = _json["description"]; |
2647 } | 3813 } |
2648 if (_json.containsKey("key")) { | 3814 if (_json.containsKey("key")) { |
2649 key = _json["key"]; | 3815 key = _json["key"]; |
2650 } | 3816 } |
2651 if (_json.containsKey("valueType")) { | 3817 if (_json.containsKey("valueType")) { |
2652 valueType = _json["valueType"]; | 3818 valueType = _json["valueType"]; |
2653 } | 3819 } |
2654 } | 3820 } |
2655 | 3821 |
2656 core.Map<core.String, core.Object> toJson() { | 3822 core.Map<core.String, core.Object> toJson() { |
2657 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3823 final core.Map<core.String, core.Object> _json = |
| 3824 new core.Map<core.String, core.Object>(); |
2658 if (description != null) { | 3825 if (description != null) { |
2659 _json["description"] = description; | 3826 _json["description"] = description; |
2660 } | 3827 } |
2661 if (key != null) { | 3828 if (key != null) { |
2662 _json["key"] = key; | 3829 _json["key"] = key; |
2663 } | 3830 } |
2664 if (valueType != null) { | 3831 if (valueType != null) { |
2665 _json["valueType"] = valueType; | 3832 _json["valueType"] = valueType; |
2666 } | 3833 } |
2667 return _json; | 3834 return _json; |
2668 } | 3835 } |
2669 } | 3836 } |
2670 | 3837 |
2671 /** The parameters to ListLogEntries. */ | 3838 /// Specifies a linear sequence of buckets that all have the same width (except |
| 3839 /// overflow and underflow). Each bucket represents a constant absolute |
| 3840 /// uncertainty on the specific value in the bucket.There are |
| 3841 /// num_finite_buckets + 2 (= N) buckets. Bucket i has the following |
| 3842 /// boundaries:Upper bound (0 <= i < N-1): offset + (width * i). Lower bound |
| 3843 /// (1 <= i < N): offset + (width * (i - 1)). |
| 3844 class Linear { |
| 3845 /// Must be greater than 0. |
| 3846 core.int numFiniteBuckets; |
| 3847 |
| 3848 /// Lower bound of the first bucket. |
| 3849 core.double offset; |
| 3850 |
| 3851 /// Must be greater than 0. |
| 3852 core.double width; |
| 3853 |
| 3854 Linear(); |
| 3855 |
| 3856 Linear.fromJson(core.Map _json) { |
| 3857 if (_json.containsKey("numFiniteBuckets")) { |
| 3858 numFiniteBuckets = _json["numFiniteBuckets"]; |
| 3859 } |
| 3860 if (_json.containsKey("offset")) { |
| 3861 offset = _json["offset"]; |
| 3862 } |
| 3863 if (_json.containsKey("width")) { |
| 3864 width = _json["width"]; |
| 3865 } |
| 3866 } |
| 3867 |
| 3868 core.Map<core.String, core.Object> toJson() { |
| 3869 final core.Map<core.String, core.Object> _json = |
| 3870 new core.Map<core.String, core.Object>(); |
| 3871 if (numFiniteBuckets != null) { |
| 3872 _json["numFiniteBuckets"] = numFiniteBuckets; |
| 3873 } |
| 3874 if (offset != null) { |
| 3875 _json["offset"] = offset; |
| 3876 } |
| 3877 if (width != null) { |
| 3878 _json["width"] = width; |
| 3879 } |
| 3880 return _json; |
| 3881 } |
| 3882 } |
| 3883 |
| 3884 /// Result returned from ListExclusions. |
| 3885 class ListExclusionsResponse { |
| 3886 /// A list of exclusions. |
| 3887 core.List<LogExclusion> exclusions; |
| 3888 |
| 3889 /// If there might be more results than appear in this response, then |
| 3890 /// nextPageToken is included. To get the next set of results, call the same |
| 3891 /// method again using the value of nextPageToken as pageToken. |
| 3892 core.String nextPageToken; |
| 3893 |
| 3894 ListExclusionsResponse(); |
| 3895 |
| 3896 ListExclusionsResponse.fromJson(core.Map _json) { |
| 3897 if (_json.containsKey("exclusions")) { |
| 3898 exclusions = _json["exclusions"] |
| 3899 .map((value) => new LogExclusion.fromJson(value)) |
| 3900 .toList(); |
| 3901 } |
| 3902 if (_json.containsKey("nextPageToken")) { |
| 3903 nextPageToken = _json["nextPageToken"]; |
| 3904 } |
| 3905 } |
| 3906 |
| 3907 core.Map<core.String, core.Object> toJson() { |
| 3908 final core.Map<core.String, core.Object> _json = |
| 3909 new core.Map<core.String, core.Object>(); |
| 3910 if (exclusions != null) { |
| 3911 _json["exclusions"] = |
| 3912 exclusions.map((value) => (value).toJson()).toList(); |
| 3913 } |
| 3914 if (nextPageToken != null) { |
| 3915 _json["nextPageToken"] = nextPageToken; |
| 3916 } |
| 3917 return _json; |
| 3918 } |
| 3919 } |
| 3920 |
| 3921 /// The parameters to ListLogEntries. |
2672 class ListLogEntriesRequest { | 3922 class ListLogEntriesRequest { |
2673 /** | 3923 /// Optional. A filter that chooses which log entries to return. See Advanced |
2674 * Optional. A filter that chooses which log entries to return. See Advanced | 3924 /// Logs Filters. Only log entries that match the filter are returned. An |
2675 * Logs Filters. Only log entries that match the filter are returned. An empty | 3925 /// empty filter matches all log entries in the resources listed in |
2676 * filter matches all log entries in the resources listed in resource_names. | 3926 /// resource_names. Referencing a parent resource that is not listed in |
2677 * Referencing a parent resource that is not listed in resource_names will | 3927 /// resource_names will cause the filter to return no results. The maximum |
2678 * cause the filter to return no results. The maximum length of the filter is | 3928 /// length of the filter is 20000 characters. |
2679 * 20000 characters. | |
2680 */ | |
2681 core.String filter; | 3929 core.String filter; |
2682 /** | 3930 |
2683 * Optional. How the results should be sorted. Presently, the only permitted | 3931 /// Optional. How the results should be sorted. Presently, the only permitted |
2684 * values are "timestamp asc" (default) and "timestamp desc". The first option | 3932 /// values are "timestamp asc" (default) and "timestamp desc". The first |
2685 * returns entries in order of increasing values of LogEntry.timestamp (oldest | 3933 /// option returns entries in order of increasing values of |
2686 * first), and the second option returns entries in order of decreasing | 3934 /// LogEntry.timestamp (oldest first), and the second option returns entries |
2687 * timestamps (newest first). Entries with equal timestamps are returned in | 3935 /// in order of decreasing timestamps (newest first). Entries with equal |
2688 * order of their insert_id values. | 3936 /// timestamps are returned in order of their insert_id values. |
2689 */ | |
2690 core.String orderBy; | 3937 core.String orderBy; |
2691 /** | 3938 |
2692 * Optional. The maximum number of results to return from this request. | 3939 /// Optional. The maximum number of results to return from this request. |
2693 * Non-positive values are ignored. The presence of next_page_token in the | 3940 /// Non-positive values are ignored. The presence of next_page_token in the |
2694 * response indicates that more results might be available. | 3941 /// response indicates that more results might be available. |
2695 */ | |
2696 core.int pageSize; | 3942 core.int pageSize; |
2697 /** | 3943 |
2698 * Optional. If present, then retrieve the next batch of results from the | 3944 /// Optional. If present, then retrieve the next batch of results from the |
2699 * preceding call to this method. page_token must be the value of | 3945 /// preceding call to this method. page_token must be the value of |
2700 * next_page_token from the previous response. The values of other method | 3946 /// next_page_token from the previous response. The values of other method |
2701 * parameters should be identical to those in the previous call. | 3947 /// parameters should be identical to those in the previous call. |
2702 */ | |
2703 core.String pageToken; | 3948 core.String pageToken; |
2704 /** | 3949 |
2705 * Deprecated. Use resource_names instead. One or more project identifiers or | 3950 /// Deprecated. Use resource_names instead. One or more project identifiers |
2706 * project numbers from which to retrieve log entries. Example: | 3951 /// or project numbers from which to retrieve log entries. Example: |
2707 * "my-project-1A". If present, these project identifiers are converted to | 3952 /// "my-project-1A". If present, these project identifiers are converted to |
2708 * resource name format and added to the list of resources in resource_names. | 3953 /// resource name format and added to the list of resources in |
2709 */ | 3954 /// resource_names. |
2710 core.List<core.String> projectIds; | 3955 core.List<core.String> projectIds; |
2711 /** | 3956 |
2712 * Required. Names of one or more parent resources from which to retrieve log | 3957 /// Required. Names of one or more parent resources from which to retrieve |
2713 * entries: | 3958 /// log entries: |
2714 * "projects/[PROJECT_ID]" | 3959 /// "projects/[PROJECT_ID]" |
2715 * "organizations/[ORGANIZATION_ID]" | 3960 /// "organizations/[ORGANIZATION_ID]" |
2716 * "billingAccounts/[BILLING_ACCOUNT_ID]" | 3961 /// "billingAccounts/[BILLING_ACCOUNT_ID]" |
2717 * "folders/[FOLDER_ID]" | 3962 /// "folders/[FOLDER_ID]" |
2718 * Projects listed in the project_ids field are added to this list. | 3963 /// Projects listed in the project_ids field are added to this list. |
2719 */ | |
2720 core.List<core.String> resourceNames; | 3964 core.List<core.String> resourceNames; |
2721 | 3965 |
2722 ListLogEntriesRequest(); | 3966 ListLogEntriesRequest(); |
2723 | 3967 |
2724 ListLogEntriesRequest.fromJson(core.Map _json) { | 3968 ListLogEntriesRequest.fromJson(core.Map _json) { |
2725 if (_json.containsKey("filter")) { | 3969 if (_json.containsKey("filter")) { |
2726 filter = _json["filter"]; | 3970 filter = _json["filter"]; |
2727 } | 3971 } |
2728 if (_json.containsKey("orderBy")) { | 3972 if (_json.containsKey("orderBy")) { |
2729 orderBy = _json["orderBy"]; | 3973 orderBy = _json["orderBy"]; |
2730 } | 3974 } |
2731 if (_json.containsKey("pageSize")) { | 3975 if (_json.containsKey("pageSize")) { |
2732 pageSize = _json["pageSize"]; | 3976 pageSize = _json["pageSize"]; |
2733 } | 3977 } |
2734 if (_json.containsKey("pageToken")) { | 3978 if (_json.containsKey("pageToken")) { |
2735 pageToken = _json["pageToken"]; | 3979 pageToken = _json["pageToken"]; |
2736 } | 3980 } |
2737 if (_json.containsKey("projectIds")) { | 3981 if (_json.containsKey("projectIds")) { |
2738 projectIds = _json["projectIds"]; | 3982 projectIds = _json["projectIds"]; |
2739 } | 3983 } |
2740 if (_json.containsKey("resourceNames")) { | 3984 if (_json.containsKey("resourceNames")) { |
2741 resourceNames = _json["resourceNames"]; | 3985 resourceNames = _json["resourceNames"]; |
2742 } | 3986 } |
2743 } | 3987 } |
2744 | 3988 |
2745 core.Map<core.String, core.Object> toJson() { | 3989 core.Map<core.String, core.Object> toJson() { |
2746 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3990 final core.Map<core.String, core.Object> _json = |
| 3991 new core.Map<core.String, core.Object>(); |
2747 if (filter != null) { | 3992 if (filter != null) { |
2748 _json["filter"] = filter; | 3993 _json["filter"] = filter; |
2749 } | 3994 } |
2750 if (orderBy != null) { | 3995 if (orderBy != null) { |
2751 _json["orderBy"] = orderBy; | 3996 _json["orderBy"] = orderBy; |
2752 } | 3997 } |
2753 if (pageSize != null) { | 3998 if (pageSize != null) { |
2754 _json["pageSize"] = pageSize; | 3999 _json["pageSize"] = pageSize; |
2755 } | 4000 } |
2756 if (pageToken != null) { | 4001 if (pageToken != null) { |
2757 _json["pageToken"] = pageToken; | 4002 _json["pageToken"] = pageToken; |
2758 } | 4003 } |
2759 if (projectIds != null) { | 4004 if (projectIds != null) { |
2760 _json["projectIds"] = projectIds; | 4005 _json["projectIds"] = projectIds; |
2761 } | 4006 } |
2762 if (resourceNames != null) { | 4007 if (resourceNames != null) { |
2763 _json["resourceNames"] = resourceNames; | 4008 _json["resourceNames"] = resourceNames; |
2764 } | 4009 } |
2765 return _json; | 4010 return _json; |
2766 } | 4011 } |
2767 } | 4012 } |
2768 | 4013 |
2769 /** Result returned from ListLogEntries. */ | 4014 /// Result returned from ListLogEntries. |
2770 class ListLogEntriesResponse { | 4015 class ListLogEntriesResponse { |
2771 /** A list of log entries. */ | 4016 /// A list of log entries. If entries is empty, nextPageToken may still be |
| 4017 /// returned, indicating that more entries may exist. See nextPageToken for |
| 4018 /// more information. |
2772 core.List<LogEntry> entries; | 4019 core.List<LogEntry> entries; |
2773 /** | 4020 |
2774 * If there might be more results than those appearing in this response, then | 4021 /// If there might be more results than those appearing in this response, |
2775 * nextPageToken is included. To get the next set of results, call this method | 4022 /// then nextPageToken is included. To get the next set of results, call this |
2776 * again using the value of nextPageToken as pageToken.If a value for | 4023 /// method again using the value of nextPageToken as pageToken.If a value for |
2777 * next_page_token appears and the entries field is empty, it means that the | 4024 /// next_page_token appears and the entries field is empty, it means that the |
2778 * search found no log entries so far but it did not have time to search all | 4025 /// search found no log entries so far but it did not have time to search all |
2779 * the possible log entries. Retry the method with this value for page_token | 4026 /// the possible log entries. Retry the method with this value for page_token |
2780 * to continue the search. Alternatively, consider speeding up the search by | 4027 /// to continue the search. Alternatively, consider speeding up the search by |
2781 * changing your filter to specify a single log name or resource type, or to | 4028 /// changing your filter to specify a single log name or resource type, or to |
2782 * narrow the time range of the search. | 4029 /// narrow the time range of the search. |
2783 */ | |
2784 core.String nextPageToken; | 4030 core.String nextPageToken; |
2785 | 4031 |
2786 ListLogEntriesResponse(); | 4032 ListLogEntriesResponse(); |
2787 | 4033 |
2788 ListLogEntriesResponse.fromJson(core.Map _json) { | 4034 ListLogEntriesResponse.fromJson(core.Map _json) { |
2789 if (_json.containsKey("entries")) { | 4035 if (_json.containsKey("entries")) { |
2790 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to
List(); | 4036 entries = _json["entries"] |
| 4037 .map((value) => new LogEntry.fromJson(value)) |
| 4038 .toList(); |
2791 } | 4039 } |
2792 if (_json.containsKey("nextPageToken")) { | 4040 if (_json.containsKey("nextPageToken")) { |
2793 nextPageToken = _json["nextPageToken"]; | 4041 nextPageToken = _json["nextPageToken"]; |
2794 } | 4042 } |
2795 } | 4043 } |
2796 | 4044 |
2797 core.Map<core.String, core.Object> toJson() { | 4045 core.Map<core.String, core.Object> toJson() { |
2798 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4046 final core.Map<core.String, core.Object> _json = |
| 4047 new core.Map<core.String, core.Object>(); |
2799 if (entries != null) { | 4048 if (entries != null) { |
2800 _json["entries"] = entries.map((value) => (value).toJson()).toList(); | 4049 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
2801 } | 4050 } |
2802 if (nextPageToken != null) { | 4051 if (nextPageToken != null) { |
2803 _json["nextPageToken"] = nextPageToken; | 4052 _json["nextPageToken"] = nextPageToken; |
2804 } | 4053 } |
2805 return _json; | 4054 return _json; |
2806 } | 4055 } |
2807 } | 4056 } |
2808 | 4057 |
2809 /** Result returned from ListLogMetrics. */ | 4058 /// Result returned from ListLogMetrics. |
2810 class ListLogMetricsResponse { | 4059 class ListLogMetricsResponse { |
2811 /** A list of logs-based metrics. */ | 4060 /// A list of logs-based metrics. |
2812 core.List<LogMetric> metrics; | 4061 core.List<LogMetric> metrics; |
2813 /** | 4062 |
2814 * If there might be more results than appear in this response, then | 4063 /// If there might be more results than appear in this response, then |
2815 * nextPageToken is included. To get the next set of results, call this method | 4064 /// nextPageToken is included. To get the next set of results, call this |
2816 * again using the value of nextPageToken as pageToken. | 4065 /// method again using the value of nextPageToken as pageToken. |
2817 */ | |
2818 core.String nextPageToken; | 4066 core.String nextPageToken; |
2819 | 4067 |
2820 ListLogMetricsResponse(); | 4068 ListLogMetricsResponse(); |
2821 | 4069 |
2822 ListLogMetricsResponse.fromJson(core.Map _json) { | 4070 ListLogMetricsResponse.fromJson(core.Map _json) { |
2823 if (_json.containsKey("metrics")) { | 4071 if (_json.containsKey("metrics")) { |
2824 metrics = _json["metrics"].map((value) => new LogMetric.fromJson(value)).t
oList(); | 4072 metrics = _json["metrics"] |
| 4073 .map((value) => new LogMetric.fromJson(value)) |
| 4074 .toList(); |
2825 } | 4075 } |
2826 if (_json.containsKey("nextPageToken")) { | 4076 if (_json.containsKey("nextPageToken")) { |
2827 nextPageToken = _json["nextPageToken"]; | 4077 nextPageToken = _json["nextPageToken"]; |
2828 } | 4078 } |
2829 } | 4079 } |
2830 | 4080 |
2831 core.Map<core.String, core.Object> toJson() { | 4081 core.Map<core.String, core.Object> toJson() { |
2832 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4082 final core.Map<core.String, core.Object> _json = |
| 4083 new core.Map<core.String, core.Object>(); |
2833 if (metrics != null) { | 4084 if (metrics != null) { |
2834 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); | 4085 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); |
2835 } | 4086 } |
2836 if (nextPageToken != null) { | 4087 if (nextPageToken != null) { |
2837 _json["nextPageToken"] = nextPageToken; | 4088 _json["nextPageToken"] = nextPageToken; |
2838 } | 4089 } |
2839 return _json; | 4090 return _json; |
2840 } | 4091 } |
2841 } | 4092 } |
2842 | 4093 |
2843 /** Result returned from ListLogs. */ | 4094 /// Result returned from ListLogs. |
2844 class ListLogsResponse { | 4095 class ListLogsResponse { |
2845 /** | 4096 /// A list of log names. For example, "projects/my-project/syslog" or |
2846 * A list of log names. For example, "projects/my-project/syslog" or | 4097 /// "organizations/123/cloudresourcemanager.googleapis.com%2Factivity". |
2847 * "organizations/123/cloudresourcemanager.googleapis.com%2Factivity". | |
2848 */ | |
2849 core.List<core.String> logNames; | 4098 core.List<core.String> logNames; |
2850 /** | 4099 |
2851 * If there might be more results than those appearing in this response, then | 4100 /// If there might be more results than those appearing in this response, |
2852 * nextPageToken is included. To get the next set of results, call this method | 4101 /// then nextPageToken is included. To get the next set of results, call this |
2853 * again using the value of nextPageToken as pageToken. | 4102 /// method again using the value of nextPageToken as pageToken. |
2854 */ | |
2855 core.String nextPageToken; | 4103 core.String nextPageToken; |
2856 | 4104 |
2857 ListLogsResponse(); | 4105 ListLogsResponse(); |
2858 | 4106 |
2859 ListLogsResponse.fromJson(core.Map _json) { | 4107 ListLogsResponse.fromJson(core.Map _json) { |
2860 if (_json.containsKey("logNames")) { | 4108 if (_json.containsKey("logNames")) { |
2861 logNames = _json["logNames"]; | 4109 logNames = _json["logNames"]; |
2862 } | 4110 } |
2863 if (_json.containsKey("nextPageToken")) { | 4111 if (_json.containsKey("nextPageToken")) { |
2864 nextPageToken = _json["nextPageToken"]; | 4112 nextPageToken = _json["nextPageToken"]; |
2865 } | 4113 } |
2866 } | 4114 } |
2867 | 4115 |
2868 core.Map<core.String, core.Object> toJson() { | 4116 core.Map<core.String, core.Object> toJson() { |
2869 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4117 final core.Map<core.String, core.Object> _json = |
| 4118 new core.Map<core.String, core.Object>(); |
2870 if (logNames != null) { | 4119 if (logNames != null) { |
2871 _json["logNames"] = logNames; | 4120 _json["logNames"] = logNames; |
2872 } | 4121 } |
2873 if (nextPageToken != null) { | 4122 if (nextPageToken != null) { |
2874 _json["nextPageToken"] = nextPageToken; | 4123 _json["nextPageToken"] = nextPageToken; |
2875 } | 4124 } |
2876 return _json; | 4125 return _json; |
2877 } | 4126 } |
2878 } | 4127 } |
2879 | 4128 |
2880 /** Result returned from ListMonitoredResourceDescriptors. */ | 4129 /// Result returned from ListMonitoredResourceDescriptors. |
2881 class ListMonitoredResourceDescriptorsResponse { | 4130 class ListMonitoredResourceDescriptorsResponse { |
2882 /** | 4131 /// If there might be more results than those appearing in this response, |
2883 * If there might be more results than those appearing in this response, then | 4132 /// then nextPageToken is included. To get the next set of results, call this |
2884 * nextPageToken is included. To get the next set of results, call this method | 4133 /// method again using the value of nextPageToken as pageToken. |
2885 * again using the value of nextPageToken as pageToken. | |
2886 */ | |
2887 core.String nextPageToken; | 4134 core.String nextPageToken; |
2888 /** A list of resource descriptors. */ | 4135 |
| 4136 /// A list of resource descriptors. |
2889 core.List<MonitoredResourceDescriptor> resourceDescriptors; | 4137 core.List<MonitoredResourceDescriptor> resourceDescriptors; |
2890 | 4138 |
2891 ListMonitoredResourceDescriptorsResponse(); | 4139 ListMonitoredResourceDescriptorsResponse(); |
2892 | 4140 |
2893 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) { | 4141 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) { |
2894 if (_json.containsKey("nextPageToken")) { | 4142 if (_json.containsKey("nextPageToken")) { |
2895 nextPageToken = _json["nextPageToken"]; | 4143 nextPageToken = _json["nextPageToken"]; |
2896 } | 4144 } |
2897 if (_json.containsKey("resourceDescriptors")) { | 4145 if (_json.containsKey("resourceDescriptors")) { |
2898 resourceDescriptors = _json["resourceDescriptors"].map((value) => new Moni
toredResourceDescriptor.fromJson(value)).toList(); | 4146 resourceDescriptors = _json["resourceDescriptors"] |
| 4147 .map((value) => new MonitoredResourceDescriptor.fromJson(value)) |
| 4148 .toList(); |
2899 } | 4149 } |
2900 } | 4150 } |
2901 | 4151 |
2902 core.Map<core.String, core.Object> toJson() { | 4152 core.Map<core.String, core.Object> toJson() { |
2903 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4153 final core.Map<core.String, core.Object> _json = |
| 4154 new core.Map<core.String, core.Object>(); |
2904 if (nextPageToken != null) { | 4155 if (nextPageToken != null) { |
2905 _json["nextPageToken"] = nextPageToken; | 4156 _json["nextPageToken"] = nextPageToken; |
2906 } | 4157 } |
2907 if (resourceDescriptors != null) { | 4158 if (resourceDescriptors != null) { |
2908 _json["resourceDescriptors"] = resourceDescriptors.map((value) => (value).
toJson()).toList(); | 4159 _json["resourceDescriptors"] = |
| 4160 resourceDescriptors.map((value) => (value).toJson()).toList(); |
2909 } | 4161 } |
2910 return _json; | 4162 return _json; |
2911 } | 4163 } |
2912 } | 4164 } |
2913 | 4165 |
2914 /** Result returned from ListSinks. */ | 4166 /// Result returned from ListSinks. |
2915 class ListSinksResponse { | 4167 class ListSinksResponse { |
2916 /** | 4168 /// If there might be more results than appear in this response, then |
2917 * If there might be more results than appear in this response, then | 4169 /// nextPageToken is included. To get the next set of results, call the same |
2918 * nextPageToken is included. To get the next set of results, call the same | 4170 /// method again using the value of nextPageToken as pageToken. |
2919 * method again using the value of nextPageToken as pageToken. | |
2920 */ | |
2921 core.String nextPageToken; | 4171 core.String nextPageToken; |
2922 /** A list of sinks. */ | 4172 |
| 4173 /// A list of sinks. |
2923 core.List<LogSink> sinks; | 4174 core.List<LogSink> sinks; |
2924 | 4175 |
2925 ListSinksResponse(); | 4176 ListSinksResponse(); |
2926 | 4177 |
2927 ListSinksResponse.fromJson(core.Map _json) { | 4178 ListSinksResponse.fromJson(core.Map _json) { |
2928 if (_json.containsKey("nextPageToken")) { | 4179 if (_json.containsKey("nextPageToken")) { |
2929 nextPageToken = _json["nextPageToken"]; | 4180 nextPageToken = _json["nextPageToken"]; |
2930 } | 4181 } |
2931 if (_json.containsKey("sinks")) { | 4182 if (_json.containsKey("sinks")) { |
2932 sinks = _json["sinks"].map((value) => new LogSink.fromJson(value)).toList(
); | 4183 sinks = |
| 4184 _json["sinks"].map((value) => new LogSink.fromJson(value)).toList(); |
2933 } | 4185 } |
2934 } | 4186 } |
2935 | 4187 |
2936 core.Map<core.String, core.Object> toJson() { | 4188 core.Map<core.String, core.Object> toJson() { |
2937 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4189 final core.Map<core.String, core.Object> _json = |
| 4190 new core.Map<core.String, core.Object>(); |
2938 if (nextPageToken != null) { | 4191 if (nextPageToken != null) { |
2939 _json["nextPageToken"] = nextPageToken; | 4192 _json["nextPageToken"] = nextPageToken; |
2940 } | 4193 } |
2941 if (sinks != null) { | 4194 if (sinks != null) { |
2942 _json["sinks"] = sinks.map((value) => (value).toJson()).toList(); | 4195 _json["sinks"] = sinks.map((value) => (value).toJson()).toList(); |
2943 } | 4196 } |
2944 return _json; | 4197 return _json; |
2945 } | 4198 } |
2946 } | 4199 } |
2947 | 4200 |
2948 /** An individual entry in a log. */ | 4201 /// An individual entry in a log. |
2949 class LogEntry { | 4202 class LogEntry { |
2950 /** | 4203 /// Optional. Information about the HTTP request associated with this log |
2951 * Optional. Information about the HTTP request associated with this log | 4204 /// entry, if applicable. |
2952 * entry, if applicable. | |
2953 */ | |
2954 HttpRequest httpRequest; | 4205 HttpRequest httpRequest; |
2955 /** | 4206 |
2956 * Optional. A unique identifier for the log entry. If you provide a value, | 4207 /// Optional. A unique identifier for the log entry. If you provide a value, |
2957 * then Stackdriver Logging considers other log entries in the same project, | 4208 /// then Stackdriver Logging considers other log entries in the same project, |
2958 * with the same timestamp, and with the same insert_id to be duplicates which | 4209 /// with the same timestamp, and with the same insert_id to be duplicates |
2959 * can be removed. If omitted in new log entries, then Stackdriver Logging | 4210 /// which can be removed. If omitted in new log entries, then Stackdriver |
2960 * will insert its own unique identifier. The insert_id is used to order log | 4211 /// Logging assigns its own unique identifier. The insert_id is also used to |
2961 * entries that have the same timestamp value. | 4212 /// order log entries that have the same timestamp value. |
2962 */ | |
2963 core.String insertId; | 4213 core.String insertId; |
2964 /** | 4214 |
2965 * The log entry payload, represented as a structure that is expressed as a | 4215 /// The log entry payload, represented as a structure that is expressed as a |
2966 * JSON object. | 4216 /// JSON object. |
2967 * | 4217 /// |
2968 * The values for Object must be JSON objects. It can consist of `num`, | 4218 /// The values for Object must be JSON objects. It can consist of `num`, |
2969 * `String`, `bool` and `null` as well as `Map` and `List` values. | 4219 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
2970 */ | |
2971 core.Map<core.String, core.Object> jsonPayload; | 4220 core.Map<core.String, core.Object> jsonPayload; |
2972 /** | 4221 |
2973 * Optional. A set of user-defined (key, value) data that provides additional | 4222 /// Optional. A set of user-defined (key, value) data that provides |
2974 * information about the log entry. | 4223 /// additional information about the log entry. |
2975 */ | |
2976 core.Map<core.String, core.String> labels; | 4224 core.Map<core.String, core.String> labels; |
2977 /** | 4225 |
2978 * Required. The resource name of the log to which this log entry belongs: | 4226 /// Required. The resource name of the log to which this log entry belongs: |
2979 * "projects/[PROJECT_ID]/logs/[LOG_ID]" | 4227 /// "projects/[PROJECT_ID]/logs/[LOG_ID]" |
2980 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" | 4228 /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" |
2981 * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" | 4229 /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" |
2982 * "folders/[FOLDER_ID]/logs/[LOG_ID]" | 4230 /// "folders/[FOLDER_ID]/logs/[LOG_ID]" |
2983 * [LOG_ID] must be URL-encoded within log_name. Example: | 4231 /// [LOG_ID] must be URL-encoded within log_name. Example: |
2984 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi
ty". | 4232 /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factiv
ity". |
2985 * [LOG_ID] must be less than 512 characters long and can only include the | 4233 /// [LOG_ID] must be less than 512 characters long and can only include the |
2986 * following characters: upper and lower case alphanumeric characters, | 4234 /// following characters: upper and lower case alphanumeric characters, |
2987 * forward-slash, underscore, hyphen, and period.For backward compatibility, | 4235 /// forward-slash, underscore, hyphen, and period.For backward compatibility, |
2988 * if log_name begins with a forward-slash, such as /projects/..., then the | 4236 /// if log_name begins with a forward-slash, such as /projects/..., then the |
2989 * log entry is ingested as usual but the forward-slash is removed. Listing | 4237 /// log entry is ingested as usual but the forward-slash is removed. Listing |
2990 * the log entry will not show the leading slash and filtering for a log name | 4238 /// the log entry will not show the leading slash and filtering for a log |
2991 * with a leading slash will never return any results. | 4239 /// name with a leading slash will never return any results. |
2992 */ | |
2993 core.String logName; | 4240 core.String logName; |
2994 /** | 4241 |
2995 * Optional. Information about an operation associated with the log entry, if | 4242 /// Optional. Information about an operation associated with the log entry, |
2996 * applicable. | 4243 /// if applicable. |
2997 */ | |
2998 LogEntryOperation operation; | 4244 LogEntryOperation operation; |
2999 /** | 4245 |
3000 * The log entry payload, represented as a protocol buffer. Some Google Cloud | 4246 /// The log entry payload, represented as a protocol buffer. Some Google |
3001 * Platform services use this field for their log entry payloads. | 4247 /// Cloud Platform services use this field for their log entry payloads. |
3002 * | 4248 /// |
3003 * The values for Object must be JSON objects. It can consist of `num`, | 4249 /// The values for Object must be JSON objects. It can consist of `num`, |
3004 * `String`, `bool` and `null` as well as `Map` and `List` values. | 4250 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
3005 */ | |
3006 core.Map<core.String, core.Object> protoPayload; | 4251 core.Map<core.String, core.Object> protoPayload; |
3007 /** | 4252 |
3008 * Output only. The time the log entry was received by Stackdriver Logging. | 4253 /// Output only. The time the log entry was received by Stackdriver Logging. |
3009 */ | |
3010 core.String receiveTimestamp; | 4254 core.String receiveTimestamp; |
3011 /** | 4255 |
3012 * Required. The monitored resource associated with this log entry. Example: a | 4256 /// Required. The monitored resource associated with this log entry. Example: |
3013 * log entry that reports a database error would be associated with the | 4257 /// a log entry that reports a database error would be associated with the |
3014 * monitored resource designating the particular database that reported the | 4258 /// monitored resource designating the particular database that reported the |
3015 * error. | 4259 /// error. |
3016 */ | |
3017 MonitoredResource resource; | 4260 MonitoredResource resource; |
3018 /** | 4261 |
3019 * Optional. The severity of the log entry. The default value is | 4262 /// Optional. The severity of the log entry. The default value is |
3020 * LogSeverity.DEFAULT. | 4263 /// LogSeverity.DEFAULT. |
3021 * Possible string values are: | 4264 /// Possible string values are: |
3022 * - "DEFAULT" : (0) The log entry has no assigned severity level. | 4265 /// - "DEFAULT" : (0) The log entry has no assigned severity level. |
3023 * - "DEBUG" : (100) Debug or trace information. | 4266 /// - "DEBUG" : (100) Debug or trace information. |
3024 * - "INFO" : (200) Routine information, such as ongoing status or | 4267 /// - "INFO" : (200) Routine information, such as ongoing status or |
3025 * performance. | 4268 /// performance. |
3026 * - "NOTICE" : (300) Normal but significant events, such as start up, shut | 4269 /// - "NOTICE" : (300) Normal but significant events, such as start up, shut |
3027 * down, or a configuration change. | 4270 /// down, or a configuration change. |
3028 * - "WARNING" : (400) Warning events might cause problems. | 4271 /// - "WARNING" : (400) Warning events might cause problems. |
3029 * - "ERROR" : (500) Error events are likely to cause problems. | 4272 /// - "ERROR" : (500) Error events are likely to cause problems. |
3030 * - "CRITICAL" : (600) Critical events cause more severe problems or outages. | 4273 /// - "CRITICAL" : (600) Critical events cause more severe problems or |
3031 * - "ALERT" : (700) A person must take an action immediately. | 4274 /// outages. |
3032 * - "EMERGENCY" : (800) One or more systems are unusable. | 4275 /// - "ALERT" : (700) A person must take an action immediately. |
3033 */ | 4276 /// - "EMERGENCY" : (800) One or more systems are unusable. |
3034 core.String severity; | 4277 core.String severity; |
3035 /** | 4278 |
3036 * Optional. Source code location information associated with the log entry, | 4279 /// Optional. Source code location information associated with the log entry, |
3037 * if any. | 4280 /// if any. |
3038 */ | |
3039 LogEntrySourceLocation sourceLocation; | 4281 LogEntrySourceLocation sourceLocation; |
3040 /** The log entry payload, represented as a Unicode string (UTF-8). */ | 4282 |
| 4283 /// The log entry payload, represented as a Unicode string (UTF-8). |
3041 core.String textPayload; | 4284 core.String textPayload; |
3042 /** | 4285 |
3043 * Optional. The time the event described by the log entry occurred. If | 4286 /// Optional. The time the event described by the log entry occurred. This |
3044 * omitted in a new log entry, Stackdriver Logging will insert the time the | 4287 /// time is used to compute the log entry's age and to enforce the logs |
3045 * log entry is received. Stackdriver Logging might reject log entries whose | 4288 /// retention period. If this field is omitted in a new log entry, then |
3046 * time stamps are more than a couple of hours in the future. Log entries with | 4289 /// Stackdriver Logging assigns it the current time.Incoming log entries |
3047 * time stamps in the past are accepted. | 4290 /// should have timestamps that are no more than the logs retention period in |
3048 */ | 4291 /// the past, and no more than 24 hours in the future. See the entries.write |
| 4292 /// API method for more information. |
3049 core.String timestamp; | 4293 core.String timestamp; |
3050 /** | 4294 |
3051 * Optional. Resource name of the trace associated with the log entry, if any. | 4295 /// Optional. Resource name of the trace associated with the log entry, if |
3052 * If it contains a relative resource name, the name is assumed to be relative | 4296 /// any. If it contains a relative resource name, the name is assumed to be |
3053 * to //tracing.googleapis.com. Example: | 4297 /// relative to //tracing.googleapis.com. Example: |
3054 * projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 | 4298 /// projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 |
3055 */ | |
3056 core.String trace; | 4299 core.String trace; |
3057 | 4300 |
3058 LogEntry(); | 4301 LogEntry(); |
3059 | 4302 |
3060 LogEntry.fromJson(core.Map _json) { | 4303 LogEntry.fromJson(core.Map _json) { |
3061 if (_json.containsKey("httpRequest")) { | 4304 if (_json.containsKey("httpRequest")) { |
3062 httpRequest = new HttpRequest.fromJson(_json["httpRequest"]); | 4305 httpRequest = new HttpRequest.fromJson(_json["httpRequest"]); |
3063 } | 4306 } |
3064 if (_json.containsKey("insertId")) { | 4307 if (_json.containsKey("insertId")) { |
3065 insertId = _json["insertId"]; | 4308 insertId = _json["insertId"]; |
(...skipping 16 matching lines...) Expand all Loading... |
3082 if (_json.containsKey("receiveTimestamp")) { | 4325 if (_json.containsKey("receiveTimestamp")) { |
3083 receiveTimestamp = _json["receiveTimestamp"]; | 4326 receiveTimestamp = _json["receiveTimestamp"]; |
3084 } | 4327 } |
3085 if (_json.containsKey("resource")) { | 4328 if (_json.containsKey("resource")) { |
3086 resource = new MonitoredResource.fromJson(_json["resource"]); | 4329 resource = new MonitoredResource.fromJson(_json["resource"]); |
3087 } | 4330 } |
3088 if (_json.containsKey("severity")) { | 4331 if (_json.containsKey("severity")) { |
3089 severity = _json["severity"]; | 4332 severity = _json["severity"]; |
3090 } | 4333 } |
3091 if (_json.containsKey("sourceLocation")) { | 4334 if (_json.containsKey("sourceLocation")) { |
3092 sourceLocation = new LogEntrySourceLocation.fromJson(_json["sourceLocation
"]); | 4335 sourceLocation = |
| 4336 new LogEntrySourceLocation.fromJson(_json["sourceLocation"]); |
3093 } | 4337 } |
3094 if (_json.containsKey("textPayload")) { | 4338 if (_json.containsKey("textPayload")) { |
3095 textPayload = _json["textPayload"]; | 4339 textPayload = _json["textPayload"]; |
3096 } | 4340 } |
3097 if (_json.containsKey("timestamp")) { | 4341 if (_json.containsKey("timestamp")) { |
3098 timestamp = _json["timestamp"]; | 4342 timestamp = _json["timestamp"]; |
3099 } | 4343 } |
3100 if (_json.containsKey("trace")) { | 4344 if (_json.containsKey("trace")) { |
3101 trace = _json["trace"]; | 4345 trace = _json["trace"]; |
3102 } | 4346 } |
3103 } | 4347 } |
3104 | 4348 |
3105 core.Map<core.String, core.Object> toJson() { | 4349 core.Map<core.String, core.Object> toJson() { |
3106 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4350 final core.Map<core.String, core.Object> _json = |
| 4351 new core.Map<core.String, core.Object>(); |
3107 if (httpRequest != null) { | 4352 if (httpRequest != null) { |
3108 _json["httpRequest"] = (httpRequest).toJson(); | 4353 _json["httpRequest"] = (httpRequest).toJson(); |
3109 } | 4354 } |
3110 if (insertId != null) { | 4355 if (insertId != null) { |
3111 _json["insertId"] = insertId; | 4356 _json["insertId"] = insertId; |
3112 } | 4357 } |
3113 if (jsonPayload != null) { | 4358 if (jsonPayload != null) { |
3114 _json["jsonPayload"] = jsonPayload; | 4359 _json["jsonPayload"] = jsonPayload; |
3115 } | 4360 } |
3116 if (labels != null) { | 4361 if (labels != null) { |
(...skipping 26 matching lines...) Expand all Loading... |
3143 if (timestamp != null) { | 4388 if (timestamp != null) { |
3144 _json["timestamp"] = timestamp; | 4389 _json["timestamp"] = timestamp; |
3145 } | 4390 } |
3146 if (trace != null) { | 4391 if (trace != null) { |
3147 _json["trace"] = trace; | 4392 _json["trace"] = trace; |
3148 } | 4393 } |
3149 return _json; | 4394 return _json; |
3150 } | 4395 } |
3151 } | 4396 } |
3152 | 4397 |
3153 /** | 4398 /// Additional information about a potentially long-running operation with |
3154 * Additional information about a potentially long-running operation with which | 4399 /// which a log entry is associated. |
3155 * a log entry is associated. | |
3156 */ | |
3157 class LogEntryOperation { | 4400 class LogEntryOperation { |
3158 /** | 4401 /// Optional. Set this to True if this is the first log entry in the |
3159 * Optional. Set this to True if this is the first log entry in the operation. | 4402 /// operation. |
3160 */ | |
3161 core.bool first; | 4403 core.bool first; |
3162 /** | 4404 |
3163 * Optional. An arbitrary operation identifier. Log entries with the same | 4405 /// Optional. An arbitrary operation identifier. Log entries with the same |
3164 * identifier are assumed to be part of the same operation. | 4406 /// identifier are assumed to be part of the same operation. |
3165 */ | |
3166 core.String id; | 4407 core.String id; |
3167 /** | 4408 |
3168 * Optional. Set this to True if this is the last log entry in the operation. | 4409 /// Optional. Set this to True if this is the last log entry in the |
3169 */ | 4410 /// operation. |
3170 core.bool last; | 4411 core.bool last; |
3171 /** | 4412 |
3172 * Optional. An arbitrary producer identifier. The combination of id and | 4413 /// Optional. An arbitrary producer identifier. The combination of id and |
3173 * producer must be globally unique. Examples for producer: | 4414 /// producer must be globally unique. Examples for producer: |
3174 * "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication". | 4415 /// "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication". |
3175 */ | |
3176 core.String producer; | 4416 core.String producer; |
3177 | 4417 |
3178 LogEntryOperation(); | 4418 LogEntryOperation(); |
3179 | 4419 |
3180 LogEntryOperation.fromJson(core.Map _json) { | 4420 LogEntryOperation.fromJson(core.Map _json) { |
3181 if (_json.containsKey("first")) { | 4421 if (_json.containsKey("first")) { |
3182 first = _json["first"]; | 4422 first = _json["first"]; |
3183 } | 4423 } |
3184 if (_json.containsKey("id")) { | 4424 if (_json.containsKey("id")) { |
3185 id = _json["id"]; | 4425 id = _json["id"]; |
3186 } | 4426 } |
3187 if (_json.containsKey("last")) { | 4427 if (_json.containsKey("last")) { |
3188 last = _json["last"]; | 4428 last = _json["last"]; |
3189 } | 4429 } |
3190 if (_json.containsKey("producer")) { | 4430 if (_json.containsKey("producer")) { |
3191 producer = _json["producer"]; | 4431 producer = _json["producer"]; |
3192 } | 4432 } |
3193 } | 4433 } |
3194 | 4434 |
3195 core.Map<core.String, core.Object> toJson() { | 4435 core.Map<core.String, core.Object> toJson() { |
3196 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4436 final core.Map<core.String, core.Object> _json = |
| 4437 new core.Map<core.String, core.Object>(); |
3197 if (first != null) { | 4438 if (first != null) { |
3198 _json["first"] = first; | 4439 _json["first"] = first; |
3199 } | 4440 } |
3200 if (id != null) { | 4441 if (id != null) { |
3201 _json["id"] = id; | 4442 _json["id"] = id; |
3202 } | 4443 } |
3203 if (last != null) { | 4444 if (last != null) { |
3204 _json["last"] = last; | 4445 _json["last"] = last; |
3205 } | 4446 } |
3206 if (producer != null) { | 4447 if (producer != null) { |
3207 _json["producer"] = producer; | 4448 _json["producer"] = producer; |
3208 } | 4449 } |
3209 return _json; | 4450 return _json; |
3210 } | 4451 } |
3211 } | 4452 } |
3212 | 4453 |
3213 /** | 4454 /// Additional information about the source code location that produced the log |
3214 * Additional information about the source code location that produced the log | 4455 /// entry. |
3215 * entry. | |
3216 */ | |
3217 class LogEntrySourceLocation { | 4456 class LogEntrySourceLocation { |
3218 /** | 4457 /// Optional. Source file name. Depending on the runtime environment, this |
3219 * Optional. Source file name. Depending on the runtime environment, this | 4458 /// might be a simple name or a fully-qualified name. |
3220 * might be a simple name or a fully-qualified name. | |
3221 */ | |
3222 core.String file; | 4459 core.String file; |
3223 /** | 4460 |
3224 * Optional. Human-readable name of the function or method being invoked, with | 4461 /// Optional. Human-readable name of the function or method being invoked, |
3225 * optional context such as the class or package name. This information may be | 4462 /// with optional context such as the class or package name. This information |
3226 * used in contexts such as the logs viewer, where a file and line number are | 4463 /// may be used in contexts such as the logs viewer, where a file and line |
3227 * less meaningful. The format can vary by language. For example: | 4464 /// number are less meaningful. The format can vary by language. For example: |
3228 * qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python). | 4465 /// qual.if.ied.Class.method (Java), dir/package.func (Go), function |
3229 */ | 4466 /// (Python). |
3230 core.String function; | 4467 core.String function; |
3231 /** | 4468 |
3232 * Optional. Line within the source file. 1-based; 0 indicates no line number | 4469 /// Optional. Line within the source file. 1-based; 0 indicates no line |
3233 * available. | 4470 /// number available. |
3234 */ | |
3235 core.String line; | 4471 core.String line; |
3236 | 4472 |
3237 LogEntrySourceLocation(); | 4473 LogEntrySourceLocation(); |
3238 | 4474 |
3239 LogEntrySourceLocation.fromJson(core.Map _json) { | 4475 LogEntrySourceLocation.fromJson(core.Map _json) { |
3240 if (_json.containsKey("file")) { | 4476 if (_json.containsKey("file")) { |
3241 file = _json["file"]; | 4477 file = _json["file"]; |
3242 } | 4478 } |
3243 if (_json.containsKey("function")) { | 4479 if (_json.containsKey("function")) { |
3244 function = _json["function"]; | 4480 function = _json["function"]; |
3245 } | 4481 } |
3246 if (_json.containsKey("line")) { | 4482 if (_json.containsKey("line")) { |
3247 line = _json["line"]; | 4483 line = _json["line"]; |
3248 } | 4484 } |
3249 } | 4485 } |
3250 | 4486 |
3251 core.Map<core.String, core.Object> toJson() { | 4487 core.Map<core.String, core.Object> toJson() { |
3252 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4488 final core.Map<core.String, core.Object> _json = |
| 4489 new core.Map<core.String, core.Object>(); |
3253 if (file != null) { | 4490 if (file != null) { |
3254 _json["file"] = file; | 4491 _json["file"] = file; |
3255 } | 4492 } |
3256 if (function != null) { | 4493 if (function != null) { |
3257 _json["function"] = function; | 4494 _json["function"] = function; |
3258 } | 4495 } |
3259 if (line != null) { | 4496 if (line != null) { |
3260 _json["line"] = line; | 4497 _json["line"] = line; |
3261 } | 4498 } |
3262 return _json; | 4499 return _json; |
3263 } | 4500 } |
3264 } | 4501 } |
3265 | 4502 |
3266 /** Application log line emitted while processing a request. */ | 4503 /// Specifies a set of log entries that are not to be stored in Stackdriver |
| 4504 /// Logging. If your project receives a large volume of logs, you might be able |
| 4505 /// to use exclusions to reduce your chargeable logs. Exclusions are processed |
| 4506 /// after log sinks, so you can export log entries before they are excluded. |
| 4507 /// Audit log entries and log entries from Amazon Web Services are never |
| 4508 /// excluded. |
| 4509 class LogExclusion { |
| 4510 /// Optional. A description of this exclusion. |
| 4511 core.String description; |
| 4512 |
| 4513 /// Optional. If set to True, then this exclusion is disabled and it does not |
| 4514 /// exclude any log entries. You can use exclusions.patch to change the value |
| 4515 /// of this field. |
| 4516 core.bool disabled; |
| 4517 |
| 4518 /// Required. An advanced logs filter that matches the log entries to be |
| 4519 /// excluded. By using the sample function, you can exclude less than 100% of |
| 4520 /// the matching log entries. For example, the following filter matches 99% |
| 4521 /// of low-severity log entries from load balancers: |
| 4522 /// "resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)" |
| 4523 core.String filter; |
| 4524 |
| 4525 /// Required. A client-assigned identifier, such as |
| 4526 /// "load-balancer-exclusion". Identifiers are limited to 100 characters and |
| 4527 /// can include only letters, digits, underscores, hyphens, and periods. |
| 4528 core.String name; |
| 4529 |
| 4530 LogExclusion(); |
| 4531 |
| 4532 LogExclusion.fromJson(core.Map _json) { |
| 4533 if (_json.containsKey("description")) { |
| 4534 description = _json["description"]; |
| 4535 } |
| 4536 if (_json.containsKey("disabled")) { |
| 4537 disabled = _json["disabled"]; |
| 4538 } |
| 4539 if (_json.containsKey("filter")) { |
| 4540 filter = _json["filter"]; |
| 4541 } |
| 4542 if (_json.containsKey("name")) { |
| 4543 name = _json["name"]; |
| 4544 } |
| 4545 } |
| 4546 |
| 4547 core.Map<core.String, core.Object> toJson() { |
| 4548 final core.Map<core.String, core.Object> _json = |
| 4549 new core.Map<core.String, core.Object>(); |
| 4550 if (description != null) { |
| 4551 _json["description"] = description; |
| 4552 } |
| 4553 if (disabled != null) { |
| 4554 _json["disabled"] = disabled; |
| 4555 } |
| 4556 if (filter != null) { |
| 4557 _json["filter"] = filter; |
| 4558 } |
| 4559 if (name != null) { |
| 4560 _json["name"] = name; |
| 4561 } |
| 4562 return _json; |
| 4563 } |
| 4564 } |
| 4565 |
| 4566 /// Application log line emitted while processing a request. |
3267 class LogLine { | 4567 class LogLine { |
3268 /** App-provided log message. */ | 4568 /// App-provided log message. |
3269 core.String logMessage; | 4569 core.String logMessage; |
3270 /** | 4570 |
3271 * Severity of this log entry. | 4571 /// Severity of this log entry. |
3272 * Possible string values are: | 4572 /// Possible string values are: |
3273 * - "DEFAULT" : (0) The log entry has no assigned severity level. | 4573 /// - "DEFAULT" : (0) The log entry has no assigned severity level. |
3274 * - "DEBUG" : (100) Debug or trace information. | 4574 /// - "DEBUG" : (100) Debug or trace information. |
3275 * - "INFO" : (200) Routine information, such as ongoing status or | 4575 /// - "INFO" : (200) Routine information, such as ongoing status or |
3276 * performance. | 4576 /// performance. |
3277 * - "NOTICE" : (300) Normal but significant events, such as start up, shut | 4577 /// - "NOTICE" : (300) Normal but significant events, such as start up, shut |
3278 * down, or a configuration change. | 4578 /// down, or a configuration change. |
3279 * - "WARNING" : (400) Warning events might cause problems. | 4579 /// - "WARNING" : (400) Warning events might cause problems. |
3280 * - "ERROR" : (500) Error events are likely to cause problems. | 4580 /// - "ERROR" : (500) Error events are likely to cause problems. |
3281 * - "CRITICAL" : (600) Critical events cause more severe problems or outages. | 4581 /// - "CRITICAL" : (600) Critical events cause more severe problems or |
3282 * - "ALERT" : (700) A person must take an action immediately. | 4582 /// outages. |
3283 * - "EMERGENCY" : (800) One or more systems are unusable. | 4583 /// - "ALERT" : (700) A person must take an action immediately. |
3284 */ | 4584 /// - "EMERGENCY" : (800) One or more systems are unusable. |
3285 core.String severity; | 4585 core.String severity; |
3286 /** Where in the source code this log message was written. */ | 4586 |
| 4587 /// Where in the source code this log message was written. |
3287 SourceLocation sourceLocation; | 4588 SourceLocation sourceLocation; |
3288 /** Approximate time when this log entry was made. */ | 4589 |
| 4590 /// Approximate time when this log entry was made. |
3289 core.String time; | 4591 core.String time; |
3290 | 4592 |
3291 LogLine(); | 4593 LogLine(); |
3292 | 4594 |
3293 LogLine.fromJson(core.Map _json) { | 4595 LogLine.fromJson(core.Map _json) { |
3294 if (_json.containsKey("logMessage")) { | 4596 if (_json.containsKey("logMessage")) { |
3295 logMessage = _json["logMessage"]; | 4597 logMessage = _json["logMessage"]; |
3296 } | 4598 } |
3297 if (_json.containsKey("severity")) { | 4599 if (_json.containsKey("severity")) { |
3298 severity = _json["severity"]; | 4600 severity = _json["severity"]; |
3299 } | 4601 } |
3300 if (_json.containsKey("sourceLocation")) { | 4602 if (_json.containsKey("sourceLocation")) { |
3301 sourceLocation = new SourceLocation.fromJson(_json["sourceLocation"]); | 4603 sourceLocation = new SourceLocation.fromJson(_json["sourceLocation"]); |
3302 } | 4604 } |
3303 if (_json.containsKey("time")) { | 4605 if (_json.containsKey("time")) { |
3304 time = _json["time"]; | 4606 time = _json["time"]; |
3305 } | 4607 } |
3306 } | 4608 } |
3307 | 4609 |
3308 core.Map<core.String, core.Object> toJson() { | 4610 core.Map<core.String, core.Object> toJson() { |
3309 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4611 final core.Map<core.String, core.Object> _json = |
| 4612 new core.Map<core.String, core.Object>(); |
3310 if (logMessage != null) { | 4613 if (logMessage != null) { |
3311 _json["logMessage"] = logMessage; | 4614 _json["logMessage"] = logMessage; |
3312 } | 4615 } |
3313 if (severity != null) { | 4616 if (severity != null) { |
3314 _json["severity"] = severity; | 4617 _json["severity"] = severity; |
3315 } | 4618 } |
3316 if (sourceLocation != null) { | 4619 if (sourceLocation != null) { |
3317 _json["sourceLocation"] = (sourceLocation).toJson(); | 4620 _json["sourceLocation"] = (sourceLocation).toJson(); |
3318 } | 4621 } |
3319 if (time != null) { | 4622 if (time != null) { |
3320 _json["time"] = time; | 4623 _json["time"] = time; |
3321 } | 4624 } |
3322 return _json; | 4625 return _json; |
3323 } | 4626 } |
3324 } | 4627 } |
3325 | 4628 |
3326 /** | 4629 /// Describes a logs-based metric. The value of the metric is the number of log |
3327 * Describes a logs-based metric. The value of the metric is the number of log | 4630 /// entries that match a logs filter in a given time interval.Logs-based metric |
3328 * entries that match a logs filter in a given time interval. | 4631 /// can also be used to extract values from logs and create a a distribution of |
3329 */ | 4632 /// the values. The distribution records the statistics of the extracted values |
| 4633 /// along with an optional histogram of the values as specified by the bucket |
| 4634 /// options. |
3330 class LogMetric { | 4635 class LogMetric { |
3331 /** | 4636 /// Optional. The bucket_options are required when the logs-based metric is |
3332 * Optional. A description of this metric, which is used in documentation. | 4637 /// using a DISTRIBUTION value type and it describes the bucket boundaries |
3333 */ | 4638 /// used to create a histogram of the extracted values. |
| 4639 BucketOptions bucketOptions; |
| 4640 |
| 4641 /// Optional. A description of this metric, which is used in documentation. |
3334 core.String description; | 4642 core.String description; |
3335 /** | 4643 |
3336 * Required. An advanced logs filter which is used to match log entries. | 4644 /// Required. An advanced logs filter which is used to match log entries. |
3337 * Example: | 4645 /// Example: |
3338 * "resource.type=gae_app AND severity>=ERROR" | 4646 /// "resource.type=gae_app AND severity>=ERROR" |
3339 * The maximum length of the filter is 20000 characters. | 4647 /// The maximum length of the filter is 20000 characters. |
3340 */ | |
3341 core.String filter; | 4648 core.String filter; |
3342 /** | 4649 |
3343 * Required. The client-assigned metric identifier. Examples: "error_count", | 4650 /// Optional. A map from a label key string to an extractor expression which |
3344 * "nginx/requests".Metric identifiers are limited to 100 characters and can | 4651 /// is used to extract data from a log entry field and assign as the label |
3345 * include only the following characters: A-Z, a-z, 0-9, and the special | 4652 /// value. Each label key specified in the LabelDescriptor must have an |
3346 * characters _-.,+!*',()%/. The forward-slash character (/) denotes a | 4653 /// associated extractor expression in this map. The syntax of the extractor |
3347 * hierarchy of name pieces, and it cannot be the first character of the | 4654 /// expression is the same as for the value_extractor field.The extracted |
3348 * name.The metric identifier in this field must not be URL-encoded | 4655 /// value is converted to the type defined in the label descriptor. If the |
3349 * (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric | 4656 /// either the extraction or the type conversion fails, the label will have a |
3350 * identifier appears as the [METRIC_ID] part of a metric_name API parameter, | 4657 /// default value. The default value for a string label is an empty string, |
3351 * then the metric identifier must be URL-encoded. Example: | 4658 /// for an integer label its 0, and for a boolean label its false.Note that |
3352 * "projects/my-project/metrics/nginx%2Frequests". | 4659 /// there are upper bounds on the maximum number of labels and the number of |
3353 */ | 4660 /// active time series that are allowed in a project. |
| 4661 core.Map<core.String, core.String> labelExtractors; |
| 4662 |
| 4663 /// Optional. The metric descriptor associated with the logs-based metric. If |
| 4664 /// unspecified, it uses a default metric descriptor with a DELTA metric |
| 4665 /// kind, INT64 value type, with no labels and a unit of "1". Such a metric |
| 4666 /// counts the number of log entries matching the filter expression.The name, |
| 4667 /// type, and description fields in the metric_descriptor are output only, |
| 4668 /// and is constructed using the name and description field in the |
| 4669 /// LogMetric.To create a logs-based metric that records a distribution of |
| 4670 /// log values, a DELTA metric kind with a DISTRIBUTION value type must be |
| 4671 /// used along with a value_extractor expression in the LogMetric.Each label |
| 4672 /// in the metric descriptor must have a matching label name as the key and |
| 4673 /// an extractor expression as the value in the label_extractors map.The |
| 4674 /// metric_kind and value_type fields in the metric_descriptor cannot be |
| 4675 /// updated once initially configured. New labels can be added in the |
| 4676 /// metric_descriptor, but existing labels cannot be modified except for |
| 4677 /// their description. |
| 4678 MetricDescriptor metricDescriptor; |
| 4679 |
| 4680 /// Required. The client-assigned metric identifier. Examples: "error_count", |
| 4681 /// "nginx/requests".Metric identifiers are limited to 100 characters and can |
| 4682 /// include only the following characters: A-Z, a-z, 0-9, and the special |
| 4683 /// characters _-.,+!*',()%/. The forward-slash character (/) denotes a |
| 4684 /// hierarchy of name pieces, and it cannot be the first character of the |
| 4685 /// name.The metric identifier in this field must not be URL-encoded |
| 4686 /// (https://en.wikipedia.org/wiki/Percent-encoding). However, when the |
| 4687 /// metric identifier appears as the [METRIC_ID] part of a metric_name API |
| 4688 /// parameter, then the metric identifier must be URL-encoded. Example: |
| 4689 /// "projects/my-project/metrics/nginx%2Frequests". |
3354 core.String name; | 4690 core.String name; |
3355 /** | 4691 |
3356 * Output only. The API version that created or updated this metric. This | 4692 /// Optional. A value_extractor is required when using a distribution |
3357 * value is currently always set to V2. | 4693 /// logs-based metric to extract the values to record from a log entry. Two |
3358 * Possible string values are: | 4694 /// functions are supported for value extraction: EXTRACT(field) or |
3359 * - "V2" : Stackdriver Logging API v2. | 4695 /// REGEXP_EXTRACT(field, regex). The argument are: 1. field: The name of |
3360 * - "V1" : Stackdriver Logging API v1. | 4696 /// the log entry field from which the value is to be extracted. 2. regex: |
3361 */ | 4697 /// A regular expression using the Google RE2 syntax |
| 4698 /// (https://github.com/google/re2/wiki/Syntax) with a single capture group |
| 4699 /// to extract data from the specified log entry field. The value of the |
| 4700 /// field is converted to a string before applying the regex. It is an error |
| 4701 /// to specify a regex that does not include exactly one capture group.The |
| 4702 /// result of the extraction must be convertible to a double type, as the |
| 4703 /// distribution always records double values. If either the extraction or |
| 4704 /// the conversion to double fails, then those values are not recorded in the |
| 4705 /// distribution.Example: REGEXP_EXTRACT(jsonPayload.request, |
| 4706 /// ".*quantity=(\d+).*") |
| 4707 core.String valueExtractor; |
| 4708 |
| 4709 /// Deprecated. The API version that created or updated this metric. The v2 |
| 4710 /// format is used by default and cannot be changed. |
| 4711 /// Possible string values are: |
| 4712 /// - "V2" : Stackdriver Logging API v2. |
| 4713 /// - "V1" : Stackdriver Logging API v1. |
3362 core.String version; | 4714 core.String version; |
3363 | 4715 |
3364 LogMetric(); | 4716 LogMetric(); |
3365 | 4717 |
3366 LogMetric.fromJson(core.Map _json) { | 4718 LogMetric.fromJson(core.Map _json) { |
| 4719 if (_json.containsKey("bucketOptions")) { |
| 4720 bucketOptions = new BucketOptions.fromJson(_json["bucketOptions"]); |
| 4721 } |
3367 if (_json.containsKey("description")) { | 4722 if (_json.containsKey("description")) { |
3368 description = _json["description"]; | 4723 description = _json["description"]; |
3369 } | 4724 } |
3370 if (_json.containsKey("filter")) { | 4725 if (_json.containsKey("filter")) { |
3371 filter = _json["filter"]; | 4726 filter = _json["filter"]; |
3372 } | 4727 } |
| 4728 if (_json.containsKey("labelExtractors")) { |
| 4729 labelExtractors = _json["labelExtractors"]; |
| 4730 } |
| 4731 if (_json.containsKey("metricDescriptor")) { |
| 4732 metricDescriptor = |
| 4733 new MetricDescriptor.fromJson(_json["metricDescriptor"]); |
| 4734 } |
3373 if (_json.containsKey("name")) { | 4735 if (_json.containsKey("name")) { |
3374 name = _json["name"]; | 4736 name = _json["name"]; |
3375 } | 4737 } |
| 4738 if (_json.containsKey("valueExtractor")) { |
| 4739 valueExtractor = _json["valueExtractor"]; |
| 4740 } |
3376 if (_json.containsKey("version")) { | 4741 if (_json.containsKey("version")) { |
3377 version = _json["version"]; | 4742 version = _json["version"]; |
3378 } | 4743 } |
3379 } | 4744 } |
3380 | 4745 |
3381 core.Map<core.String, core.Object> toJson() { | 4746 core.Map<core.String, core.Object> toJson() { |
3382 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4747 final core.Map<core.String, core.Object> _json = |
| 4748 new core.Map<core.String, core.Object>(); |
| 4749 if (bucketOptions != null) { |
| 4750 _json["bucketOptions"] = (bucketOptions).toJson(); |
| 4751 } |
3383 if (description != null) { | 4752 if (description != null) { |
3384 _json["description"] = description; | 4753 _json["description"] = description; |
3385 } | 4754 } |
3386 if (filter != null) { | 4755 if (filter != null) { |
3387 _json["filter"] = filter; | 4756 _json["filter"] = filter; |
3388 } | 4757 } |
| 4758 if (labelExtractors != null) { |
| 4759 _json["labelExtractors"] = labelExtractors; |
| 4760 } |
| 4761 if (metricDescriptor != null) { |
| 4762 _json["metricDescriptor"] = (metricDescriptor).toJson(); |
| 4763 } |
3389 if (name != null) { | 4764 if (name != null) { |
3390 _json["name"] = name; | 4765 _json["name"] = name; |
3391 } | 4766 } |
| 4767 if (valueExtractor != null) { |
| 4768 _json["valueExtractor"] = valueExtractor; |
| 4769 } |
3392 if (version != null) { | 4770 if (version != null) { |
3393 _json["version"] = version; | 4771 _json["version"] = version; |
3394 } | 4772 } |
3395 return _json; | 4773 return _json; |
3396 } | 4774 } |
3397 } | 4775 } |
3398 | 4776 |
3399 /** | 4777 /// Describes a sink used to export log entries to one of the following |
3400 * Describes a sink used to export log entries to one of the following | 4778 /// destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or |
3401 * destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a | 4779 /// a Cloud Pub/Sub topic. A logs filter controls which log entries are |
3402 * Cloud Pub/Sub topic. A logs filter controls which log entries are exported. | 4780 /// exported. The sink must be created within a project, organization, billing |
3403 * The sink must be created within a project, organization, billing account, or | 4781 /// account, or folder. |
3404 * folder. | |
3405 */ | |
3406 class LogSink { | 4782 class LogSink { |
3407 /** | 4783 /// Required. The export destination: |
3408 * Required. The export destination: | 4784 /// "storage.googleapis.com/[GCS_BUCKET]" |
3409 * "storage.googleapis.com/[GCS_BUCKET]" | 4785 /// "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" |
3410 * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" | 4786 /// "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" |
3411 * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" | 4787 /// The sink's writer_identity, set when the sink is created, must have |
3412 * The sink's writer_identity, set when the sink is created, must have | 4788 /// permission to write to the destination or else the log entries are not |
3413 * permission to write to the destination or else the log entries are not | 4789 /// exported. For more information, see Exporting Logs With Sinks. |
3414 * exported. For more information, see Exporting Logs With Sinks. | |
3415 */ | |
3416 core.String destination; | 4790 core.String destination; |
3417 /** | 4791 |
3418 * Optional. The time at which this sink will stop exporting log entries. Log | 4792 /// Deprecated. This field is ignored when creating or updating sinks. |
3419 * entries are exported only if their timestamp is earlier than the end time. | |
3420 * If this field is not supplied, there is no end time. If both a start time | |
3421 * and an end time are provided, then the end time must be later than the | |
3422 * start time. | |
3423 */ | |
3424 core.String endTime; | 4793 core.String endTime; |
3425 /** | 4794 |
3426 * Optional. An advanced logs filter. The only exported log entries are those | 4795 /// Optional. An advanced logs filter. The only exported log entries are |
3427 * that are in the resource owning the sink and that match the filter. The | 4796 /// those that are in the resource owning the sink and that match the filter. |
3428 * filter must use the log entry format specified by the output_version_format | 4797 /// For example: |
3429 * parameter. For example, in the v2 format: | 4798 /// logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR |
3430 * logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR | |
3431 */ | |
3432 core.String filter; | 4799 core.String filter; |
3433 /** | 4800 |
3434 * Optional. This field applies only to sinks owned by organizations and | 4801 /// Optional. This field applies only to sinks owned by organizations and |
3435 * folders. If the field is false, the default, only the logs owned by the | 4802 /// folders. If the field is false, the default, only the logs owned by the |
3436 * sink's parent resource are available for export. If the field is true, then | 4803 /// sink's parent resource are available for export. If the field is true, |
3437 * logs from all the projects, folders, and billing accounts contained in the | 4804 /// then logs from all the projects, folders, and billing accounts contained |
3438 * sink's parent resource are also available for export. Whether a particular | 4805 /// in the sink's parent resource are also available for export. Whether a |
3439 * log entry from the children is exported depends on the sink's filter | 4806 /// particular log entry from the children is exported depends on the sink's |
3440 * expression. For example, if this field is true, then the filter | 4807 /// filter expression. For example, if this field is true, then the filter |
3441 * resource.type=gce_instance would export all Compute Engine VM instance log | 4808 /// resource.type=gce_instance would export all Compute Engine VM instance |
3442 * entries from all projects in the sink's parent. To only export entries from | 4809 /// log entries from all projects in the sink's parent. To only export |
3443 * certain child projects, filter on the project part of the log name: | 4810 /// entries from certain child projects, filter on the project part of the |
3444 * logName:("projects/test-project1/" OR "projects/test-project2/") AND | 4811 /// log name: |
3445 * resource.type=gce_instance | 4812 /// logName:("projects/test-project1/" OR "projects/test-project2/") AND |
3446 */ | 4813 /// resource.type=gce_instance |
3447 core.bool includeChildren; | 4814 core.bool includeChildren; |
3448 /** | 4815 |
3449 * Required. The client-assigned sink identifier, unique within the project. | 4816 /// Required. The client-assigned sink identifier, unique within the project. |
3450 * Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 | 4817 /// Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to |
3451 * characters and can include only the following characters: upper and | 4818 /// 100 characters and can include only the following characters: upper and |
3452 * lower-case alphanumeric characters, underscores, hyphens, and periods. | 4819 /// lower-case alphanumeric characters, underscores, hyphens, and periods. |
3453 */ | |
3454 core.String name; | 4820 core.String name; |
3455 /** | 4821 |
3456 * Deprecated. The log entry format to use for this sink's exported log | 4822 /// Deprecated. The log entry format to use for this sink's exported log |
3457 * entries. The v2 format is used by default and cannot be changed. | 4823 /// entries. The v2 format is used by default and cannot be changed. |
3458 * Possible string values are: | 4824 /// Possible string values are: |
3459 * - "VERSION_FORMAT_UNSPECIFIED" : An unspecified format version that will | 4825 /// - "VERSION_FORMAT_UNSPECIFIED" : An unspecified format version that will |
3460 * default to V2. | 4826 /// default to V2. |
3461 * - "V2" : LogEntry version 2 format. | 4827 /// - "V2" : LogEntry version 2 format. |
3462 * - "V1" : LogEntry version 1 format. | 4828 /// - "V1" : LogEntry version 1 format. |
3463 */ | |
3464 core.String outputVersionFormat; | 4829 core.String outputVersionFormat; |
3465 /** | 4830 |
3466 * Optional. The time at which this sink will begin exporting log entries. Log | 4831 /// Deprecated. This field is ignored when creating or updating sinks. |
3467 * entries are exported only if their timestamp is not earlier than the start | |
3468 * time. The default value of this field is the time the sink is created or | |
3469 * updated. | |
3470 */ | |
3471 core.String startTime; | 4832 core.String startTime; |
3472 /** | 4833 |
3473 * Output only. An IAM identity—a service account or group—under | 4834 /// Output only. An IAM identity—a service account or group—under |
3474 * which Stackdriver Logging writes the exported log entries to the sink's | 4835 /// which Stackdriver Logging writes the exported log entries to the sink's |
3475 * destination. This field is set by sinks.create and sinks.update, based on | 4836 /// destination. This field is set by sinks.create and sinks.update, based on |
3476 * the setting of unique_writer_identity in those methods.Until you grant this | 4837 /// the setting of unique_writer_identity in those methods.Until you grant |
3477 * identity write-access to the destination, log entry exports from this sink | 4838 /// this identity write-access to the destination, log entry exports from |
3478 * will fail. For more information, see Granting access for a resource. | 4839 /// this sink will fail. For more information, see Granting access for a |
3479 * Consult the destination service's documentation to determine the | 4840 /// resource. Consult the destination service's documentation to determine |
3480 * appropriate IAM roles to assign to the identity. | 4841 /// the appropriate IAM roles to assign to the identity. |
3481 */ | |
3482 core.String writerIdentity; | 4842 core.String writerIdentity; |
3483 | 4843 |
3484 LogSink(); | 4844 LogSink(); |
3485 | 4845 |
3486 LogSink.fromJson(core.Map _json) { | 4846 LogSink.fromJson(core.Map _json) { |
3487 if (_json.containsKey("destination")) { | 4847 if (_json.containsKey("destination")) { |
3488 destination = _json["destination"]; | 4848 destination = _json["destination"]; |
3489 } | 4849 } |
3490 if (_json.containsKey("endTime")) { | 4850 if (_json.containsKey("endTime")) { |
3491 endTime = _json["endTime"]; | 4851 endTime = _json["endTime"]; |
(...skipping 12 matching lines...) Expand all Loading... |
3504 } | 4864 } |
3505 if (_json.containsKey("startTime")) { | 4865 if (_json.containsKey("startTime")) { |
3506 startTime = _json["startTime"]; | 4866 startTime = _json["startTime"]; |
3507 } | 4867 } |
3508 if (_json.containsKey("writerIdentity")) { | 4868 if (_json.containsKey("writerIdentity")) { |
3509 writerIdentity = _json["writerIdentity"]; | 4869 writerIdentity = _json["writerIdentity"]; |
3510 } | 4870 } |
3511 } | 4871 } |
3512 | 4872 |
3513 core.Map<core.String, core.Object> toJson() { | 4873 core.Map<core.String, core.Object> toJson() { |
3514 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4874 final core.Map<core.String, core.Object> _json = |
| 4875 new core.Map<core.String, core.Object>(); |
3515 if (destination != null) { | 4876 if (destination != null) { |
3516 _json["destination"] = destination; | 4877 _json["destination"] = destination; |
3517 } | 4878 } |
3518 if (endTime != null) { | 4879 if (endTime != null) { |
3519 _json["endTime"] = endTime; | 4880 _json["endTime"] = endTime; |
3520 } | 4881 } |
3521 if (filter != null) { | 4882 if (filter != null) { |
3522 _json["filter"] = filter; | 4883 _json["filter"] = filter; |
3523 } | 4884 } |
3524 if (includeChildren != null) { | 4885 if (includeChildren != null) { |
3525 _json["includeChildren"] = includeChildren; | 4886 _json["includeChildren"] = includeChildren; |
3526 } | 4887 } |
3527 if (name != null) { | 4888 if (name != null) { |
3528 _json["name"] = name; | 4889 _json["name"] = name; |
3529 } | 4890 } |
3530 if (outputVersionFormat != null) { | 4891 if (outputVersionFormat != null) { |
3531 _json["outputVersionFormat"] = outputVersionFormat; | 4892 _json["outputVersionFormat"] = outputVersionFormat; |
3532 } | 4893 } |
3533 if (startTime != null) { | 4894 if (startTime != null) { |
3534 _json["startTime"] = startTime; | 4895 _json["startTime"] = startTime; |
3535 } | 4896 } |
3536 if (writerIdentity != null) { | 4897 if (writerIdentity != null) { |
3537 _json["writerIdentity"] = writerIdentity; | 4898 _json["writerIdentity"] = writerIdentity; |
3538 } | 4899 } |
3539 return _json; | 4900 return _json; |
3540 } | 4901 } |
3541 } | 4902 } |
3542 | 4903 |
3543 /** | 4904 /// Defines a metric type and its schema. Once a metric descriptor is created, |
3544 * An object representing a resource that can be used for monitoring, logging, | 4905 /// deleting or altering it stops data collection and makes the metric type's |
3545 * billing, or other purposes. Examples include virtual machine instances, | 4906 /// existing data unusable. |
3546 * databases, and storage devices such as disks. The type field identifies a | 4907 class MetricDescriptor { |
3547 * MonitoredResourceDescriptor object that describes the resource's schema. | 4908 /// A detailed description of the metric, which can be used in documentation. |
3548 * Information in the labels field identifies the actual resource and its | 4909 core.String description; |
3549 * attributes according to the schema. For example, a particular Compute Engine | 4910 |
3550 * VM instance could be represented by the following object, because the | 4911 /// A concise name for the metric, which can be displayed in user interfaces. |
3551 * MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and | 4912 /// Use sentence case without an ending period, for example "Request count". |
3552 * "zone": | 4913 core.String displayName; |
3553 * { "type": "gce_instance", | 4914 |
3554 * "labels": { "instance_id": "12345678901234", | 4915 /// The set of labels that can be used to describe a specific instance of |
3555 * "zone": "us-central1-a" }} | 4916 /// this metric type. For example, the |
3556 */ | 4917 /// appengine.googleapis.com/http/server/response_latencies metric type has a |
| 4918 /// label for the HTTP response code, response_code, so you can look at |
| 4919 /// latencies for successful responses or just for responses that failed. |
| 4920 core.List<LabelDescriptor> labels; |
| 4921 |
| 4922 /// Whether the metric records instantaneous values, changes to a value, etc. |
| 4923 /// Some combinations of metric_kind and value_type might not be supported. |
| 4924 /// Possible string values are: |
| 4925 /// - "METRIC_KIND_UNSPECIFIED" : Do not use this default value. |
| 4926 /// - "GAUGE" : An instantaneous measurement of a value. |
| 4927 /// - "DELTA" : The change in a value during a time interval. |
| 4928 /// - "CUMULATIVE" : A value accumulated over a time interval. Cumulative |
| 4929 /// measurements in a time series should have the same start time and |
| 4930 /// increasing end times, until an event resets the cumulative value to zero |
| 4931 /// and sets a new start time for the following points. |
| 4932 core.String metricKind; |
| 4933 |
| 4934 /// The resource name of the metric descriptor. Depending on the |
| 4935 /// implementation, the name typically includes: (1) the parent resource name |
| 4936 /// that defines the scope of the metric type or of its data; and (2) the |
| 4937 /// metric's URL-encoded type, which also appears in the type field of this |
| 4938 /// descriptor. For example, following is the resource name of a custom |
| 4939 /// metric within the GCP project my-project-id: |
| 4940 /// "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%
2Fpaid%2Famount" |
| 4941 core.String name; |
| 4942 |
| 4943 /// The metric type, including its DNS name prefix. The type is not |
| 4944 /// URL-encoded. All user-defined custom metric types have the DNS name |
| 4945 /// custom.googleapis.com. Metric types should use a natural hierarchical |
| 4946 /// grouping. For example: |
| 4947 /// "custom.googleapis.com/invoice/paid/amount" |
| 4948 /// "appengine.googleapis.com/http/server/response_latencies" |
| 4949 core.String type; |
| 4950 |
| 4951 /// The unit in which the metric value is reported. It is only applicable if |
| 4952 /// the value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are |
| 4953 /// a subset of The Unified Code for Units of Measure |
| 4954 /// (http://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT) |
| 4955 /// bit bit |
| 4956 /// By byte |
| 4957 /// s second |
| 4958 /// min minute |
| 4959 /// h hour |
| 4960 /// d dayPrefixes (PREFIX) |
| 4961 /// k kilo (10**3) |
| 4962 /// M mega (10**6) |
| 4963 /// G giga (10**9) |
| 4964 /// T tera (10**12) |
| 4965 /// P peta (10**15) |
| 4966 /// E exa (10**18) |
| 4967 /// Z zetta (10**21) |
| 4968 /// Y yotta (10**24) |
| 4969 /// m milli (10**-3) |
| 4970 /// u micro (10**-6) |
| 4971 /// n nano (10**-9) |
| 4972 /// p pico (10**-12) |
| 4973 /// f femto (10**-15) |
| 4974 /// a atto (10**-18) |
| 4975 /// z zepto (10**-21) |
| 4976 /// y yocto (10**-24) |
| 4977 /// Ki kibi (2**10) |
| 4978 /// Mi mebi (2**20) |
| 4979 /// Gi gibi (2**30) |
| 4980 /// Ti tebi (2**40)GrammarThe grammar includes the dimensionless unit 1, such |
| 4981 /// as 1/s.The grammar also includes these connectors: |
| 4982 /// / division (as an infix operator, e.g. 1/s). |
| 4983 /// . multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit |
| 4984 /// is as follows: |
| 4985 /// Expression = Component { "." Component } { "/" Component } ; |
| 4986 /// |
| 4987 /// Component = [ PREFIX ] UNIT [ Annotation ] |
| 4988 /// | Annotation |
| 4989 /// | "1" |
| 4990 /// ; |
| 4991 /// |
| 4992 /// Annotation = "{" NAME "}" ; |
| 4993 /// Notes: |
| 4994 /// Annotation is just a comment if it follows a UNIT and is equivalent to 1 |
| 4995 /// if it is used alone. For examples, {requests}/s == 1/s, |
| 4996 /// By{transmitted}/s == By/s. |
| 4997 /// NAME is a sequence of non-blank printable ASCII characters not |
| 4998 /// containing '{' or '}'. |
| 4999 core.String unit; |
| 5000 |
| 5001 /// Whether the measurement is an integer, a floating-point number, etc. Some |
| 5002 /// combinations of metric_kind and value_type might not be supported. |
| 5003 /// Possible string values are: |
| 5004 /// - "VALUE_TYPE_UNSPECIFIED" : Do not use this default value. |
| 5005 /// - "BOOL" : The value is a boolean. This value type can be used only if |
| 5006 /// the metric kind is GAUGE. |
| 5007 /// - "INT64" : The value is a signed 64-bit integer. |
| 5008 /// - "DOUBLE" : The value is a double precision floating point number. |
| 5009 /// - "STRING" : The value is a text string. This value type can be used only |
| 5010 /// if the metric kind is GAUGE. |
| 5011 /// - "DISTRIBUTION" : The value is a Distribution. |
| 5012 /// - "MONEY" : The value is money. |
| 5013 core.String valueType; |
| 5014 |
| 5015 MetricDescriptor(); |
| 5016 |
| 5017 MetricDescriptor.fromJson(core.Map _json) { |
| 5018 if (_json.containsKey("description")) { |
| 5019 description = _json["description"]; |
| 5020 } |
| 5021 if (_json.containsKey("displayName")) { |
| 5022 displayName = _json["displayName"]; |
| 5023 } |
| 5024 if (_json.containsKey("labels")) { |
| 5025 labels = _json["labels"] |
| 5026 .map((value) => new LabelDescriptor.fromJson(value)) |
| 5027 .toList(); |
| 5028 } |
| 5029 if (_json.containsKey("metricKind")) { |
| 5030 metricKind = _json["metricKind"]; |
| 5031 } |
| 5032 if (_json.containsKey("name")) { |
| 5033 name = _json["name"]; |
| 5034 } |
| 5035 if (_json.containsKey("type")) { |
| 5036 type = _json["type"]; |
| 5037 } |
| 5038 if (_json.containsKey("unit")) { |
| 5039 unit = _json["unit"]; |
| 5040 } |
| 5041 if (_json.containsKey("valueType")) { |
| 5042 valueType = _json["valueType"]; |
| 5043 } |
| 5044 } |
| 5045 |
| 5046 core.Map<core.String, core.Object> toJson() { |
| 5047 final core.Map<core.String, core.Object> _json = |
| 5048 new core.Map<core.String, core.Object>(); |
| 5049 if (description != null) { |
| 5050 _json["description"] = description; |
| 5051 } |
| 5052 if (displayName != null) { |
| 5053 _json["displayName"] = displayName; |
| 5054 } |
| 5055 if (labels != null) { |
| 5056 _json["labels"] = labels.map((value) => (value).toJson()).toList(); |
| 5057 } |
| 5058 if (metricKind != null) { |
| 5059 _json["metricKind"] = metricKind; |
| 5060 } |
| 5061 if (name != null) { |
| 5062 _json["name"] = name; |
| 5063 } |
| 5064 if (type != null) { |
| 5065 _json["type"] = type; |
| 5066 } |
| 5067 if (unit != null) { |
| 5068 _json["unit"] = unit; |
| 5069 } |
| 5070 if (valueType != null) { |
| 5071 _json["valueType"] = valueType; |
| 5072 } |
| 5073 return _json; |
| 5074 } |
| 5075 } |
| 5076 |
| 5077 /// An object representing a resource that can be used for monitoring, logging, |
| 5078 /// billing, or other purposes. Examples include virtual machine instances, |
| 5079 /// databases, and storage devices such as disks. The type field identifies a |
| 5080 /// MonitoredResourceDescriptor object that describes the resource's schema. |
| 5081 /// Information in the labels field identifies the actual resource and its |
| 5082 /// attributes according to the schema. For example, a particular Compute |
| 5083 /// Engine VM instance could be represented by the following object, because |
| 5084 /// the MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" |
| 5085 /// and "zone": |
| 5086 /// { "type": "gce_instance", |
| 5087 /// "labels": { "instance_id": "12345678901234", |
| 5088 /// "zone": "us-central1-a" }} |
3557 class MonitoredResource { | 5089 class MonitoredResource { |
3558 /** | 5090 /// Required. Values for all of the labels listed in the associated monitored |
3559 * Required. Values for all of the labels listed in the associated monitored | 5091 /// resource descriptor. For example, Compute Engine VM instances use the |
3560 * resource descriptor. For example, Compute Engine VM instances use the | 5092 /// labels "project_id", "instance_id", and "zone". |
3561 * labels "project_id", "instance_id", and "zone". | |
3562 */ | |
3563 core.Map<core.String, core.String> labels; | 5093 core.Map<core.String, core.String> labels; |
3564 /** | 5094 |
3565 * Required. The monitored resource type. This field must match the type field | 5095 /// Required. The monitored resource type. This field must match the type |
3566 * of a MonitoredResourceDescriptor object. For example, the type of a Compute | 5096 /// field of a MonitoredResourceDescriptor object. For example, the type of a |
3567 * Engine VM instance is gce_instance. | 5097 /// Compute Engine VM instance is gce_instance. |
3568 */ | |
3569 core.String type; | 5098 core.String type; |
3570 | 5099 |
3571 MonitoredResource(); | 5100 MonitoredResource(); |
3572 | 5101 |
3573 MonitoredResource.fromJson(core.Map _json) { | 5102 MonitoredResource.fromJson(core.Map _json) { |
3574 if (_json.containsKey("labels")) { | 5103 if (_json.containsKey("labels")) { |
3575 labels = _json["labels"]; | 5104 labels = _json["labels"]; |
3576 } | 5105 } |
3577 if (_json.containsKey("type")) { | 5106 if (_json.containsKey("type")) { |
3578 type = _json["type"]; | 5107 type = _json["type"]; |
3579 } | 5108 } |
3580 } | 5109 } |
3581 | 5110 |
3582 core.Map<core.String, core.Object> toJson() { | 5111 core.Map<core.String, core.Object> toJson() { |
3583 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5112 final core.Map<core.String, core.Object> _json = |
| 5113 new core.Map<core.String, core.Object>(); |
3584 if (labels != null) { | 5114 if (labels != null) { |
3585 _json["labels"] = labels; | 5115 _json["labels"] = labels; |
3586 } | 5116 } |
3587 if (type != null) { | 5117 if (type != null) { |
3588 _json["type"] = type; | 5118 _json["type"] = type; |
3589 } | 5119 } |
3590 return _json; | 5120 return _json; |
3591 } | 5121 } |
3592 } | 5122 } |
3593 | 5123 |
3594 /** | 5124 /// An object that describes the schema of a MonitoredResource object using a |
3595 * An object that describes the schema of a MonitoredResource object using a | 5125 /// type name and a set of labels. For example, the monitored resource |
3596 * type name and a set of labels. For example, the monitored resource descriptor | 5126 /// descriptor for Google Compute Engine VM instances has a type of |
3597 * for Google Compute Engine VM instances has a type of "gce_instance" and | 5127 /// "gce_instance" and specifies the use of the labels "instance_id" and "zone" |
3598 * specifies the use of the labels "instance_id" and "zone" to identify | 5128 /// to identify particular VM instances.Different APIs can support different |
3599 * particular VM instances.Different APIs can support different monitored | 5129 /// monitored resource types. APIs generally provide a list method that returns |
3600 * resource types. APIs generally provide a list method that returns the | 5130 /// the monitored resource descriptors used by the API. |
3601 * monitored resource descriptors used by the API. | |
3602 */ | |
3603 class MonitoredResourceDescriptor { | 5131 class MonitoredResourceDescriptor { |
3604 /** | 5132 /// Optional. A detailed description of the monitored resource type that |
3605 * Optional. A detailed description of the monitored resource type that might | 5133 /// might be used in documentation. |
3606 * be used in documentation. | |
3607 */ | |
3608 core.String description; | 5134 core.String description; |
3609 /** | 5135 |
3610 * Optional. A concise name for the monitored resource type that might be | 5136 /// Optional. A concise name for the monitored resource type that might be |
3611 * displayed in user interfaces. It should be a Title Cased Noun Phrase, | 5137 /// displayed in user interfaces. It should be a Title Cased Noun Phrase, |
3612 * without any article or other determiners. For example, "Google Cloud SQL | 5138 /// without any article or other determiners. For example, "Google Cloud SQL |
3613 * Database". | 5139 /// Database". |
3614 */ | |
3615 core.String displayName; | 5140 core.String displayName; |
3616 /** | 5141 |
3617 * Required. A set of labels used to describe instances of this monitored | 5142 /// Required. A set of labels used to describe instances of this monitored |
3618 * resource type. For example, an individual Google Cloud SQL database is | 5143 /// resource type. For example, an individual Google Cloud SQL database is |
3619 * identified by values for the labels "database_id" and "zone". | 5144 /// identified by values for the labels "database_id" and "zone". |
3620 */ | |
3621 core.List<LabelDescriptor> labels; | 5145 core.List<LabelDescriptor> labels; |
3622 /** | 5146 |
3623 * Optional. The resource name of the monitored resource descriptor: | 5147 /// Optional. The resource name of the monitored resource descriptor: |
3624 * "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is | 5148 /// "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} |
3625 * the value of the type field in this object and {project_id} is a project ID | 5149 /// is the value of the type field in this object and {project_id} is a |
3626 * that provides API-specific context for accessing the type. APIs that do not | 5150 /// project ID that provides API-specific context for accessing the type. |
3627 * use project information can use the resource name format | 5151 /// APIs that do not use project information can use the resource name format |
3628 * "monitoredResourceDescriptors/{type}". | 5152 /// "monitoredResourceDescriptors/{type}". |
3629 */ | |
3630 core.String name; | 5153 core.String name; |
3631 /** | 5154 |
3632 * Required. The monitored resource type. For example, the type | 5155 /// Required. The monitored resource type. For example, the type |
3633 * "cloudsql_database" represents databases in Google Cloud SQL. The maximum | 5156 /// "cloudsql_database" represents databases in Google Cloud SQL. The maximum |
3634 * length of this value is 256 characters. | 5157 /// length of this value is 256 characters. |
3635 */ | |
3636 core.String type; | 5158 core.String type; |
3637 | 5159 |
3638 MonitoredResourceDescriptor(); | 5160 MonitoredResourceDescriptor(); |
3639 | 5161 |
3640 MonitoredResourceDescriptor.fromJson(core.Map _json) { | 5162 MonitoredResourceDescriptor.fromJson(core.Map _json) { |
3641 if (_json.containsKey("description")) { | 5163 if (_json.containsKey("description")) { |
3642 description = _json["description"]; | 5164 description = _json["description"]; |
3643 } | 5165 } |
3644 if (_json.containsKey("displayName")) { | 5166 if (_json.containsKey("displayName")) { |
3645 displayName = _json["displayName"]; | 5167 displayName = _json["displayName"]; |
3646 } | 5168 } |
3647 if (_json.containsKey("labels")) { | 5169 if (_json.containsKey("labels")) { |
3648 labels = _json["labels"].map((value) => new LabelDescriptor.fromJson(value
)).toList(); | 5170 labels = _json["labels"] |
| 5171 .map((value) => new LabelDescriptor.fromJson(value)) |
| 5172 .toList(); |
3649 } | 5173 } |
3650 if (_json.containsKey("name")) { | 5174 if (_json.containsKey("name")) { |
3651 name = _json["name"]; | 5175 name = _json["name"]; |
3652 } | 5176 } |
3653 if (_json.containsKey("type")) { | 5177 if (_json.containsKey("type")) { |
3654 type = _json["type"]; | 5178 type = _json["type"]; |
3655 } | 5179 } |
3656 } | 5180 } |
3657 | 5181 |
3658 core.Map<core.String, core.Object> toJson() { | 5182 core.Map<core.String, core.Object> toJson() { |
3659 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5183 final core.Map<core.String, core.Object> _json = |
| 5184 new core.Map<core.String, core.Object>(); |
3660 if (description != null) { | 5185 if (description != null) { |
3661 _json["description"] = description; | 5186 _json["description"] = description; |
3662 } | 5187 } |
3663 if (displayName != null) { | 5188 if (displayName != null) { |
3664 _json["displayName"] = displayName; | 5189 _json["displayName"] = displayName; |
3665 } | 5190 } |
3666 if (labels != null) { | 5191 if (labels != null) { |
3667 _json["labels"] = labels.map((value) => (value).toJson()).toList(); | 5192 _json["labels"] = labels.map((value) => (value).toJson()).toList(); |
3668 } | 5193 } |
3669 if (name != null) { | 5194 if (name != null) { |
3670 _json["name"] = name; | 5195 _json["name"] = name; |
3671 } | 5196 } |
3672 if (type != null) { | 5197 if (type != null) { |
3673 _json["type"] = type; | 5198 _json["type"] = type; |
3674 } | 5199 } |
3675 return _json; | 5200 return _json; |
3676 } | 5201 } |
3677 } | 5202 } |
3678 | 5203 |
3679 /** | 5204 /// Complete log information about a single HTTP request to an App Engine |
3680 * Complete log information about a single HTTP request to an App Engine | 5205 /// application. |
3681 * application. | |
3682 */ | |
3683 class RequestLog { | 5206 class RequestLog { |
3684 /** App Engine release version. */ | 5207 /// App Engine release version. |
3685 core.String appEngineRelease; | 5208 core.String appEngineRelease; |
3686 /** Application that handled this request. */ | 5209 |
| 5210 /// Application that handled this request. |
3687 core.String appId; | 5211 core.String appId; |
3688 /** An indication of the relative cost of serving this request. */ | 5212 |
| 5213 /// An indication of the relative cost of serving this request. |
3689 core.double cost; | 5214 core.double cost; |
3690 /** Time when the request finished. */ | 5215 |
| 5216 /// Time when the request finished. |
3691 core.String endTime; | 5217 core.String endTime; |
3692 /** Whether this request is finished or active. */ | 5218 |
| 5219 /// Whether this request is finished or active. |
3693 core.bool finished; | 5220 core.bool finished; |
3694 /** | 5221 |
3695 * Whether this is the first RequestLog entry for this request. If an active | 5222 /// Whether this is the first RequestLog entry for this request. If an active |
3696 * request has several RequestLog entries written to Stackdriver Logging, then | 5223 /// request has several RequestLog entries written to Stackdriver Logging, |
3697 * this field will be set for one of them. | 5224 /// then this field will be set for one of them. |
3698 */ | |
3699 core.bool first; | 5225 core.bool first; |
3700 /** Internet host and port number of the resource being requested. */ | 5226 |
| 5227 /// Internet host and port number of the resource being requested. |
3701 core.String host; | 5228 core.String host; |
3702 /** HTTP version of request. Example: "HTTP/1.1". */ | 5229 |
| 5230 /// HTTP version of request. Example: "HTTP/1.1". |
3703 core.String httpVersion; | 5231 core.String httpVersion; |
3704 /** An identifier for the instance that handled the request. */ | 5232 |
| 5233 /// An identifier for the instance that handled the request. |
3705 core.String instanceId; | 5234 core.String instanceId; |
3706 /** | 5235 |
3707 * If the instance processing this request belongs to a manually scaled | 5236 /// If the instance processing this request belongs to a manually scaled |
3708 * module, then this is the 0-based index of the instance. Otherwise, this | 5237 /// module, then this is the 0-based index of the instance. Otherwise, this |
3709 * value is -1. | 5238 /// value is -1. |
3710 */ | |
3711 core.int instanceIndex; | 5239 core.int instanceIndex; |
3712 /** Origin IP address. */ | 5240 |
| 5241 /// Origin IP address. |
3713 core.String ip; | 5242 core.String ip; |
3714 /** Latency of the request. */ | 5243 |
| 5244 /// Latency of the request. |
3715 core.String latency; | 5245 core.String latency; |
3716 /** | 5246 |
3717 * A list of log lines emitted by the application while serving this request. | 5247 /// A list of log lines emitted by the application while serving this |
3718 */ | 5248 /// request. |
3719 core.List<LogLine> line; | 5249 core.List<LogLine> line; |
3720 /** Number of CPU megacycles used to process request. */ | 5250 |
| 5251 /// Number of CPU megacycles used to process request. |
3721 core.String megaCycles; | 5252 core.String megaCycles; |
3722 /** Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". */ | 5253 |
| 5254 /// Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". |
3723 core.String method; | 5255 core.String method; |
3724 /** Module of the application that handled this request. */ | 5256 |
| 5257 /// Module of the application that handled this request. |
3725 core.String moduleId; | 5258 core.String moduleId; |
3726 /** | 5259 |
3727 * The logged-in user who made the request.Most likely, this is the part of | 5260 /// The logged-in user who made the request.Most likely, this is the part of |
3728 * the user's email before the @ sign. The field value is the same for | 5261 /// the user's email before the @ sign. The field value is the same for |
3729 * different requests from the same user, but different users can have similar | 5262 /// different requests from the same user, but different users can have |
3730 * names. This information is also available to the application via the App | 5263 /// similar names. This information is also available to the application via |
3731 * Engine Users API.This field will be populated starting with App Engine | 5264 /// the App Engine Users API.This field will be populated starting with App |
3732 * 1.9.21. | 5265 /// Engine 1.9.21. |
3733 */ | |
3734 core.String nickname; | 5266 core.String nickname; |
3735 /** Time this request spent in the pending request queue. */ | 5267 |
| 5268 /// Time this request spent in the pending request queue. |
3736 core.String pendingTime; | 5269 core.String pendingTime; |
3737 /** Referrer URL of request. */ | 5270 |
| 5271 /// Referrer URL of request. |
3738 core.String referrer; | 5272 core.String referrer; |
3739 /** | 5273 |
3740 * Globally unique identifier for a request, which is based on the request | 5274 /// Globally unique identifier for a request, which is based on the request |
3741 * start time. Request IDs for requests which started later will compare | 5275 /// start time. Request IDs for requests which started later will compare |
3742 * greater as strings than those for requests which started earlier. | 5276 /// greater as strings than those for requests which started earlier. |
3743 */ | |
3744 core.String requestId; | 5277 core.String requestId; |
3745 /** | 5278 |
3746 * Contains the path and query portion of the URL that was requested. For | 5279 /// Contains the path and query portion of the URL that was requested. For |
3747 * example, if the URL was "http://example.com/app?name=val", the resource | 5280 /// example, if the URL was "http://example.com/app?name=val", the resource |
3748 * would be "/app?name=val". The fragment identifier, which is identified by | 5281 /// would be "/app?name=val". The fragment identifier, which is identified by |
3749 * the # character, is not included. | 5282 /// the # character, is not included. |
3750 */ | |
3751 core.String resource; | 5283 core.String resource; |
3752 /** Size in bytes sent back to client by request. */ | 5284 |
| 5285 /// Size in bytes sent back to client by request. |
3753 core.String responseSize; | 5286 core.String responseSize; |
3754 /** | 5287 |
3755 * Source code for the application that handled this request. There can be | 5288 /// Source code for the application that handled this request. There can be |
3756 * more than one source reference per deployed application if source code is | 5289 /// more than one source reference per deployed application if source code is |
3757 * distributed among multiple repositories. | 5290 /// distributed among multiple repositories. |
3758 */ | |
3759 core.List<SourceReference> sourceReference; | 5291 core.List<SourceReference> sourceReference; |
3760 /** Time when the request started. */ | 5292 |
| 5293 /// Time when the request started. |
3761 core.String startTime; | 5294 core.String startTime; |
3762 /** HTTP response status code. Example: 200, 404. */ | 5295 |
| 5296 /// HTTP response status code. Example: 200, 404. |
3763 core.int status; | 5297 core.int status; |
3764 /** Task name of the request, in the case of an offline request. */ | 5298 |
| 5299 /// Task name of the request, in the case of an offline request. |
3765 core.String taskName; | 5300 core.String taskName; |
3766 /** Queue name of the request, in the case of an offline request. */ | 5301 |
| 5302 /// Queue name of the request, in the case of an offline request. |
3767 core.String taskQueueName; | 5303 core.String taskQueueName; |
3768 /** Stackdriver Trace identifier for this request. */ | 5304 |
| 5305 /// Stackdriver Trace identifier for this request. |
3769 core.String traceId; | 5306 core.String traceId; |
3770 /** File or class that handled the request. */ | 5307 |
| 5308 /// File or class that handled the request. |
3771 core.String urlMapEntry; | 5309 core.String urlMapEntry; |
3772 /** User agent that made the request. */ | 5310 |
| 5311 /// User agent that made the request. |
3773 core.String userAgent; | 5312 core.String userAgent; |
3774 /** Version of the application that handled this request. */ | 5313 |
| 5314 /// Version of the application that handled this request. |
3775 core.String versionId; | 5315 core.String versionId; |
3776 /** Whether this was a loading request for the instance. */ | 5316 |
| 5317 /// Whether this was a loading request for the instance. |
3777 core.bool wasLoadingRequest; | 5318 core.bool wasLoadingRequest; |
3778 | 5319 |
3779 RequestLog(); | 5320 RequestLog(); |
3780 | 5321 |
3781 RequestLog.fromJson(core.Map _json) { | 5322 RequestLog.fromJson(core.Map _json) { |
3782 if (_json.containsKey("appEngineRelease")) { | 5323 if (_json.containsKey("appEngineRelease")) { |
3783 appEngineRelease = _json["appEngineRelease"]; | 5324 appEngineRelease = _json["appEngineRelease"]; |
3784 } | 5325 } |
3785 if (_json.containsKey("appId")) { | 5326 if (_json.containsKey("appId")) { |
3786 appId = _json["appId"]; | 5327 appId = _json["appId"]; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3839 if (_json.containsKey("requestId")) { | 5380 if (_json.containsKey("requestId")) { |
3840 requestId = _json["requestId"]; | 5381 requestId = _json["requestId"]; |
3841 } | 5382 } |
3842 if (_json.containsKey("resource")) { | 5383 if (_json.containsKey("resource")) { |
3843 resource = _json["resource"]; | 5384 resource = _json["resource"]; |
3844 } | 5385 } |
3845 if (_json.containsKey("responseSize")) { | 5386 if (_json.containsKey("responseSize")) { |
3846 responseSize = _json["responseSize"]; | 5387 responseSize = _json["responseSize"]; |
3847 } | 5388 } |
3848 if (_json.containsKey("sourceReference")) { | 5389 if (_json.containsKey("sourceReference")) { |
3849 sourceReference = _json["sourceReference"].map((value) => new SourceRefere
nce.fromJson(value)).toList(); | 5390 sourceReference = _json["sourceReference"] |
| 5391 .map((value) => new SourceReference.fromJson(value)) |
| 5392 .toList(); |
3850 } | 5393 } |
3851 if (_json.containsKey("startTime")) { | 5394 if (_json.containsKey("startTime")) { |
3852 startTime = _json["startTime"]; | 5395 startTime = _json["startTime"]; |
3853 } | 5396 } |
3854 if (_json.containsKey("status")) { | 5397 if (_json.containsKey("status")) { |
3855 status = _json["status"]; | 5398 status = _json["status"]; |
3856 } | 5399 } |
3857 if (_json.containsKey("taskName")) { | 5400 if (_json.containsKey("taskName")) { |
3858 taskName = _json["taskName"]; | 5401 taskName = _json["taskName"]; |
3859 } | 5402 } |
(...skipping 11 matching lines...) Expand all Loading... |
3871 } | 5414 } |
3872 if (_json.containsKey("versionId")) { | 5415 if (_json.containsKey("versionId")) { |
3873 versionId = _json["versionId"]; | 5416 versionId = _json["versionId"]; |
3874 } | 5417 } |
3875 if (_json.containsKey("wasLoadingRequest")) { | 5418 if (_json.containsKey("wasLoadingRequest")) { |
3876 wasLoadingRequest = _json["wasLoadingRequest"]; | 5419 wasLoadingRequest = _json["wasLoadingRequest"]; |
3877 } | 5420 } |
3878 } | 5421 } |
3879 | 5422 |
3880 core.Map<core.String, core.Object> toJson() { | 5423 core.Map<core.String, core.Object> toJson() { |
3881 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5424 final core.Map<core.String, core.Object> _json = |
| 5425 new core.Map<core.String, core.Object>(); |
3882 if (appEngineRelease != null) { | 5426 if (appEngineRelease != null) { |
3883 _json["appEngineRelease"] = appEngineRelease; | 5427 _json["appEngineRelease"] = appEngineRelease; |
3884 } | 5428 } |
3885 if (appId != null) { | 5429 if (appId != null) { |
3886 _json["appId"] = appId; | 5430 _json["appId"] = appId; |
3887 } | 5431 } |
3888 if (cost != null) { | 5432 if (cost != null) { |
3889 _json["cost"] = cost; | 5433 _json["cost"] = cost; |
3890 } | 5434 } |
3891 if (endTime != null) { | 5435 if (endTime != null) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3939 if (requestId != null) { | 5483 if (requestId != null) { |
3940 _json["requestId"] = requestId; | 5484 _json["requestId"] = requestId; |
3941 } | 5485 } |
3942 if (resource != null) { | 5486 if (resource != null) { |
3943 _json["resource"] = resource; | 5487 _json["resource"] = resource; |
3944 } | 5488 } |
3945 if (responseSize != null) { | 5489 if (responseSize != null) { |
3946 _json["responseSize"] = responseSize; | 5490 _json["responseSize"] = responseSize; |
3947 } | 5491 } |
3948 if (sourceReference != null) { | 5492 if (sourceReference != null) { |
3949 _json["sourceReference"] = sourceReference.map((value) => (value).toJson()
).toList(); | 5493 _json["sourceReference"] = |
| 5494 sourceReference.map((value) => (value).toJson()).toList(); |
3950 } | 5495 } |
3951 if (startTime != null) { | 5496 if (startTime != null) { |
3952 _json["startTime"] = startTime; | 5497 _json["startTime"] = startTime; |
3953 } | 5498 } |
3954 if (status != null) { | 5499 if (status != null) { |
3955 _json["status"] = status; | 5500 _json["status"] = status; |
3956 } | 5501 } |
3957 if (taskName != null) { | 5502 if (taskName != null) { |
3958 _json["taskName"] = taskName; | 5503 _json["taskName"] = taskName; |
3959 } | 5504 } |
(...skipping 12 matching lines...) Expand all Loading... |
3972 if (versionId != null) { | 5517 if (versionId != null) { |
3973 _json["versionId"] = versionId; | 5518 _json["versionId"] = versionId; |
3974 } | 5519 } |
3975 if (wasLoadingRequest != null) { | 5520 if (wasLoadingRequest != null) { |
3976 _json["wasLoadingRequest"] = wasLoadingRequest; | 5521 _json["wasLoadingRequest"] = wasLoadingRequest; |
3977 } | 5522 } |
3978 return _json; | 5523 return _json; |
3979 } | 5524 } |
3980 } | 5525 } |
3981 | 5526 |
3982 /** Specifies a location in a source code file. */ | 5527 /// Specifies a location in a source code file. |
3983 class SourceLocation { | 5528 class SourceLocation { |
3984 /** | 5529 /// Source file name. Depending on the runtime environment, this might be a |
3985 * Source file name. Depending on the runtime environment, this might be a | 5530 /// simple name or a fully-qualified name. |
3986 * simple name or a fully-qualified name. | |
3987 */ | |
3988 core.String file; | 5531 core.String file; |
3989 /** | 5532 |
3990 * Human-readable name of the function or method being invoked, with optional | 5533 /// Human-readable name of the function or method being invoked, with |
3991 * context such as the class or package name. This information is used in | 5534 /// optional context such as the class or package name. This information is |
3992 * contexts such as the logs viewer, where a file and line number are less | 5535 /// used in contexts such as the logs viewer, where a file and line number |
3993 * meaningful. The format can vary by language. For example: | 5536 /// are less meaningful. The format can vary by language. For example: |
3994 * qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python). | 5537 /// qual.if.ied.Class.method (Java), dir/package.func (Go), function |
3995 */ | 5538 /// (Python). |
3996 core.String functionName; | 5539 core.String functionName; |
3997 /** Line within the source file. */ | 5540 |
| 5541 /// Line within the source file. |
3998 core.String line; | 5542 core.String line; |
3999 | 5543 |
4000 SourceLocation(); | 5544 SourceLocation(); |
4001 | 5545 |
4002 SourceLocation.fromJson(core.Map _json) { | 5546 SourceLocation.fromJson(core.Map _json) { |
4003 if (_json.containsKey("file")) { | 5547 if (_json.containsKey("file")) { |
4004 file = _json["file"]; | 5548 file = _json["file"]; |
4005 } | 5549 } |
4006 if (_json.containsKey("functionName")) { | 5550 if (_json.containsKey("functionName")) { |
4007 functionName = _json["functionName"]; | 5551 functionName = _json["functionName"]; |
4008 } | 5552 } |
4009 if (_json.containsKey("line")) { | 5553 if (_json.containsKey("line")) { |
4010 line = _json["line"]; | 5554 line = _json["line"]; |
4011 } | 5555 } |
4012 } | 5556 } |
4013 | 5557 |
4014 core.Map<core.String, core.Object> toJson() { | 5558 core.Map<core.String, core.Object> toJson() { |
4015 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5559 final core.Map<core.String, core.Object> _json = |
| 5560 new core.Map<core.String, core.Object>(); |
4016 if (file != null) { | 5561 if (file != null) { |
4017 _json["file"] = file; | 5562 _json["file"] = file; |
4018 } | 5563 } |
4019 if (functionName != null) { | 5564 if (functionName != null) { |
4020 _json["functionName"] = functionName; | 5565 _json["functionName"] = functionName; |
4021 } | 5566 } |
4022 if (line != null) { | 5567 if (line != null) { |
4023 _json["line"] = line; | 5568 _json["line"] = line; |
4024 } | 5569 } |
4025 return _json; | 5570 return _json; |
4026 } | 5571 } |
4027 } | 5572 } |
4028 | 5573 |
4029 /** | 5574 /// A reference to a particular snapshot of the source tree used to build and |
4030 * A reference to a particular snapshot of the source tree used to build and | 5575 /// deploy an application. |
4031 * deploy an application. | |
4032 */ | |
4033 class SourceReference { | 5576 class SourceReference { |
4034 /** | 5577 /// Optional. A URI string identifying the repository. Example: |
4035 * Optional. A URI string identifying the repository. Example: | 5578 /// "https://github.com/GoogleCloudPlatform/kubernetes.git" |
4036 * "https://github.com/GoogleCloudPlatform/kubernetes.git" | |
4037 */ | |
4038 core.String repository; | 5579 core.String repository; |
4039 /** | 5580 |
4040 * The canonical and persistent identifier of the deployed revision. Example | 5581 /// The canonical and persistent identifier of the deployed revision. Example |
4041 * (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" | 5582 /// (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" |
4042 */ | |
4043 core.String revisionId; | 5583 core.String revisionId; |
4044 | 5584 |
4045 SourceReference(); | 5585 SourceReference(); |
4046 | 5586 |
4047 SourceReference.fromJson(core.Map _json) { | 5587 SourceReference.fromJson(core.Map _json) { |
4048 if (_json.containsKey("repository")) { | 5588 if (_json.containsKey("repository")) { |
4049 repository = _json["repository"]; | 5589 repository = _json["repository"]; |
4050 } | 5590 } |
4051 if (_json.containsKey("revisionId")) { | 5591 if (_json.containsKey("revisionId")) { |
4052 revisionId = _json["revisionId"]; | 5592 revisionId = _json["revisionId"]; |
4053 } | 5593 } |
4054 } | 5594 } |
4055 | 5595 |
4056 core.Map<core.String, core.Object> toJson() { | 5596 core.Map<core.String, core.Object> toJson() { |
4057 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5597 final core.Map<core.String, core.Object> _json = |
| 5598 new core.Map<core.String, core.Object>(); |
4058 if (repository != null) { | 5599 if (repository != null) { |
4059 _json["repository"] = repository; | 5600 _json["repository"] = repository; |
4060 } | 5601 } |
4061 if (revisionId != null) { | 5602 if (revisionId != null) { |
4062 _json["revisionId"] = revisionId; | 5603 _json["revisionId"] = revisionId; |
4063 } | 5604 } |
4064 return _json; | 5605 return _json; |
4065 } | 5606 } |
4066 } | 5607 } |
4067 | 5608 |
4068 /** The parameters to WriteLogEntries. */ | 5609 /// The parameters to WriteLogEntries. |
4069 class WriteLogEntriesRequest { | 5610 class WriteLogEntriesRequest { |
4070 /** | 5611 /// Required. The log entries to send to Stackdriver Logging. The order of |
4071 * Required. The log entries to write. Values supplied for the fields | 5612 /// log entries in this list does not matter. Values supplied in this |
4072 * log_name, resource, and labels in this entries.write request are inserted | 5613 /// method's log_name, resource, and labels fields are copied into those log |
4073 * into those log entries in this list that do not provide their own | 5614 /// entries in this list that do not include values for their corresponding |
4074 * values.Stackdriver Logging also creates and inserts values for timestamp | 5615 /// fields. For more information, see the LogEntry type.If the timestamp or |
4075 * and insert_id if the entries do not provide them. The created insert_id for | 5616 /// insert_id fields are missing in log entries, then this method supplies |
4076 * the N'th entry in this list will be greater than earlier entries and less | 5617 /// the current time or a unique identifier, respectively. The supplied |
4077 * than later entries. Otherwise, the order of log entries in this list does | 5618 /// values are chosen so that, among the log entries that did not supply |
4078 * not matter.To improve throughput and to avoid exceeding the quota limit for | 5619 /// their own values, the entries earlier in the list will sort before the |
4079 * calls to entries.write, you should write multiple log entries at once | 5620 /// entries later in the list. See the entries.list method.Log entries with |
4080 * rather than calling this method for each individual log entry. | 5621 /// timestamps that are more than the logs retention period in the past or |
4081 */ | 5622 /// more than 24 hours in the future might be discarded. Discarding does not |
| 5623 /// return an error.To improve throughput and to avoid exceeding the quota |
| 5624 /// limit for calls to entries.write, you should try to include several log |
| 5625 /// entries in this list, rather than calling this method for each individual |
| 5626 /// log entry. |
4082 core.List<LogEntry> entries; | 5627 core.List<LogEntry> entries; |
4083 /** | 5628 |
4084 * Optional. Default labels that are added to the labels field of all log | 5629 /// Optional. Default labels that are added to the labels field of all log |
4085 * entries in entries. If a log entry already has a label with the same key as | 5630 /// entries in entries. If a log entry already has a label with the same key |
4086 * a label in this parameter, then the log entry's label is not changed. See | 5631 /// as a label in this parameter, then the log entry's label is not changed. |
4087 * LogEntry. | 5632 /// See LogEntry. |
4088 */ | |
4089 core.Map<core.String, core.String> labels; | 5633 core.Map<core.String, core.String> labels; |
4090 /** | 5634 |
4091 * Optional. A default log resource name that is assigned to all log entries | 5635 /// Optional. A default log resource name that is assigned to all log entries |
4092 * in entries that do not specify a value for log_name: | 5636 /// in entries that do not specify a value for log_name: |
4093 * "projects/[PROJECT_ID]/logs/[LOG_ID]" | 5637 /// "projects/[PROJECT_ID]/logs/[LOG_ID]" |
4094 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" | 5638 /// "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" |
4095 * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" | 5639 /// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" |
4096 * "folders/[FOLDER_ID]/logs/[LOG_ID]" | 5640 /// "folders/[FOLDER_ID]/logs/[LOG_ID]" |
4097 * [LOG_ID] must be URL-encoded. For example, | 5641 /// [LOG_ID] must be URL-encoded. For example, |
4098 * "projects/my-project-id/logs/syslog" or | 5642 /// "projects/my-project-id/logs/syslog" or |
4099 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi
ty". | 5643 /// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factiv
ity". |
4100 * For more information about log names, see LogEntry. | 5644 /// For more information about log names, see LogEntry. |
4101 */ | |
4102 core.String logName; | 5645 core.String logName; |
4103 /** | 5646 |
4104 * Optional. Whether valid entries should be written even if some other | 5647 /// Optional. Whether valid entries should be written even if some other |
4105 * entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any | 5648 /// entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any |
4106 * entry is not written, then the response status is the error associated with | 5649 /// entry is not written, then the response status is the error associated |
4107 * one of the failed entries and the response includes error details keyed by | 5650 /// with one of the failed entries and the response includes error details |
4108 * the entries' zero-based index in the entries.write method. | 5651 /// keyed by the entries' zero-based index in the entries.write method. |
4109 */ | |
4110 core.bool partialSuccess; | 5652 core.bool partialSuccess; |
4111 /** | 5653 |
4112 * Optional. A default monitored resource object that is assigned to all log | 5654 /// Optional. A default monitored resource object that is assigned to all log |
4113 * entries in entries that do not specify a value for resource. Example: | 5655 /// entries in entries that do not specify a value for resource. Example: |
4114 * { "type": "gce_instance", | 5656 /// { "type": "gce_instance", |
4115 * "labels": { | 5657 /// "labels": { |
4116 * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} | 5658 /// "zone": "us-central1-a", "instance_id": "00000000000000000000" }} |
4117 * See LogEntry. | 5659 /// See LogEntry. |
4118 */ | |
4119 MonitoredResource resource; | 5660 MonitoredResource resource; |
4120 | 5661 |
4121 WriteLogEntriesRequest(); | 5662 WriteLogEntriesRequest(); |
4122 | 5663 |
4123 WriteLogEntriesRequest.fromJson(core.Map _json) { | 5664 WriteLogEntriesRequest.fromJson(core.Map _json) { |
4124 if (_json.containsKey("entries")) { | 5665 if (_json.containsKey("entries")) { |
4125 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to
List(); | 5666 entries = _json["entries"] |
| 5667 .map((value) => new LogEntry.fromJson(value)) |
| 5668 .toList(); |
4126 } | 5669 } |
4127 if (_json.containsKey("labels")) { | 5670 if (_json.containsKey("labels")) { |
4128 labels = _json["labels"]; | 5671 labels = _json["labels"]; |
4129 } | 5672 } |
4130 if (_json.containsKey("logName")) { | 5673 if (_json.containsKey("logName")) { |
4131 logName = _json["logName"]; | 5674 logName = _json["logName"]; |
4132 } | 5675 } |
4133 if (_json.containsKey("partialSuccess")) { | 5676 if (_json.containsKey("partialSuccess")) { |
4134 partialSuccess = _json["partialSuccess"]; | 5677 partialSuccess = _json["partialSuccess"]; |
4135 } | 5678 } |
4136 if (_json.containsKey("resource")) { | 5679 if (_json.containsKey("resource")) { |
4137 resource = new MonitoredResource.fromJson(_json["resource"]); | 5680 resource = new MonitoredResource.fromJson(_json["resource"]); |
4138 } | 5681 } |
4139 } | 5682 } |
4140 | 5683 |
4141 core.Map<core.String, core.Object> toJson() { | 5684 core.Map<core.String, core.Object> toJson() { |
4142 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5685 final core.Map<core.String, core.Object> _json = |
| 5686 new core.Map<core.String, core.Object>(); |
4143 if (entries != null) { | 5687 if (entries != null) { |
4144 _json["entries"] = entries.map((value) => (value).toJson()).toList(); | 5688 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
4145 } | 5689 } |
4146 if (labels != null) { | 5690 if (labels != null) { |
4147 _json["labels"] = labels; | 5691 _json["labels"] = labels; |
4148 } | 5692 } |
4149 if (logName != null) { | 5693 if (logName != null) { |
4150 _json["logName"] = logName; | 5694 _json["logName"] = logName; |
4151 } | 5695 } |
4152 if (partialSuccess != null) { | 5696 if (partialSuccess != null) { |
4153 _json["partialSuccess"] = partialSuccess; | 5697 _json["partialSuccess"] = partialSuccess; |
4154 } | 5698 } |
4155 if (resource != null) { | 5699 if (resource != null) { |
4156 _json["resource"] = (resource).toJson(); | 5700 _json["resource"] = (resource).toJson(); |
4157 } | 5701 } |
4158 return _json; | 5702 return _json; |
4159 } | 5703 } |
4160 } | 5704 } |
4161 | 5705 |
4162 /** Result returned from WriteLogEntries. empty */ | 5706 /// Result returned from WriteLogEntries. empty |
4163 class WriteLogEntriesResponse { | 5707 class WriteLogEntriesResponse { |
4164 | |
4165 WriteLogEntriesResponse(); | 5708 WriteLogEntriesResponse(); |
4166 | 5709 |
4167 WriteLogEntriesResponse.fromJson(core.Map _json) { | 5710 WriteLogEntriesResponse.fromJson(core.Map _json) {} |
4168 } | |
4169 | 5711 |
4170 core.Map<core.String, core.Object> toJson() { | 5712 core.Map<core.String, core.Object> toJson() { |
4171 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5713 final core.Map<core.String, core.Object> _json = |
| 5714 new core.Map<core.String, core.Object>(); |
4172 return _json; | 5715 return _json; |
4173 } | 5716 } |
4174 } | 5717 } |
OLD | NEW |