| Index: generated/googleapis/lib/pagespeedonline/v1.dart
|
| diff --git a/generated/googleapis/lib/pagespeedonline/v1.dart b/generated/googleapis/lib/pagespeedonline/v1.dart
|
| index 6f55fa94552f4f36841527aa068d58f07de6a1b7..34dfbc0f4b72aa36632f59ef28c5bcdefab46871 100644
|
| --- a/generated/googleapis/lib/pagespeedonline/v1.dart
|
| +++ b/generated/googleapis/lib/pagespeedonline/v1.dart
|
| @@ -9,68 +9,70 @@ import 'dart:convert' as convert;
|
| import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
|
| import 'package:http/http.dart' as http;
|
|
|
| -export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
|
| - ApiRequestError, DetailedApiRequestError;
|
| +export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
|
| + show ApiRequestError, DetailedApiRequestError;
|
|
|
| const core.String USER_AGENT = 'dart-api-client pagespeedonline/v1';
|
|
|
| -/**
|
| - * Analyzes the performance of a web page and provides tailored suggestions to
|
| - * make that page faster.
|
| - */
|
| +/// Analyzes the performance of a web page and provides tailored suggestions to
|
| +/// make that page faster.
|
| class PagespeedonlineApi {
|
| -
|
| final commons.ApiRequester _requester;
|
|
|
| - PagespeedapiResourceApi get pagespeedapi => new PagespeedapiResourceApi(_requester);
|
| + PagespeedapiResourceApi get pagespeedapi =>
|
| + new PagespeedapiResourceApi(_requester);
|
|
|
| - PagespeedonlineApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com/", core.String servicePath: "pagespeedonline/v1/"}) :
|
| - _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
|
| + PagespeedonlineApi(http.Client client,
|
| + {core.String rootUrl: "https://www.googleapis.com/",
|
| + core.String servicePath: "pagespeedonline/v1/"})
|
| + : _requester =
|
| + new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
|
| }
|
|
|
| -
|
| class PagespeedapiResourceApi {
|
| final commons.ApiRequester _requester;
|
|
|
| - PagespeedapiResourceApi(commons.ApiRequester client) :
|
| - _requester = client;
|
| -
|
| - /**
|
| - * Runs PageSpeed analysis on the page at the specified URL, and returns a
|
| - * PageSpeed score, a list of suggestions to make that page faster, and other
|
| - * information.
|
| - *
|
| - * Request parameters:
|
| - *
|
| - * [url] - The URL to fetch and analyze
|
| - * Value must have pattern "(?i)http(s)?://.*".
|
| - *
|
| - * [filterThirdPartyResources] - Indicates if third party resources should be
|
| - * filtered out before PageSpeed analysis.
|
| - *
|
| - * [locale] - The locale used to localize formatted results
|
| - * Value must have pattern "[a-zA-Z]+(_[a-zA-Z]+)?".
|
| - *
|
| - * [rule] - A PageSpeed rule to run; if none are given, all rules are run
|
| - * Value must have pattern "[a-zA-Z]+".
|
| - *
|
| - * [screenshot] - Indicates if binary data containing a screenshot should be
|
| - * included
|
| - *
|
| - * [strategy] - The analysis strategy to use
|
| - * Possible string values are:
|
| - * - "desktop" : Fetch and analyze the URL for desktop browsers
|
| - * - "mobile" : Fetch and analyze the URL for mobile devices
|
| - *
|
| - * Completes with a [Result].
|
| - *
|
| - * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| - * error.
|
| - *
|
| - * If the used [http.Client] completes with an error when making a REST call,
|
| - * this method will complete with the same error.
|
| - */
|
| - async.Future<Result> runpagespeed(core.String url, {core.bool filterThirdPartyResources, core.String locale, core.List<core.String> rule, core.bool screenshot, core.String strategy}) {
|
| + PagespeedapiResourceApi(commons.ApiRequester client) : _requester = client;
|
| +
|
| + /// Runs PageSpeed analysis on the page at the specified URL, and returns a
|
| + /// PageSpeed score, a list of suggestions to make that page faster, and
|
| + /// other information.
|
| + ///
|
| + /// Request parameters:
|
| + ///
|
| + /// [url] - The URL to fetch and analyze
|
| + /// Value must have pattern "(?i)http(s)?://.*".
|
| + ///
|
| + /// [filterThirdPartyResources] - Indicates if third party resources should
|
| + /// be filtered out before PageSpeed analysis.
|
| + ///
|
| + /// [locale] - The locale used to localize formatted results
|
| + /// Value must have pattern "[a-zA-Z]+(_[a-zA-Z]+)?".
|
| + ///
|
| + /// [rule] - A PageSpeed rule to run; if none are given, all rules are run
|
| + /// Value must have pattern "[a-zA-Z]+".
|
| + ///
|
| + /// [screenshot] - Indicates if binary data containing a screenshot should be
|
| + /// included
|
| + ///
|
| + /// [strategy] - The analysis strategy to use
|
| + /// Possible string values are:
|
| + /// - "desktop" : Fetch and analyze the URL for desktop browsers
|
| + /// - "mobile" : Fetch and analyze the URL for mobile devices
|
| + ///
|
| + /// Completes with a [Result].
|
| + ///
|
| + /// Completes with a [commons.ApiRequestError] if the API endpoint returned
|
| + /// an error.
|
| + ///
|
| + /// If the used [http.Client] completes with an error when making a REST
|
| + /// call, this method will complete with the same error.
|
| + async.Future<Result> runpagespeed(core.String url,
|
| + {core.bool filterThirdPartyResources,
|
| + core.String locale,
|
| + core.List<core.String> rule,
|
| + core.bool screenshot,
|
| + core.String strategy}) {
|
| var _url = null;
|
| var _queryParams = new core.Map();
|
| var _uploadMedia = null;
|
| @@ -83,7 +85,9 @@ class PagespeedapiResourceApi {
|
| }
|
| _queryParams["url"] = [url];
|
| if (filterThirdPartyResources != null) {
|
| - _queryParams["filter_third_party_resources"] = ["${filterThirdPartyResources}"];
|
| + _queryParams["filter_third_party_resources"] = [
|
| + "${filterThirdPartyResources}"
|
| + ];
|
| }
|
| if (locale != null) {
|
| _queryParams["locale"] = [locale];
|
| @@ -100,32 +104,28 @@ class PagespeedapiResourceApi {
|
|
|
| _url = 'runPagespeed';
|
|
|
| - var _response = _requester.request(_url,
|
| - "GET",
|
| - body: _body,
|
| - queryParams: _queryParams,
|
| - uploadOptions: _uploadOptions,
|
| - uploadMedia: _uploadMedia,
|
| - downloadOptions: _downloadOptions);
|
| + var _response = _requester.request(_url, "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| return _response.then((data) => new Result.fromJson(data));
|
| }
|
| -
|
| }
|
|
|
| -
|
| -
|
| class ResultFormattedResultsRuleResultsValueUrlBlocksHeaderArgs {
|
| - /**
|
| - * Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or
|
| - * DURATION.
|
| - */
|
| + /// Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or
|
| + /// DURATION.
|
| core.String type;
|
| - /** Argument value, as a localized string. */
|
| +
|
| + /// Argument value, as a localized string.
|
| core.String value;
|
|
|
| ResultFormattedResultsRuleResultsValueUrlBlocksHeaderArgs();
|
|
|
| - ResultFormattedResultsRuleResultsValueUrlBlocksHeaderArgs.fromJson(core.Map _json) {
|
| + ResultFormattedResultsRuleResultsValueUrlBlocksHeaderArgs.fromJson(
|
| + core.Map _json) {
|
| if (_json.containsKey("type")) {
|
| type = _json["type"];
|
| }
|
| @@ -135,7 +135,8 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksHeaderArgs {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (type != null) {
|
| _json["type"] = type;
|
| }
|
| @@ -146,22 +147,26 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksHeaderArgs {
|
| }
|
| }
|
|
|
| -/** Heading to be displayed with the list of URLs. */
|
| +/// Heading to be displayed with the list of URLs.
|
| class ResultFormattedResultsRuleResultsValueUrlBlocksHeader {
|
| - /** List of arguments for the format string. */
|
| + /// List of arguments for the format string.
|
| core.List<ResultFormattedResultsRuleResultsValueUrlBlocksHeaderArgs> args;
|
| - /**
|
| - * A localized format string with $N placeholders, where N is the 1-indexed
|
| - * argument number, e.g. 'Minifying the following $1 resources would save a
|
| - * total of $2 bytes'.
|
| - */
|
| +
|
| + /// A localized format string with $N placeholders, where N is the 1-indexed
|
| + /// argument number, e.g. 'Minifying the following $1 resources would save a
|
| + /// total of $2 bytes'.
|
| core.String format;
|
|
|
| ResultFormattedResultsRuleResultsValueUrlBlocksHeader();
|
|
|
| - ResultFormattedResultsRuleResultsValueUrlBlocksHeader.fromJson(core.Map _json) {
|
| + ResultFormattedResultsRuleResultsValueUrlBlocksHeader.fromJson(
|
| + core.Map _json) {
|
| if (_json.containsKey("args")) {
|
| - args = _json["args"].map((value) => new ResultFormattedResultsRuleResultsValueUrlBlocksHeaderArgs.fromJson(value)).toList();
|
| + args = _json["args"]
|
| + .map((value) =>
|
| + new ResultFormattedResultsRuleResultsValueUrlBlocksHeaderArgs
|
| + .fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("format")) {
|
| format = _json["format"];
|
| @@ -169,7 +174,8 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksHeader {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (args != null) {
|
| _json["args"] = args.map((value) => (value).toJson()).toList();
|
| }
|
| @@ -181,17 +187,17 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksHeader {
|
| }
|
|
|
| class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs {
|
| - /**
|
| - * Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or
|
| - * DURATION.
|
| - */
|
| + /// Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or
|
| + /// DURATION.
|
| core.String type;
|
| - /** Argument value, as a localized string. */
|
| +
|
| + /// Argument value, as a localized string.
|
| core.String value;
|
|
|
| ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs();
|
|
|
| - ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs.fromJson(core.Map _json) {
|
| + ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs.fromJson(
|
| + core.Map _json) {
|
| if (_json.containsKey("type")) {
|
| type = _json["type"];
|
| }
|
| @@ -201,7 +207,8 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (type != null) {
|
| _json["type"] = type;
|
| }
|
| @@ -213,20 +220,25 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs {
|
| }
|
|
|
| class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails {
|
| - /** List of arguments for the format string. */
|
| - core.List<ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs> args;
|
| - /**
|
| - * A localized format string with $N placeholders, where N is the 1-indexed
|
| - * argument number, e.g. 'Unnecessary metadata for this resource adds an
|
| - * additional $1 bytes to its download size'.
|
| - */
|
| + /// List of arguments for the format string.
|
| + core.List<ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs>
|
| + args;
|
| +
|
| + /// A localized format string with $N placeholders, where N is the 1-indexed
|
| + /// argument number, e.g. 'Unnecessary metadata for this resource adds an
|
| + /// additional $1 bytes to its download size'.
|
| core.String format;
|
|
|
| ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails();
|
|
|
| - ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails.fromJson(core.Map _json) {
|
| + ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails.fromJson(
|
| + core.Map _json) {
|
| if (_json.containsKey("args")) {
|
| - args = _json["args"].map((value) => new ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs.fromJson(value)).toList();
|
| + args = _json["args"]
|
| + .map((value) =>
|
| + new ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs
|
| + .fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("format")) {
|
| format = _json["format"];
|
| @@ -234,7 +246,8 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (args != null) {
|
| _json["args"] = args.map((value) => (value).toJson()).toList();
|
| }
|
| @@ -246,17 +259,17 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails {
|
| }
|
|
|
| class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResultArgs {
|
| - /**
|
| - * Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or
|
| - * DURATION.
|
| - */
|
| + /// Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or
|
| + /// DURATION.
|
| core.String type;
|
| - /** Argument value, as a localized string. */
|
| +
|
| + /// Argument value, as a localized string.
|
| core.String value;
|
|
|
| ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResultArgs();
|
|
|
| - ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResultArgs.fromJson(core.Map _json) {
|
| + ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResultArgs.fromJson(
|
| + core.Map _json) {
|
| if (_json.containsKey("type")) {
|
| type = _json["type"];
|
| }
|
| @@ -266,7 +279,8 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResultArgs {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (type != null) {
|
| _json["type"] = type;
|
| }
|
| @@ -277,24 +291,27 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResultArgs {
|
| }
|
| }
|
|
|
| -/**
|
| - * A format string that gives information about the URL, and a list of arguments
|
| - * for that format string.
|
| - */
|
| +/// A format string that gives information about the URL, and a list of
|
| +/// arguments for that format string.
|
| class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResult {
|
| - /** List of arguments for the format string. */
|
| + /// List of arguments for the format string.
|
| core.List<ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResultArgs> args;
|
| - /**
|
| - * A localized format string with $N placeholders, where N is the 1-indexed
|
| - * argument number, e.g. 'Minifying the resource at URL $1 can save $2 bytes'.
|
| - */
|
| +
|
| + /// A localized format string with $N placeholders, where N is the 1-indexed
|
| + /// argument number, e.g. 'Minifying the resource at URL $1 can save $2
|
| + /// bytes'.
|
| core.String format;
|
|
|
| ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResult();
|
|
|
| - ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResult.fromJson(core.Map _json) {
|
| + ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResult.fromJson(
|
| + core.Map _json) {
|
| if (_json.containsKey("args")) {
|
| - args = _json["args"].map((value) => new ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResultArgs.fromJson(value)).toList();
|
| + args = _json["args"]
|
| + .map((value) =>
|
| + new ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResultArgs
|
| + .fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("format")) {
|
| format = _json["format"];
|
| @@ -302,7 +319,8 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResult {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (args != null) {
|
| _json["args"] = args.map((value) => (value).toJson()).toList();
|
| }
|
| @@ -314,30 +332,33 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResult {
|
| }
|
|
|
| class ResultFormattedResultsRuleResultsValueUrlBlocksUrls {
|
| - /**
|
| - * List of entries that provide additional details about a single URL.
|
| - * Optional.
|
| - */
|
| + /// List of entries that provide additional details about a single URL.
|
| + /// Optional.
|
| core.List<ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails> details;
|
| - /**
|
| - * A format string that gives information about the URL, and a list of
|
| - * arguments for that format string.
|
| - */
|
| +
|
| + /// A format string that gives information about the URL, and a list of
|
| + /// arguments for that format string.
|
| ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResult result;
|
|
|
| ResultFormattedResultsRuleResultsValueUrlBlocksUrls();
|
|
|
| ResultFormattedResultsRuleResultsValueUrlBlocksUrls.fromJson(core.Map _json) {
|
| if (_json.containsKey("details")) {
|
| - details = _json["details"].map((value) => new ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails.fromJson(value)).toList();
|
| + details = _json["details"]
|
| + .map((value) =>
|
| + new ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails
|
| + .fromJson(value))
|
| + .toList();
|
| }
|
| if (_json.containsKey("result")) {
|
| - result = new ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResult.fromJson(_json["result"]);
|
| + result = new ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResult
|
| + .fromJson(_json["result"]);
|
| }
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (details != null) {
|
| _json["details"] = details.map((value) => (value).toJson()).toList();
|
| }
|
| @@ -349,27 +370,33 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksUrls {
|
| }
|
|
|
| class ResultFormattedResultsRuleResultsValueUrlBlocks {
|
| - /** Heading to be displayed with the list of URLs. */
|
| + /// Heading to be displayed with the list of URLs.
|
| ResultFormattedResultsRuleResultsValueUrlBlocksHeader header;
|
| - /**
|
| - * List of entries that provide information about URLs in the url block.
|
| - * Optional.
|
| - */
|
| +
|
| + /// List of entries that provide information about URLs in the url block.
|
| + /// Optional.
|
| core.List<ResultFormattedResultsRuleResultsValueUrlBlocksUrls> urls;
|
|
|
| ResultFormattedResultsRuleResultsValueUrlBlocks();
|
|
|
| ResultFormattedResultsRuleResultsValueUrlBlocks.fromJson(core.Map _json) {
|
| if (_json.containsKey("header")) {
|
| - header = new ResultFormattedResultsRuleResultsValueUrlBlocksHeader.fromJson(_json["header"]);
|
| + header =
|
| + new ResultFormattedResultsRuleResultsValueUrlBlocksHeader.fromJson(
|
| + _json["header"]);
|
| }
|
| if (_json.containsKey("urls")) {
|
| - urls = _json["urls"].map((value) => new ResultFormattedResultsRuleResultsValueUrlBlocksUrls.fromJson(value)).toList();
|
| + urls = _json["urls"]
|
| + .map((value) =>
|
| + new ResultFormattedResultsRuleResultsValueUrlBlocksUrls.fromJson(
|
| + value))
|
| + .toList();
|
| }
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (header != null) {
|
| _json["header"] = (header).toJson();
|
| }
|
| @@ -380,27 +407,23 @@ class ResultFormattedResultsRuleResultsValueUrlBlocks {
|
| }
|
| }
|
|
|
| -/**
|
| - * The enum-like identifier for this rule. For instance "EnableKeepAlive" or
|
| - * "AvoidCssImport". Not localized.
|
| - */
|
| +/// The enum-like identifier for this rule. For instance "EnableKeepAlive" or
|
| +/// "AvoidCssImport". Not localized.
|
| class ResultFormattedResultsRuleResultsValue {
|
| - /** Localized name of the rule, intended for presentation to a user. */
|
| + /// Localized name of the rule, intended for presentation to a user.
|
| core.String localizedRuleName;
|
| - /**
|
| - * The impact (unbounded floating point value) that implementing the
|
| - * suggestions for this rule would have on making the page faster. Impact is
|
| - * comparable between rules to determine which rule's suggestions would have a
|
| - * higher or lower impact on making a page faster. For instance, if enabling
|
| - * compression would save 1MB, while optimizing images would save 500kB, the
|
| - * enable compression rule would have 2x the impact of the image optimization
|
| - * rule, all other things being equal.
|
| - */
|
| +
|
| + /// The impact (unbounded floating point value) that implementing the
|
| + /// suggestions for this rule would have on making the page faster. Impact is
|
| + /// comparable between rules to determine which rule's suggestions would have
|
| + /// a higher or lower impact on making a page faster. For instance, if
|
| + /// enabling compression would save 1MB, while optimizing images would save
|
| + /// 500kB, the enable compression rule would have 2x the impact of the image
|
| + /// optimization rule, all other things being equal.
|
| core.double ruleImpact;
|
| - /**
|
| - * List of blocks of URLs. Each block may contain a heading and a list of
|
| - * URLs. Each URL may optionally include additional details.
|
| - */
|
| +
|
| + /// List of blocks of URLs. Each block may contain a heading and a list of
|
| + /// URLs. Each URL may optionally include additional details.
|
| core.List<ResultFormattedResultsRuleResultsValueUrlBlocks> urlBlocks;
|
|
|
| ResultFormattedResultsRuleResultsValue();
|
| @@ -413,12 +436,17 @@ class ResultFormattedResultsRuleResultsValue {
|
| ruleImpact = _json["ruleImpact"];
|
| }
|
| if (_json.containsKey("urlBlocks")) {
|
| - urlBlocks = _json["urlBlocks"].map((value) => new ResultFormattedResultsRuleResultsValueUrlBlocks.fromJson(value)).toList();
|
| + urlBlocks = _json["urlBlocks"]
|
| + .map((value) =>
|
| + new ResultFormattedResultsRuleResultsValueUrlBlocks.fromJson(
|
| + value))
|
| + .toList();
|
| }
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (localizedRuleName != null) {
|
| _json["localizedRuleName"] = localizedRuleName;
|
| }
|
| @@ -432,17 +460,14 @@ class ResultFormattedResultsRuleResultsValue {
|
| }
|
| }
|
|
|
| -/**
|
| - * Localized PageSpeed results. Contains a ruleResults entry for each PageSpeed
|
| - * rule instantiated and run by the server.
|
| - */
|
| +/// Localized PageSpeed results. Contains a ruleResults entry for each
|
| +/// PageSpeed rule instantiated and run by the server.
|
| class ResultFormattedResults {
|
| - /** The locale of the formattedResults, e.g. "en_US". */
|
| + /// The locale of the formattedResults, e.g. "en_US".
|
| core.String locale;
|
| - /**
|
| - * Dictionary of formatted rule results, with one entry for each PageSpeed
|
| - * rule instantiated and run by the server.
|
| - */
|
| +
|
| + /// Dictionary of formatted rule results, with one entry for each PageSpeed
|
| + /// rule instantiated and run by the server.
|
| core.Map<core.String, ResultFormattedResultsRuleResultsValue> ruleResults;
|
|
|
| ResultFormattedResults();
|
| @@ -452,58 +477,73 @@ class ResultFormattedResults {
|
| locale = _json["locale"];
|
| }
|
| if (_json.containsKey("ruleResults")) {
|
| - ruleResults = commons.mapMap<core.Map<core.String, core.Object>, ResultFormattedResultsRuleResultsValue>(_json["ruleResults"], (core.Map<core.String, core.Object> item) => new ResultFormattedResultsRuleResultsValue.fromJson(item));
|
| + ruleResults = commons.mapMap<core.Map<core.String, core.Object>,
|
| + ResultFormattedResultsRuleResultsValue>(
|
| + _json["ruleResults"],
|
| + (core.Map<core.String, core.Object> item) =>
|
| + new ResultFormattedResultsRuleResultsValue.fromJson(item));
|
| }
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (locale != null) {
|
| _json["locale"] = locale;
|
| }
|
| if (ruleResults != null) {
|
| - _json["ruleResults"] = commons.mapMap<ResultFormattedResultsRuleResultsValue, core.Map<core.String, core.Object>>(ruleResults, (ResultFormattedResultsRuleResultsValue item) => (item).toJson());
|
| + _json["ruleResults"] = commons.mapMap<
|
| + ResultFormattedResultsRuleResultsValue,
|
| + core.Map<core.String, core.Object>>(ruleResults,
|
| + (ResultFormattedResultsRuleResultsValue item) => (item).toJson());
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -/**
|
| - * Summary statistics for the page, such as number of JavaScript bytes, number
|
| - * of HTML bytes, etc.
|
| - */
|
| +/// Summary statistics for the page, such as number of JavaScript bytes, number
|
| +/// of HTML bytes, etc.
|
| class ResultPageStats {
|
| - /** Number of uncompressed response bytes for CSS resources on the page. */
|
| + /// Number of uncompressed response bytes for CSS resources on the page.
|
| core.String cssResponseBytes;
|
| - /** Number of response bytes for flash resources on the page. */
|
| +
|
| + /// Number of response bytes for flash resources on the page.
|
| core.String flashResponseBytes;
|
| - /**
|
| - * Number of uncompressed response bytes for the main HTML document and all
|
| - * iframes on the page.
|
| - */
|
| +
|
| + /// Number of uncompressed response bytes for the main HTML document and all
|
| + /// iframes on the page.
|
| core.String htmlResponseBytes;
|
| - /** Number of response bytes for image resources on the page. */
|
| +
|
| + /// Number of response bytes for image resources on the page.
|
| core.String imageResponseBytes;
|
| - /** Number of uncompressed response bytes for JS resources on the page. */
|
| +
|
| + /// Number of uncompressed response bytes for JS resources on the page.
|
| core.String javascriptResponseBytes;
|
| - /** Number of CSS resources referenced by the page. */
|
| +
|
| + /// Number of CSS resources referenced by the page.
|
| core.int numberCssResources;
|
| - /** Number of unique hosts referenced by the page. */
|
| +
|
| + /// Number of unique hosts referenced by the page.
|
| core.int numberHosts;
|
| - /** Number of JavaScript resources referenced by the page. */
|
| +
|
| + /// Number of JavaScript resources referenced by the page.
|
| core.int numberJsResources;
|
| - /** Number of HTTP resources loaded by the page. */
|
| +
|
| + /// Number of HTTP resources loaded by the page.
|
| core.int numberResources;
|
| - /** Number of static (i.e. cacheable) resources on the page. */
|
| +
|
| + /// Number of static (i.e. cacheable) resources on the page.
|
| core.int numberStaticResources;
|
| - /** Number of response bytes for other resources on the page. */
|
| +
|
| + /// Number of response bytes for other resources on the page.
|
| core.String otherResponseBytes;
|
| - /**
|
| - * Number of uncompressed response bytes for text resources not covered by
|
| - * other statistics (i.e non-HTML, non-script, non-CSS resources) on the page.
|
| - */
|
| +
|
| + /// Number of uncompressed response bytes for text resources not covered by
|
| + /// other statistics (i.e non-HTML, non-script, non-CSS resources) on the
|
| + /// page.
|
| core.String textResponseBytes;
|
| - /** Total size of all request bytes sent by the page. */
|
| +
|
| + /// Total size of all request bytes sent by the page.
|
| core.String totalRequestBytes;
|
|
|
| ResultPageStats();
|
| @@ -551,7 +591,8 @@ class ResultPageStats {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (cssResponseBytes != null) {
|
| _json["cssResponseBytes"] = cssResponseBytes;
|
| }
|
| @@ -595,22 +636,26 @@ class ResultPageStats {
|
| }
|
| }
|
|
|
| -/** Base64-encoded screenshot of the page that was analyzed. */
|
| +/// Base64-encoded screenshot of the page that was analyzed.
|
| class ResultScreenshot {
|
| - /** Image data base64 encoded. */
|
| + /// Image data base64 encoded.
|
| core.String data;
|
| core.List<core.int> get dataAsBytes {
|
| return convert.BASE64.decode(data);
|
| }
|
|
|
| void set dataAsBytes(core.List<core.int> _bytes) {
|
| - data = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
|
| + data =
|
| + convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
|
| }
|
| - /** Height of screenshot in pixels. */
|
| +
|
| + /// Height of screenshot in pixels.
|
| core.int height;
|
| - /** Mime type of image data. E.g. "image/jpeg". */
|
| +
|
| + /// Mime type of image data. E.g. "image/jpeg".
|
| core.String mimeType;
|
| - /** Width of screenshot in pixels. */
|
| +
|
| + /// Width of screenshot in pixels.
|
| core.int width;
|
|
|
| ResultScreenshot();
|
| @@ -631,7 +676,8 @@ class ResultScreenshot {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (data != null) {
|
| _json["data"] = data;
|
| }
|
| @@ -648,11 +694,12 @@ class ResultScreenshot {
|
| }
|
| }
|
|
|
| -/** The version of PageSpeed used to generate these results. */
|
| +/// The version of PageSpeed used to generate these results.
|
| class ResultVersion {
|
| - /** The major version number of PageSpeed used to generate these results. */
|
| + /// The major version number of PageSpeed used to generate these results.
|
| core.int major;
|
| - /** The minor version number of PageSpeed used to generate these results. */
|
| +
|
| + /// The minor version number of PageSpeed used to generate these results.
|
| core.int minor;
|
|
|
| ResultVersion();
|
| @@ -667,7 +714,8 @@ class ResultVersion {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (major != null) {
|
| _json["major"] = major;
|
| }
|
| @@ -679,51 +727,49 @@ class ResultVersion {
|
| }
|
|
|
| class Result {
|
| - /**
|
| - * Localized PageSpeed results. Contains a ruleResults entry for each
|
| - * PageSpeed rule instantiated and run by the server.
|
| - */
|
| + /// Localized PageSpeed results. Contains a ruleResults entry for each
|
| + /// PageSpeed rule instantiated and run by the server.
|
| ResultFormattedResults formattedResults;
|
| - /**
|
| - * Canonicalized and final URL for the document, after following page
|
| - * redirects (if any).
|
| - */
|
| +
|
| + /// Canonicalized and final URL for the document, after following page
|
| + /// redirects (if any).
|
| core.String id;
|
| - /**
|
| - * List of rules that were specified in the request, but which the server did
|
| - * not know how to instantiate.
|
| - */
|
| +
|
| + /// List of rules that were specified in the request, but which the server
|
| + /// did not know how to instantiate.
|
| core.List<core.String> invalidRules;
|
| - /** Kind of result. */
|
| +
|
| + /// Kind of result.
|
| core.String kind;
|
| - /**
|
| - * Summary statistics for the page, such as number of JavaScript bytes, number
|
| - * of HTML bytes, etc.
|
| - */
|
| +
|
| + /// Summary statistics for the page, such as number of JavaScript bytes,
|
| + /// number of HTML bytes, etc.
|
| ResultPageStats pageStats;
|
| - /**
|
| - * Response code for the document. 200 indicates a normal page load. 4xx/5xx
|
| - * indicates an error.
|
| - */
|
| +
|
| + /// Response code for the document. 200 indicates a normal page load. 4xx/5xx
|
| + /// indicates an error.
|
| core.int responseCode;
|
| - /**
|
| - * The PageSpeed Score (0-100), which indicates how much faster a page could
|
| - * be. A high score indicates little room for improvement, while a lower score
|
| - * indicates more room for improvement.
|
| - */
|
| +
|
| + /// The PageSpeed Score (0-100), which indicates how much faster a page could
|
| + /// be. A high score indicates little room for improvement, while a lower
|
| + /// score indicates more room for improvement.
|
| core.int score;
|
| - /** Base64-encoded screenshot of the page that was analyzed. */
|
| +
|
| + /// Base64-encoded screenshot of the page that was analyzed.
|
| ResultScreenshot screenshot;
|
| - /** Title of the page, as displayed in the browser's title bar. */
|
| +
|
| + /// Title of the page, as displayed in the browser's title bar.
|
| core.String title;
|
| - /** The version of PageSpeed used to generate these results. */
|
| +
|
| + /// The version of PageSpeed used to generate these results.
|
| ResultVersion version;
|
|
|
| Result();
|
|
|
| Result.fromJson(core.Map _json) {
|
| if (_json.containsKey("formattedResults")) {
|
| - formattedResults = new ResultFormattedResults.fromJson(_json["formattedResults"]);
|
| + formattedResults =
|
| + new ResultFormattedResults.fromJson(_json["formattedResults"]);
|
| }
|
| if (_json.containsKey("id")) {
|
| id = _json["id"];
|
| @@ -755,7 +801,8 @@ class Result {
|
| }
|
|
|
| core.Map<core.String, core.Object> toJson() {
|
| - final core.Map<core.String, core.Object> _json = new core.Map<core.String, core.Object>();
|
| + final core.Map<core.String, core.Object> _json =
|
| + new core.Map<core.String, core.Object>();
|
| if (formattedResults != null) {
|
| _json["formattedResults"] = (formattedResults).toJson();
|
| }
|
|
|