{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Webmasters.Sitemaps.List
(
SitemapsListResource
, sitemapsList
, SitemapsList
, slSiteURL
, slSitemapIndex
) where
import Network.Google.Prelude
import Network.Google.WebmasterTools.Types
type SitemapsListResource =
"webmasters" :>
"v3" :>
"sites" :>
Capture "siteUrl" Text :>
"sitemaps" :>
QueryParam "sitemapIndex" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] SitemapsListResponse
data SitemapsList = SitemapsList'
{ _slSiteURL :: !Text
, _slSitemapIndex :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sitemapsList
:: Text
-> SitemapsList
sitemapsList pSlSiteURL_ =
SitemapsList'
{ _slSiteURL = pSlSiteURL_
, _slSitemapIndex = Nothing
}
slSiteURL :: Lens' SitemapsList Text
slSiteURL
= lens _slSiteURL (\ s a -> s{_slSiteURL = a})
slSitemapIndex :: Lens' SitemapsList (Maybe Text)
slSitemapIndex
= lens _slSitemapIndex
(\ s a -> s{_slSitemapIndex = a})
instance GoogleRequest SitemapsList where
type Rs SitemapsList = SitemapsListResponse
type Scopes SitemapsList =
'["https://www.googleapis.com/auth/webmasters",
"https://www.googleapis.com/auth/webmasters.readonly"]
requestClient SitemapsList'{..}
= go _slSiteURL _slSitemapIndex (Just AltJSON)
webmasterToolsService
where go
= buildClient (Proxy :: Proxy SitemapsListResource)
mempty