gogol-admin-reports 0.3.0 → 0.4.0
raw patch · 9 files changed
+268/−24 lines, 9 filesdep ~gogol-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: gogol-core
API changes (from Hackage documentation)
+ Network.Google.Reports: ureEntityId :: Lens' UsageReportEntity (Maybe Text)
+ Network.Google.Reports.Types: ureEntityId :: Lens' UsageReportEntity (Maybe Text)
+ Network.Google.Resource.Reports.Activities.List: alOrgUnitId :: Lens' ActivitiesList Text
+ Network.Google.Resource.Reports.Activities.Watch: awOrgUnitId :: Lens' ActivitiesWatch Text
+ Network.Google.Resource.Reports.EntityUsageReports.Get: data EntityUsageReportsGet
+ Network.Google.Resource.Reports.EntityUsageReports.Get: entityUsageReportsGet :: Text -> Text -> Text -> EntityUsageReportsGet
+ Network.Google.Resource.Reports.EntityUsageReports.Get: eurgCustomerId :: Lens' EntityUsageReportsGet (Maybe Text)
+ Network.Google.Resource.Reports.EntityUsageReports.Get: eurgDate :: Lens' EntityUsageReportsGet Text
+ Network.Google.Resource.Reports.EntityUsageReports.Get: eurgEntityKey :: Lens' EntityUsageReportsGet Text
+ Network.Google.Resource.Reports.EntityUsageReports.Get: eurgEntityType :: Lens' EntityUsageReportsGet Text
+ Network.Google.Resource.Reports.EntityUsageReports.Get: eurgFilters :: Lens' EntityUsageReportsGet (Maybe Text)
+ Network.Google.Resource.Reports.EntityUsageReports.Get: eurgMaxResults :: Lens' EntityUsageReportsGet (Maybe Word32)
+ Network.Google.Resource.Reports.EntityUsageReports.Get: eurgPageToken :: Lens' EntityUsageReportsGet (Maybe Text)
+ Network.Google.Resource.Reports.EntityUsageReports.Get: eurgParameters :: Lens' EntityUsageReportsGet (Maybe Text)
+ Network.Google.Resource.Reports.EntityUsageReports.Get: instance Data.Data.Data Network.Google.Resource.Reports.EntityUsageReports.Get.EntityUsageReportsGet
+ Network.Google.Resource.Reports.EntityUsageReports.Get: instance GHC.Classes.Eq Network.Google.Resource.Reports.EntityUsageReports.Get.EntityUsageReportsGet
+ Network.Google.Resource.Reports.EntityUsageReports.Get: instance GHC.Generics.Generic Network.Google.Resource.Reports.EntityUsageReports.Get.EntityUsageReportsGet
+ Network.Google.Resource.Reports.EntityUsageReports.Get: instance GHC.Show.Show Network.Google.Resource.Reports.EntityUsageReports.Get.EntityUsageReportsGet
+ Network.Google.Resource.Reports.EntityUsageReports.Get: instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reports.EntityUsageReports.Get.EntityUsageReportsGet
+ Network.Google.Resource.Reports.EntityUsageReports.Get: 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
+ Network.Google.Resource.Reports.UserUsageReport.Get: uurgOrgUnitId :: Lens' UserUsageReportGet Text
- Network.Google.Reports: type ReportsAPI = ChannelsStopResource :<|> (ActivitiesListResource :<|> (ActivitiesWatchResource :<|> (CustomerUsageReportsGetResource :<|> UserUsageReportGetResource)))
+ Network.Google.Reports: type ReportsAPI = ChannelsStopResource :<|> ActivitiesListResource :<|> ActivitiesWatchResource :<|> CustomerUsageReportsGetResource :<|> UserUsageReportGetResource :<|> EntityUsageReportsGetResource
- Network.Google.Resource.Admin.Channels.Stop: type ChannelsStopResource = "admin" :> ("reports" :> ("v1" :> ("admin" :> ("reports_v1" :> ("channels" :> ("stop" :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Channel :> Post '[JSON] ()))))))))
+ Network.Google.Resource.Admin.Channels.Stop: type ChannelsStopResource = "admin" :> "reports" :> "v1" :> "admin" :> "reports_v1" :> "channels" :> "stop" :> QueryParam "alt" AltJSON :> ReqBody '[JSON] Channel :> Post '[JSON] ()
- Network.Google.Resource.Reports.Activities.List: type ActivitiesListResource = "admin" :> ("reports" :> ("v1" :> ("activity" :> ("users" :> (Capture "userKey" Text :> ("applications" :> (Capture "applicationName" Text :> (QueryParam "startTime" Text :> (QueryParam "filters" Text :> (QueryParam "customerId" Text :> (QueryParam "actorIpAddress" Text :> (QueryParam "endTime" Text :> (QueryParam "pageToken" Text :> (QueryParam "eventName" Text :> (QueryParam "maxResults" (Textual Int32) :> (QueryParam "alt" AltJSON :> Get '[JSON] Activities))))))))))))))))
+ Network.Google.Resource.Reports.Activities.List: type ActivitiesListResource = "admin" :> "reports" :> "v1" :> "activity" :> "users" :> Capture "userKey" Text :> "applications" :> Capture "applicationName" Text :> QueryParam "startTime" Text :> QueryParam "filters" Text :> QueryParam "customerId" Text :> QueryParam "actorIpAddress" Text :> QueryParam "endTime" Text :> QueryParam "pageToken" Text :> QueryParam "eventName" Text :> QueryParam "maxResults" (Textual Int32) :> QueryParam "orgUnitID" Text :> QueryParam "alt" AltJSON :> Get '[JSON] Activities
- Network.Google.Resource.Reports.Activities.Watch: type ActivitiesWatchResource = "admin" :> ("reports" :> ("v1" :> ("activity" :> ("users" :> (Capture "userKey" Text :> ("applications" :> (Capture "applicationName" Text :> ("watch" :> (QueryParam "startTime" Text :> (QueryParam "filters" Text :> (QueryParam "customerId" Text :> (QueryParam "actorIpAddress" Text :> (QueryParam "endTime" Text :> (QueryParam "pageToken" Text :> (QueryParam "eventName" Text :> (QueryParam "maxResults" (Textual Int32) :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Channel :> Post '[JSON] Channel))))))))))))))))))
+ Network.Google.Resource.Reports.Activities.Watch: type ActivitiesWatchResource = "admin" :> "reports" :> "v1" :> "activity" :> "users" :> Capture "userKey" Text :> "applications" :> Capture "applicationName" Text :> "watch" :> QueryParam "startTime" Text :> QueryParam "filters" Text :> QueryParam "customerId" Text :> QueryParam "actorIpAddress" Text :> QueryParam "endTime" Text :> QueryParam "pageToken" Text :> QueryParam "eventName" Text :> QueryParam "maxResults" (Textual Int32) :> QueryParam "orgUnitID" Text :> QueryParam "alt" AltJSON :> ReqBody '[JSON] Channel :> Post '[JSON] Channel
- Network.Google.Resource.Reports.CustomerUsageReports.Get: type CustomerUsageReportsGetResource = "admin" :> ("reports" :> ("v1" :> ("usage" :> ("dates" :> (Capture "date" Text :> (QueryParam "customerId" Text :> (QueryParam "parameters" Text :> (QueryParam "pageToken" Text :> (QueryParam "alt" AltJSON :> Get '[JSON] UsageReports)))))))))
+ Network.Google.Resource.Reports.CustomerUsageReports.Get: type CustomerUsageReportsGetResource = "admin" :> "reports" :> "v1" :> "usage" :> "dates" :> Capture "date" Text :> QueryParam "customerId" Text :> QueryParam "parameters" Text :> QueryParam "pageToken" Text :> QueryParam "alt" AltJSON :> Get '[JSON] UsageReports
- Network.Google.Resource.Reports.UserUsageReport.Get: type UserUsageReportGetResource = "admin" :> ("reports" :> ("v1" :> ("usage" :> ("users" :> (Capture "userKey" 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)))))))))))))
+ Network.Google.Resource.Reports.UserUsageReport.Get: type UserUsageReportGetResource = "admin" :> "reports" :> "v1" :> "usage" :> "users" :> Capture "userKey" Text :> "dates" :> Capture "date" Text :> QueryParam "filters" Text :> QueryParam "customerId" Text :> QueryParam "parameters" Text :> QueryParam "pageToken" Text :> QueryParam "maxResults" (Textual Word32) :> QueryParam "orgUnitID" Text :> QueryParam "alt" AltJSON :> Get '[JSON] UsageReports
Files
- gen/Network/Google/Reports.hs +8/−2
- gen/Network/Google/Reports/Types.hs +3/−2
- gen/Network/Google/Reports/Types/Product.hs +16/−4
- gen/Network/Google/Reports/Types/Sum.hs +1/−1
- gen/Network/Google/Resource/Reports/Activities/List.hs +17/−4
- gen/Network/Google/Resource/Reports/Activities/Watch.hs +18/−5
- gen/Network/Google/Resource/Reports/EntityUsageReports/Get.hs +184/−0
- gen/Network/Google/Resource/Reports/UserUsageReport/Get.hs +16/−2
- gogol-admin-reports.cabal +5/−4
gen/Network/Google/Reports.hs view
@@ -13,8 +13,8 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Fetches reports for the administrators of Google Apps customers about--- the usage, collaboration, security, and risk for their users.+-- Fetches reports for the administrators of G Suite customers about the+-- usage, collaboration, security, and risk for their users. -- -- /See:/ <https://developers.google.com/admin-sdk/reports/ Admin Reports API Reference> module Network.Google.Reports@@ -43,6 +43,9 @@ -- ** reports.customerUsageReports.get , module Network.Google.Resource.Reports.CustomerUsageReports.Get + -- ** reports.entityUsageReports.get+ , module Network.Google.Resource.Reports.EntityUsageReports.Get+ -- ** reports.userUsageReport.get , module Network.Google.Resource.Reports.UserUsageReport.Get @@ -154,6 +157,7 @@ , ureCustomerId , ureUserEmail , ureType+ , ureEntityId -- ** ActivityEventsItemParametersItem , ActivityEventsItemParametersItem@@ -180,6 +184,7 @@ import Network.Google.Resource.Reports.Activities.List import Network.Google.Resource.Reports.Activities.Watch import Network.Google.Resource.Reports.CustomerUsageReports.Get+import Network.Google.Resource.Reports.EntityUsageReports.Get import Network.Google.Resource.Reports.UserUsageReport.Get {- $resources@@ -192,3 +197,4 @@ ActivitiesWatchResource :<|> CustomerUsageReportsGetResource :<|> UserUsageReportGetResource+ :<|> EntityUsageReportsGetResource
gen/Network/Google/Reports/Types.hs view
@@ -129,6 +129,7 @@ , ureCustomerId , ureUserEmail , ureType+ , ureEntityId -- * ActivityEventsItemParametersItem , ActivityEventsItemParametersItem@@ -159,10 +160,10 @@ = defaultService (ServiceId "admin:reports_v1") "www.googleapis.com" --- | View usage reports of Google Apps for your domain+-- | View usage reports for your G Suite domain adminReportsUsageReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/admin.reports.usage.readonly"] adminReportsUsageReadOnlyScope = Proxy; --- | View audit reports of Google Apps for your domain+-- | View audit reports for your G Suite domain adminReportsAuditReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/admin.reports.audit.readonly"] adminReportsAuditReadOnlyScope = Proxy;
gen/Network/Google/Reports/Types/Product.hs view
@@ -896,6 +896,7 @@ , _ureCustomerId :: !(Maybe Text) , _ureUserEmail :: !(Maybe Text) , _ureType :: !(Maybe Text)+ , _ureEntityId :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'UsageReportEntity' with the minimum fields required to make a request.@@ -909,6 +910,8 @@ -- * 'ureUserEmail' -- -- * 'ureType'+--+-- * 'ureEntityId' usageReportEntity :: UsageReportEntity usageReportEntity =@@ -917,6 +920,7 @@ , _ureCustomerId = Nothing , _ureUserEmail = Nothing , _ureType = Nothing+ , _ureEntityId = Nothing } -- | Obfuscated user id for the record.@@ -930,15 +934,21 @@ = lens _ureCustomerId (\ s a -> s{_ureCustomerId = a}) --- | user\'s email.+-- | user\'s email. Only relevant if entity.type = \"USER\" ureUserEmail :: Lens' UsageReportEntity (Maybe Text) ureUserEmail = lens _ureUserEmail (\ s a -> s{_ureUserEmail = a}) --- | The type of item, can be a customer or user.+-- | The type of item, can be customer, user, or entity (aka. object). ureType :: Lens' UsageReportEntity (Maybe Text) ureType = lens _ureType (\ s a -> s{_ureType = a}) +-- | Object key. Only relevant if entity.type = \"OBJECT\" Note:+-- external-facing name of report is \"Entities\" rather than \"Objects\".+ureEntityId :: Lens' UsageReportEntity (Maybe Text)+ureEntityId+ = lens _ureEntityId (\ s a -> s{_ureEntityId = a})+ instance FromJSON UsageReportEntity where parseJSON = withObject "UsageReportEntity"@@ -946,7 +956,8 @@ UsageReportEntity' <$> (o .:? "profileId") <*> (o .:? "customerId") <*> (o .:? "userEmail")- <*> (o .:? "type"))+ <*> (o .:? "type")+ <*> (o .:? "entityId")) instance ToJSON UsageReportEntity where toJSON UsageReportEntity'{..}@@ -955,7 +966,8 @@ [("profileId" .=) <$> _ureProFileId, ("customerId" .=) <$> _ureCustomerId, ("userEmail" .=) <$> _ureUserEmail,- ("type" .=) <$> _ureType])+ ("type" .=) <$> _ureType,+ ("entityId" .=) <$> _ureEntityId]) -- -- /See:/ 'activityEventsItemParametersItem' smart constructor.
gen/Network/Google/Reports/Types/Sum.hs view
@@ -16,4 +16,4 @@ -- module Network.Google.Reports.Types.Sum where -import Network.Google.Prelude+import Network.Google.Prelude hiding (Bytes)
gen/Network/Google/Resource/Reports/Activities/List.hs view
@@ -43,6 +43,7 @@ , alEventName , alUserKey , alMaxResults+ , alOrgUnitId ) where import Network.Google.Prelude@@ -67,8 +68,9 @@ QueryParam "pageToken" Text :> QueryParam "eventName" Text :> QueryParam "maxResults" (Textual Int32) :>- QueryParam "alt" AltJSON :>- Get '[JSON] Activities+ QueryParam "orgUnitID" Text :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] Activities -- | Retrieves a list of activities for a specific customer and application. --@@ -84,6 +86,7 @@ , _alEventName :: !(Maybe Text) , _alUserKey :: !Text , _alMaxResults :: !(Maybe (Textual Int32))+ , _alOrgUnitId :: !Text } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'ActivitiesList' with the minimum fields required to make a request.@@ -109,6 +112,8 @@ -- * 'alUserKey' -- -- * 'alMaxResults'+--+-- * 'alOrgUnitId' activitiesList :: Text -- ^ 'alApplicationName' -> Text -- ^ 'alUserKey'@@ -125,9 +130,10 @@ , _alEventName = Nothing , _alUserKey = pAlUserKey_ , _alMaxResults = Nothing+ , _alOrgUnitId = "" } --- | Return events which occured at or after this time.+-- | Return events which occurred at or after this time. alStartTime :: Lens' ActivitiesList (Maybe Text) alStartTime = lens _alStartTime (\ s a -> s{_alStartTime = a})@@ -150,7 +156,7 @@ = lens _alActorIPAddress (\ s a -> s{_alActorIPAddress = a}) --- | Return events which occured at or before this time.+-- | Return events which occurred at or before this time. alEndTime :: Lens' ActivitiesList (Maybe Text) alEndTime = lens _alEndTime (\ s a -> s{_alEndTime = a})@@ -184,6 +190,12 @@ = lens _alMaxResults (\ s a -> s{_alMaxResults = a}) . mapping _Coerce +-- | the organizational unit\'s(OU) ID to filter activities from users+-- belonging to a specific OU or one of its sub-OU(s)+alOrgUnitId :: Lens' ActivitiesList Text+alOrgUnitId+ = lens _alOrgUnitId (\ s a -> s{_alOrgUnitId = a})+ instance GoogleRequest ActivitiesList where type Rs ActivitiesList = Activities type Scopes ActivitiesList =@@ -197,6 +209,7 @@ _alPageToken _alEventName _alMaxResults+ (Just _alOrgUnitId) (Just AltJSON) reportsService where go
gen/Network/Google/Resource/Reports/Activities/Watch.hs view
@@ -44,6 +44,7 @@ , awEventName , awUserKey , awMaxResults+ , awOrgUnitId ) where import Network.Google.Prelude@@ -69,9 +70,10 @@ QueryParam "pageToken" Text :> QueryParam "eventName" Text :> QueryParam "maxResults" (Textual Int32) :>- QueryParam "alt" AltJSON :>- ReqBody '[JSON] Channel :>- Post '[JSON] Channel+ QueryParam "orgUnitID" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Channel :>+ Post '[JSON] Channel -- | Push changes to activities --@@ -88,6 +90,7 @@ , _awEventName :: !(Maybe Text) , _awUserKey :: !Text , _awMaxResults :: !(Maybe (Textual Int32))+ , _awOrgUnitId :: !Text } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'ActivitiesWatch' with the minimum fields required to make a request.@@ -115,6 +118,8 @@ -- * 'awUserKey' -- -- * 'awMaxResults'+--+-- * 'awOrgUnitId' activitiesWatch :: Channel -- ^ 'awPayload' -> Text -- ^ 'awApplicationName'@@ -133,9 +138,10 @@ , _awEventName = Nothing , _awUserKey = pAwUserKey_ , _awMaxResults = Nothing+ , _awOrgUnitId = "" } --- | Return events which occured at or after this time.+-- | Return events which occurred at or after this time. awStartTime :: Lens' ActivitiesWatch (Maybe Text) awStartTime = lens _awStartTime (\ s a -> s{_awStartTime = a})@@ -163,7 +169,7 @@ = lens _awActorIPAddress (\ s a -> s{_awActorIPAddress = a}) --- | Return events which occured at or before this time.+-- | Return events which occurred at or before this time. awEndTime :: Lens' ActivitiesWatch (Maybe Text) awEndTime = lens _awEndTime (\ s a -> s{_awEndTime = a})@@ -197,6 +203,12 @@ = lens _awMaxResults (\ s a -> s{_awMaxResults = a}) . mapping _Coerce +-- | the organizational unit\'s(OU) ID to filter activities from users+-- belonging to a specific OU or one of its sub-OU(s)+awOrgUnitId :: Lens' ActivitiesWatch Text+awOrgUnitId+ = lens _awOrgUnitId (\ s a -> s{_awOrgUnitId = a})+ instance GoogleRequest ActivitiesWatch where type Rs ActivitiesWatch = Channel type Scopes ActivitiesWatch =@@ -210,6 +222,7 @@ _awPageToken _awEventName _awMaxResults+ (Just _awOrgUnitId) (Just AltJSON) _awPayload reportsService
+ gen/Network/Google/Resource/Reports/EntityUsageReports/Get.hs view
@@ -0,0 +1,184 @@+{-# 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+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves a report which is a collection of properties \/ statistics for+-- a set of objects.+--+-- /See:/ <https://developers.google.com/admin-sdk/reports/ Admin Reports API Reference> for @reports.entityUsageReports.get@.+module Network.Google.Resource.Reports.EntityUsageReports.Get+ (+ -- * REST Resource+ EntityUsageReportsGetResource++ -- * Creating a Request+ , entityUsageReportsGet+ , EntityUsageReportsGet++ -- * Request Lenses+ , eurgEntityType+ , eurgFilters+ , eurgCustomerId+ , eurgDate+ , eurgEntityKey+ , eurgParameters+ , eurgPageToken+ , eurgMaxResults+ ) where++import Network.Google.Prelude+import Network.Google.Reports.Types++-- | A resource alias for @reports.entityUsageReports.get@ method which the+-- 'EntityUsageReportsGet' request conforms to.+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++-- | Retrieves a report which is a collection of properties \/ statistics for+-- a set of objects.+--+-- /See:/ 'entityUsageReportsGet' smart constructor.+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)++-- | Creates a value of 'EntityUsageReportsGet' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'eurgEntityType'+--+-- * 'eurgFilters'+--+-- * 'eurgCustomerId'+--+-- * 'eurgDate'+--+-- * 'eurgEntityKey'+--+-- * 'eurgParameters'+--+-- * 'eurgPageToken'+--+-- * 'eurgMaxResults'+entityUsageReportsGet+ :: Text -- ^ 'eurgEntityType'+ -> Text -- ^ 'eurgDate'+ -> Text -- ^ 'eurgEntityKey'+ -> EntityUsageReportsGet+entityUsageReportsGet pEurgEntityType_ pEurgDate_ pEurgEntityKey_ =+ EntityUsageReportsGet'+ { _eurgEntityType = pEurgEntityType_+ , _eurgFilters = Nothing+ , _eurgCustomerId = Nothing+ , _eurgDate = pEurgDate_+ , _eurgEntityKey = pEurgEntityKey_+ , _eurgParameters = Nothing+ , _eurgPageToken = Nothing+ , _eurgMaxResults = Nothing+ }++-- | Type of object. Should be one of - gplus_communities.+eurgEntityType :: Lens' EntityUsageReportsGet Text+eurgEntityType+ = lens _eurgEntityType+ (\ s a -> s{_eurgEntityType = a})++-- | Represents the set of filters including parameter operator value.+eurgFilters :: Lens' EntityUsageReportsGet (Maybe Text)+eurgFilters+ = lens _eurgFilters (\ s a -> s{_eurgFilters = a})++-- | Represents the customer for which the data is to be fetched.+eurgCustomerId :: Lens' EntityUsageReportsGet (Maybe Text)+eurgCustomerId+ = lens _eurgCustomerId+ (\ s a -> s{_eurgCustomerId = a})++-- | Represents the date in yyyy-mm-dd format for which the data is to be+-- fetched.+eurgDate :: Lens' EntityUsageReportsGet Text+eurgDate = lens _eurgDate (\ s a -> s{_eurgDate = a})++-- | Represents the key of object for which the data should be filtered.+eurgEntityKey :: Lens' EntityUsageReportsGet Text+eurgEntityKey+ = lens _eurgEntityKey+ (\ s a -> s{_eurgEntityKey = a})++-- | Represents the application name, parameter name pairs to fetch in csv as+-- app_name1:param_name1, app_name2:param_name2.+eurgParameters :: Lens' EntityUsageReportsGet (Maybe Text)+eurgParameters+ = lens _eurgParameters+ (\ s a -> s{_eurgParameters = a})++-- | Token to specify next page.+eurgPageToken :: Lens' EntityUsageReportsGet (Maybe Text)+eurgPageToken+ = lens _eurgPageToken+ (\ s a -> s{_eurgPageToken = a})++-- | Maximum number of results to return. Maximum allowed is 1000+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
gen/Network/Google/Resource/Reports/UserUsageReport/Get.hs view
@@ -41,6 +41,7 @@ , uurgPageToken , uurgUserKey , uurgMaxResults+ , uurgOrgUnitId ) where import Network.Google.Prelude@@ -62,8 +63,9 @@ QueryParam "parameters" Text :> QueryParam "pageToken" Text :> QueryParam "maxResults" (Textual Word32) :>- QueryParam "alt" AltJSON :>- Get '[JSON] UsageReports+ QueryParam "orgUnitID" Text :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] UsageReports -- | Retrieves a report which is a collection of properties \/ statistics for -- a set of users.@@ -77,6 +79,7 @@ , _uurgPageToken :: !(Maybe Text) , _uurgUserKey :: !Text , _uurgMaxResults :: !(Maybe (Textual Word32))+ , _uurgOrgUnitId :: !Text } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'UserUsageReportGet' with the minimum fields required to make a request.@@ -96,6 +99,8 @@ -- * 'uurgUserKey' -- -- * 'uurgMaxResults'+--+-- * 'uurgOrgUnitId' userUsageReportGet :: Text -- ^ 'uurgDate' -> Text -- ^ 'uurgUserKey'@@ -109,6 +114,7 @@ , _uurgPageToken = Nothing , _uurgUserKey = pUurgUserKey_ , _uurgMaxResults = Nothing+ , _uurgOrgUnitId = "" } -- | Represents the set of filters including parameter operator value.@@ -153,6 +159,13 @@ (\ s a -> s{_uurgMaxResults = a}) . mapping _Coerce +-- | the organizational unit\'s ID to filter usage parameters from users+-- belonging to a specific OU or one of its sub-OU(s).+uurgOrgUnitId :: Lens' UserUsageReportGet Text+uurgOrgUnitId+ = lens _uurgOrgUnitId+ (\ s a -> s{_uurgOrgUnitId = a})+ instance GoogleRequest UserUsageReportGet where type Rs UserUsageReportGet = UsageReports type Scopes UserUsageReportGet =@@ -163,6 +176,7 @@ _uurgParameters _uurgPageToken _uurgMaxResults+ (Just _uurgOrgUnitId) (Just AltJSON) reportsService where go
gogol-admin-reports.cabal view
@@ -1,5 +1,5 @@ name: gogol-admin-reports-version: 0.3.0+version: 0.4.0 synopsis: Google Admin Reports SDK. homepage: https://github.com/brendanhay/gogol bug-reports: https://github.com/brendanhay/gogol/issues@@ -14,8 +14,8 @@ extra-source-files: README.md src/.gitkeep description:- Fetches reports for the administrators of Google Apps customers about- the usage, collaboration, security, and risk for their users.+ Fetches reports for the administrators of G Suite customers about the+ usage, collaboration, security, and risk for their users. . /Warning:/ This is an experimental prototype/preview release which is still under exploratory development and not intended for public use, caveat emptor!@@ -40,6 +40,7 @@ , Network.Google.Resource.Reports.Activities.List , Network.Google.Resource.Reports.Activities.Watch , Network.Google.Resource.Reports.CustomerUsageReports.Get+ , Network.Google.Resource.Reports.EntityUsageReports.Get , Network.Google.Resource.Reports.UserUsageReport.Get other-modules:@@ -47,5 +48,5 @@ , Network.Google.Reports.Types.Sum build-depends:- gogol-core == 0.3.0.*+ gogol-core == 0.4.0.* , base >= 4.7 && < 5