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 Storagetransfer (v1).
24 *
25 * <p>
26 * Transfers data from external data sources to a Google Cloud Storage bucket or
27 * between Google Cloud Storage buckets.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/storage-transfer/docs" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Storagetransfer extends \Google\Service
37{
38  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
39  const CLOUD_PLATFORM =
40      "https://www.googleapis.com/auth/cloud-platform";
41
42  public $googleServiceAccounts;
43  public $projects_agentPools;
44  public $transferJobs;
45  public $transferOperations;
46
47  /**
48   * Constructs the internal representation of the Storagetransfer service.
49   *
50   * @param Client|array $clientOrConfig The client used to deliver requests, or a
51   *                                     config array to pass to a new Client instance.
52   * @param string $rootUrl The root URL used for requests to the service.
53   */
54  public function __construct($clientOrConfig = [], $rootUrl = null)
55  {
56    parent::__construct($clientOrConfig);
57    $this->rootUrl = $rootUrl ?: 'https://storagetransfer.googleapis.com/';
58    $this->servicePath = '';
59    $this->batchPath = 'batch';
60    $this->version = 'v1';
61    $this->serviceName = 'storagetransfer';
62
63    $this->googleServiceAccounts = new Storagetransfer\Resource\GoogleServiceAccounts(
64        $this,
65        $this->serviceName,
66        'googleServiceAccounts',
67        [
68          'methods' => [
69            'get' => [
70              'path' => 'v1/googleServiceAccounts/{projectId}',
71              'httpMethod' => 'GET',
72              'parameters' => [
73                'projectId' => [
74                  'location' => 'path',
75                  'type' => 'string',
76                  'required' => true,
77                ],
78              ],
79            ],
80          ]
81        ]
82    );
83    $this->projects_agentPools = new Storagetransfer\Resource\ProjectsAgentPools(
84        $this,
85        $this->serviceName,
86        'agentPools',
87        [
88          'methods' => [
89            'create' => [
90              'path' => 'v1/projects/{+projectId}/agentPools',
91              'httpMethod' => 'POST',
92              'parameters' => [
93                'projectId' => [
94                  'location' => 'path',
95                  'type' => 'string',
96                  'required' => true,
97                ],
98                'agentPoolId' => [
99                  'location' => 'query',
100                  'type' => 'string',
101                ],
102              ],
103            ],'delete' => [
104              'path' => 'v1/{+name}',
105              'httpMethod' => 'DELETE',
106              'parameters' => [
107                'name' => [
108                  'location' => 'path',
109                  'type' => 'string',
110                  'required' => true,
111                ],
112              ],
113            ],'get' => [
114              'path' => 'v1/{+name}',
115              'httpMethod' => 'GET',
116              'parameters' => [
117                'name' => [
118                  'location' => 'path',
119                  'type' => 'string',
120                  'required' => true,
121                ],
122              ],
123            ],'list' => [
124              'path' => 'v1/projects/{+projectId}/agentPools',
125              'httpMethod' => 'GET',
126              'parameters' => [
127                'projectId' => [
128                  'location' => 'path',
129                  'type' => 'string',
130                  'required' => true,
131                ],
132                'filter' => [
133                  'location' => 'query',
134                  'type' => 'string',
135                ],
136                'pageSize' => [
137                  'location' => 'query',
138                  'type' => 'integer',
139                ],
140                'pageToken' => [
141                  'location' => 'query',
142                  'type' => 'string',
143                ],
144              ],
145            ],'patch' => [
146              'path' => 'v1/{+name}',
147              'httpMethod' => 'PATCH',
148              'parameters' => [
149                'name' => [
150                  'location' => 'path',
151                  'type' => 'string',
152                  'required' => true,
153                ],
154                'updateMask' => [
155                  'location' => 'query',
156                  'type' => 'string',
157                ],
158              ],
159            ],
160          ]
161        ]
162    );
163    $this->transferJobs = new Storagetransfer\Resource\TransferJobs(
164        $this,
165        $this->serviceName,
166        'transferJobs',
167        [
168          'methods' => [
169            'create' => [
170              'path' => 'v1/transferJobs',
171              'httpMethod' => 'POST',
172              'parameters' => [],
173            ],'get' => [
174              'path' => 'v1/{+jobName}',
175              'httpMethod' => 'GET',
176              'parameters' => [
177                'jobName' => [
178                  'location' => 'path',
179                  'type' => 'string',
180                  'required' => true,
181                ],
182                'projectId' => [
183                  'location' => 'query',
184                  'type' => 'string',
185                  'required' => true,
186                ],
187              ],
188            ],'list' => [
189              'path' => 'v1/transferJobs',
190              'httpMethod' => 'GET',
191              'parameters' => [
192                'filter' => [
193                  'location' => 'query',
194                  'type' => 'string',
195                  'required' => true,
196                ],
197                'pageSize' => [
198                  'location' => 'query',
199                  'type' => 'integer',
200                ],
201                'pageToken' => [
202                  'location' => 'query',
203                  'type' => 'string',
204                ],
205              ],
206            ],'patch' => [
207              'path' => 'v1/{+jobName}',
208              'httpMethod' => 'PATCH',
209              'parameters' => [
210                'jobName' => [
211                  'location' => 'path',
212                  'type' => 'string',
213                  'required' => true,
214                ],
215              ],
216            ],'run' => [
217              'path' => 'v1/{+jobName}:run',
218              'httpMethod' => 'POST',
219              'parameters' => [
220                'jobName' => [
221                  'location' => 'path',
222                  'type' => 'string',
223                  'required' => true,
224                ],
225              ],
226            ],
227          ]
228        ]
229    );
230    $this->transferOperations = new Storagetransfer\Resource\TransferOperations(
231        $this,
232        $this->serviceName,
233        'transferOperations',
234        [
235          'methods' => [
236            'cancel' => [
237              'path' => 'v1/{+name}:cancel',
238              'httpMethod' => 'POST',
239              'parameters' => [
240                'name' => [
241                  'location' => 'path',
242                  'type' => 'string',
243                  'required' => true,
244                ],
245              ],
246            ],'get' => [
247              'path' => 'v1/{+name}',
248              'httpMethod' => 'GET',
249              'parameters' => [
250                'name' => [
251                  'location' => 'path',
252                  'type' => 'string',
253                  'required' => true,
254                ],
255              ],
256            ],'list' => [
257              'path' => 'v1/{+name}',
258              'httpMethod' => 'GET',
259              'parameters' => [
260                'name' => [
261                  'location' => 'path',
262                  'type' => 'string',
263                  'required' => true,
264                ],
265                'filter' => [
266                  'location' => 'query',
267                  'type' => 'string',
268                  'required' => true,
269                ],
270                'pageSize' => [
271                  'location' => 'query',
272                  'type' => 'integer',
273                ],
274                'pageToken' => [
275                  'location' => 'query',
276                  'type' => 'string',
277                ],
278              ],
279            ],'pause' => [
280              'path' => 'v1/{+name}:pause',
281              'httpMethod' => 'POST',
282              'parameters' => [
283                'name' => [
284                  'location' => 'path',
285                  'type' => 'string',
286                  'required' => true,
287                ],
288              ],
289            ],'resume' => [
290              'path' => 'v1/{+name}:resume',
291              'httpMethod' => 'POST',
292              'parameters' => [
293                'name' => [
294                  'location' => 'path',
295                  'type' => 'string',
296                  'required' => true,
297                ],
298              ],
299            ],
300          ]
301        ]
302    );
303  }
304}
305
306// Adding a class alias for backwards compatibility with the previous class name.
307class_alias(Storagetransfer::class, 'Google_Service_Storagetransfer');
308