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 BigQueryReservation (v1).
24 *
25 * <p>
26 * A service to modify your BigQuery flat-rate reservations.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/bigquery/" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class BigQueryReservation extends \Google\Service
36{
37  /** View and manage your data in Google BigQuery and see the email address for your Google Account. */
38  const BIGQUERY =
39      "https://www.googleapis.com/auth/bigquery";
40  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
41  const CLOUD_PLATFORM =
42      "https://www.googleapis.com/auth/cloud-platform";
43
44  public $projects_locations;
45  public $projects_locations_capacityCommitments;
46  public $projects_locations_reservations;
47  public $projects_locations_reservations_assignments;
48
49  /**
50   * Constructs the internal representation of the BigQueryReservation 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://bigqueryreservation.googleapis.com/';
60    $this->servicePath = '';
61    $this->batchPath = 'batch';
62    $this->version = 'v1';
63    $this->serviceName = 'bigqueryreservation';
64
65    $this->projects_locations = new BigQueryReservation\Resource\ProjectsLocations(
66        $this,
67        $this->serviceName,
68        'locations',
69        [
70          'methods' => [
71            'getBiReservation' => [
72              'path' => 'v1/{+name}',
73              'httpMethod' => 'GET',
74              'parameters' => [
75                'name' => [
76                  'location' => 'path',
77                  'type' => 'string',
78                  'required' => true,
79                ],
80              ],
81            ],'searchAllAssignments' => [
82              'path' => 'v1/{+parent}:searchAllAssignments',
83              'httpMethod' => 'GET',
84              'parameters' => [
85                'parent' => [
86                  'location' => 'path',
87                  'type' => 'string',
88                  'required' => true,
89                ],
90                'pageSize' => [
91                  'location' => 'query',
92                  'type' => 'integer',
93                ],
94                'pageToken' => [
95                  'location' => 'query',
96                  'type' => 'string',
97                ],
98                'query' => [
99                  'location' => 'query',
100                  'type' => 'string',
101                ],
102              ],
103            ],'searchAssignments' => [
104              'path' => 'v1/{+parent}:searchAssignments',
105              'httpMethod' => 'GET',
106              'parameters' => [
107                'parent' => [
108                  'location' => 'path',
109                  'type' => 'string',
110                  'required' => true,
111                ],
112                'pageSize' => [
113                  'location' => 'query',
114                  'type' => 'integer',
115                ],
116                'pageToken' => [
117                  'location' => 'query',
118                  'type' => 'string',
119                ],
120                'query' => [
121                  'location' => 'query',
122                  'type' => 'string',
123                ],
124              ],
125            ],'updateBiReservation' => [
126              'path' => 'v1/{+name}',
127              'httpMethod' => 'PATCH',
128              'parameters' => [
129                'name' => [
130                  'location' => 'path',
131                  'type' => 'string',
132                  'required' => true,
133                ],
134                'updateMask' => [
135                  'location' => 'query',
136                  'type' => 'string',
137                ],
138              ],
139            ],
140          ]
141        ]
142    );
143    $this->projects_locations_capacityCommitments = new BigQueryReservation\Resource\ProjectsLocationsCapacityCommitments(
144        $this,
145        $this->serviceName,
146        'capacityCommitments',
147        [
148          'methods' => [
149            'create' => [
150              'path' => 'v1/{+parent}/capacityCommitments',
151              'httpMethod' => 'POST',
152              'parameters' => [
153                'parent' => [
154                  'location' => 'path',
155                  'type' => 'string',
156                  'required' => true,
157                ],
158                'capacityCommitmentId' => [
159                  'location' => 'query',
160                  'type' => 'string',
161                ],
162                'enforceSingleAdminProjectPerOrg' => [
163                  'location' => 'query',
164                  'type' => 'boolean',
165                ],
166              ],
167            ],'delete' => [
168              'path' => 'v1/{+name}',
169              'httpMethod' => 'DELETE',
170              'parameters' => [
171                'name' => [
172                  'location' => 'path',
173                  'type' => 'string',
174                  'required' => true,
175                ],
176                'force' => [
177                  'location' => 'query',
178                  'type' => 'boolean',
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}/capacityCommitments',
193              'httpMethod' => 'GET',
194              'parameters' => [
195                'parent' => [
196                  'location' => 'path',
197                  'type' => 'string',
198                  'required' => true,
199                ],
200                'pageSize' => [
201                  'location' => 'query',
202                  'type' => 'integer',
203                ],
204                'pageToken' => [
205                  'location' => 'query',
206                  'type' => 'string',
207                ],
208              ],
209            ],'merge' => [
210              'path' => 'v1/{+parent}/capacityCommitments:merge',
211              'httpMethod' => 'POST',
212              'parameters' => [
213                'parent' => [
214                  'location' => 'path',
215                  'type' => 'string',
216                  'required' => true,
217                ],
218              ],
219            ],'patch' => [
220              'path' => 'v1/{+name}',
221              'httpMethod' => 'PATCH',
222              'parameters' => [
223                'name' => [
224                  'location' => 'path',
225                  'type' => 'string',
226                  'required' => true,
227                ],
228                'updateMask' => [
229                  'location' => 'query',
230                  'type' => 'string',
231                ],
232              ],
233            ],'split' => [
234              'path' => 'v1/{+name}:split',
235              'httpMethod' => 'POST',
236              'parameters' => [
237                'name' => [
238                  'location' => 'path',
239                  'type' => 'string',
240                  'required' => true,
241                ],
242              ],
243            ],
244          ]
245        ]
246    );
247    $this->projects_locations_reservations = new BigQueryReservation\Resource\ProjectsLocationsReservations(
248        $this,
249        $this->serviceName,
250        'reservations',
251        [
252          'methods' => [
253            'create' => [
254              'path' => 'v1/{+parent}/reservations',
255              'httpMethod' => 'POST',
256              'parameters' => [
257                'parent' => [
258                  'location' => 'path',
259                  'type' => 'string',
260                  'required' => true,
261                ],
262                'reservationId' => [
263                  'location' => 'query',
264                  'type' => 'string',
265                ],
266              ],
267            ],'delete' => [
268              'path' => 'v1/{+name}',
269              'httpMethod' => 'DELETE',
270              'parameters' => [
271                'name' => [
272                  'location' => 'path',
273                  'type' => 'string',
274                  'required' => true,
275                ],
276              ],
277            ],'get' => [
278              'path' => 'v1/{+name}',
279              'httpMethod' => 'GET',
280              'parameters' => [
281                'name' => [
282                  'location' => 'path',
283                  'type' => 'string',
284                  'required' => true,
285                ],
286              ],
287            ],'list' => [
288              'path' => 'v1/{+parent}/reservations',
289              'httpMethod' => 'GET',
290              'parameters' => [
291                'parent' => [
292                  'location' => 'path',
293                  'type' => 'string',
294                  'required' => true,
295                ],
296                'pageSize' => [
297                  'location' => 'query',
298                  'type' => 'integer',
299                ],
300                'pageToken' => [
301                  'location' => 'query',
302                  'type' => 'string',
303                ],
304              ],
305            ],'patch' => [
306              'path' => 'v1/{+name}',
307              'httpMethod' => 'PATCH',
308              'parameters' => [
309                'name' => [
310                  'location' => 'path',
311                  'type' => 'string',
312                  'required' => true,
313                ],
314                'updateMask' => [
315                  'location' => 'query',
316                  'type' => 'string',
317                ],
318              ],
319            ],
320          ]
321        ]
322    );
323    $this->projects_locations_reservations_assignments = new BigQueryReservation\Resource\ProjectsLocationsReservationsAssignments(
324        $this,
325        $this->serviceName,
326        'assignments',
327        [
328          'methods' => [
329            'create' => [
330              'path' => 'v1/{+parent}/assignments',
331              'httpMethod' => 'POST',
332              'parameters' => [
333                'parent' => [
334                  'location' => 'path',
335                  'type' => 'string',
336                  'required' => true,
337                ],
338                'assignmentId' => [
339                  'location' => 'query',
340                  'type' => 'string',
341                ],
342              ],
343            ],'delete' => [
344              'path' => 'v1/{+name}',
345              'httpMethod' => 'DELETE',
346              'parameters' => [
347                'name' => [
348                  'location' => 'path',
349                  'type' => 'string',
350                  'required' => true,
351                ],
352              ],
353            ],'list' => [
354              'path' => 'v1/{+parent}/assignments',
355              'httpMethod' => 'GET',
356              'parameters' => [
357                'parent' => [
358                  'location' => 'path',
359                  'type' => 'string',
360                  'required' => true,
361                ],
362                'pageSize' => [
363                  'location' => 'query',
364                  'type' => 'integer',
365                ],
366                'pageToken' => [
367                  'location' => 'query',
368                  'type' => 'string',
369                ],
370              ],
371            ],'move' => [
372              'path' => 'v1/{+name}:move',
373              'httpMethod' => 'POST',
374              'parameters' => [
375                'name' => [
376                  'location' => 'path',
377                  'type' => 'string',
378                  'required' => true,
379                ],
380              ],
381            ],'patch' => [
382              'path' => 'v1/{+name}',
383              'httpMethod' => 'PATCH',
384              'parameters' => [
385                'name' => [
386                  'location' => 'path',
387                  'type' => 'string',
388                  'required' => true,
389                ],
390                'updateMask' => [
391                  'location' => 'query',
392                  'type' => 'string',
393                ],
394              ],
395            ],
396          ]
397        ]
398    );
399  }
400}
401
402// Adding a class alias for backwards compatibility with the previous class name.
403class_alias(BigQueryReservation::class, 'Google_Service_BigQueryReservation');
404