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 Datastream (v1).
24 *
25 * <p>
26</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/datastream/" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class Datastream 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_connectionProfiles;
43  public $projects_locations_operations;
44  public $projects_locations_privateConnections;
45  public $projects_locations_privateConnections_routes;
46  public $projects_locations_streams;
47  public $projects_locations_streams_objects;
48
49  /**
50   * Constructs the internal representation of the Datastream 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://datastream.googleapis.com/';
60    $this->servicePath = '';
61    $this->batchPath = 'batch';
62    $this->version = 'v1';
63    $this->serviceName = 'datastream';
64
65    $this->projects_locations = new Datastream\Resource\ProjectsLocations(
66        $this,
67        $this->serviceName,
68        'locations',
69        [
70          'methods' => [
71            'fetchStaticIps' => [
72              'path' => 'v1/{+name}:fetchStaticIps',
73              'httpMethod' => 'GET',
74              'parameters' => [
75                'name' => [
76                  'location' => 'path',
77                  'type' => 'string',
78                  'required' => true,
79                ],
80                'pageSize' => [
81                  'location' => 'query',
82                  'type' => 'integer',
83                ],
84                'pageToken' => [
85                  'location' => 'query',
86                  'type' => 'string',
87                ],
88              ],
89            ],'get' => [
90              'path' => 'v1/{+name}',
91              'httpMethod' => 'GET',
92              'parameters' => [
93                'name' => [
94                  'location' => 'path',
95                  'type' => 'string',
96                  'required' => true,
97                ],
98              ],
99            ],'list' => [
100              'path' => 'v1/{+name}/locations',
101              'httpMethod' => 'GET',
102              'parameters' => [
103                'name' => [
104                  'location' => 'path',
105                  'type' => 'string',
106                  'required' => true,
107                ],
108                'filter' => [
109                  'location' => 'query',
110                  'type' => 'string',
111                ],
112                'pageSize' => [
113                  'location' => 'query',
114                  'type' => 'integer',
115                ],
116                'pageToken' => [
117                  'location' => 'query',
118                  'type' => 'string',
119                ],
120              ],
121            ],
122          ]
123        ]
124    );
125    $this->projects_locations_connectionProfiles = new Datastream\Resource\ProjectsLocationsConnectionProfiles(
126        $this,
127        $this->serviceName,
128        'connectionProfiles',
129        [
130          'methods' => [
131            'create' => [
132              'path' => 'v1/{+parent}/connectionProfiles',
133              'httpMethod' => 'POST',
134              'parameters' => [
135                'parent' => [
136                  'location' => 'path',
137                  'type' => 'string',
138                  'required' => true,
139                ],
140                'connectionProfileId' => [
141                  'location' => 'query',
142                  'type' => 'string',
143                ],
144                'force' => [
145                  'location' => 'query',
146                  'type' => 'boolean',
147                ],
148                'requestId' => [
149                  'location' => 'query',
150                  'type' => 'string',
151                ],
152                'validateOnly' => [
153                  'location' => 'query',
154                  'type' => 'boolean',
155                ],
156              ],
157            ],'delete' => [
158              'path' => 'v1/{+name}',
159              'httpMethod' => 'DELETE',
160              'parameters' => [
161                'name' => [
162                  'location' => 'path',
163                  'type' => 'string',
164                  'required' => true,
165                ],
166                'requestId' => [
167                  'location' => 'query',
168                  'type' => 'string',
169                ],
170              ],
171            ],'discover' => [
172              'path' => 'v1/{+parent}/connectionProfiles:discover',
173              'httpMethod' => 'POST',
174              'parameters' => [
175                'parent' => [
176                  'location' => 'path',
177                  'type' => 'string',
178                  'required' => true,
179                ],
180              ],
181            ],'get' => [
182              'path' => 'v1/{+name}',
183              'httpMethod' => 'GET',
184              'parameters' => [
185                'name' => [
186                  'location' => 'path',
187                  'type' => 'string',
188                  'required' => true,
189                ],
190              ],
191            ],'list' => [
192              'path' => 'v1/{+parent}/connectionProfiles',
193              'httpMethod' => 'GET',
194              'parameters' => [
195                'parent' => [
196                  'location' => 'path',
197                  'type' => 'string',
198                  'required' => true,
199                ],
200                'filter' => [
201                  'location' => 'query',
202                  'type' => 'string',
203                ],
204                'orderBy' => [
205                  'location' => 'query',
206                  'type' => 'string',
207                ],
208                'pageSize' => [
209                  'location' => 'query',
210                  'type' => 'integer',
211                ],
212                'pageToken' => [
213                  'location' => 'query',
214                  'type' => 'string',
215                ],
216              ],
217            ],'patch' => [
218              'path' => 'v1/{+name}',
219              'httpMethod' => 'PATCH',
220              'parameters' => [
221                'name' => [
222                  'location' => 'path',
223                  'type' => 'string',
224                  'required' => true,
225                ],
226                'force' => [
227                  'location' => 'query',
228                  'type' => 'boolean',
229                ],
230                'requestId' => [
231                  'location' => 'query',
232                  'type' => 'string',
233                ],
234                'updateMask' => [
235                  'location' => 'query',
236                  'type' => 'string',
237                ],
238                'validateOnly' => [
239                  'location' => 'query',
240                  'type' => 'boolean',
241                ],
242              ],
243            ],
244          ]
245        ]
246    );
247    $this->projects_locations_operations = new Datastream\Resource\ProjectsLocationsOperations(
248        $this,
249        $this->serviceName,
250        'operations',
251        [
252          'methods' => [
253            'cancel' => [
254              'path' => 'v1/{+name}:cancel',
255              'httpMethod' => 'POST',
256              'parameters' => [
257                'name' => [
258                  'location' => 'path',
259                  'type' => 'string',
260                  'required' => true,
261                ],
262              ],
263            ],'delete' => [
264              'path' => 'v1/{+name}',
265              'httpMethod' => 'DELETE',
266              'parameters' => [
267                'name' => [
268                  'location' => 'path',
269                  'type' => 'string',
270                  'required' => true,
271                ],
272              ],
273            ],'get' => [
274              'path' => 'v1/{+name}',
275              'httpMethod' => 'GET',
276              'parameters' => [
277                'name' => [
278                  'location' => 'path',
279                  'type' => 'string',
280                  'required' => true,
281                ],
282              ],
283            ],'list' => [
284              'path' => 'v1/{+name}/operations',
285              'httpMethod' => 'GET',
286              'parameters' => [
287                'name' => [
288                  'location' => 'path',
289                  'type' => 'string',
290                  'required' => true,
291                ],
292                'filter' => [
293                  'location' => 'query',
294                  'type' => 'string',
295                ],
296                'pageSize' => [
297                  'location' => 'query',
298                  'type' => 'integer',
299                ],
300                'pageToken' => [
301                  'location' => 'query',
302                  'type' => 'string',
303                ],
304              ],
305            ],
306          ]
307        ]
308    );
309    $this->projects_locations_privateConnections = new Datastream\Resource\ProjectsLocationsPrivateConnections(
310        $this,
311        $this->serviceName,
312        'privateConnections',
313        [
314          'methods' => [
315            'create' => [
316              'path' => 'v1/{+parent}/privateConnections',
317              'httpMethod' => 'POST',
318              'parameters' => [
319                'parent' => [
320                  'location' => 'path',
321                  'type' => 'string',
322                  'required' => true,
323                ],
324                'privateConnectionId' => [
325                  'location' => 'query',
326                  'type' => 'string',
327                ],
328                'requestId' => [
329                  'location' => 'query',
330                  'type' => 'string',
331                ],
332              ],
333            ],'delete' => [
334              'path' => 'v1/{+name}',
335              'httpMethod' => 'DELETE',
336              'parameters' => [
337                'name' => [
338                  'location' => 'path',
339                  'type' => 'string',
340                  'required' => true,
341                ],
342                'force' => [
343                  'location' => 'query',
344                  'type' => 'boolean',
345                ],
346                'requestId' => [
347                  'location' => 'query',
348                  'type' => 'string',
349                ],
350              ],
351            ],'get' => [
352              'path' => 'v1/{+name}',
353              'httpMethod' => 'GET',
354              'parameters' => [
355                'name' => [
356                  'location' => 'path',
357                  'type' => 'string',
358                  'required' => true,
359                ],
360              ],
361            ],'list' => [
362              'path' => 'v1/{+parent}/privateConnections',
363              'httpMethod' => 'GET',
364              'parameters' => [
365                'parent' => [
366                  'location' => 'path',
367                  'type' => 'string',
368                  'required' => true,
369                ],
370                'filter' => [
371                  'location' => 'query',
372                  'type' => 'string',
373                ],
374                'orderBy' => [
375                  'location' => 'query',
376                  'type' => 'string',
377                ],
378                'pageSize' => [
379                  'location' => 'query',
380                  'type' => 'integer',
381                ],
382                'pageToken' => [
383                  'location' => 'query',
384                  'type' => 'string',
385                ],
386              ],
387            ],
388          ]
389        ]
390    );
391    $this->projects_locations_privateConnections_routes = new Datastream\Resource\ProjectsLocationsPrivateConnectionsRoutes(
392        $this,
393        $this->serviceName,
394        'routes',
395        [
396          'methods' => [
397            'create' => [
398              'path' => 'v1/{+parent}/routes',
399              'httpMethod' => 'POST',
400              'parameters' => [
401                'parent' => [
402                  'location' => 'path',
403                  'type' => 'string',
404                  'required' => true,
405                ],
406                'requestId' => [
407                  'location' => 'query',
408                  'type' => 'string',
409                ],
410                'routeId' => [
411                  'location' => 'query',
412                  'type' => 'string',
413                ],
414              ],
415            ],'delete' => [
416              'path' => 'v1/{+name}',
417              'httpMethod' => 'DELETE',
418              'parameters' => [
419                'name' => [
420                  'location' => 'path',
421                  'type' => 'string',
422                  'required' => true,
423                ],
424                'requestId' => [
425                  'location' => 'query',
426                  'type' => 'string',
427                ],
428              ],
429            ],'get' => [
430              'path' => 'v1/{+name}',
431              'httpMethod' => 'GET',
432              'parameters' => [
433                'name' => [
434                  'location' => 'path',
435                  'type' => 'string',
436                  'required' => true,
437                ],
438              ],
439            ],'list' => [
440              'path' => 'v1/{+parent}/routes',
441              'httpMethod' => 'GET',
442              'parameters' => [
443                'parent' => [
444                  'location' => 'path',
445                  'type' => 'string',
446                  'required' => true,
447                ],
448                'filter' => [
449                  'location' => 'query',
450                  'type' => 'string',
451                ],
452                'orderBy' => [
453                  'location' => 'query',
454                  'type' => 'string',
455                ],
456                'pageSize' => [
457                  'location' => 'query',
458                  'type' => 'integer',
459                ],
460                'pageToken' => [
461                  'location' => 'query',
462                  'type' => 'string',
463                ],
464              ],
465            ],
466          ]
467        ]
468    );
469    $this->projects_locations_streams = new Datastream\Resource\ProjectsLocationsStreams(
470        $this,
471        $this->serviceName,
472        'streams',
473        [
474          'methods' => [
475            'create' => [
476              'path' => 'v1/{+parent}/streams',
477              'httpMethod' => 'POST',
478              'parameters' => [
479                'parent' => [
480                  'location' => 'path',
481                  'type' => 'string',
482                  'required' => true,
483                ],
484                'force' => [
485                  'location' => 'query',
486                  'type' => 'boolean',
487                ],
488                'requestId' => [
489                  'location' => 'query',
490                  'type' => 'string',
491                ],
492                'streamId' => [
493                  'location' => 'query',
494                  'type' => 'string',
495                ],
496                'validateOnly' => [
497                  'location' => 'query',
498                  'type' => 'boolean',
499                ],
500              ],
501            ],'delete' => [
502              'path' => 'v1/{+name}',
503              'httpMethod' => 'DELETE',
504              'parameters' => [
505                'name' => [
506                  'location' => 'path',
507                  'type' => 'string',
508                  'required' => true,
509                ],
510                'requestId' => [
511                  'location' => 'query',
512                  'type' => 'string',
513                ],
514              ],
515            ],'get' => [
516              'path' => 'v1/{+name}',
517              'httpMethod' => 'GET',
518              'parameters' => [
519                'name' => [
520                  'location' => 'path',
521                  'type' => 'string',
522                  'required' => true,
523                ],
524              ],
525            ],'list' => [
526              'path' => 'v1/{+parent}/streams',
527              'httpMethod' => 'GET',
528              'parameters' => [
529                'parent' => [
530                  'location' => 'path',
531                  'type' => 'string',
532                  'required' => true,
533                ],
534                'filter' => [
535                  'location' => 'query',
536                  'type' => 'string',
537                ],
538                'orderBy' => [
539                  'location' => 'query',
540                  'type' => 'string',
541                ],
542                'pageSize' => [
543                  'location' => 'query',
544                  'type' => 'integer',
545                ],
546                'pageToken' => [
547                  'location' => 'query',
548                  'type' => 'string',
549                ],
550              ],
551            ],'patch' => [
552              'path' => 'v1/{+name}',
553              'httpMethod' => 'PATCH',
554              'parameters' => [
555                'name' => [
556                  'location' => 'path',
557                  'type' => 'string',
558                  'required' => true,
559                ],
560                'force' => [
561                  'location' => 'query',
562                  'type' => 'boolean',
563                ],
564                'requestId' => [
565                  'location' => 'query',
566                  'type' => 'string',
567                ],
568                'updateMask' => [
569                  'location' => 'query',
570                  'type' => 'string',
571                ],
572                'validateOnly' => [
573                  'location' => 'query',
574                  'type' => 'boolean',
575                ],
576              ],
577            ],
578          ]
579        ]
580    );
581    $this->projects_locations_streams_objects = new Datastream\Resource\ProjectsLocationsStreamsObjects(
582        $this,
583        $this->serviceName,
584        'objects',
585        [
586          'methods' => [
587            'get' => [
588              'path' => 'v1/{+name}',
589              'httpMethod' => 'GET',
590              'parameters' => [
591                'name' => [
592                  'location' => 'path',
593                  'type' => 'string',
594                  'required' => true,
595                ],
596              ],
597            ],'list' => [
598              'path' => 'v1/{+parent}/objects',
599              'httpMethod' => 'GET',
600              'parameters' => [
601                'parent' => [
602                  'location' => 'path',
603                  'type' => 'string',
604                  'required' => true,
605                ],
606                'pageSize' => [
607                  'location' => 'query',
608                  'type' => 'integer',
609                ],
610                'pageToken' => [
611                  'location' => 'query',
612                  'type' => 'string',
613                ],
614              ],
615            ],'lookup' => [
616              'path' => 'v1/{+parent}/objects:lookup',
617              'httpMethod' => 'POST',
618              'parameters' => [
619                'parent' => [
620                  'location' => 'path',
621                  'type' => 'string',
622                  'required' => true,
623                ],
624              ],
625            ],'startBackfillJob' => [
626              'path' => 'v1/{+object}:startBackfillJob',
627              'httpMethod' => 'POST',
628              'parameters' => [
629                'object' => [
630                  'location' => 'path',
631                  'type' => 'string',
632                  'required' => true,
633                ],
634              ],
635            ],'stopBackfillJob' => [
636              'path' => 'v1/{+object}:stopBackfillJob',
637              'httpMethod' => 'POST',
638              'parameters' => [
639                'object' => [
640                  'location' => 'path',
641                  'type' => 'string',
642                  'required' => true,
643                ],
644              ],
645            ],
646          ]
647        ]
648    );
649  }
650}
651
652// Adding a class alias for backwards compatibility with the previous class name.
653class_alias(Datastream::class, 'Google_Service_Datastream');
654