{-# 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.Update
(
ManagementWebPropertiesUpdateResource
, managementWebPropertiesUpdate
, ManagementWebPropertiesUpdate
, mwpuWebPropertyId
, mwpuPayload
, mwpuAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementWebPropertiesUpdateResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] WebProperty :>
Put '[JSON] WebProperty
data ManagementWebPropertiesUpdate = ManagementWebPropertiesUpdate'
{ _mwpuWebPropertyId :: !Text
, _mwpuPayload :: !WebProperty
, _mwpuAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementWebPropertiesUpdate
:: Text
-> WebProperty
-> Text
-> ManagementWebPropertiesUpdate
managementWebPropertiesUpdate pMwpuWebPropertyId_ pMwpuPayload_ pMwpuAccountId_ =
ManagementWebPropertiesUpdate'
{ _mwpuWebPropertyId = pMwpuWebPropertyId_
, _mwpuPayload = pMwpuPayload_
, _mwpuAccountId = pMwpuAccountId_
}
mwpuWebPropertyId :: Lens' ManagementWebPropertiesUpdate Text
mwpuWebPropertyId
= lens _mwpuWebPropertyId
(\ s a -> s{_mwpuWebPropertyId = a})
mwpuPayload :: Lens' ManagementWebPropertiesUpdate WebProperty
mwpuPayload
= lens _mwpuPayload (\ s a -> s{_mwpuPayload = a})
mwpuAccountId :: Lens' ManagementWebPropertiesUpdate Text
mwpuAccountId
= lens _mwpuAccountId
(\ s a -> s{_mwpuAccountId = a})
instance GoogleRequest ManagementWebPropertiesUpdate
where
type Rs ManagementWebPropertiesUpdate = WebProperty
type Scopes ManagementWebPropertiesUpdate =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementWebPropertiesUpdate'{..}
= go _mwpuAccountId _mwpuWebPropertyId (Just AltJSON)
_mwpuPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementWebPropertiesUpdateResource)
mempty