{-# 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.List
(
ManagementWebPropertiesListResource
, managementWebPropertiesList
, ManagementWebPropertiesList
, mwplAccountId
, mwplStartIndex
, mwplMaxResults
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementWebPropertiesListResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
QueryParam "start-index" (Textual Int32) :>
QueryParam "max-results" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] WebProperties
data ManagementWebPropertiesList = ManagementWebPropertiesList'
{ _mwplAccountId :: !Text
, _mwplStartIndex :: !(Maybe (Textual Int32))
, _mwplMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
managementWebPropertiesList
:: Text
-> ManagementWebPropertiesList
managementWebPropertiesList pMwplAccountId_ =
ManagementWebPropertiesList'
{ _mwplAccountId = pMwplAccountId_
, _mwplStartIndex = Nothing
, _mwplMaxResults = Nothing
}
mwplAccountId :: Lens' ManagementWebPropertiesList Text
mwplAccountId
= lens _mwplAccountId
(\ s a -> s{_mwplAccountId = a})
mwplStartIndex :: Lens' ManagementWebPropertiesList (Maybe Int32)
mwplStartIndex
= lens _mwplStartIndex
(\ s a -> s{_mwplStartIndex = a})
. mapping _Coerce
mwplMaxResults :: Lens' ManagementWebPropertiesList (Maybe Int32)
mwplMaxResults
= lens _mwplMaxResults
(\ s a -> s{_mwplMaxResults = a})
. mapping _Coerce
instance GoogleRequest ManagementWebPropertiesList
where
type Rs ManagementWebPropertiesList = WebProperties
type Scopes ManagementWebPropertiesList =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementWebPropertiesList'{..}
= go _mwplAccountId _mwplStartIndex _mwplMaxResults
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementWebPropertiesListResource)
mempty