{-# 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.FloodlightActivityGroups.Insert
(
FloodlightActivityGroupsInsertResource
, floodlightActivityGroupsInsert
, FloodlightActivityGroupsInsert
, fagiProFileId
, fagiPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type FloodlightActivityGroupsInsertResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"floodlightActivityGroups" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] FloodlightActivityGroup :>
Post '[JSON] FloodlightActivityGroup
data FloodlightActivityGroupsInsert = FloodlightActivityGroupsInsert'
{ _fagiProFileId :: !(Textual Int64)
, _fagiPayload :: !FloodlightActivityGroup
} deriving (Eq,Show,Data,Typeable,Generic)
floodlightActivityGroupsInsert
:: Int64
-> FloodlightActivityGroup
-> FloodlightActivityGroupsInsert
floodlightActivityGroupsInsert pFagiProFileId_ pFagiPayload_ =
FloodlightActivityGroupsInsert'
{ _fagiProFileId = _Coerce # pFagiProFileId_
, _fagiPayload = pFagiPayload_
}
fagiProFileId :: Lens' FloodlightActivityGroupsInsert Int64
fagiProFileId
= lens _fagiProFileId
(\ s a -> s{_fagiProFileId = a})
. _Coerce
fagiPayload :: Lens' FloodlightActivityGroupsInsert FloodlightActivityGroup
fagiPayload
= lens _fagiPayload (\ s a -> s{_fagiPayload = a})
instance GoogleRequest FloodlightActivityGroupsInsert
where
type Rs FloodlightActivityGroupsInsert =
FloodlightActivityGroup
type Scopes FloodlightActivityGroupsInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient FloodlightActivityGroupsInsert'{..}
= go _fagiProFileId (Just AltJSON) _fagiPayload
dFAReportingService
where go
= buildClient
(Proxy ::
Proxy FloodlightActivityGroupsInsertResource)
mempty