{-# 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.Reports.EntityUsageReports.Get
(
EntityUsageReportsGetResource
, entityUsageReportsGet
, EntityUsageReportsGet
, eurgEntityType
, eurgFilters
, eurgCustomerId
, eurgDate
, eurgEntityKey
, eurgParameters
, eurgPageToken
, eurgMaxResults
) where
import Network.Google.Prelude
import Network.Google.Reports.Types
type EntityUsageReportsGetResource =
"admin" :>
"reports" :>
"v1" :>
"usage" :>
Capture "entityType" Text :>
Capture "entityKey" Text :>
"dates" :>
Capture "date" Text :>
QueryParam "filters" Text :>
QueryParam "customerId" Text :>
QueryParam "parameters" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] UsageReports
data EntityUsageReportsGet = EntityUsageReportsGet'
{ _eurgEntityType :: !Text
, _eurgFilters :: !(Maybe Text)
, _eurgCustomerId :: !(Maybe Text)
, _eurgDate :: !Text
, _eurgEntityKey :: !Text
, _eurgParameters :: !(Maybe Text)
, _eurgPageToken :: !(Maybe Text)
, _eurgMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
entityUsageReportsGet
:: Text
-> Text
-> Text
-> EntityUsageReportsGet
entityUsageReportsGet pEurgEntityType_ pEurgDate_ pEurgEntityKey_ =
EntityUsageReportsGet'
{ _eurgEntityType = pEurgEntityType_
, _eurgFilters = Nothing
, _eurgCustomerId = Nothing
, _eurgDate = pEurgDate_
, _eurgEntityKey = pEurgEntityKey_
, _eurgParameters = Nothing
, _eurgPageToken = Nothing
, _eurgMaxResults = Nothing
}
eurgEntityType :: Lens' EntityUsageReportsGet Text
eurgEntityType
= lens _eurgEntityType
(\ s a -> s{_eurgEntityType = a})
eurgFilters :: Lens' EntityUsageReportsGet (Maybe Text)
eurgFilters
= lens _eurgFilters (\ s a -> s{_eurgFilters = a})
eurgCustomerId :: Lens' EntityUsageReportsGet (Maybe Text)
eurgCustomerId
= lens _eurgCustomerId
(\ s a -> s{_eurgCustomerId = a})
eurgDate :: Lens' EntityUsageReportsGet Text
eurgDate = lens _eurgDate (\ s a -> s{_eurgDate = a})
eurgEntityKey :: Lens' EntityUsageReportsGet Text
eurgEntityKey
= lens _eurgEntityKey
(\ s a -> s{_eurgEntityKey = a})
eurgParameters :: Lens' EntityUsageReportsGet (Maybe Text)
eurgParameters
= lens _eurgParameters
(\ s a -> s{_eurgParameters = a})
eurgPageToken :: Lens' EntityUsageReportsGet (Maybe Text)
eurgPageToken
= lens _eurgPageToken
(\ s a -> s{_eurgPageToken = a})
eurgMaxResults :: Lens' EntityUsageReportsGet (Maybe Word32)
eurgMaxResults
= lens _eurgMaxResults
(\ s a -> s{_eurgMaxResults = a})
. mapping _Coerce
instance GoogleRequest EntityUsageReportsGet where
type Rs EntityUsageReportsGet = UsageReports
type Scopes EntityUsageReportsGet =
'["https://www.googleapis.com/auth/admin.reports.usage.readonly"]
requestClient EntityUsageReportsGet'{..}
= go _eurgEntityType _eurgEntityKey _eurgDate
_eurgFilters
_eurgCustomerId
_eurgParameters
_eurgPageToken
_eurgMaxResults
(Just AltJSON)
reportsService
where go
= buildClient
(Proxy :: Proxy EntityUsageReportsGetResource)
mempty