{-# 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.FloodlightConfigurations.Patch
(
FloodlightConfigurationsPatchResource
, floodlightConfigurationsPatch
, FloodlightConfigurationsPatch
, fcpProFileId
, fcpPayload
, fcpId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type FloodlightConfigurationsPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"floodlightConfigurations" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] FloodlightConfiguration :>
Patch '[JSON] FloodlightConfiguration
data FloodlightConfigurationsPatch = FloodlightConfigurationsPatch'
{ _fcpProFileId :: !(Textual Int64)
, _fcpPayload :: !FloodlightConfiguration
, _fcpId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightConfigurationsPatch
:: Int64
-> FloodlightConfiguration
-> Int64
-> FloodlightConfigurationsPatch
floodlightConfigurationsPatch pFcpProFileId_ pFcpPayload_ pFcpId_ =
FloodlightConfigurationsPatch'
{ _fcpProFileId = _Coerce # pFcpProFileId_
, _fcpPayload = pFcpPayload_
, _fcpId = _Coerce # pFcpId_
}
fcpProFileId :: Lens' FloodlightConfigurationsPatch Int64
fcpProFileId
= lens _fcpProFileId (\ s a -> s{_fcpProFileId = a})
. _Coerce
fcpPayload :: Lens' FloodlightConfigurationsPatch FloodlightConfiguration
fcpPayload
= lens _fcpPayload (\ s a -> s{_fcpPayload = a})
fcpId :: Lens' FloodlightConfigurationsPatch Int64
fcpId
= lens _fcpId (\ s a -> s{_fcpId = a}) . _Coerce
instance GoogleRequest FloodlightConfigurationsPatch
where
type Rs FloodlightConfigurationsPatch =
FloodlightConfiguration
type Scopes FloodlightConfigurationsPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient FloodlightConfigurationsPatch'{..}
= go _fcpProFileId (Just _fcpId) (Just AltJSON)
_fcpPayload
dFAReportingService
where go
= buildClient
(Proxy ::
Proxy FloodlightConfigurationsPatchResource)
mempty