Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

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