{-# 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.Accounts.List
(
ManagementAccountsListResource
, managementAccountsList
, ManagementAccountsList
, malStartIndex
, malMaxResults
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementAccountsListResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
QueryParam "start-index" (Textual Int32) :>
QueryParam "max-results" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Accounts
data ManagementAccountsList = ManagementAccountsList'
{ _malStartIndex :: !(Maybe (Textual Int32))
, _malMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
managementAccountsList
:: ManagementAccountsList
managementAccountsList =
ManagementAccountsList'
{ _malStartIndex = Nothing
, _malMaxResults = Nothing
}
malStartIndex :: Lens' ManagementAccountsList (Maybe Int32)
malStartIndex
= lens _malStartIndex
(\ s a -> s{_malStartIndex = a})
. mapping _Coerce
malMaxResults :: Lens' ManagementAccountsList (Maybe Int32)
malMaxResults
= lens _malMaxResults
(\ s a -> s{_malMaxResults = a})
. mapping _Coerce
instance GoogleRequest ManagementAccountsList where
type Rs ManagementAccountsList = Accounts
type Scopes ManagementAccountsList =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementAccountsList'{..}
= go _malStartIndex _malMaxResults (Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementAccountsListResource)
mempty