{-# 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.PlacementStrategies.Patch
(
PlacementStrategiesPatchResource
, placementStrategiesPatch
, PlacementStrategiesPatch
, pspProFileId
, pspPayload
, pspId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type PlacementStrategiesPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"placementStrategies" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PlacementStrategy :>
Patch '[JSON] PlacementStrategy
data PlacementStrategiesPatch = PlacementStrategiesPatch'
{ _pspProFileId :: !(Textual Int64)
, _pspPayload :: !PlacementStrategy
, _pspId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
placementStrategiesPatch
:: Int64
-> PlacementStrategy
-> Int64
-> PlacementStrategiesPatch
placementStrategiesPatch pPspProFileId_ pPspPayload_ pPspId_ =
PlacementStrategiesPatch'
{ _pspProFileId = _Coerce # pPspProFileId_
, _pspPayload = pPspPayload_
, _pspId = _Coerce # pPspId_
}
pspProFileId :: Lens' PlacementStrategiesPatch Int64
pspProFileId
= lens _pspProFileId (\ s a -> s{_pspProFileId = a})
. _Coerce
pspPayload :: Lens' PlacementStrategiesPatch PlacementStrategy
pspPayload
= lens _pspPayload (\ s a -> s{_pspPayload = a})
pspId :: Lens' PlacementStrategiesPatch Int64
pspId
= lens _pspId (\ s a -> s{_pspId = a}) . _Coerce
instance GoogleRequest PlacementStrategiesPatch where
type Rs PlacementStrategiesPatch = PlacementStrategy
type Scopes PlacementStrategiesPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PlacementStrategiesPatch'{..}
= go _pspProFileId (Just _pspId) (Just AltJSON)
_pspPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy PlacementStrategiesPatchResource)
mempty