{-# 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.Data.Mcf.Get
(
DataMcfGetResource
, dataMcfGet
, DataMcfGet
, dmgMetrics
, dmgSamplingLevel
, dmgFilters
, dmgIds
, dmgEndDate
, dmgSort
, dmgDimensions
, dmgStartIndex
, dmgMaxResults
, dmgStartDate
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type DataMcfGetResource =
"analytics" :>
"v3" :>
"data" :>
"mcf" :>
QueryParam "ids" Text :>
QueryParam "start-date" Text :>
QueryParam "end-date" Text :>
QueryParam "metrics" Text :>
QueryParam "samplingLevel" DataMcfGetSamplingLevel :>
QueryParam "filters" Text :>
QueryParam "sort" Text :>
QueryParam "dimensions" Text :>
QueryParam "start-index" (Textual Int32) :>
QueryParam "max-results" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] McfData
data DataMcfGet = DataMcfGet'
{ _dmgMetrics :: !Text
, _dmgSamplingLevel :: !(Maybe DataMcfGetSamplingLevel)
, _dmgFilters :: !(Maybe Text)
, _dmgIds :: !Text
, _dmgEndDate :: !Text
, _dmgSort :: !(Maybe Text)
, _dmgDimensions :: !(Maybe Text)
, _dmgStartIndex :: !(Maybe (Textual Int32))
, _dmgMaxResults :: !(Maybe (Textual Int32))
, _dmgStartDate :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
dataMcfGet
:: Text
-> Text
-> Text
-> Text
-> DataMcfGet
dataMcfGet pDmgMetrics_ pDmgIds_ pDmgEndDate_ pDmgStartDate_ =
DataMcfGet'
{ _dmgMetrics = pDmgMetrics_
, _dmgSamplingLevel = Nothing
, _dmgFilters = Nothing
, _dmgIds = pDmgIds_
, _dmgEndDate = pDmgEndDate_
, _dmgSort = Nothing
, _dmgDimensions = Nothing
, _dmgStartIndex = Nothing
, _dmgMaxResults = Nothing
, _dmgStartDate = pDmgStartDate_
}
dmgMetrics :: Lens' DataMcfGet Text
dmgMetrics
= lens _dmgMetrics (\ s a -> s{_dmgMetrics = a})
dmgSamplingLevel :: Lens' DataMcfGet (Maybe DataMcfGetSamplingLevel)
dmgSamplingLevel
= lens _dmgSamplingLevel
(\ s a -> s{_dmgSamplingLevel = a})
dmgFilters :: Lens' DataMcfGet (Maybe Text)
dmgFilters
= lens _dmgFilters (\ s a -> s{_dmgFilters = a})
dmgIds :: Lens' DataMcfGet Text
dmgIds = lens _dmgIds (\ s a -> s{_dmgIds = a})
dmgEndDate :: Lens' DataMcfGet Text
dmgEndDate
= lens _dmgEndDate (\ s a -> s{_dmgEndDate = a})
dmgSort :: Lens' DataMcfGet (Maybe Text)
dmgSort = lens _dmgSort (\ s a -> s{_dmgSort = a})
dmgDimensions :: Lens' DataMcfGet (Maybe Text)
dmgDimensions
= lens _dmgDimensions
(\ s a -> s{_dmgDimensions = a})
dmgStartIndex :: Lens' DataMcfGet (Maybe Int32)
dmgStartIndex
= lens _dmgStartIndex
(\ s a -> s{_dmgStartIndex = a})
. mapping _Coerce
dmgMaxResults :: Lens' DataMcfGet (Maybe Int32)
dmgMaxResults
= lens _dmgMaxResults
(\ s a -> s{_dmgMaxResults = a})
. mapping _Coerce
dmgStartDate :: Lens' DataMcfGet Text
dmgStartDate
= lens _dmgStartDate (\ s a -> s{_dmgStartDate = a})
instance GoogleRequest DataMcfGet where
type Rs DataMcfGet = McfData
type Scopes DataMcfGet =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient DataMcfGet'{..}
= go (Just _dmgIds) (Just _dmgStartDate)
(Just _dmgEndDate)
(Just _dmgMetrics)
_dmgSamplingLevel
_dmgFilters
_dmgSort
_dmgDimensions
_dmgStartIndex
_dmgMaxResults
(Just AltJSON)
analyticsService
where go
= buildClient (Proxy :: Proxy DataMcfGetResource)
mempty