Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

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