See Release Notes
Long Term Support Release
Differences Between: [Versions 401 and 402] [Versions 401 and 403]
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 Gmail (v1). 20 * 21 * <p> 22 * The Gmail REST API.</p> 23 * 24 * <p> 25 * For more information about this service, see the API 26 * <a href="https://developers.google.com/gmail/api/" target="_blank">Documentation</a> 27 * </p> 28 * 29 * @author Google, Inc. 30 */ 31 class Google_Service_Gmail extends Google_Service 32 { 33 /** View and manage your mail. */ 34 const MAIL_GOOGLE_COM = 35 "https://mail.google.com/"; 36 /** Manage drafts and send emails. */ 37 const GMAIL_COMPOSE = 38 "https://www.googleapis.com/auth/gmail.compose"; 39 /** Insert mail into your mailbox. */ 40 const GMAIL_INSERT = 41 "https://www.googleapis.com/auth/gmail.insert"; 42 /** Manage mailbox labels. */ 43 const GMAIL_LABELS = 44 "https://www.googleapis.com/auth/gmail.labels"; 45 /** View and modify but not delete your email. */ 46 const GMAIL_MODIFY = 47 "https://www.googleapis.com/auth/gmail.modify"; 48 /** View your emails messages and settings. */ 49 const GMAIL_READONLY = 50 "https://www.googleapis.com/auth/gmail.readonly"; 51 /** Send email on your behalf. */ 52 const GMAIL_SEND = 53 "https://www.googleapis.com/auth/gmail.send"; 54 55 public $users; 56 public $users_drafts; 57 public $users_history; 58 public $users_labels; 59 public $users_messages; 60 public $users_messages_attachments; 61 public $users_threads; 62 63 64 /** 65 * Constructs the internal representation of the Gmail service. 66 * 67 * @param Google_Client $client 68 */ 69 public function __construct(Google_Client $client) 70 { 71 parent::__construct($client); 72 $this->rootUrl = 'https://www.googleapis.com/'; 73 $this->servicePath = 'gmail/v1/users/'; 74 $this->version = 'v1'; 75 $this->serviceName = 'gmail'; 76 77 $this->users = new Google_Service_Gmail_Users_Resource( 78 $this, 79 $this->serviceName, 80 'users', 81 array( 82 'methods' => array( 83 'getProfile' => array( 84 'path' => '{userId}/profile', 85 'httpMethod' => 'GET', 86 'parameters' => array( 87 'userId' => array( 88 'location' => 'path', 89 'type' => 'string', 90 'required' => true, 91 ), 92 ), 93 ),'stop' => array( 94 'path' => '{userId}/stop', 95 'httpMethod' => 'POST', 96 'parameters' => array( 97 'userId' => array( 98 'location' => 'path', 99 'type' => 'string', 100 'required' => true, 101 ), 102 ), 103 ),'watch' => array( 104 'path' => '{userId}/watch', 105 'httpMethod' => 'POST', 106 'parameters' => array( 107 'userId' => array( 108 'location' => 'path', 109 'type' => 'string', 110 'required' => true, 111 ), 112 ), 113 ), 114 ) 115 ) 116 ); 117 $this->users_drafts = new Google_Service_Gmail_UsersDrafts_Resource( 118 $this, 119 $this->serviceName, 120 'drafts', 121 array( 122 'methods' => array( 123 'create' => array( 124 'path' => '{userId}/drafts', 125 'httpMethod' => 'POST', 126 'parameters' => array( 127 'userId' => array( 128 'location' => 'path', 129 'type' => 'string', 130 'required' => true, 131 ), 132 ), 133 ),'delete' => array( 134 'path' => '{userId}/drafts/{id}', 135 'httpMethod' => 'DELETE', 136 'parameters' => array( 137 'userId' => array( 138 'location' => 'path', 139 'type' => 'string', 140 'required' => true, 141 ), 142 'id' => array( 143 'location' => 'path', 144 'type' => 'string', 145 'required' => true, 146 ), 147 ), 148 ),'get' => array( 149 'path' => '{userId}/drafts/{id}', 150 'httpMethod' => 'GET', 151 'parameters' => array( 152 'userId' => array( 153 'location' => 'path', 154 'type' => 'string', 155 'required' => true, 156 ), 157 'id' => array( 158 'location' => 'path', 159 'type' => 'string', 160 'required' => true, 161 ), 162 'format' => array( 163 'location' => 'query', 164 'type' => 'string', 165 ), 166 ), 167 ),'list' => array( 168 'path' => '{userId}/drafts', 169 'httpMethod' => 'GET', 170 'parameters' => array( 171 'userId' => array( 172 'location' => 'path', 173 'type' => 'string', 174 'required' => true, 175 ), 176 'pageToken' => array( 177 'location' => 'query', 178 'type' => 'string', 179 ), 180 'maxResults' => array( 181 'location' => 'query', 182 'type' => 'integer', 183 ), 184 ), 185 ),'send' => array( 186 'path' => '{userId}/drafts/send', 187 'httpMethod' => 'POST', 188 'parameters' => array( 189 'userId' => array( 190 'location' => 'path', 191 'type' => 'string', 192 'required' => true, 193 ), 194 ), 195 ),'update' => array( 196 'path' => '{userId}/drafts/{id}', 197 'httpMethod' => 'PUT', 198 'parameters' => array( 199 'userId' => array( 200 'location' => 'path', 201 'type' => 'string', 202 'required' => true, 203 ), 204 'id' => array( 205 'location' => 'path', 206 'type' => 'string', 207 'required' => true, 208 ), 209 ), 210 ), 211 ) 212 ) 213 ); 214 $this->users_history = new Google_Service_Gmail_UsersHistory_Resource( 215 $this, 216 $this->serviceName, 217 'history', 218 array( 219 'methods' => array( 220 'list' => array( 221 'path' => '{userId}/history', 222 'httpMethod' => 'GET', 223 'parameters' => array( 224 'userId' => array( 225 'location' => 'path', 226 'type' => 'string', 227 'required' => true, 228 ), 229 'pageToken' => array( 230 'location' => 'query', 231 'type' => 'string', 232 ), 233 'maxResults' => array( 234 'location' => 'query', 235 'type' => 'integer', 236 ), 237 'labelId' => array( 238 'location' => 'query', 239 'type' => 'string', 240 ), 241 'startHistoryId' => array( 242 'location' => 'query', 243 'type' => 'string', 244 ), 245 ), 246 ), 247 ) 248 ) 249 ); 250 $this->users_labels = new Google_Service_Gmail_UsersLabels_Resource( 251 $this, 252 $this->serviceName, 253 'labels', 254 array( 255 'methods' => array( 256 'create' => array( 257 'path' => '{userId}/labels', 258 'httpMethod' => 'POST', 259 'parameters' => array( 260 'userId' => array( 261 'location' => 'path', 262 'type' => 'string', 263 'required' => true, 264 ), 265 ), 266 ),'delete' => array( 267 'path' => '{userId}/labels/{id}', 268 'httpMethod' => 'DELETE', 269 'parameters' => array( 270 'userId' => array( 271 'location' => 'path', 272 'type' => 'string', 273 'required' => true, 274 ), 275 'id' => array( 276 'location' => 'path', 277 'type' => 'string', 278 'required' => true, 279 ), 280 ), 281 ),'get' => array( 282 'path' => '{userId}/labels/{id}', 283 'httpMethod' => 'GET', 284 'parameters' => array( 285 'userId' => array( 286 'location' => 'path', 287 'type' => 'string', 288 'required' => true, 289 ), 290 'id' => array( 291 'location' => 'path', 292 'type' => 'string', 293 'required' => true, 294 ), 295 ), 296 ),'list' => array( 297 'path' => '{userId}/labels', 298 'httpMethod' => 'GET', 299 'parameters' => array( 300 'userId' => array( 301 'location' => 'path', 302 'type' => 'string', 303 'required' => true, 304 ), 305 ), 306 ),'patch' => array( 307 'path' => '{userId}/labels/{id}', 308 'httpMethod' => 'PATCH', 309 'parameters' => array( 310 'userId' => array( 311 'location' => 'path', 312 'type' => 'string', 313 'required' => true, 314 ), 315 'id' => array( 316 'location' => 'path', 317 'type' => 'string', 318 'required' => true, 319 ), 320 ), 321 ),'update' => array( 322 'path' => '{userId}/labels/{id}', 323 'httpMethod' => 'PUT', 324 'parameters' => array( 325 'userId' => array( 326 'location' => 'path', 327 'type' => 'string', 328 'required' => true, 329 ), 330 'id' => array( 331 'location' => 'path', 332 'type' => 'string', 333 'required' => true, 334 ), 335 ), 336 ), 337 ) 338 ) 339 ); 340 $this->users_messages = new Google_Service_Gmail_UsersMessages_Resource( 341 $this, 342 $this->serviceName, 343 'messages', 344 array( 345 'methods' => array( 346 'delete' => array( 347 'path' => '{userId}/messages/{id}', 348 'httpMethod' => 'DELETE', 349 'parameters' => array( 350 'userId' => array( 351 'location' => 'path', 352 'type' => 'string', 353 'required' => true, 354 ), 355 'id' => array( 356 'location' => 'path', 357 'type' => 'string', 358 'required' => true, 359 ), 360 ), 361 ),'get' => array( 362 'path' => '{userId}/messages/{id}', 363 'httpMethod' => 'GET', 364 'parameters' => array( 365 'userId' => array( 366 'location' => 'path', 367 'type' => 'string', 368 'required' => true, 369 ), 370 'id' => array( 371 'location' => 'path', 372 'type' => 'string', 373 'required' => true, 374 ), 375 'metadataHeaders' => array( 376 'location' => 'query', 377 'type' => 'string', 378 'repeated' => true, 379 ), 380 'format' => array( 381 'location' => 'query', 382 'type' => 'string', 383 ), 384 ), 385 ),'import' => array( 386 'path' => '{userId}/messages/import', 387 'httpMethod' => 'POST', 388 'parameters' => array( 389 'userId' => array( 390 'location' => 'path', 391 'type' => 'string', 392 'required' => true, 393 ), 394 'deleted' => array( 395 'location' => 'query', 396 'type' => 'boolean', 397 ), 398 'processForCalendar' => array( 399 'location' => 'query', 400 'type' => 'boolean', 401 ), 402 'internalDateSource' => array( 403 'location' => 'query', 404 'type' => 'string', 405 ), 406 'neverMarkSpam' => array( 407 'location' => 'query', 408 'type' => 'boolean', 409 ), 410 ), 411 ),'insert' => array( 412 'path' => '{userId}/messages', 413 'httpMethod' => 'POST', 414 'parameters' => array( 415 'userId' => array( 416 'location' => 'path', 417 'type' => 'string', 418 'required' => true, 419 ), 420 'deleted' => array( 421 'location' => 'query', 422 'type' => 'boolean', 423 ), 424 'internalDateSource' => array( 425 'location' => 'query', 426 'type' => 'string', 427 ), 428 ), 429 ),'list' => array( 430 'path' => '{userId}/messages', 431 'httpMethod' => 'GET', 432 'parameters' => array( 433 'userId' => array( 434 'location' => 'path', 435 'type' => 'string', 436 'required' => true, 437 ), 438 'maxResults' => array( 439 'location' => 'query', 440 'type' => 'integer', 441 ), 442 'q' => array( 443 'location' => 'query', 444 'type' => 'string', 445 ), 446 'pageToken' => array( 447 'location' => 'query', 448 'type' => 'string', 449 ), 450 'includeSpamTrash' => array( 451 'location' => 'query', 452 'type' => 'boolean', 453 ), 454 'labelIds' => array( 455 'location' => 'query', 456 'type' => 'string', 457 'repeated' => true, 458 ), 459 ), 460 ),'modify' => array( 461 'path' => '{userId}/messages/{id}/modify', 462 'httpMethod' => 'POST', 463 'parameters' => array( 464 'userId' => array( 465 'location' => 'path', 466 'type' => 'string', 467 'required' => true, 468 ), 469 'id' => array( 470 'location' => 'path', 471 'type' => 'string', 472 'required' => true, 473 ), 474 ), 475 ),'send' => array( 476 'path' => '{userId}/messages/send', 477 'httpMethod' => 'POST', 478 'parameters' => array( 479 'userId' => array( 480 'location' => 'path', 481 'type' => 'string', 482 'required' => true, 483 ), 484 ), 485 ),'trash' => array( 486 'path' => '{userId}/messages/{id}/trash', 487 'httpMethod' => 'POST', 488 'parameters' => array( 489 'userId' => array( 490 'location' => 'path', 491 'type' => 'string', 492 'required' => true, 493 ), 494 'id' => array( 495 'location' => 'path', 496 'type' => 'string', 497 'required' => true, 498 ), 499 ), 500 ),'untrash' => array( 501 'path' => '{userId}/messages/{id}/untrash', 502 'httpMethod' => 'POST', 503 'parameters' => array( 504 'userId' => array( 505 'location' => 'path', 506 'type' => 'string', 507 'required' => true, 508 ), 509 'id' => array( 510 'location' => 'path', 511 'type' => 'string', 512 'required' => true, 513 ), 514 ), 515 ), 516 ) 517 ) 518 ); 519 $this->users_messages_attachments = new Google_Service_Gmail_UsersMessagesAttachments_Resource( 520 $this, 521 $this->serviceName, 522 'attachments', 523 array( 524 'methods' => array( 525 'get' => array( 526 'path' => '{userId}/messages/{messageId}/attachments/{id}', 527 'httpMethod' => 'GET', 528 'parameters' => array( 529 'userId' => array( 530 'location' => 'path', 531 'type' => 'string', 532 'required' => true, 533 ), 534 'messageId' => array( 535 'location' => 'path', 536 'type' => 'string', 537 'required' => true, 538 ), 539 'id' => array( 540 'location' => 'path', 541 'type' => 'string', 542 'required' => true, 543 ), 544 ), 545 ), 546 ) 547 ) 548 ); 549 $this->users_threads = new Google_Service_Gmail_UsersThreads_Resource( 550 $this, 551 $this->serviceName, 552 'threads', 553 array( 554 'methods' => array( 555 'delete' => array( 556 'path' => '{userId}/threads/{id}', 557 'httpMethod' => 'DELETE', 558 'parameters' => array( 559 'userId' => array( 560 'location' => 'path', 561 'type' => 'string', 562 'required' => true, 563 ), 564 'id' => array( 565 'location' => 'path', 566 'type' => 'string', 567 'required' => true, 568 ), 569 ), 570 ),'get' => array( 571 'path' => '{userId}/threads/{id}', 572 'httpMethod' => 'GET', 573 'parameters' => array( 574 'userId' => array( 575 'location' => 'path', 576 'type' => 'string', 577 'required' => true, 578 ), 579 'id' => array( 580 'location' => 'path', 581 'type' => 'string', 582 'required' => true, 583 ), 584 'metadataHeaders' => array( 585 'location' => 'query', 586 'type' => 'string', 587 'repeated' => true, 588 ), 589 'format' => array( 590 'location' => 'query', 591 'type' => 'string', 592 ), 593 ), 594 ),'list' => array( 595 'path' => '{userId}/threads', 596 'httpMethod' => 'GET', 597 'parameters' => array( 598 'userId' => array( 599 'location' => 'path', 600 'type' => 'string', 601 'required' => true, 602 ), 603 'maxResults' => array( 604 'location' => 'query', 605 'type' => 'integer', 606 ), 607 'q' => array( 608 'location' => 'query', 609 'type' => 'string', 610 ), 611 'pageToken' => array( 612 'location' => 'query', 613 'type' => 'string', 614 ), 615 'includeSpamTrash' => array( 616 'location' => 'query', 617 'type' => 'boolean', 618 ), 619 'labelIds' => array( 620 'location' => 'query', 621 'type' => 'string', 622 'repeated' => true, 623 ), 624 ), 625 ),'modify' => array( 626 'path' => '{userId}/threads/{id}/modify', 627 'httpMethod' => 'POST', 628 'parameters' => array( 629 'userId' => array( 630 'location' => 'path', 631 'type' => 'string', 632 'required' => true, 633 ), 634 'id' => array( 635 'location' => 'path', 636 'type' => 'string', 637 'required' => true, 638 ), 639 ), 640 ),'trash' => array( 641 'path' => '{userId}/threads/{id}/trash', 642 'httpMethod' => 'POST', 643 'parameters' => array( 644 'userId' => array( 645 'location' => 'path', 646 'type' => 'string', 647 'required' => true, 648 ), 649 'id' => array( 650 'location' => 'path', 651 'type' => 'string', 652 'required' => true, 653 ), 654 ), 655 ),'untrash' => array( 656 'path' => '{userId}/threads/{id}/untrash', 657 'httpMethod' => 'POST', 658 'parameters' => array( 659 'userId' => array( 660 'location' => 'path', 661 'type' => 'string', 662 'required' => true, 663 ), 664 'id' => array( 665 'location' => 'path', 666 'type' => 'string', 667 'required' => true, 668 ), 669 ), 670 ), 671 ) 672 ) 673 ); 674 } 675 } 676 677 678 /** 679 * The "users" collection of methods. 680 * Typical usage is: 681 * <code> 682 * $gmailService = new Google_Service_Gmail(...); 683 * $users = $gmailService->users; 684 * </code> 685 */ 686 class Google_Service_Gmail_Users_Resource extends Google_Service_Resource 687 { 688 689 /** 690 * Gets the current user's Gmail profile. (users.getProfile) 691 * 692 * @param string $userId The user's email address. The special value me can be 693 * used to indicate the authenticated user. 694 * @param array $optParams Optional parameters. 695 * @return Google_Service_Gmail_Profile 696 */ 697 public function getProfile($userId, $optParams = array()) 698 { 699 $params = array('userId' => $userId); 700 $params = array_merge($params, $optParams); 701 return $this->call('getProfile', array($params), "Google_Service_Gmail_Profile"); 702 } 703 704 /** 705 * Stop receiving push notifications for the given user mailbox. (users.stop) 706 * 707 * @param string $userId The user's email address. The special value me can be 708 * used to indicate the authenticated user. 709 * @param array $optParams Optional parameters. 710 */ 711 public function stop($userId, $optParams = array()) 712 { 713 $params = array('userId' => $userId); 714 $params = array_merge($params, $optParams); 715 return $this->call('stop', array($params)); 716 } 717 718 /** 719 * Set up or update a push notification watch on the given user mailbox. 720 * (users.watch) 721 * 722 * @param string $userId The user's email address. The special value me can be 723 * used to indicate the authenticated user. 724 * @param Google_WatchRequest $postBody 725 * @param array $optParams Optional parameters. 726 * @return Google_Service_Gmail_WatchResponse 727 */ 728 public function watch($userId, Google_Service_Gmail_WatchRequest $postBody, $optParams = array()) 729 { 730 $params = array('userId' => $userId, 'postBody' => $postBody); 731 $params = array_merge($params, $optParams); 732 return $this->call('watch', array($params), "Google_Service_Gmail_WatchResponse"); 733 } 734 } 735 736 /** 737 * The "drafts" collection of methods. 738 * Typical usage is: 739 * <code> 740 * $gmailService = new Google_Service_Gmail(...); 741 * $drafts = $gmailService->drafts; 742 * </code> 743 */ 744 class Google_Service_Gmail_UsersDrafts_Resource extends Google_Service_Resource 745 { 746 747 /** 748 * Creates a new draft with the DRAFT label. (drafts.create) 749 * 750 * @param string $userId The user's email address. The special value me can be 751 * used to indicate the authenticated user. 752 * @param Google_Draft $postBody 753 * @param array $optParams Optional parameters. 754 * @return Google_Service_Gmail_Draft 755 */ 756 public function create($userId, Google_Service_Gmail_Draft $postBody, $optParams = array()) 757 { 758 $params = array('userId' => $userId, 'postBody' => $postBody); 759 $params = array_merge($params, $optParams); 760 return $this->call('create', array($params), "Google_Service_Gmail_Draft"); 761 } 762 763 /** 764 * Immediately and permanently deletes the specified draft. Does not simply 765 * trash it. (drafts.delete) 766 * 767 * @param string $userId The user's email address. The special value me can be 768 * used to indicate the authenticated user. 769 * @param string $id The ID of the draft to delete. 770 * @param array $optParams Optional parameters. 771 */ 772 public function delete($userId, $id, $optParams = array()) 773 { 774 $params = array('userId' => $userId, 'id' => $id); 775 $params = array_merge($params, $optParams); 776 return $this->call('delete', array($params)); 777 } 778 779 /** 780 * Gets the specified draft. (drafts.get) 781 * 782 * @param string $userId The user's email address. The special value me can be 783 * used to indicate the authenticated user. 784 * @param string $id The ID of the draft to retrieve. 785 * @param array $optParams Optional parameters. 786 * 787 * @opt_param string format The format to return the draft in. 788 * @return Google_Service_Gmail_Draft 789 */ 790 public function get($userId, $id, $optParams = array()) 791 { 792 $params = array('userId' => $userId, 'id' => $id); 793 $params = array_merge($params, $optParams); 794 return $this->call('get', array($params), "Google_Service_Gmail_Draft"); 795 } 796 797 /** 798 * Lists the drafts in the user's mailbox. (drafts.listUsersDrafts) 799 * 800 * @param string $userId The user's email address. The special value me can be 801 * used to indicate the authenticated user. 802 * @param array $optParams Optional parameters. 803 * 804 * @opt_param string pageToken Page token to retrieve a specific page of results 805 * in the list. 806 * @opt_param string maxResults Maximum number of drafts to return. 807 * @return Google_Service_Gmail_ListDraftsResponse 808 */ 809 public function listUsersDrafts($userId, $optParams = array()) 810 { 811 $params = array('userId' => $userId); 812 $params = array_merge($params, $optParams); 813 return $this->call('list', array($params), "Google_Service_Gmail_ListDraftsResponse"); 814 } 815 816 /** 817 * Sends the specified, existing draft to the recipients in the To, Cc, and Bcc 818 * headers. (drafts.send) 819 * 820 * @param string $userId The user's email address. The special value me can be 821 * used to indicate the authenticated user. 822 * @param Google_Draft $postBody 823 * @param array $optParams Optional parameters. 824 * @return Google_Service_Gmail_Message 825 */ 826 public function send($userId, Google_Service_Gmail_Draft $postBody, $optParams = array()) 827 { 828 $params = array('userId' => $userId, 'postBody' => $postBody); 829 $params = array_merge($params, $optParams); 830 return $this->call('send', array($params), "Google_Service_Gmail_Message"); 831 } 832 833 /** 834 * Replaces a draft's content. (drafts.update) 835 * 836 * @param string $userId The user's email address. The special value me can be 837 * used to indicate the authenticated user. 838 * @param string $id The ID of the draft to update. 839 * @param Google_Draft $postBody 840 * @param array $optParams Optional parameters. 841 * @return Google_Service_Gmail_Draft 842 */ 843 public function update($userId, $id, Google_Service_Gmail_Draft $postBody, $optParams = array()) 844 { 845 $params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody); 846 $params = array_merge($params, $optParams); 847 return $this->call('update', array($params), "Google_Service_Gmail_Draft"); 848 } 849 } 850 /** 851 * The "history" collection of methods. 852 * Typical usage is: 853 * <code> 854 * $gmailService = new Google_Service_Gmail(...); 855 * $history = $gmailService->history; 856 * </code> 857 */ 858 class Google_Service_Gmail_UsersHistory_Resource extends Google_Service_Resource 859 { 860 861 /** 862 * Lists the history of all changes to the given mailbox. History results are 863 * returned in chronological order (increasing historyId). 864 * (history.listUsersHistory) 865 * 866 * @param string $userId The user's email address. The special value me can be 867 * used to indicate the authenticated user. 868 * @param array $optParams Optional parameters. 869 * 870 * @opt_param string pageToken Page token to retrieve a specific page of results 871 * in the list. 872 * @opt_param string maxResults The maximum number of history records to return. 873 * @opt_param string labelId Only return messages with a label matching the ID. 874 * @opt_param string startHistoryId Required. Returns history records after the 875 * specified startHistoryId. The supplied startHistoryId should be obtained from 876 * the historyId of a message, thread, or previous list response. History IDs 877 * increase chronologically but are not contiguous with random gaps in between 878 * valid IDs. Supplying an invalid or out of date startHistoryId typically 879 * returns an HTTP 404 error code. A historyId is typically valid for at least a 880 * week, but in some rare circumstances may be valid for only a few hours. If 881 * you receive an HTTP 404 error response, your application should perform a 882 * full sync. If you receive no nextPageToken in the response, there are no 883 * updates to retrieve and you can store the returned historyId for a future 884 * request. 885 * @return Google_Service_Gmail_ListHistoryResponse 886 */ 887 public function listUsersHistory($userId, $optParams = array()) 888 { 889 $params = array('userId' => $userId); 890 $params = array_merge($params, $optParams); 891 return $this->call('list', array($params), "Google_Service_Gmail_ListHistoryResponse"); 892 } 893 } 894 /** 895 * The "labels" collection of methods. 896 * Typical usage is: 897 * <code> 898 * $gmailService = new Google_Service_Gmail(...); 899 * $labels = $gmailService->labels; 900 * </code> 901 */ 902 class Google_Service_Gmail_UsersLabels_Resource extends Google_Service_Resource 903 { 904 905 /** 906 * Creates a new label. (labels.create) 907 * 908 * @param string $userId The user's email address. The special value me can be 909 * used to indicate the authenticated user. 910 * @param Google_Label $postBody 911 * @param array $optParams Optional parameters. 912 * @return Google_Service_Gmail_Label 913 */ 914 public function create($userId, Google_Service_Gmail_Label $postBody, $optParams = array()) 915 { 916 $params = array('userId' => $userId, 'postBody' => $postBody); 917 $params = array_merge($params, $optParams); 918 return $this->call('create', array($params), "Google_Service_Gmail_Label"); 919 } 920 921 /** 922 * Immediately and permanently deletes the specified label and removes it from 923 * any messages and threads that it is applied to. (labels.delete) 924 * 925 * @param string $userId The user's email address. The special value me can be 926 * used to indicate the authenticated user. 927 * @param string $id The ID of the label to delete. 928 * @param array $optParams Optional parameters. 929 */ 930 public function delete($userId, $id, $optParams = array()) 931 { 932 $params = array('userId' => $userId, 'id' => $id); 933 $params = array_merge($params, $optParams); 934 return $this->call('delete', array($params)); 935 } 936 937 /** 938 * Gets the specified label. (labels.get) 939 * 940 * @param string $userId The user's email address. The special value me can be 941 * used to indicate the authenticated user. 942 * @param string $id The ID of the label to retrieve. 943 * @param array $optParams Optional parameters. 944 * @return Google_Service_Gmail_Label 945 */ 946 public function get($userId, $id, $optParams = array()) 947 { 948 $params = array('userId' => $userId, 'id' => $id); 949 $params = array_merge($params, $optParams); 950 return $this->call('get', array($params), "Google_Service_Gmail_Label"); 951 } 952 953 /** 954 * Lists all labels in the user's mailbox. (labels.listUsersLabels) 955 * 956 * @param string $userId The user's email address. The special value me can be 957 * used to indicate the authenticated user. 958 * @param array $optParams Optional parameters. 959 * @return Google_Service_Gmail_ListLabelsResponse 960 */ 961 public function listUsersLabels($userId, $optParams = array()) 962 { 963 $params = array('userId' => $userId); 964 $params = array_merge($params, $optParams); 965 return $this->call('list', array($params), "Google_Service_Gmail_ListLabelsResponse"); 966 } 967 968 /** 969 * Updates the specified label. This method supports patch semantics. 970 * (labels.patch) 971 * 972 * @param string $userId The user's email address. The special value me can be 973 * used to indicate the authenticated user. 974 * @param string $id The ID of the label to update. 975 * @param Google_Label $postBody 976 * @param array $optParams Optional parameters. 977 * @return Google_Service_Gmail_Label 978 */ 979 public function patch($userId, $id, Google_Service_Gmail_Label $postBody, $optParams = array()) 980 { 981 $params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody); 982 $params = array_merge($params, $optParams); 983 return $this->call('patch', array($params), "Google_Service_Gmail_Label"); 984 } 985 986 /** 987 * Updates the specified label. (labels.update) 988 * 989 * @param string $userId The user's email address. The special value me can be 990 * used to indicate the authenticated user. 991 * @param string $id The ID of the label to update. 992 * @param Google_Label $postBody 993 * @param array $optParams Optional parameters. 994 * @return Google_Service_Gmail_Label 995 */ 996 public function update($userId, $id, Google_Service_Gmail_Label $postBody, $optParams = array()) 997 { 998 $params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody); 999 $params = array_merge($params, $optParams); 1000 return $this->call('update', array($params), "Google_Service_Gmail_Label"); 1001 } 1002 } 1003 /** 1004 * The "messages" collection of methods. 1005 * Typical usage is: 1006 * <code> 1007 * $gmailService = new Google_Service_Gmail(...); 1008 * $messages = $gmailService->messages; 1009 * </code> 1010 */ 1011 class Google_Service_Gmail_UsersMessages_Resource extends Google_Service_Resource 1012 { 1013 1014 /** 1015 * Immediately and permanently deletes the specified message. This operation 1016 * cannot be undone. Prefer messages.trash instead. (messages.delete) 1017 * 1018 * @param string $userId The user's email address. The special value me can be 1019 * used to indicate the authenticated user. 1020 * @param string $id The ID of the message to delete. 1021 * @param array $optParams Optional parameters. 1022 */ 1023 public function delete($userId, $id, $optParams = array()) 1024 { 1025 $params = array('userId' => $userId, 'id' => $id); 1026 $params = array_merge($params, $optParams); 1027 return $this->call('delete', array($params)); 1028 } 1029 1030 /** 1031 * Gets the specified message. (messages.get) 1032 * 1033 * @param string $userId The user's email address. The special value me can be 1034 * used to indicate the authenticated user. 1035 * @param string $id The ID of the message to retrieve. 1036 * @param array $optParams Optional parameters. 1037 * 1038 * @opt_param string metadataHeaders When given and format is METADATA, only 1039 * include headers specified. 1040 * @opt_param string format The format to return the message in. 1041 * @return Google_Service_Gmail_Message 1042 */ 1043 public function get($userId, $id, $optParams = array()) 1044 { 1045 $params = array('userId' => $userId, 'id' => $id); 1046 $params = array_merge($params, $optParams); 1047 return $this->call('get', array($params), "Google_Service_Gmail_Message"); 1048 } 1049 1050 /** 1051 * Imports a message into only this user's mailbox, with standard email delivery 1052 * scanning and classification similar to receiving via SMTP. Does not send a 1053 * message. (messages.import) 1054 * 1055 * @param string $userId The user's email address. The special value me can be 1056 * used to indicate the authenticated user. 1057 * @param Google_Message $postBody 1058 * @param array $optParams Optional parameters. 1059 * 1060 * @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and 1061 * only visible in Google Apps Vault to a Vault administrator. Only used for 1062 * Google Apps for Work accounts. 1063 * @opt_param bool processForCalendar Process calendar invites in the email and 1064 * add any extracted meetings to the Google Calendar for this user. 1065 * @opt_param string internalDateSource Source for Gmail's internal date of the 1066 * message. 1067 * @opt_param bool neverMarkSpam Ignore the Gmail spam classifier decision and 1068 * never mark this email as SPAM in the mailbox. 1069 * @return Google_Service_Gmail_Message 1070 */ 1071 public function import($userId, Google_Service_Gmail_Message $postBody, $optParams = array()) 1072 { 1073 $params = array('userId' => $userId, 'postBody' => $postBody); 1074 $params = array_merge($params, $optParams); 1075 return $this->call('import', array($params), "Google_Service_Gmail_Message"); 1076 } 1077 1078 /** 1079 * Directly inserts a message into only this user's mailbox similar to IMAP 1080 * APPEND, bypassing most scanning and classification. Does not send a message. 1081 * (messages.insert) 1082 * 1083 * @param string $userId The user's email address. The special value me can be 1084 * used to indicate the authenticated user. 1085 * @param Google_Message $postBody 1086 * @param array $optParams Optional parameters. 1087 * 1088 * @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and 1089 * only visible in Google Apps Vault to a Vault administrator. Only used for 1090 * Google Apps for Work accounts. 1091 * @opt_param string internalDateSource Source for Gmail's internal date of the 1092 * message. 1093 * @return Google_Service_Gmail_Message 1094 */ 1095 public function insert($userId, Google_Service_Gmail_Message $postBody, $optParams = array()) 1096 { 1097 $params = array('userId' => $userId, 'postBody' => $postBody); 1098 $params = array_merge($params, $optParams); 1099 return $this->call('insert', array($params), "Google_Service_Gmail_Message"); 1100 } 1101 1102 /** 1103 * Lists the messages in the user's mailbox. (messages.listUsersMessages) 1104 * 1105 * @param string $userId The user's email address. The special value me can be 1106 * used to indicate the authenticated user. 1107 * @param array $optParams Optional parameters. 1108 * 1109 * @opt_param string maxResults Maximum number of messages to return. 1110 * @opt_param string q Only return messages matching the specified query. 1111 * Supports the same query format as the Gmail search box. For example, 1112 * "from:someuser@example.com rfc822msgid: is:unread". 1113 * @opt_param string pageToken Page token to retrieve a specific page of results 1114 * in the list. 1115 * @opt_param bool includeSpamTrash Include messages from SPAM and TRASH in the 1116 * results. 1117 * @opt_param string labelIds Only return messages with labels that match all of 1118 * the specified label IDs. 1119 * @return Google_Service_Gmail_ListMessagesResponse 1120 */ 1121 public function listUsersMessages($userId, $optParams = array()) 1122 { 1123 $params = array('userId' => $userId); 1124 $params = array_merge($params, $optParams); 1125 return $this->call('list', array($params), "Google_Service_Gmail_ListMessagesResponse"); 1126 } 1127 1128 /** 1129 * Modifies the labels on the specified message. (messages.modify) 1130 * 1131 * @param string $userId The user's email address. The special value me can be 1132 * used to indicate the authenticated user. 1133 * @param string $id The ID of the message to modify. 1134 * @param Google_ModifyMessageRequest $postBody 1135 * @param array $optParams Optional parameters. 1136 * @return Google_Service_Gmail_Message 1137 */ 1138 public function modify($userId, $id, Google_Service_Gmail_ModifyMessageRequest $postBody, $optParams = array()) 1139 { 1140 $params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody); 1141 $params = array_merge($params, $optParams); 1142 return $this->call('modify', array($params), "Google_Service_Gmail_Message"); 1143 } 1144 1145 /** 1146 * Sends the specified message to the recipients in the To, Cc, and Bcc headers. 1147 * (messages.send) 1148 * 1149 * @param string $userId The user's email address. The special value me can be 1150 * used to indicate the authenticated user. 1151 * @param Google_Message $postBody 1152 * @param array $optParams Optional parameters. 1153 * @return Google_Service_Gmail_Message 1154 */ 1155 public function send($userId, Google_Service_Gmail_Message $postBody, $optParams = array()) 1156 { 1157 $params = array('userId' => $userId, 'postBody' => $postBody); 1158 $params = array_merge($params, $optParams); 1159 return $this->call('send', array($params), "Google_Service_Gmail_Message"); 1160 } 1161 1162 /** 1163 * Moves the specified message to the trash. (messages.trash) 1164 * 1165 * @param string $userId The user's email address. The special value me can be 1166 * used to indicate the authenticated user. 1167 * @param string $id The ID of the message to Trash. 1168 * @param array $optParams Optional parameters. 1169 * @return Google_Service_Gmail_Message 1170 */ 1171 public function trash($userId, $id, $optParams = array()) 1172 { 1173 $params = array('userId' => $userId, 'id' => $id); 1174 $params = array_merge($params, $optParams); 1175 return $this->call('trash', array($params), "Google_Service_Gmail_Message"); 1176 } 1177 1178 /** 1179 * Removes the specified message from the trash. (messages.untrash) 1180 * 1181 * @param string $userId The user's email address. The special value me can be 1182 * used to indicate the authenticated user. 1183 * @param string $id The ID of the message to remove from Trash. 1184 * @param array $optParams Optional parameters. 1185 * @return Google_Service_Gmail_Message 1186 */ 1187 public function untrash($userId, $id, $optParams = array()) 1188 { 1189 $params = array('userId' => $userId, 'id' => $id); 1190 $params = array_merge($params, $optParams); 1191 return $this->call('untrash', array($params), "Google_Service_Gmail_Message"); 1192 } 1193 } 1194 1195 /** 1196 * The "attachments" collection of methods. 1197 * Typical usage is: 1198 * <code> 1199 * $gmailService = new Google_Service_Gmail(...); 1200 * $attachments = $gmailService->attachments; 1201 * </code> 1202 */ 1203 class Google_Service_Gmail_UsersMessagesAttachments_Resource extends Google_Service_Resource 1204 { 1205 1206 /** 1207 * Gets the specified message attachment. (attachments.get) 1208 * 1209 * @param string $userId The user's email address. The special value me can be 1210 * used to indicate the authenticated user. 1211 * @param string $messageId The ID of the message containing the attachment. 1212 * @param string $id The ID of the attachment. 1213 * @param array $optParams Optional parameters. 1214 * @return Google_Service_Gmail_MessagePartBody 1215 */ 1216 public function get($userId, $messageId, $id, $optParams = array()) 1217 { 1218 $params = array('userId' => $userId, 'messageId' => $messageId, 'id' => $id); 1219 $params = array_merge($params, $optParams); 1220 return $this->call('get', array($params), "Google_Service_Gmail_MessagePartBody"); 1221 } 1222 } 1223 /** 1224 * The "threads" collection of methods. 1225 * Typical usage is: 1226 * <code> 1227 * $gmailService = new Google_Service_Gmail(...); 1228 * $threads = $gmailService->threads; 1229 * </code> 1230 */ 1231 class Google_Service_Gmail_UsersThreads_Resource extends Google_Service_Resource 1232 { 1233 1234 /** 1235 * Immediately and permanently deletes the specified thread. This operation 1236 * cannot be undone. Prefer threads.trash instead. (threads.delete) 1237 * 1238 * @param string $userId The user's email address. The special value me can be 1239 * used to indicate the authenticated user. 1240 * @param string $id ID of the Thread to delete. 1241 * @param array $optParams Optional parameters. 1242 */ 1243 public function delete($userId, $id, $optParams = array()) 1244 { 1245 $params = array('userId' => $userId, 'id' => $id); 1246 $params = array_merge($params, $optParams); 1247 return $this->call('delete', array($params)); 1248 } 1249 1250 /** 1251 * Gets the specified thread. (threads.get) 1252 * 1253 * @param string $userId The user's email address. The special value me can be 1254 * used to indicate the authenticated user. 1255 * @param string $id The ID of the thread to retrieve. 1256 * @param array $optParams Optional parameters. 1257 * 1258 * @opt_param string metadataHeaders When given and format is METADATA, only 1259 * include headers specified. 1260 * @opt_param string format The format to return the messages in. 1261 * @return Google_Service_Gmail_Thread 1262 */ 1263 public function get($userId, $id, $optParams = array()) 1264 { 1265 $params = array('userId' => $userId, 'id' => $id); 1266 $params = array_merge($params, $optParams); 1267 return $this->call('get', array($params), "Google_Service_Gmail_Thread"); 1268 } 1269 1270 /** 1271 * Lists the threads in the user's mailbox. (threads.listUsersThreads) 1272 * 1273 * @param string $userId The user's email address. The special value me can be 1274 * used to indicate the authenticated user. 1275 * @param array $optParams Optional parameters. 1276 * 1277 * @opt_param string maxResults Maximum number of threads to return. 1278 * @opt_param string q Only return threads matching the specified query. 1279 * Supports the same query format as the Gmail search box. For example, 1280 * "from:someuser@example.com rfc822msgid: is:unread". 1281 * @opt_param string pageToken Page token to retrieve a specific page of results 1282 * in the list. 1283 * @opt_param bool includeSpamTrash Include threads from SPAM and TRASH in the 1284 * results. 1285 * @opt_param string labelIds Only return threads with labels that match all of 1286 * the specified label IDs. 1287 * @return Google_Service_Gmail_ListThreadsResponse 1288 */ 1289 public function listUsersThreads($userId, $optParams = array()) 1290 { 1291 $params = array('userId' => $userId); 1292 $params = array_merge($params, $optParams); 1293 return $this->call('list', array($params), "Google_Service_Gmail_ListThreadsResponse"); 1294 } 1295 1296 /** 1297 * Modifies the labels applied to the thread. This applies to all messages in 1298 * the thread. (threads.modify) 1299 * 1300 * @param string $userId The user's email address. The special value me can be 1301 * used to indicate the authenticated user. 1302 * @param string $id The ID of the thread to modify. 1303 * @param Google_ModifyThreadRequest $postBody 1304 * @param array $optParams Optional parameters. 1305 * @return Google_Service_Gmail_Thread 1306 */ 1307 public function modify($userId, $id, Google_Service_Gmail_ModifyThreadRequest $postBody, $optParams = array()) 1308 { 1309 $params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody); 1310 $params = array_merge($params, $optParams); 1311 return $this->call('modify', array($params), "Google_Service_Gmail_Thread"); 1312 } 1313 1314 /** 1315 * Moves the specified thread to the trash. (threads.trash) 1316 * 1317 * @param string $userId The user's email address. The special value me can be 1318 * used to indicate the authenticated user. 1319 * @param string $id The ID of the thread to Trash. 1320 * @param array $optParams Optional parameters. 1321 * @return Google_Service_Gmail_Thread 1322 */ 1323 public function trash($userId, $id, $optParams = array()) 1324 { 1325 $params = array('userId' => $userId, 'id' => $id); 1326 $params = array_merge($params, $optParams); 1327 return $this->call('trash', array($params), "Google_Service_Gmail_Thread"); 1328 } 1329 1330 /** 1331 * Removes the specified thread from the trash. (threads.untrash) 1332 * 1333 * @param string $userId The user's email address. The special value me can be 1334 * used to indicate the authenticated user. 1335 * @param string $id The ID of the thread to remove from Trash. 1336 * @param array $optParams Optional parameters. 1337 * @return Google_Service_Gmail_Thread 1338 */ 1339 public function untrash($userId, $id, $optParams = array()) 1340 { 1341 $params = array('userId' => $userId, 'id' => $id); 1342 $params = array_merge($params, $optParams); 1343 return $this->call('untrash', array($params), "Google_Service_Gmail_Thread"); 1344 } 1345 } 1346 1347 1348 1349 1350 class Google_Service_Gmail_Draft extends Google_Model 1351 { 1352 protected $internal_gapi_mappings = array( 1353 ); 1354 public $id; 1355 protected $messageType = 'Google_Service_Gmail_Message'; 1356 protected $messageDataType = ''; 1357 1358 1359 public function setId($id) 1360 { 1361 $this->id = $id; 1362 } 1363 public function getId() 1364 { 1365 return $this->id; 1366 } 1367 public function setMessage(Google_Service_Gmail_Message $message) 1368 { 1369 $this->message = $message; 1370 } 1371 public function getMessage() 1372 { 1373 return $this->message; 1374 } 1375 } 1376 1377 class Google_Service_Gmail_History extends Google_Collection 1378 { 1379 protected $collection_key = 'messagesDeleted'; 1380 protected $internal_gapi_mappings = array( 1381 ); 1382 public $id; 1383 protected $labelsAddedType = 'Google_Service_Gmail_HistoryLabelAdded'; 1384 protected $labelsAddedDataType = 'array'; 1385 protected $labelsRemovedType = 'Google_Service_Gmail_HistoryLabelRemoved'; 1386 protected $labelsRemovedDataType = 'array'; 1387 protected $messagesType = 'Google_Service_Gmail_Message'; 1388 protected $messagesDataType = 'array'; 1389 protected $messagesAddedType = 'Google_Service_Gmail_HistoryMessageAdded'; 1390 protected $messagesAddedDataType = 'array'; 1391 protected $messagesDeletedType = 'Google_Service_Gmail_HistoryMessageDeleted'; 1392 protected $messagesDeletedDataType = 'array'; 1393 1394 1395 public function setId($id) 1396 { 1397 $this->id = $id; 1398 } 1399 public function getId() 1400 { 1401 return $this->id; 1402 } 1403 public function setLabelsAdded($labelsAdded) 1404 { 1405 $this->labelsAdded = $labelsAdded; 1406 } 1407 public function getLabelsAdded() 1408 { 1409 return $this->labelsAdded; 1410 } 1411 public function setLabelsRemoved($labelsRemoved) 1412 { 1413 $this->labelsRemoved = $labelsRemoved; 1414 } 1415 public function getLabelsRemoved() 1416 { 1417 return $this->labelsRemoved; 1418 } 1419 public function setMessages($messages) 1420 { 1421 $this->messages = $messages; 1422 } 1423 public function getMessages() 1424 { 1425 return $this->messages; 1426 } 1427 public function setMessagesAdded($messagesAdded) 1428 { 1429 $this->messagesAdded = $messagesAdded; 1430 } 1431 public function getMessagesAdded() 1432 { 1433 return $this->messagesAdded; 1434 } 1435 public function setMessagesDeleted($messagesDeleted) 1436 { 1437 $this->messagesDeleted = $messagesDeleted; 1438 } 1439 public function getMessagesDeleted() 1440 { 1441 return $this->messagesDeleted; 1442 } 1443 } 1444 1445 class Google_Service_Gmail_HistoryLabelAdded extends Google_Collection 1446 { 1447 protected $collection_key = 'labelIds'; 1448 protected $internal_gapi_mappings = array( 1449 ); 1450 public $labelIds; 1451 protected $messageType = 'Google_Service_Gmail_Message'; 1452 protected $messageDataType = ''; 1453 1454 1455 public function setLabelIds($labelIds) 1456 { 1457 $this->labelIds = $labelIds; 1458 } 1459 public function getLabelIds() 1460 { 1461 return $this->labelIds; 1462 } 1463 public function setMessage(Google_Service_Gmail_Message $message) 1464 { 1465 $this->message = $message; 1466 } 1467 public function getMessage() 1468 { 1469 return $this->message; 1470 } 1471 } 1472 1473 class Google_Service_Gmail_HistoryLabelRemoved extends Google_Collection 1474 { 1475 protected $collection_key = 'labelIds'; 1476 protected $internal_gapi_mappings = array( 1477 ); 1478 public $labelIds; 1479 protected $messageType = 'Google_Service_Gmail_Message'; 1480 protected $messageDataType = ''; 1481 1482 1483 public function setLabelIds($labelIds) 1484 { 1485 $this->labelIds = $labelIds; 1486 } 1487 public function getLabelIds() 1488 { 1489 return $this->labelIds; 1490 } 1491 public function setMessage(Google_Service_Gmail_Message $message) 1492 { 1493 $this->message = $message; 1494 } 1495 public function getMessage() 1496 { 1497 return $this->message; 1498 } 1499 } 1500 1501 class Google_Service_Gmail_HistoryMessageAdded extends Google_Model 1502 { 1503 protected $internal_gapi_mappings = array( 1504 ); 1505 protected $messageType = 'Google_Service_Gmail_Message'; 1506 protected $messageDataType = ''; 1507 1508 1509 public function setMessage(Google_Service_Gmail_Message $message) 1510 { 1511 $this->message = $message; 1512 } 1513 public function getMessage() 1514 { 1515 return $this->message; 1516 } 1517 } 1518 1519 class Google_Service_Gmail_HistoryMessageDeleted extends Google_Model 1520 { 1521 protected $internal_gapi_mappings = array( 1522 ); 1523 protected $messageType = 'Google_Service_Gmail_Message'; 1524 protected $messageDataType = ''; 1525 1526 1527 public function setMessage(Google_Service_Gmail_Message $message) 1528 { 1529 $this->message = $message; 1530 } 1531 public function getMessage() 1532 { 1533 return $this->message; 1534 } 1535 } 1536 1537 class Google_Service_Gmail_Label extends Google_Model 1538 { 1539 protected $internal_gapi_mappings = array( 1540 ); 1541 public $id; 1542 public $labelListVisibility; 1543 public $messageListVisibility; 1544 public $messagesTotal; 1545 public $messagesUnread; 1546 public $name; 1547 public $threadsTotal; 1548 public $threadsUnread; 1549 public $type; 1550 1551 1552 public function setId($id) 1553 { 1554 $this->id = $id; 1555 } 1556 public function getId() 1557 { 1558 return $this->id; 1559 } 1560 public function setLabelListVisibility($labelListVisibility) 1561 { 1562 $this->labelListVisibility = $labelListVisibility; 1563 } 1564 public function getLabelListVisibility() 1565 { 1566 return $this->labelListVisibility; 1567 } 1568 public function setMessageListVisibility($messageListVisibility) 1569 { 1570 $this->messageListVisibility = $messageListVisibility; 1571 } 1572 public function getMessageListVisibility() 1573 { 1574 return $this->messageListVisibility; 1575 } 1576 public function setMessagesTotal($messagesTotal) 1577 { 1578 $this->messagesTotal = $messagesTotal; 1579 } 1580 public function getMessagesTotal() 1581 { 1582 return $this->messagesTotal; 1583 } 1584 public function setMessagesUnread($messagesUnread) 1585 { 1586 $this->messagesUnread = $messagesUnread; 1587 } 1588 public function getMessagesUnread() 1589 { 1590 return $this->messagesUnread; 1591 } 1592 public function setName($name) 1593 { 1594 $this->name = $name; 1595 } 1596 public function getName() 1597 { 1598 return $this->name; 1599 } 1600 public function setThreadsTotal($threadsTotal) 1601 { 1602 $this->threadsTotal = $threadsTotal; 1603 } 1604 public function getThreadsTotal() 1605 { 1606 return $this->threadsTotal; 1607 } 1608 public function setThreadsUnread($threadsUnread) 1609 { 1610 $this->threadsUnread = $threadsUnread; 1611 } 1612 public function getThreadsUnread() 1613 { 1614 return $this->threadsUnread; 1615 } 1616 public function setType($type) 1617 { 1618 $this->type = $type; 1619 } 1620 public function getType() 1621 { 1622 return $this->type; 1623 } 1624 } 1625 1626 class Google_Service_Gmail_ListDraftsResponse extends Google_Collection 1627 { 1628 protected $collection_key = 'drafts'; 1629 protected $internal_gapi_mappings = array( 1630 ); 1631 protected $draftsType = 'Google_Service_Gmail_Draft'; 1632 protected $draftsDataType = 'array'; 1633 public $nextPageToken; 1634 public $resultSizeEstimate; 1635 1636 1637 public function setDrafts($drafts) 1638 { 1639 $this->drafts = $drafts; 1640 } 1641 public function getDrafts() 1642 { 1643 return $this->drafts; 1644 } 1645 public function setNextPageToken($nextPageToken) 1646 { 1647 $this->nextPageToken = $nextPageToken; 1648 } 1649 public function getNextPageToken() 1650 { 1651 return $this->nextPageToken; 1652 } 1653 public function setResultSizeEstimate($resultSizeEstimate) 1654 { 1655 $this->resultSizeEstimate = $resultSizeEstimate; 1656 } 1657 public function getResultSizeEstimate() 1658 { 1659 return $this->resultSizeEstimate; 1660 } 1661 } 1662 1663 class Google_Service_Gmail_ListHistoryResponse extends Google_Collection 1664 { 1665 protected $collection_key = 'history'; 1666 protected $internal_gapi_mappings = array( 1667 ); 1668 protected $historyType = 'Google_Service_Gmail_History'; 1669 protected $historyDataType = 'array'; 1670 public $historyId; 1671 public $nextPageToken; 1672 1673 1674 public function setHistory($history) 1675 { 1676 $this->history = $history; 1677 } 1678 public function getHistory() 1679 { 1680 return $this->history; 1681 } 1682 public function setHistoryId($historyId) 1683 { 1684 $this->historyId = $historyId; 1685 } 1686 public function getHistoryId() 1687 { 1688 return $this->historyId; 1689 } 1690 public function setNextPageToken($nextPageToken) 1691 { 1692 $this->nextPageToken = $nextPageToken; 1693 } 1694 public function getNextPageToken() 1695 { 1696 return $this->nextPageToken; 1697 } 1698 } 1699 1700 class Google_Service_Gmail_ListLabelsResponse extends Google_Collection 1701 { 1702 protected $collection_key = 'labels'; 1703 protected $internal_gapi_mappings = array( 1704 ); 1705 protected $labelsType = 'Google_Service_Gmail_Label'; 1706 protected $labelsDataType = 'array'; 1707 1708 1709 public function setLabels($labels) 1710 { 1711 $this->labels = $labels; 1712 } 1713 public function getLabels() 1714 { 1715 return $this->labels; 1716 } 1717 } 1718 1719 class Google_Service_Gmail_ListMessagesResponse extends Google_Collection 1720 { 1721 protected $collection_key = 'messages'; 1722 protected $internal_gapi_mappings = array( 1723 ); 1724 protected $messagesType = 'Google_Service_Gmail_Message'; 1725 protected $messagesDataType = 'array'; 1726 public $nextPageToken; 1727 public $resultSizeEstimate; 1728 1729 1730 public function setMessages($messages) 1731 { 1732 $this->messages = $messages; 1733 } 1734 public function getMessages() 1735 { 1736 return $this->messages; 1737 } 1738 public function setNextPageToken($nextPageToken) 1739 { 1740 $this->nextPageToken = $nextPageToken; 1741 } 1742 public function getNextPageToken() 1743 { 1744 return $this->nextPageToken; 1745 } 1746 public function setResultSizeEstimate($resultSizeEstimate) 1747 { 1748 $this->resultSizeEstimate = $resultSizeEstimate; 1749 } 1750 public function getResultSizeEstimate() 1751 { 1752 return $this->resultSizeEstimate; 1753 } 1754 } 1755 1756 class Google_Service_Gmail_ListThreadsResponse extends Google_Collection 1757 { 1758 protected $collection_key = 'threads'; 1759 protected $internal_gapi_mappings = array( 1760 ); 1761 public $nextPageToken; 1762 public $resultSizeEstimate; 1763 protected $threadsType = 'Google_Service_Gmail_Thread'; 1764 protected $threadsDataType = 'array'; 1765 1766 1767 public function setNextPageToken($nextPageToken) 1768 { 1769 $this->nextPageToken = $nextPageToken; 1770 } 1771 public function getNextPageToken() 1772 { 1773 return $this->nextPageToken; 1774 } 1775 public function setResultSizeEstimate($resultSizeEstimate) 1776 { 1777 $this->resultSizeEstimate = $resultSizeEstimate; 1778 } 1779 public function getResultSizeEstimate() 1780 { 1781 return $this->resultSizeEstimate; 1782 } 1783 public function setThreads($threads) 1784 { 1785 $this->threads = $threads; 1786 } 1787 public function getThreads() 1788 { 1789 return $this->threads; 1790 } 1791 } 1792 1793 class Google_Service_Gmail_Message extends Google_Collection 1794 { 1795 protected $collection_key = 'labelIds'; 1796 protected $internal_gapi_mappings = array( 1797 ); 1798 public $historyId; 1799 public $id; 1800 public $internalDate; 1801 public $labelIds; 1802 protected $payloadType = 'Google_Service_Gmail_MessagePart'; 1803 protected $payloadDataType = ''; 1804 public $raw; 1805 public $sizeEstimate; 1806 public $snippet; 1807 public $threadId; 1808 1809 1810 public function setHistoryId($historyId) 1811 { 1812 $this->historyId = $historyId; 1813 } 1814 public function getHistoryId() 1815 { 1816 return $this->historyId; 1817 } 1818 public function setId($id) 1819 { 1820 $this->id = $id; 1821 } 1822 public function getId() 1823 { 1824 return $this->id; 1825 } 1826 public function setInternalDate($internalDate) 1827 { 1828 $this->internalDate = $internalDate; 1829 } 1830 public function getInternalDate() 1831 { 1832 return $this->internalDate; 1833 } 1834 public function setLabelIds($labelIds) 1835 { 1836 $this->labelIds = $labelIds; 1837 } 1838 public function getLabelIds() 1839 { 1840 return $this->labelIds; 1841 } 1842 public function setPayload(Google_Service_Gmail_MessagePart $payload) 1843 { 1844 $this->payload = $payload; 1845 } 1846 public function getPayload() 1847 { 1848 return $this->payload; 1849 } 1850 public function setRaw($raw) 1851 { 1852 $this->raw = $raw; 1853 } 1854 public function getRaw() 1855 { 1856 return $this->raw; 1857 } 1858 public function setSizeEstimate($sizeEstimate) 1859 { 1860 $this->sizeEstimate = $sizeEstimate; 1861 } 1862 public function getSizeEstimate() 1863 { 1864 return $this->sizeEstimate; 1865 } 1866 public function setSnippet($snippet) 1867 { 1868 $this->snippet = $snippet; 1869 } 1870 public function getSnippet() 1871 { 1872 return $this->snippet; 1873 } 1874 public function setThreadId($threadId) 1875 { 1876 $this->threadId = $threadId; 1877 } 1878 public function getThreadId() 1879 { 1880 return $this->threadId; 1881 } 1882 } 1883 1884 class Google_Service_Gmail_MessagePart extends Google_Collection 1885 { 1886 protected $collection_key = 'parts'; 1887 protected $internal_gapi_mappings = array( 1888 ); 1889 protected $bodyType = 'Google_Service_Gmail_MessagePartBody'; 1890 protected $bodyDataType = ''; 1891 public $filename; 1892 protected $headersType = 'Google_Service_Gmail_MessagePartHeader'; 1893 protected $headersDataType = 'array'; 1894 public $mimeType; 1895 public $partId; 1896 protected $partsType = 'Google_Service_Gmail_MessagePart'; 1897 protected $partsDataType = 'array'; 1898 1899 1900 public function setBody(Google_Service_Gmail_MessagePartBody $body) 1901 { 1902 $this->body = $body; 1903 } 1904 public function getBody() 1905 { 1906 return $this->body; 1907 } 1908 public function setFilename($filename) 1909 { 1910 $this->filename = $filename; 1911 } 1912 public function getFilename() 1913 { 1914 return $this->filename; 1915 } 1916 public function setHeaders($headers) 1917 { 1918 $this->headers = $headers; 1919 } 1920 public function getHeaders() 1921 { 1922 return $this->headers; 1923 } 1924 public function setMimeType($mimeType) 1925 { 1926 $this->mimeType = $mimeType; 1927 } 1928 public function getMimeType() 1929 { 1930 return $this->mimeType; 1931 } 1932 public function setPartId($partId) 1933 { 1934 $this->partId = $partId; 1935 } 1936 public function getPartId() 1937 { 1938 return $this->partId; 1939 } 1940 public function setParts($parts) 1941 { 1942 $this->parts = $parts; 1943 } 1944 public function getParts() 1945 { 1946 return $this->parts; 1947 } 1948 } 1949 1950 class Google_Service_Gmail_MessagePartBody extends Google_Model 1951 { 1952 protected $internal_gapi_mappings = array( 1953 ); 1954 public $attachmentId; 1955 public $data; 1956 public $size; 1957 1958 1959 public function setAttachmentId($attachmentId) 1960 { 1961 $this->attachmentId = $attachmentId; 1962 } 1963 public function getAttachmentId() 1964 { 1965 return $this->attachmentId; 1966 } 1967 public function setData($data) 1968 { 1969 $this->data = $data; 1970 } 1971 public function getData() 1972 { 1973 return $this->data; 1974 } 1975 public function setSize($size) 1976 { 1977 $this->size = $size; 1978 } 1979 public function getSize() 1980 { 1981 return $this->size; 1982 } 1983 } 1984 1985 class Google_Service_Gmail_MessagePartHeader extends Google_Model 1986 { 1987 protected $internal_gapi_mappings = array( 1988 ); 1989 public $name; 1990 public $value; 1991 1992 1993 public function setName($name) 1994 { 1995 $this->name = $name; 1996 } 1997 public function getName() 1998 { 1999 return $this->name; 2000 } 2001 public function setValue($value) 2002 { 2003 $this->value = $value; 2004 } 2005 public function getValue() 2006 { 2007 return $this->value; 2008 } 2009 } 2010 2011 class Google_Service_Gmail_ModifyMessageRequest extends Google_Collection 2012 { 2013 protected $collection_key = 'removeLabelIds'; 2014 protected $internal_gapi_mappings = array( 2015 ); 2016 public $addLabelIds; 2017 public $removeLabelIds; 2018 2019 2020 public function setAddLabelIds($addLabelIds) 2021 { 2022 $this->addLabelIds = $addLabelIds; 2023 } 2024 public function getAddLabelIds() 2025 { 2026 return $this->addLabelIds; 2027 } 2028 public function setRemoveLabelIds($removeLabelIds) 2029 { 2030 $this->removeLabelIds = $removeLabelIds; 2031 } 2032 public function getRemoveLabelIds() 2033 { 2034 return $this->removeLabelIds; 2035 } 2036 } 2037 2038 class Google_Service_Gmail_ModifyThreadRequest extends Google_Collection 2039 { 2040 protected $collection_key = 'removeLabelIds'; 2041 protected $internal_gapi_mappings = array( 2042 ); 2043 public $addLabelIds; 2044 public $removeLabelIds; 2045 2046 2047 public function setAddLabelIds($addLabelIds) 2048 { 2049 $this->addLabelIds = $addLabelIds; 2050 } 2051 public function getAddLabelIds() 2052 { 2053 return $this->addLabelIds; 2054 } 2055 public function setRemoveLabelIds($removeLabelIds) 2056 { 2057 $this->removeLabelIds = $removeLabelIds; 2058 } 2059 public function getRemoveLabelIds() 2060 { 2061 return $this->removeLabelIds; 2062 } 2063 } 2064 2065 class Google_Service_Gmail_Profile extends Google_Model 2066 { 2067 protected $internal_gapi_mappings = array( 2068 ); 2069 public $emailAddress; 2070 public $historyId; 2071 public $messagesTotal; 2072 public $threadsTotal; 2073 2074 2075 public function setEmailAddress($emailAddress) 2076 { 2077 $this->emailAddress = $emailAddress; 2078 } 2079 public function getEmailAddress() 2080 { 2081 return $this->emailAddress; 2082 } 2083 public function setHistoryId($historyId) 2084 { 2085 $this->historyId = $historyId; 2086 } 2087 public function getHistoryId() 2088 { 2089 return $this->historyId; 2090 } 2091 public function setMessagesTotal($messagesTotal) 2092 { 2093 $this->messagesTotal = $messagesTotal; 2094 } 2095 public function getMessagesTotal() 2096 { 2097 return $this->messagesTotal; 2098 } 2099 public function setThreadsTotal($threadsTotal) 2100 { 2101 $this->threadsTotal = $threadsTotal; 2102 } 2103 public function getThreadsTotal() 2104 { 2105 return $this->threadsTotal; 2106 } 2107 } 2108 2109 class Google_Service_Gmail_Thread extends Google_Collection 2110 { 2111 protected $collection_key = 'messages'; 2112 protected $internal_gapi_mappings = array( 2113 ); 2114 public $historyId; 2115 public $id; 2116 protected $messagesType = 'Google_Service_Gmail_Message'; 2117 protected $messagesDataType = 'array'; 2118 public $snippet; 2119 2120 2121 public function setHistoryId($historyId) 2122 { 2123 $this->historyId = $historyId; 2124 } 2125 public function getHistoryId() 2126 { 2127 return $this->historyId; 2128 } 2129 public function setId($id) 2130 { 2131 $this->id = $id; 2132 } 2133 public function getId() 2134 { 2135 return $this->id; 2136 } 2137 public function setMessages($messages) 2138 { 2139 $this->messages = $messages; 2140 } 2141 public function getMessages() 2142 { 2143 return $this->messages; 2144 } 2145 public function setSnippet($snippet) 2146 { 2147 $this->snippet = $snippet; 2148 } 2149 public function getSnippet() 2150 { 2151 return $this->snippet; 2152 } 2153 } 2154 2155 class Google_Service_Gmail_WatchRequest extends Google_Collection 2156 { 2157 protected $collection_key = 'labelIds'; 2158 protected $internal_gapi_mappings = array( 2159 ); 2160 public $labelFilterAction; 2161 public $labelIds; 2162 public $topicName; 2163 2164 2165 public function setLabelFilterAction($labelFilterAction) 2166 { 2167 $this->labelFilterAction = $labelFilterAction; 2168 } 2169 public function getLabelFilterAction() 2170 { 2171 return $this->labelFilterAction; 2172 } 2173 public function setLabelIds($labelIds) 2174 { 2175 $this->labelIds = $labelIds; 2176 } 2177 public function getLabelIds() 2178 { 2179 return $this->labelIds; 2180 } 2181 public function setTopicName($topicName) 2182 { 2183 $this->topicName = $topicName; 2184 } 2185 public function getTopicName() 2186 { 2187 return $this->topicName; 2188 } 2189 } 2190 2191 class Google_Service_Gmail_WatchResponse extends Google_Model 2192 { 2193 protected $internal_gapi_mappings = array( 2194 ); 2195 public $expiration; 2196 public $historyId; 2197 2198 2199 public function setExpiration($expiration) 2200 { 2201 $this->expiration = $expiration; 2202 } 2203 public function getExpiration() 2204 { 2205 return $this->expiration; 2206 } 2207 public function setHistoryId($historyId) 2208 { 2209 $this->historyId = $historyId; 2210 } 2211 public function getHistoryId() 2212 { 2213 return $this->historyId; 2214 } 2215 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body