{-# 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.DFAReporting.Sites.Patch
(
SitesPatchResource
, sitesPatch
, SitesPatch
, spProFileId
, spPayload
, spId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type SitesPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"sites" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Site :> Patch '[JSON] Site
data SitesPatch = SitesPatch'
{ _spProFileId :: !(Textual Int64)
, _spPayload :: !Site
, _spId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
sitesPatch
:: Int64
-> Site
-> Int64
-> SitesPatch
sitesPatch pSpProFileId_ pSpPayload_ pSpId_ =
SitesPatch'
{ _spProFileId = _Coerce # pSpProFileId_
, _spPayload = pSpPayload_
, _spId = _Coerce # pSpId_
}
spProFileId :: Lens' SitesPatch Int64
spProFileId
= lens _spProFileId (\ s a -> s{_spProFileId = a}) .
_Coerce
spPayload :: Lens' SitesPatch Site
spPayload
= lens _spPayload (\ s a -> s{_spPayload = a})
spId :: Lens' SitesPatch Int64
spId = lens _spId (\ s a -> s{_spId = a}) . _Coerce
instance GoogleRequest SitesPatch where
type Rs SitesPatch = Site
type Scopes SitesPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient SitesPatch'{..}
= go _spProFileId (Just _spId) (Just AltJSON)
_spPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy SitesPatchResource)
mempty