Search moodle.org's
Developer Documentation

See Release Notes

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

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