google-apis-pagespeedonline_v5 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-pagespeedonline_v5.rb +15 -0
- data/lib/google/apis/pagespeedonline_v5.rb +39 -0
- data/lib/google/apis/pagespeedonline_v5/classes.rb +851 -0
- data/lib/google/apis/pagespeedonline_v5/gem_version.rb +28 -0
- data/lib/google/apis/pagespeedonline_v5/representations.rb +361 -0
- data/lib/google/apis/pagespeedonline_v5/service.rb +115 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f694bb650edf0fa0dc1a11946efa5c271d156bd3144ef3296e0772965cfd24e0
|
4
|
+
data.tar.gz: b72c47a1dad00de8f1e978165ad7d07dd15270f0aa2e5162d66291f4649d988e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1af0d9ea0eff94491b989a0a5c71adc9e2404749c4f3fa9cb08861c48791599fff54c0c5626b9f156bd7b25b6a58c55f92dc9e3494dc514ef9c08b7940aec67f
|
7
|
+
data.tar.gz: 56c8a2d150aa922823a05d79316a135cce12578333b5f33d9db81bc3fd4fd4211953c9f63ab73798171736b0895b4178ca01a3bce5e77813205458ed38f2e1ab
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-pagespeedonline_v5
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/pagespeedonline_v5/*.rb
|
9
|
+
lib/google/apis/pagespeedonline_v5.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V5 of the PageSpeed Insights API
|
2
|
+
|
3
|
+
This is a simple client library for version V5 of the PageSpeed Insights API. It provides:
|
4
|
+
|
5
|
+
* A client object that connects to the HTTP/JSON REST endpoint for the service.
|
6
|
+
* Ruby objects for data structures related to the service.
|
7
|
+
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
|
8
|
+
* Control of retry, pagination, and timeouts.
|
9
|
+
|
10
|
+
Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
|
11
|
+
|
12
|
+
## Getting started
|
13
|
+
|
14
|
+
### Before you begin
|
15
|
+
|
16
|
+
There are a few setup steps you need to complete before you can use this library:
|
17
|
+
|
18
|
+
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
|
19
|
+
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
|
20
|
+
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/pagespeedonline.googleapis.com) in the console.
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'google-apis-pagespeedonline_v5', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-pagespeedonline_v5
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/pagespeedonline_v5"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::PagespeedonlineV5::PagespeedInsightsService.new
|
52
|
+
|
53
|
+
# Authenticate calls
|
54
|
+
client.authentication = # ... use the googleauth gem to create credentials
|
55
|
+
```
|
56
|
+
|
57
|
+
See the class reference docs for information on the methods you can call from a client.
|
58
|
+
|
59
|
+
## Documentation
|
60
|
+
|
61
|
+
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
|
+
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
|
+
|
66
|
+
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Pagespeedonline service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the PageSpeed Insights API, see the {Google::Apis::PagespeedonlineV5::PagespeedInsightsService class reference docs}.
|
69
|
+
|
70
|
+
## Which client should I use?
|
71
|
+
|
72
|
+
Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
|
73
|
+
|
74
|
+
This library, `google-apis-pagespeedonline_v5`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](https://developers.google.com/speed/docs/insights/v5/about) may provide guidance regarding the preferred client library to use.
|
83
|
+
|
84
|
+
## Supported Ruby versions
|
85
|
+
|
86
|
+
This library is supported on Ruby 2.5+.
|
87
|
+
|
88
|
+
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
|
93
|
+
|
94
|
+
## Support
|
95
|
+
|
96
|
+
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of 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,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "google/apis/pagespeedonline_v5"
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of 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,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/pagespeedonline_v5/service.rb'
|
16
|
+
require 'google/apis/pagespeedonline_v5/classes.rb'
|
17
|
+
require 'google/apis/pagespeedonline_v5/representations.rb'
|
18
|
+
require 'google/apis/pagespeedonline_v5/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# PageSpeed Insights API
|
23
|
+
#
|
24
|
+
# The PageSpeed Insights API lets you analyze the performance of your website
|
25
|
+
# with a simple API. It offers tailored suggestions for how you can optimize
|
26
|
+
# your site, and lets you easily integrate PageSpeed Insights analysis into your
|
27
|
+
# development tools and workflow.
|
28
|
+
#
|
29
|
+
# @see https://developers.google.com/speed/docs/insights/v5/about
|
30
|
+
module PagespeedonlineV5
|
31
|
+
# Version of the PageSpeed Insights API this client connects to.
|
32
|
+
# This is NOT the gem version.
|
33
|
+
VERSION = 'V5'
|
34
|
+
|
35
|
+
# Associate you with your personal info on Google
|
36
|
+
PENID = 'openid'
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,851 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of 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,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module PagespeedonlineV5
|
24
|
+
|
25
|
+
# A light reference to an audit by id, used to group and weight audits in a
|
26
|
+
# given category.
|
27
|
+
class AuditRefs
|
28
|
+
include Google::Apis::Core::Hashable
|
29
|
+
|
30
|
+
# The category group that the audit belongs to (optional).
|
31
|
+
# Corresponds to the JSON property `group`
|
32
|
+
# @return [String]
|
33
|
+
attr_accessor :group
|
34
|
+
|
35
|
+
# The audit ref id.
|
36
|
+
# Corresponds to the JSON property `id`
|
37
|
+
# @return [String]
|
38
|
+
attr_accessor :id
|
39
|
+
|
40
|
+
# The weight this audit's score has on the overall category score.
|
41
|
+
# Corresponds to the JSON property `weight`
|
42
|
+
# @return [Float]
|
43
|
+
attr_accessor :weight
|
44
|
+
|
45
|
+
def initialize(**args)
|
46
|
+
update!(**args)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Update properties of this object
|
50
|
+
def update!(**args)
|
51
|
+
@group = args[:group] if args.key?(:group)
|
52
|
+
@id = args[:id] if args.key?(:id)
|
53
|
+
@weight = args[:weight] if args.key?(:weight)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# A proportion of data in the total distribution, bucketed by a min/max
|
58
|
+
# percentage. Each bucket's range is bounded by min <= x < max, In millisecond.
|
59
|
+
class Bucket
|
60
|
+
include Google::Apis::Core::Hashable
|
61
|
+
|
62
|
+
# Upper bound for a bucket's range.
|
63
|
+
# Corresponds to the JSON property `max`
|
64
|
+
# @return [Fixnum]
|
65
|
+
attr_accessor :max
|
66
|
+
|
67
|
+
# Lower bound for a bucket's range.
|
68
|
+
# Corresponds to the JSON property `min`
|
69
|
+
# @return [Fixnum]
|
70
|
+
attr_accessor :min
|
71
|
+
|
72
|
+
# The proportion of data in this bucket.
|
73
|
+
# Corresponds to the JSON property `proportion`
|
74
|
+
# @return [Float]
|
75
|
+
attr_accessor :proportion
|
76
|
+
|
77
|
+
def initialize(**args)
|
78
|
+
update!(**args)
|
79
|
+
end
|
80
|
+
|
81
|
+
# Update properties of this object
|
82
|
+
def update!(**args)
|
83
|
+
@max = args[:max] if args.key?(:max)
|
84
|
+
@min = args[:min] if args.key?(:min)
|
85
|
+
@proportion = args[:proportion] if args.key?(:proportion)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# The categories in a Lighthouse run.
|
90
|
+
class Categories
|
91
|
+
include Google::Apis::Core::Hashable
|
92
|
+
|
93
|
+
# A Lighthouse category.
|
94
|
+
# Corresponds to the JSON property `accessibility`
|
95
|
+
# @return [Google::Apis::PagespeedonlineV5::LighthouseCategoryV5]
|
96
|
+
attr_accessor :accessibility
|
97
|
+
|
98
|
+
# A Lighthouse category.
|
99
|
+
# Corresponds to the JSON property `best-practices`
|
100
|
+
# @return [Google::Apis::PagespeedonlineV5::LighthouseCategoryV5]
|
101
|
+
attr_accessor :best_practices
|
102
|
+
|
103
|
+
# A Lighthouse category.
|
104
|
+
# Corresponds to the JSON property `performance`
|
105
|
+
# @return [Google::Apis::PagespeedonlineV5::LighthouseCategoryV5]
|
106
|
+
attr_accessor :performance
|
107
|
+
|
108
|
+
# A Lighthouse category.
|
109
|
+
# Corresponds to the JSON property `pwa`
|
110
|
+
# @return [Google::Apis::PagespeedonlineV5::LighthouseCategoryV5]
|
111
|
+
attr_accessor :pwa
|
112
|
+
|
113
|
+
# A Lighthouse category.
|
114
|
+
# Corresponds to the JSON property `seo`
|
115
|
+
# @return [Google::Apis::PagespeedonlineV5::LighthouseCategoryV5]
|
116
|
+
attr_accessor :seo
|
117
|
+
|
118
|
+
def initialize(**args)
|
119
|
+
update!(**args)
|
120
|
+
end
|
121
|
+
|
122
|
+
# Update properties of this object
|
123
|
+
def update!(**args)
|
124
|
+
@accessibility = args[:accessibility] if args.key?(:accessibility)
|
125
|
+
@best_practices = args[:best_practices] if args.key?(:best_practices)
|
126
|
+
@performance = args[:performance] if args.key?(:performance)
|
127
|
+
@pwa = args[:pwa] if args.key?(:pwa)
|
128
|
+
@seo = args[:seo] if args.key?(:seo)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# Message containing a category
|
133
|
+
class CategoryGroupV5
|
134
|
+
include Google::Apis::Core::Hashable
|
135
|
+
|
136
|
+
# The description of what the category is grouping
|
137
|
+
# Corresponds to the JSON property `description`
|
138
|
+
# @return [String]
|
139
|
+
attr_accessor :description
|
140
|
+
|
141
|
+
# The human readable title of the group
|
142
|
+
# Corresponds to the JSON property `title`
|
143
|
+
# @return [String]
|
144
|
+
attr_accessor :title
|
145
|
+
|
146
|
+
def initialize(**args)
|
147
|
+
update!(**args)
|
148
|
+
end
|
149
|
+
|
150
|
+
# Update properties of this object
|
151
|
+
def update!(**args)
|
152
|
+
@description = args[:description] if args.key?(:description)
|
153
|
+
@title = args[:title] if args.key?(:title)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# Message containing the configuration settings for the Lighthouse run.
|
158
|
+
class ConfigSettings
|
159
|
+
include Google::Apis::Core::Hashable
|
160
|
+
|
161
|
+
# How Lighthouse was run, e.g. from the Chrome extension or from the npm module.
|
162
|
+
# Corresponds to the JSON property `channel`
|
163
|
+
# @return [String]
|
164
|
+
attr_accessor :channel
|
165
|
+
|
166
|
+
# The form factor the emulation should use.
|
167
|
+
# Corresponds to the JSON property `emulatedFormFactor`
|
168
|
+
# @return [String]
|
169
|
+
attr_accessor :emulated_form_factor
|
170
|
+
|
171
|
+
# The locale setting.
|
172
|
+
# Corresponds to the JSON property `locale`
|
173
|
+
# @return [String]
|
174
|
+
attr_accessor :locale
|
175
|
+
|
176
|
+
# List of categories of audits the run should conduct.
|
177
|
+
# Corresponds to the JSON property `onlyCategories`
|
178
|
+
# @return [Object]
|
179
|
+
attr_accessor :only_categories
|
180
|
+
|
181
|
+
def initialize(**args)
|
182
|
+
update!(**args)
|
183
|
+
end
|
184
|
+
|
185
|
+
# Update properties of this object
|
186
|
+
def update!(**args)
|
187
|
+
@channel = args[:channel] if args.key?(:channel)
|
188
|
+
@emulated_form_factor = args[:emulated_form_factor] if args.key?(:emulated_form_factor)
|
189
|
+
@locale = args[:locale] if args.key?(:locale)
|
190
|
+
@only_categories = args[:only_categories] if args.key?(:only_categories)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
# Message containing environment configuration for a Lighthouse run.
|
195
|
+
class Environment
|
196
|
+
include Google::Apis::Core::Hashable
|
197
|
+
|
198
|
+
# The benchmark index number that indicates rough device class.
|
199
|
+
# Corresponds to the JSON property `benchmarkIndex`
|
200
|
+
# @return [Float]
|
201
|
+
attr_accessor :benchmark_index
|
202
|
+
|
203
|
+
# The user agent string of the version of Chrome used.
|
204
|
+
# Corresponds to the JSON property `hostUserAgent`
|
205
|
+
# @return [String]
|
206
|
+
attr_accessor :host_user_agent
|
207
|
+
|
208
|
+
# The user agent string that was sent over the network.
|
209
|
+
# Corresponds to the JSON property `networkUserAgent`
|
210
|
+
# @return [String]
|
211
|
+
attr_accessor :network_user_agent
|
212
|
+
|
213
|
+
def initialize(**args)
|
214
|
+
update!(**args)
|
215
|
+
end
|
216
|
+
|
217
|
+
# Update properties of this object
|
218
|
+
def update!(**args)
|
219
|
+
@benchmark_index = args[:benchmark_index] if args.key?(:benchmark_index)
|
220
|
+
@host_user_agent = args[:host_user_agent] if args.key?(:host_user_agent)
|
221
|
+
@network_user_agent = args[:network_user_agent] if args.key?(:network_user_agent)
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
# Message containing the i18n data for the LHR - Version 1.
|
226
|
+
class I18n
|
227
|
+
include Google::Apis::Core::Hashable
|
228
|
+
|
229
|
+
# Message holding the formatted strings used in the renderer.
|
230
|
+
# Corresponds to the JSON property `rendererFormattedStrings`
|
231
|
+
# @return [Google::Apis::PagespeedonlineV5::RendererFormattedStrings]
|
232
|
+
attr_accessor :renderer_formatted_strings
|
233
|
+
|
234
|
+
def initialize(**args)
|
235
|
+
update!(**args)
|
236
|
+
end
|
237
|
+
|
238
|
+
# Update properties of this object
|
239
|
+
def update!(**args)
|
240
|
+
@renderer_formatted_strings = args[:renderer_formatted_strings] if args.key?(:renderer_formatted_strings)
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
# An audit's result object in a Lighthouse result.
|
245
|
+
class LighthouseAuditResultV5
|
246
|
+
include Google::Apis::Core::Hashable
|
247
|
+
|
248
|
+
# The description of the audit.
|
249
|
+
# Corresponds to the JSON property `description`
|
250
|
+
# @return [String]
|
251
|
+
attr_accessor :description
|
252
|
+
|
253
|
+
# Freeform details section of the audit.
|
254
|
+
# Corresponds to the JSON property `details`
|
255
|
+
# @return [Hash<String,Object>]
|
256
|
+
attr_accessor :details
|
257
|
+
|
258
|
+
# The value that should be displayed on the UI for this audit.
|
259
|
+
# Corresponds to the JSON property `displayValue`
|
260
|
+
# @return [String]
|
261
|
+
attr_accessor :display_value
|
262
|
+
|
263
|
+
# An error message from a thrown error inside the audit.
|
264
|
+
# Corresponds to the JSON property `errorMessage`
|
265
|
+
# @return [String]
|
266
|
+
attr_accessor :error_message
|
267
|
+
|
268
|
+
# An explanation of the errors in the audit.
|
269
|
+
# Corresponds to the JSON property `explanation`
|
270
|
+
# @return [String]
|
271
|
+
attr_accessor :explanation
|
272
|
+
|
273
|
+
# The audit's id.
|
274
|
+
# Corresponds to the JSON property `id`
|
275
|
+
# @return [String]
|
276
|
+
attr_accessor :id
|
277
|
+
|
278
|
+
# A numeric value that has a meaning specific to the audit, e.g. the number of
|
279
|
+
# nodes in the DOM or the timestamp of a specific load event. More information
|
280
|
+
# can be found in the audit details, if present.
|
281
|
+
# Corresponds to the JSON property `numericValue`
|
282
|
+
# @return [Float]
|
283
|
+
attr_accessor :numeric_value
|
284
|
+
|
285
|
+
# The score of the audit, can be null.
|
286
|
+
# Corresponds to the JSON property `score`
|
287
|
+
# @return [Object]
|
288
|
+
attr_accessor :score
|
289
|
+
|
290
|
+
# The enumerated score display mode.
|
291
|
+
# Corresponds to the JSON property `scoreDisplayMode`
|
292
|
+
# @return [String]
|
293
|
+
attr_accessor :score_display_mode
|
294
|
+
|
295
|
+
# The human readable title.
|
296
|
+
# Corresponds to the JSON property `title`
|
297
|
+
# @return [String]
|
298
|
+
attr_accessor :title
|
299
|
+
|
300
|
+
# Possible warnings that occurred in the audit, can be null.
|
301
|
+
# Corresponds to the JSON property `warnings`
|
302
|
+
# @return [Object]
|
303
|
+
attr_accessor :warnings
|
304
|
+
|
305
|
+
def initialize(**args)
|
306
|
+
update!(**args)
|
307
|
+
end
|
308
|
+
|
309
|
+
# Update properties of this object
|
310
|
+
def update!(**args)
|
311
|
+
@description = args[:description] if args.key?(:description)
|
312
|
+
@details = args[:details] if args.key?(:details)
|
313
|
+
@display_value = args[:display_value] if args.key?(:display_value)
|
314
|
+
@error_message = args[:error_message] if args.key?(:error_message)
|
315
|
+
@explanation = args[:explanation] if args.key?(:explanation)
|
316
|
+
@id = args[:id] if args.key?(:id)
|
317
|
+
@numeric_value = args[:numeric_value] if args.key?(:numeric_value)
|
318
|
+
@score = args[:score] if args.key?(:score)
|
319
|
+
@score_display_mode = args[:score_display_mode] if args.key?(:score_display_mode)
|
320
|
+
@title = args[:title] if args.key?(:title)
|
321
|
+
@warnings = args[:warnings] if args.key?(:warnings)
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
# A Lighthouse category.
|
326
|
+
class LighthouseCategoryV5
|
327
|
+
include Google::Apis::Core::Hashable
|
328
|
+
|
329
|
+
# An array of references to all the audit members of this category.
|
330
|
+
# Corresponds to the JSON property `auditRefs`
|
331
|
+
# @return [Array<Google::Apis::PagespeedonlineV5::AuditRefs>]
|
332
|
+
attr_accessor :audit_refs
|
333
|
+
|
334
|
+
# A more detailed description of the category and its importance.
|
335
|
+
# Corresponds to the JSON property `description`
|
336
|
+
# @return [String]
|
337
|
+
attr_accessor :description
|
338
|
+
|
339
|
+
# The string identifier of the category.
|
340
|
+
# Corresponds to the JSON property `id`
|
341
|
+
# @return [String]
|
342
|
+
attr_accessor :id
|
343
|
+
|
344
|
+
# A description for the manual audits in the category.
|
345
|
+
# Corresponds to the JSON property `manualDescription`
|
346
|
+
# @return [String]
|
347
|
+
attr_accessor :manual_description
|
348
|
+
|
349
|
+
# The overall score of the category, the weighted average of all its audits. (
|
350
|
+
# The category's score, can be null.)
|
351
|
+
# Corresponds to the JSON property `score`
|
352
|
+
# @return [Object]
|
353
|
+
attr_accessor :score
|
354
|
+
|
355
|
+
# The human-friendly name of the category.
|
356
|
+
# Corresponds to the JSON property `title`
|
357
|
+
# @return [String]
|
358
|
+
attr_accessor :title
|
359
|
+
|
360
|
+
def initialize(**args)
|
361
|
+
update!(**args)
|
362
|
+
end
|
363
|
+
|
364
|
+
# Update properties of this object
|
365
|
+
def update!(**args)
|
366
|
+
@audit_refs = args[:audit_refs] if args.key?(:audit_refs)
|
367
|
+
@description = args[:description] if args.key?(:description)
|
368
|
+
@id = args[:id] if args.key?(:id)
|
369
|
+
@manual_description = args[:manual_description] if args.key?(:manual_description)
|
370
|
+
@score = args[:score] if args.key?(:score)
|
371
|
+
@title = args[:title] if args.key?(:title)
|
372
|
+
end
|
373
|
+
end
|
374
|
+
|
375
|
+
# The Lighthouse result object.
|
376
|
+
class LighthouseResultV5
|
377
|
+
include Google::Apis::Core::Hashable
|
378
|
+
|
379
|
+
# Map of audits in the LHR.
|
380
|
+
# Corresponds to the JSON property `audits`
|
381
|
+
# @return [Hash<String,Google::Apis::PagespeedonlineV5::LighthouseAuditResultV5>]
|
382
|
+
attr_accessor :audits
|
383
|
+
|
384
|
+
# The categories in a Lighthouse run.
|
385
|
+
# Corresponds to the JSON property `categories`
|
386
|
+
# @return [Google::Apis::PagespeedonlineV5::Categories]
|
387
|
+
attr_accessor :categories
|
388
|
+
|
389
|
+
# Map of category groups in the LHR.
|
390
|
+
# Corresponds to the JSON property `categoryGroups`
|
391
|
+
# @return [Hash<String,Google::Apis::PagespeedonlineV5::CategoryGroupV5>]
|
392
|
+
attr_accessor :category_groups
|
393
|
+
|
394
|
+
# Message containing the configuration settings for the Lighthouse run.
|
395
|
+
# Corresponds to the JSON property `configSettings`
|
396
|
+
# @return [Google::Apis::PagespeedonlineV5::ConfigSettings]
|
397
|
+
attr_accessor :config_settings
|
398
|
+
|
399
|
+
# Message containing environment configuration for a Lighthouse run.
|
400
|
+
# Corresponds to the JSON property `environment`
|
401
|
+
# @return [Google::Apis::PagespeedonlineV5::Environment]
|
402
|
+
attr_accessor :environment
|
403
|
+
|
404
|
+
# The time that this run was fetched.
|
405
|
+
# Corresponds to the JSON property `fetchTime`
|
406
|
+
# @return [String]
|
407
|
+
attr_accessor :fetch_time
|
408
|
+
|
409
|
+
# The final resolved url that was audited.
|
410
|
+
# Corresponds to the JSON property `finalUrl`
|
411
|
+
# @return [String]
|
412
|
+
attr_accessor :final_url
|
413
|
+
|
414
|
+
# Message containing the i18n data for the LHR - Version 1.
|
415
|
+
# Corresponds to the JSON property `i18n`
|
416
|
+
# @return [Google::Apis::PagespeedonlineV5::I18n]
|
417
|
+
attr_accessor :i18n
|
418
|
+
|
419
|
+
# The lighthouse version that was used to generate this LHR.
|
420
|
+
# Corresponds to the JSON property `lighthouseVersion`
|
421
|
+
# @return [String]
|
422
|
+
attr_accessor :lighthouse_version
|
423
|
+
|
424
|
+
# The original requested url.
|
425
|
+
# Corresponds to the JSON property `requestedUrl`
|
426
|
+
# @return [String]
|
427
|
+
attr_accessor :requested_url
|
428
|
+
|
429
|
+
# List of all run warnings in the LHR. Will always output to at least `[]`.
|
430
|
+
# Corresponds to the JSON property `runWarnings`
|
431
|
+
# @return [Array<Object>]
|
432
|
+
attr_accessor :run_warnings
|
433
|
+
|
434
|
+
# Message containing a runtime error config.
|
435
|
+
# Corresponds to the JSON property `runtimeError`
|
436
|
+
# @return [Google::Apis::PagespeedonlineV5::RuntimeError]
|
437
|
+
attr_accessor :runtime_error
|
438
|
+
|
439
|
+
# The Stack Pack advice strings.
|
440
|
+
# Corresponds to the JSON property `stackPacks`
|
441
|
+
# @return [Array<Google::Apis::PagespeedonlineV5::StackPack>]
|
442
|
+
attr_accessor :stack_packs
|
443
|
+
|
444
|
+
# Message containing the performance timing data for the Lighthouse run.
|
445
|
+
# Corresponds to the JSON property `timing`
|
446
|
+
# @return [Google::Apis::PagespeedonlineV5::Timing]
|
447
|
+
attr_accessor :timing
|
448
|
+
|
449
|
+
# The user agent that was used to run this LHR.
|
450
|
+
# Corresponds to the JSON property `userAgent`
|
451
|
+
# @return [String]
|
452
|
+
attr_accessor :user_agent
|
453
|
+
|
454
|
+
def initialize(**args)
|
455
|
+
update!(**args)
|
456
|
+
end
|
457
|
+
|
458
|
+
# Update properties of this object
|
459
|
+
def update!(**args)
|
460
|
+
@audits = args[:audits] if args.key?(:audits)
|
461
|
+
@categories = args[:categories] if args.key?(:categories)
|
462
|
+
@category_groups = args[:category_groups] if args.key?(:category_groups)
|
463
|
+
@config_settings = args[:config_settings] if args.key?(:config_settings)
|
464
|
+
@environment = args[:environment] if args.key?(:environment)
|
465
|
+
@fetch_time = args[:fetch_time] if args.key?(:fetch_time)
|
466
|
+
@final_url = args[:final_url] if args.key?(:final_url)
|
467
|
+
@i18n = args[:i18n] if args.key?(:i18n)
|
468
|
+
@lighthouse_version = args[:lighthouse_version] if args.key?(:lighthouse_version)
|
469
|
+
@requested_url = args[:requested_url] if args.key?(:requested_url)
|
470
|
+
@run_warnings = args[:run_warnings] if args.key?(:run_warnings)
|
471
|
+
@runtime_error = args[:runtime_error] if args.key?(:runtime_error)
|
472
|
+
@stack_packs = args[:stack_packs] if args.key?(:stack_packs)
|
473
|
+
@timing = args[:timing] if args.key?(:timing)
|
474
|
+
@user_agent = args[:user_agent] if args.key?(:user_agent)
|
475
|
+
end
|
476
|
+
end
|
477
|
+
|
478
|
+
# The CrUX loading experience object that contains CrUX data breakdowns.
|
479
|
+
class PagespeedApiLoadingExperienceV5
|
480
|
+
include Google::Apis::Core::Hashable
|
481
|
+
|
482
|
+
# The url, pattern or origin which the metrics are on.
|
483
|
+
# Corresponds to the JSON property `id`
|
484
|
+
# @return [String]
|
485
|
+
attr_accessor :id
|
486
|
+
|
487
|
+
# The requested URL, which may differ from the resolved "id".
|
488
|
+
# Corresponds to the JSON property `initial_url`
|
489
|
+
# @return [String]
|
490
|
+
attr_accessor :initial_url
|
491
|
+
|
492
|
+
# The map of .
|
493
|
+
# Corresponds to the JSON property `metrics`
|
494
|
+
# @return [Hash<String,Google::Apis::PagespeedonlineV5::UserPageLoadMetricV5>]
|
495
|
+
attr_accessor :metrics
|
496
|
+
|
497
|
+
# True if the result is an origin fallback from a page, false otherwise.
|
498
|
+
# Corresponds to the JSON property `origin_fallback`
|
499
|
+
# @return [Boolean]
|
500
|
+
attr_accessor :origin_fallback
|
501
|
+
alias_method :origin_fallback?, :origin_fallback
|
502
|
+
|
503
|
+
# The human readable speed "category" of the id.
|
504
|
+
# Corresponds to the JSON property `overall_category`
|
505
|
+
# @return [String]
|
506
|
+
attr_accessor :overall_category
|
507
|
+
|
508
|
+
def initialize(**args)
|
509
|
+
update!(**args)
|
510
|
+
end
|
511
|
+
|
512
|
+
# Update properties of this object
|
513
|
+
def update!(**args)
|
514
|
+
@id = args[:id] if args.key?(:id)
|
515
|
+
@initial_url = args[:initial_url] if args.key?(:initial_url)
|
516
|
+
@metrics = args[:metrics] if args.key?(:metrics)
|
517
|
+
@origin_fallback = args[:origin_fallback] if args.key?(:origin_fallback)
|
518
|
+
@overall_category = args[:overall_category] if args.key?(:overall_category)
|
519
|
+
end
|
520
|
+
end
|
521
|
+
|
522
|
+
# The Pagespeed API response object.
|
523
|
+
class PagespeedApiPagespeedResponseV5
|
524
|
+
include Google::Apis::Core::Hashable
|
525
|
+
|
526
|
+
# The UTC timestamp of this analysis.
|
527
|
+
# Corresponds to the JSON property `analysisUTCTimestamp`
|
528
|
+
# @return [String]
|
529
|
+
attr_accessor :analysis_utc_timestamp
|
530
|
+
|
531
|
+
# The captcha verify result
|
532
|
+
# Corresponds to the JSON property `captchaResult`
|
533
|
+
# @return [String]
|
534
|
+
attr_accessor :captcha_result
|
535
|
+
|
536
|
+
# Canonicalized and final URL for the document, after following page redirects (
|
537
|
+
# if any).
|
538
|
+
# Corresponds to the JSON property `id`
|
539
|
+
# @return [String]
|
540
|
+
attr_accessor :id
|
541
|
+
|
542
|
+
# Kind of result.
|
543
|
+
# Corresponds to the JSON property `kind`
|
544
|
+
# @return [String]
|
545
|
+
attr_accessor :kind
|
546
|
+
|
547
|
+
# The Lighthouse result object.
|
548
|
+
# Corresponds to the JSON property `lighthouseResult`
|
549
|
+
# @return [Google::Apis::PagespeedonlineV5::LighthouseResultV5]
|
550
|
+
attr_accessor :lighthouse_result
|
551
|
+
|
552
|
+
# The CrUX loading experience object that contains CrUX data breakdowns.
|
553
|
+
# Corresponds to the JSON property `loadingExperience`
|
554
|
+
# @return [Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5]
|
555
|
+
attr_accessor :loading_experience
|
556
|
+
|
557
|
+
# The CrUX loading experience object that contains CrUX data breakdowns.
|
558
|
+
# Corresponds to the JSON property `originLoadingExperience`
|
559
|
+
# @return [Google::Apis::PagespeedonlineV5::PagespeedApiLoadingExperienceV5]
|
560
|
+
attr_accessor :origin_loading_experience
|
561
|
+
|
562
|
+
# The Pagespeed Version object.
|
563
|
+
# Corresponds to the JSON property `version`
|
564
|
+
# @return [Google::Apis::PagespeedonlineV5::PagespeedVersion]
|
565
|
+
attr_accessor :version
|
566
|
+
|
567
|
+
def initialize(**args)
|
568
|
+
update!(**args)
|
569
|
+
end
|
570
|
+
|
571
|
+
# Update properties of this object
|
572
|
+
def update!(**args)
|
573
|
+
@analysis_utc_timestamp = args[:analysis_utc_timestamp] if args.key?(:analysis_utc_timestamp)
|
574
|
+
@captcha_result = args[:captcha_result] if args.key?(:captcha_result)
|
575
|
+
@id = args[:id] if args.key?(:id)
|
576
|
+
@kind = args[:kind] if args.key?(:kind)
|
577
|
+
@lighthouse_result = args[:lighthouse_result] if args.key?(:lighthouse_result)
|
578
|
+
@loading_experience = args[:loading_experience] if args.key?(:loading_experience)
|
579
|
+
@origin_loading_experience = args[:origin_loading_experience] if args.key?(:origin_loading_experience)
|
580
|
+
@version = args[:version] if args.key?(:version)
|
581
|
+
end
|
582
|
+
end
|
583
|
+
|
584
|
+
# The Pagespeed Version object.
|
585
|
+
class PagespeedVersion
|
586
|
+
include Google::Apis::Core::Hashable
|
587
|
+
|
588
|
+
# The major version number of PageSpeed used to generate these results.
|
589
|
+
# Corresponds to the JSON property `major`
|
590
|
+
# @return [String]
|
591
|
+
attr_accessor :major
|
592
|
+
|
593
|
+
# The minor version number of PageSpeed used to generate these results.
|
594
|
+
# Corresponds to the JSON property `minor`
|
595
|
+
# @return [String]
|
596
|
+
attr_accessor :minor
|
597
|
+
|
598
|
+
def initialize(**args)
|
599
|
+
update!(**args)
|
600
|
+
end
|
601
|
+
|
602
|
+
# Update properties of this object
|
603
|
+
def update!(**args)
|
604
|
+
@major = args[:major] if args.key?(:major)
|
605
|
+
@minor = args[:minor] if args.key?(:minor)
|
606
|
+
end
|
607
|
+
end
|
608
|
+
|
609
|
+
# Message holding the formatted strings used in the renderer.
|
610
|
+
class RendererFormattedStrings
|
611
|
+
include Google::Apis::Core::Hashable
|
612
|
+
|
613
|
+
# The tooltip text on an expandable chevron icon.
|
614
|
+
# Corresponds to the JSON property `auditGroupExpandTooltip`
|
615
|
+
# @return [String]
|
616
|
+
attr_accessor :audit_group_expand_tooltip
|
617
|
+
|
618
|
+
# The label for the initial request in a critical request chain.
|
619
|
+
# Corresponds to the JSON property `crcInitialNavigation`
|
620
|
+
# @return [String]
|
621
|
+
attr_accessor :crc_initial_navigation
|
622
|
+
|
623
|
+
# The label for values shown in the summary of critical request chains.
|
624
|
+
# Corresponds to the JSON property `crcLongestDurationLabel`
|
625
|
+
# @return [String]
|
626
|
+
attr_accessor :crc_longest_duration_label
|
627
|
+
|
628
|
+
# The label shown next to an audit or metric that has had an error.
|
629
|
+
# Corresponds to the JSON property `errorLabel`
|
630
|
+
# @return [String]
|
631
|
+
attr_accessor :error_label
|
632
|
+
|
633
|
+
# The error string shown next to an erroring audit.
|
634
|
+
# Corresponds to the JSON property `errorMissingAuditInfo`
|
635
|
+
# @return [String]
|
636
|
+
attr_accessor :error_missing_audit_info
|
637
|
+
|
638
|
+
# The title of the lab data performance category.
|
639
|
+
# Corresponds to the JSON property `labDataTitle`
|
640
|
+
# @return [String]
|
641
|
+
attr_accessor :lab_data_title
|
642
|
+
|
643
|
+
# The disclaimer shown under performance explaning that the network can vary.
|
644
|
+
# Corresponds to the JSON property `lsPerformanceCategoryDescription`
|
645
|
+
# @return [String]
|
646
|
+
attr_accessor :ls_performance_category_description
|
647
|
+
|
648
|
+
# The heading shown above a list of audits that were not computerd in the run.
|
649
|
+
# Corresponds to the JSON property `manualAuditsGroupTitle`
|
650
|
+
# @return [String]
|
651
|
+
attr_accessor :manual_audits_group_title
|
652
|
+
|
653
|
+
# The heading shown above a list of audits that do not apply to a page.
|
654
|
+
# Corresponds to the JSON property `notApplicableAuditsGroupTitle`
|
655
|
+
# @return [String]
|
656
|
+
attr_accessor :not_applicable_audits_group_title
|
657
|
+
|
658
|
+
# The heading for the estimated page load savings opportunity of an audit.
|
659
|
+
# Corresponds to the JSON property `opportunityResourceColumnLabel`
|
660
|
+
# @return [String]
|
661
|
+
attr_accessor :opportunity_resource_column_label
|
662
|
+
|
663
|
+
# The heading for the estimated page load savings of opportunity audits.
|
664
|
+
# Corresponds to the JSON property `opportunitySavingsColumnLabel`
|
665
|
+
# @return [String]
|
666
|
+
attr_accessor :opportunity_savings_column_label
|
667
|
+
|
668
|
+
# The heading that is shown above a list of audits that are passing.
|
669
|
+
# Corresponds to the JSON property `passedAuditsGroupTitle`
|
670
|
+
# @return [String]
|
671
|
+
attr_accessor :passed_audits_group_title
|
672
|
+
|
673
|
+
# The label that explains the score gauges scale (0-49, 50-89, 90-100).
|
674
|
+
# Corresponds to the JSON property `scorescaleLabel`
|
675
|
+
# @return [String]
|
676
|
+
attr_accessor :scorescale_label
|
677
|
+
|
678
|
+
# The label shown preceding important warnings that may have invalidated an
|
679
|
+
# entire report.
|
680
|
+
# Corresponds to the JSON property `toplevelWarningsMessage`
|
681
|
+
# @return [String]
|
682
|
+
attr_accessor :toplevel_warnings_message
|
683
|
+
|
684
|
+
# The disclaimer shown below a performance metric value.
|
685
|
+
# Corresponds to the JSON property `varianceDisclaimer`
|
686
|
+
# @return [String]
|
687
|
+
attr_accessor :variance_disclaimer
|
688
|
+
|
689
|
+
# The label shown above a bulleted list of warnings.
|
690
|
+
# Corresponds to the JSON property `warningHeader`
|
691
|
+
# @return [String]
|
692
|
+
attr_accessor :warning_header
|
693
|
+
|
694
|
+
def initialize(**args)
|
695
|
+
update!(**args)
|
696
|
+
end
|
697
|
+
|
698
|
+
# Update properties of this object
|
699
|
+
def update!(**args)
|
700
|
+
@audit_group_expand_tooltip = args[:audit_group_expand_tooltip] if args.key?(:audit_group_expand_tooltip)
|
701
|
+
@crc_initial_navigation = args[:crc_initial_navigation] if args.key?(:crc_initial_navigation)
|
702
|
+
@crc_longest_duration_label = args[:crc_longest_duration_label] if args.key?(:crc_longest_duration_label)
|
703
|
+
@error_label = args[:error_label] if args.key?(:error_label)
|
704
|
+
@error_missing_audit_info = args[:error_missing_audit_info] if args.key?(:error_missing_audit_info)
|
705
|
+
@lab_data_title = args[:lab_data_title] if args.key?(:lab_data_title)
|
706
|
+
@ls_performance_category_description = args[:ls_performance_category_description] if args.key?(:ls_performance_category_description)
|
707
|
+
@manual_audits_group_title = args[:manual_audits_group_title] if args.key?(:manual_audits_group_title)
|
708
|
+
@not_applicable_audits_group_title = args[:not_applicable_audits_group_title] if args.key?(:not_applicable_audits_group_title)
|
709
|
+
@opportunity_resource_column_label = args[:opportunity_resource_column_label] if args.key?(:opportunity_resource_column_label)
|
710
|
+
@opportunity_savings_column_label = args[:opportunity_savings_column_label] if args.key?(:opportunity_savings_column_label)
|
711
|
+
@passed_audits_group_title = args[:passed_audits_group_title] if args.key?(:passed_audits_group_title)
|
712
|
+
@scorescale_label = args[:scorescale_label] if args.key?(:scorescale_label)
|
713
|
+
@toplevel_warnings_message = args[:toplevel_warnings_message] if args.key?(:toplevel_warnings_message)
|
714
|
+
@variance_disclaimer = args[:variance_disclaimer] if args.key?(:variance_disclaimer)
|
715
|
+
@warning_header = args[:warning_header] if args.key?(:warning_header)
|
716
|
+
end
|
717
|
+
end
|
718
|
+
|
719
|
+
# Message containing a runtime error config.
|
720
|
+
class RuntimeError
|
721
|
+
include Google::Apis::Core::Hashable
|
722
|
+
|
723
|
+
# The enumerated Lighthouse Error code.
|
724
|
+
# Corresponds to the JSON property `code`
|
725
|
+
# @return [String]
|
726
|
+
attr_accessor :code
|
727
|
+
|
728
|
+
# A human readable message explaining the error code.
|
729
|
+
# Corresponds to the JSON property `message`
|
730
|
+
# @return [String]
|
731
|
+
attr_accessor :message
|
732
|
+
|
733
|
+
def initialize(**args)
|
734
|
+
update!(**args)
|
735
|
+
end
|
736
|
+
|
737
|
+
# Update properties of this object
|
738
|
+
def update!(**args)
|
739
|
+
@code = args[:code] if args.key?(:code)
|
740
|
+
@message = args[:message] if args.key?(:message)
|
741
|
+
end
|
742
|
+
end
|
743
|
+
|
744
|
+
# Message containing Stack Pack information.
|
745
|
+
class StackPack
|
746
|
+
include Google::Apis::Core::Hashable
|
747
|
+
|
748
|
+
# The stack pack advice strings.
|
749
|
+
# Corresponds to the JSON property `descriptions`
|
750
|
+
# @return [Hash<String,String>]
|
751
|
+
attr_accessor :descriptions
|
752
|
+
|
753
|
+
# The stack pack icon data uri.
|
754
|
+
# Corresponds to the JSON property `iconDataURL`
|
755
|
+
# @return [String]
|
756
|
+
attr_accessor :icon_data_url
|
757
|
+
|
758
|
+
# The stack pack id.
|
759
|
+
# Corresponds to the JSON property `id`
|
760
|
+
# @return [String]
|
761
|
+
attr_accessor :id
|
762
|
+
|
763
|
+
# The stack pack title.
|
764
|
+
# Corresponds to the JSON property `title`
|
765
|
+
# @return [String]
|
766
|
+
attr_accessor :title
|
767
|
+
|
768
|
+
def initialize(**args)
|
769
|
+
update!(**args)
|
770
|
+
end
|
771
|
+
|
772
|
+
# Update properties of this object
|
773
|
+
def update!(**args)
|
774
|
+
@descriptions = args[:descriptions] if args.key?(:descriptions)
|
775
|
+
@icon_data_url = args[:icon_data_url] if args.key?(:icon_data_url)
|
776
|
+
@id = args[:id] if args.key?(:id)
|
777
|
+
@title = args[:title] if args.key?(:title)
|
778
|
+
end
|
779
|
+
end
|
780
|
+
|
781
|
+
# Message containing the performance timing data for the Lighthouse run.
|
782
|
+
class Timing
|
783
|
+
include Google::Apis::Core::Hashable
|
784
|
+
|
785
|
+
# The total duration of Lighthouse's run.
|
786
|
+
# Corresponds to the JSON property `total`
|
787
|
+
# @return [Float]
|
788
|
+
attr_accessor :total
|
789
|
+
|
790
|
+
def initialize(**args)
|
791
|
+
update!(**args)
|
792
|
+
end
|
793
|
+
|
794
|
+
# Update properties of this object
|
795
|
+
def update!(**args)
|
796
|
+
@total = args[:total] if args.key?(:total)
|
797
|
+
end
|
798
|
+
end
|
799
|
+
|
800
|
+
# A CrUX metric object for a single metric and form factor.
|
801
|
+
class UserPageLoadMetricV5
|
802
|
+
include Google::Apis::Core::Hashable
|
803
|
+
|
804
|
+
# The category of the specific time metric.
|
805
|
+
# Corresponds to the JSON property `category`
|
806
|
+
# @return [String]
|
807
|
+
attr_accessor :category
|
808
|
+
|
809
|
+
# Metric distributions. Proportions should sum up to 1.
|
810
|
+
# Corresponds to the JSON property `distributions`
|
811
|
+
# @return [Array<Google::Apis::PagespeedonlineV5::Bucket>]
|
812
|
+
attr_accessor :distributions
|
813
|
+
|
814
|
+
# Identifies the form factor of the metric being collected.
|
815
|
+
# Corresponds to the JSON property `formFactor`
|
816
|
+
# @return [String]
|
817
|
+
attr_accessor :form_factor
|
818
|
+
|
819
|
+
# The median number of the metric, in millisecond.
|
820
|
+
# Corresponds to the JSON property `median`
|
821
|
+
# @return [Fixnum]
|
822
|
+
attr_accessor :median
|
823
|
+
|
824
|
+
# Identifies the type of the metric.
|
825
|
+
# Corresponds to the JSON property `metricId`
|
826
|
+
# @return [String]
|
827
|
+
attr_accessor :metric_id
|
828
|
+
|
829
|
+
# We use this field to store certain percentile value for this metric. For v4,
|
830
|
+
# this field contains pc50. For v5, this field contains pc90.
|
831
|
+
# Corresponds to the JSON property `percentile`
|
832
|
+
# @return [Fixnum]
|
833
|
+
attr_accessor :percentile
|
834
|
+
|
835
|
+
def initialize(**args)
|
836
|
+
update!(**args)
|
837
|
+
end
|
838
|
+
|
839
|
+
# Update properties of this object
|
840
|
+
def update!(**args)
|
841
|
+
@category = args[:category] if args.key?(:category)
|
842
|
+
@distributions = args[:distributions] if args.key?(:distributions)
|
843
|
+
@form_factor = args[:form_factor] if args.key?(:form_factor)
|
844
|
+
@median = args[:median] if args.key?(:median)
|
845
|
+
@metric_id = args[:metric_id] if args.key?(:metric_id)
|
846
|
+
@percentile = args[:percentile] if args.key?(:percentile)
|
847
|
+
end
|
848
|
+
end
|
849
|
+
end
|
850
|
+
end
|
851
|
+
end
|