{-# 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.EventTags.Insert
(
EventTagsInsertResource
, eventTagsInsert
, EventTagsInsert
, etiProFileId
, etiPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type EventTagsInsertResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"eventTags" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EventTag :> Post '[JSON] EventTag
data EventTagsInsert = EventTagsInsert'
{ _etiProFileId :: !(Textual Int64)
, _etiPayload :: !EventTag
} deriving (Eq,Show,Data,Typeable,Generic)
eventTagsInsert
:: Int64
-> EventTag
-> EventTagsInsert
eventTagsInsert pEtiProFileId_ pEtiPayload_ =
EventTagsInsert'
{ _etiProFileId = _Coerce # pEtiProFileId_
, _etiPayload = pEtiPayload_
}
etiProFileId :: Lens' EventTagsInsert Int64
etiProFileId
= lens _etiProFileId (\ s a -> s{_etiProFileId = a})
. _Coerce
etiPayload :: Lens' EventTagsInsert EventTag
etiPayload
= lens _etiPayload (\ s a -> s{_etiPayload = a})
instance GoogleRequest EventTagsInsert where
type Rs EventTagsInsert = EventTag
type Scopes EventTagsInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient EventTagsInsert'{..}
= go _etiProFileId (Just AltJSON) _etiPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy EventTagsInsertResource)
mempty