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 Datapipelines (v1).
24 *
25 * <p>
26 * Data Pipelines provides an interface for creating, updating, and managing
27 * recurring Data Analytics jobs.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/dataflow/docs/guides/data-pipelines" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Datapipelines 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 $projects_locations;
43  public $projects_locations_pipelines;
44  public $projects_locations_pipelines_jobs;
45
46  /**
47   * Constructs the internal representation of the Datapipelines service.
48   *
49   * @param Client|array $clientOrConfig The client used to deliver requests, or a
50   *                                     config array to pass to a new Client instance.
51   * @param string $rootUrl The root URL used for requests to the service.
52   */
53  public function __construct($clientOrConfig = [], $rootUrl = null)
54  {
55    parent::__construct($clientOrConfig);
56    $this->rootUrl = $rootUrl ?: 'https://datapipelines.googleapis.com/';
57    $this->servicePath = '';
58    $this->batchPath = 'batch';
59    $this->version = 'v1';
60    $this->serviceName = 'datapipelines';
61
62    $this->projects_locations = new Datapipelines\Resource\ProjectsLocations(
63        $this,
64        $this->serviceName,
65        'locations',
66        [
67          'methods' => [
68            'listPipelines' => [
69              'path' => 'v1/{+parent}',
70              'httpMethod' => 'GET',
71              'parameters' => [
72                'parent' => [
73                  'location' => 'path',
74                  'type' => 'string',
75                  'required' => true,
76                ],
77                'filter' => [
78                  'location' => 'query',
79                  'type' => 'string',
80                ],
81                'pageSize' => [
82                  'location' => 'query',
83                  'type' => 'integer',
84                ],
85                'pageToken' => [
86                  'location' => 'query',
87                  'type' => 'string',
88                ],
89              ],
90            ],
91          ]
92        ]
93    );
94    $this->projects_locations_pipelines = new Datapipelines\Resource\ProjectsLocationsPipelines(
95        $this,
96        $this->serviceName,
97        'pipelines',
98        [
99          'methods' => [
100            'create' => [
101              'path' => 'v1/{+parent}/pipelines',
102              'httpMethod' => 'POST',
103              'parameters' => [
104                'parent' => [
105                  'location' => 'path',
106                  'type' => 'string',
107                  'required' => true,
108                ],
109              ],
110            ],'delete' => [
111              'path' => 'v1/{+name}',
112              'httpMethod' => 'DELETE',
113              'parameters' => [
114                'name' => [
115                  'location' => 'path',
116                  'type' => 'string',
117                  'required' => true,
118                ],
119              ],
120            ],'get' => [
121              'path' => 'v1/{+name}',
122              'httpMethod' => 'GET',
123              'parameters' => [
124                'name' => [
125                  'location' => 'path',
126                  'type' => 'string',
127                  'required' => true,
128                ],
129              ],
130            ],'patch' => [
131              'path' => 'v1/{+name}',
132              'httpMethod' => 'PATCH',
133              'parameters' => [
134                'name' => [
135                  'location' => 'path',
136                  'type' => 'string',
137                  'required' => true,
138                ],
139                'updateMask' => [
140                  'location' => 'query',
141                  'type' => 'string',
142                ],
143              ],
144            ],'run' => [
145              'path' => 'v1/{+name}:run',
146              'httpMethod' => 'POST',
147              'parameters' => [
148                'name' => [
149                  'location' => 'path',
150                  'type' => 'string',
151                  'required' => true,
152                ],
153              ],
154            ],'stop' => [
155              'path' => 'v1/{+name}:stop',
156              'httpMethod' => 'POST',
157              'parameters' => [
158                'name' => [
159                  'location' => 'path',
160                  'type' => 'string',
161                  'required' => true,
162                ],
163              ],
164            ],
165          ]
166        ]
167    );
168    $this->projects_locations_pipelines_jobs = new Datapipelines\Resource\ProjectsLocationsPipelinesJobs(
169        $this,
170        $this->serviceName,
171        'jobs',
172        [
173          'methods' => [
174            'list' => [
175              'path' => 'v1/{+parent}/jobs',
176              'httpMethod' => 'GET',
177              'parameters' => [
178                'parent' => [
179                  'location' => 'path',
180                  'type' => 'string',
181                  'required' => true,
182                ],
183                'pageSize' => [
184                  'location' => 'query',
185                  'type' => 'integer',
186                ],
187                'pageToken' => [
188                  'location' => 'query',
189                  'type' => 'string',
190                ],
191              ],
192            ],
193          ]
194        ]
195    );
196  }
197}
198
199// Adding a class alias for backwards compatibility with the previous class name.
200class_alias(Datapipelines::class, 'Google_Service_Datapipelines');
201