{-# 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.Get
(
ManagementWebPropertiesGetResource
, managementWebPropertiesGet
, ManagementWebPropertiesGet
, mwpgWebPropertyId
, mwpgAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementWebPropertiesGetResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] WebProperty
data ManagementWebPropertiesGet = ManagementWebPropertiesGet'
{ _mwpgWebPropertyId :: !Text
, _mwpgAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementWebPropertiesGet
:: Text
-> Text
-> ManagementWebPropertiesGet
managementWebPropertiesGet pMwpgWebPropertyId_ pMwpgAccountId_ =
ManagementWebPropertiesGet'
{ _mwpgWebPropertyId = pMwpgWebPropertyId_
, _mwpgAccountId = pMwpgAccountId_
}
mwpgWebPropertyId :: Lens' ManagementWebPropertiesGet Text
mwpgWebPropertyId
= lens _mwpgWebPropertyId
(\ s a -> s{_mwpgWebPropertyId = a})
mwpgAccountId :: Lens' ManagementWebPropertiesGet Text
mwpgAccountId
= lens _mwpgAccountId
(\ s a -> s{_mwpgAccountId = a})
instance GoogleRequest ManagementWebPropertiesGet
where
type Rs ManagementWebPropertiesGet = WebProperty
type Scopes ManagementWebPropertiesGet =
'["https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementWebPropertiesGet'{..}
= go _mwpgAccountId _mwpgWebPropertyId (Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementWebPropertiesGetResource)
mempty