{-# 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.Update
(
FloodlightConfigurationsUpdateResource
, floodlightConfigurationsUpdate
, FloodlightConfigurationsUpdate
, fcuProFileId
, fcuPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type FloodlightConfigurationsUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"floodlightConfigurations" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] FloodlightConfiguration :>
Put '[JSON] FloodlightConfiguration
data FloodlightConfigurationsUpdate = FloodlightConfigurationsUpdate'
{ _fcuProFileId :: !(Textual Int64)
, _fcuPayload :: !FloodlightConfiguration
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightConfigurationsUpdate
:: Int64
-> FloodlightConfiguration
-> FloodlightConfigurationsUpdate
floodlightConfigurationsUpdate pFcuProFileId_ pFcuPayload_ =
FloodlightConfigurationsUpdate'
{ _fcuProFileId = _Coerce # pFcuProFileId_
, _fcuPayload = pFcuPayload_
}
fcuProFileId :: Lens' FloodlightConfigurationsUpdate Int64
fcuProFileId
= lens _fcuProFileId (\ s a -> s{_fcuProFileId = a})
. _Coerce
fcuPayload :: Lens' FloodlightConfigurationsUpdate FloodlightConfiguration
fcuPayload
= lens _fcuPayload (\ s a -> s{_fcuPayload = a})
instance GoogleRequest FloodlightConfigurationsUpdate
where
type Rs FloodlightConfigurationsUpdate =
FloodlightConfiguration
type Scopes FloodlightConfigurationsUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient FloodlightConfigurationsUpdate'{..}
= go _fcuProFileId (Just AltJSON) _fcuPayload
dFAReportingService
where go
= buildClient
(Proxy ::
Proxy FloodlightConfigurationsUpdateResource)
mempty