{-# 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.Get
(
SitemapsGetResource
, sitemapsGet
, SitemapsGet
, sgFeedpath
, sgSiteURL
) where
import Network.Google.Prelude
import Network.Google.WebmasterTools.Types
type SitemapsGetResource =
"webmasters" :>
"v3" :>
"sites" :>
Capture "siteUrl" Text :>
"sitemaps" :>
Capture "feedpath" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] WmxSitemap
data SitemapsGet = SitemapsGet'
{ _sgFeedpath :: !Text
, _sgSiteURL :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
sitemapsGet
:: Text
-> Text
-> SitemapsGet
sitemapsGet pSgFeedpath_ pSgSiteURL_ =
SitemapsGet'
{ _sgFeedpath = pSgFeedpath_
, _sgSiteURL = pSgSiteURL_
}
sgFeedpath :: Lens' SitemapsGet Text
sgFeedpath
= lens _sgFeedpath (\ s a -> s{_sgFeedpath = a})
sgSiteURL :: Lens' SitemapsGet Text
sgSiteURL
= lens _sgSiteURL (\ s a -> s{_sgSiteURL = a})
instance GoogleRequest SitemapsGet where
type Rs SitemapsGet = WmxSitemap
type Scopes SitemapsGet =
'["https://www.googleapis.com/auth/webmasters",
"https://www.googleapis.com/auth/webmasters.readonly"]
requestClient SitemapsGet'{..}
= go _sgSiteURL _sgFeedpath (Just AltJSON)
webmasterToolsService
where go
= buildClient (Proxy :: Proxy SitemapsGetResource)
mempty