1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18namespace Google\Service; 19 20use Google\Client; 21 22/** 23 * Service definition for DataTransfer (datatransfer_v1). 24 * 25 * <p> 26 * Admin SDK lets administrators of enterprise domains to view and manage 27 * resources like user, groups etc. It also provides audit and usage reports of 28 * domain.</p> 29 * 30 * <p> 31 * For more information about this service, see the API 32 * <a href="https://developers.google.com/admin-sdk/" target="_blank">Documentation</a> 33 * </p> 34 * 35 * @author Google, Inc. 36 */ 37class DataTransfer extends \Google\Service 38{ 39 /** View and manage data transfers between users in your organization. */ 40 const ADMIN_DATATRANSFER = 41 "https://www.googleapis.com/auth/admin.datatransfer"; 42 /** View data transfers between users in your organization. */ 43 const ADMIN_DATATRANSFER_READONLY = 44 "https://www.googleapis.com/auth/admin.datatransfer.readonly"; 45 46 public $applications; 47 public $transfers; 48 49 /** 50 * Constructs the internal representation of the DataTransfer service. 51 * 52 * @param Client|array $clientOrConfig The client used to deliver requests, or a 53 * config array to pass to a new Client instance. 54 * @param string $rootUrl The root URL used for requests to the service. 55 */ 56 public function __construct($clientOrConfig = [], $rootUrl = null) 57 { 58 parent::__construct($clientOrConfig); 59 $this->rootUrl = $rootUrl ?: 'https://admin.googleapis.com/'; 60 $this->servicePath = ''; 61 $this->batchPath = 'batch'; 62 $this->version = 'datatransfer_v1'; 63 $this->serviceName = 'admin'; 64 65 $this->applications = new DataTransfer\Resource\Applications( 66 $this, 67 $this->serviceName, 68 'applications', 69 [ 70 'methods' => [ 71 'get' => [ 72 'path' => 'admin/datatransfer/v1/applications/{applicationId}', 73 'httpMethod' => 'GET', 74 'parameters' => [ 75 'applicationId' => [ 76 'location' => 'path', 77 'type' => 'string', 78 'required' => true, 79 ], 80 ], 81 ],'list' => [ 82 'path' => 'admin/datatransfer/v1/applications', 83 'httpMethod' => 'GET', 84 'parameters' => [ 85 'customerId' => [ 86 'location' => 'query', 87 'type' => 'string', 88 ], 89 'maxResults' => [ 90 'location' => 'query', 91 'type' => 'integer', 92 ], 93 'pageToken' => [ 94 'location' => 'query', 95 'type' => 'string', 96 ], 97 ], 98 ], 99 ] 100 ] 101 ); 102 $this->transfers = new DataTransfer\Resource\Transfers( 103 $this, 104 $this->serviceName, 105 'transfers', 106 [ 107 'methods' => [ 108 'get' => [ 109 'path' => 'admin/datatransfer/v1/transfers/{dataTransferId}', 110 'httpMethod' => 'GET', 111 'parameters' => [ 112 'dataTransferId' => [ 113 'location' => 'path', 114 'type' => 'string', 115 'required' => true, 116 ], 117 ], 118 ],'insert' => [ 119 'path' => 'admin/datatransfer/v1/transfers', 120 'httpMethod' => 'POST', 121 'parameters' => [], 122 ],'list' => [ 123 'path' => 'admin/datatransfer/v1/transfers', 124 'httpMethod' => 'GET', 125 'parameters' => [ 126 'customerId' => [ 127 'location' => 'query', 128 'type' => 'string', 129 ], 130 'maxResults' => [ 131 'location' => 'query', 132 'type' => 'integer', 133 ], 134 'newOwnerUserId' => [ 135 'location' => 'query', 136 'type' => 'string', 137 ], 138 'oldOwnerUserId' => [ 139 'location' => 'query', 140 'type' => 'string', 141 ], 142 'pageToken' => [ 143 'location' => 'query', 144 'type' => 'string', 145 ], 146 'status' => [ 147 'location' => 'query', 148 'type' => 'string', 149 ], 150 ], 151 ], 152 ] 153 ] 154 ); 155 } 156} 157 158// Adding a class alias for backwards compatibility with the previous class name. 159class_alias(DataTransfer::class, 'Google_Service_DataTransfer'); 160