DataTransfer.php
14.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
<?php
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* Service definition for DataTransfer (datatransfer_v1).
*
* <p>
* Admin Data Transfer API lets you transfer user data from one user to another.</p>
*
* <p>
* For more information about this service, see the API
* <a href="https://developers.google.com/admin-sdk/data-transfer/" target="_blank">Documentation</a>
* </p>
*
* @author Google, Inc.
*/
class Google_Service_DataTransfer extends Google_Service
{
/** View and manage data transfers between users in your organization. */
const ADMIN_DATATRANSFER =
"https://www.googleapis.com/auth/admin.datatransfer";
/** View data transfers between users in your organization. */
const ADMIN_DATATRANSFER_READONLY =
"https://www.googleapis.com/auth/admin.datatransfer.readonly";
public $applications;
public $transfers;
/**
* Constructs the internal representation of the DataTransfer service.
*
* @param Google_Client $client
*/
public function __construct(Google_Client $client)
{
parent::__construct($client);
$this->rootUrl = 'https://www.googleapis.com/';
$this->servicePath = 'admin/datatransfer/v1/';
$this->version = 'datatransfer_v1';
$this->serviceName = 'admin';
$this->applications = new Google_Service_DataTransfer_Applications_Resource(
$this,
$this->serviceName,
'applications',
array(
'methods' => array(
'get' => array(
'path' => 'applications/{applicationId}',
'httpMethod' => 'GET',
'parameters' => array(
'applicationId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'list' => array(
'path' => 'applications',
'httpMethod' => 'GET',
'parameters' => array(
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'customerId' => array(
'location' => 'query',
'type' => 'string',
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
),
),
)
)
);
$this->transfers = new Google_Service_DataTransfer_Transfers_Resource(
$this,
$this->serviceName,
'transfers',
array(
'methods' => array(
'get' => array(
'path' => 'transfers/{dataTransferId}',
'httpMethod' => 'GET',
'parameters' => array(
'dataTransferId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'insert' => array(
'path' => 'transfers',
'httpMethod' => 'POST',
'parameters' => array(),
),'list' => array(
'path' => 'transfers',
'httpMethod' => 'GET',
'parameters' => array(
'status' => array(
'location' => 'query',
'type' => 'string',
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
'newOwnerUserId' => array(
'location' => 'query',
'type' => 'string',
),
'oldOwnerUserId' => array(
'location' => 'query',
'type' => 'string',
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'customerId' => array(
'location' => 'query',
'type' => 'string',
),
),
),
)
)
);
}
}
/**
* The "applications" collection of methods.
* Typical usage is:
* <code>
* $adminService = new Google_Service_DataTransfer(...);
* $applications = $adminService->applications;
* </code>
*/
class Google_Service_DataTransfer_Applications_Resource extends Google_Service_Resource
{
/**
* Retrieves information about an application for the given application ID.
* (applications.get)
*
* @param string $applicationId ID of the application resource to be retrieved.
* @param array $optParams Optional parameters.
* @return Google_Service_DataTransfer_Application
*/
public function get($applicationId, $optParams = array())
{
$params = array('applicationId' => $applicationId);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Google_Service_DataTransfer_Application");
}
/**
* Lists the applications available for data transfer for a customer.
* (applications.listApplications)
*
* @param array $optParams Optional parameters.
*
* @opt_param string pageToken Token to specify next page in the list.
* @opt_param string customerId Immutable ID of the Google Apps account.
* @opt_param string maxResults Maximum number of results to return. Default is
* 100.
* @return Google_Service_DataTransfer_ApplicationsListResponse
*/
public function listApplications($optParams = array())
{
$params = array();
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Google_Service_DataTransfer_ApplicationsListResponse");
}
}
/**
* The "transfers" collection of methods.
* Typical usage is:
* <code>
* $adminService = new Google_Service_DataTransfer(...);
* $transfers = $adminService->transfers;
* </code>
*/
class Google_Service_DataTransfer_Transfers_Resource extends Google_Service_Resource
{
/**
* Retrieves a data transfer request by its resource ID. (transfers.get)
*
* @param string $dataTransferId ID of the resource to be retrieved. This is
* returned in the response from the insert method.
* @param array $optParams Optional parameters.
* @return Google_Service_DataTransfer_DataTransfer
*/
public function get($dataTransferId, $optParams = array())
{
$params = array('dataTransferId' => $dataTransferId);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Google_Service_DataTransfer_DataTransfer");
}
/**
* Inserts a data transfer request. (transfers.insert)
*
* @param Google_DataTransfer $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_DataTransfer_DataTransfer
*/
public function insert(Google_Service_DataTransfer_DataTransfer $postBody, $optParams = array())
{
$params = array('postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('insert', array($params), "Google_Service_DataTransfer_DataTransfer");
}
/**
* Lists the transfers for a customer by source user, destination user, or
* status. (transfers.listTransfers)
*
* @param array $optParams Optional parameters.
*
* @opt_param string status Status of the transfer.
* @opt_param int maxResults Maximum number of results to return. Default is
* 100.
* @opt_param string newOwnerUserId Destination user's profile ID.
* @opt_param string oldOwnerUserId Source user's profile ID.
* @opt_param string pageToken Token to specify the next page in the list.
* @opt_param string customerId Immutable ID of the Google Apps account.
* @return Google_Service_DataTransfer_DataTransfersListResponse
*/
public function listTransfers($optParams = array())
{
$params = array();
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Google_Service_DataTransfer_DataTransfersListResponse");
}
}
class Google_Service_DataTransfer_Application extends Google_Collection
{
protected $collection_key = 'transferParams';
protected $internal_gapi_mappings = array(
);
public $etag;
public $id;
public $kind;
public $name;
protected $transferParamsType = 'Google_Service_DataTransfer_ApplicationTransferParam';
protected $transferParamsDataType = 'array';
public function setEtag($etag)
{
$this->etag = $etag;
}
public function getEtag()
{
return $this->etag;
}
public function setId($id)
{
$this->id = $id;
}
public function getId()
{
return $this->id;
}
public function setKind($kind)
{
$this->kind = $kind;
}
public function getKind()
{
return $this->kind;
}
public function setName($name)
{
$this->name = $name;
}
public function getName()
{
return $this->name;
}
public function setTransferParams($transferParams)
{
$this->transferParams = $transferParams;
}
public function getTransferParams()
{
return $this->transferParams;
}
}
class Google_Service_DataTransfer_ApplicationDataTransfer extends Google_Collection
{
protected $collection_key = 'applicationTransferParams';
protected $internal_gapi_mappings = array(
);
public $applicationId;
protected $applicationTransferParamsType = 'Google_Service_DataTransfer_ApplicationTransferParam';
protected $applicationTransferParamsDataType = 'array';
public $applicationTransferStatus;
public function setApplicationId($applicationId)
{
$this->applicationId = $applicationId;
}
public function getApplicationId()
{
return $this->applicationId;
}
public function setApplicationTransferParams($applicationTransferParams)
{
$this->applicationTransferParams = $applicationTransferParams;
}
public function getApplicationTransferParams()
{
return $this->applicationTransferParams;
}
public function setApplicationTransferStatus($applicationTransferStatus)
{
$this->applicationTransferStatus = $applicationTransferStatus;
}
public function getApplicationTransferStatus()
{
return $this->applicationTransferStatus;
}
}
class Google_Service_DataTransfer_ApplicationTransferParam extends Google_Collection
{
protected $collection_key = 'value';
protected $internal_gapi_mappings = array(
);
public $key;
public $value;
public function setKey($key)
{
$this->key = $key;
}
public function getKey()
{
return $this->key;
}
public function setValue($value)
{
$this->value = $value;
}
public function getValue()
{
return $this->value;
}
}
class Google_Service_DataTransfer_ApplicationsListResponse extends Google_Collection
{
protected $collection_key = 'applications';
protected $internal_gapi_mappings = array(
);
protected $applicationsType = 'Google_Service_DataTransfer_Application';
protected $applicationsDataType = 'array';
public $etag;
public $kind;
public $nextPageToken;
public function setApplications($applications)
{
$this->applications = $applications;
}
public function getApplications()
{
return $this->applications;
}
public function setEtag($etag)
{
$this->etag = $etag;
}
public function getEtag()
{
return $this->etag;
}
public function setKind($kind)
{
$this->kind = $kind;
}
public function getKind()
{
return $this->kind;
}
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
class Google_Service_DataTransfer_DataTransfer extends Google_Collection
{
protected $collection_key = 'applicationDataTransfers';
protected $internal_gapi_mappings = array(
);
protected $applicationDataTransfersType = 'Google_Service_DataTransfer_ApplicationDataTransfer';
protected $applicationDataTransfersDataType = 'array';
public $etag;
public $id;
public $kind;
public $newOwnerUserId;
public $oldOwnerUserId;
public $overallTransferStatusCode;
public $requestTime;
public function setApplicationDataTransfers($applicationDataTransfers)
{
$this->applicationDataTransfers = $applicationDataTransfers;
}
public function getApplicationDataTransfers()
{
return $this->applicationDataTransfers;
}
public function setEtag($etag)
{
$this->etag = $etag;
}
public function getEtag()
{
return $this->etag;
}
public function setId($id)
{
$this->id = $id;
}
public function getId()
{
return $this->id;
}
public function setKind($kind)
{
$this->kind = $kind;
}
public function getKind()
{
return $this->kind;
}
public function setNewOwnerUserId($newOwnerUserId)
{
$this->newOwnerUserId = $newOwnerUserId;
}
public function getNewOwnerUserId()
{
return $this->newOwnerUserId;
}
public function setOldOwnerUserId($oldOwnerUserId)
{
$this->oldOwnerUserId = $oldOwnerUserId;
}
public function getOldOwnerUserId()
{
return $this->oldOwnerUserId;
}
public function setOverallTransferStatusCode($overallTransferStatusCode)
{
$this->overallTransferStatusCode = $overallTransferStatusCode;
}
public function getOverallTransferStatusCode()
{
return $this->overallTransferStatusCode;
}
public function setRequestTime($requestTime)
{
$this->requestTime = $requestTime;
}
public function getRequestTime()
{
return $this->requestTime;
}
}
class Google_Service_DataTransfer_DataTransfersListResponse extends Google_Collection
{
protected $collection_key = 'dataTransfers';
protected $internal_gapi_mappings = array(
);
protected $dataTransfersType = 'Google_Service_DataTransfer_DataTransfer';
protected $dataTransfersDataType = 'array';
public $etag;
public $kind;
public $nextPageToken;
public function setDataTransfers($dataTransfers)
{
$this->dataTransfers = $dataTransfers;
}
public function getDataTransfers()
{
return $this->dataTransfers;
}
public function setEtag($etag)
{
$this->etag = $etag;
}
public function getEtag()
{
return $this->etag;
}
public function setKind($kind)
{
$this->kind = $kind;
}
public function getKind()
{
return $this->kind;
}
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
public function getNextPageToken()
{
return $this->nextPageToken;
}
}