1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18namespace Google\Service; 19 20use Google\Client; 21 22/** 23 * Service definition for Gmail (v1). 24 * 25 * <p> 26 * The Gmail API lets you view and manage Gmail mailbox data like threads, 27 * messages, and labels.</p> 28 * 29 * <p> 30 * For more information about this service, see the API 31 * <a href="https://developers.google.com/gmail/api/" target="_blank">Documentation</a> 32 * </p> 33 * 34 * @author Google, Inc. 35 */ 36class Gmail extends \Google\Service 37{ 38 /** Read, compose, send, and permanently delete all your email from Gmail. */ 39 const MAIL_GOOGLE_COM = 40 "https://mail.google.com/"; 41 /** Manage drafts and send emails when you interact with the add-on. */ 42 const GMAIL_ADDONS_CURRENT_ACTION_COMPOSE = 43 "https://www.googleapis.com/auth/gmail.addons.current.action.compose"; 44 /** View your email messages when you interact with the add-on. */ 45 const GMAIL_ADDONS_CURRENT_MESSAGE_ACTION = 46 "https://www.googleapis.com/auth/gmail.addons.current.message.action"; 47 /** View your email message metadata when the add-on is running. */ 48 const GMAIL_ADDONS_CURRENT_MESSAGE_METADATA = 49 "https://www.googleapis.com/auth/gmail.addons.current.message.metadata"; 50 /** View your email messages when the add-on is running. */ 51 const GMAIL_ADDONS_CURRENT_MESSAGE_READONLY = 52 "https://www.googleapis.com/auth/gmail.addons.current.message.readonly"; 53 /** Manage drafts and send emails. */ 54 const GMAIL_COMPOSE = 55 "https://www.googleapis.com/auth/gmail.compose"; 56 /** Add emails into your Gmail mailbox. */ 57 const GMAIL_INSERT = 58 "https://www.googleapis.com/auth/gmail.insert"; 59 /** See and edit your email labels. */ 60 const GMAIL_LABELS = 61 "https://www.googleapis.com/auth/gmail.labels"; 62 /** View your email message metadata such as labels and headers, but not the email body. */ 63 const GMAIL_METADATA = 64 "https://www.googleapis.com/auth/gmail.metadata"; 65 /** Read, compose, and send emails from your Gmail account. */ 66 const GMAIL_MODIFY = 67 "https://www.googleapis.com/auth/gmail.modify"; 68 /** View your email messages and settings. */ 69 const GMAIL_READONLY = 70 "https://www.googleapis.com/auth/gmail.readonly"; 71 /** Send email on your behalf. */ 72 const GMAIL_SEND = 73 "https://www.googleapis.com/auth/gmail.send"; 74 /** See, edit, create, or change your email settings and filters in Gmail. */ 75 const GMAIL_SETTINGS_BASIC = 76 "https://www.googleapis.com/auth/gmail.settings.basic"; 77 /** Manage your sensitive mail settings, including who can manage your mail. */ 78 const GMAIL_SETTINGS_SHARING = 79 "https://www.googleapis.com/auth/gmail.settings.sharing"; 80 81 public $users; 82 public $users_drafts; 83 public $users_history; 84 public $users_labels; 85 public $users_messages; 86 public $users_messages_attachments; 87 public $users_settings; 88 public $users_settings_delegates; 89 public $users_settings_filters; 90 public $users_settings_forwardingAddresses; 91 public $users_settings_sendAs; 92 public $users_settings_sendAs_smimeInfo; 93 public $users_threads; 94 95 /** 96 * Constructs the internal representation of the Gmail service. 97 * 98 * @param Client|array $clientOrConfig The client used to deliver requests, or a 99 * config array to pass to a new Client instance. 100 * @param string $rootUrl The root URL used for requests to the service. 101 */ 102 public function __construct($clientOrConfig = [], $rootUrl = null) 103 { 104 parent::__construct($clientOrConfig); 105 $this->rootUrl = $rootUrl ?: 'https://gmail.googleapis.com/'; 106 $this->servicePath = ''; 107 $this->batchPath = 'batch'; 108 $this->version = 'v1'; 109 $this->serviceName = 'gmail'; 110 111 $this->users = new Gmail\Resource\Users( 112 $this, 113 $this->serviceName, 114 'users', 115 [ 116 'methods' => [ 117 'getProfile' => [ 118 'path' => 'gmail/v1/users/{userId}/profile', 119 'httpMethod' => 'GET', 120 'parameters' => [ 121 'userId' => [ 122 'location' => 'path', 123 'type' => 'string', 124 'required' => true, 125 ], 126 ], 127 ],'stop' => [ 128 'path' => 'gmail/v1/users/{userId}/stop', 129 'httpMethod' => 'POST', 130 'parameters' => [ 131 'userId' => [ 132 'location' => 'path', 133 'type' => 'string', 134 'required' => true, 135 ], 136 ], 137 ],'watch' => [ 138 'path' => 'gmail/v1/users/{userId}/watch', 139 'httpMethod' => 'POST', 140 'parameters' => [ 141 'userId' => [ 142 'location' => 'path', 143 'type' => 'string', 144 'required' => true, 145 ], 146 ], 147 ], 148 ] 149 ] 150 ); 151 $this->users_drafts = new Gmail\Resource\UsersDrafts( 152 $this, 153 $this->serviceName, 154 'drafts', 155 [ 156 'methods' => [ 157 'create' => [ 158 'path' => 'gmail/v1/users/{userId}/drafts', 159 'httpMethod' => 'POST', 160 'parameters' => [ 161 'userId' => [ 162 'location' => 'path', 163 'type' => 'string', 164 'required' => true, 165 ], 166 ], 167 ],'delete' => [ 168 'path' => 'gmail/v1/users/{userId}/drafts/{id}', 169 'httpMethod' => 'DELETE', 170 'parameters' => [ 171 'userId' => [ 172 'location' => 'path', 173 'type' => 'string', 174 'required' => true, 175 ], 176 'id' => [ 177 'location' => 'path', 178 'type' => 'string', 179 'required' => true, 180 ], 181 ], 182 ],'get' => [ 183 'path' => 'gmail/v1/users/{userId}/drafts/{id}', 184 'httpMethod' => 'GET', 185 'parameters' => [ 186 'userId' => [ 187 'location' => 'path', 188 'type' => 'string', 189 'required' => true, 190 ], 191 'id' => [ 192 'location' => 'path', 193 'type' => 'string', 194 'required' => true, 195 ], 196 'format' => [ 197 'location' => 'query', 198 'type' => 'string', 199 ], 200 ], 201 ],'list' => [ 202 'path' => 'gmail/v1/users/{userId}/drafts', 203 'httpMethod' => 'GET', 204 'parameters' => [ 205 'userId' => [ 206 'location' => 'path', 207 'type' => 'string', 208 'required' => true, 209 ], 210 'includeSpamTrash' => [ 211 'location' => 'query', 212 'type' => 'boolean', 213 ], 214 'maxResults' => [ 215 'location' => 'query', 216 'type' => 'integer', 217 ], 218 'pageToken' => [ 219 'location' => 'query', 220 'type' => 'string', 221 ], 222 'q' => [ 223 'location' => 'query', 224 'type' => 'string', 225 ], 226 ], 227 ],'send' => [ 228 'path' => 'gmail/v1/users/{userId}/drafts/send', 229 'httpMethod' => 'POST', 230 'parameters' => [ 231 'userId' => [ 232 'location' => 'path', 233 'type' => 'string', 234 'required' => true, 235 ], 236 ], 237 ],'update' => [ 238 'path' => 'gmail/v1/users/{userId}/drafts/{id}', 239 'httpMethod' => 'PUT', 240 'parameters' => [ 241 'userId' => [ 242 'location' => 'path', 243 'type' => 'string', 244 'required' => true, 245 ], 246 'id' => [ 247 'location' => 'path', 248 'type' => 'string', 249 'required' => true, 250 ], 251 ], 252 ], 253 ] 254 ] 255 ); 256 $this->users_history = new Gmail\Resource\UsersHistory( 257 $this, 258 $this->serviceName, 259 'history', 260 [ 261 'methods' => [ 262 'list' => [ 263 'path' => 'gmail/v1/users/{userId}/history', 264 'httpMethod' => 'GET', 265 'parameters' => [ 266 'userId' => [ 267 'location' => 'path', 268 'type' => 'string', 269 'required' => true, 270 ], 271 'historyTypes' => [ 272 'location' => 'query', 273 'type' => 'string', 274 'repeated' => true, 275 ], 276 'labelId' => [ 277 'location' => 'query', 278 'type' => 'string', 279 ], 280 'maxResults' => [ 281 'location' => 'query', 282 'type' => 'integer', 283 ], 284 'pageToken' => [ 285 'location' => 'query', 286 'type' => 'string', 287 ], 288 'startHistoryId' => [ 289 'location' => 'query', 290 'type' => 'string', 291 ], 292 ], 293 ], 294 ] 295 ] 296 ); 297 $this->users_labels = new Gmail\Resource\UsersLabels( 298 $this, 299 $this->serviceName, 300 'labels', 301 [ 302 'methods' => [ 303 'create' => [ 304 'path' => 'gmail/v1/users/{userId}/labels', 305 'httpMethod' => 'POST', 306 'parameters' => [ 307 'userId' => [ 308 'location' => 'path', 309 'type' => 'string', 310 'required' => true, 311 ], 312 ], 313 ],'delete' => [ 314 'path' => 'gmail/v1/users/{userId}/labels/{id}', 315 'httpMethod' => 'DELETE', 316 'parameters' => [ 317 'userId' => [ 318 'location' => 'path', 319 'type' => 'string', 320 'required' => true, 321 ], 322 'id' => [ 323 'location' => 'path', 324 'type' => 'string', 325 'required' => true, 326 ], 327 ], 328 ],'get' => [ 329 'path' => 'gmail/v1/users/{userId}/labels/{id}', 330 'httpMethod' => 'GET', 331 'parameters' => [ 332 'userId' => [ 333 'location' => 'path', 334 'type' => 'string', 335 'required' => true, 336 ], 337 'id' => [ 338 'location' => 'path', 339 'type' => 'string', 340 'required' => true, 341 ], 342 ], 343 ],'list' => [ 344 'path' => 'gmail/v1/users/{userId}/labels', 345 'httpMethod' => 'GET', 346 'parameters' => [ 347 'userId' => [ 348 'location' => 'path', 349 'type' => 'string', 350 'required' => true, 351 ], 352 ], 353 ],'patch' => [ 354 'path' => 'gmail/v1/users/{userId}/labels/{id}', 355 'httpMethod' => 'PATCH', 356 'parameters' => [ 357 'userId' => [ 358 'location' => 'path', 359 'type' => 'string', 360 'required' => true, 361 ], 362 'id' => [ 363 'location' => 'path', 364 'type' => 'string', 365 'required' => true, 366 ], 367 ], 368 ],'update' => [ 369 'path' => 'gmail/v1/users/{userId}/labels/{id}', 370 'httpMethod' => 'PUT', 371 'parameters' => [ 372 'userId' => [ 373 'location' => 'path', 374 'type' => 'string', 375 'required' => true, 376 ], 377 'id' => [ 378 'location' => 'path', 379 'type' => 'string', 380 'required' => true, 381 ], 382 ], 383 ], 384 ] 385 ] 386 ); 387 $this->users_messages = new Gmail\Resource\UsersMessages( 388 $this, 389 $this->serviceName, 390 'messages', 391 [ 392 'methods' => [ 393 'batchDelete' => [ 394 'path' => 'gmail/v1/users/{userId}/messages/batchDelete', 395 'httpMethod' => 'POST', 396 'parameters' => [ 397 'userId' => [ 398 'location' => 'path', 399 'type' => 'string', 400 'required' => true, 401 ], 402 ], 403 ],'batchModify' => [ 404 'path' => 'gmail/v1/users/{userId}/messages/batchModify', 405 'httpMethod' => 'POST', 406 'parameters' => [ 407 'userId' => [ 408 'location' => 'path', 409 'type' => 'string', 410 'required' => true, 411 ], 412 ], 413 ],'delete' => [ 414 'path' => 'gmail/v1/users/{userId}/messages/{id}', 415 'httpMethod' => 'DELETE', 416 'parameters' => [ 417 'userId' => [ 418 'location' => 'path', 419 'type' => 'string', 420 'required' => true, 421 ], 422 'id' => [ 423 'location' => 'path', 424 'type' => 'string', 425 'required' => true, 426 ], 427 ], 428 ],'get' => [ 429 'path' => 'gmail/v1/users/{userId}/messages/{id}', 430 'httpMethod' => 'GET', 431 'parameters' => [ 432 'userId' => [ 433 'location' => 'path', 434 'type' => 'string', 435 'required' => true, 436 ], 437 'id' => [ 438 'location' => 'path', 439 'type' => 'string', 440 'required' => true, 441 ], 442 'format' => [ 443 'location' => 'query', 444 'type' => 'string', 445 ], 446 'metadataHeaders' => [ 447 'location' => 'query', 448 'type' => 'string', 449 'repeated' => true, 450 ], 451 ], 452 ],'import' => [ 453 'path' => 'gmail/v1/users/{userId}/messages/import', 454 'httpMethod' => 'POST', 455 'parameters' => [ 456 'userId' => [ 457 'location' => 'path', 458 'type' => 'string', 459 'required' => true, 460 ], 461 'deleted' => [ 462 'location' => 'query', 463 'type' => 'boolean', 464 ], 465 'internalDateSource' => [ 466 'location' => 'query', 467 'type' => 'string', 468 ], 469 'neverMarkSpam' => [ 470 'location' => 'query', 471 'type' => 'boolean', 472 ], 473 'processForCalendar' => [ 474 'location' => 'query', 475 'type' => 'boolean', 476 ], 477 ], 478 ],'insert' => [ 479 'path' => 'gmail/v1/users/{userId}/messages', 480 'httpMethod' => 'POST', 481 'parameters' => [ 482 'userId' => [ 483 'location' => 'path', 484 'type' => 'string', 485 'required' => true, 486 ], 487 'deleted' => [ 488 'location' => 'query', 489 'type' => 'boolean', 490 ], 491 'internalDateSource' => [ 492 'location' => 'query', 493 'type' => 'string', 494 ], 495 ], 496 ],'list' => [ 497 'path' => 'gmail/v1/users/{userId}/messages', 498 'httpMethod' => 'GET', 499 'parameters' => [ 500 'userId' => [ 501 'location' => 'path', 502 'type' => 'string', 503 'required' => true, 504 ], 505 'includeSpamTrash' => [ 506 'location' => 'query', 507 'type' => 'boolean', 508 ], 509 'labelIds' => [ 510 'location' => 'query', 511 'type' => 'string', 512 'repeated' => true, 513 ], 514 'maxResults' => [ 515 'location' => 'query', 516 'type' => 'integer', 517 ], 518 'pageToken' => [ 519 'location' => 'query', 520 'type' => 'string', 521 ], 522 'q' => [ 523 'location' => 'query', 524 'type' => 'string', 525 ], 526 ], 527 ],'modify' => [ 528 'path' => 'gmail/v1/users/{userId}/messages/{id}/modify', 529 'httpMethod' => 'POST', 530 'parameters' => [ 531 'userId' => [ 532 'location' => 'path', 533 'type' => 'string', 534 'required' => true, 535 ], 536 'id' => [ 537 'location' => 'path', 538 'type' => 'string', 539 'required' => true, 540 ], 541 ], 542 ],'send' => [ 543 'path' => 'gmail/v1/users/{userId}/messages/send', 544 'httpMethod' => 'POST', 545 'parameters' => [ 546 'userId' => [ 547 'location' => 'path', 548 'type' => 'string', 549 'required' => true, 550 ], 551 ], 552 ],'trash' => [ 553 'path' => 'gmail/v1/users/{userId}/messages/{id}/trash', 554 'httpMethod' => 'POST', 555 'parameters' => [ 556 'userId' => [ 557 'location' => 'path', 558 'type' => 'string', 559 'required' => true, 560 ], 561 'id' => [ 562 'location' => 'path', 563 'type' => 'string', 564 'required' => true, 565 ], 566 ], 567 ],'untrash' => [ 568 'path' => 'gmail/v1/users/{userId}/messages/{id}/untrash', 569 'httpMethod' => 'POST', 570 'parameters' => [ 571 'userId' => [ 572 'location' => 'path', 573 'type' => 'string', 574 'required' => true, 575 ], 576 'id' => [ 577 'location' => 'path', 578 'type' => 'string', 579 'required' => true, 580 ], 581 ], 582 ], 583 ] 584 ] 585 ); 586 $this->users_messages_attachments = new Gmail\Resource\UsersMessagesAttachments( 587 $this, 588 $this->serviceName, 589 'attachments', 590 [ 591 'methods' => [ 592 'get' => [ 593 'path' => 'gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}', 594 'httpMethod' => 'GET', 595 'parameters' => [ 596 'userId' => [ 597 'location' => 'path', 598 'type' => 'string', 599 'required' => true, 600 ], 601 'messageId' => [ 602 'location' => 'path', 603 'type' => 'string', 604 'required' => true, 605 ], 606 'id' => [ 607 'location' => 'path', 608 'type' => 'string', 609 'required' => true, 610 ], 611 ], 612 ], 613 ] 614 ] 615 ); 616 $this->users_settings = new Gmail\Resource\UsersSettings( 617 $this, 618 $this->serviceName, 619 'settings', 620 [ 621 'methods' => [ 622 'getAutoForwarding' => [ 623 'path' => 'gmail/v1/users/{userId}/settings/autoForwarding', 624 'httpMethod' => 'GET', 625 'parameters' => [ 626 'userId' => [ 627 'location' => 'path', 628 'type' => 'string', 629 'required' => true, 630 ], 631 ], 632 ],'getImap' => [ 633 'path' => 'gmail/v1/users/{userId}/settings/imap', 634 'httpMethod' => 'GET', 635 'parameters' => [ 636 'userId' => [ 637 'location' => 'path', 638 'type' => 'string', 639 'required' => true, 640 ], 641 ], 642 ],'getLanguage' => [ 643 'path' => 'gmail/v1/users/{userId}/settings/language', 644 'httpMethod' => 'GET', 645 'parameters' => [ 646 'userId' => [ 647 'location' => 'path', 648 'type' => 'string', 649 'required' => true, 650 ], 651 ], 652 ],'getPop' => [ 653 'path' => 'gmail/v1/users/{userId}/settings/pop', 654 'httpMethod' => 'GET', 655 'parameters' => [ 656 'userId' => [ 657 'location' => 'path', 658 'type' => 'string', 659 'required' => true, 660 ], 661 ], 662 ],'getVacation' => [ 663 'path' => 'gmail/v1/users/{userId}/settings/vacation', 664 'httpMethod' => 'GET', 665 'parameters' => [ 666 'userId' => [ 667 'location' => 'path', 668 'type' => 'string', 669 'required' => true, 670 ], 671 ], 672 ],'updateAutoForwarding' => [ 673 'path' => 'gmail/v1/users/{userId}/settings/autoForwarding', 674 'httpMethod' => 'PUT', 675 'parameters' => [ 676 'userId' => [ 677 'location' => 'path', 678 'type' => 'string', 679 'required' => true, 680 ], 681 ], 682 ],'updateImap' => [ 683 'path' => 'gmail/v1/users/{userId}/settings/imap', 684 'httpMethod' => 'PUT', 685 'parameters' => [ 686 'userId' => [ 687 'location' => 'path', 688 'type' => 'string', 689 'required' => true, 690 ], 691 ], 692 ],'updateLanguage' => [ 693 'path' => 'gmail/v1/users/{userId}/settings/language', 694 'httpMethod' => 'PUT', 695 'parameters' => [ 696 'userId' => [ 697 'location' => 'path', 698 'type' => 'string', 699 'required' => true, 700 ], 701 ], 702 ],'updatePop' => [ 703 'path' => 'gmail/v1/users/{userId}/settings/pop', 704 'httpMethod' => 'PUT', 705 'parameters' => [ 706 'userId' => [ 707 'location' => 'path', 708 'type' => 'string', 709 'required' => true, 710 ], 711 ], 712 ],'updateVacation' => [ 713 'path' => 'gmail/v1/users/{userId}/settings/vacation', 714 'httpMethod' => 'PUT', 715 'parameters' => [ 716 'userId' => [ 717 'location' => 'path', 718 'type' => 'string', 719 'required' => true, 720 ], 721 ], 722 ], 723 ] 724 ] 725 ); 726 $this->users_settings_delegates = new Gmail\Resource\UsersSettingsDelegates( 727 $this, 728 $this->serviceName, 729 'delegates', 730 [ 731 'methods' => [ 732 'create' => [ 733 'path' => 'gmail/v1/users/{userId}/settings/delegates', 734 'httpMethod' => 'POST', 735 'parameters' => [ 736 'userId' => [ 737 'location' => 'path', 738 'type' => 'string', 739 'required' => true, 740 ], 741 ], 742 ],'delete' => [ 743 'path' => 'gmail/v1/users/{userId}/settings/delegates/{delegateEmail}', 744 'httpMethod' => 'DELETE', 745 'parameters' => [ 746 'userId' => [ 747 'location' => 'path', 748 'type' => 'string', 749 'required' => true, 750 ], 751 'delegateEmail' => [ 752 'location' => 'path', 753 'type' => 'string', 754 'required' => true, 755 ], 756 ], 757 ],'get' => [ 758 'path' => 'gmail/v1/users/{userId}/settings/delegates/{delegateEmail}', 759 'httpMethod' => 'GET', 760 'parameters' => [ 761 'userId' => [ 762 'location' => 'path', 763 'type' => 'string', 764 'required' => true, 765 ], 766 'delegateEmail' => [ 767 'location' => 'path', 768 'type' => 'string', 769 'required' => true, 770 ], 771 ], 772 ],'list' => [ 773 'path' => 'gmail/v1/users/{userId}/settings/delegates', 774 'httpMethod' => 'GET', 775 'parameters' => [ 776 'userId' => [ 777 'location' => 'path', 778 'type' => 'string', 779 'required' => true, 780 ], 781 ], 782 ], 783 ] 784 ] 785 ); 786 $this->users_settings_filters = new Gmail\Resource\UsersSettingsFilters( 787 $this, 788 $this->serviceName, 789 'filters', 790 [ 791 'methods' => [ 792 'create' => [ 793 'path' => 'gmail/v1/users/{userId}/settings/filters', 794 'httpMethod' => 'POST', 795 'parameters' => [ 796 'userId' => [ 797 'location' => 'path', 798 'type' => 'string', 799 'required' => true, 800 ], 801 ], 802 ],'delete' => [ 803 'path' => 'gmail/v1/users/{userId}/settings/filters/{id}', 804 'httpMethod' => 'DELETE', 805 'parameters' => [ 806 'userId' => [ 807 'location' => 'path', 808 'type' => 'string', 809 'required' => true, 810 ], 811 'id' => [ 812 'location' => 'path', 813 'type' => 'string', 814 'required' => true, 815 ], 816 ], 817 ],'get' => [ 818 'path' => 'gmail/v1/users/{userId}/settings/filters/{id}', 819 'httpMethod' => 'GET', 820 'parameters' => [ 821 'userId' => [ 822 'location' => 'path', 823 'type' => 'string', 824 'required' => true, 825 ], 826 'id' => [ 827 'location' => 'path', 828 'type' => 'string', 829 'required' => true, 830 ], 831 ], 832 ],'list' => [ 833 'path' => 'gmail/v1/users/{userId}/settings/filters', 834 'httpMethod' => 'GET', 835 'parameters' => [ 836 'userId' => [ 837 'location' => 'path', 838 'type' => 'string', 839 'required' => true, 840 ], 841 ], 842 ], 843 ] 844 ] 845 ); 846 $this->users_settings_forwardingAddresses = new Gmail\Resource\UsersSettingsForwardingAddresses( 847 $this, 848 $this->serviceName, 849 'forwardingAddresses', 850 [ 851 'methods' => [ 852 'create' => [ 853 'path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses', 854 'httpMethod' => 'POST', 855 'parameters' => [ 856 'userId' => [ 857 'location' => 'path', 858 'type' => 'string', 859 'required' => true, 860 ], 861 ], 862 ],'delete' => [ 863 'path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}', 864 'httpMethod' => 'DELETE', 865 'parameters' => [ 866 'userId' => [ 867 'location' => 'path', 868 'type' => 'string', 869 'required' => true, 870 ], 871 'forwardingEmail' => [ 872 'location' => 'path', 873 'type' => 'string', 874 'required' => true, 875 ], 876 ], 877 ],'get' => [ 878 'path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}', 879 'httpMethod' => 'GET', 880 'parameters' => [ 881 'userId' => [ 882 'location' => 'path', 883 'type' => 'string', 884 'required' => true, 885 ], 886 'forwardingEmail' => [ 887 'location' => 'path', 888 'type' => 'string', 889 'required' => true, 890 ], 891 ], 892 ],'list' => [ 893 'path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses', 894 'httpMethod' => 'GET', 895 'parameters' => [ 896 'userId' => [ 897 'location' => 'path', 898 'type' => 'string', 899 'required' => true, 900 ], 901 ], 902 ], 903 ] 904 ] 905 ); 906 $this->users_settings_sendAs = new Gmail\Resource\UsersSettingsSendAs( 907 $this, 908 $this->serviceName, 909 'sendAs', 910 [ 911 'methods' => [ 912 'create' => [ 913 'path' => 'gmail/v1/users/{userId}/settings/sendAs', 914 'httpMethod' => 'POST', 915 'parameters' => [ 916 'userId' => [ 917 'location' => 'path', 918 'type' => 'string', 919 'required' => true, 920 ], 921 ], 922 ],'delete' => [ 923 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', 924 'httpMethod' => 'DELETE', 925 'parameters' => [ 926 'userId' => [ 927 'location' => 'path', 928 'type' => 'string', 929 'required' => true, 930 ], 931 'sendAsEmail' => [ 932 'location' => 'path', 933 'type' => 'string', 934 'required' => true, 935 ], 936 ], 937 ],'get' => [ 938 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', 939 'httpMethod' => 'GET', 940 'parameters' => [ 941 'userId' => [ 942 'location' => 'path', 943 'type' => 'string', 944 'required' => true, 945 ], 946 'sendAsEmail' => [ 947 'location' => 'path', 948 'type' => 'string', 949 'required' => true, 950 ], 951 ], 952 ],'list' => [ 953 'path' => 'gmail/v1/users/{userId}/settings/sendAs', 954 'httpMethod' => 'GET', 955 'parameters' => [ 956 'userId' => [ 957 'location' => 'path', 958 'type' => 'string', 959 'required' => true, 960 ], 961 ], 962 ],'patch' => [ 963 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', 964 'httpMethod' => 'PATCH', 965 'parameters' => [ 966 'userId' => [ 967 'location' => 'path', 968 'type' => 'string', 969 'required' => true, 970 ], 971 'sendAsEmail' => [ 972 'location' => 'path', 973 'type' => 'string', 974 'required' => true, 975 ], 976 ], 977 ],'update' => [ 978 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', 979 'httpMethod' => 'PUT', 980 'parameters' => [ 981 'userId' => [ 982 'location' => 'path', 983 'type' => 'string', 984 'required' => true, 985 ], 986 'sendAsEmail' => [ 987 'location' => 'path', 988 'type' => 'string', 989 'required' => true, 990 ], 991 ], 992 ],'verify' => [ 993 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify', 994 'httpMethod' => 'POST', 995 'parameters' => [ 996 'userId' => [ 997 'location' => 'path', 998 'type' => 'string', 999 'required' => true, 1000 ], 1001 'sendAsEmail' => [ 1002 'location' => 'path', 1003 'type' => 'string', 1004 'required' => true, 1005 ], 1006 ], 1007 ], 1008 ] 1009 ] 1010 ); 1011 $this->users_settings_sendAs_smimeInfo = new Gmail\Resource\UsersSettingsSendAsSmimeInfo( 1012 $this, 1013 $this->serviceName, 1014 'smimeInfo', 1015 [ 1016 'methods' => [ 1017 'delete' => [ 1018 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', 1019 'httpMethod' => 'DELETE', 1020 'parameters' => [ 1021 'userId' => [ 1022 'location' => 'path', 1023 'type' => 'string', 1024 'required' => true, 1025 ], 1026 'sendAsEmail' => [ 1027 'location' => 'path', 1028 'type' => 'string', 1029 'required' => true, 1030 ], 1031 'id' => [ 1032 'location' => 'path', 1033 'type' => 'string', 1034 'required' => true, 1035 ], 1036 ], 1037 ],'get' => [ 1038 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', 1039 'httpMethod' => 'GET', 1040 'parameters' => [ 1041 'userId' => [ 1042 'location' => 'path', 1043 'type' => 'string', 1044 'required' => true, 1045 ], 1046 'sendAsEmail' => [ 1047 'location' => 'path', 1048 'type' => 'string', 1049 'required' => true, 1050 ], 1051 'id' => [ 1052 'location' => 'path', 1053 'type' => 'string', 1054 'required' => true, 1055 ], 1056 ], 1057 ],'insert' => [ 1058 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', 1059 'httpMethod' => 'POST', 1060 'parameters' => [ 1061 'userId' => [ 1062 'location' => 'path', 1063 'type' => 'string', 1064 'required' => true, 1065 ], 1066 'sendAsEmail' => [ 1067 'location' => 'path', 1068 'type' => 'string', 1069 'required' => true, 1070 ], 1071 ], 1072 ],'list' => [ 1073 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', 1074 'httpMethod' => 'GET', 1075 'parameters' => [ 1076 'userId' => [ 1077 'location' => 'path', 1078 'type' => 'string', 1079 'required' => true, 1080 ], 1081 'sendAsEmail' => [ 1082 'location' => 'path', 1083 'type' => 'string', 1084 'required' => true, 1085 ], 1086 ], 1087 ],'setDefault' => [ 1088 'path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault', 1089 'httpMethod' => 'POST', 1090 'parameters' => [ 1091 'userId' => [ 1092 'location' => 'path', 1093 'type' => 'string', 1094 'required' => true, 1095 ], 1096 'sendAsEmail' => [ 1097 'location' => 'path', 1098 'type' => 'string', 1099 'required' => true, 1100 ], 1101 'id' => [ 1102 'location' => 'path', 1103 'type' => 'string', 1104 'required' => true, 1105 ], 1106 ], 1107 ], 1108 ] 1109 ] 1110 ); 1111 $this->users_threads = new Gmail\Resource\UsersThreads( 1112 $this, 1113 $this->serviceName, 1114 'threads', 1115 [ 1116 'methods' => [ 1117 'delete' => [ 1118 'path' => 'gmail/v1/users/{userId}/threads/{id}', 1119 'httpMethod' => 'DELETE', 1120 'parameters' => [ 1121 'userId' => [ 1122 'location' => 'path', 1123 'type' => 'string', 1124 'required' => true, 1125 ], 1126 'id' => [ 1127 'location' => 'path', 1128 'type' => 'string', 1129 'required' => true, 1130 ], 1131 ], 1132 ],'get' => [ 1133 'path' => 'gmail/v1/users/{userId}/threads/{id}', 1134 'httpMethod' => 'GET', 1135 'parameters' => [ 1136 'userId' => [ 1137 'location' => 'path', 1138 'type' => 'string', 1139 'required' => true, 1140 ], 1141 'id' => [ 1142 'location' => 'path', 1143 'type' => 'string', 1144 'required' => true, 1145 ], 1146 'format' => [ 1147 'location' => 'query', 1148 'type' => 'string', 1149 ], 1150 'metadataHeaders' => [ 1151 'location' => 'query', 1152 'type' => 'string', 1153 'repeated' => true, 1154 ], 1155 ], 1156 ],'list' => [ 1157 'path' => 'gmail/v1/users/{userId}/threads', 1158 'httpMethod' => 'GET', 1159 'parameters' => [ 1160 'userId' => [ 1161 'location' => 'path', 1162 'type' => 'string', 1163 'required' => true, 1164 ], 1165 'includeSpamTrash' => [ 1166 'location' => 'query', 1167 'type' => 'boolean', 1168 ], 1169 'labelIds' => [ 1170 'location' => 'query', 1171 'type' => 'string', 1172 'repeated' => true, 1173 ], 1174 'maxResults' => [ 1175 'location' => 'query', 1176 'type' => 'integer', 1177 ], 1178 'pageToken' => [ 1179 'location' => 'query', 1180 'type' => 'string', 1181 ], 1182 'q' => [ 1183 'location' => 'query', 1184 'type' => 'string', 1185 ], 1186 ], 1187 ],'modify' => [ 1188 'path' => 'gmail/v1/users/{userId}/threads/{id}/modify', 1189 'httpMethod' => 'POST', 1190 'parameters' => [ 1191 'userId' => [ 1192 'location' => 'path', 1193 'type' => 'string', 1194 'required' => true, 1195 ], 1196 'id' => [ 1197 'location' => 'path', 1198 'type' => 'string', 1199 'required' => true, 1200 ], 1201 ], 1202 ],'trash' => [ 1203 'path' => 'gmail/v1/users/{userId}/threads/{id}/trash', 1204 'httpMethod' => 'POST', 1205 'parameters' => [ 1206 'userId' => [ 1207 'location' => 'path', 1208 'type' => 'string', 1209 'required' => true, 1210 ], 1211 'id' => [ 1212 'location' => 'path', 1213 'type' => 'string', 1214 'required' => true, 1215 ], 1216 ], 1217 ],'untrash' => [ 1218 'path' => 'gmail/v1/users/{userId}/threads/{id}/untrash', 1219 'httpMethod' => 'POST', 1220 'parameters' => [ 1221 'userId' => [ 1222 'location' => 'path', 1223 'type' => 'string', 1224 'required' => true, 1225 ], 1226 'id' => [ 1227 'location' => 'path', 1228 'type' => 'string', 1229 'required' => true, 1230 ], 1231 ], 1232 ], 1233 ] 1234 ] 1235 ); 1236 } 1237} 1238 1239// Adding a class alias for backwards compatibility with the previous class name. 1240class_alias(Gmail::class, 'Google_Service_Gmail'); 1241