Search moodle.org's
Developer Documentation

See Release Notes

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

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

   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 GroupsMigration (v1).
  20   *
  21   * <p>
  22   * Groups Migration Api.</p>
  23   *
  24   * <p>
  25   * For more information about this service, see the API
  26   * <a href="https://developers.google.com/google-apps/groups-migration/" target="_blank">Documentation</a>
  27   * </p>
  28   *
  29   * @author Google, Inc.
  30   */
  31  #[AllowDynamicProperties]
  32  class Google_Service_GroupsMigration extends Google_Service
  33  {
  34    /** Manage messages in groups on your domain. */
  35    const APPS_GROUPS_MIGRATION =
  36        "https://www.googleapis.com/auth/apps.groups.migration";
  37  
  38    public $archive;
  39    
  40  
  41    /**
  42     * Constructs the internal representation of the GroupsMigration service.
  43     *
  44     * @param Google_Client $client
  45     */
  46    public function __construct(Google_Client $client)
  47    {
  48      parent::__construct($client);
  49      $this->rootUrl = 'https://www.googleapis.com/';
  50      $this->servicePath = 'groups/v1/groups/';
  51      $this->version = 'v1';
  52      $this->serviceName = 'groupsmigration';
  53  
  54      $this->archive = new Google_Service_GroupsMigration_Archive_Resource(
  55          $this,
  56          $this->serviceName,
  57          'archive',
  58          array(
  59            'methods' => array(
  60              'insert' => array(
  61                'path' => '{groupId}/archive',
  62                'httpMethod' => 'POST',
  63                'parameters' => array(
  64                  'groupId' => array(
  65                    'location' => 'path',
  66                    'type' => 'string',
  67                    'required' => true,
  68                  ),
  69                ),
  70              ),
  71            )
  72          )
  73      );
  74    }
  75  }
  76  
  77  
  78  /**
  79   * The "archive" collection of methods.
  80   * Typical usage is:
  81   *  <code>
  82   *   $groupsmigrationService = new Google_Service_GroupsMigration(...);
  83   *   $archive = $groupsmigrationService->archive;
  84   *  </code>
  85   */
  86  #[AllowDynamicProperties]
  87  class Google_Service_GroupsMigration_Archive_Resource extends Google_Service_Resource
  88  {
  89  
  90    /**
  91     * Inserts a new mail into the archive of the Google group. (archive.insert)
  92     *
  93     * @param string $groupId The group ID
  94     * @param array $optParams Optional parameters.
  95     * @return Google_Service_GroupsMigration_Groups
  96     */
  97    public function insert($groupId, $optParams = array())
  98    {
  99      $params = array('groupId' => $groupId);
 100      $params = array_merge($params, $optParams);
 101      return $this->call('insert', array($params), "Google_Service_GroupsMigration_Groups");
 102    }
 103  }
 104  
 105  
 106  
 107  
 108  #[AllowDynamicProperties]
 109  class Google_Service_GroupsMigration_Groups extends Google_Model
 110  {
 111    protected $internal_gapi_mappings = array(
 112    );
 113    public $kind;
 114    public $responseCode;
 115  
 116  
 117    public function setKind($kind)
 118    {
 119      $this->kind = $kind;
 120    }
 121    public function getKind()
 122    {
 123      return $this->kind;
 124    }
 125    public function setResponseCode($responseCode)
 126    {
 127      $this->responseCode = $responseCode;
 128    }
 129    public function getResponseCode()
 130    {
 131      return $this->responseCode;
 132    }
 133  }