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 CloudFilestore (v1).
24 *
25 * <p>
26 * The Cloud Filestore API is used for creating and managing cloud file servers.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/filestore/" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class CloudFilestore extends \Google\Service
36{
37  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
38  const CLOUD_PLATFORM =
39      "https://www.googleapis.com/auth/cloud-platform";
40
41  public $projects_locations;
42  public $projects_locations_backups;
43  public $projects_locations_instances;
44  public $projects_locations_instances_snapshots;
45  public $projects_locations_operations;
46
47  /**
48   * Constructs the internal representation of the CloudFilestore 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://file.googleapis.com/';
58    $this->servicePath = '';
59    $this->batchPath = 'batch';
60    $this->version = 'v1';
61    $this->serviceName = 'file';
62
63    $this->projects_locations = new CloudFilestore\Resource\ProjectsLocations(
64        $this,
65        $this->serviceName,
66        'locations',
67        [
68          'methods' => [
69            'get' => [
70              'path' => 'v1/{+name}',
71              'httpMethod' => 'GET',
72              'parameters' => [
73                'name' => [
74                  'location' => 'path',
75                  'type' => 'string',
76                  'required' => true,
77                ],
78              ],
79            ],'list' => [
80              'path' => 'v1/{+name}/locations',
81              'httpMethod' => 'GET',
82              'parameters' => [
83                'name' => [
84                  'location' => 'path',
85                  'type' => 'string',
86                  'required' => true,
87                ],
88                'filter' => [
89                  'location' => 'query',
90                  'type' => 'string',
91                ],
92                'includeUnrevealedLocations' => [
93                  'location' => 'query',
94                  'type' => 'boolean',
95                ],
96                'pageSize' => [
97                  'location' => 'query',
98                  'type' => 'integer',
99                ],
100                'pageToken' => [
101                  'location' => 'query',
102                  'type' => 'string',
103                ],
104              ],
105            ],
106          ]
107        ]
108    );
109    $this->projects_locations_backups = new CloudFilestore\Resource\ProjectsLocationsBackups(
110        $this,
111        $this->serviceName,
112        'backups',
113        [
114          'methods' => [
115            'create' => [
116              'path' => 'v1/{+parent}/backups',
117              'httpMethod' => 'POST',
118              'parameters' => [
119                'parent' => [
120                  'location' => 'path',
121                  'type' => 'string',
122                  'required' => true,
123                ],
124                'backupId' => [
125                  'location' => 'query',
126                  'type' => 'string',
127                ],
128              ],
129            ],'delete' => [
130              'path' => 'v1/{+name}',
131              'httpMethod' => 'DELETE',
132              'parameters' => [
133                'name' => [
134                  'location' => 'path',
135                  'type' => 'string',
136                  'required' => true,
137                ],
138              ],
139            ],'get' => [
140              'path' => 'v1/{+name}',
141              'httpMethod' => 'GET',
142              'parameters' => [
143                'name' => [
144                  'location' => 'path',
145                  'type' => 'string',
146                  'required' => true,
147                ],
148              ],
149            ],'list' => [
150              'path' => 'v1/{+parent}/backups',
151              'httpMethod' => 'GET',
152              'parameters' => [
153                'parent' => [
154                  'location' => 'path',
155                  'type' => 'string',
156                  'required' => true,
157                ],
158                'filter' => [
159                  'location' => 'query',
160                  'type' => 'string',
161                ],
162                'orderBy' => [
163                  'location' => 'query',
164                  'type' => 'string',
165                ],
166                'pageSize' => [
167                  'location' => 'query',
168                  'type' => 'integer',
169                ],
170                'pageToken' => [
171                  'location' => 'query',
172                  'type' => 'string',
173                ],
174              ],
175            ],'patch' => [
176              'path' => 'v1/{+name}',
177              'httpMethod' => 'PATCH',
178              'parameters' => [
179                'name' => [
180                  'location' => 'path',
181                  'type' => 'string',
182                  'required' => true,
183                ],
184                'updateMask' => [
185                  'location' => 'query',
186                  'type' => 'string',
187                ],
188              ],
189            ],
190          ]
191        ]
192    );
193    $this->projects_locations_instances = new CloudFilestore\Resource\ProjectsLocationsInstances(
194        $this,
195        $this->serviceName,
196        'instances',
197        [
198          'methods' => [
199            'create' => [
200              'path' => 'v1/{+parent}/instances',
201              'httpMethod' => 'POST',
202              'parameters' => [
203                'parent' => [
204                  'location' => 'path',
205                  'type' => 'string',
206                  'required' => true,
207                ],
208                'instanceId' => [
209                  'location' => 'query',
210                  'type' => 'string',
211                ],
212              ],
213            ],'delete' => [
214              'path' => 'v1/{+name}',
215              'httpMethod' => 'DELETE',
216              'parameters' => [
217                'name' => [
218                  'location' => 'path',
219                  'type' => 'string',
220                  'required' => true,
221                ],
222                'force' => [
223                  'location' => 'query',
224                  'type' => 'boolean',
225                ],
226              ],
227            ],'get' => [
228              'path' => 'v1/{+name}',
229              'httpMethod' => 'GET',
230              'parameters' => [
231                'name' => [
232                  'location' => 'path',
233                  'type' => 'string',
234                  'required' => true,
235                ],
236              ],
237            ],'list' => [
238              'path' => 'v1/{+parent}/instances',
239              'httpMethod' => 'GET',
240              'parameters' => [
241                'parent' => [
242                  'location' => 'path',
243                  'type' => 'string',
244                  'required' => true,
245                ],
246                'filter' => [
247                  'location' => 'query',
248                  'type' => 'string',
249                ],
250                'orderBy' => [
251                  'location' => 'query',
252                  'type' => 'string',
253                ],
254                'pageSize' => [
255                  'location' => 'query',
256                  'type' => 'integer',
257                ],
258                'pageToken' => [
259                  'location' => 'query',
260                  'type' => 'string',
261                ],
262              ],
263            ],'patch' => [
264              'path' => 'v1/{+name}',
265              'httpMethod' => 'PATCH',
266              'parameters' => [
267                'name' => [
268                  'location' => 'path',
269                  'type' => 'string',
270                  'required' => true,
271                ],
272                'updateMask' => [
273                  'location' => 'query',
274                  'type' => 'string',
275                ],
276              ],
277            ],'restore' => [
278              'path' => 'v1/{+name}:restore',
279              'httpMethod' => 'POST',
280              'parameters' => [
281                'name' => [
282                  'location' => 'path',
283                  'type' => 'string',
284                  'required' => true,
285                ],
286              ],
287            ],
288          ]
289        ]
290    );
291    $this->projects_locations_instances_snapshots = new CloudFilestore\Resource\ProjectsLocationsInstancesSnapshots(
292        $this,
293        $this->serviceName,
294        'snapshots',
295        [
296          'methods' => [
297            'create' => [
298              'path' => 'v1/{+parent}/snapshots',
299              'httpMethod' => 'POST',
300              'parameters' => [
301                'parent' => [
302                  'location' => 'path',
303                  'type' => 'string',
304                  'required' => true,
305                ],
306                'snapshotId' => [
307                  'location' => 'query',
308                  'type' => 'string',
309                ],
310              ],
311            ],'delete' => [
312              'path' => 'v1/{+name}',
313              'httpMethod' => 'DELETE',
314              'parameters' => [
315                'name' => [
316                  'location' => 'path',
317                  'type' => 'string',
318                  'required' => true,
319                ],
320              ],
321            ],'get' => [
322              'path' => 'v1/{+name}',
323              'httpMethod' => 'GET',
324              'parameters' => [
325                'name' => [
326                  'location' => 'path',
327                  'type' => 'string',
328                  'required' => true,
329                ],
330              ],
331            ],'list' => [
332              'path' => 'v1/{+parent}/snapshots',
333              'httpMethod' => 'GET',
334              'parameters' => [
335                'parent' => [
336                  'location' => 'path',
337                  'type' => 'string',
338                  'required' => true,
339                ],
340                'filter' => [
341                  'location' => 'query',
342                  'type' => 'string',
343                ],
344                'orderBy' => [
345                  'location' => 'query',
346                  'type' => 'string',
347                ],
348                'pageSize' => [
349                  'location' => 'query',
350                  'type' => 'integer',
351                ],
352                'pageToken' => [
353                  'location' => 'query',
354                  'type' => 'string',
355                ],
356              ],
357            ],'patch' => [
358              'path' => 'v1/{+name}',
359              'httpMethod' => 'PATCH',
360              'parameters' => [
361                'name' => [
362                  'location' => 'path',
363                  'type' => 'string',
364                  'required' => true,
365                ],
366                'updateMask' => [
367                  'location' => 'query',
368                  'type' => 'string',
369                ],
370              ],
371            ],
372          ]
373        ]
374    );
375    $this->projects_locations_operations = new CloudFilestore\Resource\ProjectsLocationsOperations(
376        $this,
377        $this->serviceName,
378        'operations',
379        [
380          'methods' => [
381            'cancel' => [
382              'path' => 'v1/{+name}:cancel',
383              'httpMethod' => 'POST',
384              'parameters' => [
385                'name' => [
386                  'location' => 'path',
387                  'type' => 'string',
388                  'required' => true,
389                ],
390              ],
391            ],'delete' => [
392              'path' => 'v1/{+name}',
393              'httpMethod' => 'DELETE',
394              'parameters' => [
395                'name' => [
396                  'location' => 'path',
397                  'type' => 'string',
398                  'required' => true,
399                ],
400              ],
401            ],'get' => [
402              'path' => 'v1/{+name}',
403              'httpMethod' => 'GET',
404              'parameters' => [
405                'name' => [
406                  'location' => 'path',
407                  'type' => 'string',
408                  'required' => true,
409                ],
410              ],
411            ],'list' => [
412              'path' => 'v1/{+name}/operations',
413              'httpMethod' => 'GET',
414              'parameters' => [
415                'name' => [
416                  'location' => 'path',
417                  'type' => 'string',
418                  'required' => true,
419                ],
420                'filter' => [
421                  'location' => 'query',
422                  'type' => 'string',
423                ],
424                'pageSize' => [
425                  'location' => 'query',
426                  'type' => 'integer',
427                ],
428                'pageToken' => [
429                  'location' => 'query',
430                  'type' => 'string',
431                ],
432              ],
433            ],
434          ]
435        ]
436    );
437  }
438}
439
440// Adding a class alias for backwards compatibility with the previous class name.
441class_alias(CloudFilestore::class, 'Google_Service_CloudFilestore');
442