PluginProbe
Authorizer / 2.6.10
Authorizer v2.6.10
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 / vendor / google-api-php-client / src / Google / Service / Pagespeedonline.php

Pagespeedonline.php in Authorizer 2.6.10, at vendor/google-api-php-client/src/Google/Service/Pagespeedonline.php

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