{-# 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.FloodlightActivities.Update
(
FloodlightActivitiesUpdateResource
, floodlightActivitiesUpdate
, FloodlightActivitiesUpdate
, fauProFileId
, fauPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type FloodlightActivitiesUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"floodlightActivities" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] FloodlightActivity :>
Put '[JSON] FloodlightActivity
data FloodlightActivitiesUpdate = FloodlightActivitiesUpdate'
{ _fauProFileId :: !(Textual Int64)
, _fauPayload :: !FloodlightActivity
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightActivitiesUpdate
:: Int64
-> FloodlightActivity
-> FloodlightActivitiesUpdate
floodlightActivitiesUpdate pFauProFileId_ pFauPayload_ =
FloodlightActivitiesUpdate'
{ _fauProFileId = _Coerce # pFauProFileId_
, _fauPayload = pFauPayload_
}
fauProFileId :: Lens' FloodlightActivitiesUpdate Int64
fauProFileId
= lens _fauProFileId (\ s a -> s{_fauProFileId = a})
. _Coerce
fauPayload :: Lens' FloodlightActivitiesUpdate FloodlightActivity
fauPayload
= lens _fauPayload (\ s a -> s{_fauPayload = a})
instance GoogleRequest FloodlightActivitiesUpdate
where
type Rs FloodlightActivitiesUpdate =
FloodlightActivity
type Scopes FloodlightActivitiesUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient FloodlightActivitiesUpdate'{..}
= go _fauProFileId (Just AltJSON) _fauPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy FloodlightActivitiesUpdateResource)
mempty