{-# 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.Patch
(
PlacementsPatchResource
, placementsPatch
, PlacementsPatch
, ppProFileId
, ppPayload
, ppId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type PlacementsPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"placements" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Placement :> Patch '[JSON] Placement
data PlacementsPatch = PlacementsPatch'
{ _ppProFileId :: !(Textual Int64)
, _ppPayload :: !Placement
, _ppId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
placementsPatch
:: Int64
-> Placement
-> Int64
-> PlacementsPatch
placementsPatch pPpProFileId_ pPpPayload_ pPpId_ =
PlacementsPatch'
{ _ppProFileId = _Coerce # pPpProFileId_
, _ppPayload = pPpPayload_
, _ppId = _Coerce # pPpId_
}
ppProFileId :: Lens' PlacementsPatch Int64
ppProFileId
= lens _ppProFileId (\ s a -> s{_ppProFileId = a}) .
_Coerce
ppPayload :: Lens' PlacementsPatch Placement
ppPayload
= lens _ppPayload (\ s a -> s{_ppPayload = a})
ppId :: Lens' PlacementsPatch Int64
ppId = lens _ppId (\ s a -> s{_ppId = a}) . _Coerce
instance GoogleRequest PlacementsPatch where
type Rs PlacementsPatch = Placement
type Scopes PlacementsPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PlacementsPatch'{..}
= go _ppProFileId (Just _ppId) (Just AltJSON)
_ppPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy PlacementsPatchResource)
mempty