{-# 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.Update
(
SitesUpdateResource
, sitesUpdate
, SitesUpdate
, suProFileId
, suPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type SitesUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"sites" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Site :> Put '[JSON] Site
data SitesUpdate = SitesUpdate'
{ _suProFileId :: !(Textual Int64)
, _suPayload :: !Site
} deriving (Eq,Show,Data,Typeable,Generic)
sitesUpdate
:: Int64
-> Site
-> SitesUpdate
sitesUpdate pSuProFileId_ pSuPayload_ =
SitesUpdate'
{ _suProFileId = _Coerce # pSuProFileId_
, _suPayload = pSuPayload_
}
suProFileId :: Lens' SitesUpdate Int64
suProFileId
= lens _suProFileId (\ s a -> s{_suProFileId = a}) .
_Coerce
suPayload :: Lens' SitesUpdate Site
suPayload
= lens _suPayload (\ s a -> s{_suPayload = a})
instance GoogleRequest SitesUpdate where
type Rs SitesUpdate = Site
type Scopes SitesUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient SitesUpdate'{..}
= go _suProFileId (Just AltJSON) _suPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy SitesUpdateResource)
mempty