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