source: vendor/google/apiclient-services/src/Script.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload project files

  • Property mode set to 100644
File size: 15.1 KB
Line 
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 Script (v1).
24 *
25 * <p>
26 * Manages and executes Google Apps Script projects.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://developers.google.com/apps-script/api/" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class Script extends \Google\Service
36{
37 /** Read, compose, send, and permanently delete all your email from Gmail. */
38 const MAIL_GOOGLE_COM =
39 "https://mail.google.com/";
40 /** See, edit, share, and permanently delete all the calendars you can access using Google Calendar. */
41 const WWW_GOOGLE_COM_CALENDAR_FEEDS =
42 "https://www.google.com/calendar/feeds";
43 /** See, edit, download, and permanently delete your contacts. */
44 const WWW_GOOGLE_COM_M8_FEEDS =
45 "https://www.google.com/m8/feeds";
46 /** View and manage the provisioning of groups on your domain. */
47 const ADMIN_DIRECTORY_GROUP =
48 "https://www.googleapis.com/auth/admin.directory.group";
49 /** View and manage the provisioning of users on your domain. */
50 const ADMIN_DIRECTORY_USER =
51 "https://www.googleapis.com/auth/admin.directory.user";
52 /** See, edit, create, and delete all your Google Docs documents. */
53 const DOCUMENTS =
54 "https://www.googleapis.com/auth/documents";
55 /** See, edit, create, and delete all of your Google Drive files. */
56 const DRIVE =
57 "https://www.googleapis.com/auth/drive";
58 /** View and manage your forms in Google Drive. */
59 const FORMS =
60 "https://www.googleapis.com/auth/forms";
61 /** View and manage forms that this application has been installed in. */
62 const FORMS_CURRENTONLY =
63 "https://www.googleapis.com/auth/forms.currentonly";
64 /** View and manage your Google Groups. */
65 const GROUPS =
66 "https://www.googleapis.com/auth/groups";
67 /** Create and update Google Apps Script deployments. */
68 const SCRIPT_DEPLOYMENTS =
69 "https://www.googleapis.com/auth/script.deployments";
70 /** View Google Apps Script deployments. */
71 const SCRIPT_DEPLOYMENTS_READONLY =
72 "https://www.googleapis.com/auth/script.deployments.readonly";
73 /** View Google Apps Script project's metrics. */
74 const SCRIPT_METRICS =
75 "https://www.googleapis.com/auth/script.metrics";
76 /** View Google Apps Script processes. */
77 const SCRIPT_PROCESSES =
78 "https://www.googleapis.com/auth/script.processes";
79 /** Create and update Google Apps Script projects. */
80 const SCRIPT_PROJECTS =
81 "https://www.googleapis.com/auth/script.projects";
82 /** View Google Apps Script projects. */
83 const SCRIPT_PROJECTS_READONLY =
84 "https://www.googleapis.com/auth/script.projects.readonly";
85 /** See, edit, create, and delete all your Google Sheets spreadsheets. */
86 const SPREADSHEETS =
87 "https://www.googleapis.com/auth/spreadsheets";
88 /** See your primary Google Account email address. */
89 const USERINFO_EMAIL =
90 "https://www.googleapis.com/auth/userinfo.email";
91
92 public $processes;
93 public $projects;
94 public $projects_deployments;
95 public $projects_versions;
96 public $scripts;
97 public $rootUrlTemplate;
98
99 /**
100 * Constructs the internal representation of the Script service.
101 *
102 * @param Client|array $clientOrConfig The client used to deliver requests, or a
103 * config array to pass to a new Client instance.
104 * @param string $rootUrl The root URL used for requests to the service.
105 */
106 public function __construct($clientOrConfig = [], $rootUrl = null)
107 {
108 parent::__construct($clientOrConfig);
109 $this->rootUrl = $rootUrl ?: 'https://script.googleapis.com/';
110 $this->rootUrlTemplate = $rootUrl ?: 'https://script.UNIVERSE_DOMAIN/';
111 $this->servicePath = '';
112 $this->batchPath = 'batch';
113 $this->version = 'v1';
114 $this->serviceName = 'script';
115
116 $this->processes = new Script\Resource\Processes(
117 $this,
118 $this->serviceName,
119 'processes',
120 [
121 'methods' => [
122 'list' => [
123 'path' => 'v1/processes',
124 'httpMethod' => 'GET',
125 'parameters' => [
126 'pageSize' => [
127 'location' => 'query',
128 'type' => 'integer',
129 ],
130 'pageToken' => [
131 'location' => 'query',
132 'type' => 'string',
133 ],
134 'userProcessFilter.deploymentId' => [
135 'location' => 'query',
136 'type' => 'string',
137 ],
138 'userProcessFilter.endTime' => [
139 'location' => 'query',
140 'type' => 'string',
141 ],
142 'userProcessFilter.functionName' => [
143 'location' => 'query',
144 'type' => 'string',
145 ],
146 'userProcessFilter.projectName' => [
147 'location' => 'query',
148 'type' => 'string',
149 ],
150 'userProcessFilter.scriptId' => [
151 'location' => 'query',
152 'type' => 'string',
153 ],
154 'userProcessFilter.startTime' => [
155 'location' => 'query',
156 'type' => 'string',
157 ],
158 'userProcessFilter.statuses' => [
159 'location' => 'query',
160 'type' => 'string',
161 'repeated' => true,
162 ],
163 'userProcessFilter.types' => [
164 'location' => 'query',
165 'type' => 'string',
166 'repeated' => true,
167 ],
168 'userProcessFilter.userAccessLevels' => [
169 'location' => 'query',
170 'type' => 'string',
171 'repeated' => true,
172 ],
173 ],
174 ],'listScriptProcesses' => [
175 'path' => 'v1/processes:listScriptProcesses',
176 'httpMethod' => 'GET',
177 'parameters' => [
178 'pageSize' => [
179 'location' => 'query',
180 'type' => 'integer',
181 ],
182 'pageToken' => [
183 'location' => 'query',
184 'type' => 'string',
185 ],
186 'scriptId' => [
187 'location' => 'query',
188 'type' => 'string',
189 ],
190 'scriptProcessFilter.deploymentId' => [
191 'location' => 'query',
192 'type' => 'string',
193 ],
194 'scriptProcessFilter.endTime' => [
195 'location' => 'query',
196 'type' => 'string',
197 ],
198 'scriptProcessFilter.functionName' => [
199 'location' => 'query',
200 'type' => 'string',
201 ],
202 'scriptProcessFilter.startTime' => [
203 'location' => 'query',
204 'type' => 'string',
205 ],
206 'scriptProcessFilter.statuses' => [
207 'location' => 'query',
208 'type' => 'string',
209 'repeated' => true,
210 ],
211 'scriptProcessFilter.types' => [
212 'location' => 'query',
213 'type' => 'string',
214 'repeated' => true,
215 ],
216 'scriptProcessFilter.userAccessLevels' => [
217 'location' => 'query',
218 'type' => 'string',
219 'repeated' => true,
220 ],
221 ],
222 ],
223 ]
224 ]
225 );
226 $this->projects = new Script\Resource\Projects(
227 $this,
228 $this->serviceName,
229 'projects',
230 [
231 'methods' => [
232 'create' => [
233 'path' => 'v1/projects',
234 'httpMethod' => 'POST',
235 'parameters' => [],
236 ],'get' => [
237 'path' => 'v1/projects/{scriptId}',
238 'httpMethod' => 'GET',
239 'parameters' => [
240 'scriptId' => [
241 'location' => 'path',
242 'type' => 'string',
243 'required' => true,
244 ],
245 ],
246 ],'getContent' => [
247 'path' => 'v1/projects/{scriptId}/content',
248 'httpMethod' => 'GET',
249 'parameters' => [
250 'scriptId' => [
251 'location' => 'path',
252 'type' => 'string',
253 'required' => true,
254 ],
255 'versionNumber' => [
256 'location' => 'query',
257 'type' => 'integer',
258 ],
259 ],
260 ],'getMetrics' => [
261 'path' => 'v1/projects/{scriptId}/metrics',
262 'httpMethod' => 'GET',
263 'parameters' => [
264 'scriptId' => [
265 'location' => 'path',
266 'type' => 'string',
267 'required' => true,
268 ],
269 'metricsFilter.deploymentId' => [
270 'location' => 'query',
271 'type' => 'string',
272 ],
273 'metricsGranularity' => [
274 'location' => 'query',
275 'type' => 'string',
276 ],
277 ],
278 ],'updateContent' => [
279 'path' => 'v1/projects/{scriptId}/content',
280 'httpMethod' => 'PUT',
281 'parameters' => [
282 'scriptId' => [
283 'location' => 'path',
284 'type' => 'string',
285 'required' => true,
286 ],
287 ],
288 ],
289 ]
290 ]
291 );
292 $this->projects_deployments = new Script\Resource\ProjectsDeployments(
293 $this,
294 $this->serviceName,
295 'deployments',
296 [
297 'methods' => [
298 'create' => [
299 'path' => 'v1/projects/{scriptId}/deployments',
300 'httpMethod' => 'POST',
301 'parameters' => [
302 'scriptId' => [
303 'location' => 'path',
304 'type' => 'string',
305 'required' => true,
306 ],
307 ],
308 ],'delete' => [
309 'path' => 'v1/projects/{scriptId}/deployments/{deploymentId}',
310 'httpMethod' => 'DELETE',
311 'parameters' => [
312 'scriptId' => [
313 'location' => 'path',
314 'type' => 'string',
315 'required' => true,
316 ],
317 'deploymentId' => [
318 'location' => 'path',
319 'type' => 'string',
320 'required' => true,
321 ],
322 ],
323 ],'get' => [
324 'path' => 'v1/projects/{scriptId}/deployments/{deploymentId}',
325 'httpMethod' => 'GET',
326 'parameters' => [
327 'scriptId' => [
328 'location' => 'path',
329 'type' => 'string',
330 'required' => true,
331 ],
332 'deploymentId' => [
333 'location' => 'path',
334 'type' => 'string',
335 'required' => true,
336 ],
337 ],
338 ],'list' => [
339 'path' => 'v1/projects/{scriptId}/deployments',
340 'httpMethod' => 'GET',
341 'parameters' => [
342 'scriptId' => [
343 'location' => 'path',
344 'type' => 'string',
345 'required' => true,
346 ],
347 'pageSize' => [
348 'location' => 'query',
349 'type' => 'integer',
350 ],
351 'pageToken' => [
352 'location' => 'query',
353 'type' => 'string',
354 ],
355 ],
356 ],'update' => [
357 'path' => 'v1/projects/{scriptId}/deployments/{deploymentId}',
358 'httpMethod' => 'PUT',
359 'parameters' => [
360 'scriptId' => [
361 'location' => 'path',
362 'type' => 'string',
363 'required' => true,
364 ],
365 'deploymentId' => [
366 'location' => 'path',
367 'type' => 'string',
368 'required' => true,
369 ],
370 ],
371 ],
372 ]
373 ]
374 );
375 $this->projects_versions = new Script\Resource\ProjectsVersions(
376 $this,
377 $this->serviceName,
378 'versions',
379 [
380 'methods' => [
381 'create' => [
382 'path' => 'v1/projects/{scriptId}/versions',
383 'httpMethod' => 'POST',
384 'parameters' => [
385 'scriptId' => [
386 'location' => 'path',
387 'type' => 'string',
388 'required' => true,
389 ],
390 ],
391 ],'get' => [
392 'path' => 'v1/projects/{scriptId}/versions/{versionNumber}',
393 'httpMethod' => 'GET',
394 'parameters' => [
395 'scriptId' => [
396 'location' => 'path',
397 'type' => 'string',
398 'required' => true,
399 ],
400 'versionNumber' => [
401 'location' => 'path',
402 'type' => 'integer',
403 'required' => true,
404 ],
405 ],
406 ],'list' => [
407 'path' => 'v1/projects/{scriptId}/versions',
408 'httpMethod' => 'GET',
409 'parameters' => [
410 'scriptId' => [
411 'location' => 'path',
412 'type' => 'string',
413 'required' => true,
414 ],
415 'pageSize' => [
416 'location' => 'query',
417 'type' => 'integer',
418 ],
419 'pageToken' => [
420 'location' => 'query',
421 'type' => 'string',
422 ],
423 ],
424 ],
425 ]
426 ]
427 );
428 $this->scripts = new Script\Resource\Scripts(
429 $this,
430 $this->serviceName,
431 'scripts',
432 [
433 'methods' => [
434 'run' => [
435 'path' => 'v1/scripts/{scriptId}:run',
436 'httpMethod' => 'POST',
437 'parameters' => [
438 'scriptId' => [
439 'location' => 'path',
440 'type' => 'string',
441 'required' => true,
442 ],
443 ],
444 ],
445 ]
446 ]
447 );
448 }
449}
450
451// Adding a class alias for backwards compatibility with the previous class name.
452class_alias(Script::class, 'Google_Service_Script');
Note: See TracBrowser for help on using the repository browser.