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