{-# 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.PlacementGroups.Update
(
PlacementGroupsUpdateResource
, placementGroupsUpdate
, PlacementGroupsUpdate
, pguProFileId
, pguPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type PlacementGroupsUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"placementGroups" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PlacementGroup :>
Put '[JSON] PlacementGroup
data PlacementGroupsUpdate = PlacementGroupsUpdate'
{ _pguProFileId :: !(Textual Int64)
, _pguPayload :: !PlacementGroup
} deriving (Eq,Show,Data,Typeable,Generic)
placementGroupsUpdate
:: Int64
-> PlacementGroup
-> PlacementGroupsUpdate
placementGroupsUpdate pPguProFileId_ pPguPayload_ =
PlacementGroupsUpdate'
{ _pguProFileId = _Coerce # pPguProFileId_
, _pguPayload = pPguPayload_
}
pguProFileId :: Lens' PlacementGroupsUpdate Int64
pguProFileId
= lens _pguProFileId (\ s a -> s{_pguProFileId = a})
. _Coerce
pguPayload :: Lens' PlacementGroupsUpdate PlacementGroup
pguPayload
= lens _pguPayload (\ s a -> s{_pguPayload = a})
instance GoogleRequest PlacementGroupsUpdate where
type Rs PlacementGroupsUpdate = PlacementGroup
type Scopes PlacementGroupsUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PlacementGroupsUpdate'{..}
= go _pguProFileId (Just AltJSON) _pguPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy PlacementGroupsUpdateResource)
mempty