{-# 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.Patch
(
FloodlightActivitiesPatchResource
, floodlightActivitiesPatch
, FloodlightActivitiesPatch
, fapProFileId
, fapPayload
, fapId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type FloodlightActivitiesPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"floodlightActivities" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] FloodlightActivity :>
Patch '[JSON] FloodlightActivity
data FloodlightActivitiesPatch = FloodlightActivitiesPatch'
{ _fapProFileId :: !(Textual Int64)
, _fapPayload :: !FloodlightActivity
, _fapId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightActivitiesPatch
:: Int64
-> FloodlightActivity
-> Int64
-> FloodlightActivitiesPatch
floodlightActivitiesPatch pFapProFileId_ pFapPayload_ pFapId_ =
FloodlightActivitiesPatch'
{ _fapProFileId = _Coerce # pFapProFileId_
, _fapPayload = pFapPayload_
, _fapId = _Coerce # pFapId_
}
fapProFileId :: Lens' FloodlightActivitiesPatch Int64
fapProFileId
= lens _fapProFileId (\ s a -> s{_fapProFileId = a})
. _Coerce
fapPayload :: Lens' FloodlightActivitiesPatch FloodlightActivity
fapPayload
= lens _fapPayload (\ s a -> s{_fapPayload = a})
fapId :: Lens' FloodlightActivitiesPatch Int64
fapId
= lens _fapId (\ s a -> s{_fapId = a}) . _Coerce
instance GoogleRequest FloodlightActivitiesPatch
where
type Rs FloodlightActivitiesPatch =
FloodlightActivity
type Scopes FloodlightActivitiesPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient FloodlightActivitiesPatch'{..}
= go _fapProFileId (Just _fapId) (Just AltJSON)
_fapPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy FloodlightActivitiesPatchResource)
mempty