Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 402] [Versions 311 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 Reports (reports_v1).
  20   *
  21   * <p>
  22   * Allows the administrators of Google Apps customers to fetch reports about the
  23   * usage, collaboration, security and risk for their users.</p>
  24   *
  25   * <p>
  26   * For more information about this service, see the API
  27   * <a href="https://developers.google.com/admin-sdk/reports/" target="_blank">Documentation</a>
  28   * </p>
  29   *
  30   * @author Google, Inc.
  31   */
  32  class Google_Service_Reports extends Google_Service
  33  {
  34    /** View audit reports of Google Apps for your domain. */
  35    const ADMIN_REPORTS_AUDIT_READONLY =
  36        "https://www.googleapis.com/auth/admin.reports.audit.readonly";
  37    /** View usage reports of Google Apps for your domain. */
  38    const ADMIN_REPORTS_USAGE_READONLY =
  39        "https://www.googleapis.com/auth/admin.reports.usage.readonly";
  40  
  41    public $activities;
  42    public $channels;
  43    public $customerUsageReports;
  44    public $userUsageReport;
  45    
  46  
  47    /**
  48     * Constructs the internal representation of the Reports service.
  49     *
  50     * @param Google_Client $client
  51     */
  52    public function __construct(Google_Client $client)
  53    {
  54      parent::__construct($client);
  55      $this->rootUrl = 'https://www.googleapis.com/';
  56      $this->servicePath = 'admin/reports/v1/';
  57      $this->version = 'reports_v1';
  58      $this->serviceName = 'admin';
  59  
  60      $this->activities = new Google_Service_Reports_Activities_Resource(
  61          $this,
  62          $this->serviceName,
  63          'activities',
  64          array(
  65            'methods' => array(
  66              'list' => array(
  67                'path' => 'activity/users/{userKey}/applications/{applicationName}',
  68                'httpMethod' => 'GET',
  69                'parameters' => array(
  70                  'userKey' => array(
  71                    'location' => 'path',
  72                    'type' => 'string',
  73                    'required' => true,
  74                  ),
  75                  'applicationName' => array(
  76                    'location' => 'path',
  77                    'type' => 'string',
  78                    'required' => true,
  79                  ),
  80                  'startTime' => array(
  81                    'location' => 'query',
  82                    'type' => 'string',
  83                  ),
  84                  'actorIpAddress' => array(
  85                    'location' => 'query',
  86                    'type' => 'string',
  87                  ),
  88                  'maxResults' => array(
  89                    'location' => 'query',
  90                    'type' => 'integer',
  91                  ),
  92                  'eventName' => array(
  93                    'location' => 'query',
  94                    'type' => 'string',
  95                  ),
  96                  'pageToken' => array(
  97                    'location' => 'query',
  98                    'type' => 'string',
  99                  ),
 100                  'filters' => array(
 101                    'location' => 'query',
 102                    'type' => 'string',
 103                  ),
 104                  'endTime' => array(
 105                    'location' => 'query',
 106                    'type' => 'string',
 107                  ),
 108                  'customerId' => array(
 109                    'location' => 'query',
 110                    'type' => 'string',
 111                  ),
 112                ),
 113              ),'watch' => array(
 114                'path' => 'activity/users/{userKey}/applications/{applicationName}/watch',
 115                'httpMethod' => 'POST',
 116                'parameters' => array(
 117                  'userKey' => array(
 118                    'location' => 'path',
 119                    'type' => 'string',
 120                    'required' => true,
 121                  ),
 122                  'applicationName' => array(
 123                    'location' => 'path',
 124                    'type' => 'string',
 125                    'required' => true,
 126                  ),
 127                  'startTime' => array(
 128                    'location' => 'query',
 129                    'type' => 'string',
 130                  ),
 131                  'actorIpAddress' => array(
 132                    'location' => 'query',
 133                    'type' => 'string',
 134                  ),
 135                  'maxResults' => array(
 136                    'location' => 'query',
 137                    'type' => 'integer',
 138                  ),
 139                  'eventName' => array(
 140                    'location' => 'query',
 141                    'type' => 'string',
 142                  ),
 143                  'pageToken' => array(
 144                    'location' => 'query',
 145                    'type' => 'string',
 146                  ),
 147                  'filters' => array(
 148                    'location' => 'query',
 149                    'type' => 'string',
 150                  ),
 151                  'endTime' => array(
 152                    'location' => 'query',
 153                    'type' => 'string',
 154                  ),
 155                  'customerId' => array(
 156                    'location' => 'query',
 157                    'type' => 'string',
 158                  ),
 159                ),
 160              ),
 161            )
 162          )
 163      );
 164      $this->channels = new Google_Service_Reports_Channels_Resource(
 165          $this,
 166          $this->serviceName,
 167          'channels',
 168          array(
 169            'methods' => array(
 170              'stop' => array(
 171                'path' => '/admin/reports_v1/channels/stop',
 172                'httpMethod' => 'POST',
 173                'parameters' => array(),
 174              ),
 175            )
 176          )
 177      );
 178      $this->customerUsageReports = new Google_Service_Reports_CustomerUsageReports_Resource(
 179          $this,
 180          $this->serviceName,
 181          'customerUsageReports',
 182          array(
 183            'methods' => array(
 184              'get' => array(
 185                'path' => 'usage/dates/{date}',
 186                'httpMethod' => 'GET',
 187                'parameters' => array(
 188                  'date' => array(
 189                    'location' => 'path',
 190                    'type' => 'string',
 191                    'required' => true,
 192                  ),
 193                  'pageToken' => array(
 194                    'location' => 'query',
 195                    'type' => 'string',
 196                  ),
 197                  'customerId' => array(
 198                    'location' => 'query',
 199                    'type' => 'string',
 200                  ),
 201                  'parameters' => array(
 202                    'location' => 'query',
 203                    'type' => 'string',
 204                  ),
 205                ),
 206              ),
 207            )
 208          )
 209      );
 210      $this->userUsageReport = new Google_Service_Reports_UserUsageReport_Resource(
 211          $this,
 212          $this->serviceName,
 213          'userUsageReport',
 214          array(
 215            'methods' => array(
 216              'get' => array(
 217                'path' => 'usage/users/{userKey}/dates/{date}',
 218                'httpMethod' => 'GET',
 219                'parameters' => array(
 220                  'userKey' => array(
 221                    'location' => 'path',
 222                    'type' => 'string',
 223                    'required' => true,
 224                  ),
 225                  'date' => array(
 226                    'location' => 'path',
 227                    'type' => 'string',
 228                    'required' => true,
 229                  ),
 230                  'parameters' => array(
 231                    'location' => 'query',
 232                    'type' => 'string',
 233                  ),
 234                  'maxResults' => array(
 235                    'location' => 'query',
 236                    'type' => 'integer',
 237                  ),
 238                  'pageToken' => array(
 239                    'location' => 'query',
 240                    'type' => 'string',
 241                  ),
 242                  'filters' => array(
 243                    'location' => 'query',
 244                    'type' => 'string',
 245                  ),
 246                  'customerId' => array(
 247                    'location' => 'query',
 248                    'type' => 'string',
 249                  ),
 250                ),
 251              ),
 252            )
 253          )
 254      );
 255    }
 256  }
 257  
 258  
 259  /**
 260   * The "activities" collection of methods.
 261   * Typical usage is:
 262   *  <code>
 263   *   $adminService = new Google_Service_Reports(...);
 264   *   $activities = $adminService->activities;
 265   *  </code>
 266   */
 267  class Google_Service_Reports_Activities_Resource extends Google_Service_Resource
 268  {
 269  
 270    /**
 271     * Retrieves a list of activities for a specific customer and application.
 272     * (activities.listActivities)
 273     *
 274     * @param string $userKey Represents the profile id or the user email for which
 275     * the data should be filtered. When 'all' is specified as the userKey, it
 276     * returns usageReports for all users.
 277     * @param string $applicationName Application name for which the events are to
 278     * be retrieved.
 279     * @param array $optParams Optional parameters.
 280     *
 281     * @opt_param string startTime Return events which occured at or after this
 282     * time.
 283     * @opt_param string actorIpAddress IP Address of host where the event was
 284     * performed. Supports both IPv4 and IPv6 addresses.
 285     * @opt_param int maxResults Number of activity records to be shown in each
 286     * page.
 287     * @opt_param string eventName Name of the event being queried.
 288     * @opt_param string pageToken Token to specify next page.
 289     * @opt_param string filters Event parameters in the form [parameter1
 290     * name][operator][parameter1 value],[parameter2 name][operator][parameter2
 291     * value],...
 292     * @opt_param string endTime Return events which occured at or before this time.
 293     * @opt_param string customerId Represents the customer for which the data is to
 294     * be fetched.
 295     * @return Google_Service_Reports_Activities
 296     */
 297    public function listActivities($userKey, $applicationName, $optParams = array())
 298    {
 299      $params = array('userKey' => $userKey, 'applicationName' => $applicationName);
 300      $params = array_merge($params, $optParams);
 301      return $this->call('list', array($params), "Google_Service_Reports_Activities");
 302    }
 303  
 304    /**
 305     * Push changes to activities (activities.watch)
 306     *
 307     * @param string $userKey Represents the profile id or the user email for which
 308     * the data should be filtered. When 'all' is specified as the userKey, it
 309     * returns usageReports for all users.
 310     * @param string $applicationName Application name for which the events are to
 311     * be retrieved.
 312     * @param Google_Channel $postBody
 313     * @param array $optParams Optional parameters.
 314     *
 315     * @opt_param string startTime Return events which occured at or after this
 316     * time.
 317     * @opt_param string actorIpAddress IP Address of host where the event was
 318     * performed. Supports both IPv4 and IPv6 addresses.
 319     * @opt_param int maxResults Number of activity records to be shown in each
 320     * page.
 321     * @opt_param string eventName Name of the event being queried.
 322     * @opt_param string pageToken Token to specify next page.
 323     * @opt_param string filters Event parameters in the form [parameter1
 324     * name][operator][parameter1 value],[parameter2 name][operator][parameter2
 325     * value],...
 326     * @opt_param string endTime Return events which occured at or before this time.
 327     * @opt_param string customerId Represents the customer for which the data is to
 328     * be fetched.
 329     * @return Google_Service_Reports_Channel
 330     */
 331    public function watch($userKey, $applicationName, Google_Service_Reports_Channel $postBody, $optParams = array())
 332    {
 333      $params = array('userKey' => $userKey, 'applicationName' => $applicationName, 'postBody' => $postBody);
 334      $params = array_merge($params, $optParams);
 335      return $this->call('watch', array($params), "Google_Service_Reports_Channel");
 336    }
 337  }
 338  
 339  /**
 340   * The "channels" collection of methods.
 341   * Typical usage is:
 342   *  <code>
 343   *   $adminService = new Google_Service_Reports(...);
 344   *   $channels = $adminService->channels;
 345   *  </code>
 346   */
 347  class Google_Service_Reports_Channels_Resource extends Google_Service_Resource
 348  {
 349  
 350    /**
 351     * Stop watching resources through this channel (channels.stop)
 352     *
 353     * @param Google_Channel $postBody
 354     * @param array $optParams Optional parameters.
 355     */
 356    public function stop(Google_Service_Reports_Channel $postBody, $optParams = array())
 357    {
 358      $params = array('postBody' => $postBody);
 359      $params = array_merge($params, $optParams);
 360      return $this->call('stop', array($params));
 361    }
 362  }
 363  
 364  /**
 365   * The "customerUsageReports" collection of methods.
 366   * Typical usage is:
 367   *  <code>
 368   *   $adminService = new Google_Service_Reports(...);
 369   *   $customerUsageReports = $adminService->customerUsageReports;
 370   *  </code>
 371   */
 372  class Google_Service_Reports_CustomerUsageReports_Resource extends Google_Service_Resource
 373  {
 374  
 375    /**
 376     * Retrieves a report which is a collection of properties / statistics for a
 377     * specific customer. (customerUsageReports.get)
 378     *
 379     * @param string $date Represents the date in yyyy-mm-dd format for which the
 380     * data is to be fetched.
 381     * @param array $optParams Optional parameters.
 382     *
 383     * @opt_param string pageToken Token to specify next page.
 384     * @opt_param string customerId Represents the customer for which the data is to
 385     * be fetched.
 386     * @opt_param string parameters Represents the application name, parameter name
 387     * pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2.
 388     * @return Google_Service_Reports_UsageReports
 389     */
 390    public function get($date, $optParams = array())
 391    {
 392      $params = array('date' => $date);
 393      $params = array_merge($params, $optParams);
 394      return $this->call('get', array($params), "Google_Service_Reports_UsageReports");
 395    }
 396  }
 397  
 398  /**
 399   * The "userUsageReport" collection of methods.
 400   * Typical usage is:
 401   *  <code>
 402   *   $adminService = new Google_Service_Reports(...);
 403   *   $userUsageReport = $adminService->userUsageReport;
 404   *  </code>
 405   */
 406  class Google_Service_Reports_UserUsageReport_Resource extends Google_Service_Resource
 407  {
 408  
 409    /**
 410     * Retrieves a report which is a collection of properties / statistics for a set
 411     * of users. (userUsageReport.get)
 412     *
 413     * @param string $userKey Represents the profile id or the user email for which
 414     * the data should be filtered.
 415     * @param string $date Represents the date in yyyy-mm-dd format for which the
 416     * data is to be fetched.
 417     * @param array $optParams Optional parameters.
 418     *
 419     * @opt_param string parameters Represents the application name, parameter name
 420     * pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2.
 421     * @opt_param string maxResults Maximum number of results to return. Maximum
 422     * allowed is 1000
 423     * @opt_param string pageToken Token to specify next page.
 424     * @opt_param string filters Represents the set of filters including parameter
 425     * operator value.
 426     * @opt_param string customerId Represents the customer for which the data is to
 427     * be fetched.
 428     * @return Google_Service_Reports_UsageReports
 429     */
 430    public function get($userKey, $date, $optParams = array())
 431    {
 432      $params = array('userKey' => $userKey, 'date' => $date);
 433      $params = array_merge($params, $optParams);
 434      return $this->call('get', array($params), "Google_Service_Reports_UsageReports");
 435    }
 436  }
 437  
 438  
 439  
 440  
 441  class Google_Service_Reports_Activities extends Google_Collection
 442  {
 443    protected $collection_key = 'items';
 444    protected $internal_gapi_mappings = array(
 445    );
 446    public $etag;
 447    protected $itemsType = 'Google_Service_Reports_Activity';
 448    protected $itemsDataType = 'array';
 449    public $kind;
 450    public $nextPageToken;
 451  
 452  
 453    public function setEtag($etag)
 454    {
 455      $this->etag = $etag;
 456    }
 457    public function getEtag()
 458    {
 459      return $this->etag;
 460    }
 461    public function setItems($items)
 462    {
 463      $this->items = $items;
 464    }
 465    public function getItems()
 466    {
 467      return $this->items;
 468    }
 469    public function setKind($kind)
 470    {
 471      $this->kind = $kind;
 472    }
 473    public function getKind()
 474    {
 475      return $this->kind;
 476    }
 477    public function setNextPageToken($nextPageToken)
 478    {
 479      $this->nextPageToken = $nextPageToken;
 480    }
 481    public function getNextPageToken()
 482    {
 483      return $this->nextPageToken;
 484    }
 485  }
 486  
 487  class Google_Service_Reports_Activity extends Google_Collection
 488  {
 489    protected $collection_key = 'events';
 490    protected $internal_gapi_mappings = array(
 491    );
 492    protected $actorType = 'Google_Service_Reports_ActivityActor';
 493    protected $actorDataType = '';
 494    public $etag;
 495    protected $eventsType = 'Google_Service_Reports_ActivityEvents';
 496    protected $eventsDataType = 'array';
 497    protected $idType = 'Google_Service_Reports_ActivityId';
 498    protected $idDataType = '';
 499    public $ipAddress;
 500    public $kind;
 501    public $ownerDomain;
 502  
 503  
 504    public function setActor(Google_Service_Reports_ActivityActor $actor)
 505    {
 506      $this->actor = $actor;
 507    }
 508    public function getActor()
 509    {
 510      return $this->actor;
 511    }
 512    public function setEtag($etag)
 513    {
 514      $this->etag = $etag;
 515    }
 516    public function getEtag()
 517    {
 518      return $this->etag;
 519    }
 520    public function setEvents($events)
 521    {
 522      $this->events = $events;
 523    }
 524    public function getEvents()
 525    {
 526      return $this->events;
 527    }
 528    public function setId(Google_Service_Reports_ActivityId $id)
 529    {
 530      $this->id = $id;
 531    }
 532    public function getId()
 533    {
 534      return $this->id;
 535    }
 536    public function setIpAddress($ipAddress)
 537    {
 538      $this->ipAddress = $ipAddress;
 539    }
 540    public function getIpAddress()
 541    {
 542      return $this->ipAddress;
 543    }
 544    public function setKind($kind)
 545    {
 546      $this->kind = $kind;
 547    }
 548    public function getKind()
 549    {
 550      return $this->kind;
 551    }
 552    public function setOwnerDomain($ownerDomain)
 553    {
 554      $this->ownerDomain = $ownerDomain;
 555    }
 556    public function getOwnerDomain()
 557    {
 558      return $this->ownerDomain;
 559    }
 560  }
 561  
 562  class Google_Service_Reports_ActivityActor extends Google_Model
 563  {
 564    protected $internal_gapi_mappings = array(
 565    );
 566    public $callerType;
 567    public $email;
 568    public $key;
 569    public $profileId;
 570  
 571  
 572    public function setCallerType($callerType)
 573    {
 574      $this->callerType = $callerType;
 575    }
 576    public function getCallerType()
 577    {
 578      return $this->callerType;
 579    }
 580    public function setEmail($email)
 581    {
 582      $this->email = $email;
 583    }
 584    public function getEmail()
 585    {
 586      return $this->email;
 587    }
 588    public function setKey($key)
 589    {
 590      $this->key = $key;
 591    }
 592    public function getKey()
 593    {
 594      return $this->key;
 595    }
 596    public function setProfileId($profileId)
 597    {
 598      $this->profileId = $profileId;
 599    }
 600    public function getProfileId()
 601    {
 602      return $this->profileId;
 603    }
 604  }
 605  
 606  class Google_Service_Reports_ActivityEvents extends Google_Collection
 607  {
 608    protected $collection_key = 'parameters';
 609    protected $internal_gapi_mappings = array(
 610    );
 611    public $name;
 612    protected $parametersType = 'Google_Service_Reports_ActivityEventsParameters';
 613    protected $parametersDataType = 'array';
 614    public $type;
 615  
 616  
 617    public function setName($name)
 618    {
 619      $this->name = $name;
 620    }
 621    public function getName()
 622    {
 623      return $this->name;
 624    }
 625    public function setParameters($parameters)
 626    {
 627      $this->parameters = $parameters;
 628    }
 629    public function getParameters()
 630    {
 631      return $this->parameters;
 632    }
 633    public function setType($type)
 634    {
 635      $this->type = $type;
 636    }
 637    public function getType()
 638    {
 639      return $this->type;
 640    }
 641  }
 642  
 643  class Google_Service_Reports_ActivityEventsParameters extends Google_Collection
 644  {
 645    protected $collection_key = 'multiValue';
 646    protected $internal_gapi_mappings = array(
 647    );
 648    public $boolValue;
 649    public $intValue;
 650    public $multiIntValue;
 651    public $multiValue;
 652    public $name;
 653    public $value;
 654  
 655  
 656    public function setBoolValue($boolValue)
 657    {
 658      $this->boolValue = $boolValue;
 659    }
 660    public function getBoolValue()
 661    {
 662      return $this->boolValue;
 663    }
 664    public function setIntValue($intValue)
 665    {
 666      $this->intValue = $intValue;
 667    }
 668    public function getIntValue()
 669    {
 670      return $this->intValue;
 671    }
 672    public function setMultiIntValue($multiIntValue)
 673    {
 674      $this->multiIntValue = $multiIntValue;
 675    }
 676    public function getMultiIntValue()
 677    {
 678      return $this->multiIntValue;
 679    }
 680    public function setMultiValue($multiValue)
 681    {
 682      $this->multiValue = $multiValue;
 683    }
 684    public function getMultiValue()
 685    {
 686      return $this->multiValue;
 687    }
 688    public function setName($name)
 689    {
 690      $this->name = $name;
 691    }
 692    public function getName()
 693    {
 694      return $this->name;
 695    }
 696    public function setValue($value)
 697    {
 698      $this->value = $value;
 699    }
 700    public function getValue()
 701    {
 702      return $this->value;
 703    }
 704  }
 705  
 706  class Google_Service_Reports_ActivityId extends Google_Model
 707  {
 708    protected $internal_gapi_mappings = array(
 709    );
 710    public $applicationName;
 711    public $customerId;
 712    public $time;
 713    public $uniqueQualifier;
 714  
 715  
 716    public function setApplicationName($applicationName)
 717    {
 718      $this->applicationName = $applicationName;
 719    }
 720    public function getApplicationName()
 721    {
 722      return $this->applicationName;
 723    }
 724    public function setCustomerId($customerId)
 725    {
 726      $this->customerId = $customerId;
 727    }
 728    public function getCustomerId()
 729    {
 730      return $this->customerId;
 731    }
 732    public function setTime($time)
 733    {
 734      $this->time = $time;
 735    }
 736    public function getTime()
 737    {
 738      return $this->time;
 739    }
 740    public function setUniqueQualifier($uniqueQualifier)
 741    {
 742      $this->uniqueQualifier = $uniqueQualifier;
 743    }
 744    public function getUniqueQualifier()
 745    {
 746      return $this->uniqueQualifier;
 747    }
 748  }
 749  
 750  class Google_Service_Reports_Channel extends Google_Model
 751  {
 752    protected $internal_gapi_mappings = array(
 753    );
 754    public $address;
 755    public $expiration;
 756    public $id;
 757    public $kind;
 758    public $params;
 759    public $payload;
 760    public $resourceId;
 761    public $resourceUri;
 762    public $token;
 763    public $type;
 764  
 765  
 766    public function setAddress($address)
 767    {
 768      $this->address = $address;
 769    }
 770    public function getAddress()
 771    {
 772      return $this->address;
 773    }
 774    public function setExpiration($expiration)
 775    {
 776      $this->expiration = $expiration;
 777    }
 778    public function getExpiration()
 779    {
 780      return $this->expiration;
 781    }
 782    public function setId($id)
 783    {
 784      $this->id = $id;
 785    }
 786    public function getId()
 787    {
 788      return $this->id;
 789    }
 790    public function setKind($kind)
 791    {
 792      $this->kind = $kind;
 793    }
 794    public function getKind()
 795    {
 796      return $this->kind;
 797    }
 798    public function setParams($params)
 799    {
 800      $this->params = $params;
 801    }
 802    public function getParams()
 803    {
 804      return $this->params;
 805    }
 806    public function setPayload($payload)
 807    {
 808      $this->payload = $payload;
 809    }
 810    public function getPayload()
 811    {
 812      return $this->payload;
 813    }
 814    public function setResourceId($resourceId)
 815    {
 816      $this->resourceId = $resourceId;
 817    }
 818    public function getResourceId()
 819    {
 820      return $this->resourceId;
 821    }
 822    public function setResourceUri($resourceUri)
 823    {
 824      $this->resourceUri = $resourceUri;
 825    }
 826    public function getResourceUri()
 827    {
 828      return $this->resourceUri;
 829    }
 830    public function setToken($token)
 831    {
 832      $this->token = $token;
 833    }
 834    public function getToken()
 835    {
 836      return $this->token;
 837    }
 838    public function setType($type)
 839    {
 840      $this->type = $type;
 841    }
 842    public function getType()
 843    {
 844      return $this->type;
 845    }
 846  }
 847  
 848  class Google_Service_Reports_ChannelParams extends Google_Model
 849  {
 850  }
 851  
 852  class Google_Service_Reports_UsageReport extends Google_Collection
 853  {
 854    protected $collection_key = 'parameters';
 855    protected $internal_gapi_mappings = array(
 856    );
 857    public $date;
 858    protected $entityType = 'Google_Service_Reports_UsageReportEntity';
 859    protected $entityDataType = '';
 860    public $etag;
 861    public $kind;
 862    protected $parametersType = 'Google_Service_Reports_UsageReportParameters';
 863    protected $parametersDataType = 'array';
 864  
 865  
 866    public function setDate($date)
 867    {
 868      $this->date = $date;
 869    }
 870    public function getDate()
 871    {
 872      return $this->date;
 873    }
 874    public function setEntity(Google_Service_Reports_UsageReportEntity $entity)
 875    {
 876      $this->entity = $entity;
 877    }
 878    public function getEntity()
 879    {
 880      return $this->entity;
 881    }
 882    public function setEtag($etag)
 883    {
 884      $this->etag = $etag;
 885    }
 886    public function getEtag()
 887    {
 888      return $this->etag;
 889    }
 890    public function setKind($kind)
 891    {
 892      $this->kind = $kind;
 893    }
 894    public function getKind()
 895    {
 896      return $this->kind;
 897    }
 898    public function setParameters($parameters)
 899    {
 900      $this->parameters = $parameters;
 901    }
 902    public function getParameters()
 903    {
 904      return $this->parameters;
 905    }
 906  }
 907  
 908  class Google_Service_Reports_UsageReportEntity extends Google_Model
 909  {
 910    protected $internal_gapi_mappings = array(
 911    );
 912    public $customerId;
 913    public $profileId;
 914    public $type;
 915    public $userEmail;
 916  
 917  
 918    public function setCustomerId($customerId)
 919    {
 920      $this->customerId = $customerId;
 921    }
 922    public function getCustomerId()
 923    {
 924      return $this->customerId;
 925    }
 926    public function setProfileId($profileId)
 927    {
 928      $this->profileId = $profileId;
 929    }
 930    public function getProfileId()
 931    {
 932      return $this->profileId;
 933    }
 934    public function setType($type)
 935    {
 936      $this->type = $type;
 937    }
 938    public function getType()
 939    {
 940      return $this->type;
 941    }
 942    public function setUserEmail($userEmail)
 943    {
 944      $this->userEmail = $userEmail;
 945    }
 946    public function getUserEmail()
 947    {
 948      return $this->userEmail;
 949    }
 950  }
 951  
 952  class Google_Service_Reports_UsageReportParameters extends Google_Collection
 953  {
 954    protected $collection_key = 'msgValue';
 955    protected $internal_gapi_mappings = array(
 956    );
 957    public $boolValue;
 958    public $datetimeValue;
 959    public $intValue;
 960    public $msgValue;
 961    public $name;
 962    public $stringValue;
 963  
 964  
 965    public function setBoolValue($boolValue)
 966    {
 967      $this->boolValue = $boolValue;
 968    }
 969    public function getBoolValue()
 970    {
 971      return $this->boolValue;
 972    }
 973    public function setDatetimeValue($datetimeValue)
 974    {
 975      $this->datetimeValue = $datetimeValue;
 976    }
 977    public function getDatetimeValue()
 978    {
 979      return $this->datetimeValue;
 980    }
 981    public function setIntValue($intValue)
 982    {
 983      $this->intValue = $intValue;
 984    }
 985    public function getIntValue()
 986    {
 987      return $this->intValue;
 988    }
 989    public function setMsgValue($msgValue)
 990    {
 991      $this->msgValue = $msgValue;
 992    }
 993    public function getMsgValue()
 994    {
 995      return $this->msgValue;
 996    }
 997    public function setName($name)
 998    {
 999      $this->name = $name;
1000    }
1001    public function getName()
1002    {
1003      return $this->name;
1004    }
1005    public function setStringValue($stringValue)
1006    {
1007      $this->stringValue = $stringValue;
1008    }
1009    public function getStringValue()
1010    {
1011      return $this->stringValue;
1012    }
1013  }
1014  
1015  class Google_Service_Reports_UsageReportParametersMsgValue extends Google_Model
1016  {
1017  }
1018  
1019  class Google_Service_Reports_UsageReports extends Google_Collection
1020  {
1021    protected $collection_key = 'warnings';
1022    protected $internal_gapi_mappings = array(
1023    );
1024    public $etag;
1025    public $kind;
1026    public $nextPageToken;
1027    protected $usageReportsType = 'Google_Service_Reports_UsageReport';
1028    protected $usageReportsDataType = 'array';
1029    protected $warningsType = 'Google_Service_Reports_UsageReportsWarnings';
1030    protected $warningsDataType = 'array';
1031  
1032  
1033    public function setEtag($etag)
1034    {
1035      $this->etag = $etag;
1036    }
1037    public function getEtag()
1038    {
1039      return $this->etag;
1040    }
1041    public function setKind($kind)
1042    {
1043      $this->kind = $kind;
1044    }
1045    public function getKind()
1046    {
1047      return $this->kind;
1048    }
1049    public function setNextPageToken($nextPageToken)
1050    {
1051      $this->nextPageToken = $nextPageToken;
1052    }
1053    public function getNextPageToken()
1054    {
1055      return $this->nextPageToken;
1056    }
1057    public function setUsageReports($usageReports)
1058    {
1059      $this->usageReports = $usageReports;
1060    }
1061    public function getUsageReports()
1062    {
1063      return $this->usageReports;
1064    }
1065    public function setWarnings($warnings)
1066    {
1067      $this->warnings = $warnings;
1068    }
1069    public function getWarnings()
1070    {
1071      return $this->warnings;
1072    }
1073  }
1074  
1075  class Google_Service_Reports_UsageReportsWarnings extends Google_Collection
1076  {
1077    protected $collection_key = 'data';
1078    protected $internal_gapi_mappings = array(
1079    );
1080    public $code;
1081    protected $dataType = 'Google_Service_Reports_UsageReportsWarningsData';
1082    protected $dataDataType = 'array';
1083    public $message;
1084  
1085  
1086    public function setCode($code)
1087    {
1088      $this->code = $code;
1089    }
1090    public function getCode()
1091    {
1092      return $this->code;
1093    }
1094    public function setData($data)
1095    {
1096      $this->data = $data;
1097    }
1098    public function getData()
1099    {
1100      return $this->data;
1101    }
1102    public function setMessage($message)
1103    {
1104      $this->message = $message;
1105    }
1106    public function getMessage()
1107    {
1108      return $this->message;
1109    }
1110  }
1111  
1112  class Google_Service_Reports_UsageReportsWarningsData extends Google_Model
1113  {
1114    protected $internal_gapi_mappings = array(
1115    );
1116    public $key;
1117    public $value;
1118  
1119  
1120    public function setKey($key)
1121    {
1122      $this->key = $key;
1123    }
1124    public function getKey()
1125    {
1126      return $this->key;
1127    }
1128    public function setValue($value)
1129    {
1130      $this->value = $value;
1131    }
1132    public function getValue()
1133    {
1134      return $this->value;
1135    }
1136  }