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 Area120Tables (v1alpha1).
24 *
25 * <p>
26</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://support.google.com/area120-tables/answer/10011390" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class Area120Tables extends \Google\Service
36{
37  /** See, edit, create, and delete all of your Google Drive files. */
38  const DRIVE =
39      "https://www.googleapis.com/auth/drive";
40  /** See, edit, create, and delete only the specific Google Drive files you use with this app. */
41  const DRIVE_FILE =
42      "https://www.googleapis.com/auth/drive.file";
43  /** See and download all your Google Drive files. */
44  const DRIVE_READONLY =
45      "https://www.googleapis.com/auth/drive.readonly";
46  /** See, edit, create, and delete all your Google Sheets spreadsheets. */
47  const SPREADSHEETS =
48      "https://www.googleapis.com/auth/spreadsheets";
49  /** See all your Google Sheets spreadsheets. */
50  const SPREADSHEETS_READONLY =
51      "https://www.googleapis.com/auth/spreadsheets.readonly";
52  /** See, edit, create, and delete your tables in Tables by Area 120. */
53  const TABLES =
54      "https://www.googleapis.com/auth/tables";
55
56  public $tables;
57  public $tables_rows;
58  public $workspaces;
59
60  /**
61   * Constructs the internal representation of the Area120Tables service.
62   *
63   * @param Client|array $clientOrConfig The client used to deliver requests, or a
64   *                                     config array to pass to a new Client instance.
65   * @param string $rootUrl The root URL used for requests to the service.
66   */
67  public function __construct($clientOrConfig = [], $rootUrl = null)
68  {
69    parent::__construct($clientOrConfig);
70    $this->rootUrl = $rootUrl ?: 'https://area120tables.googleapis.com/';
71    $this->servicePath = '';
72    $this->batchPath = 'batch';
73    $this->version = 'v1alpha1';
74    $this->serviceName = 'area120tables';
75
76    $this->tables = new Area120Tables\Resource\Tables(
77        $this,
78        $this->serviceName,
79        'tables',
80        [
81          'methods' => [
82            'get' => [
83              'path' => 'v1alpha1/{+name}',
84              'httpMethod' => 'GET',
85              'parameters' => [
86                'name' => [
87                  'location' => 'path',
88                  'type' => 'string',
89                  'required' => true,
90                ],
91              ],
92            ],'list' => [
93              'path' => 'v1alpha1/tables',
94              'httpMethod' => 'GET',
95              'parameters' => [
96                'orderBy' => [
97                  'location' => 'query',
98                  'type' => 'string',
99                ],
100                'pageSize' => [
101                  'location' => 'query',
102                  'type' => 'integer',
103                ],
104                'pageToken' => [
105                  'location' => 'query',
106                  'type' => 'string',
107                ],
108              ],
109            ],
110          ]
111        ]
112    );
113    $this->tables_rows = new Area120Tables\Resource\TablesRows(
114        $this,
115        $this->serviceName,
116        'rows',
117        [
118          'methods' => [
119            'batchCreate' => [
120              'path' => 'v1alpha1/{+parent}/rows:batchCreate',
121              'httpMethod' => 'POST',
122              'parameters' => [
123                'parent' => [
124                  'location' => 'path',
125                  'type' => 'string',
126                  'required' => true,
127                ],
128              ],
129            ],'batchDelete' => [
130              'path' => 'v1alpha1/{+parent}/rows:batchDelete',
131              'httpMethod' => 'POST',
132              'parameters' => [
133                'parent' => [
134                  'location' => 'path',
135                  'type' => 'string',
136                  'required' => true,
137                ],
138              ],
139            ],'batchUpdate' => [
140              'path' => 'v1alpha1/{+parent}/rows:batchUpdate',
141              'httpMethod' => 'POST',
142              'parameters' => [
143                'parent' => [
144                  'location' => 'path',
145                  'type' => 'string',
146                  'required' => true,
147                ],
148              ],
149            ],'create' => [
150              'path' => 'v1alpha1/{+parent}/rows',
151              'httpMethod' => 'POST',
152              'parameters' => [
153                'parent' => [
154                  'location' => 'path',
155                  'type' => 'string',
156                  'required' => true,
157                ],
158                'view' => [
159                  'location' => 'query',
160                  'type' => 'string',
161                ],
162              ],
163            ],'delete' => [
164              'path' => 'v1alpha1/{+name}',
165              'httpMethod' => 'DELETE',
166              'parameters' => [
167                'name' => [
168                  'location' => 'path',
169                  'type' => 'string',
170                  'required' => true,
171                ],
172              ],
173            ],'get' => [
174              'path' => 'v1alpha1/{+name}',
175              'httpMethod' => 'GET',
176              'parameters' => [
177                'name' => [
178                  'location' => 'path',
179                  'type' => 'string',
180                  'required' => true,
181                ],
182                'view' => [
183                  'location' => 'query',
184                  'type' => 'string',
185                ],
186              ],
187            ],'list' => [
188              'path' => 'v1alpha1/{+parent}/rows',
189              'httpMethod' => 'GET',
190              'parameters' => [
191                'parent' => [
192                  'location' => 'path',
193                  'type' => 'string',
194                  'required' => true,
195                ],
196                'filter' => [
197                  'location' => 'query',
198                  'type' => 'string',
199                ],
200                'orderBy' => [
201                  'location' => 'query',
202                  'type' => 'string',
203                ],
204                'pageSize' => [
205                  'location' => 'query',
206                  'type' => 'integer',
207                ],
208                'pageToken' => [
209                  'location' => 'query',
210                  'type' => 'string',
211                ],
212                'view' => [
213                  'location' => 'query',
214                  'type' => 'string',
215                ],
216              ],
217            ],'patch' => [
218              'path' => 'v1alpha1/{+name}',
219              'httpMethod' => 'PATCH',
220              'parameters' => [
221                'name' => [
222                  'location' => 'path',
223                  'type' => 'string',
224                  'required' => true,
225                ],
226                'updateMask' => [
227                  'location' => 'query',
228                  'type' => 'string',
229                ],
230                'view' => [
231                  'location' => 'query',
232                  'type' => 'string',
233                ],
234              ],
235            ],
236          ]
237        ]
238    );
239    $this->workspaces = new Area120Tables\Resource\Workspaces(
240        $this,
241        $this->serviceName,
242        'workspaces',
243        [
244          'methods' => [
245            'get' => [
246              'path' => 'v1alpha1/{+name}',
247              'httpMethod' => 'GET',
248              'parameters' => [
249                'name' => [
250                  'location' => 'path',
251                  'type' => 'string',
252                  'required' => true,
253                ],
254              ],
255            ],'list' => [
256              'path' => 'v1alpha1/workspaces',
257              'httpMethod' => 'GET',
258              'parameters' => [
259                'pageSize' => [
260                  'location' => 'query',
261                  'type' => 'integer',
262                ],
263                'pageToken' => [
264                  'location' => 'query',
265                  'type' => 'string',
266                ],
267              ],
268            ],
269          ]
270        ]
271    );
272  }
273}
274
275// Adding a class alias for backwards compatibility with the previous class name.
276class_alias(Area120Tables::class, 'Google_Service_Area120Tables');
277