gogol-apps-activity 0.5.0 → 1.0.0
raw patch · 13 files changed
+1255/−1494 lines, 13 filesdep −basedep ~gogol-coresetup-changed
Dependencies removed: base
Dependency ranges changed: gogol-core
Files
- README.md +1/−1
- Setup.hs +2/−1
- gen/Gogol/AppsActivity.hs +108/−0
- gen/Gogol/AppsActivity/Activities/List.hs +112/−0
- gen/Gogol/AppsActivity/Internal/Product.hs +564/−0
- gen/Gogol/AppsActivity/Internal/Sum.hs +308/−0
- gen/Gogol/AppsActivity/Types.hs +109/−0
- gen/Network/Google/AppsActivity.hs +0/−143
- gen/Network/Google/AppsActivity/Types.hs +0/−134
- gen/Network/Google/AppsActivity/Types/Product.hs +0/−751
- gen/Network/Google/AppsActivity/Types/Sum.hs +0/−247
- gen/Network/Google/Resource/AppsActivity/Activities/List.hs +0/−181
- gogol-apps-activity.cabal +51/−36
README.md view
@@ -8,7 +8,7 @@ ## Version -`0.5.0`+`1.0.0` ## Description
Setup.hs view
@@ -1,2 +1,3 @@-import Distribution.Simple+import Distribution.Simple+ main = defaultMain
+ gen/Gogol/AppsActivity.hs view
@@ -0,0 +1,108 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- |+-- Module : Gogol.AppsActivity+-- Copyright : (c) 2015-2025 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+gogol@gmail.com>+-- Toni Cebrián <toni@tonicebrian.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Provides a historical view of activity.+--+-- /See:/ <https://developers.google.com/google-apps/activity/ Drive Activity API Reference>+module Gogol.AppsActivity+ ( -- * Configuration+ appsActivityService,++ -- * OAuth Scopes+ Activity'FullControl,++ -- * Resources++ -- ** appsactivity.activities.list+ AppsActivityActivitiesListResource,+ AppsActivityActivitiesList (..),+ newAppsActivityActivitiesList,++ -- * Types++ -- ** Activity+ Activity (..),+ newActivity,++ -- ** Event+ Event (..),+ newEvent,++ -- ** Event_AdditionalEventTypesItem+ Event_AdditionalEventTypesItem (..),++ -- ** Event_PrimaryEventType+ Event_PrimaryEventType (..),++ -- ** ListActivitiesResponse+ ListActivitiesResponse (..),+ newListActivitiesResponse,++ -- ** Move+ Move (..),+ newMove,++ -- ** Parent+ Parent (..),+ newParent,++ -- ** Permission+ Permission (..),+ newPermission,++ -- ** Permission_Role+ Permission_Role (..),++ -- ** Permission_Type+ Permission_Type (..),++ -- ** PermissionChange+ PermissionChange (..),+ newPermissionChange,++ -- ** Photo+ Photo (..),+ newPhoto,++ -- ** Rename+ Rename (..),+ newRename,++ -- ** Target+ Target (..),+ newTarget,++ -- ** User+ User (..),+ newUser,++ -- ** ActivitiesListGroupingStrategy+ ActivitiesListGroupingStrategy (..),+ )+where++import Gogol.AppsActivity.Activities.List+import Gogol.AppsActivity.Types
+ gen/Gogol/AppsActivity/Activities/List.hs view
@@ -0,0 +1,112 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- |+-- Module : Gogol.AppsActivity.Activities.List+-- Copyright : (c) 2015-2025 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+gogol@gmail.com>+-- Toni Cebrián <toni@tonicebrian.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of activities visible to the current logged in user. Visible activities are determined by the visibility settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter.+--+-- /See:/ <https://developers.google.com/google-apps/activity/ Drive Activity API Reference> for @appsactivity.activities.list@.+module Gogol.AppsActivity.Activities.List+ ( -- * Resource+ AppsActivityActivitiesListResource,++ -- ** Constructing a Request+ AppsActivityActivitiesList (..),+ newAppsActivityActivitiesList,+ )+where++import Gogol.AppsActivity.Types+import Gogol.Prelude qualified as Core++-- | A resource alias for @appsactivity.activities.list@ method which the+-- 'AppsActivityActivitiesList' request conforms to.+type AppsActivityActivitiesListResource =+ "appsactivity"+ Core.:> "v1"+ Core.:> "activities"+ Core.:> Core.QueryParam "drive.ancestorId" Core.Text+ Core.:> Core.QueryParam "drive.fileId" Core.Text+ Core.:> Core.QueryParam "groupingStrategy" ActivitiesListGroupingStrategy+ Core.:> Core.QueryParam "pageSize" Core.Int32+ Core.:> Core.QueryParam "pageToken" Core.Text+ Core.:> Core.QueryParam "source" Core.Text+ Core.:> Core.QueryParam "userId" Core.Text+ Core.:> Core.QueryParam "alt" Core.AltJSON+ Core.:> Core.Get '[Core.JSON] ListActivitiesResponse++-- | Returns a list of activities visible to the current logged in user. Visible activities are determined by the visibility settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter.+--+-- /See:/ 'newAppsActivityActivitiesList' smart constructor.+data AppsActivityActivitiesList = AppsActivityActivitiesList+ { -- | Identifies the Drive folder containing the items for which to return activities.+ driveAncestorId :: (Core.Maybe Core.Text),+ -- | Identifies the Drive item to return activities for.+ driveFileId :: (Core.Maybe Core.Text),+ -- | Indicates the strategy to use when grouping singleEvents items in the associated combinedEvent object.+ groupingStrategy :: ActivitiesListGroupingStrategy,+ -- | The maximum number of events to return on a page. The response includes a continuation token if there are more events.+ pageSize :: Core.Int32,+ -- | A token to retrieve a specific page of results.+ pageToken :: (Core.Maybe Core.Text),+ -- | The Google service from which to return activities. Possible values of source are: - drive.google.com+ source :: (Core.Maybe Core.Text),+ -- | The ID used for ACL checks (does not filter the resulting event list by the assigned value). Use the special value me to indicate the currently authenticated user.+ userId :: Core.Text+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'AppsActivityActivitiesList' with the minimum fields required to make a request.+newAppsActivityActivitiesList ::+ AppsActivityActivitiesList+newAppsActivityActivitiesList =+ AppsActivityActivitiesList+ { driveAncestorId = Core.Nothing,+ driveFileId = Core.Nothing,+ groupingStrategy = ActivitiesListGroupingStrategy_DriveUi,+ pageSize = 50,+ pageToken = Core.Nothing,+ source = Core.Nothing,+ userId = "me"+ }++instance Core.GoogleRequest AppsActivityActivitiesList where+ type Rs AppsActivityActivitiesList = ListActivitiesResponse+ type Scopes AppsActivityActivitiesList = '[Activity'FullControl]+ requestClient AppsActivityActivitiesList {..} =+ go+ driveAncestorId+ driveFileId+ (Core.Just groupingStrategy)+ (Core.Just pageSize)+ pageToken+ source+ (Core.Just userId)+ (Core.Just Core.AltJSON)+ appsActivityService+ where+ go =+ Core.buildClient+ (Core.Proxy :: Core.Proxy AppsActivityActivitiesListResource)+ Core.mempty
+ gen/Gogol/AppsActivity/Internal/Product.hs view
@@ -0,0 +1,564 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- |+-- Module : Gogol.AppsActivity.Internal.Product+-- Copyright : (c) 2015-2025 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+gogol@gmail.com>+-- Toni Cebrián <toni@tonicebrian.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Gogol.AppsActivity.Internal.Product+ ( -- * Activity+ Activity (..),+ newActivity,++ -- * Event+ Event (..),+ newEvent,++ -- * ListActivitiesResponse+ ListActivitiesResponse (..),+ newListActivitiesResponse,++ -- * Move+ Move (..),+ newMove,++ -- * Parent+ Parent (..),+ newParent,++ -- * Permission+ Permission (..),+ newPermission,++ -- * PermissionChange+ PermissionChange (..),+ newPermissionChange,++ -- * Photo+ Photo (..),+ newPhoto,++ -- * Rename+ Rename (..),+ newRename,++ -- * Target+ Target (..),+ newTarget,++ -- * User+ User (..),+ newUser,+ )+where++import Gogol.AppsActivity.Internal.Sum+import Gogol.Prelude qualified as Core++-- | An Activity resource is a combined view of multiple events. An activity has a list of individual events and a combined view of the common fields among all events.+--+-- /See:/ 'newActivity' smart constructor.+data Activity = Activity+ { -- | The fields common to all of the singleEvents that make up the Activity.+ combinedEvent :: (Core.Maybe Event),+ -- | A list of all the Events that make up the Activity.+ singleEvents :: (Core.Maybe [Event])+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Activity' with the minimum fields required to make a request.+newActivity ::+ Activity+newActivity =+ Activity+ { combinedEvent = Core.Nothing,+ singleEvents = Core.Nothing+ }++instance Core.FromJSON Activity where+ parseJSON =+ Core.withObject+ "Activity"+ ( \o ->+ Activity+ Core.<$> (o Core..:? "combinedEvent")+ Core.<*> (o Core..:? "singleEvents")+ )++instance Core.ToJSON Activity where+ toJSON Activity {..} =+ Core.object+ ( Core.catMaybes+ [ ("combinedEvent" Core..=) Core.<$> combinedEvent,+ ("singleEvents" Core..=) Core.<$> singleEvents+ ]+ )++-- | Represents the changes associated with an action taken by a user.+--+-- /See:/ 'newEvent' smart constructor.+data Event = Event+ { -- | Additional event types. Some events may have multiple types when multiple actions are part of a single event. For example, creating a document, renaming it, and sharing it may be part of a single file-creation event.+ additionalEventTypes :: (Core.Maybe [Event_AdditionalEventTypesItem]),+ -- | The time at which the event occurred formatted as Unix time in milliseconds.+ eventTimeMillis :: (Core.Maybe Core.Word64),+ -- | Whether this event is caused by a user being deleted.+ fromUserDeletion :: (Core.Maybe Core.Bool),+ -- | Extra information for move type events, such as changes in an object\'s parents.+ move :: (Core.Maybe Move),+ -- | Extra information for permissionChange type events, such as the user or group the new permission applies to.+ permissionChanges :: (Core.Maybe [PermissionChange]),+ -- | The main type of event that occurred.+ primaryEventType :: (Core.Maybe Event_PrimaryEventType),+ -- | Extra information for rename type events, such as the old and new names.+ rename :: (Core.Maybe Rename),+ -- | Information specific to the Target object modified by the event.+ target :: (Core.Maybe Target),+ -- | Represents the user responsible for the event.+ user :: (Core.Maybe User)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Event' with the minimum fields required to make a request.+newEvent ::+ Event+newEvent =+ Event+ { additionalEventTypes = Core.Nothing,+ eventTimeMillis = Core.Nothing,+ fromUserDeletion = Core.Nothing,+ move = Core.Nothing,+ permissionChanges = Core.Nothing,+ primaryEventType = Core.Nothing,+ rename = Core.Nothing,+ target = Core.Nothing,+ user = Core.Nothing+ }++instance Core.FromJSON Event where+ parseJSON =+ Core.withObject+ "Event"+ ( \o ->+ Event+ Core.<$> (o Core..:? "additionalEventTypes")+ Core.<*> (o Core..:? "eventTimeMillis" Core.<&> Core.fmap Core.fromAsText)+ Core.<*> (o Core..:? "fromUserDeletion")+ Core.<*> (o Core..:? "move")+ Core.<*> (o Core..:? "permissionChanges")+ Core.<*> (o Core..:? "primaryEventType")+ Core.<*> (o Core..:? "rename")+ Core.<*> (o Core..:? "target")+ Core.<*> (o Core..:? "user")+ )++instance Core.ToJSON Event where+ toJSON Event {..} =+ Core.object+ ( Core.catMaybes+ [ ("additionalEventTypes" Core..=) Core.<$> additionalEventTypes,+ ("eventTimeMillis" Core..=)+ Core.. Core.AsText+ Core.<$> eventTimeMillis,+ ("fromUserDeletion" Core..=) Core.<$> fromUserDeletion,+ ("move" Core..=) Core.<$> move,+ ("permissionChanges" Core..=) Core.<$> permissionChanges,+ ("primaryEventType" Core..=) Core.<$> primaryEventType,+ ("rename" Core..=) Core.<$> rename,+ ("target" Core..=) Core.<$> target,+ ("user" Core..=) Core.<$> user+ ]+ )++-- | The response from the list request. Contains a list of activities and a token to retrieve the next page of results.+--+-- /See:/ 'newListActivitiesResponse' smart constructor.+data ListActivitiesResponse = ListActivitiesResponse+ { -- | List of activities.+ activities :: (Core.Maybe [Activity]),+ -- | Token for the next page of results.+ nextPageToken :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'ListActivitiesResponse' with the minimum fields required to make a request.+newListActivitiesResponse ::+ ListActivitiesResponse+newListActivitiesResponse =+ ListActivitiesResponse+ { activities = Core.Nothing,+ nextPageToken = Core.Nothing+ }++instance Core.FromJSON ListActivitiesResponse where+ parseJSON =+ Core.withObject+ "ListActivitiesResponse"+ ( \o ->+ ListActivitiesResponse+ Core.<$> (o Core..:? "activities")+ Core.<*> (o Core..:? "nextPageToken")+ )++instance Core.ToJSON ListActivitiesResponse where+ toJSON ListActivitiesResponse {..} =+ Core.object+ ( Core.catMaybes+ [ ("activities" Core..=) Core.<$> activities,+ ("nextPageToken" Core..=) Core.<$> nextPageToken+ ]+ )++-- | Contains information about changes in an object\'s parents as a result of a move type event.+--+-- /See:/ 'newMove' smart constructor.+data Move = Move+ { -- | The added parent(s).+ addedParents :: (Core.Maybe [Parent]),+ -- | The removed parent(s).+ removedParents :: (Core.Maybe [Parent])+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Move' with the minimum fields required to make a request.+newMove ::+ Move+newMove =+ Move {addedParents = Core.Nothing, removedParents = Core.Nothing}++instance Core.FromJSON Move where+ parseJSON =+ Core.withObject+ "Move"+ ( \o ->+ Move+ Core.<$> (o Core..:? "addedParents")+ Core.<*> (o Core..:? "removedParents")+ )++instance Core.ToJSON Move where+ toJSON Move {..} =+ Core.object+ ( Core.catMaybes+ [ ("addedParents" Core..=) Core.<$> addedParents,+ ("removedParents" Core..=) Core.<$> removedParents+ ]+ )++-- | Contains information about a parent object. For example, a folder in Drive is a parent for all files within it.+--+-- /See:/ 'newParent' smart constructor.+data Parent = Parent+ { -- | The parent\'s ID.+ id :: (Core.Maybe Core.Text),+ -- | Whether this is the root folder.+ isRoot :: (Core.Maybe Core.Bool),+ -- | The parent\'s title.+ title :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Parent' with the minimum fields required to make a request.+newParent ::+ Parent+newParent =+ Parent+ { id = Core.Nothing,+ isRoot = Core.Nothing,+ title = Core.Nothing+ }++instance Core.FromJSON Parent where+ parseJSON =+ Core.withObject+ "Parent"+ ( \o ->+ Parent+ Core.<$> (o Core..:? "id")+ Core.<*> (o Core..:? "isRoot")+ Core.<*> (o Core..:? "title")+ )++instance Core.ToJSON Parent where+ toJSON Parent {..} =+ Core.object+ ( Core.catMaybes+ [ ("id" Core..=) Core.<$> id,+ ("isRoot" Core..=) Core.<$> isRoot,+ ("title" Core..=) Core.<$> title+ ]+ )++-- | Contains information about the permissions and type of access allowed with regards to a Google Drive object. This is a subset of the fields contained in a corresponding Drive Permissions object.+--+-- /See:/ 'newPermission' smart constructor.+data Permission = Permission+ { -- | The name of the user or group the permission applies to.+ name :: (Core.Maybe Core.Text),+ -- | The ID for this permission. Corresponds to the Drive API\'s permission ID returned as part of the Drive Permissions resource.+ permissionId :: (Core.Maybe Core.Text),+ -- | Indicates the Google Drive permissions role. The role determines a user\'s ability to read, write, or comment on the file.+ role' :: (Core.Maybe Permission_Role),+ -- | Indicates how widely permissions are granted.+ type' :: (Core.Maybe Permission_Type),+ -- | The user\'s information if the type is USER.+ user :: (Core.Maybe User),+ -- | Whether the permission requires a link to the file.+ withLink :: (Core.Maybe Core.Bool)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Permission' with the minimum fields required to make a request.+newPermission ::+ Permission+newPermission =+ Permission+ { name = Core.Nothing,+ permissionId = Core.Nothing,+ role' = Core.Nothing,+ type' = Core.Nothing,+ user = Core.Nothing,+ withLink = Core.Nothing+ }++instance Core.FromJSON Permission where+ parseJSON =+ Core.withObject+ "Permission"+ ( \o ->+ Permission+ Core.<$> (o Core..:? "name")+ Core.<*> (o Core..:? "permissionId")+ Core.<*> (o Core..:? "role")+ Core.<*> (o Core..:? "type")+ Core.<*> (o Core..:? "user")+ Core.<*> (o Core..:? "withLink")+ )++instance Core.ToJSON Permission where+ toJSON Permission {..} =+ Core.object+ ( Core.catMaybes+ [ ("name" Core..=) Core.<$> name,+ ("permissionId" Core..=) Core.<$> permissionId,+ ("role" Core..=) Core.<$> role',+ ("type" Core..=) Core.<$> type',+ ("user" Core..=) Core.<$> user,+ ("withLink" Core..=) Core.<$> withLink+ ]+ )++-- | Contains information about a Drive object\'s permissions that changed as a result of a permissionChange type event.+--+-- /See:/ 'newPermissionChange' smart constructor.+data PermissionChange = PermissionChange+ { -- | Lists all Permission objects added.+ addedPermissions :: (Core.Maybe [Permission]),+ -- | Lists all Permission objects removed.+ removedPermissions :: (Core.Maybe [Permission])+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'PermissionChange' with the minimum fields required to make a request.+newPermissionChange ::+ PermissionChange+newPermissionChange =+ PermissionChange+ { addedPermissions = Core.Nothing,+ removedPermissions = Core.Nothing+ }++instance Core.FromJSON PermissionChange where+ parseJSON =+ Core.withObject+ "PermissionChange"+ ( \o ->+ PermissionChange+ Core.<$> (o Core..:? "addedPermissions")+ Core.<*> (o Core..:? "removedPermissions")+ )++instance Core.ToJSON PermissionChange where+ toJSON PermissionChange {..} =+ Core.object+ ( Core.catMaybes+ [ ("addedPermissions" Core..=) Core.<$> addedPermissions,+ ("removedPermissions" Core..=) Core.<$> removedPermissions+ ]+ )++-- | Photo information for a user.+--+-- /See:/ 'newPhoto' smart constructor.+newtype Photo = Photo+ { -- | The URL of the photo.+ url :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Photo' with the minimum fields required to make a request.+newPhoto ::+ Photo+newPhoto = Photo {url = Core.Nothing}++instance Core.FromJSON Photo where+ parseJSON =+ Core.withObject+ "Photo"+ (\o -> Photo Core.<$> (o Core..:? "url"))++instance Core.ToJSON Photo where+ toJSON Photo {..} =+ Core.object (Core.catMaybes [("url" Core..=) Core.<$> url])++-- | Contains information about a renametype event.+--+-- /See:/ 'newRename' smart constructor.+data Rename = Rename+ { -- | The new title.+ newTitle' :: (Core.Maybe Core.Text),+ -- | The old title.+ oldTitle :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Rename' with the minimum fields required to make a request.+newRename ::+ Rename+newRename =+ Rename {newTitle' = Core.Nothing, oldTitle = Core.Nothing}++instance Core.FromJSON Rename where+ parseJSON =+ Core.withObject+ "Rename"+ ( \o ->+ Rename+ Core.<$> (o Core..:? "newTitle")+ Core.<*> (o Core..:? "oldTitle")+ )++instance Core.ToJSON Rename where+ toJSON Rename {..} =+ Core.object+ ( Core.catMaybes+ [ ("newTitle" Core..=) Core.<$> newTitle',+ ("oldTitle" Core..=) Core.<$> oldTitle+ ]+ )++-- | Information about the object modified by the event.+--+-- /See:/ 'newTarget' smart constructor.+data Target = Target+ { -- | The ID of the target. For example, in Google Drive, this is the file or folder ID.+ id :: (Core.Maybe Core.Text),+ -- | The MIME type of the target.+ mimeType :: (Core.Maybe Core.Text),+ -- | The name of the target. For example, in Google Drive, this is the title of the file.+ name :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Target' with the minimum fields required to make a request.+newTarget ::+ Target+newTarget =+ Target+ { id = Core.Nothing,+ mimeType = Core.Nothing,+ name = Core.Nothing+ }++instance Core.FromJSON Target where+ parseJSON =+ Core.withObject+ "Target"+ ( \o ->+ Target+ Core.<$> (o Core..:? "id")+ Core.<*> (o Core..:? "mimeType")+ Core.<*> (o Core..:? "name")+ )++instance Core.ToJSON Target where+ toJSON Target {..} =+ Core.object+ ( Core.catMaybes+ [ ("id" Core..=) Core.<$> id,+ ("mimeType" Core..=) Core.<$> mimeType,+ ("name" Core..=) Core.<$> name+ ]+ )++-- | A representation of a user.+--+-- /See:/ 'newUser' smart constructor.+data User = User+ { -- | A boolean which indicates whether the specified User was deleted. If true, name, photo and permission_id will be omitted.+ isDeleted :: (Core.Maybe Core.Bool),+ -- | Whether the user is the authenticated user.+ isMe :: (Core.Maybe Core.Bool),+ -- | The displayable name of the user.+ name :: (Core.Maybe Core.Text),+ -- | The permission ID associated with this user. Equivalent to the Drive API\'s permission ID for this user, returned as part of the Drive Permissions resource.+ permissionId :: (Core.Maybe Core.Text),+ -- | The profile photo of the user. Not present if the user has no profile photo.+ photo :: (Core.Maybe Photo)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'User' with the minimum fields required to make a request.+newUser ::+ User+newUser =+ User+ { isDeleted = Core.Nothing,+ isMe = Core.Nothing,+ name = Core.Nothing,+ permissionId = Core.Nothing,+ photo = Core.Nothing+ }++instance Core.FromJSON User where+ parseJSON =+ Core.withObject+ "User"+ ( \o ->+ User+ Core.<$> (o Core..:? "isDeleted")+ Core.<*> (o Core..:? "isMe")+ Core.<*> (o Core..:? "name")+ Core.<*> (o Core..:? "permissionId")+ Core.<*> (o Core..:? "photo")+ )++instance Core.ToJSON User where+ toJSON User {..} =+ Core.object+ ( Core.catMaybes+ [ ("isDeleted" Core..=) Core.<$> isDeleted,+ ("isMe" Core..=) Core.<$> isMe,+ ("name" Core..=) Core.<$> name,+ ("permissionId" Core..=) Core.<$> permissionId,+ ("photo" Core..=) Core.<$> photo+ ]+ )
+ gen/Gogol/AppsActivity/Internal/Sum.hs view
@@ -0,0 +1,308 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- |+-- Module : Gogol.AppsActivity.Internal.Sum+-- Copyright : (c) 2015-2025 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+gogol@gmail.com>+-- Toni Cebrián <toni@tonicebrian.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Gogol.AppsActivity.Internal.Sum+ ( -- * Event_AdditionalEventTypesItem+ Event_AdditionalEventTypesItem+ ( Event_AdditionalEventTypesItem_Comment,+ Event_AdditionalEventTypesItem_Create,+ Event_AdditionalEventTypesItem_Edit,+ Event_AdditionalEventTypesItem_EmptyTrash,+ Event_AdditionalEventTypesItem_Move,+ Event_AdditionalEventTypesItem_PermissionChange,+ Event_AdditionalEventTypesItem_Rename,+ Event_AdditionalEventTypesItem_Trash,+ Event_AdditionalEventTypesItem_Unknown,+ Event_AdditionalEventTypesItem_Untrash,+ Event_AdditionalEventTypesItem_Upload,+ ..+ ),++ -- * Event_PrimaryEventType+ Event_PrimaryEventType+ ( Event_PrimaryEventType_Comment,+ Event_PrimaryEventType_Create,+ Event_PrimaryEventType_Edit,+ Event_PrimaryEventType_EmptyTrash,+ Event_PrimaryEventType_Move,+ Event_PrimaryEventType_PermissionChange,+ Event_PrimaryEventType_Rename,+ Event_PrimaryEventType_Trash,+ Event_PrimaryEventType_Unknown,+ Event_PrimaryEventType_Untrash,+ Event_PrimaryEventType_Upload,+ ..+ ),++ -- * Permission_Role+ Permission_Role+ ( Permission_Role_Commenter,+ Permission_Role_FileOrganizer,+ Permission_Role_Owner,+ Permission_Role_PublishedReader,+ Permission_Role_Reader,+ Permission_Role_Writer,+ ..+ ),++ -- * Permission_Type+ Permission_Type+ ( Permission_Type_Anyone,+ Permission_Type_Domain,+ Permission_Type_Group,+ Permission_Type_User,+ ..+ ),++ -- * ActivitiesListGroupingStrategy+ ActivitiesListGroupingStrategy+ ( ActivitiesListGroupingStrategy_DriveUi,+ ActivitiesListGroupingStrategy_None,+ ..+ ),+ )+where++import Gogol.Prelude qualified as Core++newtype Event_AdditionalEventTypesItem = Event_AdditionalEventTypesItem {fromEvent_AdditionalEventTypesItem :: Core.Text}+ deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+ deriving newtype+ ( Core.Hashable,+ Core.ToHttpApiData,+ Core.FromHttpApiData,+ Core.ToJSON,+ Core.ToJSONKey,+ Core.FromJSON,+ Core.FromJSONKey+ )++pattern Event_AdditionalEventTypesItem_Comment :: Event_AdditionalEventTypesItem+pattern Event_AdditionalEventTypesItem_Comment = Event_AdditionalEventTypesItem "comment"++pattern Event_AdditionalEventTypesItem_Create :: Event_AdditionalEventTypesItem+pattern Event_AdditionalEventTypesItem_Create = Event_AdditionalEventTypesItem "create"++pattern Event_AdditionalEventTypesItem_Edit :: Event_AdditionalEventTypesItem+pattern Event_AdditionalEventTypesItem_Edit = Event_AdditionalEventTypesItem "edit"++pattern Event_AdditionalEventTypesItem_EmptyTrash :: Event_AdditionalEventTypesItem+pattern Event_AdditionalEventTypesItem_EmptyTrash = Event_AdditionalEventTypesItem "emptyTrash"++pattern Event_AdditionalEventTypesItem_Move :: Event_AdditionalEventTypesItem+pattern Event_AdditionalEventTypesItem_Move = Event_AdditionalEventTypesItem "move"++pattern Event_AdditionalEventTypesItem_PermissionChange :: Event_AdditionalEventTypesItem+pattern Event_AdditionalEventTypesItem_PermissionChange = Event_AdditionalEventTypesItem "permissionChange"++pattern Event_AdditionalEventTypesItem_Rename :: Event_AdditionalEventTypesItem+pattern Event_AdditionalEventTypesItem_Rename = Event_AdditionalEventTypesItem "rename"++pattern Event_AdditionalEventTypesItem_Trash :: Event_AdditionalEventTypesItem+pattern Event_AdditionalEventTypesItem_Trash = Event_AdditionalEventTypesItem "trash"++pattern Event_AdditionalEventTypesItem_Unknown :: Event_AdditionalEventTypesItem+pattern Event_AdditionalEventTypesItem_Unknown = Event_AdditionalEventTypesItem "unknown"++pattern Event_AdditionalEventTypesItem_Untrash :: Event_AdditionalEventTypesItem+pattern Event_AdditionalEventTypesItem_Untrash = Event_AdditionalEventTypesItem "untrash"++pattern Event_AdditionalEventTypesItem_Upload :: Event_AdditionalEventTypesItem+pattern Event_AdditionalEventTypesItem_Upload = Event_AdditionalEventTypesItem "upload"++{-# COMPLETE+ Event_AdditionalEventTypesItem_Comment,+ Event_AdditionalEventTypesItem_Create,+ Event_AdditionalEventTypesItem_Edit,+ Event_AdditionalEventTypesItem_EmptyTrash,+ Event_AdditionalEventTypesItem_Move,+ Event_AdditionalEventTypesItem_PermissionChange,+ Event_AdditionalEventTypesItem_Rename,+ Event_AdditionalEventTypesItem_Trash,+ Event_AdditionalEventTypesItem_Unknown,+ Event_AdditionalEventTypesItem_Untrash,+ Event_AdditionalEventTypesItem_Upload,+ Event_AdditionalEventTypesItem+ #-}++-- | The main type of event that occurred.+newtype Event_PrimaryEventType = Event_PrimaryEventType {fromEvent_PrimaryEventType :: Core.Text}+ deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+ deriving newtype+ ( Core.Hashable,+ Core.ToHttpApiData,+ Core.FromHttpApiData,+ Core.ToJSON,+ Core.ToJSONKey,+ Core.FromJSON,+ Core.FromJSONKey+ )++pattern Event_PrimaryEventType_Comment :: Event_PrimaryEventType+pattern Event_PrimaryEventType_Comment = Event_PrimaryEventType "comment"++pattern Event_PrimaryEventType_Create :: Event_PrimaryEventType+pattern Event_PrimaryEventType_Create = Event_PrimaryEventType "create"++pattern Event_PrimaryEventType_Edit :: Event_PrimaryEventType+pattern Event_PrimaryEventType_Edit = Event_PrimaryEventType "edit"++pattern Event_PrimaryEventType_EmptyTrash :: Event_PrimaryEventType+pattern Event_PrimaryEventType_EmptyTrash = Event_PrimaryEventType "emptyTrash"++pattern Event_PrimaryEventType_Move :: Event_PrimaryEventType+pattern Event_PrimaryEventType_Move = Event_PrimaryEventType "move"++pattern Event_PrimaryEventType_PermissionChange :: Event_PrimaryEventType+pattern Event_PrimaryEventType_PermissionChange = Event_PrimaryEventType "permissionChange"++pattern Event_PrimaryEventType_Rename :: Event_PrimaryEventType+pattern Event_PrimaryEventType_Rename = Event_PrimaryEventType "rename"++pattern Event_PrimaryEventType_Trash :: Event_PrimaryEventType+pattern Event_PrimaryEventType_Trash = Event_PrimaryEventType "trash"++pattern Event_PrimaryEventType_Unknown :: Event_PrimaryEventType+pattern Event_PrimaryEventType_Unknown = Event_PrimaryEventType "unknown"++pattern Event_PrimaryEventType_Untrash :: Event_PrimaryEventType+pattern Event_PrimaryEventType_Untrash = Event_PrimaryEventType "untrash"++pattern Event_PrimaryEventType_Upload :: Event_PrimaryEventType+pattern Event_PrimaryEventType_Upload = Event_PrimaryEventType "upload"++{-# COMPLETE+ Event_PrimaryEventType_Comment,+ Event_PrimaryEventType_Create,+ Event_PrimaryEventType_Edit,+ Event_PrimaryEventType_EmptyTrash,+ Event_PrimaryEventType_Move,+ Event_PrimaryEventType_PermissionChange,+ Event_PrimaryEventType_Rename,+ Event_PrimaryEventType_Trash,+ Event_PrimaryEventType_Unknown,+ Event_PrimaryEventType_Untrash,+ Event_PrimaryEventType_Upload,+ Event_PrimaryEventType+ #-}++-- | Indicates the Google Drive permissions role. The role determines a user\'s ability to read, write, or comment on the file.+newtype Permission_Role = Permission_Role {fromPermission_Role :: Core.Text}+ deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+ deriving newtype+ ( Core.Hashable,+ Core.ToHttpApiData,+ Core.FromHttpApiData,+ Core.ToJSON,+ Core.ToJSONKey,+ Core.FromJSON,+ Core.FromJSONKey+ )++pattern Permission_Role_Commenter :: Permission_Role+pattern Permission_Role_Commenter = Permission_Role "commenter"++pattern Permission_Role_FileOrganizer :: Permission_Role+pattern Permission_Role_FileOrganizer = Permission_Role "fileOrganizer"++pattern Permission_Role_Owner :: Permission_Role+pattern Permission_Role_Owner = Permission_Role "owner"++pattern Permission_Role_PublishedReader :: Permission_Role+pattern Permission_Role_PublishedReader = Permission_Role "publishedReader"++pattern Permission_Role_Reader :: Permission_Role+pattern Permission_Role_Reader = Permission_Role "reader"++pattern Permission_Role_Writer :: Permission_Role+pattern Permission_Role_Writer = Permission_Role "writer"++{-# COMPLETE+ Permission_Role_Commenter,+ Permission_Role_FileOrganizer,+ Permission_Role_Owner,+ Permission_Role_PublishedReader,+ Permission_Role_Reader,+ Permission_Role_Writer,+ Permission_Role+ #-}++-- | Indicates how widely permissions are granted.+newtype Permission_Type = Permission_Type {fromPermission_Type :: Core.Text}+ deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+ deriving newtype+ ( Core.Hashable,+ Core.ToHttpApiData,+ Core.FromHttpApiData,+ Core.ToJSON,+ Core.ToJSONKey,+ Core.FromJSON,+ Core.FromJSONKey+ )++pattern Permission_Type_Anyone :: Permission_Type+pattern Permission_Type_Anyone = Permission_Type "anyone"++pattern Permission_Type_Domain :: Permission_Type+pattern Permission_Type_Domain = Permission_Type "domain"++pattern Permission_Type_Group :: Permission_Type+pattern Permission_Type_Group = Permission_Type "group"++pattern Permission_Type_User :: Permission_Type+pattern Permission_Type_User = Permission_Type "user"++{-# COMPLETE+ Permission_Type_Anyone,+ Permission_Type_Domain,+ Permission_Type_Group,+ Permission_Type_User,+ Permission_Type+ #-}++-- | Indicates the strategy to use when grouping singleEvents items in the associated combinedEvent object.+newtype ActivitiesListGroupingStrategy = ActivitiesListGroupingStrategy {fromActivitiesListGroupingStrategy :: Core.Text}+ deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+ deriving newtype+ ( Core.Hashable,+ Core.ToHttpApiData,+ Core.FromHttpApiData,+ Core.ToJSON,+ Core.ToJSONKey,+ Core.FromJSON,+ Core.FromJSONKey+ )++pattern ActivitiesListGroupingStrategy_DriveUi :: ActivitiesListGroupingStrategy+pattern ActivitiesListGroupingStrategy_DriveUi = ActivitiesListGroupingStrategy "driveUi"++pattern ActivitiesListGroupingStrategy_None :: ActivitiesListGroupingStrategy+pattern ActivitiesListGroupingStrategy_None = ActivitiesListGroupingStrategy "none"++{-# COMPLETE+ ActivitiesListGroupingStrategy_DriveUi,+ ActivitiesListGroupingStrategy_None,+ ActivitiesListGroupingStrategy+ #-}
+ gen/Gogol/AppsActivity/Types.hs view
@@ -0,0 +1,109 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- |+-- Module : Gogol.AppsActivity.Types+-- Copyright : (c) 2015-2025 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+gogol@gmail.com>+-- Toni Cebrián <toni@tonicebrian.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Gogol.AppsActivity.Types+ ( -- * Configuration+ appsActivityService,++ -- * OAuth Scopes+ Activity'FullControl,++ -- * Types++ -- ** Activity+ Activity (..),+ newActivity,++ -- ** Event+ Event (..),+ newEvent,++ -- ** Event_AdditionalEventTypesItem+ Event_AdditionalEventTypesItem (..),++ -- ** Event_PrimaryEventType+ Event_PrimaryEventType (..),++ -- ** ListActivitiesResponse+ ListActivitiesResponse (..),+ newListActivitiesResponse,++ -- ** Move+ Move (..),+ newMove,++ -- ** Parent+ Parent (..),+ newParent,++ -- ** Permission+ Permission (..),+ newPermission,++ -- ** Permission_Role+ Permission_Role (..),++ -- ** Permission_Type+ Permission_Type (..),++ -- ** PermissionChange+ PermissionChange (..),+ newPermissionChange,++ -- ** Photo+ Photo (..),+ newPhoto,++ -- ** Rename+ Rename (..),+ newRename,++ -- ** Target+ Target (..),+ newTarget,++ -- ** User+ User (..),+ newUser,++ -- ** ActivitiesListGroupingStrategy+ ActivitiesListGroupingStrategy (..),+ )+where++import Gogol.AppsActivity.Internal.Product+import Gogol.AppsActivity.Internal.Sum+import Gogol.Prelude qualified as Core++-- | Default request referring to version @v1@ of the Drive Activity API. This contains the host and root path used as a starting point for constructing service requests.+appsActivityService :: Core.ServiceConfig+appsActivityService =+ Core.defaultService+ (Core.ServiceId "appsactivity:v1")+ "www.googleapis.com"++-- | View the activity history of your Google apps+type Activity'FullControl =+ "https://www.googleapis.com/auth/activity"
− gen/Network/Google/AppsActivity.hs
@@ -1,143 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE TypeOperators #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}---- |--- Module : Network.Google.AppsActivity--- 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)------ Provides a historical view of activity.------ /See:/ <https://developers.google.com/google-apps/activity/ Drive Activity API Reference>-module Network.Google.AppsActivity- (- -- * Service Configuration- appsActivityService-- -- * OAuth Scopes- , activityScope-- -- * API Declaration- , AppsActivityAPI-- -- * Resources-- -- ** appsactivity.activities.list- , module Network.Google.Resource.AppsActivity.Activities.List-- -- * Types-- -- ** Parent- , Parent- , parent- , pIsRoot- , pId- , pTitle-- -- ** Photo- , Photo- , photo- , pURL-- -- ** EventPrimaryEventType- , EventPrimaryEventType (..)-- -- ** Event- , Event- , event- , ePrimaryEventType- , eUser- , eEventTimeMillis- , eRename- , eFromUserDeletion- , eAdditionalEventTypes- , ePermissionChanges- , eTarget- , eMove-- -- ** PermissionRole- , PermissionRole (..)-- -- ** ListActivitiesResponse- , ListActivitiesResponse- , listActivitiesResponse- , larNextPageToken- , larActivities-- -- ** PermissionChange- , PermissionChange- , permissionChange- , pcAddedPermissions- , pcRemovedPermissions-- -- ** PermissionType- , PermissionType (..)-- -- ** User- , User- , user- , uPhoto- , uIsDeleted- , uName- , uIsMe- , uPermissionId-- -- ** EventAdditionalEventTypesItem- , EventAdditionalEventTypesItem (..)-- -- ** Activity- , Activity- , activity- , aSingleEvents- , aCombinedEvent-- -- ** ActivitiesListGroupingStrategy- , ActivitiesListGroupingStrategy (..)-- -- ** Rename- , Rename- , rename- , rNewTitle- , rOldTitle-- -- ** Permission- , Permission- , permission- , pWithLink- , pUser- , pRole- , pName- , pType- , pPermissionId-- -- ** Target- , Target- , target- , tMimeType- , tName- , tId-- -- ** Move- , Move- , move- , mAddedParents- , mRemovedParents- ) where--import Network.Google.AppsActivity.Types-import Network.Google.Prelude-import Network.Google.Resource.AppsActivity.Activities.List--{- $resources-TODO--}---- | Represents the entirety of the methods and resources available for the Drive Activity API service.-type AppsActivityAPI = ActivitiesListResource
− gen/Network/Google/AppsActivity/Types.hs
@@ -1,134 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module : Network.Google.AppsActivity.Types--- 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)----module Network.Google.AppsActivity.Types- (- -- * Service Configuration- appsActivityService-- -- * OAuth Scopes- , activityScope-- -- * Parent- , Parent- , parent- , pIsRoot- , pId- , pTitle-- -- * Photo- , Photo- , photo- , pURL-- -- * EventPrimaryEventType- , EventPrimaryEventType (..)-- -- * Event- , Event- , event- , ePrimaryEventType- , eUser- , eEventTimeMillis- , eRename- , eFromUserDeletion- , eAdditionalEventTypes- , ePermissionChanges- , eTarget- , eMove-- -- * PermissionRole- , PermissionRole (..)-- -- * ListActivitiesResponse- , ListActivitiesResponse- , listActivitiesResponse- , larNextPageToken- , larActivities-- -- * PermissionChange- , PermissionChange- , permissionChange- , pcAddedPermissions- , pcRemovedPermissions-- -- * PermissionType- , PermissionType (..)-- -- * User- , User- , user- , uPhoto- , uIsDeleted- , uName- , uIsMe- , uPermissionId-- -- * EventAdditionalEventTypesItem- , EventAdditionalEventTypesItem (..)-- -- * Activity- , Activity- , activity- , aSingleEvents- , aCombinedEvent-- -- * ActivitiesListGroupingStrategy- , ActivitiesListGroupingStrategy (..)-- -- * Rename- , Rename- , rename- , rNewTitle- , rOldTitle-- -- * Permission- , Permission- , permission- , pWithLink- , pUser- , pRole- , pName- , pType- , pPermissionId-- -- * Target- , Target- , target- , tMimeType- , tName- , tId-- -- * Move- , Move- , move- , mAddedParents- , mRemovedParents- ) where--import Network.Google.AppsActivity.Types.Product-import Network.Google.AppsActivity.Types.Sum-import Network.Google.Prelude---- | Default request referring to version 'v1' of the Drive Activity API. This contains the host and root path used as a starting point for constructing service requests.-appsActivityService :: ServiceConfig-appsActivityService- = defaultService (ServiceId "appsactivity:v1")- "www.googleapis.com"---- | View the activity history of your Google apps-activityScope :: Proxy '["https://www.googleapis.com/auth/activity"]-activityScope = Proxy
− gen/Network/Google/AppsActivity/Types/Product.hs
@@ -1,751 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}--{-# OPTIONS_GHC -fno-warn-unused-binds #-}-{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module : Network.Google.AppsActivity.Types.Product--- 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)----module Network.Google.AppsActivity.Types.Product where--import Network.Google.AppsActivity.Types.Sum-import Network.Google.Prelude---- | Contains information about a parent object. For example, a folder in--- Drive is a parent for all files within it.------ /See:/ 'parent' smart constructor.-data Parent =- Parent'- { _pIsRoot :: !(Maybe Bool)- , _pId :: !(Maybe Text)- , _pTitle :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Parent' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'pIsRoot'------ * 'pId'------ * 'pTitle'-parent- :: Parent-parent = Parent' {_pIsRoot = Nothing, _pId = Nothing, _pTitle = Nothing}----- | Whether this is the root folder.-pIsRoot :: Lens' Parent (Maybe Bool)-pIsRoot = lens _pIsRoot (\ s a -> s{_pIsRoot = a})---- | The parent\'s ID.-pId :: Lens' Parent (Maybe Text)-pId = lens _pId (\ s a -> s{_pId = a})---- | The parent\'s title.-pTitle :: Lens' Parent (Maybe Text)-pTitle = lens _pTitle (\ s a -> s{_pTitle = a})--instance FromJSON Parent where- parseJSON- = withObject "Parent"- (\ o ->- Parent' <$>- (o .:? "isRoot") <*> (o .:? "id") <*>- (o .:? "title"))--instance ToJSON Parent where- toJSON Parent'{..}- = object- (catMaybes- [("isRoot" .=) <$> _pIsRoot, ("id" .=) <$> _pId,- ("title" .=) <$> _pTitle])---- | Photo information for a user.------ /See:/ 'photo' smart constructor.-newtype Photo =- Photo'- { _pURL :: Maybe Text- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Photo' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'pURL'-photo- :: Photo-photo = Photo' {_pURL = Nothing}----- | The URL of the photo.-pURL :: Lens' Photo (Maybe Text)-pURL = lens _pURL (\ s a -> s{_pURL = a})--instance FromJSON Photo where- parseJSON- = withObject "Photo"- (\ o -> Photo' <$> (o .:? "url"))--instance ToJSON Photo where- toJSON Photo'{..}- = object (catMaybes [("url" .=) <$> _pURL])---- | Represents the changes associated with an action taken by a user.------ /See:/ 'event' smart constructor.-data Event =- Event'- { _ePrimaryEventType :: !(Maybe EventPrimaryEventType)- , _eUser :: !(Maybe User)- , _eEventTimeMillis :: !(Maybe (Textual Word64))- , _eRename :: !(Maybe Rename)- , _eFromUserDeletion :: !(Maybe Bool)- , _eAdditionalEventTypes :: !(Maybe [EventAdditionalEventTypesItem])- , _ePermissionChanges :: !(Maybe [PermissionChange])- , _eTarget :: !(Maybe Target)- , _eMove :: !(Maybe Move)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Event' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'ePrimaryEventType'------ * 'eUser'------ * 'eEventTimeMillis'------ * 'eRename'------ * 'eFromUserDeletion'------ * 'eAdditionalEventTypes'------ * 'ePermissionChanges'------ * 'eTarget'------ * 'eMove'-event- :: Event-event =- Event'- { _ePrimaryEventType = Nothing- , _eUser = Nothing- , _eEventTimeMillis = Nothing- , _eRename = Nothing- , _eFromUserDeletion = Nothing- , _eAdditionalEventTypes = Nothing- , _ePermissionChanges = Nothing- , _eTarget = Nothing- , _eMove = Nothing- }----- | The main type of event that occurred.-ePrimaryEventType :: Lens' Event (Maybe EventPrimaryEventType)-ePrimaryEventType- = lens _ePrimaryEventType- (\ s a -> s{_ePrimaryEventType = a})---- | Represents the user responsible for the event.-eUser :: Lens' Event (Maybe User)-eUser = lens _eUser (\ s a -> s{_eUser = a})---- | The time at which the event occurred formatted as Unix time in--- milliseconds.-eEventTimeMillis :: Lens' Event (Maybe Word64)-eEventTimeMillis- = lens _eEventTimeMillis- (\ s a -> s{_eEventTimeMillis = a})- . mapping _Coerce---- | Extra information for rename type events, such as the old and new names.-eRename :: Lens' Event (Maybe Rename)-eRename = lens _eRename (\ s a -> s{_eRename = a})---- | Whether this event is caused by a user being deleted.-eFromUserDeletion :: Lens' Event (Maybe Bool)-eFromUserDeletion- = lens _eFromUserDeletion- (\ s a -> s{_eFromUserDeletion = a})---- | Additional event types. Some events may have multiple types when--- multiple actions are part of a single event. For example, creating a--- document, renaming it, and sharing it may be part of a single--- file-creation event.-eAdditionalEventTypes :: Lens' Event [EventAdditionalEventTypesItem]-eAdditionalEventTypes- = lens _eAdditionalEventTypes- (\ s a -> s{_eAdditionalEventTypes = a})- . _Default- . _Coerce---- | Extra information for permissionChange type events, such as the user or--- group the new permission applies to.-ePermissionChanges :: Lens' Event [PermissionChange]-ePermissionChanges- = lens _ePermissionChanges- (\ s a -> s{_ePermissionChanges = a})- . _Default- . _Coerce---- | Information specific to the Target object modified by the event.-eTarget :: Lens' Event (Maybe Target)-eTarget = lens _eTarget (\ s a -> s{_eTarget = a})---- | Extra information for move type events, such as changes in an object\'s--- parents.-eMove :: Lens' Event (Maybe Move)-eMove = lens _eMove (\ s a -> s{_eMove = a})--instance FromJSON Event where- parseJSON- = withObject "Event"- (\ o ->- Event' <$>- (o .:? "primaryEventType") <*> (o .:? "user") <*>- (o .:? "eventTimeMillis")- <*> (o .:? "rename")- <*> (o .:? "fromUserDeletion")- <*> (o .:? "additionalEventTypes" .!= mempty)- <*> (o .:? "permissionChanges" .!= mempty)- <*> (o .:? "target")- <*> (o .:? "move"))--instance ToJSON Event where- toJSON Event'{..}- = object- (catMaybes- [("primaryEventType" .=) <$> _ePrimaryEventType,- ("user" .=) <$> _eUser,- ("eventTimeMillis" .=) <$> _eEventTimeMillis,- ("rename" .=) <$> _eRename,- ("fromUserDeletion" .=) <$> _eFromUserDeletion,- ("additionalEventTypes" .=) <$>- _eAdditionalEventTypes,- ("permissionChanges" .=) <$> _ePermissionChanges,- ("target" .=) <$> _eTarget, ("move" .=) <$> _eMove])---- | The response from the list request. Contains a list of activities and a--- token to retrieve the next page of results.------ /See:/ 'listActivitiesResponse' smart constructor.-data ListActivitiesResponse =- ListActivitiesResponse'- { _larNextPageToken :: !(Maybe Text)- , _larActivities :: !(Maybe [Activity])- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'ListActivitiesResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'larNextPageToken'------ * 'larActivities'-listActivitiesResponse- :: ListActivitiesResponse-listActivitiesResponse =- ListActivitiesResponse'- {_larNextPageToken = Nothing, _larActivities = Nothing}----- | Token for the next page of results.-larNextPageToken :: Lens' ListActivitiesResponse (Maybe Text)-larNextPageToken- = lens _larNextPageToken- (\ s a -> s{_larNextPageToken = a})---- | List of activities.-larActivities :: Lens' ListActivitiesResponse [Activity]-larActivities- = lens _larActivities- (\ s a -> s{_larActivities = a})- . _Default- . _Coerce--instance FromJSON ListActivitiesResponse where- parseJSON- = withObject "ListActivitiesResponse"- (\ o ->- ListActivitiesResponse' <$>- (o .:? "nextPageToken") <*>- (o .:? "activities" .!= mempty))--instance ToJSON ListActivitiesResponse where- toJSON ListActivitiesResponse'{..}- = object- (catMaybes- [("nextPageToken" .=) <$> _larNextPageToken,- ("activities" .=) <$> _larActivities])---- | Contains information about a Drive object\'s permissions that changed as--- a result of a permissionChange type event.------ /See:/ 'permissionChange' smart constructor.-data PermissionChange =- PermissionChange'- { _pcAddedPermissions :: !(Maybe [Permission])- , _pcRemovedPermissions :: !(Maybe [Permission])- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'PermissionChange' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'pcAddedPermissions'------ * 'pcRemovedPermissions'-permissionChange- :: PermissionChange-permissionChange =- PermissionChange'- {_pcAddedPermissions = Nothing, _pcRemovedPermissions = Nothing}----- | Lists all Permission objects added.-pcAddedPermissions :: Lens' PermissionChange [Permission]-pcAddedPermissions- = lens _pcAddedPermissions- (\ s a -> s{_pcAddedPermissions = a})- . _Default- . _Coerce---- | Lists all Permission objects removed.-pcRemovedPermissions :: Lens' PermissionChange [Permission]-pcRemovedPermissions- = lens _pcRemovedPermissions- (\ s a -> s{_pcRemovedPermissions = a})- . _Default- . _Coerce--instance FromJSON PermissionChange where- parseJSON- = withObject "PermissionChange"- (\ o ->- PermissionChange' <$>- (o .:? "addedPermissions" .!= mempty) <*>- (o .:? "removedPermissions" .!= mempty))--instance ToJSON PermissionChange where- toJSON PermissionChange'{..}- = object- (catMaybes- [("addedPermissions" .=) <$> _pcAddedPermissions,- ("removedPermissions" .=) <$> _pcRemovedPermissions])---- | A representation of a user.------ /See:/ 'user' smart constructor.-data User =- User'- { _uPhoto :: !(Maybe Photo)- , _uIsDeleted :: !(Maybe Bool)- , _uName :: !(Maybe Text)- , _uIsMe :: !(Maybe Bool)- , _uPermissionId :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'User' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'uPhoto'------ * 'uIsDeleted'------ * 'uName'------ * 'uIsMe'------ * 'uPermissionId'-user- :: User-user =- User'- { _uPhoto = Nothing- , _uIsDeleted = Nothing- , _uName = Nothing- , _uIsMe = Nothing- , _uPermissionId = Nothing- }----- | The profile photo of the user. Not present if the user has no profile--- photo.-uPhoto :: Lens' User (Maybe Photo)-uPhoto = lens _uPhoto (\ s a -> s{_uPhoto = a})---- | A boolean which indicates whether the specified User was deleted. If--- true, name, photo and permission_id will be omitted.-uIsDeleted :: Lens' User (Maybe Bool)-uIsDeleted- = lens _uIsDeleted (\ s a -> s{_uIsDeleted = a})---- | The displayable name of the user.-uName :: Lens' User (Maybe Text)-uName = lens _uName (\ s a -> s{_uName = a})---- | Whether the user is the authenticated user.-uIsMe :: Lens' User (Maybe Bool)-uIsMe = lens _uIsMe (\ s a -> s{_uIsMe = a})---- | The permission ID associated with this user. Equivalent to the Drive--- API\'s permission ID for this user, returned as part of the Drive--- Permissions resource.-uPermissionId :: Lens' User (Maybe Text)-uPermissionId- = lens _uPermissionId- (\ s a -> s{_uPermissionId = a})--instance FromJSON User where- parseJSON- = withObject "User"- (\ o ->- User' <$>- (o .:? "photo") <*> (o .:? "isDeleted") <*>- (o .:? "name")- <*> (o .:? "isMe")- <*> (o .:? "permissionId"))--instance ToJSON User where- toJSON User'{..}- = object- (catMaybes- [("photo" .=) <$> _uPhoto,- ("isDeleted" .=) <$> _uIsDeleted,- ("name" .=) <$> _uName, ("isMe" .=) <$> _uIsMe,- ("permissionId" .=) <$> _uPermissionId])---- | An Activity resource is a combined view of multiple events. An activity--- has a list of individual events and a combined view of the common fields--- among all events.------ /See:/ 'activity' smart constructor.-data Activity =- Activity'- { _aSingleEvents :: !(Maybe [Event])- , _aCombinedEvent :: !(Maybe Event)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Activity' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'aSingleEvents'------ * 'aCombinedEvent'-activity- :: Activity-activity = Activity' {_aSingleEvents = Nothing, _aCombinedEvent = Nothing}----- | A list of all the Events that make up the Activity.-aSingleEvents :: Lens' Activity [Event]-aSingleEvents- = lens _aSingleEvents- (\ s a -> s{_aSingleEvents = a})- . _Default- . _Coerce---- | The fields common to all of the singleEvents that make up the Activity.-aCombinedEvent :: Lens' Activity (Maybe Event)-aCombinedEvent- = lens _aCombinedEvent- (\ s a -> s{_aCombinedEvent = a})--instance FromJSON Activity where- parseJSON- = withObject "Activity"- (\ o ->- Activity' <$>- (o .:? "singleEvents" .!= mempty) <*>- (o .:? "combinedEvent"))--instance ToJSON Activity where- toJSON Activity'{..}- = object- (catMaybes- [("singleEvents" .=) <$> _aSingleEvents,- ("combinedEvent" .=) <$> _aCombinedEvent])---- | Contains information about a renametype event.------ /See:/ 'rename' smart constructor.-data Rename =- Rename'- { _rNewTitle :: !(Maybe Text)- , _rOldTitle :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Rename' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'rNewTitle'------ * 'rOldTitle'-rename- :: Rename-rename = Rename' {_rNewTitle = Nothing, _rOldTitle = Nothing}----- | The new title.-rNewTitle :: Lens' Rename (Maybe Text)-rNewTitle- = lens _rNewTitle (\ s a -> s{_rNewTitle = a})---- | The old title.-rOldTitle :: Lens' Rename (Maybe Text)-rOldTitle- = lens _rOldTitle (\ s a -> s{_rOldTitle = a})--instance FromJSON Rename where- parseJSON- = withObject "Rename"- (\ o ->- Rename' <$>- (o .:? "newTitle") <*> (o .:? "oldTitle"))--instance ToJSON Rename where- toJSON Rename'{..}- = object- (catMaybes- [("newTitle" .=) <$> _rNewTitle,- ("oldTitle" .=) <$> _rOldTitle])---- | Contains information about the permissions and type of access allowed--- with regards to a Google Drive object. This is a subset of the fields--- contained in a corresponding Drive Permissions object.------ /See:/ 'permission' smart constructor.-data Permission =- Permission'- { _pWithLink :: !(Maybe Bool)- , _pUser :: !(Maybe User)- , _pRole :: !(Maybe PermissionRole)- , _pName :: !(Maybe Text)- , _pType :: !(Maybe PermissionType)- , _pPermissionId :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Permission' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'pWithLink'------ * 'pUser'------ * 'pRole'------ * 'pName'------ * 'pType'------ * 'pPermissionId'-permission- :: Permission-permission =- Permission'- { _pWithLink = Nothing- , _pUser = Nothing- , _pRole = Nothing- , _pName = Nothing- , _pType = Nothing- , _pPermissionId = Nothing- }----- | Whether the permission requires a link to the file.-pWithLink :: Lens' Permission (Maybe Bool)-pWithLink- = lens _pWithLink (\ s a -> s{_pWithLink = a})---- | The user\'s information if the type is USER.-pUser :: Lens' Permission (Maybe User)-pUser = lens _pUser (\ s a -> s{_pUser = a})---- | Indicates the Google Drive permissions role. The role determines a--- user\'s ability to read, write, or comment on the file.-pRole :: Lens' Permission (Maybe PermissionRole)-pRole = lens _pRole (\ s a -> s{_pRole = a})---- | The name of the user or group the permission applies to.-pName :: Lens' Permission (Maybe Text)-pName = lens _pName (\ s a -> s{_pName = a})---- | Indicates how widely permissions are granted.-pType :: Lens' Permission (Maybe PermissionType)-pType = lens _pType (\ s a -> s{_pType = a})---- | The ID for this permission. Corresponds to the Drive API\'s permission--- ID returned as part of the Drive Permissions resource.-pPermissionId :: Lens' Permission (Maybe Text)-pPermissionId- = lens _pPermissionId- (\ s a -> s{_pPermissionId = a})--instance FromJSON Permission where- parseJSON- = withObject "Permission"- (\ o ->- Permission' <$>- (o .:? "withLink") <*> (o .:? "user") <*>- (o .:? "role")- <*> (o .:? "name")- <*> (o .:? "type")- <*> (o .:? "permissionId"))--instance ToJSON Permission where- toJSON Permission'{..}- = object- (catMaybes- [("withLink" .=) <$> _pWithLink,- ("user" .=) <$> _pUser, ("role" .=) <$> _pRole,- ("name" .=) <$> _pName, ("type" .=) <$> _pType,- ("permissionId" .=) <$> _pPermissionId])---- | Information about the object modified by the event.------ /See:/ 'target' smart constructor.-data Target =- Target'- { _tMimeType :: !(Maybe Text)- , _tName :: !(Maybe Text)- , _tId :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Target' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'tMimeType'------ * 'tName'------ * 'tId'-target- :: Target-target = Target' {_tMimeType = Nothing, _tName = Nothing, _tId = Nothing}----- | The MIME type of the target.-tMimeType :: Lens' Target (Maybe Text)-tMimeType- = lens _tMimeType (\ s a -> s{_tMimeType = a})---- | The name of the target. For example, in Google Drive, this is the title--- of the file.-tName :: Lens' Target (Maybe Text)-tName = lens _tName (\ s a -> s{_tName = a})---- | The ID of the target. For example, in Google Drive, this is the file or--- folder ID.-tId :: Lens' Target (Maybe Text)-tId = lens _tId (\ s a -> s{_tId = a})--instance FromJSON Target where- parseJSON- = withObject "Target"- (\ o ->- Target' <$>- (o .:? "mimeType") <*> (o .:? "name") <*>- (o .:? "id"))--instance ToJSON Target where- toJSON Target'{..}- = object- (catMaybes- [("mimeType" .=) <$> _tMimeType,- ("name" .=) <$> _tName, ("id" .=) <$> _tId])---- | Contains information about changes in an object\'s parents as a result--- of a move type event.------ /See:/ 'move' smart constructor.-data Move =- Move'- { _mAddedParents :: !(Maybe [Parent])- , _mRemovedParents :: !(Maybe [Parent])- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Move' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'mAddedParents'------ * 'mRemovedParents'-move- :: Move-move = Move' {_mAddedParents = Nothing, _mRemovedParents = Nothing}----- | The added parent(s).-mAddedParents :: Lens' Move [Parent]-mAddedParents- = lens _mAddedParents- (\ s a -> s{_mAddedParents = a})- . _Default- . _Coerce---- | The removed parent(s).-mRemovedParents :: Lens' Move [Parent]-mRemovedParents- = lens _mRemovedParents- (\ s a -> s{_mRemovedParents = a})- . _Default- . _Coerce--instance FromJSON Move where- parseJSON- = withObject "Move"- (\ o ->- Move' <$>- (o .:? "addedParents" .!= mempty) <*>- (o .:? "removedParents" .!= mempty))--instance ToJSON Move where- toJSON Move'{..}- = object- (catMaybes- [("addedParents" .=) <$> _mAddedParents,- ("removedParents" .=) <$> _mRemovedParents])
− gen/Network/Google/AppsActivity/Types/Sum.hs
@@ -1,247 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module : Network.Google.AppsActivity.Types.Sum--- 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)----module Network.Google.AppsActivity.Types.Sum where--import Network.Google.Prelude hiding (Bytes)---- | The main type of event that occurred.-data EventPrimaryEventType- = EPETComment- -- ^ @comment@- | EPETCreate- -- ^ @create@- | EPETEdit- -- ^ @edit@- | EPETEmptyTrash- -- ^ @emptyTrash@- | EPETMove- -- ^ @move@- | EPETPermissionChange- -- ^ @permissionChange@- | EPETRename- -- ^ @rename@- | EPETTrash- -- ^ @trash@- | EPETUnknown- -- ^ @unknown@- | EPETUntrash- -- ^ @untrash@- | EPETUpload- -- ^ @upload@- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable EventPrimaryEventType--instance FromHttpApiData EventPrimaryEventType where- parseQueryParam = \case- "comment" -> Right EPETComment- "create" -> Right EPETCreate- "edit" -> Right EPETEdit- "emptyTrash" -> Right EPETEmptyTrash- "move" -> Right EPETMove- "permissionChange" -> Right EPETPermissionChange- "rename" -> Right EPETRename- "trash" -> Right EPETTrash- "unknown" -> Right EPETUnknown- "untrash" -> Right EPETUntrash- "upload" -> Right EPETUpload- x -> Left ("Unable to parse EventPrimaryEventType from: " <> x)--instance ToHttpApiData EventPrimaryEventType where- toQueryParam = \case- EPETComment -> "comment"- EPETCreate -> "create"- EPETEdit -> "edit"- EPETEmptyTrash -> "emptyTrash"- EPETMove -> "move"- EPETPermissionChange -> "permissionChange"- EPETRename -> "rename"- EPETTrash -> "trash"- EPETUnknown -> "unknown"- EPETUntrash -> "untrash"- EPETUpload -> "upload"--instance FromJSON EventPrimaryEventType where- parseJSON = parseJSONText "EventPrimaryEventType"--instance ToJSON EventPrimaryEventType where- toJSON = toJSONText---- | Indicates the Google Drive permissions role. The role determines a--- user\'s ability to read, write, or comment on the file.-data PermissionRole- = Commenter- -- ^ @commenter@- | Owner- -- ^ @owner@- | PublishedReader- -- ^ @publishedReader@- | Reader- -- ^ @reader@- | Writer- -- ^ @writer@- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable PermissionRole--instance FromHttpApiData PermissionRole where- parseQueryParam = \case- "commenter" -> Right Commenter- "owner" -> Right Owner- "publishedReader" -> Right PublishedReader- "reader" -> Right Reader- "writer" -> Right Writer- x -> Left ("Unable to parse PermissionRole from: " <> x)--instance ToHttpApiData PermissionRole where- toQueryParam = \case- Commenter -> "commenter"- Owner -> "owner"- PublishedReader -> "publishedReader"- Reader -> "reader"- Writer -> "writer"--instance FromJSON PermissionRole where- parseJSON = parseJSONText "PermissionRole"--instance ToJSON PermissionRole where- toJSON = toJSONText---- | Indicates how widely permissions are granted.-data PermissionType- = PTAnyone- -- ^ @anyone@- | PTDomain- -- ^ @domain@- | PTGroup- -- ^ @group@- | PTUser- -- ^ @user@- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable PermissionType--instance FromHttpApiData PermissionType where- parseQueryParam = \case- "anyone" -> Right PTAnyone- "domain" -> Right PTDomain- "group" -> Right PTGroup- "user" -> Right PTUser- x -> Left ("Unable to parse PermissionType from: " <> x)--instance ToHttpApiData PermissionType where- toQueryParam = \case- PTAnyone -> "anyone"- PTDomain -> "domain"- PTGroup -> "group"- PTUser -> "user"--instance FromJSON PermissionType where- parseJSON = parseJSONText "PermissionType"--instance ToJSON PermissionType where- toJSON = toJSONText--data EventAdditionalEventTypesItem- = EAETIComment- -- ^ @comment@- | EAETICreate- -- ^ @create@- | EAETIEdit- -- ^ @edit@- | EAETIEmptyTrash- -- ^ @emptyTrash@- | EAETIMove- -- ^ @move@- | EAETIPermissionChange- -- ^ @permissionChange@- | EAETIRename- -- ^ @rename@- | EAETITrash- -- ^ @trash@- | EAETIUnknown- -- ^ @unknown@- | EAETIUntrash- -- ^ @untrash@- | EAETIUpload- -- ^ @upload@- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable EventAdditionalEventTypesItem--instance FromHttpApiData EventAdditionalEventTypesItem where- parseQueryParam = \case- "comment" -> Right EAETIComment- "create" -> Right EAETICreate- "edit" -> Right EAETIEdit- "emptyTrash" -> Right EAETIEmptyTrash- "move" -> Right EAETIMove- "permissionChange" -> Right EAETIPermissionChange- "rename" -> Right EAETIRename- "trash" -> Right EAETITrash- "unknown" -> Right EAETIUnknown- "untrash" -> Right EAETIUntrash- "upload" -> Right EAETIUpload- x -> Left ("Unable to parse EventAdditionalEventTypesItem from: " <> x)--instance ToHttpApiData EventAdditionalEventTypesItem where- toQueryParam = \case- EAETIComment -> "comment"- EAETICreate -> "create"- EAETIEdit -> "edit"- EAETIEmptyTrash -> "emptyTrash"- EAETIMove -> "move"- EAETIPermissionChange -> "permissionChange"- EAETIRename -> "rename"- EAETITrash -> "trash"- EAETIUnknown -> "unknown"- EAETIUntrash -> "untrash"- EAETIUpload -> "upload"--instance FromJSON EventAdditionalEventTypesItem where- parseJSON = parseJSONText "EventAdditionalEventTypesItem"--instance ToJSON EventAdditionalEventTypesItem where- toJSON = toJSONText---- | Indicates the strategy to use when grouping singleEvents items in the--- associated combinedEvent object.-data ActivitiesListGroupingStrategy- = DriveUi- -- ^ @driveUi@- | None- -- ^ @none@- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable ActivitiesListGroupingStrategy--instance FromHttpApiData ActivitiesListGroupingStrategy where- parseQueryParam = \case- "driveUi" -> Right DriveUi- "none" -> Right None- x -> Left ("Unable to parse ActivitiesListGroupingStrategy from: " <> x)--instance ToHttpApiData ActivitiesListGroupingStrategy where- toQueryParam = \case- DriveUi -> "driveUi"- None -> "none"--instance FromJSON ActivitiesListGroupingStrategy where- parseJSON = parseJSONText "ActivitiesListGroupingStrategy"--instance ToJSON ActivitiesListGroupingStrategy where- toJSON = toJSONText
− gen/Network/Google/Resource/AppsActivity/Activities/List.hs
@@ -1,181 +0,0 @@-{-# 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.AppsActivity.Activities.List--- 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)------ Returns a list of activities visible to the current logged in user.--- Visible activities are determined by the visibility settings of the--- object that was acted on, e.g. Drive files a user can see. An activity--- is a record of past events. Multiple events may be merged if they are--- similar. A request is scoped to activities from a given Google service--- using the source parameter.------ /See:/ <https://developers.google.com/google-apps/activity/ Drive Activity API Reference> for @appsactivity.activities.list@.-module Network.Google.Resource.AppsActivity.Activities.List- (- -- * REST Resource- ActivitiesListResource-- -- * Creating a Request- , activitiesList- , ActivitiesList-- -- * Request Lenses- , alDriveFileId- , alDriveAncestorId- , alGroupingStrategy- , alUserId- , alSource- , alPageToken- , alPageSize- ) where--import Network.Google.AppsActivity.Types-import Network.Google.Prelude---- | A resource alias for @appsactivity.activities.list@ method which the--- 'ActivitiesList' request conforms to.-type ActivitiesListResource =- "appsactivity" :>- "v1" :>- "activities" :>- QueryParam "drive.fileId" Text :>- QueryParam "drive.ancestorId" Text :>- QueryParam "groupingStrategy"- ActivitiesListGroupingStrategy- :>- QueryParam "userId" Text :>- QueryParam "source" Text :>- QueryParam "pageToken" Text :>- QueryParam "pageSize" (Textual Int32) :>- QueryParam "alt" AltJSON :>- Get '[JSON] ListActivitiesResponse---- | Returns a list of activities visible to the current logged in user.--- Visible activities are determined by the visibility settings of the--- object that was acted on, e.g. Drive files a user can see. An activity--- is a record of past events. Multiple events may be merged if they are--- similar. A request is scoped to activities from a given Google service--- using the source parameter.------ /See:/ 'activitiesList' smart constructor.-data ActivitiesList =- ActivitiesList'- { _alDriveFileId :: !(Maybe Text)- , _alDriveAncestorId :: !(Maybe Text)- , _alGroupingStrategy :: !ActivitiesListGroupingStrategy- , _alUserId :: !Text- , _alSource :: !(Maybe Text)- , _alPageToken :: !(Maybe Text)- , _alPageSize :: !(Textual Int32)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'ActivitiesList' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'alDriveFileId'------ * 'alDriveAncestorId'------ * 'alGroupingStrategy'------ * 'alUserId'------ * 'alSource'------ * 'alPageToken'------ * 'alPageSize'-activitiesList- :: ActivitiesList-activitiesList =- ActivitiesList'- { _alDriveFileId = Nothing- , _alDriveAncestorId = Nothing- , _alGroupingStrategy = DriveUi- , _alUserId = "me"- , _alSource = Nothing- , _alPageToken = Nothing- , _alPageSize = 50- }----- | Identifies the Drive item to return activities for.-alDriveFileId :: Lens' ActivitiesList (Maybe Text)-alDriveFileId- = lens _alDriveFileId- (\ s a -> s{_alDriveFileId = a})---- | Identifies the Drive folder containing the items for which to return--- activities.-alDriveAncestorId :: Lens' ActivitiesList (Maybe Text)-alDriveAncestorId- = lens _alDriveAncestorId- (\ s a -> s{_alDriveAncestorId = a})---- | Indicates the strategy to use when grouping singleEvents items in the--- associated combinedEvent object.-alGroupingStrategy :: Lens' ActivitiesList ActivitiesListGroupingStrategy-alGroupingStrategy- = lens _alGroupingStrategy- (\ s a -> s{_alGroupingStrategy = a})---- | The ID used for ACL checks (does not filter the resulting event list by--- the assigned value). Use the special value me to indicate the currently--- authenticated user.-alUserId :: Lens' ActivitiesList Text-alUserId = lens _alUserId (\ s a -> s{_alUserId = a})---- | The Google service from which to return activities. Possible values of--- source are: - drive.google.com-alSource :: Lens' ActivitiesList (Maybe Text)-alSource = lens _alSource (\ s a -> s{_alSource = a})---- | A token to retrieve a specific page of results.-alPageToken :: Lens' ActivitiesList (Maybe Text)-alPageToken- = lens _alPageToken (\ s a -> s{_alPageToken = a})---- | The maximum number of events to return on a page. The response includes--- a continuation token if there are more events.-alPageSize :: Lens' ActivitiesList Int32-alPageSize- = lens _alPageSize (\ s a -> s{_alPageSize = a}) .- _Coerce--instance GoogleRequest ActivitiesList where- type Rs ActivitiesList = ListActivitiesResponse- type Scopes ActivitiesList =- '["https://www.googleapis.com/auth/activity"]- requestClient ActivitiesList'{..}- = go _alDriveFileId _alDriveAncestorId- (Just _alGroupingStrategy)- (Just _alUserId)- _alSource- _alPageToken- (Just _alPageSize)- (Just AltJSON)- appsActivityService- where go- = buildClient (Proxy :: Proxy ActivitiesListResource)- mempty
gogol-apps-activity.cabal view
@@ -1,46 +1,61 @@-name: gogol-apps-activity-version: 0.5.0-synopsis: Google Drive Activity SDK.-homepage: https://github.com/brendanhay/gogol-bug-reports: https://github.com/brendanhay/gogol/issues-license: OtherLicense-license-file: LICENSE-author: Brendan Hay-maintainer: Brendan Hay <brendan.g.hay@gmail.com>-copyright: Copyright (c) 2015-2016 Brendan Hay-category: Network, Google, Cloud-build-type: Simple-cabal-version: >= 1.10-extra-source-files: README.md src/.gitkeep+cabal-version: 2.2+name: gogol-apps-activity+version: 1.0.0+synopsis: Google Drive Activity SDK.+homepage: https://github.com/brendanhay/gogol+bug-reports: https://github.com/brendanhay/gogol/issues+license: MPL-2.0+license-file: LICENSE+author: Brendan Hay+maintainer:+ Brendan Hay <brendan.g.hay+gogol@gmail.com>, Toni Cebrián <toni@tonicebrian.com> +copyright: Copyright (c) 2015-2025 Brendan Hay+category: Google+build-type: Simple+extra-source-files:+ README.md+ src/.gitkeep+ description:- Provides a historical view of activity.- .- /Warning:/ 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 @v1@- of the API.+ Provides a historical view of activity.+ .+ /Warning:/ 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 @v1@+ of the API. source-repository head- type: git- location: git://github.com/brendanhay/gogol.git+ type: git+ location: git://github.com/brendanhay/gogol.git+ subdir: gogol-apps-activity +flag field-selectors+ description:+ If record field selectors should be enabled. Disabling this requires GHC >=9.2 and the NoFieldSelectors extension.++ default: False+ manual: True+ library- default-language: Haskell2010- hs-source-dirs: src gen+ default-language: GHC2021+ hs-source-dirs: src gen+ ghc-options:+ -Wall -fwarn-incomplete-uni-patterns+ -fwarn-incomplete-record-updates -funbox-strict-fields+ -fwarn-unused-packages - ghc-options: -Wall+ if (!flag(field-selectors) && impl(ghc >=9.2))+ default-extensions: NoFieldSelectors - exposed-modules:- Network.Google.AppsActivity- , Network.Google.AppsActivity.Types- , Network.Google.Resource.AppsActivity.Activities.List+ exposed-modules:+ Gogol.AppsActivity+ Gogol.AppsActivity.Activities.List+ Gogol.AppsActivity.Types - other-modules:- Network.Google.AppsActivity.Types.Product- , Network.Google.AppsActivity.Types.Sum+ other-modules:+ Gogol.AppsActivity.Internal.Product+ Gogol.AppsActivity.Internal.Sum - build-depends:- gogol-core == 0.5.0.*- , base >= 4.7 && < 5+ build-depends: gogol-core ^>=1.0.0