Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(745)

Unified Diff: generated/googleapis/lib/pagespeedonline/v2.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « generated/googleapis/lib/pagespeedonline/v1.dart ('k') | generated/googleapis/lib/partners/v2.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: generated/googleapis/lib/pagespeedonline/v2.dart
diff --git a/generated/googleapis/lib/pagespeedonline/v2.dart b/generated/googleapis/lib/pagespeedonline/v2.dart
index ef13500ac95b7100d0c636e5f675455758d8a8c0..94efd5e3c72126db04ea9f218e03a3d6016c8ea4 100644
--- a/generated/googleapis/lib/pagespeedonline/v2.dart
+++ b/generated/googleapis/lib/pagespeedonline/v2.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/v2';
-/**
- * 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/v2/"}) :
- _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
+ PagespeedonlineApi(http.Client client,
+ {core.String rootUrl: "https://www.googleapis.com/",
+ core.String servicePath: "pagespeedonline/v2/"})
+ : _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
- * PageSpeed scores, 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
+ /// PageSpeed scores, 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,28 +104,27 @@ 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 PagespeedApiFormatStringV2ArgsRects {
- /** The height of the rect. */
+ /// The height of the rect.
core.int height;
- /** The left coordinate of the rect, in page coordinates. */
+
+ /// The left coordinate of the rect, in page coordinates.
core.int left;
- /** The top coordinate of the rect, in page coordinates. */
+
+ /// The top coordinate of the rect, in page coordinates.
core.int top;
- /** The width of the rect. */
+
+ /// The width of the rect.
core.int width;
PagespeedApiFormatStringV2ArgsRects();
@@ -142,7 +145,8 @@ class PagespeedApiFormatStringV2ArgsRects {
}
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 (height != null) {
_json["height"] = height;
}
@@ -160,13 +164,16 @@ class PagespeedApiFormatStringV2ArgsRects {
}
class PagespeedApiFormatStringV2ArgsSecondaryRects {
- /** The height of the rect. */
+ /// The height of the rect.
core.int height;
- /** The left coordinate of the rect, in page coordinates. */
+
+ /// The left coordinate of the rect, in page coordinates.
core.int left;
- /** The top coordinate of the rect, in page coordinates. */
+
+ /// The top coordinate of the rect, in page coordinates.
core.int top;
- /** The width of the rect. */
+
+ /// The width of the rect.
core.int width;
PagespeedApiFormatStringV2ArgsSecondaryRects();
@@ -187,7 +194,8 @@ class PagespeedApiFormatStringV2ArgsSecondaryRects {
}
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 (height != null) {
_json["height"] = height;
}
@@ -205,26 +213,24 @@ class PagespeedApiFormatStringV2ArgsSecondaryRects {
}
class PagespeedApiFormatStringV2Args {
- /** The placeholder key for this arg, as a string. */
+ /// The placeholder key for this arg, as a string.
core.String key;
- /**
- * The screen rectangles being referred to, with dimensions measured in CSS
- * pixels. This is only ever used for SNAPSHOT_RECT arguments. If this is
- * absent for a SNAPSHOT_RECT argument, it means that that argument refers to
- * the entire snapshot.
- */
+
+ /// The screen rectangles being referred to, with dimensions measured in CSS
+ /// pixels. This is only ever used for SNAPSHOT_RECT arguments. If this is
+ /// absent for a SNAPSHOT_RECT argument, it means that that argument refers
+ /// to the entire snapshot.
core.List<PagespeedApiFormatStringV2ArgsRects> rects;
- /**
- * Secondary screen rectangles being referred to, with dimensions measured in
- * CSS pixels. This is only ever used for SNAPSHOT_RECT arguments.
- */
+
+ /// Secondary screen rectangles being referred to, with dimensions measured
+ /// in CSS pixels. This is only ever used for SNAPSHOT_RECT arguments.
core.List<PagespeedApiFormatStringV2ArgsSecondaryRects> secondaryRects;
- /**
- * Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, DURATION,
- * VERBATIM_STRING, PERCENTAGE, HYPERLINK, or SNAPSHOT_RECT.
- */
+
+ /// Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES,
+ /// DURATION, VERBATIM_STRING, PERCENTAGE, HYPERLINK, or SNAPSHOT_RECT.
core.String type;
- /** Argument value, as a localized string. */
+
+ /// Argument value, as a localized string.
core.String value;
PagespeedApiFormatStringV2Args();
@@ -234,10 +240,16 @@ class PagespeedApiFormatStringV2Args {
key = _json["key"];
}
if (_json.containsKey("rects")) {
- rects = _json["rects"].map((value) => new PagespeedApiFormatStringV2ArgsRects.fromJson(value)).toList();
+ rects = _json["rects"]
+ .map((value) =>
+ new PagespeedApiFormatStringV2ArgsRects.fromJson(value))
+ .toList();
}
if (_json.containsKey("secondary_rects")) {
- secondaryRects = _json["secondary_rects"].map((value) => new PagespeedApiFormatStringV2ArgsSecondaryRects.fromJson(value)).toList();
+ secondaryRects = _json["secondary_rects"]
+ .map((value) =>
+ new PagespeedApiFormatStringV2ArgsSecondaryRects.fromJson(value))
+ .toList();
}
if (_json.containsKey("type")) {
type = _json["type"];
@@ -248,7 +260,8 @@ class PagespeedApiFormatStringV2Args {
}
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 (key != null) {
_json["key"] = key;
}
@@ -256,7 +269,8 @@ class PagespeedApiFormatStringV2Args {
_json["rects"] = rects.map((value) => (value).toJson()).toList();
}
if (secondaryRects != null) {
- _json["secondary_rects"] = secondaryRects.map((value) => (value).toJson()).toList();
+ _json["secondary_rects"] =
+ secondaryRects.map((value) => (value).toJson()).toList();
}
if (type != null) {
_json["type"] = type;
@@ -269,21 +283,22 @@ class PagespeedApiFormatStringV2Args {
}
class PagespeedApiFormatStringV2 {
- /** List of arguments for the format string. */
+ /// List of arguments for the format string.
core.List<PagespeedApiFormatStringV2Args> args;
- /**
- * A localized format string with {{FOO}} placeholders, where 'FOO' is the key
- * of the argument whose value should be substituted. For HYPERLINK arguments,
- * the format string will instead contain {{BEGIN_FOO}} and {{END_FOO}} for
- * the argument with key 'FOO'.
- */
+
+ /// A localized format string with {{FOO}} placeholders, where 'FOO' is the
+ /// key of the argument whose value should be substituted. For HYPERLINK
+ /// arguments, the format string will instead contain {{BEGIN_FOO}} and
+ /// {{END_FOO}} for the argument with key 'FOO'.
core.String format;
PagespeedApiFormatStringV2();
PagespeedApiFormatStringV2.fromJson(core.Map _json) {
if (_json.containsKey("args")) {
- args = _json["args"].map((value) => new PagespeedApiFormatStringV2Args.fromJson(value)).toList();
+ args = _json["args"]
+ .map((value) => new PagespeedApiFormatStringV2Args.fromJson(value))
+ .toList();
}
if (_json.containsKey("format")) {
format = _json["format"];
@@ -291,7 +306,8 @@ class PagespeedApiFormatStringV2 {
}
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();
}
@@ -302,18 +318,19 @@ class PagespeedApiFormatStringV2 {
}
}
-/**
- * The region of the page that is captured by this image, with dimensions
- * measured in CSS pixels.
- */
+/// The region of the page that is captured by this image, with dimensions
+/// measured in CSS pixels.
class PagespeedApiImageV2PageRect {
- /** The height of the rect. */
+ /// The height of the rect.
core.int height;
- /** The left coordinate of the rect, in page coordinates. */
+
+ /// The left coordinate of the rect, in page coordinates.
core.int left;
- /** The top coordinate of the rect, in page coordinates. */
+
+ /// The top coordinate of the rect, in page coordinates.
core.int top;
- /** The width of the rect. */
+
+ /// The width of the rect.
core.int width;
PagespeedApiImageV2PageRect();
@@ -334,7 +351,8 @@ class PagespeedApiImageV2PageRect {
}
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 (height != null) {
_json["height"] = height;
}
@@ -352,27 +370,31 @@ class PagespeedApiImageV2PageRect {
}
class PagespeedApiImageV2 {
- /** 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;
- /** Unique string key, if any, identifying this image. */
+
+ /// Unique string key, if any, identifying this image.
core.String key;
- /** Mime type of image data (e.g. "image/jpeg"). */
+
+ /// Mime type of image data (e.g. "image/jpeg").
core.String mimeType;
- /**
- * The region of the page that is captured by this image, with dimensions
- * measured in CSS pixels.
- */
+
+ /// The region of the page that is captured by this image, with dimensions
+ /// measured in CSS pixels.
PagespeedApiImageV2PageRect pageRect;
- /** Width of screenshot in pixels. */
+
+ /// Width of screenshot in pixels.
core.int width;
PagespeedApiImageV2();
@@ -399,7 +421,8 @@ class PagespeedApiImageV2 {
}
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;
}
@@ -423,22 +446,21 @@ class PagespeedApiImageV2 {
}
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<PagespeedApiFormatStringV2> 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.
PagespeedApiFormatStringV2 result;
ResultFormattedResultsRuleResultsValueUrlBlocksUrls();
ResultFormattedResultsRuleResultsValueUrlBlocksUrls.fromJson(core.Map _json) {
if (_json.containsKey("details")) {
- details = _json["details"].map((value) => new PagespeedApiFormatStringV2.fromJson(value)).toList();
+ details = _json["details"]
+ .map((value) => new PagespeedApiFormatStringV2.fromJson(value))
+ .toList();
}
if (_json.containsKey("result")) {
result = new PagespeedApiFormatStringV2.fromJson(_json["result"]);
@@ -446,7 +468,8 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksUrls {
}
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();
}
@@ -458,12 +481,11 @@ class ResultFormattedResultsRuleResultsValueUrlBlocksUrls {
}
class ResultFormattedResultsRuleResultsValueUrlBlocks {
- /** Heading to be displayed with the list of URLs. */
+ /// Heading to be displayed with the list of URLs.
PagespeedApiFormatStringV2 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();
@@ -473,12 +495,17 @@ class ResultFormattedResultsRuleResultsValueUrlBlocks {
header = new PagespeedApiFormatStringV2.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();
}
@@ -489,38 +516,32 @@ 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 {
- /**
- * List of rule groups that this rule belongs to. Each entry in the list is
- * one of "SPEED" or "USABILITY".
- */
+ /// List of rule groups that this rule belongs to. Each entry in the list is
+ /// one of "SPEED" or "USABILITY".
core.List<core.String> groups;
- /** 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;
- /**
- * A brief summary description for the rule, indicating at a high level what
- * should be done to follow the rule and what benefit can be gained by doing
- * so.
- */
+
+ /// A brief summary description for the rule, indicating at a high level what
+ /// should be done to follow the rule and what benefit can be gained by doing
+ /// so.
PagespeedApiFormatStringV2 summary;
- /**
- * 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();
@@ -539,12 +560,17 @@ class ResultFormattedResultsRuleResultsValue {
summary = new PagespeedApiFormatStringV2.fromJson(_json["summary"]);
}
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 (groups != null) {
_json["groups"] = groups;
}
@@ -564,17 +590,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();
@@ -584,58 +607,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();
@@ -683,7 +721,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;
}
@@ -727,14 +766,12 @@ class ResultPageStats {
}
}
-/** The name of this rule group: one of "SPEED" or "USABILITY". */
+/// The name of this rule group: one of "SPEED" or "USABILITY".
class ResultRuleGroupsValue {
- /**
- * The score (0-100) for this rule group, which indicates how much better a
- * page could be in that category (e.g. how much faster, or how much more
- * usable). A high score indicates little room for improvement, while a lower
- * score indicates more room for improvement.
- */
+ /// The score (0-100) for this rule group, which indicates how much better a
+ /// page could be in that category (e.g. how much faster, or how much more
+ /// usable). A high score indicates little room for improvement, while a
+ /// lower score indicates more room for improvement.
core.int score;
ResultRuleGroupsValue();
@@ -746,7 +783,8 @@ class ResultRuleGroupsValue {
}
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 (score != null) {
_json["score"] = score;
}
@@ -754,11 +792,12 @@ class ResultRuleGroupsValue {
}
}
-/** 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();
@@ -773,7 +812,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;
}
@@ -785,47 +825,47 @@ 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;
- /** A map with one entry for each rule group in these results. */
+
+ /// A map with one entry for each rule group in these results.
core.Map<core.String, ResultRuleGroupsValue> ruleGroups;
- /** Base64-encoded screenshot of the page that was analyzed. */
+
+ /// Base64-encoded screenshot of the page that was analyzed.
PagespeedApiImageV2 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"];
@@ -843,7 +883,11 @@ class Result {
responseCode = _json["responseCode"];
}
if (_json.containsKey("ruleGroups")) {
- ruleGroups = commons.mapMap<core.Map<core.String, core.Object>, ResultRuleGroupsValue>(_json["ruleGroups"], (core.Map<core.String, core.Object> item) => new ResultRuleGroupsValue.fromJson(item));
+ ruleGroups = commons
+ .mapMap<core.Map<core.String, core.Object>, ResultRuleGroupsValue>(
+ _json["ruleGroups"],
+ (core.Map<core.String, core.Object> item) =>
+ new ResultRuleGroupsValue.fromJson(item));
}
if (_json.containsKey("screenshot")) {
screenshot = new PagespeedApiImageV2.fromJson(_json["screenshot"]);
@@ -857,7 +901,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();
}
@@ -877,7 +922,9 @@ class Result {
_json["responseCode"] = responseCode;
}
if (ruleGroups != null) {
- _json["ruleGroups"] = commons.mapMap<ResultRuleGroupsValue, core.Map<core.String, core.Object>>(ruleGroups, (ResultRuleGroupsValue item) => (item).toJson());
+ _json["ruleGroups"] = commons
+ .mapMap<ResultRuleGroupsValue, core.Map<core.String, core.Object>>(
+ ruleGroups, (ResultRuleGroupsValue item) => (item).toJson());
}
if (screenshot != null) {
_json["screenshot"] = (screenshot).toJson();
« no previous file with comments | « generated/googleapis/lib/pagespeedonline/v1.dart ('k') | generated/googleapis/lib/partners/v2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698