{-# 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.Update
(
PlacementStrategiesUpdateResource
, placementStrategiesUpdate
, PlacementStrategiesUpdate
, psuProFileId
, psuPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type PlacementStrategiesUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"placementStrategies" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PlacementStrategy :>
Put '[JSON] PlacementStrategy
data PlacementStrategiesUpdate = PlacementStrategiesUpdate'
{ _psuProFileId :: !(Textual Int64)
, _psuPayload :: !PlacementStrategy
} deriving (Eq,Show,Data,Typeable,Generic)
placementStrategiesUpdate
:: Int64
-> PlacementStrategy
-> PlacementStrategiesUpdate
placementStrategiesUpdate pPsuProFileId_ pPsuPayload_ =
PlacementStrategiesUpdate'
{ _psuProFileId = _Coerce # pPsuProFileId_
, _psuPayload = pPsuPayload_
}
psuProFileId :: Lens' PlacementStrategiesUpdate Int64
psuProFileId
= lens _psuProFileId (\ s a -> s{_psuProFileId = a})
. _Coerce
psuPayload :: Lens' PlacementStrategiesUpdate PlacementStrategy
psuPayload
= lens _psuPayload (\ s a -> s{_psuPayload = a})
instance GoogleRequest PlacementStrategiesUpdate
where
type Rs PlacementStrategiesUpdate = PlacementStrategy
type Scopes PlacementStrategiesUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PlacementStrategiesUpdate'{..}
= go _psuProFileId (Just AltJSON) _psuPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy PlacementStrategiesUpdateResource)
mempty