{-# 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.Patch
(
EventTagsPatchResource
, eventTagsPatch
, EventTagsPatch
, etpProFileId
, etpPayload
, etpId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type EventTagsPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"eventTags" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EventTag :> Patch '[JSON] EventTag
data EventTagsPatch = EventTagsPatch'
{ _etpProFileId :: !(Textual Int64)
, _etpPayload :: !EventTag
, _etpId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
eventTagsPatch
:: Int64
-> EventTag
-> Int64
-> EventTagsPatch
eventTagsPatch pEtpProFileId_ pEtpPayload_ pEtpId_ =
EventTagsPatch'
{ _etpProFileId = _Coerce # pEtpProFileId_
, _etpPayload = pEtpPayload_
, _etpId = _Coerce # pEtpId_
}
etpProFileId :: Lens' EventTagsPatch Int64
etpProFileId
= lens _etpProFileId (\ s a -> s{_etpProFileId = a})
. _Coerce
etpPayload :: Lens' EventTagsPatch EventTag
etpPayload
= lens _etpPayload (\ s a -> s{_etpPayload = a})
etpId :: Lens' EventTagsPatch Int64
etpId
= lens _etpId (\ s a -> s{_etpId = a}) . _Coerce
instance GoogleRequest EventTagsPatch where
type Rs EventTagsPatch = EventTag
type Scopes EventTagsPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient EventTagsPatch'{..}
= go _etpProFileId (Just _etpId) (Just AltJSON)
_etpPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy EventTagsPatchResource)
mempty