{-# 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.Insert
(
FloodlightActivitiesInsertResource
, floodlightActivitiesInsert
, FloodlightActivitiesInsert
, faiProFileId
, faiPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type FloodlightActivitiesInsertResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"floodlightActivities" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] FloodlightActivity :>
Post '[JSON] FloodlightActivity
data FloodlightActivitiesInsert = FloodlightActivitiesInsert'
{ _faiProFileId :: !(Textual Int64)
, _faiPayload :: !FloodlightActivity
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightActivitiesInsert
:: Int64
-> FloodlightActivity
-> FloodlightActivitiesInsert
floodlightActivitiesInsert pFaiProFileId_ pFaiPayload_ =
FloodlightActivitiesInsert'
{ _faiProFileId = _Coerce # pFaiProFileId_
, _faiPayload = pFaiPayload_
}
faiProFileId :: Lens' FloodlightActivitiesInsert Int64
faiProFileId
= lens _faiProFileId (\ s a -> s{_faiProFileId = a})
. _Coerce
faiPayload :: Lens' FloodlightActivitiesInsert FloodlightActivity
faiPayload
= lens _faiPayload (\ s a -> s{_faiPayload = a})
instance GoogleRequest FloodlightActivitiesInsert
where
type Rs FloodlightActivitiesInsert =
FloodlightActivity
type Scopes FloodlightActivitiesInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient FloodlightActivitiesInsert'{..}
= go _faiProFileId (Just AltJSON) _faiPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy FloodlightActivitiesInsertResource)
mempty