PluginProbe
Authorizer / 2.2
Authorizer v2.2
3.15.3 3.15.2 3.15.1 3.15.0 3.14.3 3.14.4 3.14.2 3.14.1 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.10 2.9.11 2.9.12 2.9.13 2.9.2 2.9.3 2.9.6 All 126 releases
authorizer / inc / google-api-php-client / src / Google / Service / Pagespeedonline.php

Pagespeedonline.php in Authorizer 2.2, at inc/google-api-php-client/src/Google/Service/Pagespeedonline.php

763 lines 16.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Copyright 2010 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18 /**
19 * Service definition for Pagespeedonline (v1).
20 *
21 * <p>
22 * Lets you analyze the performance of a web page and get tailored suggestions to make that page faster.
23 * </p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://developers.google.com/speed/docs/insights/v1/getting_started" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32 class Google_Service_Pagespeedonline extends Google_Service
33 {
34
35
36 public $pagespeedapi;
37
38
39 /**
40 * Constructs the internal representation of the Pagespeedonline service.
41 *
42 * @param Google_Client $client
43 */
44 public function __construct(Google_Client $client)
45 {
46 parent::__construct($client);
47 $this->servicePath = 'pagespeedonline/v1/';
48 $this->version = 'v1';
49 $this->serviceName = 'pagespeedonline';
50
51 $this->pagespeedapi = new Google_Service_Pagespeedonline_Pagespeedapi_Resource(
52 $this,
53 $this->serviceName,
54 'pagespeedapi',
55 array(
56 'methods' => array(
57 'runpagespeed' => array(
58 'path' => 'runPagespeed',
59 'httpMethod' => 'GET',
60 'parameters' => array(
61 'url' => array(
62 'location' => 'query',
63 'type' => 'string',
64 'required' => true,
65 ),
66 'screenshot' => array(
67 'location' => 'query',
68 'type' => 'boolean',
69 ),
70 'locale' => array(
71 'location' => 'query',
72 'type' => 'string',
73 ),
74 'snapshots' => array(
75 'location' => 'query',
76 'type' => 'boolean',
77 ),
78 'strategy' => array(
79 'location' => 'query',
80 'type' => 'string',
81 ),
82 'rule' => array(
83 'location' => 'query',
84 'type' => 'string',
85 'repeated' => true,
86 ),
87 'filter_third_party_resources' => array(
88 'location' => 'query',
89 'type' => 'boolean',
90 ),
91 ),
92 ),
93 )
94 )
95 );
96 }
97 }
98
99
100 /**
101 * The "pagespeedapi" collection of methods.
102 * Typical usage is:
103 * <code>
104 * $pagespeedonlineService = new Google_Service_Pagespeedonline(...);
105 * $pagespeedapi = $pagespeedonlineService->pagespeedapi;
106 * </code>
107 */
108 class Google_Service_Pagespeedonline_Pagespeedapi_Resource extends Google_Service_Resource
109 {
110
111 /**
112 * Runs Page Speed analysis on the page at the specified URL, and returns a Page
113 * Speed score, a list of suggestions to make that page faster, and other
114 * information. (pagespeedapi.runpagespeed)
115 *
116 * @param string $url
117 * The URL to fetch and analyze
118 * @param array $optParams Optional parameters.
119 *
120 * @opt_param bool screenshot
121 * Indicates if binary data containing a screenshot should be included
122 * @opt_param string locale
123 * The locale used to localize formatted results
124 * @opt_param bool snapshots
125 * Indicates if binary data containing snapshot images should be included
126 * @opt_param string strategy
127 * The analysis strategy to use
128 * @opt_param string rule
129 * A Page Speed rule to run; if none are given, all rules are run
130 * @opt_param bool filter_third_party_resources
131 * Indicates if third party resources should be filtered out before PageSpeed analysis.
132 * @return Google_Service_Pagespeedonline_Result
133 */
134 public function runpagespeed($url, $optParams = array())
135 {
136 $params = array('url' => $url);
137 $params = array_merge($params, $optParams);
138 return $this->call('runpagespeed', array($params), "Google_Service_Pagespeedonline_Result");
139 }
140 }
141
142
143
144
145 class Google_Service_Pagespeedonline_Result extends Google_Collection
146 {
147 protected $formattedResultsType = 'Google_Service_Pagespeedonline_ResultFormattedResults';
148 protected $formattedResultsDataType = '';
149 public $id;
150 public $invalidRules;
151 public $kind;
152 protected $pageStatsType = 'Google_Service_Pagespeedonline_ResultPageStats';
153 protected $pageStatsDataType = '';
154 public $responseCode;
155 public $score;
156 protected $screenshotType = 'Google_Service_Pagespeedonline_ResultScreenshot';
157 protected $screenshotDataType = '';
158 public $title;
159 protected $versionType = 'Google_Service_Pagespeedonline_ResultVersion';
160 protected $versionDataType = '';
161
162 public function setFormattedResults(Google_Service_Pagespeedonline_ResultFormattedResults $formattedResults)
163 {
164 $this->formattedResults = $formattedResults;
165 }
166
167 public function getFormattedResults()
168 {
169 return $this->formattedResults;
170 }
171
172 public function setId($id)
173 {
174 $this->id = $id;
175 }
176
177 public function getId()
178 {
179 return $this->id;
180 }
181
182 public function setInvalidRules($invalidRules)
183 {
184 $this->invalidRules = $invalidRules;
185 }
186
187 public function getInvalidRules()
188 {
189 return $this->invalidRules;
190 }
191
192 public function setKind($kind)
193 {
194 $this->kind = $kind;
195 }
196
197 public function getKind()
198 {
199 return $this->kind;
200 }
201
202 public function setPageStats(Google_Service_Pagespeedonline_ResultPageStats $pageStats)
203 {
204 $this->pageStats = $pageStats;
205 }
206
207 public function getPageStats()
208 {
209 return $this->pageStats;
210 }
211
212 public function setResponseCode($responseCode)
213 {
214 $this->responseCode = $responseCode;
215 }
216
217 public function getResponseCode()
218 {
219 return $this->responseCode;
220 }
221
222 public function setScore($score)
223 {
224 $this->score = $score;
225 }
226
227 public function getScore()
228 {
229 return $this->score;
230 }
231
232 public function setScreenshot(Google_Service_Pagespeedonline_ResultScreenshot $screenshot)
233 {
234 $this->screenshot = $screenshot;
235 }
236
237 public function getScreenshot()
238 {
239 return $this->screenshot;
240 }
241
242 public function setTitle($title)
243 {
244 $this->title = $title;
245 }
246
247 public function getTitle()
248 {
249 return $this->title;
250 }
251
252 public function setVersion(Google_Service_Pagespeedonline_ResultVersion $version)
253 {
254 $this->version = $version;
255 }
256
257 public function getVersion()
258 {
259 return $this->version;
260 }
261 }
262
263 class Google_Service_Pagespeedonline_ResultFormattedResults extends Google_Model
264 {
265 public $locale;
266 protected $ruleResultsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElement';
267 protected $ruleResultsDataType = 'map';
268
269 public function setLocale($locale)
270 {
271 $this->locale = $locale;
272 }
273
274 public function getLocale()
275 {
276 return $this->locale;
277 }
278
279 public function setRuleResults($ruleResults)
280 {
281 $this->ruleResults = $ruleResults;
282 }
283
284 public function getRuleResults()
285 {
286 return $this->ruleResults;
287 }
288 }
289
290 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElement extends Google_Collection
291 {
292 public $localizedRuleName;
293 public $ruleImpact;
294 protected $urlBlocksType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocks';
295 protected $urlBlocksDataType = 'array';
296
297 public function setLocalizedRuleName($localizedRuleName)
298 {
299 $this->localizedRuleName = $localizedRuleName;
300 }
301
302 public function getLocalizedRuleName()
303 {
304 return $this->localizedRuleName;
305 }
306
307 public function setRuleImpact($ruleImpact)
308 {
309 $this->ruleImpact = $ruleImpact;
310 }
311
312 public function getRuleImpact()
313 {
314 return $this->ruleImpact;
315 }
316
317 public function setUrlBlocks($urlBlocks)
318 {
319 $this->urlBlocks = $urlBlocks;
320 }
321
322 public function getUrlBlocks()
323 {
324 return $this->urlBlocks;
325 }
326 }
327
328 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocks extends Google_Collection
329 {
330 protected $headerType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksHeader';
331 protected $headerDataType = '';
332 protected $urlsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrls';
333 protected $urlsDataType = 'array';
334
335 public function setHeader(Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksHeader $header)
336 {
337 $this->header = $header;
338 }
339
340 public function getHeader()
341 {
342 return $this->header;
343 }
344
345 public function setUrls($urls)
346 {
347 $this->urls = $urls;
348 }
349
350 public function getUrls()
351 {
352 return $this->urls;
353 }
354 }
355
356 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksHeader extends Google_Collection
357 {
358 protected $argsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksHeaderArgs';
359 protected $argsDataType = 'array';
360 public $format;
361
362 public function setArgs($args)
363 {
364 $this->args = $args;
365 }
366
367 public function getArgs()
368 {
369 return $this->args;
370 }
371
372 public function setFormat($format)
373 {
374 $this->format = $format;
375 }
376
377 public function getFormat()
378 {
379 return $this->format;
380 }
381 }
382
383 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksHeaderArgs extends Google_Model
384 {
385 public $type;
386 public $value;
387
388 public function setType($type)
389 {
390 $this->type = $type;
391 }
392
393 public function getType()
394 {
395 return $this->type;
396 }
397
398 public function setValue($value)
399 {
400 $this->value = $value;
401 }
402
403 public function getValue()
404 {
405 return $this->value;
406 }
407 }
408
409 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrls extends Google_Collection
410 {
411 protected $detailsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsDetails';
412 protected $detailsDataType = 'array';
413 protected $resultType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsResult';
414 protected $resultDataType = '';
415
416 public function setDetails($details)
417 {
418 $this->details = $details;
419 }
420
421 public function getDetails()
422 {
423 return $this->details;
424 }
425
426 public function setResult(Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsResult $result)
427 {
428 $this->result = $result;
429 }
430
431 public function getResult()
432 {
433 return $this->result;
434 }
435 }
436
437 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsDetails extends Google_Collection
438 {
439 protected $argsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsDetailsArgs';
440 protected $argsDataType = 'array';
441 public $format;
442
443 public function setArgs($args)
444 {
445 $this->args = $args;
446 }
447
448 public function getArgs()
449 {
450 return $this->args;
451 }
452
453 public function setFormat($format)
454 {
455 $this->format = $format;
456 }
457
458 public function getFormat()
459 {
460 return $this->format;
461 }
462 }
463
464 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsDetailsArgs extends Google_Model
465 {
466 public $type;
467 public $value;
468
469 public function setType($type)
470 {
471 $this->type = $type;
472 }
473
474 public function getType()
475 {
476 return $this->type;
477 }
478
479 public function setValue($value)
480 {
481 $this->value = $value;
482 }
483
484 public function getValue()
485 {
486 return $this->value;
487 }
488 }
489
490 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsResult extends Google_Collection
491 {
492 protected $argsType = 'Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsResultArgs';
493 protected $argsDataType = 'array';
494 public $format;
495
496 public function setArgs($args)
497 {
498 $this->args = $args;
499 }
500
501 public function getArgs()
502 {
503 return $this->args;
504 }
505
506 public function setFormat($format)
507 {
508 $this->format = $format;
509 }
510
511 public function getFormat()
512 {
513 return $this->format;
514 }
515 }
516
517 class Google_Service_Pagespeedonline_ResultFormattedResultsRuleResultsElementUrlBlocksUrlsResultArgs extends Google_Model
518 {
519 public $type;
520 public $value;
521
522 public function setType($type)
523 {
524 $this->type = $type;
525 }
526
527 public function getType()
528 {
529 return $this->type;
530 }
531
532 public function setValue($value)
533 {
534 $this->value = $value;
535 }
536
537 public function getValue()
538 {
539 return $this->value;
540 }
541 }
542
543 class Google_Service_Pagespeedonline_ResultPageStats extends Google_Model
544 {
545 public $cssResponseBytes;
546 public $flashResponseBytes;
547 public $htmlResponseBytes;
548 public $imageResponseBytes;
549 public $javascriptResponseBytes;
550 public $numberCssResources;
551 public $numberHosts;
552 public $numberJsResources;
553 public $numberResources;
554 public $numberStaticResources;
555 public $otherResponseBytes;
556 public $textResponseBytes;
557 public $totalRequestBytes;
558
559 public function setCssResponseBytes($cssResponseBytes)
560 {
561 $this->cssResponseBytes = $cssResponseBytes;
562 }
563
564 public function getCssResponseBytes()
565 {
566 return $this->cssResponseBytes;
567 }
568
569 public function setFlashResponseBytes($flashResponseBytes)
570 {
571 $this->flashResponseBytes = $flashResponseBytes;
572 }
573
574 public function getFlashResponseBytes()
575 {
576 return $this->flashResponseBytes;
577 }
578
579 public function setHtmlResponseBytes($htmlResponseBytes)
580 {
581 $this->htmlResponseBytes = $htmlResponseBytes;
582 }
583
584 public function getHtmlResponseBytes()
585 {
586 return $this->htmlResponseBytes;
587 }
588
589 public function setImageResponseBytes($imageResponseBytes)
590 {
591 $this->imageResponseBytes = $imageResponseBytes;
592 }
593
594 public function getImageResponseBytes()
595 {
596 return $this->imageResponseBytes;
597 }
598
599 public function setJavascriptResponseBytes($javascriptResponseBytes)
600 {
601 $this->javascriptResponseBytes = $javascriptResponseBytes;
602 }
603
604 public function getJavascriptResponseBytes()
605 {
606 return $this->javascriptResponseBytes;
607 }
608
609 public function setNumberCssResources($numberCssResources)
610 {
611 $this->numberCssResources = $numberCssResources;
612 }
613
614 public function getNumberCssResources()
615 {
616 return $this->numberCssResources;
617 }
618
619 public function setNumberHosts($numberHosts)
620 {
621 $this->numberHosts = $numberHosts;
622 }
623
624 public function getNumberHosts()
625 {
626 return $this->numberHosts;
627 }
628
629 public function setNumberJsResources($numberJsResources)
630 {
631 $this->numberJsResources = $numberJsResources;
632 }
633
634 public function getNumberJsResources()
635 {
636 return $this->numberJsResources;
637 }
638
639 public function setNumberResources($numberResources)
640 {
641 $this->numberResources = $numberResources;
642 }
643
644 public function getNumberResources()
645 {
646 return $this->numberResources;
647 }
648
649 public function setNumberStaticResources($numberStaticResources)
650 {
651 $this->numberStaticResources = $numberStaticResources;
652 }
653
654 public function getNumberStaticResources()
655 {
656 return $this->numberStaticResources;
657 }
658
659 public function setOtherResponseBytes($otherResponseBytes)
660 {
661 $this->otherResponseBytes = $otherResponseBytes;
662 }
663
664 public function getOtherResponseBytes()
665 {
666 return $this->otherResponseBytes;
667 }
668
669 public function setTextResponseBytes($textResponseBytes)
670 {
671 $this->textResponseBytes = $textResponseBytes;
672 }
673
674 public function getTextResponseBytes()
675 {
676 return $this->textResponseBytes;
677 }
678
679 public function setTotalRequestBytes($totalRequestBytes)
680 {
681 $this->totalRequestBytes = $totalRequestBytes;
682 }
683
684 public function getTotalRequestBytes()
685 {
686 return $this->totalRequestBytes;
687 }
688 }
689
690 class Google_Service_Pagespeedonline_ResultScreenshot extends Google_Model
691 {
692 public $data;
693 public $height;
694 public $mimeType;
695 public $width;
696
697 public function setData($data)
698 {
699 $this->data = $data;
700 }
701
702 public function getData()
703 {
704 return $this->data;
705 }
706
707 public function setHeight($height)
708 {
709 $this->height = $height;
710 }
711
712 public function getHeight()
713 {
714 return $this->height;
715 }
716
717 public function setMimeType($mimeType)
718 {
719 $this->mimeType = $mimeType;
720 }
721
722 public function getMimeType()
723 {
724 return $this->mimeType;
725 }
726
727 public function setWidth($width)
728 {
729 $this->width = $width;
730 }
731
732 public function getWidth()
733 {
734 return $this->width;
735 }
736 }
737
738 class Google_Service_Pagespeedonline_ResultVersion extends Google_Model
739 {
740 public $major;
741 public $minor;
742
743 public function setMajor($major)
744 {
745 $this->major = $major;
746 }
747
748 public function getMajor()
749 {
750 return $this->major;
751 }
752
753 public function setMinor($minor)
754 {
755 $this->minor = $minor;
756 }
757
758 public function getMinor()
759 {
760 return $this->minor;
761 }
762 }
763