| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 1 library googleapis.coordinate.v1; | 3 library googleapis.coordinate.v1; |
| 2 | 4 |
| 3 import "dart:core" as core; | 5 import 'dart:core' as core; |
| 4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
| 5 import "dart:async" as async; | 7 import 'dart:async' as async; |
| 6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
| 7 | 9 |
| 8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
| 9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; | |
| 11 import '../common/common.dart' as common; | |
| 12 | 13 |
| 13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError; |
| 16 |
| 17 const core.String USER_AGENT = 'dart-api-client coordinate/v1'; |
| 15 | 18 |
| 16 /** Lets you view and manage jobs in a Coordinate team. */ | 19 /** Lets you view and manage jobs in a Coordinate team. */ |
| 17 class CoordinateApi { | 20 class CoordinateApi { |
| 18 /** View and manage your Google Maps Coordinate jobs */ | 21 /** View and manage your Google Maps Coordinate jobs */ |
| 19 static const CoordinateScope = "https://www.googleapis.com/auth/coordinate"; | 22 static const CoordinateScope = "https://www.googleapis.com/auth/coordinate"; |
| 20 | 23 |
| 21 /** View your Google Coordinate jobs */ | 24 /** View your Google Coordinate jobs */ |
| 22 static const CoordinateReadonlyScope = "https://www.googleapis.com/auth/coordi
nate.readonly"; | 25 static const CoordinateReadonlyScope = "https://www.googleapis.com/auth/coordi
nate.readonly"; |
| 23 | 26 |
| 24 | 27 |
| 25 final common_internal.ApiRequester _requester; | 28 final commons.ApiRequester _requester; |
| 26 | 29 |
| 27 CustomFieldDefResourceApi get customFieldDef => new CustomFieldDefResourceApi(
_requester); | 30 CustomFieldDefResourceApi get customFieldDef => new CustomFieldDefResourceApi(
_requester); |
| 28 JobsResourceApi get jobs => new JobsResourceApi(_requester); | 31 JobsResourceApi get jobs => new JobsResourceApi(_requester); |
| 29 LocationResourceApi get location => new LocationResourceApi(_requester); | 32 LocationResourceApi get location => new LocationResourceApi(_requester); |
| 30 ScheduleResourceApi get schedule => new ScheduleResourceApi(_requester); | 33 ScheduleResourceApi get schedule => new ScheduleResourceApi(_requester); |
| 31 TeamResourceApi get team => new TeamResourceApi(_requester); | 34 TeamResourceApi get team => new TeamResourceApi(_requester); |
| 32 WorkerResourceApi get worker => new WorkerResourceApi(_requester); | 35 WorkerResourceApi get worker => new WorkerResourceApi(_requester); |
| 33 | 36 |
| 34 CoordinateApi(http.Client client, {core.String rootUrl: "https://www.googleapi
s.com/", core.String servicePath: "coordinate/v1/"}) : | 37 CoordinateApi(http.Client client, {core.String rootUrl: "https://www.googleapi
s.com/", core.String servicePath: "coordinate/v1/"}) : |
| 35 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 38 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 36 } | 39 } |
| 37 | 40 |
| 38 | 41 |
| 39 /** Not documented yet. */ | |
| 40 class CustomFieldDefResourceApi { | 42 class CustomFieldDefResourceApi { |
| 41 final common_internal.ApiRequester _requester; | 43 final commons.ApiRequester _requester; |
| 42 | 44 |
| 43 CustomFieldDefResourceApi(common_internal.ApiRequester client) : | 45 CustomFieldDefResourceApi(commons.ApiRequester client) : |
| 44 _requester = client; | 46 _requester = client; |
| 45 | 47 |
| 46 /** | 48 /** |
| 47 * Retrieves a list of custom field definitions for a team. | 49 * Retrieves a list of custom field definitions for a team. |
| 48 * | 50 * |
| 49 * Request parameters: | 51 * Request parameters: |
| 50 * | 52 * |
| 51 * [teamId] - Team ID | 53 * [teamId] - Team ID |
| 52 * | 54 * |
| 53 * Completes with a [CustomFieldDefListResponse]. | 55 * Completes with a [CustomFieldDefListResponse]. |
| 54 * | 56 * |
| 55 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 57 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 56 * error. | 58 * error. |
| 57 * | 59 * |
| 58 * If the used [http.Client] completes with an error when making a REST call, | 60 * If the used [http.Client] completes with an error when making a REST call, |
| 59 * this method will complete with the same error. | 61 * this method will complete with the same error. |
| 60 */ | 62 */ |
| 61 async.Future<CustomFieldDefListResponse> list(core.String teamId) { | 63 async.Future<CustomFieldDefListResponse> list(core.String teamId) { |
| 62 var _url = null; | 64 var _url = null; |
| 63 var _queryParams = new core.Map(); | 65 var _queryParams = new core.Map(); |
| 64 var _uploadMedia = null; | 66 var _uploadMedia = null; |
| 65 var _uploadOptions = null; | 67 var _uploadOptions = null; |
| 66 var _downloadOptions = common.DownloadOptions.Metadata; | 68 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 67 var _body = null; | 69 var _body = null; |
| 68 | 70 |
| 69 if (teamId == null) { | 71 if (teamId == null) { |
| 70 throw new core.ArgumentError("Parameter teamId is required."); | 72 throw new core.ArgumentError("Parameter teamId is required."); |
| 71 } | 73 } |
| 72 | 74 |
| 73 | 75 |
| 74 _url = 'teams/' + common_internal.Escaper.ecapeVariable('$teamId') + '/custo
m_fields'; | 76 _url = 'teams/' + commons.Escaper.ecapeVariable('$teamId') + '/custom_fields
'; |
| 75 | 77 |
| 76 var _response = _requester.request(_url, | 78 var _response = _requester.request(_url, |
| 77 "GET", | 79 "GET", |
| 78 body: _body, | 80 body: _body, |
| 79 queryParams: _queryParams, | 81 queryParams: _queryParams, |
| 80 uploadOptions: _uploadOptions, | 82 uploadOptions: _uploadOptions, |
| 81 uploadMedia: _uploadMedia, | 83 uploadMedia: _uploadMedia, |
| 82 downloadOptions: _downloadOptions); | 84 downloadOptions: _downloadOptions); |
| 83 return _response.then((data) => new CustomFieldDefListResponse.fromJson(data
)); | 85 return _response.then((data) => new CustomFieldDefListResponse.fromJson(data
)); |
| 84 } | 86 } |
| 85 | 87 |
| 86 } | 88 } |
| 87 | 89 |
| 88 | 90 |
| 89 /** Not documented yet. */ | |
| 90 class JobsResourceApi { | 91 class JobsResourceApi { |
| 91 final common_internal.ApiRequester _requester; | 92 final commons.ApiRequester _requester; |
| 92 | 93 |
| 93 JobsResourceApi(common_internal.ApiRequester client) : | 94 JobsResourceApi(commons.ApiRequester client) : |
| 94 _requester = client; | 95 _requester = client; |
| 95 | 96 |
| 96 /** | 97 /** |
| 97 * Retrieves a job, including all the changes made to the job. | 98 * Retrieves a job, including all the changes made to the job. |
| 98 * | 99 * |
| 99 * Request parameters: | 100 * Request parameters: |
| 100 * | 101 * |
| 101 * [teamId] - Team ID | 102 * [teamId] - Team ID |
| 102 * | 103 * |
| 103 * [jobId] - Job number | 104 * [jobId] - Job number |
| 104 * | 105 * |
| 105 * Completes with a [Job]. | 106 * Completes with a [Job]. |
| 106 * | 107 * |
| 107 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 108 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 108 * error. | 109 * error. |
| 109 * | 110 * |
| 110 * If the used [http.Client] completes with an error when making a REST call, | 111 * If the used [http.Client] completes with an error when making a REST call, |
| 111 * this method will complete with the same error. | 112 * this method will complete with the same error. |
| 112 */ | 113 */ |
| 113 async.Future<Job> get(core.String teamId, core.String jobId) { | 114 async.Future<Job> get(core.String teamId, core.String jobId) { |
| 114 var _url = null; | 115 var _url = null; |
| 115 var _queryParams = new core.Map(); | 116 var _queryParams = new core.Map(); |
| 116 var _uploadMedia = null; | 117 var _uploadMedia = null; |
| 117 var _uploadOptions = null; | 118 var _uploadOptions = null; |
| 118 var _downloadOptions = common.DownloadOptions.Metadata; | 119 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 119 var _body = null; | 120 var _body = null; |
| 120 | 121 |
| 121 if (teamId == null) { | 122 if (teamId == null) { |
| 122 throw new core.ArgumentError("Parameter teamId is required."); | 123 throw new core.ArgumentError("Parameter teamId is required."); |
| 123 } | 124 } |
| 124 if (jobId == null) { | 125 if (jobId == null) { |
| 125 throw new core.ArgumentError("Parameter jobId is required."); | 126 throw new core.ArgumentError("Parameter jobId is required."); |
| 126 } | 127 } |
| 127 | 128 |
| 128 | 129 |
| 129 _url = 'teams/' + common_internal.Escaper.ecapeVariable('$teamId') + '/jobs/
' + common_internal.Escaper.ecapeVariable('$jobId'); | 130 _url = 'teams/' + commons.Escaper.ecapeVariable('$teamId') + '/jobs/' + comm
ons.Escaper.ecapeVariable('$jobId'); |
| 130 | 131 |
| 131 var _response = _requester.request(_url, | 132 var _response = _requester.request(_url, |
| 132 "GET", | 133 "GET", |
| 133 body: _body, | 134 body: _body, |
| 134 queryParams: _queryParams, | 135 queryParams: _queryParams, |
| 135 uploadOptions: _uploadOptions, | 136 uploadOptions: _uploadOptions, |
| 136 uploadMedia: _uploadMedia, | 137 uploadMedia: _uploadMedia, |
| 137 downloadOptions: _downloadOptions); | 138 downloadOptions: _downloadOptions); |
| 138 return _response.then((data) => new Job.fromJson(data)); | 139 return _response.then((data) => new Job.fromJson(data)); |
| 139 } | 140 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 165 * inactive enum field will result in an error 500. | 166 * inactive enum field will result in an error 500. |
| 166 * | 167 * |
| 167 * [customerName] - Customer name | 168 * [customerName] - Customer name |
| 168 * | 169 * |
| 169 * [customerPhoneNumber] - Customer phone number | 170 * [customerPhoneNumber] - Customer phone number |
| 170 * | 171 * |
| 171 * [note] - Job note as newline (Unix) separated string | 172 * [note] - Job note as newline (Unix) separated string |
| 172 * | 173 * |
| 173 * Completes with a [Job]. | 174 * Completes with a [Job]. |
| 174 * | 175 * |
| 175 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 176 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 176 * error. | 177 * error. |
| 177 * | 178 * |
| 178 * If the used [http.Client] completes with an error when making a REST call, | 179 * If the used [http.Client] completes with an error when making a REST call, |
| 179 * this method will complete with the same error. | 180 * this method will complete with the same error. |
| 180 */ | 181 */ |
| 181 async.Future<Job> insert(Job request, core.String teamId, core.String address,
core.double lat, core.double lng, core.String title, {core.String assignee, cor
e.List<core.String> customField, core.String customerName, core.String customerP
honeNumber, core.String note}) { | 182 async.Future<Job> insert(Job request, core.String teamId, core.String address,
core.double lat, core.double lng, core.String title, {core.String assignee, cor
e.List<core.String> customField, core.String customerName, core.String customerP
honeNumber, core.String note}) { |
| 182 var _url = null; | 183 var _url = null; |
| 183 var _queryParams = new core.Map(); | 184 var _queryParams = new core.Map(); |
| 184 var _uploadMedia = null; | 185 var _uploadMedia = null; |
| 185 var _uploadOptions = null; | 186 var _uploadOptions = null; |
| 186 var _downloadOptions = common.DownloadOptions.Metadata; | 187 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 187 var _body = null; | 188 var _body = null; |
| 188 | 189 |
| 189 if (request != null) { | 190 if (request != null) { |
| 190 _body = convert.JSON.encode((request).toJson()); | 191 _body = convert.JSON.encode((request).toJson()); |
| 191 } | 192 } |
| 192 if (teamId == null) { | 193 if (teamId == null) { |
| 193 throw new core.ArgumentError("Parameter teamId is required."); | 194 throw new core.ArgumentError("Parameter teamId is required."); |
| 194 } | 195 } |
| 195 if (address == null) { | 196 if (address == null) { |
| 196 throw new core.ArgumentError("Parameter address is required."); | 197 throw new core.ArgumentError("Parameter address is required."); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 218 _queryParams["customerName"] = [customerName]; | 219 _queryParams["customerName"] = [customerName]; |
| 219 } | 220 } |
| 220 if (customerPhoneNumber != null) { | 221 if (customerPhoneNumber != null) { |
| 221 _queryParams["customerPhoneNumber"] = [customerPhoneNumber]; | 222 _queryParams["customerPhoneNumber"] = [customerPhoneNumber]; |
| 222 } | 223 } |
| 223 if (note != null) { | 224 if (note != null) { |
| 224 _queryParams["note"] = [note]; | 225 _queryParams["note"] = [note]; |
| 225 } | 226 } |
| 226 | 227 |
| 227 | 228 |
| 228 _url = 'teams/' + common_internal.Escaper.ecapeVariable('$teamId') + '/jobs'
; | 229 _url = 'teams/' + commons.Escaper.ecapeVariable('$teamId') + '/jobs'; |
| 229 | 230 |
| 230 var _response = _requester.request(_url, | 231 var _response = _requester.request(_url, |
| 231 "POST", | 232 "POST", |
| 232 body: _body, | 233 body: _body, |
| 233 queryParams: _queryParams, | 234 queryParams: _queryParams, |
| 234 uploadOptions: _uploadOptions, | 235 uploadOptions: _uploadOptions, |
| 235 uploadMedia: _uploadMedia, | 236 uploadMedia: _uploadMedia, |
| 236 downloadOptions: _downloadOptions); | 237 downloadOptions: _downloadOptions); |
| 237 return _response.then((data) => new Job.fromJson(data)); | 238 return _response.then((data) => new Job.fromJson(data)); |
| 238 } | 239 } |
| 239 | 240 |
| 240 /** | 241 /** |
| 241 * Retrieves jobs created or modified since the given timestamp. | 242 * Retrieves jobs created or modified since the given timestamp. |
| 242 * | 243 * |
| 243 * Request parameters: | 244 * Request parameters: |
| 244 * | 245 * |
| 245 * [teamId] - Team ID | 246 * [teamId] - Team ID |
| 246 * | 247 * |
| 247 * [maxResults] - Maximum number of results to return in one page. | 248 * [maxResults] - Maximum number of results to return in one page. |
| 248 * | 249 * |
| 249 * [minModifiedTimestampMs] - Minimum time a job was modified in milliseconds | 250 * [minModifiedTimestampMs] - Minimum time a job was modified in milliseconds |
| 250 * since epoch. | 251 * since epoch. |
| 251 * | 252 * |
| 252 * [pageToken] - Continuation token | 253 * [pageToken] - Continuation token |
| 253 * | 254 * |
| 254 * Completes with a [JobListResponse]. | 255 * Completes with a [JobListResponse]. |
| 255 * | 256 * |
| 256 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 257 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 257 * error. | 258 * error. |
| 258 * | 259 * |
| 259 * If the used [http.Client] completes with an error when making a REST call, | 260 * If the used [http.Client] completes with an error when making a REST call, |
| 260 * this method will complete with the same error. | 261 * this method will complete with the same error. |
| 261 */ | 262 */ |
| 262 async.Future<JobListResponse> list(core.String teamId, {core.int maxResults, c
ore.String minModifiedTimestampMs, core.String pageToken}) { | 263 async.Future<JobListResponse> list(core.String teamId, {core.int maxResults, c
ore.String minModifiedTimestampMs, core.String pageToken}) { |
| 263 var _url = null; | 264 var _url = null; |
| 264 var _queryParams = new core.Map(); | 265 var _queryParams = new core.Map(); |
| 265 var _uploadMedia = null; | 266 var _uploadMedia = null; |
| 266 var _uploadOptions = null; | 267 var _uploadOptions = null; |
| 267 var _downloadOptions = common.DownloadOptions.Metadata; | 268 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 268 var _body = null; | 269 var _body = null; |
| 269 | 270 |
| 270 if (teamId == null) { | 271 if (teamId == null) { |
| 271 throw new core.ArgumentError("Parameter teamId is required."); | 272 throw new core.ArgumentError("Parameter teamId is required."); |
| 272 } | 273 } |
| 273 if (maxResults != null) { | 274 if (maxResults != null) { |
| 274 _queryParams["maxResults"] = ["${maxResults}"]; | 275 _queryParams["maxResults"] = ["${maxResults}"]; |
| 275 } | 276 } |
| 276 if (minModifiedTimestampMs != null) { | 277 if (minModifiedTimestampMs != null) { |
| 277 _queryParams["minModifiedTimestampMs"] = [minModifiedTimestampMs]; | 278 _queryParams["minModifiedTimestampMs"] = [minModifiedTimestampMs]; |
| 278 } | 279 } |
| 279 if (pageToken != null) { | 280 if (pageToken != null) { |
| 280 _queryParams["pageToken"] = [pageToken]; | 281 _queryParams["pageToken"] = [pageToken]; |
| 281 } | 282 } |
| 282 | 283 |
| 283 | 284 |
| 284 _url = 'teams/' + common_internal.Escaper.ecapeVariable('$teamId') + '/jobs'
; | 285 _url = 'teams/' + commons.Escaper.ecapeVariable('$teamId') + '/jobs'; |
| 285 | 286 |
| 286 var _response = _requester.request(_url, | 287 var _response = _requester.request(_url, |
| 287 "GET", | 288 "GET", |
| 288 body: _body, | 289 body: _body, |
| 289 queryParams: _queryParams, | 290 queryParams: _queryParams, |
| 290 uploadOptions: _uploadOptions, | 291 uploadOptions: _uploadOptions, |
| 291 uploadMedia: _uploadMedia, | 292 uploadMedia: _uploadMedia, |
| 292 downloadOptions: _downloadOptions); | 293 downloadOptions: _downloadOptions); |
| 293 return _response.then((data) => new JobListResponse.fromJson(data)); | 294 return _response.then((data) => new JobListResponse.fromJson(data)); |
| 294 } | 295 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 * - "COMPLETED" : Completed | 332 * - "COMPLETED" : Completed |
| 332 * - "IN_PROGRESS" : In progress | 333 * - "IN_PROGRESS" : In progress |
| 333 * - "NOT_ACCEPTED" : Not accepted | 334 * - "NOT_ACCEPTED" : Not accepted |
| 334 * - "NOT_STARTED" : Not started | 335 * - "NOT_STARTED" : Not started |
| 335 * - "OBSOLETE" : Obsolete | 336 * - "OBSOLETE" : Obsolete |
| 336 * | 337 * |
| 337 * [title] - Job title | 338 * [title] - Job title |
| 338 * | 339 * |
| 339 * Completes with a [Job]. | 340 * Completes with a [Job]. |
| 340 * | 341 * |
| 341 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 342 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 342 * error. | 343 * error. |
| 343 * | 344 * |
| 344 * If the used [http.Client] completes with an error when making a REST call, | 345 * If the used [http.Client] completes with an error when making a REST call, |
| 345 * this method will complete with the same error. | 346 * this method will complete with the same error. |
| 346 */ | 347 */ |
| 347 async.Future<Job> patch(Job request, core.String teamId, core.String jobId, {c
ore.String address, core.String assignee, core.List<core.String> customField, co
re.String customerName, core.String customerPhoneNumber, core.double lat, core.d
ouble lng, core.String note, core.String progress, core.String title}) { | 348 async.Future<Job> patch(Job request, core.String teamId, core.String jobId, {c
ore.String address, core.String assignee, core.List<core.String> customField, co
re.String customerName, core.String customerPhoneNumber, core.double lat, core.d
ouble lng, core.String note, core.String progress, core.String title}) { |
| 348 var _url = null; | 349 var _url = null; |
| 349 var _queryParams = new core.Map(); | 350 var _queryParams = new core.Map(); |
| 350 var _uploadMedia = null; | 351 var _uploadMedia = null; |
| 351 var _uploadOptions = null; | 352 var _uploadOptions = null; |
| 352 var _downloadOptions = common.DownloadOptions.Metadata; | 353 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 353 var _body = null; | 354 var _body = null; |
| 354 | 355 |
| 355 if (request != null) { | 356 if (request != null) { |
| 356 _body = convert.JSON.encode((request).toJson()); | 357 _body = convert.JSON.encode((request).toJson()); |
| 357 } | 358 } |
| 358 if (teamId == null) { | 359 if (teamId == null) { |
| 359 throw new core.ArgumentError("Parameter teamId is required."); | 360 throw new core.ArgumentError("Parameter teamId is required."); |
| 360 } | 361 } |
| 361 if (jobId == null) { | 362 if (jobId == null) { |
| 362 throw new core.ArgumentError("Parameter jobId is required."); | 363 throw new core.ArgumentError("Parameter jobId is required."); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 386 _queryParams["note"] = [note]; | 387 _queryParams["note"] = [note]; |
| 387 } | 388 } |
| 388 if (progress != null) { | 389 if (progress != null) { |
| 389 _queryParams["progress"] = [progress]; | 390 _queryParams["progress"] = [progress]; |
| 390 } | 391 } |
| 391 if (title != null) { | 392 if (title != null) { |
| 392 _queryParams["title"] = [title]; | 393 _queryParams["title"] = [title]; |
| 393 } | 394 } |
| 394 | 395 |
| 395 | 396 |
| 396 _url = 'teams/' + common_internal.Escaper.ecapeVariable('$teamId') + '/jobs/
' + common_internal.Escaper.ecapeVariable('$jobId'); | 397 _url = 'teams/' + commons.Escaper.ecapeVariable('$teamId') + '/jobs/' + comm
ons.Escaper.ecapeVariable('$jobId'); |
| 397 | 398 |
| 398 var _response = _requester.request(_url, | 399 var _response = _requester.request(_url, |
| 399 "PATCH", | 400 "PATCH", |
| 400 body: _body, | 401 body: _body, |
| 401 queryParams: _queryParams, | 402 queryParams: _queryParams, |
| 402 uploadOptions: _uploadOptions, | 403 uploadOptions: _uploadOptions, |
| 403 uploadMedia: _uploadMedia, | 404 uploadMedia: _uploadMedia, |
| 404 downloadOptions: _downloadOptions); | 405 downloadOptions: _downloadOptions); |
| 405 return _response.then((data) => new Job.fromJson(data)); | 406 return _response.then((data) => new Job.fromJson(data)); |
| 406 } | 407 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 * - "COMPLETED" : Completed | 443 * - "COMPLETED" : Completed |
| 443 * - "IN_PROGRESS" : In progress | 444 * - "IN_PROGRESS" : In progress |
| 444 * - "NOT_ACCEPTED" : Not accepted | 445 * - "NOT_ACCEPTED" : Not accepted |
| 445 * - "NOT_STARTED" : Not started | 446 * - "NOT_STARTED" : Not started |
| 446 * - "OBSOLETE" : Obsolete | 447 * - "OBSOLETE" : Obsolete |
| 447 * | 448 * |
| 448 * [title] - Job title | 449 * [title] - Job title |
| 449 * | 450 * |
| 450 * Completes with a [Job]. | 451 * Completes with a [Job]. |
| 451 * | 452 * |
| 452 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 453 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 453 * error. | 454 * error. |
| 454 * | 455 * |
| 455 * If the used [http.Client] completes with an error when making a REST call, | 456 * If the used [http.Client] completes with an error when making a REST call, |
| 456 * this method will complete with the same error. | 457 * this method will complete with the same error. |
| 457 */ | 458 */ |
| 458 async.Future<Job> update(Job request, core.String teamId, core.String jobId, {
core.String address, core.String assignee, core.List<core.String> customField, c
ore.String customerName, core.String customerPhoneNumber, core.double lat, core.
double lng, core.String note, core.String progress, core.String title}) { | 459 async.Future<Job> update(Job request, core.String teamId, core.String jobId, {
core.String address, core.String assignee, core.List<core.String> customField, c
ore.String customerName, core.String customerPhoneNumber, core.double lat, core.
double lng, core.String note, core.String progress, core.String title}) { |
| 459 var _url = null; | 460 var _url = null; |
| 460 var _queryParams = new core.Map(); | 461 var _queryParams = new core.Map(); |
| 461 var _uploadMedia = null; | 462 var _uploadMedia = null; |
| 462 var _uploadOptions = null; | 463 var _uploadOptions = null; |
| 463 var _downloadOptions = common.DownloadOptions.Metadata; | 464 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 464 var _body = null; | 465 var _body = null; |
| 465 | 466 |
| 466 if (request != null) { | 467 if (request != null) { |
| 467 _body = convert.JSON.encode((request).toJson()); | 468 _body = convert.JSON.encode((request).toJson()); |
| 468 } | 469 } |
| 469 if (teamId == null) { | 470 if (teamId == null) { |
| 470 throw new core.ArgumentError("Parameter teamId is required."); | 471 throw new core.ArgumentError("Parameter teamId is required."); |
| 471 } | 472 } |
| 472 if (jobId == null) { | 473 if (jobId == null) { |
| 473 throw new core.ArgumentError("Parameter jobId is required."); | 474 throw new core.ArgumentError("Parameter jobId is required."); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 497 _queryParams["note"] = [note]; | 498 _queryParams["note"] = [note]; |
| 498 } | 499 } |
| 499 if (progress != null) { | 500 if (progress != null) { |
| 500 _queryParams["progress"] = [progress]; | 501 _queryParams["progress"] = [progress]; |
| 501 } | 502 } |
| 502 if (title != null) { | 503 if (title != null) { |
| 503 _queryParams["title"] = [title]; | 504 _queryParams["title"] = [title]; |
| 504 } | 505 } |
| 505 | 506 |
| 506 | 507 |
| 507 _url = 'teams/' + common_internal.Escaper.ecapeVariable('$teamId') + '/jobs/
' + common_internal.Escaper.ecapeVariable('$jobId'); | 508 _url = 'teams/' + commons.Escaper.ecapeVariable('$teamId') + '/jobs/' + comm
ons.Escaper.ecapeVariable('$jobId'); |
| 508 | 509 |
| 509 var _response = _requester.request(_url, | 510 var _response = _requester.request(_url, |
| 510 "PUT", | 511 "PUT", |
| 511 body: _body, | 512 body: _body, |
| 512 queryParams: _queryParams, | 513 queryParams: _queryParams, |
| 513 uploadOptions: _uploadOptions, | 514 uploadOptions: _uploadOptions, |
| 514 uploadMedia: _uploadMedia, | 515 uploadMedia: _uploadMedia, |
| 515 downloadOptions: _downloadOptions); | 516 downloadOptions: _downloadOptions); |
| 516 return _response.then((data) => new Job.fromJson(data)); | 517 return _response.then((data) => new Job.fromJson(data)); |
| 517 } | 518 } |
| 518 | 519 |
| 519 } | 520 } |
| 520 | 521 |
| 521 | 522 |
| 522 /** Not documented yet. */ | |
| 523 class LocationResourceApi { | 523 class LocationResourceApi { |
| 524 final common_internal.ApiRequester _requester; | 524 final commons.ApiRequester _requester; |
| 525 | 525 |
| 526 LocationResourceApi(common_internal.ApiRequester client) : | 526 LocationResourceApi(commons.ApiRequester client) : |
| 527 _requester = client; | 527 _requester = client; |
| 528 | 528 |
| 529 /** | 529 /** |
| 530 * Retrieves a list of locations for a worker. | 530 * Retrieves a list of locations for a worker. |
| 531 * | 531 * |
| 532 * Request parameters: | 532 * Request parameters: |
| 533 * | 533 * |
| 534 * [teamId] - Team ID | 534 * [teamId] - Team ID |
| 535 * | 535 * |
| 536 * [workerEmail] - Worker email address. | 536 * [workerEmail] - Worker email address. |
| 537 * | 537 * |
| 538 * [startTimestampMs] - Start timestamp in milliseconds since the epoch. | 538 * [startTimestampMs] - Start timestamp in milliseconds since the epoch. |
| 539 * | 539 * |
| 540 * [maxResults] - Maximum number of results to return in one page. | 540 * [maxResults] - Maximum number of results to return in one page. |
| 541 * | 541 * |
| 542 * [pageToken] - Continuation token | 542 * [pageToken] - Continuation token |
| 543 * | 543 * |
| 544 * Completes with a [LocationListResponse]. | 544 * Completes with a [LocationListResponse]. |
| 545 * | 545 * |
| 546 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 546 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 547 * error. | 547 * error. |
| 548 * | 548 * |
| 549 * If the used [http.Client] completes with an error when making a REST call, | 549 * If the used [http.Client] completes with an error when making a REST call, |
| 550 * this method will complete with the same error. | 550 * this method will complete with the same error. |
| 551 */ | 551 */ |
| 552 async.Future<LocationListResponse> list(core.String teamId, core.String worker
Email, core.String startTimestampMs, {core.int maxResults, core.String pageToken
}) { | 552 async.Future<LocationListResponse> list(core.String teamId, core.String worker
Email, core.String startTimestampMs, {core.int maxResults, core.String pageToken
}) { |
| 553 var _url = null; | 553 var _url = null; |
| 554 var _queryParams = new core.Map(); | 554 var _queryParams = new core.Map(); |
| 555 var _uploadMedia = null; | 555 var _uploadMedia = null; |
| 556 var _uploadOptions = null; | 556 var _uploadOptions = null; |
| 557 var _downloadOptions = common.DownloadOptions.Metadata; | 557 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 558 var _body = null; | 558 var _body = null; |
| 559 | 559 |
| 560 if (teamId == null) { | 560 if (teamId == null) { |
| 561 throw new core.ArgumentError("Parameter teamId is required."); | 561 throw new core.ArgumentError("Parameter teamId is required."); |
| 562 } | 562 } |
| 563 if (workerEmail == null) { | 563 if (workerEmail == null) { |
| 564 throw new core.ArgumentError("Parameter workerEmail is required."); | 564 throw new core.ArgumentError("Parameter workerEmail is required."); |
| 565 } | 565 } |
| 566 if (startTimestampMs == null) { | 566 if (startTimestampMs == null) { |
| 567 throw new core.ArgumentError("Parameter startTimestampMs is required."); | 567 throw new core.ArgumentError("Parameter startTimestampMs is required."); |
| 568 } | 568 } |
| 569 _queryParams["startTimestampMs"] = [startTimestampMs]; | 569 _queryParams["startTimestampMs"] = [startTimestampMs]; |
| 570 if (maxResults != null) { | 570 if (maxResults != null) { |
| 571 _queryParams["maxResults"] = ["${maxResults}"]; | 571 _queryParams["maxResults"] = ["${maxResults}"]; |
| 572 } | 572 } |
| 573 if (pageToken != null) { | 573 if (pageToken != null) { |
| 574 _queryParams["pageToken"] = [pageToken]; | 574 _queryParams["pageToken"] = [pageToken]; |
| 575 } | 575 } |
| 576 | 576 |
| 577 | 577 |
| 578 _url = 'teams/' + common_internal.Escaper.ecapeVariable('$teamId') + '/worke
rs/' + common_internal.Escaper.ecapeVariable('$workerEmail') + '/locations'; | 578 _url = 'teams/' + commons.Escaper.ecapeVariable('$teamId') + '/workers/' + c
ommons.Escaper.ecapeVariable('$workerEmail') + '/locations'; |
| 579 | 579 |
| 580 var _response = _requester.request(_url, | 580 var _response = _requester.request(_url, |
| 581 "GET", | 581 "GET", |
| 582 body: _body, | 582 body: _body, |
| 583 queryParams: _queryParams, | 583 queryParams: _queryParams, |
| 584 uploadOptions: _uploadOptions, | 584 uploadOptions: _uploadOptions, |
| 585 uploadMedia: _uploadMedia, | 585 uploadMedia: _uploadMedia, |
| 586 downloadOptions: _downloadOptions); | 586 downloadOptions: _downloadOptions); |
| 587 return _response.then((data) => new LocationListResponse.fromJson(data)); | 587 return _response.then((data) => new LocationListResponse.fromJson(data)); |
| 588 } | 588 } |
| 589 | 589 |
| 590 } | 590 } |
| 591 | 591 |
| 592 | 592 |
| 593 /** Not documented yet. */ | |
| 594 class ScheduleResourceApi { | 593 class ScheduleResourceApi { |
| 595 final common_internal.ApiRequester _requester; | 594 final commons.ApiRequester _requester; |
| 596 | 595 |
| 597 ScheduleResourceApi(common_internal.ApiRequester client) : | 596 ScheduleResourceApi(commons.ApiRequester client) : |
| 598 _requester = client; | 597 _requester = client; |
| 599 | 598 |
| 600 /** | 599 /** |
| 601 * Retrieves the schedule for a job. | 600 * Retrieves the schedule for a job. |
| 602 * | 601 * |
| 603 * Request parameters: | 602 * Request parameters: |
| 604 * | 603 * |
| 605 * [teamId] - Team ID | 604 * [teamId] - Team ID |
| 606 * | 605 * |
| 607 * [jobId] - Job number | 606 * [jobId] - Job number |
| 608 * | 607 * |
| 609 * Completes with a [Schedule]. | 608 * Completes with a [Schedule]. |
| 610 * | 609 * |
| 611 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 610 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 612 * error. | 611 * error. |
| 613 * | 612 * |
| 614 * If the used [http.Client] completes with an error when making a REST call, | 613 * If the used [http.Client] completes with an error when making a REST call, |
| 615 * this method will complete with the same error. | 614 * this method will complete with the same error. |
| 616 */ | 615 */ |
| 617 async.Future<Schedule> get(core.String teamId, core.String jobId) { | 616 async.Future<Schedule> get(core.String teamId, core.String jobId) { |
| 618 var _url = null; | 617 var _url = null; |
| 619 var _queryParams = new core.Map(); | 618 var _queryParams = new core.Map(); |
| 620 var _uploadMedia = null; | 619 var _uploadMedia = null; |
| 621 var _uploadOptions = null; | 620 var _uploadOptions = null; |
| 622 var _downloadOptions = common.DownloadOptions.Metadata; | 621 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 623 var _body = null; | 622 var _body = null; |
| 624 | 623 |
| 625 if (teamId == null) { | 624 if (teamId == null) { |
| 626 throw new core.ArgumentError("Parameter teamId is required."); | 625 throw new core.ArgumentError("Parameter teamId is required."); |
| 627 } | 626 } |
| 628 if (jobId == null) { | 627 if (jobId == null) { |
| 629 throw new core.ArgumentError("Parameter jobId is required."); | 628 throw new core.ArgumentError("Parameter jobId is required."); |
| 630 } | 629 } |
| 631 | 630 |
| 632 | 631 |
| 633 _url = 'teams/' + common_internal.Escaper.ecapeVariable('$teamId') + '/jobs/
' + common_internal.Escaper.ecapeVariable('$jobId') + '/schedule'; | 632 _url = 'teams/' + commons.Escaper.ecapeVariable('$teamId') + '/jobs/' + comm
ons.Escaper.ecapeVariable('$jobId') + '/schedule'; |
| 634 | 633 |
| 635 var _response = _requester.request(_url, | 634 var _response = _requester.request(_url, |
| 636 "GET", | 635 "GET", |
| 637 body: _body, | 636 body: _body, |
| 638 queryParams: _queryParams, | 637 queryParams: _queryParams, |
| 639 uploadOptions: _uploadOptions, | 638 uploadOptions: _uploadOptions, |
| 640 uploadMedia: _uploadMedia, | 639 uploadMedia: _uploadMedia, |
| 641 downloadOptions: _downloadOptions); | 640 downloadOptions: _downloadOptions); |
| 642 return _response.then((data) => new Schedule.fromJson(data)); | 641 return _response.then((data) => new Schedule.fromJson(data)); |
| 643 } | 642 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 658 * start/end times is ignored if this is true. | 657 * start/end times is ignored if this is true. |
| 659 * | 658 * |
| 660 * [duration] - Job duration in milliseconds. | 659 * [duration] - Job duration in milliseconds. |
| 661 * | 660 * |
| 662 * [endTime] - Scheduled end time in milliseconds since epoch. | 661 * [endTime] - Scheduled end time in milliseconds since epoch. |
| 663 * | 662 * |
| 664 * [startTime] - Scheduled start time in milliseconds since epoch. | 663 * [startTime] - Scheduled start time in milliseconds since epoch. |
| 665 * | 664 * |
| 666 * Completes with a [Schedule]. | 665 * Completes with a [Schedule]. |
| 667 * | 666 * |
| 668 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 667 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 669 * error. | 668 * error. |
| 670 * | 669 * |
| 671 * If the used [http.Client] completes with an error when making a REST call, | 670 * If the used [http.Client] completes with an error when making a REST call, |
| 672 * this method will complete with the same error. | 671 * this method will complete with the same error. |
| 673 */ | 672 */ |
| 674 async.Future<Schedule> patch(Schedule request, core.String teamId, core.String
jobId, {core.bool allDay, core.String duration, core.String endTime, core.Strin
g startTime}) { | 673 async.Future<Schedule> patch(Schedule request, core.String teamId, core.String
jobId, {core.bool allDay, core.String duration, core.String endTime, core.Strin
g startTime}) { |
| 675 var _url = null; | 674 var _url = null; |
| 676 var _queryParams = new core.Map(); | 675 var _queryParams = new core.Map(); |
| 677 var _uploadMedia = null; | 676 var _uploadMedia = null; |
| 678 var _uploadOptions = null; | 677 var _uploadOptions = null; |
| 679 var _downloadOptions = common.DownloadOptions.Metadata; | 678 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 680 var _body = null; | 679 var _body = null; |
| 681 | 680 |
| 682 if (request != null) { | 681 if (request != null) { |
| 683 _body = convert.JSON.encode((request).toJson()); | 682 _body = convert.JSON.encode((request).toJson()); |
| 684 } | 683 } |
| 685 if (teamId == null) { | 684 if (teamId == null) { |
| 686 throw new core.ArgumentError("Parameter teamId is required."); | 685 throw new core.ArgumentError("Parameter teamId is required."); |
| 687 } | 686 } |
| 688 if (jobId == null) { | 687 if (jobId == null) { |
| 689 throw new core.ArgumentError("Parameter jobId is required."); | 688 throw new core.ArgumentError("Parameter jobId is required."); |
| 690 } | 689 } |
| 691 if (allDay != null) { | 690 if (allDay != null) { |
| 692 _queryParams["allDay"] = ["${allDay}"]; | 691 _queryParams["allDay"] = ["${allDay}"]; |
| 693 } | 692 } |
| 694 if (duration != null) { | 693 if (duration != null) { |
| 695 _queryParams["duration"] = [duration]; | 694 _queryParams["duration"] = [duration]; |
| 696 } | 695 } |
| 697 if (endTime != null) { | 696 if (endTime != null) { |
| 698 _queryParams["endTime"] = [endTime]; | 697 _queryParams["endTime"] = [endTime]; |
| 699 } | 698 } |
| 700 if (startTime != null) { | 699 if (startTime != null) { |
| 701 _queryParams["startTime"] = [startTime]; | 700 _queryParams["startTime"] = [startTime]; |
| 702 } | 701 } |
| 703 | 702 |
| 704 | 703 |
| 705 _url = 'teams/' + common_internal.Escaper.ecapeVariable('$teamId') + '/jobs/
' + common_internal.Escaper.ecapeVariable('$jobId') + '/schedule'; | 704 _url = 'teams/' + commons.Escaper.ecapeVariable('$teamId') + '/jobs/' + comm
ons.Escaper.ecapeVariable('$jobId') + '/schedule'; |
| 706 | 705 |
| 707 var _response = _requester.request(_url, | 706 var _response = _requester.request(_url, |
| 708 "PATCH", | 707 "PATCH", |
| 709 body: _body, | 708 body: _body, |
| 710 queryParams: _queryParams, | 709 queryParams: _queryParams, |
| 711 uploadOptions: _uploadOptions, | 710 uploadOptions: _uploadOptions, |
| 712 uploadMedia: _uploadMedia, | 711 uploadMedia: _uploadMedia, |
| 713 downloadOptions: _downloadOptions); | 712 downloadOptions: _downloadOptions); |
| 714 return _response.then((data) => new Schedule.fromJson(data)); | 713 return _response.then((data) => new Schedule.fromJson(data)); |
| 715 } | 714 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 729 * start/end times is ignored if this is true. | 728 * start/end times is ignored if this is true. |
| 730 * | 729 * |
| 731 * [duration] - Job duration in milliseconds. | 730 * [duration] - Job duration in milliseconds. |
| 732 * | 731 * |
| 733 * [endTime] - Scheduled end time in milliseconds since epoch. | 732 * [endTime] - Scheduled end time in milliseconds since epoch. |
| 734 * | 733 * |
| 735 * [startTime] - Scheduled start time in milliseconds since epoch. | 734 * [startTime] - Scheduled start time in milliseconds since epoch. |
| 736 * | 735 * |
| 737 * Completes with a [Schedule]. | 736 * Completes with a [Schedule]. |
| 738 * | 737 * |
| 739 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 738 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 740 * error. | 739 * error. |
| 741 * | 740 * |
| 742 * If the used [http.Client] completes with an error when making a REST call, | 741 * If the used [http.Client] completes with an error when making a REST call, |
| 743 * this method will complete with the same error. | 742 * this method will complete with the same error. |
| 744 */ | 743 */ |
| 745 async.Future<Schedule> update(Schedule request, core.String teamId, core.Strin
g jobId, {core.bool allDay, core.String duration, core.String endTime, core.Stri
ng startTime}) { | 744 async.Future<Schedule> update(Schedule request, core.String teamId, core.Strin
g jobId, {core.bool allDay, core.String duration, core.String endTime, core.Stri
ng startTime}) { |
| 746 var _url = null; | 745 var _url = null; |
| 747 var _queryParams = new core.Map(); | 746 var _queryParams = new core.Map(); |
| 748 var _uploadMedia = null; | 747 var _uploadMedia = null; |
| 749 var _uploadOptions = null; | 748 var _uploadOptions = null; |
| 750 var _downloadOptions = common.DownloadOptions.Metadata; | 749 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 751 var _body = null; | 750 var _body = null; |
| 752 | 751 |
| 753 if (request != null) { | 752 if (request != null) { |
| 754 _body = convert.JSON.encode((request).toJson()); | 753 _body = convert.JSON.encode((request).toJson()); |
| 755 } | 754 } |
| 756 if (teamId == null) { | 755 if (teamId == null) { |
| 757 throw new core.ArgumentError("Parameter teamId is required."); | 756 throw new core.ArgumentError("Parameter teamId is required."); |
| 758 } | 757 } |
| 759 if (jobId == null) { | 758 if (jobId == null) { |
| 760 throw new core.ArgumentError("Parameter jobId is required."); | 759 throw new core.ArgumentError("Parameter jobId is required."); |
| 761 } | 760 } |
| 762 if (allDay != null) { | 761 if (allDay != null) { |
| 763 _queryParams["allDay"] = ["${allDay}"]; | 762 _queryParams["allDay"] = ["${allDay}"]; |
| 764 } | 763 } |
| 765 if (duration != null) { | 764 if (duration != null) { |
| 766 _queryParams["duration"] = [duration]; | 765 _queryParams["duration"] = [duration]; |
| 767 } | 766 } |
| 768 if (endTime != null) { | 767 if (endTime != null) { |
| 769 _queryParams["endTime"] = [endTime]; | 768 _queryParams["endTime"] = [endTime]; |
| 770 } | 769 } |
| 771 if (startTime != null) { | 770 if (startTime != null) { |
| 772 _queryParams["startTime"] = [startTime]; | 771 _queryParams["startTime"] = [startTime]; |
| 773 } | 772 } |
| 774 | 773 |
| 775 | 774 |
| 776 _url = 'teams/' + common_internal.Escaper.ecapeVariable('$teamId') + '/jobs/
' + common_internal.Escaper.ecapeVariable('$jobId') + '/schedule'; | 775 _url = 'teams/' + commons.Escaper.ecapeVariable('$teamId') + '/jobs/' + comm
ons.Escaper.ecapeVariable('$jobId') + '/schedule'; |
| 777 | 776 |
| 778 var _response = _requester.request(_url, | 777 var _response = _requester.request(_url, |
| 779 "PUT", | 778 "PUT", |
| 780 body: _body, | 779 body: _body, |
| 781 queryParams: _queryParams, | 780 queryParams: _queryParams, |
| 782 uploadOptions: _uploadOptions, | 781 uploadOptions: _uploadOptions, |
| 783 uploadMedia: _uploadMedia, | 782 uploadMedia: _uploadMedia, |
| 784 downloadOptions: _downloadOptions); | 783 downloadOptions: _downloadOptions); |
| 785 return _response.then((data) => new Schedule.fromJson(data)); | 784 return _response.then((data) => new Schedule.fromJson(data)); |
| 786 } | 785 } |
| 787 | 786 |
| 788 } | 787 } |
| 789 | 788 |
| 790 | 789 |
| 791 /** Not documented yet. */ | |
| 792 class TeamResourceApi { | 790 class TeamResourceApi { |
| 793 final common_internal.ApiRequester _requester; | 791 final commons.ApiRequester _requester; |
| 794 | 792 |
| 795 TeamResourceApi(common_internal.ApiRequester client) : | 793 TeamResourceApi(commons.ApiRequester client) : |
| 796 _requester = client; | 794 _requester = client; |
| 797 | 795 |
| 798 /** | 796 /** |
| 799 * Retrieves a list of teams for a user. | 797 * Retrieves a list of teams for a user. |
| 800 * | 798 * |
| 801 * Request parameters: | 799 * Request parameters: |
| 802 * | 800 * |
| 803 * [admin] - Whether to include teams for which the user has the Admin role. | 801 * [admin] - Whether to include teams for which the user has the Admin role. |
| 804 * | 802 * |
| 805 * [dispatcher] - Whether to include teams for which the user has the | 803 * [dispatcher] - Whether to include teams for which the user has the |
| 806 * Dispatcher role. | 804 * Dispatcher role. |
| 807 * | 805 * |
| 808 * [worker] - Whether to include teams for which the user has the Worker role. | 806 * [worker] - Whether to include teams for which the user has the Worker role. |
| 809 * | 807 * |
| 810 * Completes with a [TeamListResponse]. | 808 * Completes with a [TeamListResponse]. |
| 811 * | 809 * |
| 812 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 810 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 813 * error. | 811 * error. |
| 814 * | 812 * |
| 815 * If the used [http.Client] completes with an error when making a REST call, | 813 * If the used [http.Client] completes with an error when making a REST call, |
| 816 * this method will complete with the same error. | 814 * this method will complete with the same error. |
| 817 */ | 815 */ |
| 818 async.Future<TeamListResponse> list({core.bool admin, core.bool dispatcher, co
re.bool worker}) { | 816 async.Future<TeamListResponse> list({core.bool admin, core.bool dispatcher, co
re.bool worker}) { |
| 819 var _url = null; | 817 var _url = null; |
| 820 var _queryParams = new core.Map(); | 818 var _queryParams = new core.Map(); |
| 821 var _uploadMedia = null; | 819 var _uploadMedia = null; |
| 822 var _uploadOptions = null; | 820 var _uploadOptions = null; |
| 823 var _downloadOptions = common.DownloadOptions.Metadata; | 821 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 824 var _body = null; | 822 var _body = null; |
| 825 | 823 |
| 826 if (admin != null) { | 824 if (admin != null) { |
| 827 _queryParams["admin"] = ["${admin}"]; | 825 _queryParams["admin"] = ["${admin}"]; |
| 828 } | 826 } |
| 829 if (dispatcher != null) { | 827 if (dispatcher != null) { |
| 830 _queryParams["dispatcher"] = ["${dispatcher}"]; | 828 _queryParams["dispatcher"] = ["${dispatcher}"]; |
| 831 } | 829 } |
| 832 if (worker != null) { | 830 if (worker != null) { |
| 833 _queryParams["worker"] = ["${worker}"]; | 831 _queryParams["worker"] = ["${worker}"]; |
| 834 } | 832 } |
| 835 | 833 |
| 836 | 834 |
| 837 _url = 'teams'; | 835 _url = 'teams'; |
| 838 | 836 |
| 839 var _response = _requester.request(_url, | 837 var _response = _requester.request(_url, |
| 840 "GET", | 838 "GET", |
| 841 body: _body, | 839 body: _body, |
| 842 queryParams: _queryParams, | 840 queryParams: _queryParams, |
| 843 uploadOptions: _uploadOptions, | 841 uploadOptions: _uploadOptions, |
| 844 uploadMedia: _uploadMedia, | 842 uploadMedia: _uploadMedia, |
| 845 downloadOptions: _downloadOptions); | 843 downloadOptions: _downloadOptions); |
| 846 return _response.then((data) => new TeamListResponse.fromJson(data)); | 844 return _response.then((data) => new TeamListResponse.fromJson(data)); |
| 847 } | 845 } |
| 848 | 846 |
| 849 } | 847 } |
| 850 | 848 |
| 851 | 849 |
| 852 /** Not documented yet. */ | |
| 853 class WorkerResourceApi { | 850 class WorkerResourceApi { |
| 854 final common_internal.ApiRequester _requester; | 851 final commons.ApiRequester _requester; |
| 855 | 852 |
| 856 WorkerResourceApi(common_internal.ApiRequester client) : | 853 WorkerResourceApi(commons.ApiRequester client) : |
| 857 _requester = client; | 854 _requester = client; |
| 858 | 855 |
| 859 /** | 856 /** |
| 860 * Retrieves a list of workers in a team. | 857 * Retrieves a list of workers in a team. |
| 861 * | 858 * |
| 862 * Request parameters: | 859 * Request parameters: |
| 863 * | 860 * |
| 864 * [teamId] - Team ID | 861 * [teamId] - Team ID |
| 865 * | 862 * |
| 866 * Completes with a [WorkerListResponse]. | 863 * Completes with a [WorkerListResponse]. |
| 867 * | 864 * |
| 868 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 865 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 869 * error. | 866 * error. |
| 870 * | 867 * |
| 871 * If the used [http.Client] completes with an error when making a REST call, | 868 * If the used [http.Client] completes with an error when making a REST call, |
| 872 * this method will complete with the same error. | 869 * this method will complete with the same error. |
| 873 */ | 870 */ |
| 874 async.Future<WorkerListResponse> list(core.String teamId) { | 871 async.Future<WorkerListResponse> list(core.String teamId) { |
| 875 var _url = null; | 872 var _url = null; |
| 876 var _queryParams = new core.Map(); | 873 var _queryParams = new core.Map(); |
| 877 var _uploadMedia = null; | 874 var _uploadMedia = null; |
| 878 var _uploadOptions = null; | 875 var _uploadOptions = null; |
| 879 var _downloadOptions = common.DownloadOptions.Metadata; | 876 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 880 var _body = null; | 877 var _body = null; |
| 881 | 878 |
| 882 if (teamId == null) { | 879 if (teamId == null) { |
| 883 throw new core.ArgumentError("Parameter teamId is required."); | 880 throw new core.ArgumentError("Parameter teamId is required."); |
| 884 } | 881 } |
| 885 | 882 |
| 886 | 883 |
| 887 _url = 'teams/' + common_internal.Escaper.ecapeVariable('$teamId') + '/worke
rs'; | 884 _url = 'teams/' + commons.Escaper.ecapeVariable('$teamId') + '/workers'; |
| 888 | 885 |
| 889 var _response = _requester.request(_url, | 886 var _response = _requester.request(_url, |
| 890 "GET", | 887 "GET", |
| 891 body: _body, | 888 body: _body, |
| 892 queryParams: _queryParams, | 889 queryParams: _queryParams, |
| 893 uploadOptions: _uploadOptions, | 890 uploadOptions: _uploadOptions, |
| 894 uploadMedia: _uploadMedia, | 891 uploadMedia: _uploadMedia, |
| 895 downloadOptions: _downloadOptions); | 892 downloadOptions: _downloadOptions); |
| 896 return _response.then((data) => new WorkerListResponse.fromJson(data)); | 893 return _response.then((data) => new WorkerListResponse.fromJson(data)); |
| 897 } | 894 } |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1783 var _json = new core.Map(); | 1780 var _json = new core.Map(); |
| 1784 if (items != null) { | 1781 if (items != null) { |
| 1785 _json["items"] = items.map((value) => (value).toJson()).toList(); | 1782 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1786 } | 1783 } |
| 1787 if (kind != null) { | 1784 if (kind != null) { |
| 1788 _json["kind"] = kind; | 1785 _json["kind"] = kind; |
| 1789 } | 1786 } |
| 1790 return _json; | 1787 return _json; |
| 1791 } | 1788 } |
| 1792 } | 1789 } |
| 1793 | |
| 1794 | |
| OLD | NEW |