| 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.admin.datatransfer_v1; | 3 library googleapis.admin.datatransfer_v1; |
| 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 admin/datatransfer_v1'; | 15 const core.String USER_AGENT = 'dart-api-client admin/datatransfer_v1'; |
| 16 | 16 |
| 17 /** Transfers user data from one user to another. */ | 17 /// Transfers user data from one user to another. |
| 18 class AdminApi { | 18 class AdminApi { |
| 19 /** View and manage data transfers between users in your organization */ | 19 /// View and manage data transfers between users in your organization |
| 20 static const AdminDatatransferScope = "https://www.googleapis.com/auth/admin.d
atatransfer"; | 20 static const AdminDatatransferScope = |
| 21 "https://www.googleapis.com/auth/admin.datatransfer"; |
| 21 | 22 |
| 22 /** View data transfers between users in your organization */ | 23 /// View data transfers between users in your organization |
| 23 static const AdminDatatransferReadonlyScope = "https://www.googleapis.com/auth
/admin.datatransfer.readonly"; | 24 static const AdminDatatransferReadonlyScope = |
| 24 | 25 "https://www.googleapis.com/auth/admin.datatransfer.readonly"; |
| 25 | 26 |
| 26 final commons.ApiRequester _requester; | 27 final commons.ApiRequester _requester; |
| 27 | 28 |
| 28 ApplicationsResourceApi get applications => new ApplicationsResourceApi(_reque
ster); | 29 ApplicationsResourceApi get applications => |
| 30 new ApplicationsResourceApi(_requester); |
| 29 TransfersResourceApi get transfers => new TransfersResourceApi(_requester); | 31 TransfersResourceApi get transfers => new TransfersResourceApi(_requester); |
| 30 | 32 |
| 31 AdminApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com
/", core.String servicePath: "admin/datatransfer/v1/"}) : | 33 AdminApi(http.Client client, |
| 32 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 34 {core.String rootUrl: "https://www.googleapis.com/", |
| 35 core.String servicePath: "admin/datatransfer/v1/"}) |
| 36 : _requester = |
| 37 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
| 33 } | 38 } |
| 34 | 39 |
| 35 | |
| 36 class ApplicationsResourceApi { | 40 class ApplicationsResourceApi { |
| 37 final commons.ApiRequester _requester; | 41 final commons.ApiRequester _requester; |
| 38 | 42 |
| 39 ApplicationsResourceApi(commons.ApiRequester client) : | 43 ApplicationsResourceApi(commons.ApiRequester client) : _requester = client; |
| 40 _requester = client; | |
| 41 | 44 |
| 42 /** | 45 /// Retrieves information about an application for the given application ID. |
| 43 * Retrieves information about an application for the given application ID. | 46 /// |
| 44 * | 47 /// Request parameters: |
| 45 * Request parameters: | 48 /// |
| 46 * | 49 /// [applicationId] - ID of the application resource to be retrieved. |
| 47 * [applicationId] - ID of the application resource to be retrieved. | 50 /// |
| 48 * | 51 /// Completes with a [Application]. |
| 49 * Completes with a [Application]. | 52 /// |
| 50 * | 53 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 51 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 54 /// an error. |
| 52 * error. | 55 /// |
| 53 * | 56 /// If the used [http.Client] completes with an error when making a REST |
| 54 * If the used [http.Client] completes with an error when making a REST call, | 57 /// call, this method will complete with the same error. |
| 55 * this method will complete with the same error. | |
| 56 */ | |
| 57 async.Future<Application> get(core.String applicationId) { | 58 async.Future<Application> get(core.String applicationId) { |
| 58 var _url = null; | 59 var _url = null; |
| 59 var _queryParams = new core.Map(); | 60 var _queryParams = new core.Map(); |
| 60 var _uploadMedia = null; | 61 var _uploadMedia = null; |
| 61 var _uploadOptions = null; | 62 var _uploadOptions = null; |
| 62 var _downloadOptions = commons.DownloadOptions.Metadata; | 63 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 63 var _body = null; | 64 var _body = null; |
| 64 | 65 |
| 65 if (applicationId == null) { | 66 if (applicationId == null) { |
| 66 throw new core.ArgumentError("Parameter applicationId is required."); | 67 throw new core.ArgumentError("Parameter applicationId is required."); |
| 67 } | 68 } |
| 68 | 69 |
| 69 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId'); | 70 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId'); |
| 70 | 71 |
| 71 var _response = _requester.request(_url, | 72 var _response = _requester.request(_url, "GET", |
| 72 "GET", | 73 body: _body, |
| 73 body: _body, | 74 queryParams: _queryParams, |
| 74 queryParams: _queryParams, | 75 uploadOptions: _uploadOptions, |
| 75 uploadOptions: _uploadOptions, | 76 uploadMedia: _uploadMedia, |
| 76 uploadMedia: _uploadMedia, | 77 downloadOptions: _downloadOptions); |
| 77 downloadOptions: _downloadOptions); | |
| 78 return _response.then((data) => new Application.fromJson(data)); | 78 return _response.then((data) => new Application.fromJson(data)); |
| 79 } | 79 } |
| 80 | 80 |
| 81 /** | 81 /// Lists the applications available for data transfer for a customer. |
| 82 * Lists the applications available for data transfer for a customer. | 82 /// |
| 83 * | 83 /// Request parameters: |
| 84 * Request parameters: | 84 /// |
| 85 * | 85 /// [customerId] - Immutable ID of the Google Apps account. |
| 86 * [customerId] - Immutable ID of the Google Apps account. | 86 /// |
| 87 * | 87 /// [maxResults] - Maximum number of results to return. Default is 100. |
| 88 * [maxResults] - Maximum number of results to return. Default is 100. | 88 /// Value must be between "1" and "500". |
| 89 * Value must be between "1" and "500". | 89 /// |
| 90 * | 90 /// [pageToken] - Token to specify next page in the list. |
| 91 * [pageToken] - Token to specify next page in the list. | 91 /// |
| 92 * | 92 /// Completes with a [ApplicationsListResponse]. |
| 93 * Completes with a [ApplicationsListResponse]. | 93 /// |
| 94 * | 94 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 95 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 95 /// an error. |
| 96 * error. | 96 /// |
| 97 * | 97 /// If the used [http.Client] completes with an error when making a REST |
| 98 * If the used [http.Client] completes with an error when making a REST call, | 98 /// call, this method will complete with the same error. |
| 99 * this method will complete with the same error. | 99 async.Future<ApplicationsListResponse> list( |
| 100 */ | 100 {core.String customerId, core.int maxResults, core.String pageToken}) { |
| 101 async.Future<ApplicationsListResponse> list({core.String customerId, core.int
maxResults, core.String pageToken}) { | |
| 102 var _url = null; | 101 var _url = null; |
| 103 var _queryParams = new core.Map(); | 102 var _queryParams = new core.Map(); |
| 104 var _uploadMedia = null; | 103 var _uploadMedia = null; |
| 105 var _uploadOptions = null; | 104 var _uploadOptions = null; |
| 106 var _downloadOptions = commons.DownloadOptions.Metadata; | 105 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 107 var _body = null; | 106 var _body = null; |
| 108 | 107 |
| 109 if (customerId != null) { | 108 if (customerId != null) { |
| 110 _queryParams["customerId"] = [customerId]; | 109 _queryParams["customerId"] = [customerId]; |
| 111 } | 110 } |
| 112 if (maxResults != null) { | 111 if (maxResults != null) { |
| 113 _queryParams["maxResults"] = ["${maxResults}"]; | 112 _queryParams["maxResults"] = ["${maxResults}"]; |
| 114 } | 113 } |
| 115 if (pageToken != null) { | 114 if (pageToken != null) { |
| 116 _queryParams["pageToken"] = [pageToken]; | 115 _queryParams["pageToken"] = [pageToken]; |
| 117 } | 116 } |
| 118 | 117 |
| 119 _url = 'applications'; | 118 _url = 'applications'; |
| 120 | 119 |
| 121 var _response = _requester.request(_url, | 120 var _response = _requester.request(_url, "GET", |
| 122 "GET", | 121 body: _body, |
| 123 body: _body, | 122 queryParams: _queryParams, |
| 124 queryParams: _queryParams, | 123 uploadOptions: _uploadOptions, |
| 125 uploadOptions: _uploadOptions, | 124 uploadMedia: _uploadMedia, |
| 126 uploadMedia: _uploadMedia, | 125 downloadOptions: _downloadOptions); |
| 127 downloadOptions: _downloadOptions); | 126 return _response |
| 128 return _response.then((data) => new ApplicationsListResponse.fromJson(data))
; | 127 .then((data) => new ApplicationsListResponse.fromJson(data)); |
| 129 } | 128 } |
| 130 | |
| 131 } | 129 } |
| 132 | 130 |
| 133 | |
| 134 class TransfersResourceApi { | 131 class TransfersResourceApi { |
| 135 final commons.ApiRequester _requester; | 132 final commons.ApiRequester _requester; |
| 136 | 133 |
| 137 TransfersResourceApi(commons.ApiRequester client) : | 134 TransfersResourceApi(commons.ApiRequester client) : _requester = client; |
| 138 _requester = client; | |
| 139 | 135 |
| 140 /** | 136 /// Retrieves a data transfer request by its resource ID. |
| 141 * Retrieves a data transfer request by its resource ID. | 137 /// |
| 142 * | 138 /// Request parameters: |
| 143 * Request parameters: | 139 /// |
| 144 * | 140 /// [dataTransferId] - ID of the resource to be retrieved. This is returned |
| 145 * [dataTransferId] - ID of the resource to be retrieved. This is returned in | 141 /// in the response from the insert method. |
| 146 * the response from the insert method. | 142 /// |
| 147 * | 143 /// Completes with a [DataTransfer]. |
| 148 * Completes with a [DataTransfer]. | 144 /// |
| 149 * | 145 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 150 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 146 /// an error. |
| 151 * error. | 147 /// |
| 152 * | 148 /// If the used [http.Client] completes with an error when making a REST |
| 153 * If the used [http.Client] completes with an error when making a REST call, | 149 /// call, this method will complete with the same error. |
| 154 * this method will complete with the same error. | |
| 155 */ | |
| 156 async.Future<DataTransfer> get(core.String dataTransferId) { | 150 async.Future<DataTransfer> get(core.String dataTransferId) { |
| 157 var _url = null; | 151 var _url = null; |
| 158 var _queryParams = new core.Map(); | 152 var _queryParams = new core.Map(); |
| 159 var _uploadMedia = null; | 153 var _uploadMedia = null; |
| 160 var _uploadOptions = null; | 154 var _uploadOptions = null; |
| 161 var _downloadOptions = commons.DownloadOptions.Metadata; | 155 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 162 var _body = null; | 156 var _body = null; |
| 163 | 157 |
| 164 if (dataTransferId == null) { | 158 if (dataTransferId == null) { |
| 165 throw new core.ArgumentError("Parameter dataTransferId is required."); | 159 throw new core.ArgumentError("Parameter dataTransferId is required."); |
| 166 } | 160 } |
| 167 | 161 |
| 168 _url = 'transfers/' + commons.Escaper.ecapeVariable('$dataTransferId'); | 162 _url = 'transfers/' + commons.Escaper.ecapeVariable('$dataTransferId'); |
| 169 | 163 |
| 170 var _response = _requester.request(_url, | 164 var _response = _requester.request(_url, "GET", |
| 171 "GET", | 165 body: _body, |
| 172 body: _body, | 166 queryParams: _queryParams, |
| 173 queryParams: _queryParams, | 167 uploadOptions: _uploadOptions, |
| 174 uploadOptions: _uploadOptions, | 168 uploadMedia: _uploadMedia, |
| 175 uploadMedia: _uploadMedia, | 169 downloadOptions: _downloadOptions); |
| 176 downloadOptions: _downloadOptions); | |
| 177 return _response.then((data) => new DataTransfer.fromJson(data)); | 170 return _response.then((data) => new DataTransfer.fromJson(data)); |
| 178 } | 171 } |
| 179 | 172 |
| 180 /** | 173 /// Inserts a data transfer request. |
| 181 * Inserts a data transfer request. | 174 /// |
| 182 * | 175 /// [request] - The metadata request object. |
| 183 * [request] - The metadata request object. | 176 /// |
| 184 * | 177 /// Request parameters: |
| 185 * Request parameters: | 178 /// |
| 186 * | 179 /// Completes with a [DataTransfer]. |
| 187 * Completes with a [DataTransfer]. | 180 /// |
| 188 * | 181 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 189 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 182 /// an error. |
| 190 * error. | 183 /// |
| 191 * | 184 /// If the used [http.Client] completes with an error when making a REST |
| 192 * If the used [http.Client] completes with an error when making a REST call, | 185 /// call, this method will complete with the same error. |
| 193 * this method will complete with the same error. | |
| 194 */ | |
| 195 async.Future<DataTransfer> insert(DataTransfer request) { | 186 async.Future<DataTransfer> insert(DataTransfer request) { |
| 196 var _url = null; | 187 var _url = null; |
| 197 var _queryParams = new core.Map(); | 188 var _queryParams = new core.Map(); |
| 198 var _uploadMedia = null; | 189 var _uploadMedia = null; |
| 199 var _uploadOptions = null; | 190 var _uploadOptions = null; |
| 200 var _downloadOptions = commons.DownloadOptions.Metadata; | 191 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 201 var _body = null; | 192 var _body = null; |
| 202 | 193 |
| 203 if (request != null) { | 194 if (request != null) { |
| 204 _body = convert.JSON.encode((request).toJson()); | 195 _body = convert.JSON.encode((request).toJson()); |
| 205 } | 196 } |
| 206 | 197 |
| 207 _url = 'transfers'; | 198 _url = 'transfers'; |
| 208 | 199 |
| 209 var _response = _requester.request(_url, | 200 var _response = _requester.request(_url, "POST", |
| 210 "POST", | 201 body: _body, |
| 211 body: _body, | 202 queryParams: _queryParams, |
| 212 queryParams: _queryParams, | 203 uploadOptions: _uploadOptions, |
| 213 uploadOptions: _uploadOptions, | 204 uploadMedia: _uploadMedia, |
| 214 uploadMedia: _uploadMedia, | 205 downloadOptions: _downloadOptions); |
| 215 downloadOptions: _downloadOptions); | |
| 216 return _response.then((data) => new DataTransfer.fromJson(data)); | 206 return _response.then((data) => new DataTransfer.fromJson(data)); |
| 217 } | 207 } |
| 218 | 208 |
| 219 /** | 209 /// Lists the transfers for a customer by source user, destination user, or |
| 220 * Lists the transfers for a customer by source user, destination user, or | 210 /// status. |
| 221 * status. | 211 /// |
| 222 * | 212 /// Request parameters: |
| 223 * Request parameters: | 213 /// |
| 224 * | 214 /// [customerId] - Immutable ID of the Google Apps account. |
| 225 * [customerId] - Immutable ID of the Google Apps account. | 215 /// |
| 226 * | 216 /// [maxResults] - Maximum number of results to return. Default is 100. |
| 227 * [maxResults] - Maximum number of results to return. Default is 100. | 217 /// Value must be between "1" and "500". |
| 228 * Value must be between "1" and "500". | 218 /// |
| 229 * | 219 /// [newOwnerUserId] - Destination user's profile ID. |
| 230 * [newOwnerUserId] - Destination user's profile ID. | 220 /// |
| 231 * | 221 /// [oldOwnerUserId] - Source user's profile ID. |
| 232 * [oldOwnerUserId] - Source user's profile ID. | 222 /// |
| 233 * | 223 /// [pageToken] - Token to specify the next page in the list. |
| 234 * [pageToken] - Token to specify the next page in the list. | 224 /// |
| 235 * | 225 /// [status] - Status of the transfer. |
| 236 * [status] - Status of the transfer. | 226 /// |
| 237 * | 227 /// Completes with a [DataTransfersListResponse]. |
| 238 * Completes with a [DataTransfersListResponse]. | 228 /// |
| 239 * | 229 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 240 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 230 /// an error. |
| 241 * error. | 231 /// |
| 242 * | 232 /// If the used [http.Client] completes with an error when making a REST |
| 243 * If the used [http.Client] completes with an error when making a REST call, | 233 /// call, this method will complete with the same error. |
| 244 * this method will complete with the same error. | 234 async.Future<DataTransfersListResponse> list( |
| 245 */ | 235 {core.String customerId, |
| 246 async.Future<DataTransfersListResponse> list({core.String customerId, core.int
maxResults, core.String newOwnerUserId, core.String oldOwnerUserId, core.String
pageToken, core.String status}) { | 236 core.int maxResults, |
| 237 core.String newOwnerUserId, |
| 238 core.String oldOwnerUserId, |
| 239 core.String pageToken, |
| 240 core.String status}) { |
| 247 var _url = null; | 241 var _url = null; |
| 248 var _queryParams = new core.Map(); | 242 var _queryParams = new core.Map(); |
| 249 var _uploadMedia = null; | 243 var _uploadMedia = null; |
| 250 var _uploadOptions = null; | 244 var _uploadOptions = null; |
| 251 var _downloadOptions = commons.DownloadOptions.Metadata; | 245 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 252 var _body = null; | 246 var _body = null; |
| 253 | 247 |
| 254 if (customerId != null) { | 248 if (customerId != null) { |
| 255 _queryParams["customerId"] = [customerId]; | 249 _queryParams["customerId"] = [customerId]; |
| 256 } | 250 } |
| 257 if (maxResults != null) { | 251 if (maxResults != null) { |
| 258 _queryParams["maxResults"] = ["${maxResults}"]; | 252 _queryParams["maxResults"] = ["${maxResults}"]; |
| 259 } | 253 } |
| 260 if (newOwnerUserId != null) { | 254 if (newOwnerUserId != null) { |
| 261 _queryParams["newOwnerUserId"] = [newOwnerUserId]; | 255 _queryParams["newOwnerUserId"] = [newOwnerUserId]; |
| 262 } | 256 } |
| 263 if (oldOwnerUserId != null) { | 257 if (oldOwnerUserId != null) { |
| 264 _queryParams["oldOwnerUserId"] = [oldOwnerUserId]; | 258 _queryParams["oldOwnerUserId"] = [oldOwnerUserId]; |
| 265 } | 259 } |
| 266 if (pageToken != null) { | 260 if (pageToken != null) { |
| 267 _queryParams["pageToken"] = [pageToken]; | 261 _queryParams["pageToken"] = [pageToken]; |
| 268 } | 262 } |
| 269 if (status != null) { | 263 if (status != null) { |
| 270 _queryParams["status"] = [status]; | 264 _queryParams["status"] = [status]; |
| 271 } | 265 } |
| 272 | 266 |
| 273 _url = 'transfers'; | 267 _url = 'transfers'; |
| 274 | 268 |
| 275 var _response = _requester.request(_url, | 269 var _response = _requester.request(_url, "GET", |
| 276 "GET", | 270 body: _body, |
| 277 body: _body, | 271 queryParams: _queryParams, |
| 278 queryParams: _queryParams, | 272 uploadOptions: _uploadOptions, |
| 279 uploadOptions: _uploadOptions, | 273 uploadMedia: _uploadMedia, |
| 280 uploadMedia: _uploadMedia, | 274 downloadOptions: _downloadOptions); |
| 281 downloadOptions: _downloadOptions); | 275 return _response |
| 282 return _response.then((data) => new DataTransfersListResponse.fromJson(data)
); | 276 .then((data) => new DataTransfersListResponse.fromJson(data)); |
| 283 } | 277 } |
| 284 | |
| 285 } | 278 } |
| 286 | 279 |
| 280 /// The JSON template for an Application resource. |
| 281 class Application { |
| 282 /// Etag of the resource. |
| 283 core.String etag; |
| 287 | 284 |
| 285 /// The application's ID. |
| 286 core.String id; |
| 288 | 287 |
| 289 /** The JSON template for an Application resource. */ | 288 /// Identifies the resource as a DataTransfer Application Resource. |
| 290 class Application { | |
| 291 /** Etag of the resource. */ | |
| 292 core.String etag; | |
| 293 /** The application's ID. */ | |
| 294 core.String id; | |
| 295 /** Identifies the resource as a DataTransfer Application Resource. */ | |
| 296 core.String kind; | 289 core.String kind; |
| 297 /** The application's name. */ | 290 |
| 291 /// The application's name. |
| 298 core.String name; | 292 core.String name; |
| 299 /** | 293 |
| 300 * The list of all possible transfer parameters for this application. These | 294 /// The list of all possible transfer parameters for this application. These |
| 301 * parameters can be used to select the data of the user in this application | 295 /// parameters can be used to select the data of the user in this application |
| 302 * to be transfered. | 296 /// to be transfered. |
| 303 */ | |
| 304 core.List<ApplicationTransferParam> transferParams; | 297 core.List<ApplicationTransferParam> transferParams; |
| 305 | 298 |
| 306 Application(); | 299 Application(); |
| 307 | 300 |
| 308 Application.fromJson(core.Map _json) { | 301 Application.fromJson(core.Map _json) { |
| 309 if (_json.containsKey("etag")) { | 302 if (_json.containsKey("etag")) { |
| 310 etag = _json["etag"]; | 303 etag = _json["etag"]; |
| 311 } | 304 } |
| 312 if (_json.containsKey("id")) { | 305 if (_json.containsKey("id")) { |
| 313 id = _json["id"]; | 306 id = _json["id"]; |
| 314 } | 307 } |
| 315 if (_json.containsKey("kind")) { | 308 if (_json.containsKey("kind")) { |
| 316 kind = _json["kind"]; | 309 kind = _json["kind"]; |
| 317 } | 310 } |
| 318 if (_json.containsKey("name")) { | 311 if (_json.containsKey("name")) { |
| 319 name = _json["name"]; | 312 name = _json["name"]; |
| 320 } | 313 } |
| 321 if (_json.containsKey("transferParams")) { | 314 if (_json.containsKey("transferParams")) { |
| 322 transferParams = _json["transferParams"].map((value) => new ApplicationTra
nsferParam.fromJson(value)).toList(); | 315 transferParams = _json["transferParams"] |
| 316 .map((value) => new ApplicationTransferParam.fromJson(value)) |
| 317 .toList(); |
| 323 } | 318 } |
| 324 } | 319 } |
| 325 | 320 |
| 326 core.Map<core.String, core.Object> toJson() { | 321 core.Map<core.String, core.Object> toJson() { |
| 327 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 322 final core.Map<core.String, core.Object> _json = |
| 323 new core.Map<core.String, core.Object>(); |
| 328 if (etag != null) { | 324 if (etag != null) { |
| 329 _json["etag"] = etag; | 325 _json["etag"] = etag; |
| 330 } | 326 } |
| 331 if (id != null) { | 327 if (id != null) { |
| 332 _json["id"] = id; | 328 _json["id"] = id; |
| 333 } | 329 } |
| 334 if (kind != null) { | 330 if (kind != null) { |
| 335 _json["kind"] = kind; | 331 _json["kind"] = kind; |
| 336 } | 332 } |
| 337 if (name != null) { | 333 if (name != null) { |
| 338 _json["name"] = name; | 334 _json["name"] = name; |
| 339 } | 335 } |
| 340 if (transferParams != null) { | 336 if (transferParams != null) { |
| 341 _json["transferParams"] = transferParams.map((value) => (value).toJson()).
toList(); | 337 _json["transferParams"] = |
| 338 transferParams.map((value) => (value).toJson()).toList(); |
| 342 } | 339 } |
| 343 return _json; | 340 return _json; |
| 344 } | 341 } |
| 345 } | 342 } |
| 346 | 343 |
| 347 /** Template to map fields of ApplicationDataTransfer resource. */ | 344 /// Template to map fields of ApplicationDataTransfer resource. |
| 348 class ApplicationDataTransfer { | 345 class ApplicationDataTransfer { |
| 349 /** The application's ID. */ | 346 /// The application's ID. |
| 350 core.String applicationId; | 347 core.String applicationId; |
| 351 /** | 348 |
| 352 * The transfer parameters for the application. These parameters are used to | 349 /// The transfer parameters for the application. These parameters are used to |
| 353 * select the data which will get transfered in context of this application. | 350 /// select the data which will get transfered in context of this application. |
| 354 */ | |
| 355 core.List<ApplicationTransferParam> applicationTransferParams; | 351 core.List<ApplicationTransferParam> applicationTransferParams; |
| 356 /** Current status of transfer for this application. (Read-only) */ | 352 |
| 353 /// Current status of transfer for this application. (Read-only) |
| 357 core.String applicationTransferStatus; | 354 core.String applicationTransferStatus; |
| 358 | 355 |
| 359 ApplicationDataTransfer(); | 356 ApplicationDataTransfer(); |
| 360 | 357 |
| 361 ApplicationDataTransfer.fromJson(core.Map _json) { | 358 ApplicationDataTransfer.fromJson(core.Map _json) { |
| 362 if (_json.containsKey("applicationId")) { | 359 if (_json.containsKey("applicationId")) { |
| 363 applicationId = _json["applicationId"]; | 360 applicationId = _json["applicationId"]; |
| 364 } | 361 } |
| 365 if (_json.containsKey("applicationTransferParams")) { | 362 if (_json.containsKey("applicationTransferParams")) { |
| 366 applicationTransferParams = _json["applicationTransferParams"].map((value)
=> new ApplicationTransferParam.fromJson(value)).toList(); | 363 applicationTransferParams = _json["applicationTransferParams"] |
| 364 .map((value) => new ApplicationTransferParam.fromJson(value)) |
| 365 .toList(); |
| 367 } | 366 } |
| 368 if (_json.containsKey("applicationTransferStatus")) { | 367 if (_json.containsKey("applicationTransferStatus")) { |
| 369 applicationTransferStatus = _json["applicationTransferStatus"]; | 368 applicationTransferStatus = _json["applicationTransferStatus"]; |
| 370 } | 369 } |
| 371 } | 370 } |
| 372 | 371 |
| 373 core.Map<core.String, core.Object> toJson() { | 372 core.Map<core.String, core.Object> toJson() { |
| 374 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 373 final core.Map<core.String, core.Object> _json = |
| 374 new core.Map<core.String, core.Object>(); |
| 375 if (applicationId != null) { | 375 if (applicationId != null) { |
| 376 _json["applicationId"] = applicationId; | 376 _json["applicationId"] = applicationId; |
| 377 } | 377 } |
| 378 if (applicationTransferParams != null) { | 378 if (applicationTransferParams != null) { |
| 379 _json["applicationTransferParams"] = applicationTransferParams.map((value)
=> (value).toJson()).toList(); | 379 _json["applicationTransferParams"] = |
| 380 applicationTransferParams.map((value) => (value).toJson()).toList(); |
| 380 } | 381 } |
| 381 if (applicationTransferStatus != null) { | 382 if (applicationTransferStatus != null) { |
| 382 _json["applicationTransferStatus"] = applicationTransferStatus; | 383 _json["applicationTransferStatus"] = applicationTransferStatus; |
| 383 } | 384 } |
| 384 return _json; | 385 return _json; |
| 385 } | 386 } |
| 386 } | 387 } |
| 387 | 388 |
| 388 /** Template for application transfer parameters. */ | 389 /// Template for application transfer parameters. |
| 389 class ApplicationTransferParam { | 390 class ApplicationTransferParam { |
| 390 /** The type of the transfer parameter. eg: 'PRIVACY_LEVEL' */ | 391 /// The type of the transfer parameter. eg: 'PRIVACY_LEVEL' |
| 391 core.String key; | 392 core.String key; |
| 392 /** | 393 |
| 393 * The value of the coressponding transfer parameter. eg: 'PRIVATE' or | 394 /// The value of the coressponding transfer parameter. eg: 'PRIVATE' or |
| 394 * 'SHARED' | 395 /// 'SHARED' |
| 395 */ | |
| 396 core.List<core.String> value; | 396 core.List<core.String> value; |
| 397 | 397 |
| 398 ApplicationTransferParam(); | 398 ApplicationTransferParam(); |
| 399 | 399 |
| 400 ApplicationTransferParam.fromJson(core.Map _json) { | 400 ApplicationTransferParam.fromJson(core.Map _json) { |
| 401 if (_json.containsKey("key")) { | 401 if (_json.containsKey("key")) { |
| 402 key = _json["key"]; | 402 key = _json["key"]; |
| 403 } | 403 } |
| 404 if (_json.containsKey("value")) { | 404 if (_json.containsKey("value")) { |
| 405 value = _json["value"]; | 405 value = _json["value"]; |
| 406 } | 406 } |
| 407 } | 407 } |
| 408 | 408 |
| 409 core.Map<core.String, core.Object> toJson() { | 409 core.Map<core.String, core.Object> toJson() { |
| 410 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 410 final core.Map<core.String, core.Object> _json = |
| 411 new core.Map<core.String, core.Object>(); |
| 411 if (key != null) { | 412 if (key != null) { |
| 412 _json["key"] = key; | 413 _json["key"] = key; |
| 413 } | 414 } |
| 414 if (value != null) { | 415 if (value != null) { |
| 415 _json["value"] = value; | 416 _json["value"] = value; |
| 416 } | 417 } |
| 417 return _json; | 418 return _json; |
| 418 } | 419 } |
| 419 } | 420 } |
| 420 | 421 |
| 421 /** Template for a collection of Applications. */ | 422 /// Template for a collection of Applications. |
| 422 class ApplicationsListResponse { | 423 class ApplicationsListResponse { |
| 423 /** | 424 /// List of applications that support data transfer and are also installed |
| 424 * List of applications that support data transfer and are also installed for | 425 /// for the customer. |
| 425 * the customer. | |
| 426 */ | |
| 427 core.List<Application> applications; | 426 core.List<Application> applications; |
| 428 /** ETag of the resource. */ | 427 |
| 428 /// ETag of the resource. |
| 429 core.String etag; | 429 core.String etag; |
| 430 /** Identifies the resource as a collection of Applications. */ | 430 |
| 431 /// Identifies the resource as a collection of Applications. |
| 431 core.String kind; | 432 core.String kind; |
| 432 /** | 433 |
| 433 * Continuation token which will be used to specify next page in list API. | 434 /// Continuation token which will be used to specify next page in list API. |
| 434 */ | |
| 435 core.String nextPageToken; | 435 core.String nextPageToken; |
| 436 | 436 |
| 437 ApplicationsListResponse(); | 437 ApplicationsListResponse(); |
| 438 | 438 |
| 439 ApplicationsListResponse.fromJson(core.Map _json) { | 439 ApplicationsListResponse.fromJson(core.Map _json) { |
| 440 if (_json.containsKey("applications")) { | 440 if (_json.containsKey("applications")) { |
| 441 applications = _json["applications"].map((value) => new Application.fromJs
on(value)).toList(); | 441 applications = _json["applications"] |
| 442 .map((value) => new Application.fromJson(value)) |
| 443 .toList(); |
| 442 } | 444 } |
| 443 if (_json.containsKey("etag")) { | 445 if (_json.containsKey("etag")) { |
| 444 etag = _json["etag"]; | 446 etag = _json["etag"]; |
| 445 } | 447 } |
| 446 if (_json.containsKey("kind")) { | 448 if (_json.containsKey("kind")) { |
| 447 kind = _json["kind"]; | 449 kind = _json["kind"]; |
| 448 } | 450 } |
| 449 if (_json.containsKey("nextPageToken")) { | 451 if (_json.containsKey("nextPageToken")) { |
| 450 nextPageToken = _json["nextPageToken"]; | 452 nextPageToken = _json["nextPageToken"]; |
| 451 } | 453 } |
| 452 } | 454 } |
| 453 | 455 |
| 454 core.Map<core.String, core.Object> toJson() { | 456 core.Map<core.String, core.Object> toJson() { |
| 455 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 457 final core.Map<core.String, core.Object> _json = |
| 458 new core.Map<core.String, core.Object>(); |
| 456 if (applications != null) { | 459 if (applications != null) { |
| 457 _json["applications"] = applications.map((value) => (value).toJson()).toLi
st(); | 460 _json["applications"] = |
| 461 applications.map((value) => (value).toJson()).toList(); |
| 458 } | 462 } |
| 459 if (etag != null) { | 463 if (etag != null) { |
| 460 _json["etag"] = etag; | 464 _json["etag"] = etag; |
| 461 } | 465 } |
| 462 if (kind != null) { | 466 if (kind != null) { |
| 463 _json["kind"] = kind; | 467 _json["kind"] = kind; |
| 464 } | 468 } |
| 465 if (nextPageToken != null) { | 469 if (nextPageToken != null) { |
| 466 _json["nextPageToken"] = nextPageToken; | 470 _json["nextPageToken"] = nextPageToken; |
| 467 } | 471 } |
| 468 return _json; | 472 return _json; |
| 469 } | 473 } |
| 470 } | 474 } |
| 471 | 475 |
| 472 /** The JSON template for a DataTransfer resource. */ | 476 /// The JSON template for a DataTransfer resource. |
| 473 class DataTransfer { | 477 class DataTransfer { |
| 474 /** | 478 /// List of per application data transfer resources. It contains data |
| 475 * List of per application data transfer resources. It contains data transfer | 479 /// transfer details of the applications associated with this transfer |
| 476 * details of the applications associated with this transfer resource. Note | 480 /// resource. Note that this list is also used to specify the applications |
| 477 * that this list is also used to specify the applications for which data | 481 /// for which data transfer has to be done at the time of the transfer |
| 478 * transfer has to be done at the time of the transfer resource creation. | 482 /// resource creation. |
| 479 */ | |
| 480 core.List<ApplicationDataTransfer> applicationDataTransfers; | 483 core.List<ApplicationDataTransfer> applicationDataTransfers; |
| 481 /** ETag of the resource. */ | 484 |
| 485 /// ETag of the resource. |
| 482 core.String etag; | 486 core.String etag; |
| 483 /** The transfer's ID (Read-only). */ | 487 |
| 488 /// The transfer's ID (Read-only). |
| 484 core.String id; | 489 core.String id; |
| 485 /** Identifies the resource as a DataTransfer request. */ | 490 |
| 491 /// Identifies the resource as a DataTransfer request. |
| 486 core.String kind; | 492 core.String kind; |
| 487 /** ID of the user to whom the data is being transfered. */ | 493 |
| 494 /// ID of the user to whom the data is being transfered. |
| 488 core.String newOwnerUserId; | 495 core.String newOwnerUserId; |
| 489 /** ID of the user whose data is being transfered. */ | 496 |
| 497 /// ID of the user whose data is being transfered. |
| 490 core.String oldOwnerUserId; | 498 core.String oldOwnerUserId; |
| 491 /** Overall transfer status (Read-only). */ | 499 |
| 500 /// Overall transfer status (Read-only). |
| 492 core.String overallTransferStatusCode; | 501 core.String overallTransferStatusCode; |
| 493 /** The time at which the data transfer was requested (Read-only). */ | 502 |
| 503 /// The time at which the data transfer was requested (Read-only). |
| 494 core.DateTime requestTime; | 504 core.DateTime requestTime; |
| 495 | 505 |
| 496 DataTransfer(); | 506 DataTransfer(); |
| 497 | 507 |
| 498 DataTransfer.fromJson(core.Map _json) { | 508 DataTransfer.fromJson(core.Map _json) { |
| 499 if (_json.containsKey("applicationDataTransfers")) { | 509 if (_json.containsKey("applicationDataTransfers")) { |
| 500 applicationDataTransfers = _json["applicationDataTransfers"].map((value) =
> new ApplicationDataTransfer.fromJson(value)).toList(); | 510 applicationDataTransfers = _json["applicationDataTransfers"] |
| 511 .map((value) => new ApplicationDataTransfer.fromJson(value)) |
| 512 .toList(); |
| 501 } | 513 } |
| 502 if (_json.containsKey("etag")) { | 514 if (_json.containsKey("etag")) { |
| 503 etag = _json["etag"]; | 515 etag = _json["etag"]; |
| 504 } | 516 } |
| 505 if (_json.containsKey("id")) { | 517 if (_json.containsKey("id")) { |
| 506 id = _json["id"]; | 518 id = _json["id"]; |
| 507 } | 519 } |
| 508 if (_json.containsKey("kind")) { | 520 if (_json.containsKey("kind")) { |
| 509 kind = _json["kind"]; | 521 kind = _json["kind"]; |
| 510 } | 522 } |
| 511 if (_json.containsKey("newOwnerUserId")) { | 523 if (_json.containsKey("newOwnerUserId")) { |
| 512 newOwnerUserId = _json["newOwnerUserId"]; | 524 newOwnerUserId = _json["newOwnerUserId"]; |
| 513 } | 525 } |
| 514 if (_json.containsKey("oldOwnerUserId")) { | 526 if (_json.containsKey("oldOwnerUserId")) { |
| 515 oldOwnerUserId = _json["oldOwnerUserId"]; | 527 oldOwnerUserId = _json["oldOwnerUserId"]; |
| 516 } | 528 } |
| 517 if (_json.containsKey("overallTransferStatusCode")) { | 529 if (_json.containsKey("overallTransferStatusCode")) { |
| 518 overallTransferStatusCode = _json["overallTransferStatusCode"]; | 530 overallTransferStatusCode = _json["overallTransferStatusCode"]; |
| 519 } | 531 } |
| 520 if (_json.containsKey("requestTime")) { | 532 if (_json.containsKey("requestTime")) { |
| 521 requestTime = core.DateTime.parse(_json["requestTime"]); | 533 requestTime = core.DateTime.parse(_json["requestTime"]); |
| 522 } | 534 } |
| 523 } | 535 } |
| 524 | 536 |
| 525 core.Map<core.String, core.Object> toJson() { | 537 core.Map<core.String, core.Object> toJson() { |
| 526 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 538 final core.Map<core.String, core.Object> _json = |
| 539 new core.Map<core.String, core.Object>(); |
| 527 if (applicationDataTransfers != null) { | 540 if (applicationDataTransfers != null) { |
| 528 _json["applicationDataTransfers"] = applicationDataTransfers.map((value) =
> (value).toJson()).toList(); | 541 _json["applicationDataTransfers"] = |
| 542 applicationDataTransfers.map((value) => (value).toJson()).toList(); |
| 529 } | 543 } |
| 530 if (etag != null) { | 544 if (etag != null) { |
| 531 _json["etag"] = etag; | 545 _json["etag"] = etag; |
| 532 } | 546 } |
| 533 if (id != null) { | 547 if (id != null) { |
| 534 _json["id"] = id; | 548 _json["id"] = id; |
| 535 } | 549 } |
| 536 if (kind != null) { | 550 if (kind != null) { |
| 537 _json["kind"] = kind; | 551 _json["kind"] = kind; |
| 538 } | 552 } |
| 539 if (newOwnerUserId != null) { | 553 if (newOwnerUserId != null) { |
| 540 _json["newOwnerUserId"] = newOwnerUserId; | 554 _json["newOwnerUserId"] = newOwnerUserId; |
| 541 } | 555 } |
| 542 if (oldOwnerUserId != null) { | 556 if (oldOwnerUserId != null) { |
| 543 _json["oldOwnerUserId"] = oldOwnerUserId; | 557 _json["oldOwnerUserId"] = oldOwnerUserId; |
| 544 } | 558 } |
| 545 if (overallTransferStatusCode != null) { | 559 if (overallTransferStatusCode != null) { |
| 546 _json["overallTransferStatusCode"] = overallTransferStatusCode; | 560 _json["overallTransferStatusCode"] = overallTransferStatusCode; |
| 547 } | 561 } |
| 548 if (requestTime != null) { | 562 if (requestTime != null) { |
| 549 _json["requestTime"] = (requestTime).toIso8601String(); | 563 _json["requestTime"] = (requestTime).toIso8601String(); |
| 550 } | 564 } |
| 551 return _json; | 565 return _json; |
| 552 } | 566 } |
| 553 } | 567 } |
| 554 | 568 |
| 555 /** Template for a collection of DataTransfer resources. */ | 569 /// Template for a collection of DataTransfer resources. |
| 556 class DataTransfersListResponse { | 570 class DataTransfersListResponse { |
| 557 /** List of data transfer requests. */ | 571 /// List of data transfer requests. |
| 558 core.List<DataTransfer> dataTransfers; | 572 core.List<DataTransfer> dataTransfers; |
| 559 /** ETag of the resource. */ | 573 |
| 574 /// ETag of the resource. |
| 560 core.String etag; | 575 core.String etag; |
| 561 /** Identifies the resource as a collection of data transfer requests. */ | 576 |
| 577 /// Identifies the resource as a collection of data transfer requests. |
| 562 core.String kind; | 578 core.String kind; |
| 563 /** | 579 |
| 564 * Continuation token which will be used to specify next page in list API. | 580 /// Continuation token which will be used to specify next page in list API. |
| 565 */ | |
| 566 core.String nextPageToken; | 581 core.String nextPageToken; |
| 567 | 582 |
| 568 DataTransfersListResponse(); | 583 DataTransfersListResponse(); |
| 569 | 584 |
| 570 DataTransfersListResponse.fromJson(core.Map _json) { | 585 DataTransfersListResponse.fromJson(core.Map _json) { |
| 571 if (_json.containsKey("dataTransfers")) { | 586 if (_json.containsKey("dataTransfers")) { |
| 572 dataTransfers = _json["dataTransfers"].map((value) => new DataTransfer.fro
mJson(value)).toList(); | 587 dataTransfers = _json["dataTransfers"] |
| 588 .map((value) => new DataTransfer.fromJson(value)) |
| 589 .toList(); |
| 573 } | 590 } |
| 574 if (_json.containsKey("etag")) { | 591 if (_json.containsKey("etag")) { |
| 575 etag = _json["etag"]; | 592 etag = _json["etag"]; |
| 576 } | 593 } |
| 577 if (_json.containsKey("kind")) { | 594 if (_json.containsKey("kind")) { |
| 578 kind = _json["kind"]; | 595 kind = _json["kind"]; |
| 579 } | 596 } |
| 580 if (_json.containsKey("nextPageToken")) { | 597 if (_json.containsKey("nextPageToken")) { |
| 581 nextPageToken = _json["nextPageToken"]; | 598 nextPageToken = _json["nextPageToken"]; |
| 582 } | 599 } |
| 583 } | 600 } |
| 584 | 601 |
| 585 core.Map<core.String, core.Object> toJson() { | 602 core.Map<core.String, core.Object> toJson() { |
| 586 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 603 final core.Map<core.String, core.Object> _json = |
| 604 new core.Map<core.String, core.Object>(); |
| 587 if (dataTransfers != null) { | 605 if (dataTransfers != null) { |
| 588 _json["dataTransfers"] = dataTransfers.map((value) => (value).toJson()).to
List(); | 606 _json["dataTransfers"] = |
| 607 dataTransfers.map((value) => (value).toJson()).toList(); |
| 589 } | 608 } |
| 590 if (etag != null) { | 609 if (etag != null) { |
| 591 _json["etag"] = etag; | 610 _json["etag"] = etag; |
| 592 } | 611 } |
| 593 if (kind != null) { | 612 if (kind != null) { |
| 594 _json["kind"] = kind; | 613 _json["kind"] = kind; |
| 595 } | 614 } |
| 596 if (nextPageToken != null) { | 615 if (nextPageToken != null) { |
| 597 _json["nextPageToken"] = nextPageToken; | 616 _json["nextPageToken"] = nextPageToken; |
| 598 } | 617 } |
| 599 return _json; | 618 return _json; |
| 600 } | 619 } |
| 601 } | 620 } |
| OLD | NEW |