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 ServiceConsumerManagement (v1).
24 *
25 * <p>
26 * Manages the service consumers of a Service Infrastructure service.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/service-consumer-management/docs/overview" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class ServiceConsumerManagement 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 $operations;
42  public $services;
43  public $services_tenancyUnits;
44
45  /**
46   * Constructs the internal representation of the ServiceConsumerManagement
47   * 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://serviceconsumermanagement.googleapis.com/';
57    $this->servicePath = '';
58    $this->batchPath = 'batch';
59    $this->version = 'v1';
60    $this->serviceName = 'serviceconsumermanagement';
61
62    $this->operations = new ServiceConsumerManagement\Resource\Operations(
63        $this,
64        $this->serviceName,
65        'operations',
66        [
67          'methods' => [
68            'cancel' => [
69              'path' => 'v1/{+name}:cancel',
70              'httpMethod' => 'POST',
71              'parameters' => [
72                'name' => [
73                  'location' => 'path',
74                  'type' => 'string',
75                  'required' => true,
76                ],
77              ],
78            ],'delete' => [
79              'path' => 'v1/{+name}',
80              'httpMethod' => 'DELETE',
81              'parameters' => [
82                'name' => [
83                  'location' => 'path',
84                  'type' => 'string',
85                  'required' => true,
86                ],
87              ],
88            ],'get' => [
89              'path' => 'v1/{+name}',
90              'httpMethod' => 'GET',
91              'parameters' => [
92                'name' => [
93                  'location' => 'path',
94                  'type' => 'string',
95                  'required' => true,
96                ],
97              ],
98            ],'list' => [
99              'path' => 'v1/{+name}',
100              'httpMethod' => 'GET',
101              'parameters' => [
102                'name' => [
103                  'location' => 'path',
104                  'type' => 'string',
105                  'required' => true,
106                ],
107                'filter' => [
108                  'location' => 'query',
109                  'type' => 'string',
110                ],
111                'pageSize' => [
112                  'location' => 'query',
113                  'type' => 'integer',
114                ],
115                'pageToken' => [
116                  'location' => 'query',
117                  'type' => 'string',
118                ],
119              ],
120            ],
121          ]
122        ]
123    );
124    $this->services = new ServiceConsumerManagement\Resource\Services(
125        $this,
126        $this->serviceName,
127        'services',
128        [
129          'methods' => [
130            'search' => [
131              'path' => 'v1/{+parent}:search',
132              'httpMethod' => 'GET',
133              'parameters' => [
134                'parent' => [
135                  'location' => 'path',
136                  'type' => 'string',
137                  'required' => true,
138                ],
139                'pageSize' => [
140                  'location' => 'query',
141                  'type' => 'integer',
142                ],
143                'pageToken' => [
144                  'location' => 'query',
145                  'type' => 'string',
146                ],
147                'query' => [
148                  'location' => 'query',
149                  'type' => 'string',
150                ],
151              ],
152            ],
153          ]
154        ]
155    );
156    $this->services_tenancyUnits = new ServiceConsumerManagement\Resource\ServicesTenancyUnits(
157        $this,
158        $this->serviceName,
159        'tenancyUnits',
160        [
161          'methods' => [
162            'addProject' => [
163              'path' => 'v1/{+parent}:addProject',
164              'httpMethod' => 'POST',
165              'parameters' => [
166                'parent' => [
167                  'location' => 'path',
168                  'type' => 'string',
169                  'required' => true,
170                ],
171              ],
172            ],'applyProjectConfig' => [
173              'path' => 'v1/{+name}:applyProjectConfig',
174              'httpMethod' => 'POST',
175              'parameters' => [
176                'name' => [
177                  'location' => 'path',
178                  'type' => 'string',
179                  'required' => true,
180                ],
181              ],
182            ],'attachProject' => [
183              'path' => 'v1/{+name}:attachProject',
184              'httpMethod' => 'POST',
185              'parameters' => [
186                'name' => [
187                  'location' => 'path',
188                  'type' => 'string',
189                  'required' => true,
190                ],
191              ],
192            ],'create' => [
193              'path' => 'v1/{+parent}/tenancyUnits',
194              'httpMethod' => 'POST',
195              'parameters' => [
196                'parent' => [
197                  'location' => 'path',
198                  'type' => 'string',
199                  'required' => true,
200                ],
201              ],
202            ],'delete' => [
203              'path' => 'v1/{+name}',
204              'httpMethod' => 'DELETE',
205              'parameters' => [
206                'name' => [
207                  'location' => 'path',
208                  'type' => 'string',
209                  'required' => true,
210                ],
211              ],
212            ],'deleteProject' => [
213              'path' => 'v1/{+name}:deleteProject',
214              'httpMethod' => 'POST',
215              'parameters' => [
216                'name' => [
217                  'location' => 'path',
218                  'type' => 'string',
219                  'required' => true,
220                ],
221              ],
222            ],'list' => [
223              'path' => 'v1/{+parent}/tenancyUnits',
224              'httpMethod' => 'GET',
225              'parameters' => [
226                'parent' => [
227                  'location' => 'path',
228                  'type' => 'string',
229                  'required' => true,
230                ],
231                'filter' => [
232                  'location' => 'query',
233                  'type' => 'string',
234                ],
235                'pageSize' => [
236                  'location' => 'query',
237                  'type' => 'integer',
238                ],
239                'pageToken' => [
240                  'location' => 'query',
241                  'type' => 'string',
242                ],
243              ],
244            ],'removeProject' => [
245              'path' => 'v1/{+name}:removeProject',
246              'httpMethod' => 'POST',
247              'parameters' => [
248                'name' => [
249                  'location' => 'path',
250                  'type' => 'string',
251                  'required' => true,
252                ],
253              ],
254            ],'undeleteProject' => [
255              'path' => 'v1/{+name}:undeleteProject',
256              'httpMethod' => 'POST',
257              'parameters' => [
258                'name' => [
259                  'location' => 'path',
260                  'type' => 'string',
261                  'required' => true,
262                ],
263              ],
264            ],
265          ]
266        ]
267    );
268  }
269}
270
271// Adding a class alias for backwards compatibility with the previous class name.
272class_alias(ServiceConsumerManagement::class, 'Google_Service_ServiceConsumerManagement');
273