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 Customsearch (v1).
  20   *
  21   * <p>
  22   * Lets you search over a website or collection of websites</p>
  23   *
  24   * <p>
  25   * For more information about this service, see the API
  26   * <a href="https://developers.google.com/custom-search/v1/using_rest" target="_blank">Documentation</a>
  27   * </p>
  28   *
  29   * @author Google, Inc.
  30   */
  31  class Google_Service_Customsearch extends Google_Service
  32  {
  33  
  34  
  35    public $cse;
  36    
  37  
  38    /**
  39     * Constructs the internal representation of the Customsearch service.
  40     *
  41     * @param Google_Client $client
  42     */
  43    public function __construct(Google_Client $client)
  44    {
  45      parent::__construct($client);
  46      $this->rootUrl = 'https://www.googleapis.com/';
  47      $this->servicePath = 'customsearch/';
  48      $this->version = 'v1';
  49      $this->serviceName = 'customsearch';
  50  
  51      $this->cse = new Google_Service_Customsearch_Cse_Resource(
  52          $this,
  53          $this->serviceName,
  54          'cse',
  55          array(
  56            'methods' => array(
  57              'list' => array(
  58                'path' => 'v1',
  59                'httpMethod' => 'GET',
  60                'parameters' => array(
  61                  'q' => array(
  62                    'location' => 'query',
  63                    'type' => 'string',
  64                    'required' => true,
  65                  ),
  66                  'sort' => array(
  67                    'location' => 'query',
  68                    'type' => 'string',
  69                  ),
  70                  'orTerms' => array(
  71                    'location' => 'query',
  72                    'type' => 'string',
  73                  ),
  74                  'highRange' => array(
  75                    'location' => 'query',
  76                    'type' => 'string',
  77                  ),
  78                  'num' => array(
  79                    'location' => 'query',
  80                    'type' => 'integer',
  81                  ),
  82                  'cr' => array(
  83                    'location' => 'query',
  84                    'type' => 'string',
  85                  ),
  86                  'imgType' => array(
  87                    'location' => 'query',
  88                    'type' => 'string',
  89                  ),
  90                  'gl' => array(
  91                    'location' => 'query',
  92                    'type' => 'string',
  93                  ),
  94                  'relatedSite' => array(
  95                    'location' => 'query',
  96                    'type' => 'string',
  97                  ),
  98                  'searchType' => array(
  99                    'location' => 'query',
 100                    'type' => 'string',
 101                  ),
 102                  'fileType' => array(
 103                    'location' => 'query',
 104                    'type' => 'string',
 105                  ),
 106                  'start' => array(
 107                    'location' => 'query',
 108                    'type' => 'integer',
 109                  ),
 110                  'imgDominantColor' => array(
 111                    'location' => 'query',
 112                    'type' => 'string',
 113                  ),
 114                  'lr' => array(
 115                    'location' => 'query',
 116                    'type' => 'string',
 117                  ),
 118                  'siteSearch' => array(
 119                    'location' => 'query',
 120                    'type' => 'string',
 121                  ),
 122                  'cref' => array(
 123                    'location' => 'query',
 124                    'type' => 'string',
 125                  ),
 126                  'dateRestrict' => array(
 127                    'location' => 'query',
 128                    'type' => 'string',
 129                  ),
 130                  'safe' => array(
 131                    'location' => 'query',
 132                    'type' => 'string',
 133                  ),
 134                  'c2coff' => array(
 135                    'location' => 'query',
 136                    'type' => 'string',
 137                  ),
 138                  'googlehost' => array(
 139                    'location' => 'query',
 140                    'type' => 'string',
 141                  ),
 142                  'hq' => array(
 143                    'location' => 'query',
 144                    'type' => 'string',
 145                  ),
 146                  'exactTerms' => array(
 147                    'location' => 'query',
 148                    'type' => 'string',
 149                  ),
 150                  'hl' => array(
 151                    'location' => 'query',
 152                    'type' => 'string',
 153                  ),
 154                  'lowRange' => array(
 155                    'location' => 'query',
 156                    'type' => 'string',
 157                  ),
 158                  'imgSize' => array(
 159                    'location' => 'query',
 160                    'type' => 'string',
 161                  ),
 162                  'imgColorType' => array(
 163                    'location' => 'query',
 164                    'type' => 'string',
 165                  ),
 166                  'rights' => array(
 167                    'location' => 'query',
 168                    'type' => 'string',
 169                  ),
 170                  'excludeTerms' => array(
 171                    'location' => 'query',
 172                    'type' => 'string',
 173                  ),
 174                  'filter' => array(
 175                    'location' => 'query',
 176                    'type' => 'string',
 177                  ),
 178                  'linkSite' => array(
 179                    'location' => 'query',
 180                    'type' => 'string',
 181                  ),
 182                  'cx' => array(
 183                    'location' => 'query',
 184                    'type' => 'string',
 185                  ),
 186                  'siteSearchFilter' => array(
 187                    'location' => 'query',
 188                    'type' => 'string',
 189                  ),
 190                ),
 191              ),
 192            )
 193          )
 194      );
 195    }
 196  }
 197  
 198  
 199  /**
 200   * The "cse" collection of methods.
 201   * Typical usage is:
 202   *  <code>
 203   *   $customsearchService = new Google_Service_Customsearch(...);
 204   *   $cse = $customsearchService->cse;
 205   *  </code>
 206   */
 207  class Google_Service_Customsearch_Cse_Resource extends Google_Service_Resource
 208  {
 209  
 210    /**
 211     * Returns metadata about the search performed, metadata about the custom search
 212     * engine used for the search, and the search results. (cse.listCse)
 213     *
 214     * @param string $q Query
 215     * @param array $optParams Optional parameters.
 216     *
 217     * @opt_param string sort The sort expression to apply to the results
 218     * @opt_param string orTerms Provides additional search terms to check for in a
 219     * document, where each document in the search results must contain at least one
 220     * of the additional search terms
 221     * @opt_param string highRange Creates a range in form as_nlo value..as_nhi
 222     * value and attempts to append it to query
 223     * @opt_param string num Number of search results to return
 224     * @opt_param string cr Country restrict(s).
 225     * @opt_param string imgType Returns images of a type, which can be one of:
 226     * clipart, face, lineart, news, and photo.
 227     * @opt_param string gl Geolocation of end user.
 228     * @opt_param string relatedSite Specifies that all search results should be
 229     * pages that are related to the specified URL
 230     * @opt_param string searchType Specifies the search type: image.
 231     * @opt_param string fileType Returns images of a specified type. Some of the
 232     * allowed values are: bmp, gif, png, jpg, svg, pdf, ...
 233     * @opt_param string start The index of the first result to return
 234     * @opt_param string imgDominantColor Returns images of a specific dominant
 235     * color: yellow, green, teal, blue, purple, pink, white, gray, black and brown.
 236     * @opt_param string lr The language restriction for the search results
 237     * @opt_param string siteSearch Specifies all search results should be pages
 238     * from a given site
 239     * @opt_param string cref The URL of a linked custom search engine
 240     * @opt_param string dateRestrict Specifies all search results are from a time
 241     * period
 242     * @opt_param string safe Search safety level
 243     * @opt_param string c2coff Turns off the translation between zh-CN and zh-TW.
 244     * @opt_param string googlehost The local Google domain to use to perform the
 245     * search.
 246     * @opt_param string hq Appends the extra query terms to the query.
 247     * @opt_param string exactTerms Identifies a phrase that all documents in the
 248     * search results must contain
 249     * @opt_param string hl Sets the user interface language.
 250     * @opt_param string lowRange Creates a range in form as_nlo value..as_nhi value
 251     * and attempts to append it to query
 252     * @opt_param string imgSize Returns images of a specified size, where size can
 253     * be one of: icon, small, medium, large, xlarge, xxlarge, and huge.
 254     * @opt_param string imgColorType Returns black and white, grayscale, or color
 255     * images: mono, gray, and color.
 256     * @opt_param string rights Filters based on licensing. Supported values
 257     * include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial,
 258     * cc_nonderived and combinations of these.
 259     * @opt_param string excludeTerms Identifies a word or phrase that should not
 260     * appear in any documents in the search results
 261     * @opt_param string filter Controls turning on or off the duplicate content
 262     * filter.
 263     * @opt_param string linkSite Specifies that all search results should contain a
 264     * link to a particular URL
 265     * @opt_param string cx The custom search engine ID to scope this search query
 266     * @opt_param string siteSearchFilter Controls whether to include or exclude
 267     * results from the site named in the as_sitesearch parameter
 268     * @return Google_Service_Customsearch_Search
 269     */
 270    public function listCse($q, $optParams = array())
 271    {
 272      $params = array('q' => $q);
 273      $params = array_merge($params, $optParams);
 274      return $this->call('list', array($params), "Google_Service_Customsearch_Search");
 275    }
 276  }
 277  
 278  
 279  
 280  
 281  class Google_Service_Customsearch_Context extends Google_Collection
 282  {
 283    protected $collection_key = 'facets';
 284    protected $internal_gapi_mappings = array(
 285    );
 286    protected $facetsType = 'Google_Service_Customsearch_ContextFacets';
 287    protected $facetsDataType = 'array';
 288    public $title;
 289  
 290  
 291    public function setFacets($facets)
 292    {
 293      $this->facets = $facets;
 294    }
 295    public function getFacets()
 296    {
 297      return $this->facets;
 298    }
 299    public function setTitle($title)
 300    {
 301      $this->title = $title;
 302    }
 303    public function getTitle()
 304    {
 305      return $this->title;
 306    }
 307  }
 308  
 309  class Google_Service_Customsearch_ContextFacets extends Google_Model
 310  {
 311    protected $internal_gapi_mappings = array(
 312          "labelWithOp" => "label_with_op",
 313    );
 314    public $anchor;
 315    public $label;
 316    public $labelWithOp;
 317  
 318  
 319    public function setAnchor($anchor)
 320    {
 321      $this->anchor = $anchor;
 322    }
 323    public function getAnchor()
 324    {
 325      return $this->anchor;
 326    }
 327    public function setLabel($label)
 328    {
 329      $this->label = $label;
 330    }
 331    public function getLabel()
 332    {
 333      return $this->label;
 334    }
 335    public function setLabelWithOp($labelWithOp)
 336    {
 337      $this->labelWithOp = $labelWithOp;
 338    }
 339    public function getLabelWithOp()
 340    {
 341      return $this->labelWithOp;
 342    }
 343  }
 344  
 345  class Google_Service_Customsearch_Promotion extends Google_Collection
 346  {
 347    protected $collection_key = 'bodyLines';
 348    protected $internal_gapi_mappings = array(
 349    );
 350    protected $bodyLinesType = 'Google_Service_Customsearch_PromotionBodyLines';
 351    protected $bodyLinesDataType = 'array';
 352    public $displayLink;
 353    public $htmlTitle;
 354    protected $imageType = 'Google_Service_Customsearch_PromotionImage';
 355    protected $imageDataType = '';
 356    public $link;
 357    public $title;
 358  
 359  
 360    public function setBodyLines($bodyLines)
 361    {
 362      $this->bodyLines = $bodyLines;
 363    }
 364    public function getBodyLines()
 365    {
 366      return $this->bodyLines;
 367    }
 368    public function setDisplayLink($displayLink)
 369    {
 370      $this->displayLink = $displayLink;
 371    }
 372    public function getDisplayLink()
 373    {
 374      return $this->displayLink;
 375    }
 376    public function setHtmlTitle($htmlTitle)
 377    {
 378      $this->htmlTitle = $htmlTitle;
 379    }
 380    public function getHtmlTitle()
 381    {
 382      return $this->htmlTitle;
 383    }
 384    public function setImage(Google_Service_Customsearch_PromotionImage $image)
 385    {
 386      $this->image = $image;
 387    }
 388    public function getImage()
 389    {
 390      return $this->image;
 391    }
 392    public function setLink($link)
 393    {
 394      $this->link = $link;
 395    }
 396    public function getLink()
 397    {
 398      return $this->link;
 399    }
 400    public function setTitle($title)
 401    {
 402      $this->title = $title;
 403    }
 404    public function getTitle()
 405    {
 406      return $this->title;
 407    }
 408  }
 409  
 410  class Google_Service_Customsearch_PromotionBodyLines extends Google_Model
 411  {
 412    protected $internal_gapi_mappings = array(
 413    );
 414    public $htmlTitle;
 415    public $link;
 416    public $title;
 417    public $url;
 418  
 419  
 420    public function setHtmlTitle($htmlTitle)
 421    {
 422      $this->htmlTitle = $htmlTitle;
 423    }
 424    public function getHtmlTitle()
 425    {
 426      return $this->htmlTitle;
 427    }
 428    public function setLink($link)
 429    {
 430      $this->link = $link;
 431    }
 432    public function getLink()
 433    {
 434      return $this->link;
 435    }
 436    public function setTitle($title)
 437    {
 438      $this->title = $title;
 439    }
 440    public function getTitle()
 441    {
 442      return $this->title;
 443    }
 444    public function setUrl($url)
 445    {
 446      $this->url = $url;
 447    }
 448    public function getUrl()
 449    {
 450      return $this->url;
 451    }
 452  }
 453  
 454  class Google_Service_Customsearch_PromotionImage extends Google_Model
 455  {
 456    protected $internal_gapi_mappings = array(
 457    );
 458    public $height;
 459    public $source;
 460    public $width;
 461  
 462  
 463    public function setHeight($height)
 464    {
 465      $this->height = $height;
 466    }
 467    public function getHeight()
 468    {
 469      return $this->height;
 470    }
 471    public function setSource($source)
 472    {
 473      $this->source = $source;
 474    }
 475    public function getSource()
 476    {
 477      return $this->source;
 478    }
 479    public function setWidth($width)
 480    {
 481      $this->width = $width;
 482    }
 483    public function getWidth()
 484    {
 485      return $this->width;
 486    }
 487  }
 488  
 489  class Google_Service_Customsearch_Query extends Google_Model
 490  {
 491    protected $internal_gapi_mappings = array(
 492    );
 493    public $count;
 494    public $cr;
 495    public $cref;
 496    public $cx;
 497    public $dateRestrict;
 498    public $disableCnTwTranslation;
 499    public $exactTerms;
 500    public $excludeTerms;
 501    public $fileType;
 502    public $filter;
 503    public $gl;
 504    public $googleHost;
 505    public $highRange;
 506    public $hl;
 507    public $hq;
 508    public $imgColorType;
 509    public $imgDominantColor;
 510    public $imgSize;
 511    public $imgType;
 512    public $inputEncoding;
 513    public $language;
 514    public $linkSite;
 515    public $lowRange;
 516    public $orTerms;
 517    public $outputEncoding;
 518    public $relatedSite;
 519    public $rights;
 520    public $safe;
 521    public $searchTerms;
 522    public $searchType;
 523    public $siteSearch;
 524    public $siteSearchFilter;
 525    public $sort;
 526    public $startIndex;
 527    public $startPage;
 528    public $title;
 529    public $totalResults;
 530  
 531  
 532    public function setCount($count)
 533    {
 534      $this->count = $count;
 535    }
 536    public function getCount()
 537    {
 538      return $this->count;
 539    }
 540    public function setCr($cr)
 541    {
 542      $this->cr = $cr;
 543    }
 544    public function getCr()
 545    {
 546      return $this->cr;
 547    }
 548    public function setCref($cref)
 549    {
 550      $this->cref = $cref;
 551    }
 552    public function getCref()
 553    {
 554      return $this->cref;
 555    }
 556    public function setCx($cx)
 557    {
 558      $this->cx = $cx;
 559    }
 560    public function getCx()
 561    {
 562      return $this->cx;
 563    }
 564    public function setDateRestrict($dateRestrict)
 565    {
 566      $this->dateRestrict = $dateRestrict;
 567    }
 568    public function getDateRestrict()
 569    {
 570      return $this->dateRestrict;
 571    }
 572    public function setDisableCnTwTranslation($disableCnTwTranslation)
 573    {
 574      $this->disableCnTwTranslation = $disableCnTwTranslation;
 575    }
 576    public function getDisableCnTwTranslation()
 577    {
 578      return $this->disableCnTwTranslation;
 579    }
 580    public function setExactTerms($exactTerms)
 581    {
 582      $this->exactTerms = $exactTerms;
 583    }
 584    public function getExactTerms()
 585    {
 586      return $this->exactTerms;
 587    }
 588    public function setExcludeTerms($excludeTerms)
 589    {
 590      $this->excludeTerms = $excludeTerms;
 591    }
 592    public function getExcludeTerms()
 593    {
 594      return $this->excludeTerms;
 595    }
 596    public function setFileType($fileType)
 597    {
 598      $this->fileType = $fileType;
 599    }
 600    public function getFileType()
 601    {
 602      return $this->fileType;
 603    }
 604    public function setFilter($filter)
 605    {
 606      $this->filter = $filter;
 607    }
 608    public function getFilter()
 609    {
 610      return $this->filter;
 611    }
 612    public function setGl($gl)
 613    {
 614      $this->gl = $gl;
 615    }
 616    public function getGl()
 617    {
 618      return $this->gl;
 619    }
 620    public function setGoogleHost($googleHost)
 621    {
 622      $this->googleHost = $googleHost;
 623    }
 624    public function getGoogleHost()
 625    {
 626      return $this->googleHost;
 627    }
 628    public function setHighRange($highRange)
 629    {
 630      $this->highRange = $highRange;
 631    }
 632    public function getHighRange()
 633    {
 634      return $this->highRange;
 635    }
 636    public function setHl($hl)
 637    {
 638      $this->hl = $hl;
 639    }
 640    public function getHl()
 641    {
 642      return $this->hl;
 643    }
 644    public function setHq($hq)
 645    {
 646      $this->hq = $hq;
 647    }
 648    public function getHq()
 649    {
 650      return $this->hq;
 651    }
 652    public function setImgColorType($imgColorType)
 653    {
 654      $this->imgColorType = $imgColorType;
 655    }
 656    public function getImgColorType()
 657    {
 658      return $this->imgColorType;
 659    }
 660    public function setImgDominantColor($imgDominantColor)
 661    {
 662      $this->imgDominantColor = $imgDominantColor;
 663    }
 664    public function getImgDominantColor()
 665    {
 666      return $this->imgDominantColor;
 667    }
 668    public function setImgSize($imgSize)
 669    {
 670      $this->imgSize = $imgSize;
 671    }
 672    public function getImgSize()
 673    {
 674      return $this->imgSize;
 675    }
 676    public function setImgType($imgType)
 677    {
 678      $this->imgType = $imgType;
 679    }
 680    public function getImgType()
 681    {
 682      return $this->imgType;
 683    }
 684    public function setInputEncoding($inputEncoding)
 685    {
 686      $this->inputEncoding = $inputEncoding;
 687    }
 688    public function getInputEncoding()
 689    {
 690      return $this->inputEncoding;
 691    }
 692    public function setLanguage($language)
 693    {
 694      $this->language = $language;
 695    }
 696    public function getLanguage()
 697    {
 698      return $this->language;
 699    }
 700    public function setLinkSite($linkSite)
 701    {
 702      $this->linkSite = $linkSite;
 703    }
 704    public function getLinkSite()
 705    {
 706      return $this->linkSite;
 707    }
 708    public function setLowRange($lowRange)
 709    {
 710      $this->lowRange = $lowRange;
 711    }
 712    public function getLowRange()
 713    {
 714      return $this->lowRange;
 715    }
 716    public function setOrTerms($orTerms)
 717    {
 718      $this->orTerms = $orTerms;
 719    }
 720    public function getOrTerms()
 721    {
 722      return $this->orTerms;
 723    }
 724    public function setOutputEncoding($outputEncoding)
 725    {
 726      $this->outputEncoding = $outputEncoding;
 727    }
 728    public function getOutputEncoding()
 729    {
 730      return $this->outputEncoding;
 731    }
 732    public function setRelatedSite($relatedSite)
 733    {
 734      $this->relatedSite = $relatedSite;
 735    }
 736    public function getRelatedSite()
 737    {
 738      return $this->relatedSite;
 739    }
 740    public function setRights($rights)
 741    {
 742      $this->rights = $rights;
 743    }
 744    public function getRights()
 745    {
 746      return $this->rights;
 747    }
 748    public function setSafe($safe)
 749    {
 750      $this->safe = $safe;
 751    }
 752    public function getSafe()
 753    {
 754      return $this->safe;
 755    }
 756    public function setSearchTerms($searchTerms)
 757    {
 758      $this->searchTerms = $searchTerms;
 759    }
 760    public function getSearchTerms()
 761    {
 762      return $this->searchTerms;
 763    }
 764    public function setSearchType($searchType)
 765    {
 766      $this->searchType = $searchType;
 767    }
 768    public function getSearchType()
 769    {
 770      return $this->searchType;
 771    }
 772    public function setSiteSearch($siteSearch)
 773    {
 774      $this->siteSearch = $siteSearch;
 775    }
 776    public function getSiteSearch()
 777    {
 778      return $this->siteSearch;
 779    }
 780    public function setSiteSearchFilter($siteSearchFilter)
 781    {
 782      $this->siteSearchFilter = $siteSearchFilter;
 783    }
 784    public function getSiteSearchFilter()
 785    {
 786      return $this->siteSearchFilter;
 787    }
 788    public function setSort($sort)
 789    {
 790      $this->sort = $sort;
 791    }
 792    public function getSort()
 793    {
 794      return $this->sort;
 795    }
 796    public function setStartIndex($startIndex)
 797    {
 798      $this->startIndex = $startIndex;
 799    }
 800    public function getStartIndex()
 801    {
 802      return $this->startIndex;
 803    }
 804    public function setStartPage($startPage)
 805    {
 806      $this->startPage = $startPage;
 807    }
 808    public function getStartPage()
 809    {
 810      return $this->startPage;
 811    }
 812    public function setTitle($title)
 813    {
 814      $this->title = $title;
 815    }
 816    public function getTitle()
 817    {
 818      return $this->title;
 819    }
 820    public function setTotalResults($totalResults)
 821    {
 822      $this->totalResults = $totalResults;
 823    }
 824    public function getTotalResults()
 825    {
 826      return $this->totalResults;
 827    }
 828  }
 829  
 830  class Google_Service_Customsearch_Result extends Google_Collection
 831  {
 832    protected $collection_key = 'labels';
 833    protected $internal_gapi_mappings = array(
 834    );
 835    public $cacheId;
 836    public $displayLink;
 837    public $fileFormat;
 838    public $formattedUrl;
 839    public $htmlFormattedUrl;
 840    public $htmlSnippet;
 841    public $htmlTitle;
 842    protected $imageType = 'Google_Service_Customsearch_ResultImage';
 843    protected $imageDataType = '';
 844    public $kind;
 845    protected $labelsType = 'Google_Service_Customsearch_ResultLabels';
 846    protected $labelsDataType = 'array';
 847    public $link;
 848    public $mime;
 849    public $pagemap;
 850    public $snippet;
 851    public $title;
 852  
 853  
 854    public function setCacheId($cacheId)
 855    {
 856      $this->cacheId = $cacheId;
 857    }
 858    public function getCacheId()
 859    {
 860      return $this->cacheId;
 861    }
 862    public function setDisplayLink($displayLink)
 863    {
 864      $this->displayLink = $displayLink;
 865    }
 866    public function getDisplayLink()
 867    {
 868      return $this->displayLink;
 869    }
 870    public function setFileFormat($fileFormat)
 871    {
 872      $this->fileFormat = $fileFormat;
 873    }
 874    public function getFileFormat()
 875    {
 876      return $this->fileFormat;
 877    }
 878    public function setFormattedUrl($formattedUrl)
 879    {
 880      $this->formattedUrl = $formattedUrl;
 881    }
 882    public function getFormattedUrl()
 883    {
 884      return $this->formattedUrl;
 885    }
 886    public function setHtmlFormattedUrl($htmlFormattedUrl)
 887    {
 888      $this->htmlFormattedUrl = $htmlFormattedUrl;
 889    }
 890    public function getHtmlFormattedUrl()
 891    {
 892      return $this->htmlFormattedUrl;
 893    }
 894    public function setHtmlSnippet($htmlSnippet)
 895    {
 896      $this->htmlSnippet = $htmlSnippet;
 897    }
 898    public function getHtmlSnippet()
 899    {
 900      return $this->htmlSnippet;
 901    }
 902    public function setHtmlTitle($htmlTitle)
 903    {
 904      $this->htmlTitle = $htmlTitle;
 905    }
 906    public function getHtmlTitle()
 907    {
 908      return $this->htmlTitle;
 909    }
 910    public function setImage(Google_Service_Customsearch_ResultImage $image)
 911    {
 912      $this->image = $image;
 913    }
 914    public function getImage()
 915    {
 916      return $this->image;
 917    }
 918    public function setKind($kind)
 919    {
 920      $this->kind = $kind;
 921    }
 922    public function getKind()
 923    {
 924      return $this->kind;
 925    }
 926    public function setLabels($labels)
 927    {
 928      $this->labels = $labels;
 929    }
 930    public function getLabels()
 931    {
 932      return $this->labels;
 933    }
 934    public function setLink($link)
 935    {
 936      $this->link = $link;
 937    }
 938    public function getLink()
 939    {
 940      return $this->link;
 941    }
 942    public function setMime($mime)
 943    {
 944      $this->mime = $mime;
 945    }
 946    public function getMime()
 947    {
 948      return $this->mime;
 949    }
 950    public function setPagemap($pagemap)
 951    {
 952      $this->pagemap = $pagemap;
 953    }
 954    public function getPagemap()
 955    {
 956      return $this->pagemap;
 957    }
 958    public function setSnippet($snippet)
 959    {
 960      $this->snippet = $snippet;
 961    }
 962    public function getSnippet()
 963    {
 964      return $this->snippet;
 965    }
 966    public function setTitle($title)
 967    {
 968      $this->title = $title;
 969    }
 970    public function getTitle()
 971    {
 972      return $this->title;
 973    }
 974  }
 975  
 976  class Google_Service_Customsearch_ResultImage extends Google_Model
 977  {
 978    protected $internal_gapi_mappings = array(
 979    );
 980    public $byteSize;
 981    public $contextLink;
 982    public $height;
 983    public $thumbnailHeight;
 984    public $thumbnailLink;
 985    public $thumbnailWidth;
 986    public $width;
 987  
 988  
 989    public function setByteSize($byteSize)
 990    {
 991      $this->byteSize = $byteSize;
 992    }
 993    public function getByteSize()
 994    {
 995      return $this->byteSize;
 996    }
 997    public function setContextLink($contextLink)
 998    {
 999      $this->contextLink = $contextLink;
1000    }
1001    public function getContextLink()
1002    {
1003      return $this->contextLink;
1004    }
1005    public function setHeight($height)
1006    {
1007      $this->height = $height;
1008    }
1009    public function getHeight()
1010    {
1011      return $this->height;
1012    }
1013    public function setThumbnailHeight($thumbnailHeight)
1014    {
1015      $this->thumbnailHeight = $thumbnailHeight;
1016    }
1017    public function getThumbnailHeight()
1018    {
1019      return $this->thumbnailHeight;
1020    }
1021    public function setThumbnailLink($thumbnailLink)
1022    {
1023      $this->thumbnailLink = $thumbnailLink;
1024    }
1025    public function getThumbnailLink()
1026    {
1027      return $this->thumbnailLink;
1028    }
1029    public function setThumbnailWidth($thumbnailWidth)
1030    {
1031      $this->thumbnailWidth = $thumbnailWidth;
1032    }
1033    public function getThumbnailWidth()
1034    {
1035      return $this->thumbnailWidth;
1036    }
1037    public function setWidth($width)
1038    {
1039      $this->width = $width;
1040    }
1041    public function getWidth()
1042    {
1043      return $this->width;
1044    }
1045  }
1046  
1047  class Google_Service_Customsearch_ResultLabels extends Google_Model
1048  {
1049    protected $internal_gapi_mappings = array(
1050          "labelWithOp" => "label_with_op",
1051    );
1052    public $displayName;
1053    public $labelWithOp;
1054    public $name;
1055  
1056  
1057    public function setDisplayName($displayName)
1058    {
1059      $this->displayName = $displayName;
1060    }
1061    public function getDisplayName()
1062    {
1063      return $this->displayName;
1064    }
1065    public function setLabelWithOp($labelWithOp)
1066    {
1067      $this->labelWithOp = $labelWithOp;
1068    }
1069    public function getLabelWithOp()
1070    {
1071      return $this->labelWithOp;
1072    }
1073    public function setName($name)
1074    {
1075      $this->name = $name;
1076    }
1077    public function getName()
1078    {
1079      return $this->name;
1080    }
1081  }
1082  
1083  class Google_Service_Customsearch_ResultPagemap extends Google_Model
1084  {
1085  }
1086  
1087  class Google_Service_Customsearch_ResultPagemapItemElement extends Google_Model
1088  {
1089  }
1090  
1091  class Google_Service_Customsearch_Search extends Google_Collection
1092  {
1093    protected $collection_key = 'promotions';
1094    protected $internal_gapi_mappings = array(
1095    );
1096    protected $contextType = 'Google_Service_Customsearch_Context';
1097    protected $contextDataType = '';
1098    protected $itemsType = 'Google_Service_Customsearch_Result';
1099    protected $itemsDataType = 'array';
1100    public $kind;
1101    protected $promotionsType = 'Google_Service_Customsearch_Promotion';
1102    protected $promotionsDataType = 'array';
1103    protected $queriesType = 'Google_Service_Customsearch_Query';
1104    protected $queriesDataType = 'map';
1105    protected $searchInformationType = 'Google_Service_Customsearch_SearchSearchInformation';
1106    protected $searchInformationDataType = '';
1107    protected $spellingType = 'Google_Service_Customsearch_SearchSpelling';
1108    protected $spellingDataType = '';
1109    protected $urlType = 'Google_Service_Customsearch_SearchUrl';
1110    protected $urlDataType = '';
1111  
1112  
1113    public function setContext(Google_Service_Customsearch_Context $context)
1114    {
1115      $this->context = $context;
1116    }
1117    public function getContext()
1118    {
1119      return $this->context;
1120    }
1121    public function setItems($items)
1122    {
1123      $this->items = $items;
1124    }
1125    public function getItems()
1126    {
1127      return $this->items;
1128    }
1129    public function setKind($kind)
1130    {
1131      $this->kind = $kind;
1132    }
1133    public function getKind()
1134    {
1135      return $this->kind;
1136    }
1137    public function setPromotions($promotions)
1138    {
1139      $this->promotions = $promotions;
1140    }
1141    public function getPromotions()
1142    {
1143      return $this->promotions;
1144    }
1145    public function setQueries($queries)
1146    {
1147      $this->queries = $queries;
1148    }
1149    public function getQueries()
1150    {
1151      return $this->queries;
1152    }
1153    public function setSearchInformation(Google_Service_Customsearch_SearchSearchInformation $searchInformation)
1154    {
1155      $this->searchInformation = $searchInformation;
1156    }
1157    public function getSearchInformation()
1158    {
1159      return $this->searchInformation;
1160    }
1161    public function setSpelling(Google_Service_Customsearch_SearchSpelling $spelling)
1162    {
1163      $this->spelling = $spelling;
1164    }
1165    public function getSpelling()
1166    {
1167      return $this->spelling;
1168    }
1169    public function setUrl(Google_Service_Customsearch_SearchUrl $url)
1170    {
1171      $this->url = $url;
1172    }
1173    public function getUrl()
1174    {
1175      return $this->url;
1176    }
1177  }
1178  
1179  class Google_Service_Customsearch_SearchQueries extends Google_Model
1180  {
1181  }
1182  
1183  class Google_Service_Customsearch_SearchSearchInformation extends Google_Model
1184  {
1185    protected $internal_gapi_mappings = array(
1186    );
1187    public $formattedSearchTime;
1188    public $formattedTotalResults;
1189    public $searchTime;
1190    public $totalResults;
1191  
1192  
1193    public function setFormattedSearchTime($formattedSearchTime)
1194    {
1195      $this->formattedSearchTime = $formattedSearchTime;
1196    }
1197    public function getFormattedSearchTime()
1198    {
1199      return $this->formattedSearchTime;
1200    }
1201    public function setFormattedTotalResults($formattedTotalResults)
1202    {
1203      $this->formattedTotalResults = $formattedTotalResults;
1204    }
1205    public function getFormattedTotalResults()
1206    {
1207      return $this->formattedTotalResults;
1208    }
1209    public function setSearchTime($searchTime)
1210    {
1211      $this->searchTime = $searchTime;
1212    }
1213    public function getSearchTime()
1214    {
1215      return $this->searchTime;
1216    }
1217    public function setTotalResults($totalResults)
1218    {
1219      $this->totalResults = $totalResults;
1220    }
1221    public function getTotalResults()
1222    {
1223      return $this->totalResults;
1224    }
1225  }
1226  
1227  class Google_Service_Customsearch_SearchSpelling extends Google_Model
1228  {
1229    protected $internal_gapi_mappings = array(
1230    );
1231    public $correctedQuery;
1232    public $htmlCorrectedQuery;
1233  
1234  
1235    public function setCorrectedQuery($correctedQuery)
1236    {
1237      $this->correctedQuery = $correctedQuery;
1238    }
1239    public function getCorrectedQuery()
1240    {
1241      return $this->correctedQuery;
1242    }
1243    public function setHtmlCorrectedQuery($htmlCorrectedQuery)
1244    {
1245      $this->htmlCorrectedQuery = $htmlCorrectedQuery;
1246    }
1247    public function getHtmlCorrectedQuery()
1248    {
1249      return $this->htmlCorrectedQuery;
1250    }
1251  }
1252  
1253  class Google_Service_Customsearch_SearchUrl extends Google_Model
1254  {
1255    protected $internal_gapi_mappings = array(
1256    );
1257    public $template;
1258    public $type;
1259  
1260  
1261    public function setTemplate($template)
1262    {
1263      $this->template = $template;
1264    }
1265    public function getTemplate()
1266    {
1267      return $this->template;
1268    }
1269    public function setType($type)
1270    {
1271      $this->type = $type;
1272    }
1273    public function getType()
1274    {
1275      return $this->type;
1276    }
1277  }