{-# 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.Placements.Update
(
PlacementsUpdateResource
, placementsUpdate
, PlacementsUpdate
, puProFileId
, puPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type PlacementsUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"placements" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Placement :> Put '[JSON] Placement
data PlacementsUpdate = PlacementsUpdate'
{ _puProFileId :: !(Textual Int64)
, _puPayload :: !Placement
} deriving (Eq,Show,Data,Typeable,Generic)
placementsUpdate
:: Int64
-> Placement
-> PlacementsUpdate
placementsUpdate pPuProFileId_ pPuPayload_ =
PlacementsUpdate'
{ _puProFileId = _Coerce # pPuProFileId_
, _puPayload = pPuPayload_
}
puProFileId :: Lens' PlacementsUpdate Int64
puProFileId
= lens _puProFileId (\ s a -> s{_puProFileId = a}) .
_Coerce
puPayload :: Lens' PlacementsUpdate Placement
puPayload
= lens _puPayload (\ s a -> s{_puPayload = a})
instance GoogleRequest PlacementsUpdate where
type Rs PlacementsUpdate = Placement
type Scopes PlacementsUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PlacementsUpdate'{..}
= go _puProFileId (Just AltJSON) _puPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy PlacementsUpdateResource)
mempty