-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Google PageSpeed Insights SDK.
--   
--   Analyzes the performance of a web page and provides tailored
--   suggestions to make that page faster.
--   
--   <i>Warning:</i> This is an experimental prototype/preview release
--   which is still under exploratory development and not intended for
--   public use, caveat emptor!
--   
--   This library is compatible with version <tt>v2</tt> of the API.
@package gogol-pagespeed
@version 0.3.0


module Network.Google.PageSpeed.Types

-- | Default request referring to version <tt>v2</tt> of the PageSpeed
--   Insights API. This contains the host and root path used as a starting
--   point for constructing service requests.
pageSpeedService :: ServiceConfig
data ResultFormattedResultsRuleResultsAdditionalURLBlocksItem

-- | Creates a value of
--   <a>ResultFormattedResultsRuleResultsAdditionalURLBlocksItem</a> with
--   the minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rfrrraubiURLs</a></li>
--   <li><a>rfrrraubiHeader</a></li>
--   </ul>
resultFormattedResultsRuleResultsAdditionalURLBlocksItem :: ResultFormattedResultsRuleResultsAdditionalURLBlocksItem

-- | List of entries that provide information about URLs in the url block.
--   Optional.
rfrrraubiURLs :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItem [ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem]

-- | Heading to be displayed with the list of URLs.
rfrrraubiHeader :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItem (Maybe PagespeedAPIFormatStringV2)
data PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem

-- | Creates a value of
--   <a>PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pafsvaisiHeight</a></li>
--   <li><a>pafsvaisiLeft</a></li>
--   <li><a>pafsvaisiWidth</a></li>
--   <li><a>pafsvaisiTop</a></li>
--   </ul>
pagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem :: PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem

-- | The height of the rect.
pafsvaisiHeight :: Lens' PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem (Maybe Int32)

-- | The left coordinate of the rect, in page coordinates.
pafsvaisiLeft :: Lens' PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem (Maybe Int32)

-- | The width of the rect.
pafsvaisiWidth :: Lens' PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem (Maybe Int32)

-- | The top coordinate of the rect, in page coordinates.
pafsvaisiTop :: Lens' PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem (Maybe Int32)
data PagespeedAPIImageV2

-- | Creates a value of <a>PagespeedAPIImageV2</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>paivHeight</a></li>
--   <li><a>paivData</a></li>
--   <li><a>paivMimeType</a></li>
--   <li><a>paivWidth</a></li>
--   <li><a>paivPageRect</a></li>
--   <li><a>paivKey</a></li>
--   </ul>
pagespeedAPIImageV2 :: PagespeedAPIImageV2

-- | Height of screenshot in pixels.
paivHeight :: Lens' PagespeedAPIImageV2 (Maybe Int32)

-- | Image data base64 encoded.
paivData :: Lens' PagespeedAPIImageV2 (Maybe ByteString)

-- | Mime type of image data (e.g. "image/jpeg").
paivMimeType :: Lens' PagespeedAPIImageV2 (Maybe Text)

-- | Width of screenshot in pixels.
paivWidth :: Lens' PagespeedAPIImageV2 (Maybe Int32)

-- | The region of the page that is captured by this image, with dimensions
--   measured in CSS pixels.
paivPageRect :: Lens' PagespeedAPIImageV2 (Maybe PagespeedAPIImageV2Page_rect)

-- | Unique string key, if any, identifying this image.
paivKey :: Lens' PagespeedAPIImageV2 (Maybe Text)
data PagespeedAPIFormatStringV2ArgsItemRectsItem

-- | Creates a value of <a>PagespeedAPIFormatStringV2ArgsItemRectsItem</a>
--   with the minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pafsvairiHeight</a></li>
--   <li><a>pafsvairiLeft</a></li>
--   <li><a>pafsvairiWidth</a></li>
--   <li><a>pafsvairiTop</a></li>
--   </ul>
pagespeedAPIFormatStringV2ArgsItemRectsItem :: PagespeedAPIFormatStringV2ArgsItemRectsItem

-- | The height of the rect.
pafsvairiHeight :: Lens' PagespeedAPIFormatStringV2ArgsItemRectsItem (Maybe Int32)

-- | The left coordinate of the rect, in page coordinates.
pafsvairiLeft :: Lens' PagespeedAPIFormatStringV2ArgsItemRectsItem (Maybe Int32)

-- | The width of the rect.
pafsvairiWidth :: Lens' PagespeedAPIFormatStringV2ArgsItemRectsItem (Maybe Int32)

-- | The top coordinate of the rect, in page coordinates.
pafsvairiTop :: Lens' PagespeedAPIFormatStringV2ArgsItemRectsItem (Maybe Int32)

-- | The analysis strategy to use
data PagespeedAPIRunPagespeedStrategy

-- | <tt>desktop</tt> Fetch and analyze the URL for desktop browsers
Desktop :: PagespeedAPIRunPagespeedStrategy

-- | <tt>mobile</tt> Fetch and analyze the URL for mobile devices
Mobile :: PagespeedAPIRunPagespeedStrategy

-- | The version of PageSpeed used to generate these results.
--   
--   <i>See:</i> <a>resultVersion</a> smart constructor.
data ResultVersion

-- | Creates a value of <a>ResultVersion</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rvMinor</a></li>
--   <li><a>rvMajor</a></li>
--   </ul>
resultVersion :: ResultVersion

-- | The minor version number of PageSpeed used to generate these results.
rvMinor :: Lens' ResultVersion (Maybe Int32)

-- | The major version number of PageSpeed used to generate these results.
rvMajor :: Lens' ResultVersion (Maybe Int32)

-- | Summary statistics for the page, such as number of JavaScript bytes,
--   number of HTML bytes, etc.
--   
--   <i>See:</i> <a>resultPageStats</a> smart constructor.
data ResultPageStats

-- | Creates a value of <a>ResultPageStats</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rpsHTMLResponseBytes</a></li>
--   <li><a>rpsTotalRequestBytes</a></li>
--   <li><a>rpsNumberResources</a></li>
--   <li><a>rpsNumberStaticResources</a></li>
--   <li><a>rpsNumberHosts</a></li>
--   <li><a>rpsNumberJsResources</a></li>
--   <li><a>rpsNumberCssResources</a></li>
--   <li><a>rpsTextResponseBytes</a></li>
--   <li><a>rpsFlashResponseBytes</a></li>
--   <li><a>rpsImageResponseBytes</a></li>
--   <li><a>rpsOtherResponseBytes</a></li>
--   <li><a>rpsJavascriptResponseBytes</a></li>
--   <li><a>rpsCssResponseBytes</a></li>
--   </ul>
resultPageStats :: ResultPageStats

-- | Number of uncompressed response bytes for the main HTML document and
--   all iframes on the page.
rpsHTMLResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Total size of all request bytes sent by the page.
rpsTotalRequestBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of HTTP resources loaded by the page.
rpsNumberResources :: Lens' ResultPageStats (Maybe Int32)

-- | Number of static (i.e. cacheable) resources on the page.
rpsNumberStaticResources :: Lens' ResultPageStats (Maybe Int32)

-- | Number of unique hosts referenced by the page.
rpsNumberHosts :: Lens' ResultPageStats (Maybe Int32)

-- | Number of JavaScript resources referenced by the page.
rpsNumberJsResources :: Lens' ResultPageStats (Maybe Int32)

-- | Number of CSS resources referenced by the page.
rpsNumberCssResources :: Lens' ResultPageStats (Maybe Int32)

-- | 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.
rpsTextResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of response bytes for flash resources on the page.
rpsFlashResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of response bytes for image resources on the page.
rpsImageResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of response bytes for other resources on the page.
rpsOtherResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of uncompressed response bytes for JS resources on the page.
rpsJavascriptResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of uncompressed response bytes for CSS resources on the page.
rpsCssResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | The region of the page that is captured by this image, with dimensions
--   measured in CSS pixels.
--   
--   <i>See:</i> <a>pagespeedAPIImageV2Page_rect</a> smart constructor.
data PagespeedAPIImageV2Page_rect

-- | Creates a value of <a>PagespeedAPIImageV2Page_rect</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>paivpHeight</a></li>
--   <li><a>paivpLeft</a></li>
--   <li><a>paivpWidth</a></li>
--   <li><a>paivpTop</a></li>
--   </ul>
pagespeedAPIImageV2Page_rect :: PagespeedAPIImageV2Page_rect

-- | The height of the rect.
paivpHeight :: Lens' PagespeedAPIImageV2Page_rect (Maybe Int32)

-- | The left coordinate of the rect, in page coordinates.
paivpLeft :: Lens' PagespeedAPIImageV2Page_rect (Maybe Int32)

-- | The width of the rect.
paivpWidth :: Lens' PagespeedAPIImageV2Page_rect (Maybe Int32)

-- | The top coordinate of the rect, in page coordinates.
paivpTop :: Lens' PagespeedAPIImageV2Page_rect (Maybe Int32)
data Result

-- | Creates a value of <a>Result</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rScreenshot</a></li>
--   <li><a>rKind</a></li>
--   <li><a>rResponseCode</a></li>
--   <li><a>rInvalidRules</a></li>
--   <li><a>rFormattedResults</a></li>
--   <li><a>rVersion</a></li>
--   <li><a>rRuleGroups</a></li>
--   <li><a>rPageStats</a></li>
--   <li><a>rId</a></li>
--   <li><a>rTitle</a></li>
--   </ul>
result :: Result

-- | Base64-encoded screenshot of the page that was analyzed.
rScreenshot :: Lens' Result (Maybe PagespeedAPIImageV2)

-- | Kind of result.
rKind :: Lens' Result Text

-- | Response code for the document. 200 indicates a normal page load.
--   4xx/5xx indicates an error.
rResponseCode :: Lens' Result (Maybe Int32)

-- | List of rules that were specified in the request, but which the server
--   did not know how to instantiate.
rInvalidRules :: Lens' Result [Text]

-- | Localized PageSpeed results. Contains a ruleResults entry for each
--   PageSpeed rule instantiated and run by the server.
rFormattedResults :: Lens' Result (Maybe ResultFormattedResults)

-- | The version of PageSpeed used to generate these results.
rVersion :: Lens' Result (Maybe ResultVersion)

-- | A map with one entry for each rule group in these results.
rRuleGroups :: Lens' Result (Maybe ResultRuleGroups)

-- | Summary statistics for the page, such as number of JavaScript bytes,
--   number of HTML bytes, etc.
rPageStats :: Lens' Result (Maybe ResultPageStats)

-- | Canonicalized and final URL for the document, after following page
--   redirects (if any).
rId :: Lens' Result (Maybe Text)

-- | Title of the page, as displayed in the browser's title bar.
rTitle :: Lens' Result (Maybe Text)
data PagespeedAPIFormatStringV2ArgsItem

-- | Creates a value of <a>PagespeedAPIFormatStringV2ArgsItem</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pafsvaiValue</a></li>
--   <li><a>pafsvaiRects</a></li>
--   <li><a>pafsvaiKey</a></li>
--   <li><a>pafsvaiType</a></li>
--   <li><a>pafsvaiSecondaryRects</a></li>
--   </ul>
pagespeedAPIFormatStringV2ArgsItem :: PagespeedAPIFormatStringV2ArgsItem

-- | Argument value, as a localized string.
pafsvaiValue :: Lens' PagespeedAPIFormatStringV2ArgsItem (Maybe Text)

-- | 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.
pafsvaiRects :: Lens' PagespeedAPIFormatStringV2ArgsItem [PagespeedAPIFormatStringV2ArgsItemRectsItem]

-- | The placeholder key for this arg, as a string.
pafsvaiKey :: Lens' PagespeedAPIFormatStringV2ArgsItem (Maybe Text)

-- | Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES,
--   DURATION, VERBATIM_STRING, PERCENTAGE, HYPERLINK, or SNAPSHOT_RECT.
pafsvaiType :: Lens' PagespeedAPIFormatStringV2ArgsItem (Maybe Text)

-- | Secondary screen rectangles being referred to, with dimensions
--   measured in CSS pixels. This is only ever used for SNAPSHOT_RECT
--   arguments.
pafsvaiSecondaryRects :: Lens' PagespeedAPIFormatStringV2ArgsItem [PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem]

-- | The name of this rule group: one of "SPEED" or "USABILITY".
--   
--   <i>See:</i> <a>resultRuleGroupsAdditional</a> smart constructor.
data ResultRuleGroupsAdditional

-- | Creates a value of <a>ResultRuleGroupsAdditional</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rrgaScore</a></li>
--   </ul>
resultRuleGroupsAdditional :: ResultRuleGroupsAdditional

-- | 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.
rrgaScore :: Lens' ResultRuleGroupsAdditional (Maybe Int32)

-- | Localized PageSpeed results. Contains a ruleResults entry for each
--   PageSpeed rule instantiated and run by the server.
--   
--   <i>See:</i> <a>resultFormattedResults</a> smart constructor.
data ResultFormattedResults

-- | Creates a value of <a>ResultFormattedResults</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rfrLocale</a></li>
--   <li><a>rfrRuleResults</a></li>
--   </ul>
resultFormattedResults :: ResultFormattedResults

-- | The locale of the formattedResults, e.g. "en_US".
rfrLocale :: Lens' ResultFormattedResults (Maybe Text)

-- | Dictionary of formatted rule results, with one entry for each
--   PageSpeed rule instantiated and run by the server.
rfrRuleResults :: Lens' ResultFormattedResults (Maybe ResultFormattedResultsRuleResults)

-- | The enum-like identifier for this rule. For instance "EnableKeepAlive"
--   or "AvoidCssImport". Not localized.
--   
--   <i>See:</i> <a>resultFormattedResultsRuleResultsAdditional</a> smart
--   constructor.
data ResultFormattedResultsRuleResultsAdditional

-- | Creates a value of <a>ResultFormattedResultsRuleResultsAdditional</a>
--   with the minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rfrrraSummary</a></li>
--   <li><a>rfrrraRuleImpact</a></li>
--   <li><a>rfrrraGroups</a></li>
--   <li><a>rfrrraLocalizedRuleName</a></li>
--   <li><a>rfrrraURLBlocks</a></li>
--   </ul>
resultFormattedResultsRuleResultsAdditional :: ResultFormattedResultsRuleResultsAdditional

-- | 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.
rfrrraSummary :: Lens' ResultFormattedResultsRuleResultsAdditional (Maybe PagespeedAPIFormatStringV2)

-- | 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.
rfrrraRuleImpact :: Lens' ResultFormattedResultsRuleResultsAdditional (Maybe Double)

-- | List of rule groups that this rule belongs to. Each entry in the list
--   is one of "SPEED" or "USABILITY".
rfrrraGroups :: Lens' ResultFormattedResultsRuleResultsAdditional [Text]

-- | Localized name of the rule, intended for presentation to a user.
rfrrraLocalizedRuleName :: Lens' ResultFormattedResultsRuleResultsAdditional (Maybe Text)

-- | List of blocks of URLs. Each block may contain a heading and a list of
--   URLs. Each URL may optionally include additional details.
rfrrraURLBlocks :: Lens' ResultFormattedResultsRuleResultsAdditional [ResultFormattedResultsRuleResultsAdditionalURLBlocksItem]

-- | A map with one entry for each rule group in these results.
--   
--   <i>See:</i> <a>resultRuleGroups</a> smart constructor.
data ResultRuleGroups

-- | Creates a value of <a>ResultRuleGroups</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rrgAddtional</a></li>
--   </ul>
resultRuleGroups :: HashMap Text ResultRuleGroupsAdditional -> ResultRuleGroups

-- | The name of this rule group: one of "SPEED" or "USABILITY".
rrgAddtional :: Lens' ResultRuleGroups (HashMap Text ResultRuleGroupsAdditional)
data PagespeedAPIFormatStringV2

-- | Creates a value of <a>PagespeedAPIFormatStringV2</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pafsvArgs</a></li>
--   <li><a>pafsvFormat</a></li>
--   </ul>
pagespeedAPIFormatStringV2 :: PagespeedAPIFormatStringV2

-- | List of arguments for the format string.
pafsvArgs :: Lens' PagespeedAPIFormatStringV2 [PagespeedAPIFormatStringV2ArgsItem]

-- | 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'.
pafsvFormat :: Lens' PagespeedAPIFormatStringV2 (Maybe Text)

-- | Dictionary of formatted rule results, with one entry for each
--   PageSpeed rule instantiated and run by the server.
--   
--   <i>See:</i> <a>resultFormattedResultsRuleResults</a> smart
--   constructor.
data ResultFormattedResultsRuleResults

-- | Creates a value of <a>ResultFormattedResultsRuleResults</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rfrrrAddtional</a></li>
--   </ul>
resultFormattedResultsRuleResults :: HashMap Text ResultFormattedResultsRuleResultsAdditional -> ResultFormattedResultsRuleResults

-- | The enum-like identifier for this rule. For instance "EnableKeepAlive"
--   or "AvoidCssImport". Not localized.
rfrrrAddtional :: Lens' ResultFormattedResultsRuleResults (HashMap Text ResultFormattedResultsRuleResultsAdditional)
data ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem

-- | Creates a value of
--   <a>ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem</a>
--   with the minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rfrrraubiuiResult</a></li>
--   <li><a>rfrrraubiuiDetails</a></li>
--   </ul>
resultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem :: ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem

-- | A format string that gives information about the URL, and a list of
--   arguments for that format string.
rfrrraubiuiResult :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem (Maybe PagespeedAPIFormatStringV2)

-- | List of entries that provide additional details about a single URL.
--   Optional.
rfrrraubiuiDetails :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem [PagespeedAPIFormatStringV2]


-- | 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.
--   
--   <i>See:</i> <a>PageSpeed Insights API Reference</a> for
--   <tt>pagespeedonline.pagespeedapi.runpagespeed</tt>.
module Network.Google.Resource.PagespeedOnline.PagespeedAPI.RunPagespeed

-- | A resource alias for
--   <tt>pagespeedonline.pagespeedapi.runpagespeed</tt> method which the
--   <a>PagespeedAPIRunPagespeed</a> request conforms to.
type PagespeedAPIRunPagespeedResource = "pagespeedonline" :> ("v2" :> ("runPagespeed" :> (QueryParam "url" Text :> (QueryParam "screenshot" Bool :> (QueryParam "locale" Text :> (QueryParam "filter_third_party_resources" Bool :> (QueryParam "strategy" PagespeedAPIRunPagespeedStrategy :> (QueryParams "rule" Text :> (QueryParam "alt" AltJSON :> Get '[JSON] Result)))))))))

-- | Creates a value of <a>PagespeedAPIRunPagespeed</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>parpScreenshot</a></li>
--   <li><a>parpLocale</a></li>
--   <li><a>parpURL</a></li>
--   <li><a>parpFilterThirdPartyResources</a></li>
--   <li><a>parpStrategy</a></li>
--   <li><a>parpRule</a></li>
--   </ul>
pagespeedAPIRunPagespeed :: Text -> PagespeedAPIRunPagespeed

-- | 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.
--   
--   <i>See:</i> <a>pagespeedAPIRunPagespeed</a> smart constructor.
data PagespeedAPIRunPagespeed

-- | Indicates if binary data containing a screenshot should be included
parpScreenshot :: Lens' PagespeedAPIRunPagespeed Bool

-- | The locale used to localize formatted results
parpLocale :: Lens' PagespeedAPIRunPagespeed (Maybe Text)

-- | The URL to fetch and analyze
parpURL :: Lens' PagespeedAPIRunPagespeed Text

-- | Indicates if third party resources should be filtered out before
--   PageSpeed analysis.
parpFilterThirdPartyResources :: Lens' PagespeedAPIRunPagespeed Bool

-- | The analysis strategy to use
parpStrategy :: Lens' PagespeedAPIRunPagespeed (Maybe PagespeedAPIRunPagespeedStrategy)

-- | A PageSpeed rule to run; if none are given, all rules are run
parpRule :: Lens' PagespeedAPIRunPagespeed [Text]
instance GHC.Generics.Generic Network.Google.Resource.PagespeedOnline.PagespeedAPI.RunPagespeed.PagespeedAPIRunPagespeed
instance Data.Data.Data Network.Google.Resource.PagespeedOnline.PagespeedAPI.RunPagespeed.PagespeedAPIRunPagespeed
instance GHC.Show.Show Network.Google.Resource.PagespeedOnline.PagespeedAPI.RunPagespeed.PagespeedAPIRunPagespeed
instance GHC.Classes.Eq Network.Google.Resource.PagespeedOnline.PagespeedAPI.RunPagespeed.PagespeedAPIRunPagespeed
instance Network.Google.Types.GoogleRequest Network.Google.Resource.PagespeedOnline.PagespeedAPI.RunPagespeed.PagespeedAPIRunPagespeed


-- | Analyzes the performance of a web page and provides tailored
--   suggestions to make that page faster.
--   
--   <i>See:</i> <a>PageSpeed Insights API Reference</a>
module Network.Google.PageSpeed

-- | Default request referring to version <tt>v2</tt> of the PageSpeed
--   Insights API. This contains the host and root path used as a starting
--   point for constructing service requests.
pageSpeedService :: ServiceConfig

-- | Represents the entirety of the methods and resources available for the
--   PageSpeed Insights API service.
type PageSpeedAPI = PagespeedAPIRunPagespeedResource
data ResultFormattedResultsRuleResultsAdditionalURLBlocksItem

-- | Creates a value of
--   <a>ResultFormattedResultsRuleResultsAdditionalURLBlocksItem</a> with
--   the minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rfrrraubiURLs</a></li>
--   <li><a>rfrrraubiHeader</a></li>
--   </ul>
resultFormattedResultsRuleResultsAdditionalURLBlocksItem :: ResultFormattedResultsRuleResultsAdditionalURLBlocksItem

-- | List of entries that provide information about URLs in the url block.
--   Optional.
rfrrraubiURLs :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItem [ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem]

-- | Heading to be displayed with the list of URLs.
rfrrraubiHeader :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItem (Maybe PagespeedAPIFormatStringV2)
data PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem

-- | Creates a value of
--   <a>PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pafsvaisiHeight</a></li>
--   <li><a>pafsvaisiLeft</a></li>
--   <li><a>pafsvaisiWidth</a></li>
--   <li><a>pafsvaisiTop</a></li>
--   </ul>
pagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem :: PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem

-- | The height of the rect.
pafsvaisiHeight :: Lens' PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem (Maybe Int32)

-- | The left coordinate of the rect, in page coordinates.
pafsvaisiLeft :: Lens' PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem (Maybe Int32)

-- | The width of the rect.
pafsvaisiWidth :: Lens' PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem (Maybe Int32)

-- | The top coordinate of the rect, in page coordinates.
pafsvaisiTop :: Lens' PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem (Maybe Int32)
data PagespeedAPIImageV2

-- | Creates a value of <a>PagespeedAPIImageV2</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>paivHeight</a></li>
--   <li><a>paivData</a></li>
--   <li><a>paivMimeType</a></li>
--   <li><a>paivWidth</a></li>
--   <li><a>paivPageRect</a></li>
--   <li><a>paivKey</a></li>
--   </ul>
pagespeedAPIImageV2 :: PagespeedAPIImageV2

-- | Height of screenshot in pixels.
paivHeight :: Lens' PagespeedAPIImageV2 (Maybe Int32)

-- | Image data base64 encoded.
paivData :: Lens' PagespeedAPIImageV2 (Maybe ByteString)

-- | Mime type of image data (e.g. "image/jpeg").
paivMimeType :: Lens' PagespeedAPIImageV2 (Maybe Text)

-- | Width of screenshot in pixels.
paivWidth :: Lens' PagespeedAPIImageV2 (Maybe Int32)

-- | The region of the page that is captured by this image, with dimensions
--   measured in CSS pixels.
paivPageRect :: Lens' PagespeedAPIImageV2 (Maybe PagespeedAPIImageV2Page_rect)

-- | Unique string key, if any, identifying this image.
paivKey :: Lens' PagespeedAPIImageV2 (Maybe Text)
data PagespeedAPIFormatStringV2ArgsItemRectsItem

-- | Creates a value of <a>PagespeedAPIFormatStringV2ArgsItemRectsItem</a>
--   with the minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pafsvairiHeight</a></li>
--   <li><a>pafsvairiLeft</a></li>
--   <li><a>pafsvairiWidth</a></li>
--   <li><a>pafsvairiTop</a></li>
--   </ul>
pagespeedAPIFormatStringV2ArgsItemRectsItem :: PagespeedAPIFormatStringV2ArgsItemRectsItem

-- | The height of the rect.
pafsvairiHeight :: Lens' PagespeedAPIFormatStringV2ArgsItemRectsItem (Maybe Int32)

-- | The left coordinate of the rect, in page coordinates.
pafsvairiLeft :: Lens' PagespeedAPIFormatStringV2ArgsItemRectsItem (Maybe Int32)

-- | The width of the rect.
pafsvairiWidth :: Lens' PagespeedAPIFormatStringV2ArgsItemRectsItem (Maybe Int32)

-- | The top coordinate of the rect, in page coordinates.
pafsvairiTop :: Lens' PagespeedAPIFormatStringV2ArgsItemRectsItem (Maybe Int32)

-- | The analysis strategy to use
data PagespeedAPIRunPagespeedStrategy

-- | <tt>desktop</tt> Fetch and analyze the URL for desktop browsers
Desktop :: PagespeedAPIRunPagespeedStrategy

-- | <tt>mobile</tt> Fetch and analyze the URL for mobile devices
Mobile :: PagespeedAPIRunPagespeedStrategy

-- | The version of PageSpeed used to generate these results.
--   
--   <i>See:</i> <a>resultVersion</a> smart constructor.
data ResultVersion

-- | Creates a value of <a>ResultVersion</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rvMinor</a></li>
--   <li><a>rvMajor</a></li>
--   </ul>
resultVersion :: ResultVersion

-- | The minor version number of PageSpeed used to generate these results.
rvMinor :: Lens' ResultVersion (Maybe Int32)

-- | The major version number of PageSpeed used to generate these results.
rvMajor :: Lens' ResultVersion (Maybe Int32)

-- | Summary statistics for the page, such as number of JavaScript bytes,
--   number of HTML bytes, etc.
--   
--   <i>See:</i> <a>resultPageStats</a> smart constructor.
data ResultPageStats

-- | Creates a value of <a>ResultPageStats</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rpsHTMLResponseBytes</a></li>
--   <li><a>rpsTotalRequestBytes</a></li>
--   <li><a>rpsNumberResources</a></li>
--   <li><a>rpsNumberStaticResources</a></li>
--   <li><a>rpsNumberHosts</a></li>
--   <li><a>rpsNumberJsResources</a></li>
--   <li><a>rpsNumberCssResources</a></li>
--   <li><a>rpsTextResponseBytes</a></li>
--   <li><a>rpsFlashResponseBytes</a></li>
--   <li><a>rpsImageResponseBytes</a></li>
--   <li><a>rpsOtherResponseBytes</a></li>
--   <li><a>rpsJavascriptResponseBytes</a></li>
--   <li><a>rpsCssResponseBytes</a></li>
--   </ul>
resultPageStats :: ResultPageStats

-- | Number of uncompressed response bytes for the main HTML document and
--   all iframes on the page.
rpsHTMLResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Total size of all request bytes sent by the page.
rpsTotalRequestBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of HTTP resources loaded by the page.
rpsNumberResources :: Lens' ResultPageStats (Maybe Int32)

-- | Number of static (i.e. cacheable) resources on the page.
rpsNumberStaticResources :: Lens' ResultPageStats (Maybe Int32)

-- | Number of unique hosts referenced by the page.
rpsNumberHosts :: Lens' ResultPageStats (Maybe Int32)

-- | Number of JavaScript resources referenced by the page.
rpsNumberJsResources :: Lens' ResultPageStats (Maybe Int32)

-- | Number of CSS resources referenced by the page.
rpsNumberCssResources :: Lens' ResultPageStats (Maybe Int32)

-- | 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.
rpsTextResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of response bytes for flash resources on the page.
rpsFlashResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of response bytes for image resources on the page.
rpsImageResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of response bytes for other resources on the page.
rpsOtherResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of uncompressed response bytes for JS resources on the page.
rpsJavascriptResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | Number of uncompressed response bytes for CSS resources on the page.
rpsCssResponseBytes :: Lens' ResultPageStats (Maybe Int64)

-- | The region of the page that is captured by this image, with dimensions
--   measured in CSS pixels.
--   
--   <i>See:</i> <a>pagespeedAPIImageV2Page_rect</a> smart constructor.
data PagespeedAPIImageV2Page_rect

-- | Creates a value of <a>PagespeedAPIImageV2Page_rect</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>paivpHeight</a></li>
--   <li><a>paivpLeft</a></li>
--   <li><a>paivpWidth</a></li>
--   <li><a>paivpTop</a></li>
--   </ul>
pagespeedAPIImageV2Page_rect :: PagespeedAPIImageV2Page_rect

-- | The height of the rect.
paivpHeight :: Lens' PagespeedAPIImageV2Page_rect (Maybe Int32)

-- | The left coordinate of the rect, in page coordinates.
paivpLeft :: Lens' PagespeedAPIImageV2Page_rect (Maybe Int32)

-- | The width of the rect.
paivpWidth :: Lens' PagespeedAPIImageV2Page_rect (Maybe Int32)

-- | The top coordinate of the rect, in page coordinates.
paivpTop :: Lens' PagespeedAPIImageV2Page_rect (Maybe Int32)
data Result

-- | Creates a value of <a>Result</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rScreenshot</a></li>
--   <li><a>rKind</a></li>
--   <li><a>rResponseCode</a></li>
--   <li><a>rInvalidRules</a></li>
--   <li><a>rFormattedResults</a></li>
--   <li><a>rVersion</a></li>
--   <li><a>rRuleGroups</a></li>
--   <li><a>rPageStats</a></li>
--   <li><a>rId</a></li>
--   <li><a>rTitle</a></li>
--   </ul>
result :: Result

-- | Base64-encoded screenshot of the page that was analyzed.
rScreenshot :: Lens' Result (Maybe PagespeedAPIImageV2)

-- | Kind of result.
rKind :: Lens' Result Text

-- | Response code for the document. 200 indicates a normal page load.
--   4xx/5xx indicates an error.
rResponseCode :: Lens' Result (Maybe Int32)

-- | List of rules that were specified in the request, but which the server
--   did not know how to instantiate.
rInvalidRules :: Lens' Result [Text]

-- | Localized PageSpeed results. Contains a ruleResults entry for each
--   PageSpeed rule instantiated and run by the server.
rFormattedResults :: Lens' Result (Maybe ResultFormattedResults)

-- | The version of PageSpeed used to generate these results.
rVersion :: Lens' Result (Maybe ResultVersion)

-- | A map with one entry for each rule group in these results.
rRuleGroups :: Lens' Result (Maybe ResultRuleGroups)

-- | Summary statistics for the page, such as number of JavaScript bytes,
--   number of HTML bytes, etc.
rPageStats :: Lens' Result (Maybe ResultPageStats)

-- | Canonicalized and final URL for the document, after following page
--   redirects (if any).
rId :: Lens' Result (Maybe Text)

-- | Title of the page, as displayed in the browser's title bar.
rTitle :: Lens' Result (Maybe Text)
data PagespeedAPIFormatStringV2ArgsItem

-- | Creates a value of <a>PagespeedAPIFormatStringV2ArgsItem</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pafsvaiValue</a></li>
--   <li><a>pafsvaiRects</a></li>
--   <li><a>pafsvaiKey</a></li>
--   <li><a>pafsvaiType</a></li>
--   <li><a>pafsvaiSecondaryRects</a></li>
--   </ul>
pagespeedAPIFormatStringV2ArgsItem :: PagespeedAPIFormatStringV2ArgsItem

-- | Argument value, as a localized string.
pafsvaiValue :: Lens' PagespeedAPIFormatStringV2ArgsItem (Maybe Text)

-- | 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.
pafsvaiRects :: Lens' PagespeedAPIFormatStringV2ArgsItem [PagespeedAPIFormatStringV2ArgsItemRectsItem]

-- | The placeholder key for this arg, as a string.
pafsvaiKey :: Lens' PagespeedAPIFormatStringV2ArgsItem (Maybe Text)

-- | Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES,
--   DURATION, VERBATIM_STRING, PERCENTAGE, HYPERLINK, or SNAPSHOT_RECT.
pafsvaiType :: Lens' PagespeedAPIFormatStringV2ArgsItem (Maybe Text)

-- | Secondary screen rectangles being referred to, with dimensions
--   measured in CSS pixels. This is only ever used for SNAPSHOT_RECT
--   arguments.
pafsvaiSecondaryRects :: Lens' PagespeedAPIFormatStringV2ArgsItem [PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem]

-- | The name of this rule group: one of "SPEED" or "USABILITY".
--   
--   <i>See:</i> <a>resultRuleGroupsAdditional</a> smart constructor.
data ResultRuleGroupsAdditional

-- | Creates a value of <a>ResultRuleGroupsAdditional</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rrgaScore</a></li>
--   </ul>
resultRuleGroupsAdditional :: ResultRuleGroupsAdditional

-- | 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.
rrgaScore :: Lens' ResultRuleGroupsAdditional (Maybe Int32)

-- | Localized PageSpeed results. Contains a ruleResults entry for each
--   PageSpeed rule instantiated and run by the server.
--   
--   <i>See:</i> <a>resultFormattedResults</a> smart constructor.
data ResultFormattedResults

-- | Creates a value of <a>ResultFormattedResults</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rfrLocale</a></li>
--   <li><a>rfrRuleResults</a></li>
--   </ul>
resultFormattedResults :: ResultFormattedResults

-- | The locale of the formattedResults, e.g. "en_US".
rfrLocale :: Lens' ResultFormattedResults (Maybe Text)

-- | Dictionary of formatted rule results, with one entry for each
--   PageSpeed rule instantiated and run by the server.
rfrRuleResults :: Lens' ResultFormattedResults (Maybe ResultFormattedResultsRuleResults)

-- | The enum-like identifier for this rule. For instance "EnableKeepAlive"
--   or "AvoidCssImport". Not localized.
--   
--   <i>See:</i> <a>resultFormattedResultsRuleResultsAdditional</a> smart
--   constructor.
data ResultFormattedResultsRuleResultsAdditional

-- | Creates a value of <a>ResultFormattedResultsRuleResultsAdditional</a>
--   with the minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rfrrraSummary</a></li>
--   <li><a>rfrrraRuleImpact</a></li>
--   <li><a>rfrrraGroups</a></li>
--   <li><a>rfrrraLocalizedRuleName</a></li>
--   <li><a>rfrrraURLBlocks</a></li>
--   </ul>
resultFormattedResultsRuleResultsAdditional :: ResultFormattedResultsRuleResultsAdditional

-- | 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.
rfrrraSummary :: Lens' ResultFormattedResultsRuleResultsAdditional (Maybe PagespeedAPIFormatStringV2)

-- | 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.
rfrrraRuleImpact :: Lens' ResultFormattedResultsRuleResultsAdditional (Maybe Double)

-- | List of rule groups that this rule belongs to. Each entry in the list
--   is one of "SPEED" or "USABILITY".
rfrrraGroups :: Lens' ResultFormattedResultsRuleResultsAdditional [Text]

-- | Localized name of the rule, intended for presentation to a user.
rfrrraLocalizedRuleName :: Lens' ResultFormattedResultsRuleResultsAdditional (Maybe Text)

-- | List of blocks of URLs. Each block may contain a heading and a list of
--   URLs. Each URL may optionally include additional details.
rfrrraURLBlocks :: Lens' ResultFormattedResultsRuleResultsAdditional [ResultFormattedResultsRuleResultsAdditionalURLBlocksItem]

-- | A map with one entry for each rule group in these results.
--   
--   <i>See:</i> <a>resultRuleGroups</a> smart constructor.
data ResultRuleGroups

-- | Creates a value of <a>ResultRuleGroups</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rrgAddtional</a></li>
--   </ul>
resultRuleGroups :: HashMap Text ResultRuleGroupsAdditional -> ResultRuleGroups

-- | The name of this rule group: one of "SPEED" or "USABILITY".
rrgAddtional :: Lens' ResultRuleGroups (HashMap Text ResultRuleGroupsAdditional)
data PagespeedAPIFormatStringV2

-- | Creates a value of <a>PagespeedAPIFormatStringV2</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pafsvArgs</a></li>
--   <li><a>pafsvFormat</a></li>
--   </ul>
pagespeedAPIFormatStringV2 :: PagespeedAPIFormatStringV2

-- | List of arguments for the format string.
pafsvArgs :: Lens' PagespeedAPIFormatStringV2 [PagespeedAPIFormatStringV2ArgsItem]

-- | 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'.
pafsvFormat :: Lens' PagespeedAPIFormatStringV2 (Maybe Text)

-- | Dictionary of formatted rule results, with one entry for each
--   PageSpeed rule instantiated and run by the server.
--   
--   <i>See:</i> <a>resultFormattedResultsRuleResults</a> smart
--   constructor.
data ResultFormattedResultsRuleResults

-- | Creates a value of <a>ResultFormattedResultsRuleResults</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rfrrrAddtional</a></li>
--   </ul>
resultFormattedResultsRuleResults :: HashMap Text ResultFormattedResultsRuleResultsAdditional -> ResultFormattedResultsRuleResults

-- | The enum-like identifier for this rule. For instance "EnableKeepAlive"
--   or "AvoidCssImport". Not localized.
rfrrrAddtional :: Lens' ResultFormattedResultsRuleResults (HashMap Text ResultFormattedResultsRuleResultsAdditional)
data ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem

-- | Creates a value of
--   <a>ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem</a>
--   with the minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rfrrraubiuiResult</a></li>
--   <li><a>rfrrraubiuiDetails</a></li>
--   </ul>
resultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem :: ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem

-- | A format string that gives information about the URL, and a list of
--   arguments for that format string.
rfrrraubiuiResult :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem (Maybe PagespeedAPIFormatStringV2)

-- | List of entries that provide additional details about a single URL.
--   Optional.
rfrrraubiuiDetails :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem [PagespeedAPIFormatStringV2]
