PageRenderTime 56ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/Lib/google-api-php-client/contrib/Google_CustomsearchService.php

https://bitbucket.org/addictionworldwide/google-bundle-for-symfony2
PHP | 836 lines | 736 code | 20 blank | 80 comment | 2 complexity | 71e240765a29ee901ad1f5f30a7164e6 MD5 | raw file
Possible License(s): Apache-2.0
  1. <?php
  2. /*
  3. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  4. * use this file except in compliance with the License. You may obtain a copy of
  5. * the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  11. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  12. * License for the specific language governing permissions and limitations under
  13. * the License.
  14. */
  15. /**
  16. * The "cse" collection of methods.
  17. * Typical usage is:
  18. * <code>
  19. * $customsearchService = new Google_CustomsearchService(...);
  20. * $cse = $customsearchService->cse;
  21. * </code>
  22. */
  23. class Google_CseServiceResource extends Google_ServiceResource {
  24. /**
  25. * Returns metadata about the search performed, metadata about the custom search engine used for the
  26. * search, and the search results. (cse.list)
  27. *
  28. * @param string $q Query
  29. * @param array $optParams Optional parameters.
  30. *
  31. * @opt_param string sort The sort expression to apply to the results
  32. * @opt_param string orTerms Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms
  33. * @opt_param string highRange Creates a range in form as_nlo value..as_nhi value and attempts to append it to query
  34. * @opt_param string num Number of search results to return
  35. * @opt_param string cr Country restrict(s).
  36. * @opt_param string imgType Returns images of a type, which can be one of: clipart, face, lineart, news, and photo.
  37. * @opt_param string gl Geolocation of end user.
  38. * @opt_param string relatedSite Specifies that all search results should be pages that are related to the specified URL
  39. * @opt_param string searchType Specifies the search type: image.
  40. * @opt_param string fileType Returns images of a specified type. Some of the allowed values are: bmp, gif, png, jpg, svg, pdf, ...
  41. * @opt_param string start The index of the first result to return
  42. * @opt_param string imgDominantColor Returns images of a specific dominant color: yellow, green, teal, blue, purple, pink, white, gray, black and brown.
  43. * @opt_param string lr The language restriction for the search results
  44. * @opt_param string siteSearch Specifies all search results should be pages from a given site
  45. * @opt_param string cref The URL of a linked custom search engine
  46. * @opt_param string dateRestrict Specifies all search results are from a time period
  47. * @opt_param string safe Search safety level
  48. * @opt_param string c2coff Turns off the translation between zh-CN and zh-TW.
  49. * @opt_param string googlehost The local Google domain to use to perform the search.
  50. * @opt_param string hq Appends the extra query terms to the query.
  51. * @opt_param string exactTerms Identifies a phrase that all documents in the search results must contain
  52. * @opt_param string hl Sets the user interface language.
  53. * @opt_param string lowRange Creates a range in form as_nlo value..as_nhi value and attempts to append it to query
  54. * @opt_param string imgSize Returns images of a specified size, where size can be one of: icon, small, medium, large, xlarge, xxlarge, and huge.
  55. * @opt_param string imgColorType Returns black and white, grayscale, or color images: mono, gray, and color.
  56. * @opt_param string rights Filters based on licensing. Supported values include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations of these.
  57. * @opt_param string excludeTerms Identifies a word or phrase that should not appear in any documents in the search results
  58. * @opt_param string filter Controls turning on or off the duplicate content filter.
  59. * @opt_param string linkSite Specifies that all search results should contain a link to a particular URL
  60. * @opt_param string cx The custom search engine ID to scope this search query
  61. * @opt_param string siteSearchFilter Controls whether to include or exclude results from the site named in the as_sitesearch parameter
  62. * @return Google_Search
  63. */
  64. public function listCse($q, $optParams = array()) {
  65. $params = array('q' => $q);
  66. $params = array_merge($params, $optParams);
  67. $data = $this->__call('list', array($params));
  68. if ($this->useObjects()) {
  69. return new Google_Search($data);
  70. } else {
  71. return $data;
  72. }
  73. }
  74. }
  75. /**
  76. * Service definition for Google_Customsearch (v1).
  77. *
  78. * <p>
  79. * Lets you search over a website or collection of websites
  80. * </p>
  81. *
  82. * <p>
  83. * For more information about this service, see the
  84. * <a href="http://code.google.com/apis/customsearch/v1/using_rest.html" target="_blank">API Documentation</a>
  85. * </p>
  86. *
  87. * @author Google, Inc.
  88. */
  89. class Google_CustomsearchService extends Google_Service {
  90. public $cse;
  91. /**
  92. * Constructs the internal representation of the Customsearch service.
  93. *
  94. * @param Google_Client $client
  95. */
  96. public function __construct(Google_Client $client) {
  97. $this->servicePath = 'customsearch/';
  98. $this->version = 'v1';
  99. $this->serviceName = 'customsearch';
  100. $client->addService($this->serviceName, $this->version);
  101. $this->cse = new Google_CseServiceResource($this, $this->serviceName, 'cse', json_decode('{"methods": {"list": {"httpMethod": "GET", "response": {"$ref": "Search"}, "id": "search.cse.list", "parameters": {"sort": {"type": "string", "location": "query"}, "orTerms": {"type": "string", "location": "query"}, "highRange": {"type": "string", "location": "query"}, "num": {"default": "10", "type": "integer", "location": "query", "format": "uint32"}, "cr": {"type": "string", "location": "query"}, "imgType": {"enum": ["clipart", "face", "lineart", "news", "photo"], "type": "string", "location": "query"}, "gl": {"type": "string", "location": "query"}, "q": {"required": true, "type": "string", "location": "query"}, "relatedSite": {"type": "string", "location": "query"}, "searchType": {"enum": ["image"], "type": "string", "location": "query"}, "fileType": {"type": "string", "location": "query"}, "start": {"type": "integer", "location": "query", "format": "uint32"}, "imgDominantColor": {"enum": ["black", "blue", "brown", "gray", "green", "pink", "purple", "teal", "white", "yellow"], "type": "string", "location": "query"}, "lr": {"enum": ["lang_ar", "lang_bg", "lang_ca", "lang_cs", "lang_da", "lang_de", "lang_el", "lang_en", "lang_es", "lang_et", "lang_fi", "lang_fr", "lang_hr", "lang_hu", "lang_id", "lang_is", "lang_it", "lang_iw", "lang_ja", "lang_ko", "lang_lt", "lang_lv", "lang_nl", "lang_no", "lang_pl", "lang_pt", "lang_ro", "lang_ru", "lang_sk", "lang_sl", "lang_sr", "lang_sv", "lang_tr", "lang_zh-CN", "lang_zh-TW"], "type": "string", "location": "query"}, "siteSearch": {"type": "string", "location": "query"}, "cref": {"type": "string", "location": "query"}, "dateRestrict": {"type": "string", "location": "query"}, "safe": {"default": "off", "enum": ["high", "medium", "off"], "type": "string", "location": "query"}, "c2coff": {"type": "string", "location": "query"}, "googlehost": {"type": "string", "location": "query"}, "hq": {"type": "string", "location": "query"}, "exactTerms": {"type": "string", "location": "query"}, "hl": {"type": "string", "location": "query"}, "lowRange": {"type": "string", "location": "query"}, "imgSize": {"enum": ["huge", "icon", "large", "medium", "small", "xlarge", "xxlarge"], "type": "string", "location": "query"}, "imgColorType": {"enum": ["color", "gray", "mono"], "type": "string", "location": "query"}, "rights": {"type": "string", "location": "query"}, "excludeTerms": {"type": "string", "location": "query"}, "filter": {"enum": ["0", "1"], "type": "string", "location": "query"}, "linkSite": {"type": "string", "location": "query"}, "cx": {"type": "string", "location": "query"}, "siteSearchFilter": {"enum": ["e", "i"], "type": "string", "location": "query"}}, "path": "v1"}}}', true));
  102. }
  103. }
  104. class Google_Context extends Google_Model {
  105. protected $__facetsType = 'Google_ContextFacets';
  106. protected $__facetsDataType = 'array';
  107. public $facets;
  108. public $title;
  109. public function setFacets(/* array(Google_ContextFacets) */ $facets) {
  110. $this->assertIsArray($facets, 'Google_ContextFacets', __METHOD__);
  111. $this->facets = $facets;
  112. }
  113. public function getFacets() {
  114. return $this->facets;
  115. }
  116. public function setTitle($title) {
  117. $this->title = $title;
  118. }
  119. public function getTitle() {
  120. return $this->title;
  121. }
  122. }
  123. class Google_ContextFacets extends Google_Model {
  124. public $anchor;
  125. public $label;
  126. public function setAnchor($anchor) {
  127. $this->anchor = $anchor;
  128. }
  129. public function getAnchor() {
  130. return $this->anchor;
  131. }
  132. public function setLabel($label) {
  133. $this->label = $label;
  134. }
  135. public function getLabel() {
  136. return $this->label;
  137. }
  138. }
  139. class Google_Promotion extends Google_Model {
  140. public $title;
  141. public $displayLink;
  142. public $htmlTitle;
  143. public $link;
  144. protected $__bodyLinesType = 'Google_PromotionBodyLines';
  145. protected $__bodyLinesDataType = 'array';
  146. public $bodyLines;
  147. protected $__imageType = 'Google_PromotionImage';
  148. protected $__imageDataType = '';
  149. public $image;
  150. public function setTitle($title) {
  151. $this->title = $title;
  152. }
  153. public function getTitle() {
  154. return $this->title;
  155. }
  156. public function setDisplayLink($displayLink) {
  157. $this->displayLink = $displayLink;
  158. }
  159. public function getDisplayLink() {
  160. return $this->displayLink;
  161. }
  162. public function setHtmlTitle($htmlTitle) {
  163. $this->htmlTitle = $htmlTitle;
  164. }
  165. public function getHtmlTitle() {
  166. return $this->htmlTitle;
  167. }
  168. public function setLink($link) {
  169. $this->link = $link;
  170. }
  171. public function getLink() {
  172. return $this->link;
  173. }
  174. public function setBodyLines(/* array(Google_PromotionBodyLines) */ $bodyLines) {
  175. $this->assertIsArray($bodyLines, 'Google_PromotionBodyLines', __METHOD__);
  176. $this->bodyLines = $bodyLines;
  177. }
  178. public function getBodyLines() {
  179. return $this->bodyLines;
  180. }
  181. public function setImage(Google_PromotionImage $image) {
  182. $this->image = $image;
  183. }
  184. public function getImage() {
  185. return $this->image;
  186. }
  187. }
  188. class Google_PromotionBodyLines extends Google_Model {
  189. public $url;
  190. public $htmlTitle;
  191. public $link;
  192. public $title;
  193. public function setUrl($url) {
  194. $this->url = $url;
  195. }
  196. public function getUrl() {
  197. return $this->url;
  198. }
  199. public function setHtmlTitle($htmlTitle) {
  200. $this->htmlTitle = $htmlTitle;
  201. }
  202. public function getHtmlTitle() {
  203. return $this->htmlTitle;
  204. }
  205. public function setLink($link) {
  206. $this->link = $link;
  207. }
  208. public function getLink() {
  209. return $this->link;
  210. }
  211. public function setTitle($title) {
  212. $this->title = $title;
  213. }
  214. public function getTitle() {
  215. return $this->title;
  216. }
  217. }
  218. class Google_PromotionImage extends Google_Model {
  219. public $source;
  220. public $width;
  221. public $height;
  222. public function setSource($source) {
  223. $this->source = $source;
  224. }
  225. public function getSource() {
  226. return $this->source;
  227. }
  228. public function setWidth($width) {
  229. $this->width = $width;
  230. }
  231. public function getWidth() {
  232. return $this->width;
  233. }
  234. public function setHeight($height) {
  235. $this->height = $height;
  236. }
  237. public function getHeight() {
  238. return $this->height;
  239. }
  240. }
  241. class Google_Query extends Google_Model {
  242. public $sort;
  243. public $inputEncoding;
  244. public $orTerms;
  245. public $highRange;
  246. public $cx;
  247. public $startPage;
  248. public $disableCnTwTranslation;
  249. public $cr;
  250. public $imgType;
  251. public $gl;
  252. public $relatedSite;
  253. public $searchType;
  254. public $title;
  255. public $googleHost;
  256. public $fileType;
  257. public $imgDominantColor;
  258. public $siteSearch;
  259. public $cref;
  260. public $dateRestrict;
  261. public $safe;
  262. public $outputEncoding;
  263. public $hq;
  264. public $searchTerms;
  265. public $exactTerms;
  266. public $language;
  267. public $hl;
  268. public $totalResults;
  269. public $lowRange;
  270. public $count;
  271. public $imgSize;
  272. public $imgColorType;
  273. public $rights;
  274. public $startIndex;
  275. public $excludeTerms;
  276. public $filter;
  277. public $linkSite;
  278. public $siteSearchFilter;
  279. public function setSort($sort) {
  280. $this->sort = $sort;
  281. }
  282. public function getSort() {
  283. return $this->sort;
  284. }
  285. public function setInputEncoding($inputEncoding) {
  286. $this->inputEncoding = $inputEncoding;
  287. }
  288. public function getInputEncoding() {
  289. return $this->inputEncoding;
  290. }
  291. public function setOrTerms($orTerms) {
  292. $this->orTerms = $orTerms;
  293. }
  294. public function getOrTerms() {
  295. return $this->orTerms;
  296. }
  297. public function setHighRange($highRange) {
  298. $this->highRange = $highRange;
  299. }
  300. public function getHighRange() {
  301. return $this->highRange;
  302. }
  303. public function setCx($cx) {
  304. $this->cx = $cx;
  305. }
  306. public function getCx() {
  307. return $this->cx;
  308. }
  309. public function setStartPage($startPage) {
  310. $this->startPage = $startPage;
  311. }
  312. public function getStartPage() {
  313. return $this->startPage;
  314. }
  315. public function setDisableCnTwTranslation($disableCnTwTranslation) {
  316. $this->disableCnTwTranslation = $disableCnTwTranslation;
  317. }
  318. public function getDisableCnTwTranslation() {
  319. return $this->disableCnTwTranslation;
  320. }
  321. public function setCr($cr) {
  322. $this->cr = $cr;
  323. }
  324. public function getCr() {
  325. return $this->cr;
  326. }
  327. public function setImgType($imgType) {
  328. $this->imgType = $imgType;
  329. }
  330. public function getImgType() {
  331. return $this->imgType;
  332. }
  333. public function setGl($gl) {
  334. $this->gl = $gl;
  335. }
  336. public function getGl() {
  337. return $this->gl;
  338. }
  339. public function setRelatedSite($relatedSite) {
  340. $this->relatedSite = $relatedSite;
  341. }
  342. public function getRelatedSite() {
  343. return $this->relatedSite;
  344. }
  345. public function setSearchType($searchType) {
  346. $this->searchType = $searchType;
  347. }
  348. public function getSearchType() {
  349. return $this->searchType;
  350. }
  351. public function setTitle($title) {
  352. $this->title = $title;
  353. }
  354. public function getTitle() {
  355. return $this->title;
  356. }
  357. public function setGoogleHost($googleHost) {
  358. $this->googleHost = $googleHost;
  359. }
  360. public function getGoogleHost() {
  361. return $this->googleHost;
  362. }
  363. public function setFileType($fileType) {
  364. $this->fileType = $fileType;
  365. }
  366. public function getFileType() {
  367. return $this->fileType;
  368. }
  369. public function setImgDominantColor($imgDominantColor) {
  370. $this->imgDominantColor = $imgDominantColor;
  371. }
  372. public function getImgDominantColor() {
  373. return $this->imgDominantColor;
  374. }
  375. public function setSiteSearch($siteSearch) {
  376. $this->siteSearch = $siteSearch;
  377. }
  378. public function getSiteSearch() {
  379. return $this->siteSearch;
  380. }
  381. public function setCref($cref) {
  382. $this->cref = $cref;
  383. }
  384. public function getCref() {
  385. return $this->cref;
  386. }
  387. public function setDateRestrict($dateRestrict) {
  388. $this->dateRestrict = $dateRestrict;
  389. }
  390. public function getDateRestrict() {
  391. return $this->dateRestrict;
  392. }
  393. public function setSafe($safe) {
  394. $this->safe = $safe;
  395. }
  396. public function getSafe() {
  397. return $this->safe;
  398. }
  399. public function setOutputEncoding($outputEncoding) {
  400. $this->outputEncoding = $outputEncoding;
  401. }
  402. public function getOutputEncoding() {
  403. return $this->outputEncoding;
  404. }
  405. public function setHq($hq) {
  406. $this->hq = $hq;
  407. }
  408. public function getHq() {
  409. return $this->hq;
  410. }
  411. public function setSearchTerms($searchTerms) {
  412. $this->searchTerms = $searchTerms;
  413. }
  414. public function getSearchTerms() {
  415. return $this->searchTerms;
  416. }
  417. public function setExactTerms($exactTerms) {
  418. $this->exactTerms = $exactTerms;
  419. }
  420. public function getExactTerms() {
  421. return $this->exactTerms;
  422. }
  423. public function setLanguage($language) {
  424. $this->language = $language;
  425. }
  426. public function getLanguage() {
  427. return $this->language;
  428. }
  429. public function setHl($hl) {
  430. $this->hl = $hl;
  431. }
  432. public function getHl() {
  433. return $this->hl;
  434. }
  435. public function setTotalResults($totalResults) {
  436. $this->totalResults = $totalResults;
  437. }
  438. public function getTotalResults() {
  439. return $this->totalResults;
  440. }
  441. public function setLowRange($lowRange) {
  442. $this->lowRange = $lowRange;
  443. }
  444. public function getLowRange() {
  445. return $this->lowRange;
  446. }
  447. public function setCount($count) {
  448. $this->count = $count;
  449. }
  450. public function getCount() {
  451. return $this->count;
  452. }
  453. public function setImgSize($imgSize) {
  454. $this->imgSize = $imgSize;
  455. }
  456. public function getImgSize() {
  457. return $this->imgSize;
  458. }
  459. public function setImgColorType($imgColorType) {
  460. $this->imgColorType = $imgColorType;
  461. }
  462. public function getImgColorType() {
  463. return $this->imgColorType;
  464. }
  465. public function setRights($rights) {
  466. $this->rights = $rights;
  467. }
  468. public function getRights() {
  469. return $this->rights;
  470. }
  471. public function setStartIndex($startIndex) {
  472. $this->startIndex = $startIndex;
  473. }
  474. public function getStartIndex() {
  475. return $this->startIndex;
  476. }
  477. public function setExcludeTerms($excludeTerms) {
  478. $this->excludeTerms = $excludeTerms;
  479. }
  480. public function getExcludeTerms() {
  481. return $this->excludeTerms;
  482. }
  483. public function setFilter($filter) {
  484. $this->filter = $filter;
  485. }
  486. public function getFilter() {
  487. return $this->filter;
  488. }
  489. public function setLinkSite($linkSite) {
  490. $this->linkSite = $linkSite;
  491. }
  492. public function getLinkSite() {
  493. return $this->linkSite;
  494. }
  495. public function setSiteSearchFilter($siteSearchFilter) {
  496. $this->siteSearchFilter = $siteSearchFilter;
  497. }
  498. public function getSiteSearchFilter() {
  499. return $this->siteSearchFilter;
  500. }
  501. }
  502. class Google_Result extends Google_Model {
  503. public $snippet;
  504. public $kind;
  505. protected $__labelsType = 'Google_ResultLabels';
  506. protected $__labelsDataType = 'array';
  507. public $labels;
  508. public $title;
  509. public $displayLink;
  510. public $cacheId;
  511. public $formattedUrl;
  512. public $htmlFormattedUrl;
  513. public $pagemap;
  514. public $htmlTitle;
  515. public $htmlSnippet;
  516. public $link;
  517. protected $__imageType = 'Google_ResultImage';
  518. protected $__imageDataType = '';
  519. public $image;
  520. public $mime;
  521. public $fileFormat;
  522. public function setSnippet($snippet) {
  523. $this->snippet = $snippet;
  524. }
  525. public function getSnippet() {
  526. return $this->snippet;
  527. }
  528. public function setKind($kind) {
  529. $this->kind = $kind;
  530. }
  531. public function getKind() {
  532. return $this->kind;
  533. }
  534. public function setLabels(/* array(Google_ResultLabels) */ $labels) {
  535. $this->assertIsArray($labels, 'Google_ResultLabels', __METHOD__);
  536. $this->labels = $labels;
  537. }
  538. public function getLabels() {
  539. return $this->labels;
  540. }
  541. public function setTitle($title) {
  542. $this->title = $title;
  543. }
  544. public function getTitle() {
  545. return $this->title;
  546. }
  547. public function setDisplayLink($displayLink) {
  548. $this->displayLink = $displayLink;
  549. }
  550. public function getDisplayLink() {
  551. return $this->displayLink;
  552. }
  553. public function setCacheId($cacheId) {
  554. $this->cacheId = $cacheId;
  555. }
  556. public function getCacheId() {
  557. return $this->cacheId;
  558. }
  559. public function setFormattedUrl($formattedUrl) {
  560. $this->formattedUrl = $formattedUrl;
  561. }
  562. public function getFormattedUrl() {
  563. return $this->formattedUrl;
  564. }
  565. public function setHtmlFormattedUrl($htmlFormattedUrl) {
  566. $this->htmlFormattedUrl = $htmlFormattedUrl;
  567. }
  568. public function getHtmlFormattedUrl() {
  569. return $this->htmlFormattedUrl;
  570. }
  571. public function setPagemap($pagemap) {
  572. $this->pagemap = $pagemap;
  573. }
  574. public function getPagemap() {
  575. return $this->pagemap;
  576. }
  577. public function setHtmlTitle($htmlTitle) {
  578. $this->htmlTitle = $htmlTitle;
  579. }
  580. public function getHtmlTitle() {
  581. return $this->htmlTitle;
  582. }
  583. public function setHtmlSnippet($htmlSnippet) {
  584. $this->htmlSnippet = $htmlSnippet;
  585. }
  586. public function getHtmlSnippet() {
  587. return $this->htmlSnippet;
  588. }
  589. public function setLink($link) {
  590. $this->link = $link;
  591. }
  592. public function getLink() {
  593. return $this->link;
  594. }
  595. public function setImage(Google_ResultImage $image) {
  596. $this->image = $image;
  597. }
  598. public function getImage() {
  599. return $this->image;
  600. }
  601. public function setMime($mime) {
  602. $this->mime = $mime;
  603. }
  604. public function getMime() {
  605. return $this->mime;
  606. }
  607. public function setFileFormat($fileFormat) {
  608. $this->fileFormat = $fileFormat;
  609. }
  610. public function getFileFormat() {
  611. return $this->fileFormat;
  612. }
  613. }
  614. class Google_ResultImage extends Google_Model {
  615. public $thumbnailWidth;
  616. public $byteSize;
  617. public $height;
  618. public $width;
  619. public $contextLink;
  620. public $thumbnailLink;
  621. public $thumbnailHeight;
  622. public function setThumbnailWidth($thumbnailWidth) {
  623. $this->thumbnailWidth = $thumbnailWidth;
  624. }
  625. public function getThumbnailWidth() {
  626. return $this->thumbnailWidth;
  627. }
  628. public function setByteSize($byteSize) {
  629. $this->byteSize = $byteSize;
  630. }
  631. public function getByteSize() {
  632. return $this->byteSize;
  633. }
  634. public function setHeight($height) {
  635. $this->height = $height;
  636. }
  637. public function getHeight() {
  638. return $this->height;
  639. }
  640. public function setWidth($width) {
  641. $this->width = $width;
  642. }
  643. public function getWidth() {
  644. return $this->width;
  645. }
  646. public function setContextLink($contextLink) {
  647. $this->contextLink = $contextLink;
  648. }
  649. public function getContextLink() {
  650. return $this->contextLink;
  651. }
  652. public function setThumbnailLink($thumbnailLink) {
  653. $this->thumbnailLink = $thumbnailLink;
  654. }
  655. public function getThumbnailLink() {
  656. return $this->thumbnailLink;
  657. }
  658. public function setThumbnailHeight($thumbnailHeight) {
  659. $this->thumbnailHeight = $thumbnailHeight;
  660. }
  661. public function getThumbnailHeight() {
  662. return $this->thumbnailHeight;
  663. }
  664. }
  665. class Google_ResultLabels extends Google_Model {
  666. public $displayName;
  667. public $name;
  668. public function setDisplayName($displayName) {
  669. $this->displayName = $displayName;
  670. }
  671. public function getDisplayName() {
  672. return $this->displayName;
  673. }
  674. public function setName($name) {
  675. $this->name = $name;
  676. }
  677. public function getName() {
  678. return $this->name;
  679. }
  680. }
  681. class Google_Search extends Google_Model {
  682. protected $__promotionsType = 'Google_Promotion';
  683. protected $__promotionsDataType = 'array';
  684. public $promotions;
  685. public $kind;
  686. protected $__urlType = 'Google_SearchUrl';
  687. protected $__urlDataType = '';
  688. public $url;
  689. protected $__itemsType = 'Google_Result';
  690. protected $__itemsDataType = 'array';
  691. public $items;
  692. protected $__contextType = 'Google_Context';
  693. protected $__contextDataType = '';
  694. public $context;
  695. protected $__queriesType = 'Google_Query';
  696. protected $__queriesDataType = 'map';
  697. public $queries;
  698. protected $__spellingType = 'Google_SearchSpelling';
  699. protected $__spellingDataType = '';
  700. public $spelling;
  701. protected $__searchInformationType = 'Google_SearchSearchInformation';
  702. protected $__searchInformationDataType = '';
  703. public $searchInformation;
  704. public function setPromotions(/* array(Google_Promotion) */ $promotions) {
  705. $this->assertIsArray($promotions, 'Google_Promotion', __METHOD__);
  706. $this->promotions = $promotions;
  707. }
  708. public function getPromotions() {
  709. return $this->promotions;
  710. }
  711. public function setKind($kind) {
  712. $this->kind = $kind;
  713. }
  714. public function getKind() {
  715. return $this->kind;
  716. }
  717. public function setUrl(Google_SearchUrl $url) {
  718. $this->url = $url;
  719. }
  720. public function getUrl() {
  721. return $this->url;
  722. }
  723. public function setItems(/* array(Google_Result) */ $items) {
  724. $this->assertIsArray($items, 'Google_Result', __METHOD__);
  725. $this->items = $items;
  726. }
  727. public function getItems() {
  728. return $this->items;
  729. }
  730. public function setContext(Google_Context $context) {
  731. $this->context = $context;
  732. }
  733. public function getContext() {
  734. return $this->context;
  735. }
  736. public function setQueries(Google_Query $queries) {
  737. $this->queries = $queries;
  738. }
  739. public function getQueries() {
  740. return $this->queries;
  741. }
  742. public function setSpelling(Google_SearchSpelling $spelling) {
  743. $this->spelling = $spelling;
  744. }
  745. public function getSpelling() {
  746. return $this->spelling;
  747. }
  748. public function setSearchInformation(Google_SearchSearchInformation $searchInformation) {
  749. $this->searchInformation = $searchInformation;
  750. }
  751. public function getSearchInformation() {
  752. return $this->searchInformation;
  753. }
  754. }
  755. class Google_SearchSearchInformation extends Google_Model {
  756. public $formattedSearchTime;
  757. public $formattedTotalResults;
  758. public $totalResults;
  759. public $searchTime;
  760. public function setFormattedSearchTime($formattedSearchTime) {
  761. $this->formattedSearchTime = $formattedSearchTime;
  762. }
  763. public function getFormattedSearchTime() {
  764. return $this->formattedSearchTime;
  765. }
  766. public function setFormattedTotalResults($formattedTotalResults) {
  767. $this->formattedTotalResults = $formattedTotalResults;
  768. }
  769. public function getFormattedTotalResults() {
  770. return $this->formattedTotalResults;
  771. }
  772. public function setTotalResults($totalResults) {
  773. $this->totalResults = $totalResults;
  774. }
  775. public function getTotalResults() {
  776. return $this->totalResults;
  777. }
  778. public function setSearchTime($searchTime) {
  779. $this->searchTime = $searchTime;
  780. }
  781. public function getSearchTime() {
  782. return $this->searchTime;
  783. }
  784. }
  785. class Google_SearchSpelling extends Google_Model {
  786. public $correctedQuery;
  787. public $htmlCorrectedQuery;
  788. public function setCorrectedQuery($correctedQuery) {
  789. $this->correctedQuery = $correctedQuery;
  790. }
  791. public function getCorrectedQuery() {
  792. return $this->correctedQuery;
  793. }
  794. public function setHtmlCorrectedQuery($htmlCorrectedQuery) {
  795. $this->htmlCorrectedQuery = $htmlCorrectedQuery;
  796. }
  797. public function getHtmlCorrectedQuery() {
  798. return $this->htmlCorrectedQuery;
  799. }
  800. }
  801. class Google_SearchUrl extends Google_Model {
  802. public $type;
  803. public $template;
  804. public function setType($type) {
  805. $this->type = $type;
  806. }
  807. public function getType() {
  808. return $this->type;
  809. }
  810. public function setTemplate($template) {
  811. $this->template = $template;
  812. }
  813. public function getTemplate() {
  814. return $this->template;
  815. }
  816. }