[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Copyright 2010 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 Taskqueue (v1beta2). 20 * 21 * <p> 22 * Lets you access a Google App Engine Pull Task Queue over REST. 23 * </p> 24 * 25 * <p> 26 * For more information about this service, see the API 27 * <a href="https://developers.google.com/appengine/docs/python/taskqueue/rest" target="_blank">Documentation</a> 28 * </p> 29 * 30 * @author Google, Inc. 31 */ 32 class Google_Service_Taskqueue extends Google_Service 33 { 34 /** Manage your Tasks and Taskqueues. */ 35 const TASKQUEUE = "https://www.googleapis.com/auth/taskqueue"; 36 /** Consume Tasks from your Taskqueues. */ 37 const TASKQUEUE_CONSUMER = "https://www.googleapis.com/auth/taskqueue.consumer"; 38 39 public $taskqueues; 40 public $tasks; 41 42 43 /** 44 * Constructs the internal representation of the Taskqueue service. 45 * 46 * @param Google_Client $client 47 */ 48 public function __construct(Google_Client $client) 49 { 50 parent::__construct($client); 51 $this->servicePath = 'taskqueue/v1beta2/projects/'; 52 $this->version = 'v1beta2'; 53 $this->serviceName = 'taskqueue'; 54 55 $this->taskqueues = new Google_Service_Taskqueue_Taskqueues_Resource( 56 $this, 57 $this->serviceName, 58 'taskqueues', 59 array( 60 'methods' => array( 61 'get' => array( 62 'path' => '{project}/taskqueues/{taskqueue}', 63 'httpMethod' => 'GET', 64 'parameters' => array( 65 'project' => array( 66 'location' => 'path', 67 'type' => 'string', 68 'required' => true, 69 ), 70 'taskqueue' => array( 71 'location' => 'path', 72 'type' => 'string', 73 'required' => true, 74 ), 75 'getStats' => array( 76 'location' => 'query', 77 'type' => 'boolean', 78 ), 79 ), 80 ), 81 ) 82 ) 83 ); 84 $this->tasks = new Google_Service_Taskqueue_Tasks_Resource( 85 $this, 86 $this->serviceName, 87 'tasks', 88 array( 89 'methods' => array( 90 'delete' => array( 91 'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}', 92 'httpMethod' => 'DELETE', 93 'parameters' => array( 94 'project' => array( 95 'location' => 'path', 96 'type' => 'string', 97 'required' => true, 98 ), 99 'taskqueue' => array( 100 'location' => 'path', 101 'type' => 'string', 102 'required' => true, 103 ), 104 'task' => array( 105 'location' => 'path', 106 'type' => 'string', 107 'required' => true, 108 ), 109 ), 110 ),'get' => array( 111 'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}', 112 'httpMethod' => 'GET', 113 'parameters' => array( 114 'project' => array( 115 'location' => 'path', 116 'type' => 'string', 117 'required' => true, 118 ), 119 'taskqueue' => array( 120 'location' => 'path', 121 'type' => 'string', 122 'required' => true, 123 ), 124 'task' => array( 125 'location' => 'path', 126 'type' => 'string', 127 'required' => true, 128 ), 129 ), 130 ),'insert' => array( 131 'path' => '{project}/taskqueues/{taskqueue}/tasks', 132 'httpMethod' => 'POST', 133 'parameters' => array( 134 'project' => array( 135 'location' => 'path', 136 'type' => 'string', 137 'required' => true, 138 ), 139 'taskqueue' => array( 140 'location' => 'path', 141 'type' => 'string', 142 'required' => true, 143 ), 144 ), 145 ),'lease' => array( 146 'path' => '{project}/taskqueues/{taskqueue}/tasks/lease', 147 'httpMethod' => 'POST', 148 'parameters' => array( 149 'project' => array( 150 'location' => 'path', 151 'type' => 'string', 152 'required' => true, 153 ), 154 'taskqueue' => array( 155 'location' => 'path', 156 'type' => 'string', 157 'required' => true, 158 ), 159 'numTasks' => array( 160 'location' => 'query', 161 'type' => 'integer', 162 'required' => true, 163 ), 164 'leaseSecs' => array( 165 'location' => 'query', 166 'type' => 'integer', 167 'required' => true, 168 ), 169 'groupByTag' => array( 170 'location' => 'query', 171 'type' => 'boolean', 172 ), 173 'tag' => array( 174 'location' => 'query', 175 'type' => 'string', 176 ), 177 ), 178 ),'list' => array( 179 'path' => '{project}/taskqueues/{taskqueue}/tasks', 180 'httpMethod' => 'GET', 181 'parameters' => array( 182 'project' => array( 183 'location' => 'path', 184 'type' => 'string', 185 'required' => true, 186 ), 187 'taskqueue' => array( 188 'location' => 'path', 189 'type' => 'string', 190 'required' => true, 191 ), 192 ), 193 ),'patch' => array( 194 'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}', 195 'httpMethod' => 'PATCH', 196 'parameters' => array( 197 'project' => array( 198 'location' => 'path', 199 'type' => 'string', 200 'required' => true, 201 ), 202 'taskqueue' => array( 203 'location' => 'path', 204 'type' => 'string', 205 'required' => true, 206 ), 207 'task' => array( 208 'location' => 'path', 209 'type' => 'string', 210 'required' => true, 211 ), 212 'newLeaseSeconds' => array( 213 'location' => 'query', 214 'type' => 'integer', 215 'required' => true, 216 ), 217 ), 218 ),'update' => array( 219 'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}', 220 'httpMethod' => 'POST', 221 'parameters' => array( 222 'project' => array( 223 'location' => 'path', 224 'type' => 'string', 225 'required' => true, 226 ), 227 'taskqueue' => array( 228 'location' => 'path', 229 'type' => 'string', 230 'required' => true, 231 ), 232 'task' => array( 233 'location' => 'path', 234 'type' => 'string', 235 'required' => true, 236 ), 237 'newLeaseSeconds' => array( 238 'location' => 'query', 239 'type' => 'integer', 240 'required' => true, 241 ), 242 ), 243 ), 244 ) 245 ) 246 ); 247 } 248 } 249 250 251 /** 252 * The "taskqueues" collection of methods. 253 * Typical usage is: 254 * <code> 255 * $taskqueueService = new Google_Service_Taskqueue(...); 256 * $taskqueues = $taskqueueService->taskqueues; 257 * </code> 258 */ 259 class Google_Service_Taskqueue_Taskqueues_Resource extends Google_Service_Resource 260 { 261 262 /** 263 * Get detailed information about a TaskQueue. (taskqueues.get) 264 * 265 * @param string $project 266 * The project under which the queue lies. 267 * @param string $taskqueue 268 * The id of the taskqueue to get the properties of. 269 * @param array $optParams Optional parameters. 270 * 271 * @opt_param bool getStats 272 * Whether to get stats. Optional. 273 * @return Google_Service_Taskqueue_TaskQueue 274 */ 275 public function get($project, $taskqueue, $optParams = array()) 276 { 277 $params = array('project' => $project, 'taskqueue' => $taskqueue); 278 $params = array_merge($params, $optParams); 279 return $this->call('get', array($params), "Google_Service_Taskqueue_TaskQueue"); 280 } 281 } 282 283 /** 284 * The "tasks" collection of methods. 285 * Typical usage is: 286 * <code> 287 * $taskqueueService = new Google_Service_Taskqueue(...); 288 * $tasks = $taskqueueService->tasks; 289 * </code> 290 */ 291 class Google_Service_Taskqueue_Tasks_Resource extends Google_Service_Resource 292 { 293 294 /** 295 * Delete a task from a TaskQueue. (tasks.delete) 296 * 297 * @param string $project 298 * The project under which the queue lies. 299 * @param string $taskqueue 300 * The taskqueue to delete a task from. 301 * @param string $task 302 * The id of the task to delete. 303 * @param array $optParams Optional parameters. 304 */ 305 public function delete($project, $taskqueue, $task, $optParams = array()) 306 { 307 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task); 308 $params = array_merge($params, $optParams); 309 return $this->call('delete', array($params)); 310 } 311 /** 312 * Get a particular task from a TaskQueue. (tasks.get) 313 * 314 * @param string $project 315 * The project under which the queue lies. 316 * @param string $taskqueue 317 * The taskqueue in which the task belongs. 318 * @param string $task 319 * The task to get properties of. 320 * @param array $optParams Optional parameters. 321 * @return Google_Service_Taskqueue_Task 322 */ 323 public function get($project, $taskqueue, $task, $optParams = array()) 324 { 325 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task); 326 $params = array_merge($params, $optParams); 327 return $this->call('get', array($params), "Google_Service_Taskqueue_Task"); 328 } 329 /** 330 * Insert a new task in a TaskQueue (tasks.insert) 331 * 332 * @param string $project 333 * The project under which the queue lies 334 * @param string $taskqueue 335 * The taskqueue to insert the task into 336 * @param Google_Task $postBody 337 * @param array $optParams Optional parameters. 338 * @return Google_Service_Taskqueue_Task 339 */ 340 public function insert($project, $taskqueue, Google_Service_Taskqueue_Task $postBody, $optParams = array()) 341 { 342 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'postBody' => $postBody); 343 $params = array_merge($params, $optParams); 344 return $this->call('insert', array($params), "Google_Service_Taskqueue_Task"); 345 } 346 /** 347 * Lease 1 or more tasks from a TaskQueue. (tasks.lease) 348 * 349 * @param string $project 350 * The project under which the queue lies. 351 * @param string $taskqueue 352 * The taskqueue to lease a task from. 353 * @param int $numTasks 354 * The number of tasks to lease. 355 * @param int $leaseSecs 356 * The lease in seconds. 357 * @param array $optParams Optional parameters. 358 * 359 * @opt_param bool groupByTag 360 * When true, all returned tasks will have the same tag 361 * @opt_param string tag 362 * The tag allowed for tasks in the response. Must only be specified if group_by_tag is true. If 363 * group_by_tag is true and tag is not specified the tag will be that of the oldest task by eta, 364 * i.e. the first available tag 365 * @return Google_Service_Taskqueue_Tasks 366 */ 367 public function lease($project, $taskqueue, $numTasks, $leaseSecs, $optParams = array()) 368 { 369 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'numTasks' => $numTasks, 'leaseSecs' => $leaseSecs); 370 $params = array_merge($params, $optParams); 371 return $this->call('lease', array($params), "Google_Service_Taskqueue_Tasks"); 372 } 373 /** 374 * List Tasks in a TaskQueue (tasks.listTasks) 375 * 376 * @param string $project 377 * The project under which the queue lies. 378 * @param string $taskqueue 379 * The id of the taskqueue to list tasks from. 380 * @param array $optParams Optional parameters. 381 * @return Google_Service_Taskqueue_Tasks2 382 */ 383 public function listTasks($project, $taskqueue, $optParams = array()) 384 { 385 $params = array('project' => $project, 'taskqueue' => $taskqueue); 386 $params = array_merge($params, $optParams); 387 return $this->call('list', array($params), "Google_Service_Taskqueue_Tasks2"); 388 } 389 /** 390 * Update tasks that are leased out of a TaskQueue. This method supports patch 391 * semantics. (tasks.patch) 392 * 393 * @param string $project 394 * The project under which the queue lies. 395 * @param string $taskqueue 396 * 397 * @param string $task 398 * 399 * @param int $newLeaseSeconds 400 * The new lease in seconds. 401 * @param Google_Task $postBody 402 * @param array $optParams Optional parameters. 403 * @return Google_Service_Taskqueue_Task 404 */ 405 public function patch($project, $taskqueue, $task, $newLeaseSeconds, Google_Service_Taskqueue_Task $postBody, $optParams = array()) 406 { 407 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task, 'newLeaseSeconds' => $newLeaseSeconds, 'postBody' => $postBody); 408 $params = array_merge($params, $optParams); 409 return $this->call('patch', array($params), "Google_Service_Taskqueue_Task"); 410 } 411 /** 412 * Update tasks that are leased out of a TaskQueue. (tasks.update) 413 * 414 * @param string $project 415 * The project under which the queue lies. 416 * @param string $taskqueue 417 * 418 * @param string $task 419 * 420 * @param int $newLeaseSeconds 421 * The new lease in seconds. 422 * @param Google_Task $postBody 423 * @param array $optParams Optional parameters. 424 * @return Google_Service_Taskqueue_Task 425 */ 426 public function update($project, $taskqueue, $task, $newLeaseSeconds, Google_Service_Taskqueue_Task $postBody, $optParams = array()) 427 { 428 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task, 'newLeaseSeconds' => $newLeaseSeconds, 'postBody' => $postBody); 429 $params = array_merge($params, $optParams); 430 return $this->call('update', array($params), "Google_Service_Taskqueue_Task"); 431 } 432 } 433 434 435 436 437 class Google_Service_Taskqueue_Task extends Google_Model 438 { 439 public $enqueueTimestamp; 440 public $id; 441 public $kind; 442 public $leaseTimestamp; 443 public $payloadBase64; 444 public $queueName; 445 public $retryCount; 446 public $tag; 447 448 public function setEnqueueTimestamp($enqueueTimestamp) 449 { 450 $this->enqueueTimestamp = $enqueueTimestamp; 451 } 452 453 public function getEnqueueTimestamp() 454 { 455 return $this->enqueueTimestamp; 456 } 457 458 public function setId($id) 459 { 460 $this->id = $id; 461 } 462 463 public function getId() 464 { 465 return $this->id; 466 } 467 468 public function setKind($kind) 469 { 470 $this->kind = $kind; 471 } 472 473 public function getKind() 474 { 475 return $this->kind; 476 } 477 478 public function setLeaseTimestamp($leaseTimestamp) 479 { 480 $this->leaseTimestamp = $leaseTimestamp; 481 } 482 483 public function getLeaseTimestamp() 484 { 485 return $this->leaseTimestamp; 486 } 487 488 public function setPayloadBase64($payloadBase64) 489 { 490 $this->payloadBase64 = $payloadBase64; 491 } 492 493 public function getPayloadBase64() 494 { 495 return $this->payloadBase64; 496 } 497 498 public function setQueueName($queueName) 499 { 500 $this->queueName = $queueName; 501 } 502 503 public function getQueueName() 504 { 505 return $this->queueName; 506 } 507 508 public function setRetryCount($retryCount) 509 { 510 $this->retryCount = $retryCount; 511 } 512 513 public function getRetryCount() 514 { 515 return $this->retryCount; 516 } 517 518 public function setTag($tag) 519 { 520 $this->tag = $tag; 521 } 522 523 public function getTag() 524 { 525 return $this->tag; 526 } 527 } 528 529 class Google_Service_Taskqueue_TaskQueue extends Google_Model 530 { 531 protected $aclType = 'Google_Service_Taskqueue_TaskQueueAcl'; 532 protected $aclDataType = ''; 533 public $id; 534 public $kind; 535 public $maxLeases; 536 protected $statsType = 'Google_Service_Taskqueue_TaskQueueStats'; 537 protected $statsDataType = ''; 538 539 public function setAcl(Google_Service_Taskqueue_TaskQueueAcl $acl) 540 { 541 $this->acl = $acl; 542 } 543 544 public function getAcl() 545 { 546 return $this->acl; 547 } 548 549 public function setId($id) 550 { 551 $this->id = $id; 552 } 553 554 public function getId() 555 { 556 return $this->id; 557 } 558 559 public function setKind($kind) 560 { 561 $this->kind = $kind; 562 } 563 564 public function getKind() 565 { 566 return $this->kind; 567 } 568 569 public function setMaxLeases($maxLeases) 570 { 571 $this->maxLeases = $maxLeases; 572 } 573 574 public function getMaxLeases() 575 { 576 return $this->maxLeases; 577 } 578 579 public function setStats(Google_Service_Taskqueue_TaskQueueStats $stats) 580 { 581 $this->stats = $stats; 582 } 583 584 public function getStats() 585 { 586 return $this->stats; 587 } 588 } 589 590 class Google_Service_Taskqueue_TaskQueueAcl extends Google_Collection 591 { 592 protected $collection_key = 'producerEmails'; 593 public $adminEmails; 594 public $consumerEmails; 595 public $producerEmails; 596 597 public function setAdminEmails($adminEmails) 598 { 599 $this->adminEmails = $adminEmails; 600 } 601 602 public function getAdminEmails() 603 { 604 return $this->adminEmails; 605 } 606 607 public function setConsumerEmails($consumerEmails) 608 { 609 $this->consumerEmails = $consumerEmails; 610 } 611 612 public function getConsumerEmails() 613 { 614 return $this->consumerEmails; 615 } 616 617 public function setProducerEmails($producerEmails) 618 { 619 $this->producerEmails = $producerEmails; 620 } 621 622 public function getProducerEmails() 623 { 624 return $this->producerEmails; 625 } 626 } 627 628 class Google_Service_Taskqueue_TaskQueueStats extends Google_Model 629 { 630 public $leasedLastHour; 631 public $leasedLastMinute; 632 public $oldestTask; 633 public $totalTasks; 634 635 public function setLeasedLastHour($leasedLastHour) 636 { 637 $this->leasedLastHour = $leasedLastHour; 638 } 639 640 public function getLeasedLastHour() 641 { 642 return $this->leasedLastHour; 643 } 644 645 public function setLeasedLastMinute($leasedLastMinute) 646 { 647 $this->leasedLastMinute = $leasedLastMinute; 648 } 649 650 public function getLeasedLastMinute() 651 { 652 return $this->leasedLastMinute; 653 } 654 655 public function setOldestTask($oldestTask) 656 { 657 $this->oldestTask = $oldestTask; 658 } 659 660 public function getOldestTask() 661 { 662 return $this->oldestTask; 663 } 664 665 public function setTotalTasks($totalTasks) 666 { 667 $this->totalTasks = $totalTasks; 668 } 669 670 public function getTotalTasks() 671 { 672 return $this->totalTasks; 673 } 674 } 675 676 class Google_Service_Taskqueue_Tasks extends Google_Collection 677 { 678 protected $collection_key = 'items'; 679 protected $itemsType = 'Google_Service_Taskqueue_Task'; 680 protected $itemsDataType = 'array'; 681 public $kind; 682 683 public function setItems($items) 684 { 685 $this->items = $items; 686 } 687 688 public function getItems() 689 { 690 return $this->items; 691 } 692 693 public function setKind($kind) 694 { 695 $this->kind = $kind; 696 } 697 698 public function getKind() 699 { 700 return $this->kind; 701 } 702 } 703 704 class Google_Service_Taskqueue_Tasks2 extends Google_Collection 705 { 706 protected $collection_key = 'items'; 707 protected $itemsType = 'Google_Service_Taskqueue_Task'; 708 protected $itemsDataType = 'array'; 709 public $kind; 710 711 public function setItems($items) 712 { 713 $this->items = $items; 714 } 715 716 public function getItems() 717 { 718 return $this->items; 719 } 720 721 public function setKind($kind) 722 { 723 $this->kind = $kind; 724 } 725 726 public function getKind() 727 { 728 return $this->kind; 729 } 730 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |