[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/google/Google/Service/ -> Admin.php (source)

   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 Admin (email_migration_v2).
  20   *
  21   * <p>
  22   * Email Migration API lets you migrate emails of users to Google backends.
  23   * </p>
  24   *
  25   * <p>
  26   * For more information about this service, see the API
  27   * <a href="https://developers.google.com/admin-sdk/email-migration/v2/" target="_blank">Documentation</a>
  28   * </p>
  29   *
  30   * @author Google, Inc.
  31   */
  32  class Google_Service_Admin extends Google_Service
  33  {
  34    /** Manage email messages of users on your domain. */
  35    const EMAIL_MIGRATION = "https://www.googleapis.com/auth/email.migration";
  36  
  37    public $mail;
  38    
  39  
  40    /**
  41     * Constructs the internal representation of the Admin service.
  42     *
  43     * @param Google_Client $client
  44     */
  45    public function __construct(Google_Client $client)
  46    {
  47      parent::__construct($client);
  48      $this->servicePath = 'email/v2/users/';
  49      $this->version = 'email_migration_v2';
  50      $this->serviceName = 'admin';
  51  
  52      $this->mail = new Google_Service_Admin_Mail_Resource(
  53          $this,
  54          $this->serviceName,
  55          'mail',
  56          array(
  57            'methods' => array(
  58              'insert' => array(
  59                'path' => '{userKey}/mail',
  60                'httpMethod' => 'POST',
  61                'parameters' => array(
  62                  'userKey' => array(
  63                    'location' => 'path',
  64                    'type' => 'string',
  65                    'required' => true,
  66                  ),
  67                ),
  68              ),
  69            )
  70          )
  71      );
  72    }
  73  }
  74  
  75  
  76  /**
  77   * The "mail" collection of methods.
  78   * Typical usage is:
  79   *  <code>
  80   *   $adminService = new Google_Service_Admin(...);
  81   *   $mail = $adminService->mail;
  82   *  </code>
  83   */
  84  class Google_Service_Admin_Mail_Resource extends Google_Service_Resource
  85  {
  86  
  87    /**
  88     * Insert Mail into Google's Gmail backends (mail.insert)
  89     *
  90     * @param string $userKey
  91     * The email or immutable id of the user
  92     * @param Google_MailItem $postBody
  93     * @param array $optParams Optional parameters.
  94     */
  95    public function insert($userKey, Google_Service_Admin_MailItem $postBody, $optParams = array())
  96    {
  97      $params = array('userKey' => $userKey, 'postBody' => $postBody);
  98      $params = array_merge($params, $optParams);
  99      return $this->call('insert', array($params));
 100    }
 101  }
 102  
 103  
 104  
 105  
 106  class Google_Service_Admin_MailItem extends Google_Collection
 107  {
 108    protected $collection_key = 'labels';
 109    public $isDeleted;
 110    public $isDraft;
 111    public $isInbox;
 112    public $isSent;
 113    public $isStarred;
 114    public $isTrash;
 115    public $isUnread;
 116    public $kind;
 117    public $labels;
 118  
 119    public function setIsDeleted($isDeleted)
 120    {
 121      $this->isDeleted = $isDeleted;
 122    }
 123  
 124    public function getIsDeleted()
 125    {
 126      return $this->isDeleted;
 127    }
 128  
 129    public function setIsDraft($isDraft)
 130    {
 131      $this->isDraft = $isDraft;
 132    }
 133  
 134    public function getIsDraft()
 135    {
 136      return $this->isDraft;
 137    }
 138  
 139    public function setIsInbox($isInbox)
 140    {
 141      $this->isInbox = $isInbox;
 142    }
 143  
 144    public function getIsInbox()
 145    {
 146      return $this->isInbox;
 147    }
 148  
 149    public function setIsSent($isSent)
 150    {
 151      $this->isSent = $isSent;
 152    }
 153  
 154    public function getIsSent()
 155    {
 156      return $this->isSent;
 157    }
 158  
 159    public function setIsStarred($isStarred)
 160    {
 161      $this->isStarred = $isStarred;
 162    }
 163  
 164    public function getIsStarred()
 165    {
 166      return $this->isStarred;
 167    }
 168  
 169    public function setIsTrash($isTrash)
 170    {
 171      $this->isTrash = $isTrash;
 172    }
 173  
 174    public function getIsTrash()
 175    {
 176      return $this->isTrash;
 177    }
 178  
 179    public function setIsUnread($isUnread)
 180    {
 181      $this->isUnread = $isUnread;
 182    }
 183  
 184    public function getIsUnread()
 185    {
 186      return $this->isUnread;
 187    }
 188  
 189    public function setKind($kind)
 190    {
 191      $this->kind = $kind;
 192    }
 193  
 194    public function getKind()
 195    {
 196      return $this->kind;
 197    }
 198  
 199    public function setLabels($labels)
 200    {
 201      $this->labels = $labels;
 202    }
 203  
 204    public function getLabels()
 205    {
 206      return $this->labels;
 207    }
 208  }


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1