Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 401 and 402] [Versions 401 and 403]

   1  <?php
   2  /*
   3   * Copyright 2010 Google Inc.
   4   *
   5   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
   6   * use this file except in compliance with the License. You may obtain a copy of
   7   * the License at
   8   *
   9   * http://www.apache.org/licenses/LICENSE-2.0
  10   *
  11   * Unless required by applicable law or agreed to in writing, software
  12   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14   * License for the specific language governing permissions and limitations under
  15   * the License.
  16   */
  17  
  18  /**
  19   * Service definition for Groupssettings (v1).
  20   *
  21   * <p>
  22   * Lets you manage permission levels and related settings of a group.</p>
  23   *
  24   * <p>
  25   * For more information about this service, see the API
  26   * <a href="https://developers.google.com/google-apps/groups-settings/get_started" target="_blank">Documentation</a>
  27   * </p>
  28   *
  29   * @author Google, Inc.
  30   */
  31  class Google_Service_Groupssettings extends Google_Service
  32  {
  33    /** View and manage the settings of a Google Apps Group. */
  34    const APPS_GROUPS_SETTINGS =
  35        "https://www.googleapis.com/auth/apps.groups.settings";
  36  
  37    public $groups;
  38    
  39  
  40    /**
  41     * Constructs the internal representation of the Groupssettings service.
  42     *
  43     * @param Google_Client $client
  44     */
  45    public function __construct(Google_Client $client)
  46    {
  47      parent::__construct($client);
  48      $this->rootUrl = 'https://www.googleapis.com/';
  49      $this->servicePath = 'groups/v1/groups/';
  50      $this->version = 'v1';
  51      $this->serviceName = 'groupssettings';
  52  
  53      $this->groups = new Google_Service_Groupssettings_Groups_Resource(
  54          $this,
  55          $this->serviceName,
  56          'groups',
  57          array(
  58            'methods' => array(
  59              'get' => array(
  60                'path' => '{groupUniqueId}',
  61                'httpMethod' => 'GET',
  62                'parameters' => array(
  63                  'groupUniqueId' => array(
  64                    'location' => 'path',
  65                    'type' => 'string',
  66                    'required' => true,
  67                  ),
  68                ),
  69              ),'patch' => array(
  70                'path' => '{groupUniqueId}',
  71                'httpMethod' => 'PATCH',
  72                'parameters' => array(
  73                  'groupUniqueId' => array(
  74                    'location' => 'path',
  75                    'type' => 'string',
  76                    'required' => true,
  77                  ),
  78                ),
  79              ),'update' => array(
  80                'path' => '{groupUniqueId}',
  81                'httpMethod' => 'PUT',
  82                'parameters' => array(
  83                  'groupUniqueId' => array(
  84                    'location' => 'path',
  85                    'type' => 'string',
  86                    'required' => true,
  87                  ),
  88                ),
  89              ),
  90            )
  91          )
  92      );
  93    }
  94  }
  95  
  96  
  97  /**
  98   * The "groups" collection of methods.
  99   * Typical usage is:
 100   *  <code>
 101   *   $groupssettingsService = new Google_Service_Groupssettings(...);
 102   *   $groups = $groupssettingsService->groups;
 103   *  </code>
 104   */
 105  class Google_Service_Groupssettings_Groups_Resource extends Google_Service_Resource
 106  {
 107  
 108    /**
 109     * Gets one resource by id. (groups.get)
 110     *
 111     * @param string $groupUniqueId The resource ID
 112     * @param array $optParams Optional parameters.
 113     * @return Google_Service_Groupssettings_Groups
 114     */
 115    public function get($groupUniqueId, $optParams = array())
 116    {
 117      $params = array('groupUniqueId' => $groupUniqueId);
 118      $params = array_merge($params, $optParams);
 119      return $this->call('get', array($params), "Google_Service_Groupssettings_Groups");
 120    }
 121  
 122    /**
 123     * Updates an existing resource. This method supports patch semantics.
 124     * (groups.patch)
 125     *
 126     * @param string $groupUniqueId The resource ID
 127     * @param Google_Groups $postBody
 128     * @param array $optParams Optional parameters.
 129     * @return Google_Service_Groupssettings_Groups
 130     */
 131    public function patch($groupUniqueId, Google_Service_Groupssettings_Groups $postBody, $optParams = array())
 132    {
 133      $params = array('groupUniqueId' => $groupUniqueId, 'postBody' => $postBody);
 134      $params = array_merge($params, $optParams);
 135      return $this->call('patch', array($params), "Google_Service_Groupssettings_Groups");
 136    }
 137  
 138    /**
 139     * Updates an existing resource. (groups.update)
 140     *
 141     * @param string $groupUniqueId The resource ID
 142     * @param Google_Groups $postBody
 143     * @param array $optParams Optional parameters.
 144     * @return Google_Service_Groupssettings_Groups
 145     */
 146    public function update($groupUniqueId, Google_Service_Groupssettings_Groups $postBody, $optParams = array())
 147    {
 148      $params = array('groupUniqueId' => $groupUniqueId, 'postBody' => $postBody);
 149      $params = array_merge($params, $optParams);
 150      return $this->call('update', array($params), "Google_Service_Groupssettings_Groups");
 151    }
 152  }
 153  
 154  
 155  
 156  
 157  class Google_Service_Groupssettings_Groups extends Google_Model
 158  {
 159    protected $internal_gapi_mappings = array(
 160    );
 161    public $allowExternalMembers;
 162    public $allowGoogleCommunication;
 163    public $allowWebPosting;
 164    public $archiveOnly;
 165    public $customReplyTo;
 166    public $defaultMessageDenyNotificationText;
 167    public $description;
 168    public $email;
 169    public $includeInGlobalAddressList;
 170    public $isArchived;
 171    public $kind;
 172    public $maxMessageBytes;
 173    public $membersCanPostAsTheGroup;
 174    public $messageDisplayFont;
 175    public $messageModerationLevel;
 176    public $name;
 177    public $primaryLanguage;
 178    public $replyTo;
 179    public $sendMessageDenyNotification;
 180    public $showInGroupDirectory;
 181    public $spamModerationLevel;
 182    public $whoCanContactOwner;
 183    public $whoCanInvite;
 184    public $whoCanJoin;
 185    public $whoCanLeaveGroup;
 186    public $whoCanPostMessage;
 187    public $whoCanViewGroup;
 188    public $whoCanViewMembership;
 189  
 190  
 191    public function setAllowExternalMembers($allowExternalMembers)
 192    {
 193      $this->allowExternalMembers = $allowExternalMembers;
 194    }
 195    public function getAllowExternalMembers()
 196    {
 197      return $this->allowExternalMembers;
 198    }
 199    public function setAllowGoogleCommunication($allowGoogleCommunication)
 200    {
 201      $this->allowGoogleCommunication = $allowGoogleCommunication;
 202    }
 203    public function getAllowGoogleCommunication()
 204    {
 205      return $this->allowGoogleCommunication;
 206    }
 207    public function setAllowWebPosting($allowWebPosting)
 208    {
 209      $this->allowWebPosting = $allowWebPosting;
 210    }
 211    public function getAllowWebPosting()
 212    {
 213      return $this->allowWebPosting;
 214    }
 215    public function setArchiveOnly($archiveOnly)
 216    {
 217      $this->archiveOnly = $archiveOnly;
 218    }
 219    public function getArchiveOnly()
 220    {
 221      return $this->archiveOnly;
 222    }
 223    public function setCustomReplyTo($customReplyTo)
 224    {
 225      $this->customReplyTo = $customReplyTo;
 226    }
 227    public function getCustomReplyTo()
 228    {
 229      return $this->customReplyTo;
 230    }
 231    public function setDefaultMessageDenyNotificationText($defaultMessageDenyNotificationText)
 232    {
 233      $this->defaultMessageDenyNotificationText = $defaultMessageDenyNotificationText;
 234    }
 235    public function getDefaultMessageDenyNotificationText()
 236    {
 237      return $this->defaultMessageDenyNotificationText;
 238    }
 239    public function setDescription($description)
 240    {
 241      $this->description = $description;
 242    }
 243    public function getDescription()
 244    {
 245      return $this->description;
 246    }
 247    public function setEmail($email)
 248    {
 249      $this->email = $email;
 250    }
 251    public function getEmail()
 252    {
 253      return $this->email;
 254    }
 255    public function setIncludeInGlobalAddressList($includeInGlobalAddressList)
 256    {
 257      $this->includeInGlobalAddressList = $includeInGlobalAddressList;
 258    }
 259    public function getIncludeInGlobalAddressList()
 260    {
 261      return $this->includeInGlobalAddressList;
 262    }
 263    public function setIsArchived($isArchived)
 264    {
 265      $this->isArchived = $isArchived;
 266    }
 267    public function getIsArchived()
 268    {
 269      return $this->isArchived;
 270    }
 271    public function setKind($kind)
 272    {
 273      $this->kind = $kind;
 274    }
 275    public function getKind()
 276    {
 277      return $this->kind;
 278    }
 279    public function setMaxMessageBytes($maxMessageBytes)
 280    {
 281      $this->maxMessageBytes = $maxMessageBytes;
 282    }
 283    public function getMaxMessageBytes()
 284    {
 285      return $this->maxMessageBytes;
 286    }
 287    public function setMembersCanPostAsTheGroup($membersCanPostAsTheGroup)
 288    {
 289      $this->membersCanPostAsTheGroup = $membersCanPostAsTheGroup;
 290    }
 291    public function getMembersCanPostAsTheGroup()
 292    {
 293      return $this->membersCanPostAsTheGroup;
 294    }
 295    public function setMessageDisplayFont($messageDisplayFont)
 296    {
 297      $this->messageDisplayFont = $messageDisplayFont;
 298    }
 299    public function getMessageDisplayFont()
 300    {
 301      return $this->messageDisplayFont;
 302    }
 303    public function setMessageModerationLevel($messageModerationLevel)
 304    {
 305      $this->messageModerationLevel = $messageModerationLevel;
 306    }
 307    public function getMessageModerationLevel()
 308    {
 309      return $this->messageModerationLevel;
 310    }
 311    public function setName($name)
 312    {
 313      $this->name = $name;
 314    }
 315    public function getName()
 316    {
 317      return $this->name;
 318    }
 319    public function setPrimaryLanguage($primaryLanguage)
 320    {
 321      $this->primaryLanguage = $primaryLanguage;
 322    }
 323    public function getPrimaryLanguage()
 324    {
 325      return $this->primaryLanguage;
 326    }
 327    public function setReplyTo($replyTo)
 328    {
 329      $this->replyTo = $replyTo;
 330    }
 331    public function getReplyTo()
 332    {
 333      return $this->replyTo;
 334    }
 335    public function setSendMessageDenyNotification($sendMessageDenyNotification)
 336    {
 337      $this->sendMessageDenyNotification = $sendMessageDenyNotification;
 338    }
 339    public function getSendMessageDenyNotification()
 340    {
 341      return $this->sendMessageDenyNotification;
 342    }
 343    public function setShowInGroupDirectory($showInGroupDirectory)
 344    {
 345      $this->showInGroupDirectory = $showInGroupDirectory;
 346    }
 347    public function getShowInGroupDirectory()
 348    {
 349      return $this->showInGroupDirectory;
 350    }
 351    public function setSpamModerationLevel($spamModerationLevel)
 352    {
 353      $this->spamModerationLevel = $spamModerationLevel;
 354    }
 355    public function getSpamModerationLevel()
 356    {
 357      return $this->spamModerationLevel;
 358    }
 359    public function setWhoCanContactOwner($whoCanContactOwner)
 360    {
 361      $this->whoCanContactOwner = $whoCanContactOwner;
 362    }
 363    public function getWhoCanContactOwner()
 364    {
 365      return $this->whoCanContactOwner;
 366    }
 367    public function setWhoCanInvite($whoCanInvite)
 368    {
 369      $this->whoCanInvite = $whoCanInvite;
 370    }
 371    public function getWhoCanInvite()
 372    {
 373      return $this->whoCanInvite;
 374    }
 375    public function setWhoCanJoin($whoCanJoin)
 376    {
 377      $this->whoCanJoin = $whoCanJoin;
 378    }
 379    public function getWhoCanJoin()
 380    {
 381      return $this->whoCanJoin;
 382    }
 383    public function setWhoCanLeaveGroup($whoCanLeaveGroup)
 384    {
 385      $this->whoCanLeaveGroup = $whoCanLeaveGroup;
 386    }
 387    public function getWhoCanLeaveGroup()
 388    {
 389      return $this->whoCanLeaveGroup;
 390    }
 391    public function setWhoCanPostMessage($whoCanPostMessage)
 392    {
 393      $this->whoCanPostMessage = $whoCanPostMessage;
 394    }
 395    public function getWhoCanPostMessage()
 396    {
 397      return $this->whoCanPostMessage;
 398    }
 399    public function setWhoCanViewGroup($whoCanViewGroup)
 400    {
 401      $this->whoCanViewGroup = $whoCanViewGroup;
 402    }
 403    public function getWhoCanViewGroup()
 404    {
 405      return $this->whoCanViewGroup;
 406    }
 407    public function setWhoCanViewMembership($whoCanViewMembership)
 408    {
 409      $this->whoCanViewMembership = $whoCanViewMembership;
 410    }
 411    public function getWhoCanViewMembership()
 412    {
 413      return $this->whoCanViewMembership;
 414    }
 415  }