{-# 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.Analytics.Management.WebProperties.Patch
(
ManagementWebPropertiesPatchResource
, managementWebPropertiesPatch
, ManagementWebPropertiesPatch
, mwppWebPropertyId
, mwppPayload
, mwppAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementWebPropertiesPatchResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] WebProperty :>
Patch '[JSON] WebProperty
data ManagementWebPropertiesPatch = ManagementWebPropertiesPatch'
{ _mwppWebPropertyId :: !Text
, _mwppPayload :: !WebProperty
, _mwppAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementWebPropertiesPatch
:: Text
-> WebProperty
-> Text
-> ManagementWebPropertiesPatch
managementWebPropertiesPatch pMwppWebPropertyId_ pMwppPayload_ pMwppAccountId_ =
ManagementWebPropertiesPatch'
{ _mwppWebPropertyId = pMwppWebPropertyId_
, _mwppPayload = pMwppPayload_
, _mwppAccountId = pMwppAccountId_
}
mwppWebPropertyId :: Lens' ManagementWebPropertiesPatch Text
mwppWebPropertyId
= lens _mwppWebPropertyId
(\ s a -> s{_mwppWebPropertyId = a})
mwppPayload :: Lens' ManagementWebPropertiesPatch WebProperty
mwppPayload
= lens _mwppPayload (\ s a -> s{_mwppPayload = a})
mwppAccountId :: Lens' ManagementWebPropertiesPatch Text
mwppAccountId
= lens _mwppAccountId
(\ s a -> s{_mwppAccountId = a})
instance GoogleRequest ManagementWebPropertiesPatch
where
type Rs ManagementWebPropertiesPatch = WebProperty
type Scopes ManagementWebPropertiesPatch =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementWebPropertiesPatch'{..}
= go _mwppAccountId _mwppWebPropertyId (Just AltJSON)
_mwppPayload
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementWebPropertiesPatchResource)
mempty