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