Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 402] [Versions 310 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 Cloudlatencytest (v2).
  20   *
  21   * <p>
  22   * A Test API to report latency data.</p>
  23   *
  24   * <p>
  25   * For more information about this service, see the API
  26   * <a href="" target="_blank">Documentation</a>
  27   * </p>
  28   *
  29   * @author Google, Inc.
  30   */
  31  class Google_Service_Cloudlatencytest extends Google_Service
  32  {
  33    /** View monitoring data for all of your Google Cloud and API projects. */
  34    const MONITORING_READONLY =
  35        "https://www.googleapis.com/auth/monitoring.readonly";
  36  
  37    public $statscollection;
  38    
  39  
  40    /**
  41     * Constructs the internal representation of the Cloudlatencytest service.
  42     *
  43     * @param Google_Client $client
  44     */
  45    public function __construct(Google_Client $client)
  46    {
  47      parent::__construct($client);
  48      $this->rootUrl = 'https://cloudlatencytest-pa.googleapis.com/';
  49      $this->servicePath = 'v2/statscollection/';
  50      $this->version = 'v2';
  51      $this->serviceName = 'cloudlatencytest';
  52  
  53      $this->statscollection = new Google_Service_Cloudlatencytest_Statscollection_Resource(
  54          $this,
  55          $this->serviceName,
  56          'statscollection',
  57          array(
  58            'methods' => array(
  59              'updateaggregatedstats' => array(
  60                'path' => 'updateaggregatedstats',
  61                'httpMethod' => 'POST',
  62                'parameters' => array(),
  63              ),'updatestats' => array(
  64                'path' => 'updatestats',
  65                'httpMethod' => 'POST',
  66                'parameters' => array(),
  67              ),
  68            )
  69          )
  70      );
  71    }
  72  }
  73  
  74  
  75  /**
  76   * The "statscollection" collection of methods.
  77   * Typical usage is:
  78   *  <code>
  79   *   $cloudlatencytestService = new Google_Service_Cloudlatencytest(...);
  80   *   $statscollection = $cloudlatencytestService->statscollection;
  81   *  </code>
  82   */
  83  class Google_Service_Cloudlatencytest_Statscollection_Resource extends Google_Service_Resource
  84  {
  85  
  86    /**
  87     * RPC to update the new TCP stats. (statscollection.updateaggregatedstats)
  88     *
  89     * @param Google_AggregatedStats $postBody
  90     * @param array $optParams Optional parameters.
  91     * @return Google_Service_Cloudlatencytest_AggregatedStatsReply
  92     */
  93    public function updateaggregatedstats(Google_Service_Cloudlatencytest_AggregatedStats $postBody, $optParams = array())
  94    {
  95      $params = array('postBody' => $postBody);
  96      $params = array_merge($params, $optParams);
  97      return $this->call('updateaggregatedstats', array($params), "Google_Service_Cloudlatencytest_AggregatedStatsReply");
  98    }
  99  
 100    /**
 101     * RPC to update the new TCP stats. (statscollection.updatestats)
 102     *
 103     * @param Google_Stats $postBody
 104     * @param array $optParams Optional parameters.
 105     * @return Google_Service_Cloudlatencytest_StatsReply
 106     */
 107    public function updatestats(Google_Service_Cloudlatencytest_Stats $postBody, $optParams = array())
 108    {
 109      $params = array('postBody' => $postBody);
 110      $params = array_merge($params, $optParams);
 111      return $this->call('updatestats', array($params), "Google_Service_Cloudlatencytest_StatsReply");
 112    }
 113  }
 114  
 115  
 116  
 117  
 118  class Google_Service_Cloudlatencytest_AggregatedStats extends Google_Collection
 119  {
 120    protected $collection_key = 'stats';
 121    protected $internal_gapi_mappings = array(
 122    );
 123    protected $statsType = 'Google_Service_Cloudlatencytest_Stats';
 124    protected $statsDataType = 'array';
 125  
 126  
 127    public function setStats($stats)
 128    {
 129      $this->stats = $stats;
 130    }
 131    public function getStats()
 132    {
 133      return $this->stats;
 134    }
 135  }
 136  
 137  class Google_Service_Cloudlatencytest_AggregatedStatsReply extends Google_Model
 138  {
 139    protected $internal_gapi_mappings = array(
 140    );
 141    public $testValue;
 142  
 143  
 144    public function setTestValue($testValue)
 145    {
 146      $this->testValue = $testValue;
 147    }
 148    public function getTestValue()
 149    {
 150      return $this->testValue;
 151    }
 152  }
 153  
 154  class Google_Service_Cloudlatencytest_DoubleValue extends Google_Model
 155  {
 156    protected $internal_gapi_mappings = array(
 157    );
 158    public $label;
 159    public $value;
 160  
 161  
 162    public function setLabel($label)
 163    {
 164      $this->label = $label;
 165    }
 166    public function getLabel()
 167    {
 168      return $this->label;
 169    }
 170    public function setValue($value)
 171    {
 172      $this->value = $value;
 173    }
 174    public function getValue()
 175    {
 176      return $this->value;
 177    }
 178  }
 179  
 180  class Google_Service_Cloudlatencytest_IntValue extends Google_Model
 181  {
 182    protected $internal_gapi_mappings = array(
 183    );
 184    public $label;
 185    public $value;
 186  
 187  
 188    public function setLabel($label)
 189    {
 190      $this->label = $label;
 191    }
 192    public function getLabel()
 193    {
 194      return $this->label;
 195    }
 196    public function setValue($value)
 197    {
 198      $this->value = $value;
 199    }
 200    public function getValue()
 201    {
 202      return $this->value;
 203    }
 204  }
 205  
 206  class Google_Service_Cloudlatencytest_Stats extends Google_Collection
 207  {
 208    protected $collection_key = 'stringValues';
 209    protected $internal_gapi_mappings = array(
 210    );
 211    protected $doubleValuesType = 'Google_Service_Cloudlatencytest_DoubleValue';
 212    protected $doubleValuesDataType = 'array';
 213    protected $intValuesType = 'Google_Service_Cloudlatencytest_IntValue';
 214    protected $intValuesDataType = 'array';
 215    protected $stringValuesType = 'Google_Service_Cloudlatencytest_StringValue';
 216    protected $stringValuesDataType = 'array';
 217    public $time;
 218  
 219  
 220    public function setDoubleValues($doubleValues)
 221    {
 222      $this->doubleValues = $doubleValues;
 223    }
 224    public function getDoubleValues()
 225    {
 226      return $this->doubleValues;
 227    }
 228    public function setIntValues($intValues)
 229    {
 230      $this->intValues = $intValues;
 231    }
 232    public function getIntValues()
 233    {
 234      return $this->intValues;
 235    }
 236    public function setStringValues($stringValues)
 237    {
 238      $this->stringValues = $stringValues;
 239    }
 240    public function getStringValues()
 241    {
 242      return $this->stringValues;
 243    }
 244    public function setTime($time)
 245    {
 246      $this->time = $time;
 247    }
 248    public function getTime()
 249    {
 250      return $this->time;
 251    }
 252  }
 253  
 254  class Google_Service_Cloudlatencytest_StatsReply extends Google_Model
 255  {
 256    protected $internal_gapi_mappings = array(
 257    );
 258    public $testValue;
 259  
 260  
 261    public function setTestValue($testValue)
 262    {
 263      $this->testValue = $testValue;
 264    }
 265    public function getTestValue()
 266    {
 267      return $this->testValue;
 268    }
 269  }
 270  
 271  class Google_Service_Cloudlatencytest_StringValue extends Google_Model
 272  {
 273    protected $internal_gapi_mappings = array(
 274    );
 275    public $label;
 276    public $value;
 277  
 278  
 279    public function setLabel($label)
 280    {
 281      $this->label = $label;
 282    }
 283    public function getLabel()
 284    {
 285      return $this->label;
 286    }
 287    public function setValue($value)
 288    {
 289      $this->value = $value;
 290    }
 291    public function getValue()
 292    {
 293      return $this->value;
 294    }
 295  }