PageRenderTime 75ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/src/Google/Service/Customsearch.php

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