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
18/**
19 * Service definition for ServiceManagement (v1).
20 *
21 * <p>
22 * Google Service Management allows service producers to publish their services
23 * on Google Cloud Platform so that they can be discovered and used by service
24 * consumers.</p>
25 *
26 * <p>
27 * For more information about this service, see the API
28 * <a href="https://cloud.google.com/service-management/" target="_blank">Documentation</a>
29 * </p>
30 *
31 * @author Google, Inc.
32 */
33class Google_Service_ServiceManagement extends Google_Service
34{
35  /** View and manage your data across Google Cloud Platform services. */
36  const CLOUD_PLATFORM =
37      "https://www.googleapis.com/auth/cloud-platform";
38  /** View your data across Google Cloud Platform services. */
39  const CLOUD_PLATFORM_READ_ONLY =
40      "https://www.googleapis.com/auth/cloud-platform.read-only";
41  /** Manage your Google API service configuration. */
42  const SERVICE_MANAGEMENT =
43      "https://www.googleapis.com/auth/service.management";
44  /** View your Google API service configuration. */
45  const SERVICE_MANAGEMENT_READONLY =
46      "https://www.googleapis.com/auth/service.management.readonly";
47
48  public $operations;
49  public $services;
50  public $services_configs;
51  public $services_consumers;
52  public $services_rollouts;
53
54  /**
55   * Constructs the internal representation of the ServiceManagement service.
56   *
57   * @param Google_Client $client
58   */
59  public function __construct(Google_Client $client)
60  {
61    parent::__construct($client);
62    $this->rootUrl = 'https://servicemanagement.googleapis.com/';
63    $this->servicePath = '';
64    $this->batchPath = 'batch';
65    $this->version = 'v1';
66    $this->serviceName = 'servicemanagement';
67
68    $this->operations = new Google_Service_ServiceManagement_Resource_Operations(
69        $this,
70        $this->serviceName,
71        'operations',
72        array(
73          'methods' => array(
74            'get' => array(
75              'path' => 'v1/{+name}',
76              'httpMethod' => 'GET',
77              'parameters' => array(
78                'name' => array(
79                  'location' => 'path',
80                  'type' => 'string',
81                  'required' => true,
82                ),
83              ),
84            ),'list' => array(
85              'path' => 'v1/operations',
86              'httpMethod' => 'GET',
87              'parameters' => array(
88                'name' => array(
89                  'location' => 'query',
90                  'type' => 'string',
91                ),
92                'pageToken' => array(
93                  'location' => 'query',
94                  'type' => 'string',
95                ),
96                'pageSize' => array(
97                  'location' => 'query',
98                  'type' => 'integer',
99                ),
100                'filter' => array(
101                  'location' => 'query',
102                  'type' => 'string',
103                ),
104              ),
105            ),
106          )
107        )
108    );
109    $this->services = new Google_Service_ServiceManagement_Resource_Services(
110        $this,
111        $this->serviceName,
112        'services',
113        array(
114          'methods' => array(
115            'create' => array(
116              'path' => 'v1/services',
117              'httpMethod' => 'POST',
118              'parameters' => array(),
119            ),'delete' => array(
120              'path' => 'v1/services/{serviceName}',
121              'httpMethod' => 'DELETE',
122              'parameters' => array(
123                'serviceName' => array(
124                  'location' => 'path',
125                  'type' => 'string',
126                  'required' => true,
127                ),
128              ),
129            ),'disable' => array(
130              'path' => 'v1/services/{serviceName}:disable',
131              'httpMethod' => 'POST',
132              'parameters' => array(
133                'serviceName' => array(
134                  'location' => 'path',
135                  'type' => 'string',
136                  'required' => true,
137                ),
138              ),
139            ),'enable' => array(
140              'path' => 'v1/services/{serviceName}:enable',
141              'httpMethod' => 'POST',
142              'parameters' => array(
143                'serviceName' => array(
144                  'location' => 'path',
145                  'type' => 'string',
146                  'required' => true,
147                ),
148              ),
149            ),'generateConfigReport' => array(
150              'path' => 'v1/services:generateConfigReport',
151              'httpMethod' => 'POST',
152              'parameters' => array(),
153            ),'get' => array(
154              'path' => 'v1/services/{serviceName}',
155              'httpMethod' => 'GET',
156              'parameters' => array(
157                'serviceName' => array(
158                  'location' => 'path',
159                  'type' => 'string',
160                  'required' => true,
161                ),
162              ),
163            ),'getConfig' => array(
164              'path' => 'v1/services/{serviceName}/config',
165              'httpMethod' => 'GET',
166              'parameters' => array(
167                'serviceName' => array(
168                  'location' => 'path',
169                  'type' => 'string',
170                  'required' => true,
171                ),
172                'configId' => array(
173                  'location' => 'query',
174                  'type' => 'string',
175                ),
176                'view' => array(
177                  'location' => 'query',
178                  'type' => 'string',
179                ),
180              ),
181            ),'getIamPolicy' => array(
182              'path' => 'v1/{+resource}:getIamPolicy',
183              'httpMethod' => 'POST',
184              'parameters' => array(
185                'resource' => array(
186                  'location' => 'path',
187                  'type' => 'string',
188                  'required' => true,
189                ),
190              ),
191            ),'list' => array(
192              'path' => 'v1/services',
193              'httpMethod' => 'GET',
194              'parameters' => array(
195                'consumerId' => array(
196                  'location' => 'query',
197                  'type' => 'string',
198                ),
199                'pageToken' => array(
200                  'location' => 'query',
201                  'type' => 'string',
202                ),
203                'pageSize' => array(
204                  'location' => 'query',
205                  'type' => 'integer',
206                ),
207                'producerProjectId' => array(
208                  'location' => 'query',
209                  'type' => 'string',
210                ),
211              ),
212            ),'setIamPolicy' => array(
213              'path' => 'v1/{+resource}:setIamPolicy',
214              'httpMethod' => 'POST',
215              'parameters' => array(
216                'resource' => array(
217                  'location' => 'path',
218                  'type' => 'string',
219                  'required' => true,
220                ),
221              ),
222            ),'testIamPermissions' => array(
223              'path' => 'v1/{+resource}:testIamPermissions',
224              'httpMethod' => 'POST',
225              'parameters' => array(
226                'resource' => array(
227                  'location' => 'path',
228                  'type' => 'string',
229                  'required' => true,
230                ),
231              ),
232            ),'undelete' => array(
233              'path' => 'v1/services/{serviceName}:undelete',
234              'httpMethod' => 'POST',
235              'parameters' => array(
236                'serviceName' => array(
237                  'location' => 'path',
238                  'type' => 'string',
239                  'required' => true,
240                ),
241              ),
242            ),
243          )
244        )
245    );
246    $this->services_configs = new Google_Service_ServiceManagement_Resource_ServicesConfigs(
247        $this,
248        $this->serviceName,
249        'configs',
250        array(
251          'methods' => array(
252            'create' => array(
253              'path' => 'v1/services/{serviceName}/configs',
254              'httpMethod' => 'POST',
255              'parameters' => array(
256                'serviceName' => array(
257                  'location' => 'path',
258                  'type' => 'string',
259                  'required' => true,
260                ),
261              ),
262            ),'get' => array(
263              'path' => 'v1/services/{serviceName}/configs/{configId}',
264              'httpMethod' => 'GET',
265              'parameters' => array(
266                'serviceName' => array(
267                  'location' => 'path',
268                  'type' => 'string',
269                  'required' => true,
270                ),
271                'configId' => array(
272                  'location' => 'path',
273                  'type' => 'string',
274                  'required' => true,
275                ),
276                'view' => array(
277                  'location' => 'query',
278                  'type' => 'string',
279                ),
280              ),
281            ),'list' => array(
282              'path' => 'v1/services/{serviceName}/configs',
283              'httpMethod' => 'GET',
284              'parameters' => array(
285                'serviceName' => array(
286                  'location' => 'path',
287                  'type' => 'string',
288                  'required' => true,
289                ),
290                'pageToken' => array(
291                  'location' => 'query',
292                  'type' => 'string',
293                ),
294                'pageSize' => array(
295                  'location' => 'query',
296                  'type' => 'integer',
297                ),
298              ),
299            ),'submit' => array(
300              'path' => 'v1/services/{serviceName}/configs:submit',
301              'httpMethod' => 'POST',
302              'parameters' => array(
303                'serviceName' => array(
304                  'location' => 'path',
305                  'type' => 'string',
306                  'required' => true,
307                ),
308              ),
309            ),
310          )
311        )
312    );
313    $this->services_consumers = new Google_Service_ServiceManagement_Resource_ServicesConsumers(
314        $this,
315        $this->serviceName,
316        'consumers',
317        array(
318          'methods' => array(
319            'getIamPolicy' => array(
320              'path' => 'v1/{+resource}:getIamPolicy',
321              'httpMethod' => 'POST',
322              'parameters' => array(
323                'resource' => array(
324                  'location' => 'path',
325                  'type' => 'string',
326                  'required' => true,
327                ),
328              ),
329            ),'setIamPolicy' => array(
330              'path' => 'v1/{+resource}:setIamPolicy',
331              'httpMethod' => 'POST',
332              'parameters' => array(
333                'resource' => array(
334                  'location' => 'path',
335                  'type' => 'string',
336                  'required' => true,
337                ),
338              ),
339            ),'testIamPermissions' => array(
340              'path' => 'v1/{+resource}:testIamPermissions',
341              'httpMethod' => 'POST',
342              'parameters' => array(
343                'resource' => array(
344                  'location' => 'path',
345                  'type' => 'string',
346                  'required' => true,
347                ),
348              ),
349            ),
350          )
351        )
352    );
353    $this->services_rollouts = new Google_Service_ServiceManagement_Resource_ServicesRollouts(
354        $this,
355        $this->serviceName,
356        'rollouts',
357        array(
358          'methods' => array(
359            'create' => array(
360              'path' => 'v1/services/{serviceName}/rollouts',
361              'httpMethod' => 'POST',
362              'parameters' => array(
363                'serviceName' => array(
364                  'location' => 'path',
365                  'type' => 'string',
366                  'required' => true,
367                ),
368              ),
369            ),'get' => array(
370              'path' => 'v1/services/{serviceName}/rollouts/{rolloutId}',
371              'httpMethod' => 'GET',
372              'parameters' => array(
373                'serviceName' => array(
374                  'location' => 'path',
375                  'type' => 'string',
376                  'required' => true,
377                ),
378                'rolloutId' => array(
379                  'location' => 'path',
380                  'type' => 'string',
381                  'required' => true,
382                ),
383              ),
384            ),'list' => array(
385              'path' => 'v1/services/{serviceName}/rollouts',
386              'httpMethod' => 'GET',
387              'parameters' => array(
388                'serviceName' => array(
389                  'location' => 'path',
390                  'type' => 'string',
391                  'required' => true,
392                ),
393                'pageToken' => array(
394                  'location' => 'query',
395                  'type' => 'string',
396                ),
397                'pageSize' => array(
398                  'location' => 'query',
399                  'type' => 'integer',
400                ),
401                'filter' => array(
402                  'location' => 'query',
403                  'type' => 'string',
404                ),
405              ),
406            ),
407          )
408        )
409    );
410  }
411}
412