{-# 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.Submit
(
SitemapsSubmitResource
, sitemapsSubmit
, SitemapsSubmit
, ssFeedpath
, ssSiteURL
) where
import Network.Google.Prelude
import Network.Google.WebmasterTools.Types
type SitemapsSubmitResource =
"webmasters" :>
"v3" :>
"sites" :>
Capture "siteUrl" Text :>
"sitemaps" :>
Capture "feedpath" Text :>
QueryParam "alt" AltJSON :> Put '[JSON] ()
data SitemapsSubmit = SitemapsSubmit'
{ _ssFeedpath :: !Text
, _ssSiteURL :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
sitemapsSubmit
:: Text
-> Text
-> SitemapsSubmit
sitemapsSubmit pSsFeedpath_ pSsSiteURL_ =
SitemapsSubmit'
{ _ssFeedpath = pSsFeedpath_
, _ssSiteURL = pSsSiteURL_
}
ssFeedpath :: Lens' SitemapsSubmit Text
ssFeedpath
= lens _ssFeedpath (\ s a -> s{_ssFeedpath = a})
ssSiteURL :: Lens' SitemapsSubmit Text
ssSiteURL
= lens _ssSiteURL (\ s a -> s{_ssSiteURL = a})
instance GoogleRequest SitemapsSubmit where
type Rs SitemapsSubmit = ()
type Scopes SitemapsSubmit =
'["https://www.googleapis.com/auth/webmasters"]
requestClient SitemapsSubmit'{..}
= go _ssSiteURL _ssFeedpath (Just AltJSON)
webmasterToolsService
where go
= buildClient (Proxy :: Proxy SitemapsSubmitResource)
mempty