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