-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Google Admin Reports SDK.
--   
--   Fetches reports for the administrators of Google Apps customers about
--   the usage, collaboration, security, and risk for their users.
--   
--   <i>Warning:</i> This is an experimental prototype/preview release
--   which is still under exploratory development and not intended for
--   public use, caveat emptor!
--   
--   This library is compatible with version <tt>reports_v1</tt> of the
--   API.
@package gogol-admin-reports
@version 0.3.0


module Network.Google.Reports.Types

-- | Default request referring to version <tt>reports_v1</tt> of the Admin
--   Reports API. This contains the host and root path used as a starting
--   point for constructing service requests.
reportsService :: ServiceConfig

-- | View usage reports of Google Apps for your domain
adminReportsUsageReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/admin.reports.usage.readonly"]

-- | View audit reports of Google Apps for your domain
adminReportsAuditReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/admin.reports.audit.readonly"]
data UsageReportParametersItem

-- | Creates a value of <a>UsageReportParametersItem</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>urpiDatetimeValue</a></li>
--   <li><a>urpiBoolValue</a></li>
--   <li><a>urpiIntValue</a></li>
--   <li><a>urpiStringValue</a></li>
--   <li><a>urpiName</a></li>
--   <li><a>urpiMsgValue</a></li>
--   </ul>
usageReportParametersItem :: UsageReportParametersItem

-- | RFC 3339 formatted value of the parameter.
urpiDatetimeValue :: Lens' UsageReportParametersItem (Maybe UTCTime)

-- | Boolean value of the parameter.
urpiBoolValue :: Lens' UsageReportParametersItem (Maybe Bool)

-- | Integral value of the parameter.
urpiIntValue :: Lens' UsageReportParametersItem (Maybe Int64)

-- | String value of the parameter.
urpiStringValue :: Lens' UsageReportParametersItem (Maybe Text)

-- | The name of the parameter.
urpiName :: Lens' UsageReportParametersItem (Maybe Text)

-- | Nested message value of the parameter.
urpiMsgValue :: Lens' UsageReportParametersItem [UsageReportParametersItemMsgValueItem]

-- | Unique identifier for each activity record.
--   
--   <i>See:</i> <a>activityId</a> smart constructor.
data ActivityId

-- | Creates a value of <a>ActivityId</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aiTime</a></li>
--   <li><a>aiUniqueQualifier</a></li>
--   <li><a>aiCustomerId</a></li>
--   <li><a>aiApplicationName</a></li>
--   </ul>
activityId :: ActivityId

-- | Time of occurrence of the activity.
aiTime :: Lens' ActivityId (Maybe UTCTime)

-- | Unique qualifier if multiple events have the same time.
aiUniqueQualifier :: Lens' ActivityId (Maybe Int64)

-- | Obfuscated customer ID of the source customer.
aiCustomerId :: Lens' ActivityId (Maybe Text)

-- | Application name to which the event belongs.
aiApplicationName :: Lens' ActivityId (Maybe Text)

-- | JSON template for a collection of usage reports.
--   
--   <i>See:</i> <a>usageReports</a> smart constructor.
data UsageReports

-- | Creates a value of <a>UsageReports</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>urEtag</a></li>
--   <li><a>urNextPageToken</a></li>
--   <li><a>urUsageReports</a></li>
--   <li><a>urKind</a></li>
--   <li><a>urWarnings</a></li>
--   </ul>
usageReports :: UsageReports

-- | ETag of the resource.
urEtag :: Lens' UsageReports (Maybe Text)

-- | Token for retrieving the next page
urNextPageToken :: Lens' UsageReports (Maybe Text)

-- | Various application parameter records.
urUsageReports :: Lens' UsageReports [UsageReport]

-- | The kind of object.
urKind :: Lens' UsageReports Text

-- | Warnings if any.
urWarnings :: Lens' UsageReports [UsageReportsWarningsItem]
data UsageReportParametersItemMsgValueItem

-- | Creates a value of <a>UsageReportParametersItemMsgValueItem</a> with
--   the minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>urpimviAddtional</a></li>
--   </ul>
usageReportParametersItemMsgValueItem :: HashMap Text JSONValue -> UsageReportParametersItemMsgValueItem
urpimviAddtional :: Lens' UsageReportParametersItemMsgValueItem (HashMap Text JSONValue)

-- | JSON template for a collection of activites.
--   
--   <i>See:</i> <a>activities</a> smart constructor.
data Activities

-- | Creates a value of <a>Activities</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aEtag</a></li>
--   <li><a>aNextPageToken</a></li>
--   <li><a>aKind</a></li>
--   <li><a>aItems</a></li>
--   </ul>
activities :: Activities

-- | ETag of the resource.
aEtag :: Lens' Activities (Maybe Text)

-- | Token for retrieving the next page
aNextPageToken :: Lens' Activities (Maybe Text)

-- | Kind of list response this is.
aKind :: Lens' Activities Text

-- | Each record in read response.
aItems :: Lens' Activities [Activity]

-- | An notification channel used to watch for resource changes.
--   
--   <i>See:</i> <a>channel</a> smart constructor.
data Channel

-- | Creates a value of <a>Channel</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>cResourceURI</a></li>
--   <li><a>cResourceId</a></li>
--   <li><a>cKind</a></li>
--   <li><a>cExpiration</a></li>
--   <li><a>cToken</a></li>
--   <li><a>cAddress</a></li>
--   <li><a>cPayload</a></li>
--   <li><a>cParams</a></li>
--   <li><a>cId</a></li>
--   <li><a>cType</a></li>
--   </ul>
channel :: Channel

-- | A version-specific identifier for the watched resource.
cResourceURI :: Lens' Channel (Maybe Text)

-- | An opaque ID that identifies the resource being watched on this
--   channel. Stable across different API versions.
cResourceId :: Lens' Channel (Maybe Text)

-- | Identifies this as a notification channel used to watch for changes to
--   a resource. Value: the fixed string "api#channel".
cKind :: Lens' Channel Text

-- | Date and time of notification channel expiration, expressed as a Unix
--   timestamp, in milliseconds. Optional.
cExpiration :: Lens' Channel (Maybe Int64)

-- | An arbitrary string delivered to the target address with each
--   notification delivered over this channel. Optional.
cToken :: Lens' Channel (Maybe Text)

-- | The address where notifications are delivered for this channel.
cAddress :: Lens' Channel (Maybe Text)

-- | A Boolean value to indicate whether payload is wanted. Optional.
cPayload :: Lens' Channel (Maybe Bool)

-- | Additional parameters controlling delivery channel behavior. Optional.
cParams :: Lens' Channel (Maybe ChannelParams)

-- | A UUID or similar unique string that identifies this channel.
cId :: Lens' Channel (Maybe Text)

-- | The type of delivery mechanism used for this channel.
cType :: Lens' Channel (Maybe Text)

-- | JSON template for a usage report.
--   
--   <i>See:</i> <a>usageReport</a> smart constructor.
data UsageReport

-- | Creates a value of <a>UsageReport</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uEtag</a></li>
--   <li><a>uKind</a></li>
--   <li><a>uDate</a></li>
--   <li><a>uParameters</a></li>
--   <li><a>uEntity</a></li>
--   </ul>
usageReport :: UsageReport

-- | ETag of the resource.
uEtag :: Lens' UsageReport (Maybe Text)

-- | The kind of object.
uKind :: Lens' UsageReport Text

-- | The date to which the record belongs.
uDate :: Lens' UsageReport (Maybe Text)

-- | Parameter value pairs for various applications.
uParameters :: Lens' UsageReport [UsageReportParametersItem]

-- | Information about the type of the item.
uEntity :: Lens' UsageReport (Maybe UsageReportEntity)
data UsageReportsWarningsItemDataItem

-- | Creates a value of <a>UsageReportsWarningsItemDataItem</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>urwidiValue</a></li>
--   <li><a>urwidiKey</a></li>
--   </ul>
usageReportsWarningsItemDataItem :: UsageReportsWarningsItemDataItem

-- | Value associated with a key-value pair to give detailed information on
--   the warning.
urwidiValue :: Lens' UsageReportsWarningsItemDataItem (Maybe Text)

-- | Key associated with a key-value pair to give detailed information on
--   the warning.
urwidiKey :: Lens' UsageReportsWarningsItemDataItem (Maybe Text)
data UsageReportsWarningsItem

-- | Creates a value of <a>UsageReportsWarningsItem</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>urwiData</a></li>
--   <li><a>urwiCode</a></li>
--   <li><a>urwiMessage</a></li>
--   </ul>
usageReportsWarningsItem :: UsageReportsWarningsItem

-- | Key-Value pairs to give detailed information on the warning.
urwiData :: Lens' UsageReportsWarningsItem [UsageReportsWarningsItemDataItem]

-- | Machine readable code / warning type.
urwiCode :: Lens' UsageReportsWarningsItem (Maybe Text)

-- | Human readable message for the warning.
urwiMessage :: Lens' UsageReportsWarningsItem (Maybe Text)
data ActivityEventsItem

-- | Creates a value of <a>ActivityEventsItem</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aeiName</a></li>
--   <li><a>aeiParameters</a></li>
--   <li><a>aeiType</a></li>
--   </ul>
activityEventsItem :: ActivityEventsItem

-- | Name of event.
aeiName :: Lens' ActivityEventsItem (Maybe Text)

-- | Parameter value pairs for various applications.
aeiParameters :: Lens' ActivityEventsItem [ActivityEventsItemParametersItem]

-- | Type of event.
aeiType :: Lens' ActivityEventsItem (Maybe Text)

-- | Additional parameters controlling delivery channel behavior. Optional.
--   
--   <i>See:</i> <a>channelParams</a> smart constructor.
data ChannelParams

-- | Creates a value of <a>ChannelParams</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>cpAddtional</a></li>
--   </ul>
channelParams :: HashMap Text Text -> ChannelParams

-- | Declares a new parameter by name.
cpAddtional :: Lens' ChannelParams (HashMap Text Text)

-- | JSON template for the activity resource.
--   
--   <i>See:</i> <a>activity</a> smart constructor.
data Activity

-- | Creates a value of <a>Activity</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>actEtag</a></li>
--   <li><a>actIPAddress</a></li>
--   <li><a>actKind</a></li>
--   <li><a>actActor</a></li>
--   <li><a>actOwnerDomain</a></li>
--   <li><a>actEvents</a></li>
--   <li><a>actId</a></li>
--   </ul>
activity :: Activity

-- | ETag of the entry.
actEtag :: Lens' Activity (Maybe Text)

-- | IP Address of the user doing the action.
actIPAddress :: Lens' Activity (Maybe Text)

-- | Kind of resource this is.
actKind :: Lens' Activity Text

-- | User doing the action.
actActor :: Lens' Activity (Maybe ActivityActor)

-- | Domain of source customer.
actOwnerDomain :: Lens' Activity (Maybe Text)

-- | Activity events.
actEvents :: Lens' Activity [ActivityEventsItem]

-- | Unique identifier for each activity record.
actId :: Lens' Activity (Maybe ActivityId)

-- | Information about the type of the item.
--   
--   <i>See:</i> <a>usageReportEntity</a> smart constructor.
data UsageReportEntity

-- | Creates a value of <a>UsageReportEntity</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ureProFileId</a></li>
--   <li><a>ureCustomerId</a></li>
--   <li><a>ureUserEmail</a></li>
--   <li><a>ureType</a></li>
--   </ul>
usageReportEntity :: UsageReportEntity

-- | Obfuscated user id for the record.
ureProFileId :: Lens' UsageReportEntity (Maybe Text)

-- | Obfuscated customer id for the record.
ureCustomerId :: Lens' UsageReportEntity (Maybe Text)

-- | user's email.
ureUserEmail :: Lens' UsageReportEntity (Maybe Text)

-- | The type of item, can be a customer or user.
ureType :: Lens' UsageReportEntity (Maybe Text)
data ActivityEventsItemParametersItem

-- | Creates a value of <a>ActivityEventsItemParametersItem</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aeipiBoolValue</a></li>
--   <li><a>aeipiIntValue</a></li>
--   <li><a>aeipiValue</a></li>
--   <li><a>aeipiMultiIntValue</a></li>
--   <li><a>aeipiName</a></li>
--   <li><a>aeipiMultiValue</a></li>
--   </ul>
activityEventsItemParametersItem :: ActivityEventsItemParametersItem

-- | Boolean value of the parameter.
aeipiBoolValue :: Lens' ActivityEventsItemParametersItem (Maybe Bool)

-- | Integral value of the parameter.
aeipiIntValue :: Lens' ActivityEventsItemParametersItem (Maybe Int64)

-- | String value of the parameter.
aeipiValue :: Lens' ActivityEventsItemParametersItem (Maybe Text)

-- | Multi-int value of the parameter.
aeipiMultiIntValue :: Lens' ActivityEventsItemParametersItem [Int64]

-- | The name of the parameter.
aeipiName :: Lens' ActivityEventsItemParametersItem (Maybe Text)

-- | Multi-string value of the parameter.
aeipiMultiValue :: Lens' ActivityEventsItemParametersItem [Text]

-- | User doing the action.
--   
--   <i>See:</i> <a>activityActor</a> smart constructor.
data ActivityActor

-- | Creates a value of <a>ActivityActor</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aaEmail</a></li>
--   <li><a>aaCallerType</a></li>
--   <li><a>aaProFileId</a></li>
--   <li><a>aaKey</a></li>
--   </ul>
activityActor :: ActivityActor

-- | Email address of the user.
aaEmail :: Lens' ActivityActor (Maybe Text)

-- | User or OAuth 2LO request.
aaCallerType :: Lens' ActivityActor (Maybe Text)

-- | Obfuscated user id of the user.
aaProFileId :: Lens' ActivityActor (Maybe Text)

-- | For OAuth 2LO API requests, consumer_key of the requestor.
aaKey :: Lens' ActivityActor (Maybe Text)


-- | Stop watching resources through this channel
--   
--   <i>See:</i> <a>Admin Reports API Reference</a> for
--   <tt>admin.channels.stop</tt>.
module Network.Google.Resource.Admin.Channels.Stop

-- | A resource alias for <tt>admin.channels.stop</tt> method which the
--   <a>ChannelsStop</a> request conforms to.
type ChannelsStopResource = "admin" :> ("reports" :> ("v1" :> ("admin" :> ("reports_v1" :> ("channels" :> ("stop" :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Channel :> Post '[JSON] ()))))))))

-- | Creates a value of <a>ChannelsStop</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>csPayload</a></li>
--   </ul>
channelsStop :: Channel -> ChannelsStop

-- | Stop watching resources through this channel
--   
--   <i>See:</i> <a>channelsStop</a> smart constructor.
data ChannelsStop

-- | Multipart request metadata.
csPayload :: Lens' ChannelsStop Channel
instance GHC.Generics.Generic Network.Google.Resource.Admin.Channels.Stop.ChannelsStop
instance Data.Data.Data Network.Google.Resource.Admin.Channels.Stop.ChannelsStop
instance GHC.Show.Show Network.Google.Resource.Admin.Channels.Stop.ChannelsStop
instance GHC.Classes.Eq Network.Google.Resource.Admin.Channels.Stop.ChannelsStop
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Admin.Channels.Stop.ChannelsStop


-- | Retrieves a list of activities for a specific customer and
--   application.
--   
--   <i>See:</i> <a>Admin Reports API Reference</a> for
--   <tt>reports.activities.list</tt>.
module Network.Google.Resource.Reports.Activities.List

-- | A resource alias for <tt>reports.activities.list</tt> method which the
--   <a>ActivitiesList</a> request conforms to.
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))))))))))))))))

-- | Creates a value of <a>ActivitiesList</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>alStartTime</a></li>
--   <li><a>alFilters</a></li>
--   <li><a>alCustomerId</a></li>
--   <li><a>alActorIPAddress</a></li>
--   <li><a>alEndTime</a></li>
--   <li><a>alApplicationName</a></li>
--   <li><a>alPageToken</a></li>
--   <li><a>alEventName</a></li>
--   <li><a>alUserKey</a></li>
--   <li><a>alMaxResults</a></li>
--   </ul>
activitiesList :: Text -> Text -> ActivitiesList

-- | Retrieves a list of activities for a specific customer and
--   application.
--   
--   <i>See:</i> <a>activitiesList</a> smart constructor.
data ActivitiesList

-- | Return events which occured at or after this time.
alStartTime :: Lens' ActivitiesList (Maybe Text)

-- | Event parameters in the form [parameter1 name][operator][parameter1
--   value],[parameter2 name][operator][parameter2 value],...
alFilters :: Lens' ActivitiesList (Maybe Text)

-- | Represents the customer for which the data is to be fetched.
alCustomerId :: Lens' ActivitiesList (Maybe Text)

-- | IP Address of host where the event was performed. Supports both IPv4
--   and IPv6 addresses.
alActorIPAddress :: Lens' ActivitiesList (Maybe Text)

-- | Return events which occured at or before this time.
alEndTime :: Lens' ActivitiesList (Maybe Text)

-- | Application name for which the events are to be retrieved.
alApplicationName :: Lens' ActivitiesList Text

-- | Token to specify next page.
alPageToken :: Lens' ActivitiesList (Maybe Text)

-- | Name of the event being queried.
alEventName :: Lens' ActivitiesList (Maybe Text)

-- | Represents the profile id or the user email for which the data should
--   be filtered. When 'all' is specified as the userKey, it returns
--   usageReports for all users.
alUserKey :: Lens' ActivitiesList Text

-- | Number of activity records to be shown in each page.
alMaxResults :: Lens' ActivitiesList (Maybe Int32)
instance GHC.Generics.Generic Network.Google.Resource.Reports.Activities.List.ActivitiesList
instance Data.Data.Data Network.Google.Resource.Reports.Activities.List.ActivitiesList
instance GHC.Show.Show Network.Google.Resource.Reports.Activities.List.ActivitiesList
instance GHC.Classes.Eq Network.Google.Resource.Reports.Activities.List.ActivitiesList
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reports.Activities.List.ActivitiesList


-- | Push changes to activities
--   
--   <i>See:</i> <a>Admin Reports API Reference</a> for
--   <tt>reports.activities.watch</tt>.
module Network.Google.Resource.Reports.Activities.Watch

-- | A resource alias for <tt>reports.activities.watch</tt> method which
--   the <a>ActivitiesWatch</a> request conforms to.
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))))))))))))))))))

-- | Creates a value of <a>ActivitiesWatch</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>awStartTime</a></li>
--   <li><a>awFilters</a></li>
--   <li><a>awPayload</a></li>
--   <li><a>awCustomerId</a></li>
--   <li><a>awActorIPAddress</a></li>
--   <li><a>awEndTime</a></li>
--   <li><a>awApplicationName</a></li>
--   <li><a>awPageToken</a></li>
--   <li><a>awEventName</a></li>
--   <li><a>awUserKey</a></li>
--   <li><a>awMaxResults</a></li>
--   </ul>
activitiesWatch :: Channel -> Text -> Text -> ActivitiesWatch

-- | Push changes to activities
--   
--   <i>See:</i> <a>activitiesWatch</a> smart constructor.
data ActivitiesWatch

-- | Return events which occured at or after this time.
awStartTime :: Lens' ActivitiesWatch (Maybe Text)

-- | Event parameters in the form [parameter1 name][operator][parameter1
--   value],[parameter2 name][operator][parameter2 value],...
awFilters :: Lens' ActivitiesWatch (Maybe Text)

-- | Multipart request metadata.
awPayload :: Lens' ActivitiesWatch Channel

-- | Represents the customer for which the data is to be fetched.
awCustomerId :: Lens' ActivitiesWatch (Maybe Text)

-- | IP Address of host where the event was performed. Supports both IPv4
--   and IPv6 addresses.
awActorIPAddress :: Lens' ActivitiesWatch (Maybe Text)

-- | Return events which occured at or before this time.
awEndTime :: Lens' ActivitiesWatch (Maybe Text)

-- | Application name for which the events are to be retrieved.
awApplicationName :: Lens' ActivitiesWatch Text

-- | Token to specify next page.
awPageToken :: Lens' ActivitiesWatch (Maybe Text)

-- | Name of the event being queried.
awEventName :: Lens' ActivitiesWatch (Maybe Text)

-- | Represents the profile id or the user email for which the data should
--   be filtered. When 'all' is specified as the userKey, it returns
--   usageReports for all users.
awUserKey :: Lens' ActivitiesWatch Text

-- | Number of activity records to be shown in each page.
awMaxResults :: Lens' ActivitiesWatch (Maybe Int32)
instance GHC.Generics.Generic Network.Google.Resource.Reports.Activities.Watch.ActivitiesWatch
instance Data.Data.Data Network.Google.Resource.Reports.Activities.Watch.ActivitiesWatch
instance GHC.Show.Show Network.Google.Resource.Reports.Activities.Watch.ActivitiesWatch
instance GHC.Classes.Eq Network.Google.Resource.Reports.Activities.Watch.ActivitiesWatch
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reports.Activities.Watch.ActivitiesWatch


-- | Retrieves a report which is a collection of properties / statistics
--   for a specific customer.
--   
--   <i>See:</i> <a>Admin Reports API Reference</a> for
--   <tt>reports.customerUsageReports.get</tt>.
module Network.Google.Resource.Reports.CustomerUsageReports.Get

-- | A resource alias for <tt>reports.customerUsageReports.get</tt> method
--   which the <a>CustomerUsageReportsGet</a> request conforms to.
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)))))))))

-- | Creates a value of <a>CustomerUsageReportsGet</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>curgCustomerId</a></li>
--   <li><a>curgDate</a></li>
--   <li><a>curgParameters</a></li>
--   <li><a>curgPageToken</a></li>
--   </ul>
customerUsageReportsGet :: Text -> CustomerUsageReportsGet

-- | Retrieves a report which is a collection of properties / statistics
--   for a specific customer.
--   
--   <i>See:</i> <a>customerUsageReportsGet</a> smart constructor.
data CustomerUsageReportsGet

-- | Represents the customer for which the data is to be fetched.
curgCustomerId :: Lens' CustomerUsageReportsGet (Maybe Text)

-- | Represents the date in yyyy-mm-dd format for which the data is to be
--   fetched.
curgDate :: Lens' CustomerUsageReportsGet Text

-- | Represents the application name, parameter name pairs to fetch in csv
--   as app_name1:param_name1, app_name2:param_name2.
curgParameters :: Lens' CustomerUsageReportsGet (Maybe Text)

-- | Token to specify next page.
curgPageToken :: Lens' CustomerUsageReportsGet (Maybe Text)
instance GHC.Generics.Generic Network.Google.Resource.Reports.CustomerUsageReports.Get.CustomerUsageReportsGet
instance Data.Data.Data Network.Google.Resource.Reports.CustomerUsageReports.Get.CustomerUsageReportsGet
instance GHC.Show.Show Network.Google.Resource.Reports.CustomerUsageReports.Get.CustomerUsageReportsGet
instance GHC.Classes.Eq Network.Google.Resource.Reports.CustomerUsageReports.Get.CustomerUsageReportsGet
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reports.CustomerUsageReports.Get.CustomerUsageReportsGet


-- | Retrieves a report which is a collection of properties / statistics
--   for a set of users.
--   
--   <i>See:</i> <a>Admin Reports API Reference</a> for
--   <tt>reports.userUsageReport.get</tt>.
module Network.Google.Resource.Reports.UserUsageReport.Get

-- | A resource alias for <tt>reports.userUsageReport.get</tt> method which
--   the <a>UserUsageReportGet</a> request conforms to.
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)))))))))))))

-- | Creates a value of <a>UserUsageReportGet</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uurgFilters</a></li>
--   <li><a>uurgCustomerId</a></li>
--   <li><a>uurgDate</a></li>
--   <li><a>uurgParameters</a></li>
--   <li><a>uurgPageToken</a></li>
--   <li><a>uurgUserKey</a></li>
--   <li><a>uurgMaxResults</a></li>
--   </ul>
userUsageReportGet :: Text -> Text -> UserUsageReportGet

-- | Retrieves a report which is a collection of properties / statistics
--   for a set of users.
--   
--   <i>See:</i> <a>userUsageReportGet</a> smart constructor.
data UserUsageReportGet

-- | Represents the set of filters including parameter operator value.
uurgFilters :: Lens' UserUsageReportGet (Maybe Text)

-- | Represents the customer for which the data is to be fetched.
uurgCustomerId :: Lens' UserUsageReportGet (Maybe Text)

-- | Represents the date in yyyy-mm-dd format for which the data is to be
--   fetched.
uurgDate :: Lens' UserUsageReportGet Text

-- | Represents the application name, parameter name pairs to fetch in csv
--   as app_name1:param_name1, app_name2:param_name2.
uurgParameters :: Lens' UserUsageReportGet (Maybe Text)

-- | Token to specify next page.
uurgPageToken :: Lens' UserUsageReportGet (Maybe Text)

-- | Represents the profile id or the user email for which the data should
--   be filtered.
uurgUserKey :: Lens' UserUsageReportGet Text

-- | Maximum number of results to return. Maximum allowed is 1000
uurgMaxResults :: Lens' UserUsageReportGet (Maybe Word32)
instance GHC.Generics.Generic Network.Google.Resource.Reports.UserUsageReport.Get.UserUsageReportGet
instance Data.Data.Data Network.Google.Resource.Reports.UserUsageReport.Get.UserUsageReportGet
instance GHC.Show.Show Network.Google.Resource.Reports.UserUsageReport.Get.UserUsageReportGet
instance GHC.Classes.Eq Network.Google.Resource.Reports.UserUsageReport.Get.UserUsageReportGet
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Reports.UserUsageReport.Get.UserUsageReportGet


-- | Fetches reports for the administrators of Google Apps customers about
--   the usage, collaboration, security, and risk for their users.
--   
--   <i>See:</i> <a>Admin Reports API Reference</a>
module Network.Google.Reports

-- | Default request referring to version <tt>reports_v1</tt> of the Admin
--   Reports API. This contains the host and root path used as a starting
--   point for constructing service requests.
reportsService :: ServiceConfig

-- | View usage reports of Google Apps for your domain
adminReportsUsageReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/admin.reports.usage.readonly"]

-- | View audit reports of Google Apps for your domain
adminReportsAuditReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/admin.reports.audit.readonly"]

-- | Represents the entirety of the methods and resources available for the
--   Admin Reports API service.
type ReportsAPI = ChannelsStopResource :<|> (ActivitiesListResource :<|> (ActivitiesWatchResource :<|> (CustomerUsageReportsGetResource :<|> UserUsageReportGetResource)))
data UsageReportParametersItem

-- | Creates a value of <a>UsageReportParametersItem</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>urpiDatetimeValue</a></li>
--   <li><a>urpiBoolValue</a></li>
--   <li><a>urpiIntValue</a></li>
--   <li><a>urpiStringValue</a></li>
--   <li><a>urpiName</a></li>
--   <li><a>urpiMsgValue</a></li>
--   </ul>
usageReportParametersItem :: UsageReportParametersItem

-- | RFC 3339 formatted value of the parameter.
urpiDatetimeValue :: Lens' UsageReportParametersItem (Maybe UTCTime)

-- | Boolean value of the parameter.
urpiBoolValue :: Lens' UsageReportParametersItem (Maybe Bool)

-- | Integral value of the parameter.
urpiIntValue :: Lens' UsageReportParametersItem (Maybe Int64)

-- | String value of the parameter.
urpiStringValue :: Lens' UsageReportParametersItem (Maybe Text)

-- | The name of the parameter.
urpiName :: Lens' UsageReportParametersItem (Maybe Text)

-- | Nested message value of the parameter.
urpiMsgValue :: Lens' UsageReportParametersItem [UsageReportParametersItemMsgValueItem]

-- | Unique identifier for each activity record.
--   
--   <i>See:</i> <a>activityId</a> smart constructor.
data ActivityId

-- | Creates a value of <a>ActivityId</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aiTime</a></li>
--   <li><a>aiUniqueQualifier</a></li>
--   <li><a>aiCustomerId</a></li>
--   <li><a>aiApplicationName</a></li>
--   </ul>
activityId :: ActivityId

-- | Time of occurrence of the activity.
aiTime :: Lens' ActivityId (Maybe UTCTime)

-- | Unique qualifier if multiple events have the same time.
aiUniqueQualifier :: Lens' ActivityId (Maybe Int64)

-- | Obfuscated customer ID of the source customer.
aiCustomerId :: Lens' ActivityId (Maybe Text)

-- | Application name to which the event belongs.
aiApplicationName :: Lens' ActivityId (Maybe Text)

-- | JSON template for a collection of usage reports.
--   
--   <i>See:</i> <a>usageReports</a> smart constructor.
data UsageReports

-- | Creates a value of <a>UsageReports</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>urEtag</a></li>
--   <li><a>urNextPageToken</a></li>
--   <li><a>urUsageReports</a></li>
--   <li><a>urKind</a></li>
--   <li><a>urWarnings</a></li>
--   </ul>
usageReports :: UsageReports

-- | ETag of the resource.
urEtag :: Lens' UsageReports (Maybe Text)

-- | Token for retrieving the next page
urNextPageToken :: Lens' UsageReports (Maybe Text)

-- | Various application parameter records.
urUsageReports :: Lens' UsageReports [UsageReport]

-- | The kind of object.
urKind :: Lens' UsageReports Text

-- | Warnings if any.
urWarnings :: Lens' UsageReports [UsageReportsWarningsItem]
data UsageReportParametersItemMsgValueItem

-- | Creates a value of <a>UsageReportParametersItemMsgValueItem</a> with
--   the minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>urpimviAddtional</a></li>
--   </ul>
usageReportParametersItemMsgValueItem :: HashMap Text JSONValue -> UsageReportParametersItemMsgValueItem
urpimviAddtional :: Lens' UsageReportParametersItemMsgValueItem (HashMap Text JSONValue)

-- | JSON template for a collection of activites.
--   
--   <i>See:</i> <a>activities</a> smart constructor.
data Activities

-- | Creates a value of <a>Activities</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aEtag</a></li>
--   <li><a>aNextPageToken</a></li>
--   <li><a>aKind</a></li>
--   <li><a>aItems</a></li>
--   </ul>
activities :: Activities

-- | ETag of the resource.
aEtag :: Lens' Activities (Maybe Text)

-- | Token for retrieving the next page
aNextPageToken :: Lens' Activities (Maybe Text)

-- | Kind of list response this is.
aKind :: Lens' Activities Text

-- | Each record in read response.
aItems :: Lens' Activities [Activity]

-- | An notification channel used to watch for resource changes.
--   
--   <i>See:</i> <a>channel</a> smart constructor.
data Channel

-- | Creates a value of <a>Channel</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>cResourceURI</a></li>
--   <li><a>cResourceId</a></li>
--   <li><a>cKind</a></li>
--   <li><a>cExpiration</a></li>
--   <li><a>cToken</a></li>
--   <li><a>cAddress</a></li>
--   <li><a>cPayload</a></li>
--   <li><a>cParams</a></li>
--   <li><a>cId</a></li>
--   <li><a>cType</a></li>
--   </ul>
channel :: Channel

-- | A version-specific identifier for the watched resource.
cResourceURI :: Lens' Channel (Maybe Text)

-- | An opaque ID that identifies the resource being watched on this
--   channel. Stable across different API versions.
cResourceId :: Lens' Channel (Maybe Text)

-- | Identifies this as a notification channel used to watch for changes to
--   a resource. Value: the fixed string "api#channel".
cKind :: Lens' Channel Text

-- | Date and time of notification channel expiration, expressed as a Unix
--   timestamp, in milliseconds. Optional.
cExpiration :: Lens' Channel (Maybe Int64)

-- | An arbitrary string delivered to the target address with each
--   notification delivered over this channel. Optional.
cToken :: Lens' Channel (Maybe Text)

-- | The address where notifications are delivered for this channel.
cAddress :: Lens' Channel (Maybe Text)

-- | A Boolean value to indicate whether payload is wanted. Optional.
cPayload :: Lens' Channel (Maybe Bool)

-- | Additional parameters controlling delivery channel behavior. Optional.
cParams :: Lens' Channel (Maybe ChannelParams)

-- | A UUID or similar unique string that identifies this channel.
cId :: Lens' Channel (Maybe Text)

-- | The type of delivery mechanism used for this channel.
cType :: Lens' Channel (Maybe Text)

-- | JSON template for a usage report.
--   
--   <i>See:</i> <a>usageReport</a> smart constructor.
data UsageReport

-- | Creates a value of <a>UsageReport</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uEtag</a></li>
--   <li><a>uKind</a></li>
--   <li><a>uDate</a></li>
--   <li><a>uParameters</a></li>
--   <li><a>uEntity</a></li>
--   </ul>
usageReport :: UsageReport

-- | ETag of the resource.
uEtag :: Lens' UsageReport (Maybe Text)

-- | The kind of object.
uKind :: Lens' UsageReport Text

-- | The date to which the record belongs.
uDate :: Lens' UsageReport (Maybe Text)

-- | Parameter value pairs for various applications.
uParameters :: Lens' UsageReport [UsageReportParametersItem]

-- | Information about the type of the item.
uEntity :: Lens' UsageReport (Maybe UsageReportEntity)
data UsageReportsWarningsItemDataItem

-- | Creates a value of <a>UsageReportsWarningsItemDataItem</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>urwidiValue</a></li>
--   <li><a>urwidiKey</a></li>
--   </ul>
usageReportsWarningsItemDataItem :: UsageReportsWarningsItemDataItem

-- | Value associated with a key-value pair to give detailed information on
--   the warning.
urwidiValue :: Lens' UsageReportsWarningsItemDataItem (Maybe Text)

-- | Key associated with a key-value pair to give detailed information on
--   the warning.
urwidiKey :: Lens' UsageReportsWarningsItemDataItem (Maybe Text)
data UsageReportsWarningsItem

-- | Creates a value of <a>UsageReportsWarningsItem</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>urwiData</a></li>
--   <li><a>urwiCode</a></li>
--   <li><a>urwiMessage</a></li>
--   </ul>
usageReportsWarningsItem :: UsageReportsWarningsItem

-- | Key-Value pairs to give detailed information on the warning.
urwiData :: Lens' UsageReportsWarningsItem [UsageReportsWarningsItemDataItem]

-- | Machine readable code / warning type.
urwiCode :: Lens' UsageReportsWarningsItem (Maybe Text)

-- | Human readable message for the warning.
urwiMessage :: Lens' UsageReportsWarningsItem (Maybe Text)
data ActivityEventsItem

-- | Creates a value of <a>ActivityEventsItem</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aeiName</a></li>
--   <li><a>aeiParameters</a></li>
--   <li><a>aeiType</a></li>
--   </ul>
activityEventsItem :: ActivityEventsItem

-- | Name of event.
aeiName :: Lens' ActivityEventsItem (Maybe Text)

-- | Parameter value pairs for various applications.
aeiParameters :: Lens' ActivityEventsItem [ActivityEventsItemParametersItem]

-- | Type of event.
aeiType :: Lens' ActivityEventsItem (Maybe Text)

-- | Additional parameters controlling delivery channel behavior. Optional.
--   
--   <i>See:</i> <a>channelParams</a> smart constructor.
data ChannelParams

-- | Creates a value of <a>ChannelParams</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>cpAddtional</a></li>
--   </ul>
channelParams :: HashMap Text Text -> ChannelParams

-- | Declares a new parameter by name.
cpAddtional :: Lens' ChannelParams (HashMap Text Text)

-- | JSON template for the activity resource.
--   
--   <i>See:</i> <a>activity</a> smart constructor.
data Activity

-- | Creates a value of <a>Activity</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>actEtag</a></li>
--   <li><a>actIPAddress</a></li>
--   <li><a>actKind</a></li>
--   <li><a>actActor</a></li>
--   <li><a>actOwnerDomain</a></li>
--   <li><a>actEvents</a></li>
--   <li><a>actId</a></li>
--   </ul>
activity :: Activity

-- | ETag of the entry.
actEtag :: Lens' Activity (Maybe Text)

-- | IP Address of the user doing the action.
actIPAddress :: Lens' Activity (Maybe Text)

-- | Kind of resource this is.
actKind :: Lens' Activity Text

-- | User doing the action.
actActor :: Lens' Activity (Maybe ActivityActor)

-- | Domain of source customer.
actOwnerDomain :: Lens' Activity (Maybe Text)

-- | Activity events.
actEvents :: Lens' Activity [ActivityEventsItem]

-- | Unique identifier for each activity record.
actId :: Lens' Activity (Maybe ActivityId)

-- | Information about the type of the item.
--   
--   <i>See:</i> <a>usageReportEntity</a> smart constructor.
data UsageReportEntity

-- | Creates a value of <a>UsageReportEntity</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ureProFileId</a></li>
--   <li><a>ureCustomerId</a></li>
--   <li><a>ureUserEmail</a></li>
--   <li><a>ureType</a></li>
--   </ul>
usageReportEntity :: UsageReportEntity

-- | Obfuscated user id for the record.
ureProFileId :: Lens' UsageReportEntity (Maybe Text)

-- | Obfuscated customer id for the record.
ureCustomerId :: Lens' UsageReportEntity (Maybe Text)

-- | user's email.
ureUserEmail :: Lens' UsageReportEntity (Maybe Text)

-- | The type of item, can be a customer or user.
ureType :: Lens' UsageReportEntity (Maybe Text)
data ActivityEventsItemParametersItem

-- | Creates a value of <a>ActivityEventsItemParametersItem</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aeipiBoolValue</a></li>
--   <li><a>aeipiIntValue</a></li>
--   <li><a>aeipiValue</a></li>
--   <li><a>aeipiMultiIntValue</a></li>
--   <li><a>aeipiName</a></li>
--   <li><a>aeipiMultiValue</a></li>
--   </ul>
activityEventsItemParametersItem :: ActivityEventsItemParametersItem

-- | Boolean value of the parameter.
aeipiBoolValue :: Lens' ActivityEventsItemParametersItem (Maybe Bool)

-- | Integral value of the parameter.
aeipiIntValue :: Lens' ActivityEventsItemParametersItem (Maybe Int64)

-- | String value of the parameter.
aeipiValue :: Lens' ActivityEventsItemParametersItem (Maybe Text)

-- | Multi-int value of the parameter.
aeipiMultiIntValue :: Lens' ActivityEventsItemParametersItem [Int64]

-- | The name of the parameter.
aeipiName :: Lens' ActivityEventsItemParametersItem (Maybe Text)

-- | Multi-string value of the parameter.
aeipiMultiValue :: Lens' ActivityEventsItemParametersItem [Text]

-- | User doing the action.
--   
--   <i>See:</i> <a>activityActor</a> smart constructor.
data ActivityActor

-- | Creates a value of <a>ActivityActor</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aaEmail</a></li>
--   <li><a>aaCallerType</a></li>
--   <li><a>aaProFileId</a></li>
--   <li><a>aaKey</a></li>
--   </ul>
activityActor :: ActivityActor

-- | Email address of the user.
aaEmail :: Lens' ActivityActor (Maybe Text)

-- | User or OAuth 2LO request.
aaCallerType :: Lens' ActivityActor (Maybe Text)

-- | Obfuscated user id of the user.
aaProFileId :: Lens' ActivityActor (Maybe Text)

-- | For OAuth 2LO API requests, consumer_key of the requestor.
aaKey :: Lens' ActivityActor (Maybe Text)
