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 Workflows (v1).
24 *
25 * <p>
26 * Manage workflow definitions. To execute workflows and manage executions, see
27 * the Workflows Executions API.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/workflows" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Workflows 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_operations;
44  public $projects_locations_workflows;
45
46  /**
47   * Constructs the internal representation of the Workflows 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://workflows.googleapis.com/';
57    $this->servicePath = '';
58    $this->batchPath = 'batch';
59    $this->version = 'v1';
60    $this->serviceName = 'workflows';
61
62    $this->projects_locations = new Workflows\Resource\ProjectsLocations(
63        $this,
64        $this->serviceName,
65        'locations',
66        [
67          'methods' => [
68            'get' => [
69              'path' => 'v1/{+name}',
70              'httpMethod' => 'GET',
71              'parameters' => [
72                'name' => [
73                  'location' => 'path',
74                  'type' => 'string',
75                  'required' => true,
76                ],
77              ],
78            ],'list' => [
79              'path' => 'v1/{+name}/locations',
80              'httpMethod' => 'GET',
81              'parameters' => [
82                'name' => [
83                  'location' => 'path',
84                  'type' => 'string',
85                  'required' => true,
86                ],
87                'filter' => [
88                  'location' => 'query',
89                  'type' => 'string',
90                ],
91                'pageSize' => [
92                  'location' => 'query',
93                  'type' => 'integer',
94                ],
95                'pageToken' => [
96                  'location' => 'query',
97                  'type' => 'string',
98                ],
99              ],
100            ],
101          ]
102        ]
103    );
104    $this->projects_locations_operations = new Workflows\Resource\ProjectsLocationsOperations(
105        $this,
106        $this->serviceName,
107        'operations',
108        [
109          'methods' => [
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            ],'list' => [
131              'path' => 'v1/{+name}/operations',
132              'httpMethod' => 'GET',
133              'parameters' => [
134                'name' => [
135                  'location' => 'path',
136                  'type' => 'string',
137                  'required' => true,
138                ],
139                'filter' => [
140                  'location' => 'query',
141                  'type' => 'string',
142                ],
143                'pageSize' => [
144                  'location' => 'query',
145                  'type' => 'integer',
146                ],
147                'pageToken' => [
148                  'location' => 'query',
149                  'type' => 'string',
150                ],
151              ],
152            ],
153          ]
154        ]
155    );
156    $this->projects_locations_workflows = new Workflows\Resource\ProjectsLocationsWorkflows(
157        $this,
158        $this->serviceName,
159        'workflows',
160        [
161          'methods' => [
162            'create' => [
163              'path' => 'v1/{+parent}/workflows',
164              'httpMethod' => 'POST',
165              'parameters' => [
166                'parent' => [
167                  'location' => 'path',
168                  'type' => 'string',
169                  'required' => true,
170                ],
171                'workflowId' => [
172                  'location' => 'query',
173                  'type' => 'string',
174                ],
175              ],
176            ],'delete' => [
177              'path' => 'v1/{+name}',
178              'httpMethod' => 'DELETE',
179              'parameters' => [
180                'name' => [
181                  'location' => 'path',
182                  'type' => 'string',
183                  'required' => true,
184                ],
185              ],
186            ],'get' => [
187              'path' => 'v1/{+name}',
188              'httpMethod' => 'GET',
189              'parameters' => [
190                'name' => [
191                  'location' => 'path',
192                  'type' => 'string',
193                  'required' => true,
194                ],
195              ],
196            ],'list' => [
197              'path' => 'v1/{+parent}/workflows',
198              'httpMethod' => 'GET',
199              'parameters' => [
200                'parent' => [
201                  'location' => 'path',
202                  'type' => 'string',
203                  'required' => true,
204                ],
205                'filter' => [
206                  'location' => 'query',
207                  'type' => 'string',
208                ],
209                'orderBy' => [
210                  'location' => 'query',
211                  'type' => 'string',
212                ],
213                'pageSize' => [
214                  'location' => 'query',
215                  'type' => 'integer',
216                ],
217                'pageToken' => [
218                  'location' => 'query',
219                  'type' => 'string',
220                ],
221              ],
222            ],'patch' => [
223              'path' => 'v1/{+name}',
224              'httpMethod' => 'PATCH',
225              'parameters' => [
226                'name' => [
227                  'location' => 'path',
228                  'type' => 'string',
229                  'required' => true,
230                ],
231                'updateMask' => [
232                  'location' => 'query',
233                  'type' => 'string',
234                ],
235              ],
236            ],
237          ]
238        ]
239    );
240  }
241}
242
243// Adding a class alias for backwards compatibility with the previous class name.
244class_alias(Workflows::class, 'Google_Service_Workflows');
245