gogol-driveactivity 0.5.0 → 1.0.0
raw patch · 13 files changed
+4265/−4400 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/DriveActivity.hs +359/−0
- gen/Gogol/DriveActivity/Activity/Query.hs +110/−0
- gen/Gogol/DriveActivity/Internal/Product.hs +2600/−0
- gen/Gogol/DriveActivity/Internal/Sum.hs +778/−0
- gen/Gogol/DriveActivity/Types.hs +364/−0
- gen/Network/Google/DriveActivity.hs +0/−427
- gen/Network/Google/DriveActivity/Types.hs +0/−422
- gen/Network/Google/DriveActivity/Types/Product.hs +0/−2749
- gen/Network/Google/DriveActivity/Types/Sum.hs +0/−614
- gen/Network/Google/Resource/DriveActivity/Activity/Query.hs +0/−150
- gogol-driveactivity.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/DriveActivity.hs view
@@ -0,0 +1,359 @@+{-# 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.DriveActivity+-- 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 in Google Drive.+--+-- /See:/ <https://developers.google.com/drive/activity/ Drive Activity API Reference>+module Gogol.DriveActivity+ ( -- * Configuration+ driveActivityService,++ -- * OAuth Scopes+ Drive'Activity,+ Drive'Activity'Readonly,++ -- * Resources++ -- ** driveactivity.activity.query+ DriveActivityActivityQueryResource,+ DriveActivityActivityQuery (..),+ newDriveActivityActivityQuery,++ -- * Types++ -- ** Xgafv+ Xgafv (..),++ -- ** Action+ Action (..),+ newAction,++ -- ** ActionDetail+ ActionDetail (..),+ newActionDetail,++ -- ** Actor+ Actor (..),+ newActor,++ -- ** Administrator+ Administrator (..),+ newAdministrator,++ -- ** AnonymousUser+ AnonymousUser (..),+ newAnonymousUser,++ -- ** Anyone+ Anyone (..),+ newAnyone,++ -- ** ApplicationReference+ ApplicationReference (..),+ newApplicationReference,++ -- ** ApplicationReference_Type+ ApplicationReference_Type (..),++ -- ** AppliedLabelChange+ AppliedLabelChange (..),+ newAppliedLabelChange,++ -- ** AppliedLabelChangeDetail+ AppliedLabelChangeDetail (..),+ newAppliedLabelChangeDetail,++ -- ** AppliedLabelChangeDetail_TypesItem+ AppliedLabelChangeDetail_TypesItem (..),++ -- ** Assignment+ Assignment (..),+ newAssignment,++ -- ** Assignment_Subtype+ Assignment_Subtype (..),++ -- ** Comment+ Comment (..),+ newComment,++ -- ** ConsolidationStrategy+ ConsolidationStrategy (..),+ newConsolidationStrategy,++ -- ** Copy+ Copy (..),+ newCopy,++ -- ** Create+ Create (..),+ newCreate,++ -- ** DataLeakPreventionChange+ DataLeakPreventionChange (..),+ newDataLeakPreventionChange,++ -- ** DataLeakPreventionChange_Type+ DataLeakPreventionChange_Type (..),++ -- ** Date+ Date (..),+ newDate,++ -- ** Delete'+ Delete' (..),+ newDelete,++ -- ** Delete_Type+ Delete_Type (..),++ -- ** DeletedUser+ DeletedUser (..),+ newDeletedUser,++ -- ** Domain+ Domain (..),+ newDomain,++ -- ** Drive+ Drive (..),+ newDrive,++ -- ** DriveActivity+ DriveActivity (..),+ newDriveActivity,++ -- ** DriveFile+ DriveFile (..),+ newDriveFile,++ -- ** DriveFolder+ DriveFolder (..),+ newDriveFolder,++ -- ** DriveFolder_Type+ DriveFolder_Type (..),++ -- ** DriveItem+ DriveItem (..),+ newDriveItem,++ -- ** DriveItemReference+ DriveItemReference (..),+ newDriveItemReference,++ -- ** DriveReference+ DriveReference (..),+ newDriveReference,++ -- ** Edit+ Edit (..),+ newEdit,++ -- ** FieldValue+ FieldValue (..),+ newFieldValue,++ -- ** FieldValueChange+ FieldValueChange (..),+ newFieldValueChange,++ -- ** File+ File (..),+ newFile,++ -- ** FileComment+ FileComment (..),+ newFileComment,++ -- ** Folder+ Folder (..),+ newFolder,++ -- ** Folder_Type+ Folder_Type (..),++ -- ** Group+ Group (..),+ newGroup,++ -- ** Impersonation+ Impersonation (..),+ newImpersonation,++ -- ** Integer+ Integer (..),+ newInteger,++ -- ** KnownUser+ KnownUser (..),+ newKnownUser,++ -- ** Legacy+ Legacy (..),+ newLegacy,++ -- ** Move+ Move (..),+ newMove,++ -- ** New+ New (..),+ newNew,++ -- ** NoConsolidation+ NoConsolidation (..),+ newNoConsolidation,++ -- ** Owner+ Owner (..),+ newOwner,++ -- ** Permission+ Permission (..),+ newPermission,++ -- ** Permission_Role+ Permission_Role (..),++ -- ** PermissionChange+ PermissionChange (..),+ newPermissionChange,++ -- ** Post'+ Post' (..),+ newPost,++ -- ** Post_Subtype+ Post_Subtype (..),++ -- ** QueryDriveActivityRequest+ QueryDriveActivityRequest (..),+ newQueryDriveActivityRequest,++ -- ** QueryDriveActivityResponse+ QueryDriveActivityResponse (..),+ newQueryDriveActivityResponse,++ -- ** Rename+ Rename (..),+ newRename,++ -- ** Restore+ Restore (..),+ newRestore,++ -- ** Restore_Type+ Restore_Type (..),++ -- ** RestrictionChange+ RestrictionChange (..),+ newRestrictionChange,++ -- ** RestrictionChange_Feature+ RestrictionChange_Feature (..),++ -- ** RestrictionChange_NewRestriction+ RestrictionChange_NewRestriction (..),++ -- ** Selection+ Selection (..),+ newSelection,++ -- ** SelectionList+ SelectionList (..),+ newSelectionList,++ -- ** SettingsChange+ SettingsChange (..),+ newSettingsChange,++ -- ** SingleUser+ SingleUser (..),+ newSingleUser,++ -- ** Suggestion+ Suggestion (..),+ newSuggestion,++ -- ** Suggestion_Subtype+ Suggestion_Subtype (..),++ -- ** SystemEvent+ SystemEvent (..),+ newSystemEvent,++ -- ** SystemEvent_Type+ SystemEvent_Type (..),++ -- ** Target+ Target (..),+ newTarget,++ -- ** TargetReference+ TargetReference (..),+ newTargetReference,++ -- ** TeamDrive+ TeamDrive (..),+ newTeamDrive,++ -- ** TeamDriveReference+ TeamDriveReference (..),+ newTeamDriveReference,++ -- ** Text+ Text (..),+ newText,++ -- ** TextList+ TextList (..),+ newTextList,++ -- ** TimeRange+ TimeRange (..),+ newTimeRange,++ -- ** UnknownUser+ UnknownUser (..),+ newUnknownUser,++ -- ** Upload+ Upload (..),+ newUpload,++ -- ** User+ User (..),+ newUser,++ -- ** UserList+ UserList (..),+ newUserList,+ )+where++import Gogol.DriveActivity.Activity.Query+import Gogol.DriveActivity.Types
+ gen/Gogol/DriveActivity/Activity/Query.hs view
@@ -0,0 +1,110 @@+{-# 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.DriveActivity.Activity.Query+-- 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)+--+-- Query past activity in Google Drive.+--+-- /See:/ <https://developers.google.com/drive/activity/ Drive Activity API Reference> for @driveactivity.activity.query@.+module Gogol.DriveActivity.Activity.Query+ ( -- * Resource+ DriveActivityActivityQueryResource,++ -- ** Constructing a Request+ DriveActivityActivityQuery (..),+ newDriveActivityActivityQuery,+ )+where++import Gogol.DriveActivity.Types+import Gogol.Prelude qualified as Core++-- | A resource alias for @driveactivity.activity.query@ method which the+-- 'DriveActivityActivityQuery' request conforms to.+type DriveActivityActivityQueryResource =+ "v2"+ Core.:> "activity:query"+ Core.:> Core.QueryParam "$.xgafv" Xgafv+ Core.:> Core.QueryParam "access_token" Core.Text+ Core.:> Core.QueryParam "callback" Core.Text+ Core.:> Core.QueryParam "uploadType" Core.Text+ Core.:> Core.QueryParam "upload_protocol" Core.Text+ Core.:> Core.QueryParam "alt" Core.AltJSON+ Core.:> Core.ReqBody '[Core.JSON] QueryDriveActivityRequest+ Core.:> Core.Post '[Core.JSON] QueryDriveActivityResponse++-- | Query past activity in Google Drive.+--+-- /See:/ 'newDriveActivityActivityQuery' smart constructor.+data DriveActivityActivityQuery = DriveActivityActivityQuery+ { -- | V1 error format.+ xgafv :: (Core.Maybe Xgafv),+ -- | OAuth access token.+ accessToken :: (Core.Maybe Core.Text),+ -- | JSONP+ callback :: (Core.Maybe Core.Text),+ -- | Multipart request metadata.+ payload :: QueryDriveActivityRequest,+ -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+ uploadType :: (Core.Maybe Core.Text),+ -- | Upload protocol for media (e.g. \"raw\", \"multipart\").+ uploadProtocol :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'DriveActivityActivityQuery' with the minimum fields required to make a request.+newDriveActivityActivityQuery ::+ -- | Multipart request metadata. See 'payload'.+ QueryDriveActivityRequest ->+ DriveActivityActivityQuery+newDriveActivityActivityQuery payload =+ DriveActivityActivityQuery+ { xgafv = Core.Nothing,+ accessToken = Core.Nothing,+ callback = Core.Nothing,+ payload = payload,+ uploadType = Core.Nothing,+ uploadProtocol = Core.Nothing+ }++instance Core.GoogleRequest DriveActivityActivityQuery where+ type Rs DriveActivityActivityQuery = QueryDriveActivityResponse+ type+ Scopes DriveActivityActivityQuery =+ '[Drive'Activity, Drive'Activity'Readonly]+ requestClient DriveActivityActivityQuery {..} =+ go+ xgafv+ accessToken+ callback+ uploadType+ uploadProtocol+ (Core.Just Core.AltJSON)+ payload+ driveActivityService+ where+ go =+ Core.buildClient+ (Core.Proxy :: Core.Proxy DriveActivityActivityQueryResource)+ Core.mempty
+ gen/Gogol/DriveActivity/Internal/Product.hs view
@@ -0,0 +1,2600 @@+{-# 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.DriveActivity.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.DriveActivity.Internal.Product+ ( -- * Action+ Action (..),+ newAction,++ -- * ActionDetail+ ActionDetail (..),+ newActionDetail,++ -- * Actor+ Actor (..),+ newActor,++ -- * Administrator+ Administrator (..),+ newAdministrator,++ -- * AnonymousUser+ AnonymousUser (..),+ newAnonymousUser,++ -- * Anyone+ Anyone (..),+ newAnyone,++ -- * ApplicationReference+ ApplicationReference (..),+ newApplicationReference,++ -- * AppliedLabelChange+ AppliedLabelChange (..),+ newAppliedLabelChange,++ -- * AppliedLabelChangeDetail+ AppliedLabelChangeDetail (..),+ newAppliedLabelChangeDetail,++ -- * Assignment+ Assignment (..),+ newAssignment,++ -- * Comment+ Comment (..),+ newComment,++ -- * ConsolidationStrategy+ ConsolidationStrategy (..),+ newConsolidationStrategy,++ -- * Copy+ Copy (..),+ newCopy,++ -- * Create+ Create (..),+ newCreate,++ -- * DataLeakPreventionChange+ DataLeakPreventionChange (..),+ newDataLeakPreventionChange,++ -- * Date+ Date (..),+ newDate,++ -- * Delete'+ Delete' (..),+ newDelete,++ -- * DeletedUser+ DeletedUser (..),+ newDeletedUser,++ -- * Domain+ Domain (..),+ newDomain,++ -- * Drive+ Drive (..),+ newDrive,++ -- * DriveActivity+ DriveActivity (..),+ newDriveActivity,++ -- * DriveFile+ DriveFile (..),+ newDriveFile,++ -- * DriveFolder+ DriveFolder (..),+ newDriveFolder,++ -- * DriveItem+ DriveItem (..),+ newDriveItem,++ -- * DriveItemReference+ DriveItemReference (..),+ newDriveItemReference,++ -- * DriveReference+ DriveReference (..),+ newDriveReference,++ -- * Edit+ Edit (..),+ newEdit,++ -- * FieldValue+ FieldValue (..),+ newFieldValue,++ -- * FieldValueChange+ FieldValueChange (..),+ newFieldValueChange,++ -- * File+ File (..),+ newFile,++ -- * FileComment+ FileComment (..),+ newFileComment,++ -- * Folder+ Folder (..),+ newFolder,++ -- * Group+ Group (..),+ newGroup,++ -- * Impersonation+ Impersonation (..),+ newImpersonation,++ -- * Integer+ Integer (..),+ newInteger,++ -- * KnownUser+ KnownUser (..),+ newKnownUser,++ -- * Legacy+ Legacy (..),+ newLegacy,++ -- * Move+ Move (..),+ newMove,++ -- * New+ New (..),+ newNew,++ -- * NoConsolidation+ NoConsolidation (..),+ newNoConsolidation,++ -- * Owner+ Owner (..),+ newOwner,++ -- * Permission+ Permission (..),+ newPermission,++ -- * PermissionChange+ PermissionChange (..),+ newPermissionChange,++ -- * Post'+ Post' (..),+ newPost,++ -- * QueryDriveActivityRequest+ QueryDriveActivityRequest (..),+ newQueryDriveActivityRequest,++ -- * QueryDriveActivityResponse+ QueryDriveActivityResponse (..),+ newQueryDriveActivityResponse,++ -- * Rename+ Rename (..),+ newRename,++ -- * Restore+ Restore (..),+ newRestore,++ -- * RestrictionChange+ RestrictionChange (..),+ newRestrictionChange,++ -- * Selection+ Selection (..),+ newSelection,++ -- * SelectionList+ SelectionList (..),+ newSelectionList,++ -- * SettingsChange+ SettingsChange (..),+ newSettingsChange,++ -- * SingleUser+ SingleUser (..),+ newSingleUser,++ -- * Suggestion+ Suggestion (..),+ newSuggestion,++ -- * SystemEvent+ SystemEvent (..),+ newSystemEvent,++ -- * Target+ Target (..),+ newTarget,++ -- * TargetReference+ TargetReference (..),+ newTargetReference,++ -- * TeamDrive+ TeamDrive (..),+ newTeamDrive,++ -- * TeamDriveReference+ TeamDriveReference (..),+ newTeamDriveReference,++ -- * Text+ Text (..),+ newText,++ -- * TextList+ TextList (..),+ newTextList,++ -- * TimeRange+ TimeRange (..),+ newTimeRange,++ -- * UnknownUser+ UnknownUser (..),+ newUnknownUser,++ -- * Upload+ Upload (..),+ newUpload,++ -- * User+ User (..),+ newUser,++ -- * UserList+ UserList (..),+ newUserList,+ )+where++import Gogol.DriveActivity.Internal.Sum+import Gogol.Prelude qualified as Core++-- | Information about the action.+--+-- /See:/ 'newAction' smart constructor.+data Action = Action+ { -- | The actor responsible for this action (or empty if all actors are responsible).+ actor :: (Core.Maybe Actor),+ -- | The type and detailed information about the action.+ detail :: (Core.Maybe ActionDetail),+ -- | The target this action affects (or empty if affecting all targets). This represents the state of the target immediately after this action occurred.+ target :: (Core.Maybe Target),+ -- | The action occurred over this time range.+ timeRange :: (Core.Maybe TimeRange),+ -- | The action occurred at this specific time.+ timestamp :: (Core.Maybe Core.DateTime)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Action' with the minimum fields required to make a request.+newAction ::+ Action+newAction =+ Action+ { actor = Core.Nothing,+ detail = Core.Nothing,+ target = Core.Nothing,+ timeRange = Core.Nothing,+ timestamp = Core.Nothing+ }++instance Core.FromJSON Action where+ parseJSON =+ Core.withObject+ "Action"+ ( \o ->+ Action+ Core.<$> (o Core..:? "actor")+ Core.<*> (o Core..:? "detail")+ Core.<*> (o Core..:? "target")+ Core.<*> (o Core..:? "timeRange")+ Core.<*> (o Core..:? "timestamp")+ )++instance Core.ToJSON Action where+ toJSON Action {..} =+ Core.object+ ( Core.catMaybes+ [ ("actor" Core..=) Core.<$> actor,+ ("detail" Core..=) Core.<$> detail,+ ("target" Core..=) Core.<$> target,+ ("timeRange" Core..=) Core.<$> timeRange,+ ("timestamp" Core..=) Core.<$> timestamp+ ]+ )++-- | Data describing the type and additional information of an action.+--+-- /See:/ 'newActionDetail' smart constructor.+data ActionDetail = ActionDetail+ { -- | Label was changed.+ appliedLabelChange :: (Core.Maybe AppliedLabelChange),+ -- | A change about comments was made.+ comment :: (Core.Maybe Comment),+ -- | An object was created.+ create :: (Core.Maybe Create),+ -- | An object was deleted.+ delete :: (Core.Maybe Delete'),+ -- | A change happened in data leak prevention status.+ dlpChange :: (Core.Maybe DataLeakPreventionChange),+ -- | An object was edited.+ edit :: (Core.Maybe Edit),+ -- | An object was moved.+ move :: (Core.Maybe Move),+ -- | The permission on an object was changed.+ permissionChange :: (Core.Maybe PermissionChange),+ -- | An object was referenced in an application outside of Drive\/Docs.+ reference :: (Core.Maybe ApplicationReference),+ -- | An object was renamed.+ rename :: (Core.Maybe Rename),+ -- | A deleted object was restored.+ restore :: (Core.Maybe Restore),+ -- | Settings were changed.+ settingsChange :: (Core.Maybe SettingsChange)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'ActionDetail' with the minimum fields required to make a request.+newActionDetail ::+ ActionDetail+newActionDetail =+ ActionDetail+ { appliedLabelChange = Core.Nothing,+ comment = Core.Nothing,+ create = Core.Nothing,+ delete = Core.Nothing,+ dlpChange = Core.Nothing,+ edit = Core.Nothing,+ move = Core.Nothing,+ permissionChange = Core.Nothing,+ reference = Core.Nothing,+ rename = Core.Nothing,+ restore = Core.Nothing,+ settingsChange = Core.Nothing+ }++instance Core.FromJSON ActionDetail where+ parseJSON =+ Core.withObject+ "ActionDetail"+ ( \o ->+ ActionDetail+ Core.<$> (o Core..:? "appliedLabelChange")+ Core.<*> (o Core..:? "comment")+ Core.<*> (o Core..:? "create")+ Core.<*> (o Core..:? "delete")+ Core.<*> (o Core..:? "dlpChange")+ Core.<*> (o Core..:? "edit")+ Core.<*> (o Core..:? "move")+ Core.<*> (o Core..:? "permissionChange")+ Core.<*> (o Core..:? "reference")+ Core.<*> (o Core..:? "rename")+ Core.<*> (o Core..:? "restore")+ Core.<*> (o Core..:? "settingsChange")+ )++instance Core.ToJSON ActionDetail where+ toJSON ActionDetail {..} =+ Core.object+ ( Core.catMaybes+ [ ("appliedLabelChange" Core..=) Core.<$> appliedLabelChange,+ ("comment" Core..=) Core.<$> comment,+ ("create" Core..=) Core.<$> create,+ ("delete" Core..=) Core.<$> delete,+ ("dlpChange" Core..=) Core.<$> dlpChange,+ ("edit" Core..=) Core.<$> edit,+ ("move" Core..=) Core.<$> move,+ ("permissionChange" Core..=) Core.<$> permissionChange,+ ("reference" Core..=) Core.<$> reference,+ ("rename" Core..=) Core.<$> rename,+ ("restore" Core..=) Core.<$> restore,+ ("settingsChange" Core..=) Core.<$> settingsChange+ ]+ )++-- | The actor of a Drive activity.+--+-- /See:/ 'newActor' smart constructor.+data Actor = Actor+ { -- | An administrator.+ administrator :: (Core.Maybe Administrator),+ -- | An anonymous user.+ anonymous :: (Core.Maybe AnonymousUser),+ -- | An account acting on behalf of another.+ impersonation :: (Core.Maybe Impersonation),+ -- | A non-user actor (i.e. system triggered).+ system :: (Core.Maybe SystemEvent),+ -- | An end user.+ user :: (Core.Maybe User)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Actor' with the minimum fields required to make a request.+newActor ::+ Actor+newActor =+ Actor+ { administrator = Core.Nothing,+ anonymous = Core.Nothing,+ impersonation = Core.Nothing,+ system = Core.Nothing,+ user = Core.Nothing+ }++instance Core.FromJSON Actor where+ parseJSON =+ Core.withObject+ "Actor"+ ( \o ->+ Actor+ Core.<$> (o Core..:? "administrator")+ Core.<*> (o Core..:? "anonymous")+ Core.<*> (o Core..:? "impersonation")+ Core.<*> (o Core..:? "system")+ Core.<*> (o Core..:? "user")+ )++instance Core.ToJSON Actor where+ toJSON Actor {..} =+ Core.object+ ( Core.catMaybes+ [ ("administrator" Core..=) Core.<$> administrator,+ ("anonymous" Core..=) Core.<$> anonymous,+ ("impersonation" Core..=) Core.<$> impersonation,+ ("system" Core..=) Core.<$> system,+ ("user" Core..=) Core.<$> user+ ]+ )++-- | Empty message representing an administrator.+--+-- /See:/ 'newAdministrator' smart constructor.+data Administrator = Administrator+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Administrator' with the minimum fields required to make a request.+newAdministrator ::+ Administrator+newAdministrator = Administrator++instance Core.FromJSON Administrator where+ parseJSON =+ Core.withObject "Administrator" (\o -> Core.pure Administrator)++instance Core.ToJSON Administrator where+ toJSON = Core.const Core.emptyObject++-- | Empty message representing an anonymous user or indicating the authenticated user should be anonymized.+--+-- /See:/ 'newAnonymousUser' smart constructor.+data AnonymousUser = AnonymousUser+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'AnonymousUser' with the minimum fields required to make a request.+newAnonymousUser ::+ AnonymousUser+newAnonymousUser = AnonymousUser++instance Core.FromJSON AnonymousUser where+ parseJSON =+ Core.withObject "AnonymousUser" (\o -> Core.pure AnonymousUser)++instance Core.ToJSON AnonymousUser where+ toJSON = Core.const Core.emptyObject++-- | Represents any user (including a logged out user).+--+-- /See:/ 'newAnyone' smart constructor.+data Anyone = Anyone+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Anyone' with the minimum fields required to make a request.+newAnyone ::+ Anyone+newAnyone = Anyone++instance Core.FromJSON Anyone where+ parseJSON = Core.withObject "Anyone" (\o -> Core.pure Anyone)++instance Core.ToJSON Anyone where+ toJSON = Core.const Core.emptyObject++-- | Activity in applications other than Drive.+--+-- /See:/ 'newApplicationReference' smart constructor.+newtype ApplicationReference = ApplicationReference+ { -- | The reference type corresponding to this event.+ type' :: (Core.Maybe ApplicationReference_Type)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'ApplicationReference' with the minimum fields required to make a request.+newApplicationReference ::+ ApplicationReference+newApplicationReference =+ ApplicationReference {type' = Core.Nothing}++instance Core.FromJSON ApplicationReference where+ parseJSON =+ Core.withObject+ "ApplicationReference"+ (\o -> ApplicationReference Core.<$> (o Core..:? "type"))++instance Core.ToJSON ApplicationReference where+ toJSON ApplicationReference {..} =+ Core.object (Core.catMaybes [("type" Core..=) Core.<$> type'])++-- | Label changes that were made on the Target.+--+-- /See:/ 'newAppliedLabelChange' smart constructor.+newtype AppliedLabelChange = AppliedLabelChange+ { -- | Changes that were made to the Label on the Target.+ changes :: (Core.Maybe [AppliedLabelChangeDetail])+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'AppliedLabelChange' with the minimum fields required to make a request.+newAppliedLabelChange ::+ AppliedLabelChange+newAppliedLabelChange = AppliedLabelChange {changes = Core.Nothing}++instance Core.FromJSON AppliedLabelChange where+ parseJSON =+ Core.withObject+ "AppliedLabelChange"+ (\o -> AppliedLabelChange Core.<$> (o Core..:? "changes"))++instance Core.ToJSON AppliedLabelChange where+ toJSON AppliedLabelChange {..} =+ Core.object+ (Core.catMaybes [("changes" Core..=) Core.<$> changes])++-- | A change made to a Label on the Target.+--+-- /See:/ 'newAppliedLabelChangeDetail' smart constructor.+data AppliedLabelChangeDetail = AppliedLabelChangeDetail+ { -- | Field Changes. Only present if @types@ contains @LABEL_FIELD_VALUE_CHANGED@.+ fieldChanges :: (Core.Maybe [FieldValueChange]),+ -- | The Label name representing the Label that changed. This name always contains the revision of the Label that was used when this Action occurred. The format is @labels\/id\@revision@.+ label :: (Core.Maybe Core.Text),+ -- | The human-readable title of the label that changed.+ title :: (Core.Maybe Core.Text),+ -- | The types of changes made to the Label on the Target.+ types :: (Core.Maybe [AppliedLabelChangeDetail_TypesItem])+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'AppliedLabelChangeDetail' with the minimum fields required to make a request.+newAppliedLabelChangeDetail ::+ AppliedLabelChangeDetail+newAppliedLabelChangeDetail =+ AppliedLabelChangeDetail+ { fieldChanges = Core.Nothing,+ label = Core.Nothing,+ title = Core.Nothing,+ types = Core.Nothing+ }++instance Core.FromJSON AppliedLabelChangeDetail where+ parseJSON =+ Core.withObject+ "AppliedLabelChangeDetail"+ ( \o ->+ AppliedLabelChangeDetail+ Core.<$> (o Core..:? "fieldChanges")+ Core.<*> (o Core..:? "label")+ Core.<*> (o Core..:? "title")+ Core.<*> (o Core..:? "types")+ )++instance Core.ToJSON AppliedLabelChangeDetail where+ toJSON AppliedLabelChangeDetail {..} =+ Core.object+ ( Core.catMaybes+ [ ("fieldChanges" Core..=) Core.<$> fieldChanges,+ ("label" Core..=) Core.<$> label,+ ("title" Core..=) Core.<$> title,+ ("types" Core..=) Core.<$> types+ ]+ )++-- | A comment with an assignment.+--+-- /See:/ 'newAssignment' smart constructor.+data Assignment = Assignment+ { -- | The user to whom the comment was assigned.+ assignedUser :: (Core.Maybe User),+ -- | The sub-type of this event.+ subtype :: (Core.Maybe Assignment_Subtype)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Assignment' with the minimum fields required to make a request.+newAssignment ::+ Assignment+newAssignment =+ Assignment {assignedUser = Core.Nothing, subtype = Core.Nothing}++instance Core.FromJSON Assignment where+ parseJSON =+ Core.withObject+ "Assignment"+ ( \o ->+ Assignment+ Core.<$> (o Core..:? "assignedUser")+ Core.<*> (o Core..:? "subtype")+ )++instance Core.ToJSON Assignment where+ toJSON Assignment {..} =+ Core.object+ ( Core.catMaybes+ [ ("assignedUser" Core..=) Core.<$> assignedUser,+ ("subtype" Core..=) Core.<$> subtype+ ]+ )++-- | A change about comments on an object.+--+-- /See:/ 'newComment' smart constructor.+data Comment = Comment+ { -- | A change on an assignment.+ assignment :: (Core.Maybe Assignment),+ -- | Users who are mentioned in this comment.+ mentionedUsers :: (Core.Maybe [User]),+ -- | A change on a regular posted comment.+ post :: (Core.Maybe Post'),+ -- | A change on a suggestion.+ suggestion :: (Core.Maybe Suggestion)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Comment' with the minimum fields required to make a request.+newComment ::+ Comment+newComment =+ Comment+ { assignment = Core.Nothing,+ mentionedUsers = Core.Nothing,+ post = Core.Nothing,+ suggestion = Core.Nothing+ }++instance Core.FromJSON Comment where+ parseJSON =+ Core.withObject+ "Comment"+ ( \o ->+ Comment+ Core.<$> (o Core..:? "assignment")+ Core.<*> (o Core..:? "mentionedUsers")+ Core.<*> (o Core..:? "post")+ Core.<*> (o Core..:? "suggestion")+ )++instance Core.ToJSON Comment where+ toJSON Comment {..} =+ Core.object+ ( Core.catMaybes+ [ ("assignment" Core..=) Core.<$> assignment,+ ("mentionedUsers" Core..=) Core.<$> mentionedUsers,+ ("post" Core..=) Core.<$> post,+ ("suggestion" Core..=) Core.<$> suggestion+ ]+ )++-- | How the individual activities are consolidated. If a set of activities is related they can be consolidated into one combined activity, such as one actor performing the same action on multiple targets, or multiple actors performing the same action on a single target. The strategy defines the rules for which activities are related.+--+-- /See:/ 'newConsolidationStrategy' smart constructor.+data ConsolidationStrategy = ConsolidationStrategy+ { -- | The individual activities are consolidated using the legacy strategy.+ legacy :: (Core.Maybe Legacy),+ -- | The individual activities are not consolidated.+ none :: (Core.Maybe NoConsolidation)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'ConsolidationStrategy' with the minimum fields required to make a request.+newConsolidationStrategy ::+ ConsolidationStrategy+newConsolidationStrategy =+ ConsolidationStrategy {legacy = Core.Nothing, none = Core.Nothing}++instance Core.FromJSON ConsolidationStrategy where+ parseJSON =+ Core.withObject+ "ConsolidationStrategy"+ ( \o ->+ ConsolidationStrategy+ Core.<$> (o Core..:? "legacy")+ Core.<*> (o Core..:? "none")+ )++instance Core.ToJSON ConsolidationStrategy where+ toJSON ConsolidationStrategy {..} =+ Core.object+ ( Core.catMaybes+ [ ("legacy" Core..=) Core.<$> legacy,+ ("none" Core..=) Core.<$> none+ ]+ )++-- | An object was created by copying an existing object.+--+-- /See:/ 'newCopy' smart constructor.+newtype Copy = Copy+ { -- | The original object.+ originalObject :: (Core.Maybe TargetReference)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Copy' with the minimum fields required to make a request.+newCopy ::+ Copy+newCopy = Copy {originalObject = Core.Nothing}++instance Core.FromJSON Copy where+ parseJSON =+ Core.withObject+ "Copy"+ (\o -> Copy Core.<$> (o Core..:? "originalObject"))++instance Core.ToJSON Copy where+ toJSON Copy {..} =+ Core.object+ ( Core.catMaybes+ [("originalObject" Core..=) Core.<$> originalObject]+ )++-- | An object was created.+--+-- /See:/ 'newCreate' smart constructor.+data Create = Create+ { -- | If present, indicates the object was created by copying an existing Drive object.+ copy :: (Core.Maybe Copy),+ -- | If present, indicates the object was newly created (e.g. as a blank document), not derived from a Drive object or external object.+ new' :: (Core.Maybe New),+ -- | If present, indicates the object originated externally and was uploaded to Drive.+ upload :: (Core.Maybe Upload)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Create' with the minimum fields required to make a request.+newCreate ::+ Create+newCreate =+ Create+ { copy = Core.Nothing,+ new' = Core.Nothing,+ upload = Core.Nothing+ }++instance Core.FromJSON Create where+ parseJSON =+ Core.withObject+ "Create"+ ( \o ->+ Create+ Core.<$> (o Core..:? "copy")+ Core.<*> (o Core..:? "new")+ Core.<*> (o Core..:? "upload")+ )++instance Core.ToJSON Create where+ toJSON Create {..} =+ Core.object+ ( Core.catMaybes+ [ ("copy" Core..=) Core.<$> copy,+ ("new" Core..=) Core.<$> new',+ ("upload" Core..=) Core.<$> upload+ ]+ )++-- | A change in the object\'s data leak prevention status.+--+-- /See:/ 'newDataLeakPreventionChange' smart constructor.+newtype DataLeakPreventionChange = DataLeakPreventionChange+ { -- | The type of Data Leak Prevention (DLP) change.+ type' :: (Core.Maybe DataLeakPreventionChange_Type)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'DataLeakPreventionChange' with the minimum fields required to make a request.+newDataLeakPreventionChange ::+ DataLeakPreventionChange+newDataLeakPreventionChange =+ DataLeakPreventionChange {type' = Core.Nothing}++instance Core.FromJSON DataLeakPreventionChange where+ parseJSON =+ Core.withObject+ "DataLeakPreventionChange"+ (\o -> DataLeakPreventionChange Core.<$> (o Core..:? "type"))++instance Core.ToJSON DataLeakPreventionChange where+ toJSON DataLeakPreventionChange {..} =+ Core.object (Core.catMaybes [("type" Core..=) Core.<$> type'])++-- | Wrapper for Date Field value.+--+-- /See:/ 'newDate' smart constructor.+newtype Date = Date+ { -- | Date value.+ value :: (Core.Maybe Core.DateTime)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Date' with the minimum fields required to make a request.+newDate ::+ Date+newDate = Date {value = Core.Nothing}++instance Core.FromJSON Date where+ parseJSON =+ Core.withObject+ "Date"+ (\o -> Date Core.<$> (o Core..:? "value"))++instance Core.ToJSON Date where+ toJSON Date {..} =+ Core.object (Core.catMaybes [("value" Core..=) Core.<$> value])++-- | An object was deleted.+--+-- /See:/ 'newDelete' smart constructor.+newtype Delete' = Delete'+ { -- | The type of delete action taken.+ type' :: (Core.Maybe Delete_Type)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Delete' with the minimum fields required to make a request.+newDelete ::+ Delete'+newDelete = Delete' {type' = Core.Nothing}++instance Core.FromJSON Delete' where+ parseJSON =+ Core.withObject+ "Delete'"+ (\o -> Delete' Core.<$> (o Core..:? "type"))++instance Core.ToJSON Delete' where+ toJSON Delete' {..} =+ Core.object (Core.catMaybes [("type" Core..=) Core.<$> type'])++-- | A user whose account has since been deleted.+--+-- /See:/ 'newDeletedUser' smart constructor.+data DeletedUser = DeletedUser+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'DeletedUser' with the minimum fields required to make a request.+newDeletedUser ::+ DeletedUser+newDeletedUser = DeletedUser++instance Core.FromJSON DeletedUser where+ parseJSON =+ Core.withObject "DeletedUser" (\o -> Core.pure DeletedUser)++instance Core.ToJSON DeletedUser where+ toJSON = Core.const Core.emptyObject++-- | Information about a domain.+--+-- /See:/ 'newDomain' smart constructor.+data Domain = Domain+ { -- | An opaque string used to identify this domain.+ legacyId :: (Core.Maybe Core.Text),+ -- | The name of the domain, e.g. @google.com@.+ name :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Domain' with the minimum fields required to make a request.+newDomain ::+ Domain+newDomain = Domain {legacyId = Core.Nothing, name = Core.Nothing}++instance Core.FromJSON Domain where+ parseJSON =+ Core.withObject+ "Domain"+ ( \o ->+ Domain+ Core.<$> (o Core..:? "legacyId")+ Core.<*> (o Core..:? "name")+ )++instance Core.ToJSON Domain where+ toJSON Domain {..} =+ Core.object+ ( Core.catMaybes+ [ ("legacyId" Core..=) Core.<$> legacyId,+ ("name" Core..=) Core.<$> name+ ]+ )++-- | Information about a shared drive.+--+-- /See:/ 'newDrive' smart constructor.+data Drive = Drive+ { -- | The resource name of the shared drive. The format is @COLLECTION_ID\/DRIVE_ID@. Clients should not assume a specific collection ID for this resource name.+ name :: (Core.Maybe Core.Text),+ -- | The root of this shared drive.+ root :: (Core.Maybe DriveItem),+ -- | The title of the shared drive.+ title :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Drive' with the minimum fields required to make a request.+newDrive ::+ Drive+newDrive =+ Drive+ { name = Core.Nothing,+ root = Core.Nothing,+ title = Core.Nothing+ }++instance Core.FromJSON Drive where+ parseJSON =+ Core.withObject+ "Drive"+ ( \o ->+ Drive+ Core.<$> (o Core..:? "name")+ Core.<*> (o Core..:? "root")+ Core.<*> (o Core..:? "title")+ )++instance Core.ToJSON Drive where+ toJSON Drive {..} =+ Core.object+ ( Core.catMaybes+ [ ("name" Core..=) Core.<$> name,+ ("root" Core..=) Core.<$> root,+ ("title" Core..=) Core.<$> title+ ]+ )++-- | A single Drive activity comprising one or more Actions by one or more Actors on one or more Targets. Some Action groupings occur spontaneously, such as moving an item into a shared folder triggering a permission change. Other groupings of related Actions, such as multiple Actors editing one item or moving multiple files into a new folder, are controlled by the selection of a ConsolidationStrategy in the QueryDriveActivityRequest.+--+-- /See:/ 'newDriveActivity' smart constructor.+data DriveActivity = DriveActivity+ { -- | Details on all actions in this activity.+ actions :: (Core.Maybe [Action]),+ -- | All actor(s) responsible for the activity.+ actors :: (Core.Maybe [Actor]),+ -- | Key information about the primary action for this activity. This is either representative, or the most important, of all actions in the activity, according to the ConsolidationStrategy in the request.+ primaryActionDetail :: (Core.Maybe ActionDetail),+ -- | All Google Drive objects this activity is about (e.g. file, folder, drive). This represents the state of the target immediately after the actions occurred.+ targets :: (Core.Maybe [Target]),+ -- | The activity occurred over this time range.+ timeRange :: (Core.Maybe TimeRange),+ -- | The activity occurred at this specific time.+ timestamp :: (Core.Maybe Core.DateTime)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'DriveActivity' with the minimum fields required to make a request.+newDriveActivity ::+ DriveActivity+newDriveActivity =+ DriveActivity+ { actions = Core.Nothing,+ actors = Core.Nothing,+ primaryActionDetail = Core.Nothing,+ targets = Core.Nothing,+ timeRange = Core.Nothing,+ timestamp = Core.Nothing+ }++instance Core.FromJSON DriveActivity where+ parseJSON =+ Core.withObject+ "DriveActivity"+ ( \o ->+ DriveActivity+ Core.<$> (o Core..:? "actions")+ Core.<*> (o Core..:? "actors")+ Core.<*> (o Core..:? "primaryActionDetail")+ Core.<*> (o Core..:? "targets")+ Core.<*> (o Core..:? "timeRange")+ Core.<*> (o Core..:? "timestamp")+ )++instance Core.ToJSON DriveActivity where+ toJSON DriveActivity {..} =+ Core.object+ ( Core.catMaybes+ [ ("actions" Core..=) Core.<$> actions,+ ("actors" Core..=) Core.<$> actors,+ ("primaryActionDetail" Core..=) Core.<$> primaryActionDetail,+ ("targets" Core..=) Core.<$> targets,+ ("timeRange" Core..=) Core.<$> timeRange,+ ("timestamp" Core..=) Core.<$> timestamp+ ]+ )++-- | A Drive item which is a file.+--+-- /See:/ 'newDriveFile' smart constructor.+data DriveFile = DriveFile+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'DriveFile' with the minimum fields required to make a request.+newDriveFile ::+ DriveFile+newDriveFile = DriveFile++instance Core.FromJSON DriveFile where+ parseJSON =+ Core.withObject "DriveFile" (\o -> Core.pure DriveFile)++instance Core.ToJSON DriveFile where+ toJSON = Core.const Core.emptyObject++-- | A Drive item which is a folder.+--+-- /See:/ 'newDriveFolder' smart constructor.+newtype DriveFolder = DriveFolder+ { -- | The type of Drive folder.+ type' :: (Core.Maybe DriveFolder_Type)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'DriveFolder' with the minimum fields required to make a request.+newDriveFolder ::+ DriveFolder+newDriveFolder = DriveFolder {type' = Core.Nothing}++instance Core.FromJSON DriveFolder where+ parseJSON =+ Core.withObject+ "DriveFolder"+ (\o -> DriveFolder Core.<$> (o Core..:? "type"))++instance Core.ToJSON DriveFolder where+ toJSON DriveFolder {..} =+ Core.object (Core.catMaybes [("type" Core..=) Core.<$> type'])++-- | A Drive item, such as a file or folder.+--+-- /See:/ 'newDriveItem' smart constructor.+data DriveItem = DriveItem+ { -- | The Drive item is a file.+ driveFile :: (Core.Maybe DriveFile),+ -- | The Drive item is a folder. Includes information about the type of folder.+ driveFolder :: (Core.Maybe DriveFolder),+ -- | This field is deprecated; please use the @driveFile@ field instead.+ file :: (Core.Maybe File),+ -- | This field is deprecated; please use the @driveFolder@ field instead.+ folder :: (Core.Maybe Folder),+ -- | The MIME type of the Drive item. See https:\/\/developers.google.com\/drive\/v3\/web\/mime-types.+ mimeType :: (Core.Maybe Core.Text),+ -- | The target Drive item. The format is @items\/ITEM_ID@.+ name :: (Core.Maybe Core.Text),+ -- | Information about the owner of this Drive item.+ owner :: (Core.Maybe Owner),+ -- | The title of the Drive item.+ title :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'DriveItem' with the minimum fields required to make a request.+newDriveItem ::+ DriveItem+newDriveItem =+ DriveItem+ { driveFile = Core.Nothing,+ driveFolder = Core.Nothing,+ file = Core.Nothing,+ folder = Core.Nothing,+ mimeType = Core.Nothing,+ name = Core.Nothing,+ owner = Core.Nothing,+ title = Core.Nothing+ }++instance Core.FromJSON DriveItem where+ parseJSON =+ Core.withObject+ "DriveItem"+ ( \o ->+ DriveItem+ Core.<$> (o Core..:? "driveFile")+ Core.<*> (o Core..:? "driveFolder")+ Core.<*> (o Core..:? "file")+ Core.<*> (o Core..:? "folder")+ Core.<*> (o Core..:? "mimeType")+ Core.<*> (o Core..:? "name")+ Core.<*> (o Core..:? "owner")+ Core.<*> (o Core..:? "title")+ )++instance Core.ToJSON DriveItem where+ toJSON DriveItem {..} =+ Core.object+ ( Core.catMaybes+ [ ("driveFile" Core..=) Core.<$> driveFile,+ ("driveFolder" Core..=) Core.<$> driveFolder,+ ("file" Core..=) Core.<$> file,+ ("folder" Core..=) Core.<$> folder,+ ("mimeType" Core..=) Core.<$> mimeType,+ ("name" Core..=) Core.<$> name,+ ("owner" Core..=) Core.<$> owner,+ ("title" Core..=) Core.<$> title+ ]+ )++-- | A lightweight reference to a Drive item, such as a file or folder.+--+-- /See:/ 'newDriveItemReference' smart constructor.+data DriveItemReference = DriveItemReference+ { -- | The Drive item is a file.+ driveFile :: (Core.Maybe DriveFile),+ -- | The Drive item is a folder. Includes information about the type of folder.+ driveFolder :: (Core.Maybe DriveFolder),+ -- | This field is deprecated; please use the @driveFile@ field instead.+ file :: (Core.Maybe File),+ -- | This field is deprecated; please use the @driveFolder@ field instead.+ folder :: (Core.Maybe Folder),+ -- | The target Drive item. The format is @items\/ITEM_ID@.+ name :: (Core.Maybe Core.Text),+ -- | The title of the Drive item.+ title :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'DriveItemReference' with the minimum fields required to make a request.+newDriveItemReference ::+ DriveItemReference+newDriveItemReference =+ DriveItemReference+ { driveFile = Core.Nothing,+ driveFolder = Core.Nothing,+ file = Core.Nothing,+ folder = Core.Nothing,+ name = Core.Nothing,+ title = Core.Nothing+ }++instance Core.FromJSON DriveItemReference where+ parseJSON =+ Core.withObject+ "DriveItemReference"+ ( \o ->+ DriveItemReference+ Core.<$> (o Core..:? "driveFile")+ Core.<*> (o Core..:? "driveFolder")+ Core.<*> (o Core..:? "file")+ Core.<*> (o Core..:? "folder")+ Core.<*> (o Core..:? "name")+ Core.<*> (o Core..:? "title")+ )++instance Core.ToJSON DriveItemReference where+ toJSON DriveItemReference {..} =+ Core.object+ ( Core.catMaybes+ [ ("driveFile" Core..=) Core.<$> driveFile,+ ("driveFolder" Core..=) Core.<$> driveFolder,+ ("file" Core..=) Core.<$> file,+ ("folder" Core..=) Core.<$> folder,+ ("name" Core..=) Core.<$> name,+ ("title" Core..=) Core.<$> title+ ]+ )++-- | A lightweight reference to a shared drive.+--+-- /See:/ 'newDriveReference' smart constructor.+data DriveReference = DriveReference+ { -- | The resource name of the shared drive. The format is @COLLECTION_ID\/DRIVE_ID@. Clients should not assume a specific collection ID for this resource name.+ name :: (Core.Maybe Core.Text),+ -- | The title of the shared drive.+ title :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'DriveReference' with the minimum fields required to make a request.+newDriveReference ::+ DriveReference+newDriveReference =+ DriveReference {name = Core.Nothing, title = Core.Nothing}++instance Core.FromJSON DriveReference where+ parseJSON =+ Core.withObject+ "DriveReference"+ ( \o ->+ DriveReference+ Core.<$> (o Core..:? "name")+ Core.<*> (o Core..:? "title")+ )++instance Core.ToJSON DriveReference where+ toJSON DriveReference {..} =+ Core.object+ ( Core.catMaybes+ [("name" Core..=) Core.<$> name, ("title" Core..=) Core.<$> title]+ )++-- | An empty message indicating an object was edited.+--+-- /See:/ 'newEdit' smart constructor.+data Edit = Edit+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Edit' with the minimum fields required to make a request.+newEdit ::+ Edit+newEdit = Edit++instance Core.FromJSON Edit where+ parseJSON = Core.withObject "Edit" (\o -> Core.pure Edit)++instance Core.ToJSON Edit where+ toJSON = Core.const Core.emptyObject++-- | Contains a value of a Field.+--+-- /See:/ 'newFieldValue' smart constructor.+data FieldValue = FieldValue+ { -- | Date Field value.+ date :: (Core.Maybe Date),+ -- | Integer Field value.+ integer :: (Core.Maybe Integer),+ -- | Selection Field value.+ selection :: (Core.Maybe Selection),+ -- | Selection List Field value.+ selectionList :: (Core.Maybe SelectionList),+ -- | Text Field value.+ text :: (Core.Maybe Text),+ -- | Text List Field value.+ textList :: (Core.Maybe TextList),+ -- | User Field value.+ user :: (Core.Maybe SingleUser),+ -- | User List Field value.+ userList :: (Core.Maybe UserList)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'FieldValue' with the minimum fields required to make a request.+newFieldValue ::+ FieldValue+newFieldValue =+ FieldValue+ { date = Core.Nothing,+ integer = Core.Nothing,+ selection = Core.Nothing,+ selectionList = Core.Nothing,+ text = Core.Nothing,+ textList = Core.Nothing,+ user = Core.Nothing,+ userList = Core.Nothing+ }++instance Core.FromJSON FieldValue where+ parseJSON =+ Core.withObject+ "FieldValue"+ ( \o ->+ FieldValue+ Core.<$> (o Core..:? "date")+ Core.<*> (o Core..:? "integer")+ Core.<*> (o Core..:? "selection")+ Core.<*> (o Core..:? "selectionList")+ Core.<*> (o Core..:? "text")+ Core.<*> (o Core..:? "textList")+ Core.<*> (o Core..:? "user")+ Core.<*> (o Core..:? "userList")+ )++instance Core.ToJSON FieldValue where+ toJSON FieldValue {..} =+ Core.object+ ( Core.catMaybes+ [ ("date" Core..=) Core.<$> date,+ ("integer" Core..=) Core.<$> integer,+ ("selection" Core..=) Core.<$> selection,+ ("selectionList" Core..=) Core.<$> selectionList,+ ("text" Core..=) Core.<$> text,+ ("textList" Core..=) Core.<$> textList,+ ("user" Core..=) Core.<$> user,+ ("userList" Core..=) Core.<$> userList+ ]+ )++-- | Change to a Field value.+--+-- /See:/ 'newFieldValueChange' smart constructor.+data FieldValueChange = FieldValueChange+ { -- | The human-readable display name for this field.+ displayName :: (Core.Maybe Core.Text),+ -- | The ID of this field. Field IDs are unique within a Label.+ fieldId :: (Core.Maybe Core.Text),+ -- | The value that is now set on the field. If not present, the field was cleared. At least one of {old/value|new/value} is always set.+ newValue' :: (Core.Maybe FieldValue),+ -- | The value that was previously set on the field. If not present, the field was newly set. At least one of {old/value|new/value} is always set.+ oldValue :: (Core.Maybe FieldValue)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'FieldValueChange' with the minimum fields required to make a request.+newFieldValueChange ::+ FieldValueChange+newFieldValueChange =+ FieldValueChange+ { displayName = Core.Nothing,+ fieldId = Core.Nothing,+ newValue' = Core.Nothing,+ oldValue = Core.Nothing+ }++instance Core.FromJSON FieldValueChange where+ parseJSON =+ Core.withObject+ "FieldValueChange"+ ( \o ->+ FieldValueChange+ Core.<$> (o Core..:? "displayName")+ Core.<*> (o Core..:? "fieldId")+ Core.<*> (o Core..:? "newValue")+ Core.<*> (o Core..:? "oldValue")+ )++instance Core.ToJSON FieldValueChange where+ toJSON FieldValueChange {..} =+ Core.object+ ( Core.catMaybes+ [ ("displayName" Core..=) Core.<$> displayName,+ ("fieldId" Core..=) Core.<$> fieldId,+ ("newValue" Core..=) Core.<$> newValue',+ ("oldValue" Core..=) Core.<$> oldValue+ ]+ )++-- | This item is deprecated; please see @DriveFile@ instead.+--+-- /See:/ 'newFile' smart constructor.+data File = File+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'File' with the minimum fields required to make a request.+newFile ::+ File+newFile = File++instance Core.FromJSON File where+ parseJSON = Core.withObject "File" (\o -> Core.pure File)++instance Core.ToJSON File where+ toJSON = Core.const Core.emptyObject++-- | A comment on a file.+--+-- /See:/ 'newFileComment' smart constructor.+data FileComment = FileComment+ { -- | The comment in the discussion thread. This identifier is an opaque string compatible with the Drive API; see https:\/\/developers.google.com\/drive\/v3\/reference\/comments\/get+ legacyCommentId :: (Core.Maybe Core.Text),+ -- | The discussion thread to which the comment was added. This identifier is an opaque string compatible with the Drive API and references the first comment in a discussion; see https:\/\/developers.google.com\/drive\/v3\/reference\/comments\/get+ legacyDiscussionId :: (Core.Maybe Core.Text),+ -- | The link to the discussion thread containing this comment, for example, @https:\/\/docs.google.com\/DOCUMENT_ID\/edit?disco=THREAD_ID@.+ linkToDiscussion :: (Core.Maybe Core.Text),+ -- | The Drive item containing this comment.+ parent :: (Core.Maybe DriveItem)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'FileComment' with the minimum fields required to make a request.+newFileComment ::+ FileComment+newFileComment =+ FileComment+ { legacyCommentId = Core.Nothing,+ legacyDiscussionId = Core.Nothing,+ linkToDiscussion = Core.Nothing,+ parent = Core.Nothing+ }++instance Core.FromJSON FileComment where+ parseJSON =+ Core.withObject+ "FileComment"+ ( \o ->+ FileComment+ Core.<$> (o Core..:? "legacyCommentId")+ Core.<*> (o Core..:? "legacyDiscussionId")+ Core.<*> (o Core..:? "linkToDiscussion")+ Core.<*> (o Core..:? "parent")+ )++instance Core.ToJSON FileComment where+ toJSON FileComment {..} =+ Core.object+ ( Core.catMaybes+ [ ("legacyCommentId" Core..=) Core.<$> legacyCommentId,+ ("legacyDiscussionId" Core..=) Core.<$> legacyDiscussionId,+ ("linkToDiscussion" Core..=) Core.<$> linkToDiscussion,+ ("parent" Core..=) Core.<$> parent+ ]+ )++-- | This item is deprecated; please see @DriveFolder@ instead.+--+-- /See:/ 'newFolder' smart constructor.+newtype Folder = Folder+ { -- | This field is deprecated; please see @DriveFolder.type@ instead.+ type' :: (Core.Maybe Folder_Type)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Folder' with the minimum fields required to make a request.+newFolder ::+ Folder+newFolder = Folder {type' = Core.Nothing}++instance Core.FromJSON Folder where+ parseJSON =+ Core.withObject+ "Folder"+ (\o -> Folder Core.<$> (o Core..:? "type"))++instance Core.ToJSON Folder where+ toJSON Folder {..} =+ Core.object (Core.catMaybes [("type" Core..=) Core.<$> type'])++-- | Information about a group.+--+-- /See:/ 'newGroup' smart constructor.+data Group = Group+ { -- | The email address of the group.+ email :: (Core.Maybe Core.Text),+ -- | The title of the group.+ title :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Group' with the minimum fields required to make a request.+newGroup ::+ Group+newGroup = Group {email = Core.Nothing, title = Core.Nothing}++instance Core.FromJSON Group where+ parseJSON =+ Core.withObject+ "Group"+ ( \o ->+ Group Core.<$> (o Core..:? "email") Core.<*> (o Core..:? "title")+ )++instance Core.ToJSON Group where+ toJSON Group {..} =+ Core.object+ ( Core.catMaybes+ [ ("email" Core..=) Core.<$> email,+ ("title" Core..=) Core.<$> title+ ]+ )++-- | Information about an impersonation, where an admin acts on behalf of an end user. Information about the acting admin is not currently available.+--+-- /See:/ 'newImpersonation' smart constructor.+newtype Impersonation = Impersonation+ { -- | The impersonated user.+ impersonatedUser :: (Core.Maybe User)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Impersonation' with the minimum fields required to make a request.+newImpersonation ::+ Impersonation+newImpersonation = Impersonation {impersonatedUser = Core.Nothing}++instance Core.FromJSON Impersonation where+ parseJSON =+ Core.withObject+ "Impersonation"+ (\o -> Impersonation Core.<$> (o Core..:? "impersonatedUser"))++instance Core.ToJSON Impersonation where+ toJSON Impersonation {..} =+ Core.object+ ( Core.catMaybes+ [("impersonatedUser" Core..=) Core.<$> impersonatedUser]+ )++-- | Wrapper for Integer Field value.+--+-- /See:/ 'newInteger' smart constructor.+newtype Integer = Integer+ { -- | Integer value.+ value :: (Core.Maybe Core.Int64)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Integer' with the minimum fields required to make a request.+newInteger ::+ Integer+newInteger = Integer {value = Core.Nothing}++instance Core.FromJSON Integer where+ parseJSON =+ Core.withObject+ "Integer"+ ( \o ->+ Integer+ Core.<$> (o Core..:? "value" Core.<&> Core.fmap Core.fromAsText)+ )++instance Core.ToJSON Integer where+ toJSON Integer {..} =+ Core.object+ ( Core.catMaybes+ [("value" Core..=) Core.. Core.AsText Core.<$> value]+ )++-- | A known user.+--+-- /See:/ 'newKnownUser' smart constructor.+data KnownUser = KnownUser+ { -- | True if this is the user making the request.+ isCurrentUser :: (Core.Maybe Core.Bool),+ -- | The identifier for this user that can be used with the People API to get more information. The format is @people\/ACCOUNT_ID@. See https:\/\/developers.google.com\/people\/.+ personName :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'KnownUser' with the minimum fields required to make a request.+newKnownUser ::+ KnownUser+newKnownUser =+ KnownUser+ { isCurrentUser = Core.Nothing,+ personName = Core.Nothing+ }++instance Core.FromJSON KnownUser where+ parseJSON =+ Core.withObject+ "KnownUser"+ ( \o ->+ KnownUser+ Core.<$> (o Core..:? "isCurrentUser")+ Core.<*> (o Core..:? "personName")+ )++instance Core.ToJSON KnownUser where+ toJSON KnownUser {..} =+ Core.object+ ( Core.catMaybes+ [ ("isCurrentUser" Core..=) Core.<$> isCurrentUser,+ ("personName" Core..=) Core.<$> personName+ ]+ )++-- | A strategy that consolidates activities using the grouping rules from the legacy V1 Activity API. Similar actions occurring within a window of time can be grouped across multiple targets (such as moving a set of files at once) or multiple actors (such as several users editing the same item). Grouping rules for this strategy are specific to each type of action.+--+-- /See:/ 'newLegacy' smart constructor.+data Legacy = Legacy+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Legacy' with the minimum fields required to make a request.+newLegacy ::+ Legacy+newLegacy = Legacy++instance Core.FromJSON Legacy where+ parseJSON = Core.withObject "Legacy" (\o -> Core.pure Legacy)++instance Core.ToJSON Legacy where+ toJSON = Core.const Core.emptyObject++-- | An object was moved.+--+-- /See:/ 'newMove' smart constructor.+data Move = Move+ { -- | The added parent object(s).+ addedParents :: (Core.Maybe [TargetReference]),+ -- | The removed parent object(s).+ removedParents :: (Core.Maybe [TargetReference])+ }+ 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+ ]+ )++-- | An object was created from scratch.+--+-- /See:/ 'newNew' smart constructor.+data New = New+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'New' with the minimum fields required to make a request.+newNew ::+ New+newNew = New++instance Core.FromJSON New where+ parseJSON = Core.withObject "New" (\o -> Core.pure New)++instance Core.ToJSON New where+ toJSON = Core.const Core.emptyObject++-- | A strategy that does no consolidation of individual activities.+--+-- /See:/ 'newNoConsolidation' smart constructor.+data NoConsolidation = NoConsolidation+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'NoConsolidation' with the minimum fields required to make a request.+newNoConsolidation ::+ NoConsolidation+newNoConsolidation = NoConsolidation++instance Core.FromJSON NoConsolidation where+ parseJSON =+ Core.withObject+ "NoConsolidation"+ (\o -> Core.pure NoConsolidation)++instance Core.ToJSON NoConsolidation where+ toJSON = Core.const Core.emptyObject++-- | Information about the owner of a Drive item.+--+-- /See:/ 'newOwner' smart constructor.+data Owner = Owner+ { -- | The domain of the Drive item owner.+ domain :: (Core.Maybe Domain),+ -- | The drive that owns the item.+ drive :: (Core.Maybe DriveReference),+ -- | This field is deprecated; please use the @drive@ field instead.+ teamDrive :: (Core.Maybe TeamDriveReference),+ -- | The user that owns the Drive item.+ user :: (Core.Maybe User)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Owner' with the minimum fields required to make a request.+newOwner ::+ Owner+newOwner =+ Owner+ { domain = Core.Nothing,+ drive = Core.Nothing,+ teamDrive = Core.Nothing,+ user = Core.Nothing+ }++instance Core.FromJSON Owner where+ parseJSON =+ Core.withObject+ "Owner"+ ( \o ->+ Owner+ Core.<$> (o Core..:? "domain")+ Core.<*> (o Core..:? "drive")+ Core.<*> (o Core..:? "teamDrive")+ Core.<*> (o Core..:? "user")+ )++instance Core.ToJSON Owner where+ toJSON Owner {..} =+ Core.object+ ( Core.catMaybes+ [ ("domain" Core..=) Core.<$> domain,+ ("drive" Core..=) Core.<$> drive,+ ("teamDrive" Core..=) Core.<$> teamDrive,+ ("user" Core..=) Core.<$> user+ ]+ )++-- | The permission setting of an object.+--+-- /See:/ 'newPermission' smart constructor.+data Permission = Permission+ { -- | If true, the item can be discovered (e.g. in the user\'s \"Shared with me\" collection) without needing a link to the item.+ allowDiscovery :: (Core.Maybe Core.Bool),+ -- | If set, this permission applies to anyone, even logged out users.+ anyone :: (Core.Maybe Anyone),+ -- | The domain to whom this permission applies.+ domain :: (Core.Maybe Domain),+ -- | The group to whom this permission applies.+ group' :: (Core.Maybe Group),+ -- | Indicates the <https://developers.google.com/drive/web/manage-sharing#roles Google Drive permissions role>. The role determines a user\'s ability to read, write, and comment on items.+ role' :: (Core.Maybe Permission_Role),+ -- | The user to whom this permission applies.+ user :: (Core.Maybe User)+ }+ 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+ { allowDiscovery = Core.Nothing,+ anyone = Core.Nothing,+ domain = Core.Nothing,+ group' = Core.Nothing,+ role' = Core.Nothing,+ user = Core.Nothing+ }++instance Core.FromJSON Permission where+ parseJSON =+ Core.withObject+ "Permission"+ ( \o ->+ Permission+ Core.<$> (o Core..:? "allowDiscovery")+ Core.<*> (o Core..:? "anyone")+ Core.<*> (o Core..:? "domain")+ Core.<*> (o Core..:? "group")+ Core.<*> (o Core..:? "role")+ Core.<*> (o Core..:? "user")+ )++instance Core.ToJSON Permission where+ toJSON Permission {..} =+ Core.object+ ( Core.catMaybes+ [ ("allowDiscovery" Core..=) Core.<$> allowDiscovery,+ ("anyone" Core..=) Core.<$> anyone,+ ("domain" Core..=) Core.<$> domain,+ ("group" Core..=) Core.<$> group',+ ("role" Core..=) Core.<$> role',+ ("user" Core..=) Core.<$> user+ ]+ )++-- | A change of the permission setting on an item.+--+-- /See:/ 'newPermissionChange' smart constructor.+data PermissionChange = PermissionChange+ { -- | The set of permissions added by this change.+ addedPermissions :: (Core.Maybe [Permission]),+ -- | The set of permissions removed by this change.+ 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+ ]+ )++-- | A regular posted comment.+--+-- /See:/ 'newPost' smart constructor.+newtype Post' = Post'+ { -- | The sub-type of this event.+ subtype :: (Core.Maybe Post_Subtype)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Post' with the minimum fields required to make a request.+newPost ::+ Post'+newPost = Post' {subtype = Core.Nothing}++instance Core.FromJSON Post' where+ parseJSON =+ Core.withObject+ "Post'"+ (\o -> Post' Core.<$> (o Core..:? "subtype"))++instance Core.ToJSON Post' where+ toJSON Post' {..} =+ Core.object+ (Core.catMaybes [("subtype" Core..=) Core.<$> subtype])++-- | The request message for querying Drive activity.+--+-- /See:/ 'newQueryDriveActivityRequest' smart constructor.+data QueryDriveActivityRequest = QueryDriveActivityRequest+ { -- | Return activities for this Drive folder, plus all children and descendants. The format is @items\/ITEM_ID@.+ ancestorName :: (Core.Maybe Core.Text),+ -- | Details on how to consolidate related actions that make up the activity. If not set, then related actions aren\'t consolidated.+ consolidationStrategy :: (Core.Maybe ConsolidationStrategy),+ -- | The filtering for items returned from this query request. The format of the filter string is a sequence of expressions, joined by an optional \"AND\", where each expression is of the form \"field operator value\". Supported fields: - @time@: Uses numerical operators on date values either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format. Examples: - @time > 1452409200000 AND time \<= 1492812924310@ - @time >= \"2016-01-10T01:02:03-05:00\"@ - @detail.action_detail_case@: Uses the \"has\" operator (:) and either a singular value or a list of allowed action types enclosed in parentheses, separated by a space. To exclude a result from the response, prepend a hyphen (@-@) to the beginning of the filter string. Examples: - @detail.action_detail_case:RENAME@ - @detail.action_detail_case:(CREATE RESTORE)@ - @-detail.action_detail_case:MOVE@+ filter :: (Core.Maybe Core.Text),+ -- | Return activities for this Drive item. The format is @items\/ITEM_ID@.+ itemName :: (Core.Maybe Core.Text),+ -- | The minimum number of activities desired in the response; the server attempts to return at least this quantity. The server may also return fewer activities if it has a partial response ready before the request times out. If not set, a default value is used.+ pageSize :: (Core.Maybe Core.Int32),+ -- | The token identifies which page of results to return. Set this to the next/page/token value returned from a previous query to obtain the following page of results. If not set, the first page of results is returned.+ pageToken :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'QueryDriveActivityRequest' with the minimum fields required to make a request.+newQueryDriveActivityRequest ::+ QueryDriveActivityRequest+newQueryDriveActivityRequest =+ QueryDriveActivityRequest+ { ancestorName = Core.Nothing,+ consolidationStrategy = Core.Nothing,+ filter = Core.Nothing,+ itemName = Core.Nothing,+ pageSize = Core.Nothing,+ pageToken = Core.Nothing+ }++instance Core.FromJSON QueryDriveActivityRequest where+ parseJSON =+ Core.withObject+ "QueryDriveActivityRequest"+ ( \o ->+ QueryDriveActivityRequest+ Core.<$> (o Core..:? "ancestorName")+ Core.<*> (o Core..:? "consolidationStrategy")+ Core.<*> (o Core..:? "filter")+ Core.<*> (o Core..:? "itemName")+ Core.<*> (o Core..:? "pageSize")+ Core.<*> (o Core..:? "pageToken")+ )++instance Core.ToJSON QueryDriveActivityRequest where+ toJSON QueryDriveActivityRequest {..} =+ Core.object+ ( Core.catMaybes+ [ ("ancestorName" Core..=) Core.<$> ancestorName,+ ("consolidationStrategy" Core..=) Core.<$> consolidationStrategy,+ ("filter" Core..=) Core.<$> filter,+ ("itemName" Core..=) Core.<$> itemName,+ ("pageSize" Core..=) Core.<$> pageSize,+ ("pageToken" Core..=) Core.<$> pageToken+ ]+ )++-- | Response message for querying Drive activity.+--+-- /See:/ 'newQueryDriveActivityResponse' smart constructor.+data QueryDriveActivityResponse = QueryDriveActivityResponse+ { -- | List of activity requested.+ activities :: (Core.Maybe [DriveActivity]),+ -- | Token to retrieve the next page of results, or empty if there are no more results in the list.+ nextPageToken :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'QueryDriveActivityResponse' with the minimum fields required to make a request.+newQueryDriveActivityResponse ::+ QueryDriveActivityResponse+newQueryDriveActivityResponse =+ QueryDriveActivityResponse+ { activities = Core.Nothing,+ nextPageToken = Core.Nothing+ }++instance Core.FromJSON QueryDriveActivityResponse where+ parseJSON =+ Core.withObject+ "QueryDriveActivityResponse"+ ( \o ->+ QueryDriveActivityResponse+ Core.<$> (o Core..:? "activities")+ Core.<*> (o Core..:? "nextPageToken")+ )++instance Core.ToJSON QueryDriveActivityResponse where+ toJSON QueryDriveActivityResponse {..} =+ Core.object+ ( Core.catMaybes+ [ ("activities" Core..=) Core.<$> activities,+ ("nextPageToken" Core..=) Core.<$> nextPageToken+ ]+ )++-- | An object was renamed.+--+-- /See:/ 'newRename' smart constructor.+data Rename = Rename+ { -- | The new title of the drive object.+ newTitle' :: (Core.Maybe Core.Text),+ -- | The previous title of the drive object.+ 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+ ]+ )++-- | A deleted object was restored.+--+-- /See:/ 'newRestore' smart constructor.+newtype Restore = Restore+ { -- | The type of restore action taken.+ type' :: (Core.Maybe Restore_Type)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Restore' with the minimum fields required to make a request.+newRestore ::+ Restore+newRestore = Restore {type' = Core.Nothing}++instance Core.FromJSON Restore where+ parseJSON =+ Core.withObject+ "Restore"+ (\o -> Restore Core.<$> (o Core..:? "type"))++instance Core.ToJSON Restore where+ toJSON Restore {..} =+ Core.object (Core.catMaybes [("type" Core..=) Core.<$> type'])++-- | Information about restriction policy changes to a feature.+--+-- /See:/ 'newRestrictionChange' smart constructor.+data RestrictionChange = RestrictionChange+ { -- | The feature which had a change in restriction policy.+ feature :: (Core.Maybe RestrictionChange_Feature),+ -- | The restriction in place after the change.+ newRestriction' :: (Core.Maybe RestrictionChange_NewRestriction)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'RestrictionChange' with the minimum fields required to make a request.+newRestrictionChange ::+ RestrictionChange+newRestrictionChange =+ RestrictionChange+ { feature = Core.Nothing,+ newRestriction' = Core.Nothing+ }++instance Core.FromJSON RestrictionChange where+ parseJSON =+ Core.withObject+ "RestrictionChange"+ ( \o ->+ RestrictionChange+ Core.<$> (o Core..:? "feature")+ Core.<*> (o Core..:? "newRestriction")+ )++instance Core.ToJSON RestrictionChange where+ toJSON RestrictionChange {..} =+ Core.object+ ( Core.catMaybes+ [ ("feature" Core..=) Core.<$> feature,+ ("newRestriction" Core..=) Core.<$> newRestriction'+ ]+ )++-- | Wrapper for Selection Field value as combined value\/display_name pair for selected choice.+--+-- /See:/ 'newSelection' smart constructor.+data Selection = Selection+ { -- | Selection value as human-readable display string.+ displayName :: (Core.Maybe Core.Text),+ -- | Selection value as Field Choice ID.+ value :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Selection' with the minimum fields required to make a request.+newSelection ::+ Selection+newSelection =+ Selection {displayName = Core.Nothing, value = Core.Nothing}++instance Core.FromJSON Selection where+ parseJSON =+ Core.withObject+ "Selection"+ ( \o ->+ Selection+ Core.<$> (o Core..:? "displayName")+ Core.<*> (o Core..:? "value")+ )++instance Core.ToJSON Selection where+ toJSON Selection {..} =+ Core.object+ ( Core.catMaybes+ [ ("displayName" Core..=) Core.<$> displayName,+ ("value" Core..=) Core.<$> value+ ]+ )++-- | Wrapper for SelectionList Field value.+--+-- /See:/ 'newSelectionList' smart constructor.+newtype SelectionList = SelectionList+ { -- | Selection values.+ values :: (Core.Maybe [Selection])+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'SelectionList' with the minimum fields required to make a request.+newSelectionList ::+ SelectionList+newSelectionList = SelectionList {values = Core.Nothing}++instance Core.FromJSON SelectionList where+ parseJSON =+ Core.withObject+ "SelectionList"+ (\o -> SelectionList Core.<$> (o Core..:? "values"))++instance Core.ToJSON SelectionList where+ toJSON SelectionList {..} =+ Core.object (Core.catMaybes [("values" Core..=) Core.<$> values])++-- | Information about settings changes.+--+-- /See:/ 'newSettingsChange' smart constructor.+newtype SettingsChange = SettingsChange+ { -- | The set of changes made to restrictions.+ restrictionChanges :: (Core.Maybe [RestrictionChange])+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'SettingsChange' with the minimum fields required to make a request.+newSettingsChange ::+ SettingsChange+newSettingsChange =+ SettingsChange {restrictionChanges = Core.Nothing}++instance Core.FromJSON SettingsChange where+ parseJSON =+ Core.withObject+ "SettingsChange"+ (\o -> SettingsChange Core.<$> (o Core..:? "restrictionChanges"))++instance Core.ToJSON SettingsChange where+ toJSON SettingsChange {..} =+ Core.object+ ( Core.catMaybes+ [("restrictionChanges" Core..=) Core.<$> restrictionChanges]+ )++-- | Wrapper for User Field value.+--+-- /See:/ 'newSingleUser' smart constructor.+newtype SingleUser = SingleUser+ { -- | User value as email.+ value :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'SingleUser' with the minimum fields required to make a request.+newSingleUser ::+ SingleUser+newSingleUser = SingleUser {value = Core.Nothing}++instance Core.FromJSON SingleUser where+ parseJSON =+ Core.withObject+ "SingleUser"+ (\o -> SingleUser Core.<$> (o Core..:? "value"))++instance Core.ToJSON SingleUser where+ toJSON SingleUser {..} =+ Core.object (Core.catMaybes [("value" Core..=) Core.<$> value])++-- | A suggestion.+--+-- /See:/ 'newSuggestion' smart constructor.+newtype Suggestion = Suggestion+ { -- | The sub-type of this event.+ subtype :: (Core.Maybe Suggestion_Subtype)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Suggestion' with the minimum fields required to make a request.+newSuggestion ::+ Suggestion+newSuggestion = Suggestion {subtype = Core.Nothing}++instance Core.FromJSON Suggestion where+ parseJSON =+ Core.withObject+ "Suggestion"+ (\o -> Suggestion Core.<$> (o Core..:? "subtype"))++instance Core.ToJSON Suggestion where+ toJSON Suggestion {..} =+ Core.object+ (Core.catMaybes [("subtype" Core..=) Core.<$> subtype])++-- | Event triggered by system operations instead of end users.+--+-- /See:/ 'newSystemEvent' smart constructor.+newtype SystemEvent = SystemEvent+ { -- | The type of the system event that may triggered activity.+ type' :: (Core.Maybe SystemEvent_Type)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'SystemEvent' with the minimum fields required to make a request.+newSystemEvent ::+ SystemEvent+newSystemEvent = SystemEvent {type' = Core.Nothing}++instance Core.FromJSON SystemEvent where+ parseJSON =+ Core.withObject+ "SystemEvent"+ (\o -> SystemEvent Core.<$> (o Core..:? "type"))++instance Core.ToJSON SystemEvent where+ toJSON SystemEvent {..} =+ Core.object (Core.catMaybes [("type" Core..=) Core.<$> type'])++-- | Information about the target of activity. For more information on how activity history is shared with users, see <https://developers.google.com/drive/activity/v2#activityhistory Activity history visibility>.+--+-- /See:/ 'newTarget' smart constructor.+data Target = Target+ { -- | The target is a shared drive.+ drive :: (Core.Maybe Drive),+ -- | The target is a Drive item.+ driveItem :: (Core.Maybe DriveItem),+ -- | The target is a comment on a Drive file.+ fileComment :: (Core.Maybe FileComment),+ -- | This field is deprecated; please use the @drive@ field instead.+ teamDrive :: (Core.Maybe TeamDrive)+ }+ 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+ { drive = Core.Nothing,+ driveItem = Core.Nothing,+ fileComment = Core.Nothing,+ teamDrive = Core.Nothing+ }++instance Core.FromJSON Target where+ parseJSON =+ Core.withObject+ "Target"+ ( \o ->+ Target+ Core.<$> (o Core..:? "drive")+ Core.<*> (o Core..:? "driveItem")+ Core.<*> (o Core..:? "fileComment")+ Core.<*> (o Core..:? "teamDrive")+ )++instance Core.ToJSON Target where+ toJSON Target {..} =+ Core.object+ ( Core.catMaybes+ [ ("drive" Core..=) Core.<$> drive,+ ("driveItem" Core..=) Core.<$> driveItem,+ ("fileComment" Core..=) Core.<$> fileComment,+ ("teamDrive" Core..=) Core.<$> teamDrive+ ]+ )++-- | A lightweight reference to the target of activity.+--+-- /See:/ 'newTargetReference' smart constructor.+data TargetReference = TargetReference+ { -- | The target is a shared drive.+ drive :: (Core.Maybe DriveReference),+ -- | The target is a Drive item.+ driveItem :: (Core.Maybe DriveItemReference),+ -- | This field is deprecated; please use the @drive@ field instead.+ teamDrive :: (Core.Maybe TeamDriveReference)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'TargetReference' with the minimum fields required to make a request.+newTargetReference ::+ TargetReference+newTargetReference =+ TargetReference+ { drive = Core.Nothing,+ driveItem = Core.Nothing,+ teamDrive = Core.Nothing+ }++instance Core.FromJSON TargetReference where+ parseJSON =+ Core.withObject+ "TargetReference"+ ( \o ->+ TargetReference+ Core.<$> (o Core..:? "drive")+ Core.<*> (o Core..:? "driveItem")+ Core.<*> (o Core..:? "teamDrive")+ )++instance Core.ToJSON TargetReference where+ toJSON TargetReference {..} =+ Core.object+ ( Core.catMaybes+ [ ("drive" Core..=) Core.<$> drive,+ ("driveItem" Core..=) Core.<$> driveItem,+ ("teamDrive" Core..=) Core.<$> teamDrive+ ]+ )++-- | This item is deprecated; please see @Drive@ instead.+--+-- /See:/ 'newTeamDrive' smart constructor.+data TeamDrive = TeamDrive+ { -- | This field is deprecated; please see @Drive.name@ instead.+ name :: (Core.Maybe Core.Text),+ -- | This field is deprecated; please see @Drive.root@ instead.+ root :: (Core.Maybe DriveItem),+ -- | This field is deprecated; please see @Drive.title@ instead.+ title :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'TeamDrive' with the minimum fields required to make a request.+newTeamDrive ::+ TeamDrive+newTeamDrive =+ TeamDrive+ { name = Core.Nothing,+ root = Core.Nothing,+ title = Core.Nothing+ }++instance Core.FromJSON TeamDrive where+ parseJSON =+ Core.withObject+ "TeamDrive"+ ( \o ->+ TeamDrive+ Core.<$> (o Core..:? "name")+ Core.<*> (o Core..:? "root")+ Core.<*> (o Core..:? "title")+ )++instance Core.ToJSON TeamDrive where+ toJSON TeamDrive {..} =+ Core.object+ ( Core.catMaybes+ [ ("name" Core..=) Core.<$> name,+ ("root" Core..=) Core.<$> root,+ ("title" Core..=) Core.<$> title+ ]+ )++-- | This item is deprecated; please see @DriveReference@ instead.+--+-- /See:/ 'newTeamDriveReference' smart constructor.+data TeamDriveReference = TeamDriveReference+ { -- | This field is deprecated; please see @DriveReference.name@ instead.+ name :: (Core.Maybe Core.Text),+ -- | This field is deprecated; please see @DriveReference.title@ instead.+ title :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'TeamDriveReference' with the minimum fields required to make a request.+newTeamDriveReference ::+ TeamDriveReference+newTeamDriveReference =+ TeamDriveReference {name = Core.Nothing, title = Core.Nothing}++instance Core.FromJSON TeamDriveReference where+ parseJSON =+ Core.withObject+ "TeamDriveReference"+ ( \o ->+ TeamDriveReference+ Core.<$> (o Core..:? "name")+ Core.<*> (o Core..:? "title")+ )++instance Core.ToJSON TeamDriveReference where+ toJSON TeamDriveReference {..} =+ Core.object+ ( Core.catMaybes+ [("name" Core..=) Core.<$> name, ("title" Core..=) Core.<$> title]+ )++-- | Wrapper for Text Field value.+--+-- /See:/ 'newText' smart constructor.+newtype Text = Text+ { -- | Value of Text Field.+ value :: (Core.Maybe Core.Text)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Text' with the minimum fields required to make a request.+newText ::+ Text+newText = Text {value = Core.Nothing}++instance Core.FromJSON Text where+ parseJSON =+ Core.withObject+ "Text"+ (\o -> Text Core.<$> (o Core..:? "value"))++instance Core.ToJSON Text where+ toJSON Text {..} =+ Core.object (Core.catMaybes [("value" Core..=) Core.<$> value])++-- | Wrapper for Text List Field value.+--+-- /See:/ 'newTextList' smart constructor.+newtype TextList = TextList+ { -- | Text values.+ values :: (Core.Maybe [Text])+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'TextList' with the minimum fields required to make a request.+newTextList ::+ TextList+newTextList = TextList {values = Core.Nothing}++instance Core.FromJSON TextList where+ parseJSON =+ Core.withObject+ "TextList"+ (\o -> TextList Core.<$> (o Core..:? "values"))++instance Core.ToJSON TextList where+ toJSON TextList {..} =+ Core.object (Core.catMaybes [("values" Core..=) Core.<$> values])++-- | Information about time ranges.+--+-- /See:/ 'newTimeRange' smart constructor.+data TimeRange = TimeRange+ { -- | The end of the time range.+ endTime :: (Core.Maybe Core.DateTime),+ -- | The start of the time range.+ startTime :: (Core.Maybe Core.DateTime)+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'TimeRange' with the minimum fields required to make a request.+newTimeRange ::+ TimeRange+newTimeRange =+ TimeRange {endTime = Core.Nothing, startTime = Core.Nothing}++instance Core.FromJSON TimeRange where+ parseJSON =+ Core.withObject+ "TimeRange"+ ( \o ->+ TimeRange+ Core.<$> (o Core..:? "endTime")+ Core.<*> (o Core..:? "startTime")+ )++instance Core.ToJSON TimeRange where+ toJSON TimeRange {..} =+ Core.object+ ( Core.catMaybes+ [ ("endTime" Core..=) Core.<$> endTime,+ ("startTime" Core..=) Core.<$> startTime+ ]+ )++-- | A user about whom nothing is currently known.+--+-- /See:/ 'newUnknownUser' smart constructor.+data UnknownUser = UnknownUser+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'UnknownUser' with the minimum fields required to make a request.+newUnknownUser ::+ UnknownUser+newUnknownUser = UnknownUser++instance Core.FromJSON UnknownUser where+ parseJSON =+ Core.withObject "UnknownUser" (\o -> Core.pure UnknownUser)++instance Core.ToJSON UnknownUser where+ toJSON = Core.const Core.emptyObject++-- | An object was uploaded into Drive.+--+-- /See:/ 'newUpload' smart constructor.+data Upload = Upload+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Upload' with the minimum fields required to make a request.+newUpload ::+ Upload+newUpload = Upload++instance Core.FromJSON Upload where+ parseJSON = Core.withObject "Upload" (\o -> Core.pure Upload)++instance Core.ToJSON Upload where+ toJSON = Core.const Core.emptyObject++-- | Information about an end user.+--+-- /See:/ 'newUser' smart constructor.+data User = User+ { -- | A user whose account has since been deleted.+ deletedUser :: (Core.Maybe DeletedUser),+ -- | A known user.+ knownUser :: (Core.Maybe KnownUser),+ -- | A user about whom nothing is currently known.+ unknownUser :: (Core.Maybe UnknownUser)+ }+ 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+ { deletedUser = Core.Nothing,+ knownUser = Core.Nothing,+ unknownUser = Core.Nothing+ }++instance Core.FromJSON User where+ parseJSON =+ Core.withObject+ "User"+ ( \o ->+ User+ Core.<$> (o Core..:? "deletedUser")+ Core.<*> (o Core..:? "knownUser")+ Core.<*> (o Core..:? "unknownUser")+ )++instance Core.ToJSON User where+ toJSON User {..} =+ Core.object+ ( Core.catMaybes+ [ ("deletedUser" Core..=) Core.<$> deletedUser,+ ("knownUser" Core..=) Core.<$> knownUser,+ ("unknownUser" Core..=) Core.<$> unknownUser+ ]+ )++-- | Wrapper for UserList Field value.+--+-- /See:/ 'newUserList' smart constructor.+newtype UserList = UserList+ { -- | User values.+ values :: (Core.Maybe [SingleUser])+ }+ deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'UserList' with the minimum fields required to make a request.+newUserList ::+ UserList+newUserList = UserList {values = Core.Nothing}++instance Core.FromJSON UserList where+ parseJSON =+ Core.withObject+ "UserList"+ (\o -> UserList Core.<$> (o Core..:? "values"))++instance Core.ToJSON UserList where+ toJSON UserList {..} =+ Core.object (Core.catMaybes [("values" Core..=) Core.<$> values])
+ gen/Gogol/DriveActivity/Internal/Sum.hs view
@@ -0,0 +1,778 @@+{-# 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.DriveActivity.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.DriveActivity.Internal.Sum+ ( -- * Xgafv+ Xgafv+ ( Xgafv_1,+ Xgafv_2,+ ..+ ),++ -- * ApplicationReference_Type+ ApplicationReference_Type+ ( ApplicationReference_Type_UNSPECIFIEDREFERENCETYPE,+ ApplicationReference_Type_Link,+ ApplicationReference_Type_Discuss,+ ..+ ),++ -- * AppliedLabelChangeDetail_TypesItem+ AppliedLabelChangeDetail_TypesItem+ ( AppliedLabelChangeDetail_TypesItem_TYPEUNSPECIFIED,+ AppliedLabelChangeDetail_TypesItem_LABELADDED,+ AppliedLabelChangeDetail_TypesItem_LABELREMOVED,+ AppliedLabelChangeDetail_TypesItem_LABELFIELDVALUECHANGED,+ AppliedLabelChangeDetail_TypesItem_LABELAPPLIEDBYITEMCREATE,+ ..+ ),++ -- * Assignment_Subtype+ Assignment_Subtype+ ( Assignment_Subtype_SUBTYPEUNSPECIFIED,+ Assignment_Subtype_Added,+ Assignment_Subtype_Deleted,+ Assignment_Subtype_REPLYADDED,+ Assignment_Subtype_REPLYDELETED,+ Assignment_Subtype_Resolved,+ Assignment_Subtype_Reopened,+ Assignment_Subtype_Reassigned,+ ..+ ),++ -- * DataLeakPreventionChange_Type+ DataLeakPreventionChange_Type+ ( DataLeakPreventionChange_Type_TYPEUNSPECIFIED,+ DataLeakPreventionChange_Type_Flagged,+ DataLeakPreventionChange_Type_Cleared,+ ..+ ),++ -- * Delete_Type+ Delete_Type+ ( Delete_Type_TYPEUNSPECIFIED,+ Delete_Type_Trash,+ Delete_Type_PERMANENTDELETE,+ ..+ ),++ -- * DriveFolder_Type+ DriveFolder_Type+ ( DriveFolder_Type_TYPEUNSPECIFIED,+ DriveFolder_Type_MYDRIVEROOT,+ DriveFolder_Type_SHAREDDRIVEROOT,+ DriveFolder_Type_STANDARDFOLDER,+ ..+ ),++ -- * Folder_Type+ Folder_Type+ ( Folder_Type_TYPEUNSPECIFIED,+ Folder_Type_MYDRIVEROOT,+ Folder_Type_TEAMDRIVEROOT,+ Folder_Type_STANDARDFOLDER,+ ..+ ),++ -- * Permission_Role+ Permission_Role+ ( Permission_Role_ROLEUNSPECIFIED,+ Permission_Role_Owner,+ Permission_Role_Organizer,+ Permission_Role_FILEORGANIZER,+ Permission_Role_Editor,+ Permission_Role_Commenter,+ Permission_Role_Viewer,+ Permission_Role_PUBLISHEDVIEWER,+ ..+ ),++ -- * Post_Subtype+ Post_Subtype+ ( Post_Subtype_SUBTYPEUNSPECIFIED,+ Post_Subtype_Added,+ Post_Subtype_Deleted,+ Post_Subtype_REPLYADDED,+ Post_Subtype_REPLYDELETED,+ Post_Subtype_Resolved,+ Post_Subtype_Reopened,+ ..+ ),++ -- * Restore_Type+ Restore_Type+ ( Restore_Type_TYPEUNSPECIFIED,+ Restore_Type_Untrash,+ ..+ ),++ -- * RestrictionChange_Feature+ RestrictionChange_Feature+ ( RestrictionChange_Feature_FEATUREUNSPECIFIED,+ RestrictionChange_Feature_SHARINGOUTSIDEDOMAIN,+ RestrictionChange_Feature_DIRECTSHARING,+ RestrictionChange_Feature_ITEMDUPLICATION,+ RestrictionChange_Feature_DRIVEFILESTREAM,+ RestrictionChange_Feature_FILEORGANIZERCANSHAREFOLDERS,+ ..+ ),++ -- * RestrictionChange_NewRestriction+ RestrictionChange_NewRestriction+ ( RestrictionChange_NewRestriction_RESTRICTIONUNSPECIFIED,+ RestrictionChange_NewRestriction_Unrestricted,+ RestrictionChange_NewRestriction_FULLYRESTRICTED,+ ..+ ),++ -- * Suggestion_Subtype+ Suggestion_Subtype+ ( Suggestion_Subtype_SUBTYPEUNSPECIFIED,+ Suggestion_Subtype_Added,+ Suggestion_Subtype_Deleted,+ Suggestion_Subtype_REPLYADDED,+ Suggestion_Subtype_REPLYDELETED,+ Suggestion_Subtype_Accepted,+ Suggestion_Subtype_Rejected,+ Suggestion_Subtype_ACCEPTDELETED,+ Suggestion_Subtype_REJECTDELETED,+ ..+ ),++ -- * SystemEvent_Type+ SystemEvent_Type+ ( SystemEvent_Type_TYPEUNSPECIFIED,+ SystemEvent_Type_USERDELETION,+ SystemEvent_Type_TRASHAUTOPURGE,+ ..+ ),+ )+where++import Gogol.Prelude qualified as Core++-- | V1 error format.+newtype Xgafv = Xgafv {fromXgafv :: 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+ )++-- | v1 error format+pattern Xgafv_1 :: Xgafv+pattern Xgafv_1 = Xgafv "1"++-- | v2 error format+pattern Xgafv_2 :: Xgafv+pattern Xgafv_2 = Xgafv "2"++{-# COMPLETE+ Xgafv_1,+ Xgafv_2,+ Xgafv+ #-}++-- | The reference type corresponding to this event.+newtype ApplicationReference_Type = ApplicationReference_Type {fromApplicationReference_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+ )++-- | The type is not available.+pattern ApplicationReference_Type_UNSPECIFIEDREFERENCETYPE :: ApplicationReference_Type+pattern ApplicationReference_Type_UNSPECIFIEDREFERENCETYPE = ApplicationReference_Type "UNSPECIFIED_REFERENCE_TYPE"++-- | The links of one or more Drive items were posted.+pattern ApplicationReference_Type_Link :: ApplicationReference_Type+pattern ApplicationReference_Type_Link = ApplicationReference_Type "LINK"++-- | Comments were made regarding a Drive item.+pattern ApplicationReference_Type_Discuss :: ApplicationReference_Type+pattern ApplicationReference_Type_Discuss = ApplicationReference_Type "DISCUSS"++{-# COMPLETE+ ApplicationReference_Type_UNSPECIFIEDREFERENCETYPE,+ ApplicationReference_Type_Link,+ ApplicationReference_Type_Discuss,+ ApplicationReference_Type+ #-}++newtype AppliedLabelChangeDetail_TypesItem = AppliedLabelChangeDetail_TypesItem {fromAppliedLabelChangeDetail_TypesItem :: 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+ )++-- | The type of change to this Label is not available.+pattern AppliedLabelChangeDetail_TypesItem_TYPEUNSPECIFIED :: AppliedLabelChangeDetail_TypesItem+pattern AppliedLabelChangeDetail_TypesItem_TYPEUNSPECIFIED = AppliedLabelChangeDetail_TypesItem "TYPE_UNSPECIFIED"++-- | The identified Label was added to the Target.+pattern AppliedLabelChangeDetail_TypesItem_LABELADDED :: AppliedLabelChangeDetail_TypesItem+pattern AppliedLabelChangeDetail_TypesItem_LABELADDED = AppliedLabelChangeDetail_TypesItem "LABEL_ADDED"++-- | The identified Label was removed from the Target.+pattern AppliedLabelChangeDetail_TypesItem_LABELREMOVED :: AppliedLabelChangeDetail_TypesItem+pattern AppliedLabelChangeDetail_TypesItem_LABELREMOVED = AppliedLabelChangeDetail_TypesItem "LABEL_REMOVED"++-- | Field values were changed on the Target.+pattern AppliedLabelChangeDetail_TypesItem_LABELFIELDVALUECHANGED :: AppliedLabelChangeDetail_TypesItem+pattern AppliedLabelChangeDetail_TypesItem_LABELFIELDVALUECHANGED = AppliedLabelChangeDetail_TypesItem "LABEL_FIELD_VALUE_CHANGED"++-- | The Label was applied as a side-effect of Drive item creation.+pattern AppliedLabelChangeDetail_TypesItem_LABELAPPLIEDBYITEMCREATE :: AppliedLabelChangeDetail_TypesItem+pattern AppliedLabelChangeDetail_TypesItem_LABELAPPLIEDBYITEMCREATE = AppliedLabelChangeDetail_TypesItem "LABEL_APPLIED_BY_ITEM_CREATE"++{-# COMPLETE+ AppliedLabelChangeDetail_TypesItem_TYPEUNSPECIFIED,+ AppliedLabelChangeDetail_TypesItem_LABELADDED,+ AppliedLabelChangeDetail_TypesItem_LABELREMOVED,+ AppliedLabelChangeDetail_TypesItem_LABELFIELDVALUECHANGED,+ AppliedLabelChangeDetail_TypesItem_LABELAPPLIEDBYITEMCREATE,+ AppliedLabelChangeDetail_TypesItem+ #-}++-- | The sub-type of this event.+newtype Assignment_Subtype = Assignment_Subtype {fromAssignment_Subtype :: 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+ )++-- | Subtype not available.+pattern Assignment_Subtype_SUBTYPEUNSPECIFIED :: Assignment_Subtype+pattern Assignment_Subtype_SUBTYPEUNSPECIFIED = Assignment_Subtype "SUBTYPE_UNSPECIFIED"++-- | An assignment was added.+pattern Assignment_Subtype_Added :: Assignment_Subtype+pattern Assignment_Subtype_Added = Assignment_Subtype "ADDED"++-- | An assignment was deleted.+pattern Assignment_Subtype_Deleted :: Assignment_Subtype+pattern Assignment_Subtype_Deleted = Assignment_Subtype "DELETED"++-- | An assignment reply was added.+pattern Assignment_Subtype_REPLYADDED :: Assignment_Subtype+pattern Assignment_Subtype_REPLYADDED = Assignment_Subtype "REPLY_ADDED"++-- | An assignment reply was deleted.+pattern Assignment_Subtype_REPLYDELETED :: Assignment_Subtype+pattern Assignment_Subtype_REPLYDELETED = Assignment_Subtype "REPLY_DELETED"++-- | An assignment was resolved.+pattern Assignment_Subtype_Resolved :: Assignment_Subtype+pattern Assignment_Subtype_Resolved = Assignment_Subtype "RESOLVED"++-- | A resolved assignment was reopened.+pattern Assignment_Subtype_Reopened :: Assignment_Subtype+pattern Assignment_Subtype_Reopened = Assignment_Subtype "REOPENED"++-- | An assignment was reassigned.+pattern Assignment_Subtype_Reassigned :: Assignment_Subtype+pattern Assignment_Subtype_Reassigned = Assignment_Subtype "REASSIGNED"++{-# COMPLETE+ Assignment_Subtype_SUBTYPEUNSPECIFIED,+ Assignment_Subtype_Added,+ Assignment_Subtype_Deleted,+ Assignment_Subtype_REPLYADDED,+ Assignment_Subtype_REPLYDELETED,+ Assignment_Subtype_Resolved,+ Assignment_Subtype_Reopened,+ Assignment_Subtype_Reassigned,+ Assignment_Subtype+ #-}++-- | The type of Data Leak Prevention (DLP) change.+newtype DataLeakPreventionChange_Type = DataLeakPreventionChange_Type {fromDataLeakPreventionChange_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+ )++-- | An update to the DLP state that is neither FLAGGED or CLEARED.+pattern DataLeakPreventionChange_Type_TYPEUNSPECIFIED :: DataLeakPreventionChange_Type+pattern DataLeakPreventionChange_Type_TYPEUNSPECIFIED = DataLeakPreventionChange_Type "TYPE_UNSPECIFIED"++-- | Document has been flagged as containing sensitive content.+pattern DataLeakPreventionChange_Type_Flagged :: DataLeakPreventionChange_Type+pattern DataLeakPreventionChange_Type_Flagged = DataLeakPreventionChange_Type "FLAGGED"++-- | Document is no longer flagged as containing sensitive content.+pattern DataLeakPreventionChange_Type_Cleared :: DataLeakPreventionChange_Type+pattern DataLeakPreventionChange_Type_Cleared = DataLeakPreventionChange_Type "CLEARED"++{-# COMPLETE+ DataLeakPreventionChange_Type_TYPEUNSPECIFIED,+ DataLeakPreventionChange_Type_Flagged,+ DataLeakPreventionChange_Type_Cleared,+ DataLeakPreventionChange_Type+ #-}++-- | The type of delete action taken.+newtype Delete_Type = Delete_Type {fromDelete_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+ )++-- | Deletion type is not available.+pattern Delete_Type_TYPEUNSPECIFIED :: Delete_Type+pattern Delete_Type_TYPEUNSPECIFIED = Delete_Type "TYPE_UNSPECIFIED"++-- | An object was put into the trash.+pattern Delete_Type_Trash :: Delete_Type+pattern Delete_Type_Trash = Delete_Type "TRASH"++-- | An object was deleted permanently.+pattern Delete_Type_PERMANENTDELETE :: Delete_Type+pattern Delete_Type_PERMANENTDELETE = Delete_Type "PERMANENT_DELETE"++{-# COMPLETE+ Delete_Type_TYPEUNSPECIFIED,+ Delete_Type_Trash,+ Delete_Type_PERMANENTDELETE,+ Delete_Type+ #-}++-- | The type of Drive folder.+newtype DriveFolder_Type = DriveFolder_Type {fromDriveFolder_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+ )++-- | The folder type is unknown.+pattern DriveFolder_Type_TYPEUNSPECIFIED :: DriveFolder_Type+pattern DriveFolder_Type_TYPEUNSPECIFIED = DriveFolder_Type "TYPE_UNSPECIFIED"++-- | The folder is the root of a user\'s MyDrive.+pattern DriveFolder_Type_MYDRIVEROOT :: DriveFolder_Type+pattern DriveFolder_Type_MYDRIVEROOT = DriveFolder_Type "MY_DRIVE_ROOT"++-- | The folder is the root of a shared drive.+pattern DriveFolder_Type_SHAREDDRIVEROOT :: DriveFolder_Type+pattern DriveFolder_Type_SHAREDDRIVEROOT = DriveFolder_Type "SHARED_DRIVE_ROOT"++-- | The folder is a standard, non-root, folder.+pattern DriveFolder_Type_STANDARDFOLDER :: DriveFolder_Type+pattern DriveFolder_Type_STANDARDFOLDER = DriveFolder_Type "STANDARD_FOLDER"++{-# COMPLETE+ DriveFolder_Type_TYPEUNSPECIFIED,+ DriveFolder_Type_MYDRIVEROOT,+ DriveFolder_Type_SHAREDDRIVEROOT,+ DriveFolder_Type_STANDARDFOLDER,+ DriveFolder_Type+ #-}++-- | This field is deprecated; please see @DriveFolder.type@ instead.+newtype Folder_Type = Folder_Type {fromFolder_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+ )++-- | This item is deprecated; please see @DriveFolder.Type@ instead.+pattern Folder_Type_TYPEUNSPECIFIED :: Folder_Type+pattern Folder_Type_TYPEUNSPECIFIED = Folder_Type "TYPE_UNSPECIFIED"++-- | This item is deprecated; please see @DriveFolder.Type@ instead.+pattern Folder_Type_MYDRIVEROOT :: Folder_Type+pattern Folder_Type_MYDRIVEROOT = Folder_Type "MY_DRIVE_ROOT"++-- | This item is deprecated; please see @DriveFolder.Type@ instead.+pattern Folder_Type_TEAMDRIVEROOT :: Folder_Type+pattern Folder_Type_TEAMDRIVEROOT = Folder_Type "TEAM_DRIVE_ROOT"++-- | This item is deprecated; please see @DriveFolder.Type@ instead.+pattern Folder_Type_STANDARDFOLDER :: Folder_Type+pattern Folder_Type_STANDARDFOLDER = Folder_Type "STANDARD_FOLDER"++{-# COMPLETE+ Folder_Type_TYPEUNSPECIFIED,+ Folder_Type_MYDRIVEROOT,+ Folder_Type_TEAMDRIVEROOT,+ Folder_Type_STANDARDFOLDER,+ Folder_Type+ #-}++-- | Indicates the <https://developers.google.com/drive/web/manage-sharing#roles Google Drive permissions role>. The role determines a user\'s ability to read, write, and comment on items.+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+ )++-- | The role is not available.+pattern Permission_Role_ROLEUNSPECIFIED :: Permission_Role+pattern Permission_Role_ROLEUNSPECIFIED = Permission_Role "ROLE_UNSPECIFIED"++-- | A role granting full access.+pattern Permission_Role_Owner :: Permission_Role+pattern Permission_Role_Owner = Permission_Role "OWNER"++-- | A role granting the ability to manage people and settings.+pattern Permission_Role_Organizer :: Permission_Role+pattern Permission_Role_Organizer = Permission_Role "ORGANIZER"++-- | A role granting the ability to contribute and manage content.+pattern Permission_Role_FILEORGANIZER :: Permission_Role+pattern Permission_Role_FILEORGANIZER = Permission_Role "FILE_ORGANIZER"++-- | A role granting the ability to contribute content. This role is sometimes also known as \"writer\".+pattern Permission_Role_Editor :: Permission_Role+pattern Permission_Role_Editor = Permission_Role "EDITOR"++-- | A role granting the ability to view and comment on content.+pattern Permission_Role_Commenter :: Permission_Role+pattern Permission_Role_Commenter = Permission_Role "COMMENTER"++-- | A role granting the ability to view content. This role is sometimes also known as \"reader\".+pattern Permission_Role_Viewer :: Permission_Role+pattern Permission_Role_Viewer = Permission_Role "VIEWER"++-- | A role granting the ability to view content only after it has been published to the web. This role is sometimes also known as \"published reader\". See https:\/\/support.google.com\/sites\/answer\/6372880 for more information.+pattern Permission_Role_PUBLISHEDVIEWER :: Permission_Role+pattern Permission_Role_PUBLISHEDVIEWER = Permission_Role "PUBLISHED_VIEWER"++{-# COMPLETE+ Permission_Role_ROLEUNSPECIFIED,+ Permission_Role_Owner,+ Permission_Role_Organizer,+ Permission_Role_FILEORGANIZER,+ Permission_Role_Editor,+ Permission_Role_Commenter,+ Permission_Role_Viewer,+ Permission_Role_PUBLISHEDVIEWER,+ Permission_Role+ #-}++-- | The sub-type of this event.+newtype Post_Subtype = Post_Subtype {fromPost_Subtype :: 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+ )++-- | Subtype not available.+pattern Post_Subtype_SUBTYPEUNSPECIFIED :: Post_Subtype+pattern Post_Subtype_SUBTYPEUNSPECIFIED = Post_Subtype "SUBTYPE_UNSPECIFIED"++-- | A post was added.+pattern Post_Subtype_Added :: Post_Subtype+pattern Post_Subtype_Added = Post_Subtype "ADDED"++-- | A post was deleted.+pattern Post_Subtype_Deleted :: Post_Subtype+pattern Post_Subtype_Deleted = Post_Subtype "DELETED"++-- | A reply was added.+pattern Post_Subtype_REPLYADDED :: Post_Subtype+pattern Post_Subtype_REPLYADDED = Post_Subtype "REPLY_ADDED"++-- | A reply was deleted.+pattern Post_Subtype_REPLYDELETED :: Post_Subtype+pattern Post_Subtype_REPLYDELETED = Post_Subtype "REPLY_DELETED"++-- | A posted comment was resolved.+pattern Post_Subtype_Resolved :: Post_Subtype+pattern Post_Subtype_Resolved = Post_Subtype "RESOLVED"++-- | A posted comment was reopened.+pattern Post_Subtype_Reopened :: Post_Subtype+pattern Post_Subtype_Reopened = Post_Subtype "REOPENED"++{-# COMPLETE+ Post_Subtype_SUBTYPEUNSPECIFIED,+ Post_Subtype_Added,+ Post_Subtype_Deleted,+ Post_Subtype_REPLYADDED,+ Post_Subtype_REPLYDELETED,+ Post_Subtype_Resolved,+ Post_Subtype_Reopened,+ Post_Subtype+ #-}++-- | The type of restore action taken.+newtype Restore_Type = Restore_Type {fromRestore_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+ )++-- | The type is not available.+pattern Restore_Type_TYPEUNSPECIFIED :: Restore_Type+pattern Restore_Type_TYPEUNSPECIFIED = Restore_Type "TYPE_UNSPECIFIED"++-- | An object was restored from the trash.+pattern Restore_Type_Untrash :: Restore_Type+pattern Restore_Type_Untrash = Restore_Type "UNTRASH"++{-# COMPLETE+ Restore_Type_TYPEUNSPECIFIED,+ Restore_Type_Untrash,+ Restore_Type+ #-}++-- | The feature which had a change in restriction policy.+newtype RestrictionChange_Feature = RestrictionChange_Feature {fromRestrictionChange_Feature :: 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+ )++-- | The feature which changed restriction settings was not available.+pattern RestrictionChange_Feature_FEATUREUNSPECIFIED :: RestrictionChange_Feature+pattern RestrictionChange_Feature_FEATUREUNSPECIFIED = RestrictionChange_Feature "FEATURE_UNSPECIFIED"++-- | When restricted, this prevents items from being shared outside the domain.+pattern RestrictionChange_Feature_SHARINGOUTSIDEDOMAIN :: RestrictionChange_Feature+pattern RestrictionChange_Feature_SHARINGOUTSIDEDOMAIN = RestrictionChange_Feature "SHARING_OUTSIDE_DOMAIN"++-- | When restricted, this prevents direct sharing of individual items.+pattern RestrictionChange_Feature_DIRECTSHARING :: RestrictionChange_Feature+pattern RestrictionChange_Feature_DIRECTSHARING = RestrictionChange_Feature "DIRECT_SHARING"++-- | When restricted, this prevents actions like copy, download, and print that might result in uncontrolled duplicates of items.+pattern RestrictionChange_Feature_ITEMDUPLICATION :: RestrictionChange_Feature+pattern RestrictionChange_Feature_ITEMDUPLICATION = RestrictionChange_Feature "ITEM_DUPLICATION"++-- | When restricted, this prevents use of Drive File Stream.+pattern RestrictionChange_Feature_DRIVEFILESTREAM :: RestrictionChange_Feature+pattern RestrictionChange_Feature_DRIVEFILESTREAM = RestrictionChange_Feature "DRIVE_FILE_STREAM"++-- | When restricted, this limits sharing of folders to managers only.+pattern RestrictionChange_Feature_FILEORGANIZERCANSHAREFOLDERS :: RestrictionChange_Feature+pattern RestrictionChange_Feature_FILEORGANIZERCANSHAREFOLDERS = RestrictionChange_Feature "FILE_ORGANIZER_CAN_SHARE_FOLDERS"++{-# COMPLETE+ RestrictionChange_Feature_FEATUREUNSPECIFIED,+ RestrictionChange_Feature_SHARINGOUTSIDEDOMAIN,+ RestrictionChange_Feature_DIRECTSHARING,+ RestrictionChange_Feature_ITEMDUPLICATION,+ RestrictionChange_Feature_DRIVEFILESTREAM,+ RestrictionChange_Feature_FILEORGANIZERCANSHAREFOLDERS,+ RestrictionChange_Feature+ #-}++-- | The restriction in place after the change.+newtype RestrictionChange_NewRestriction = RestrictionChange_NewRestriction {fromRestrictionChange_NewRestriction :: 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+ )++-- | The type of restriction is not available.+pattern RestrictionChange_NewRestriction_RESTRICTIONUNSPECIFIED :: RestrictionChange_NewRestriction+pattern RestrictionChange_NewRestriction_RESTRICTIONUNSPECIFIED = RestrictionChange_NewRestriction "RESTRICTION_UNSPECIFIED"++-- | The feature is available without restriction.+pattern RestrictionChange_NewRestriction_Unrestricted :: RestrictionChange_NewRestriction+pattern RestrictionChange_NewRestriction_Unrestricted = RestrictionChange_NewRestriction "UNRESTRICTED"++-- | The use of this feature is fully restricted.+pattern RestrictionChange_NewRestriction_FULLYRESTRICTED :: RestrictionChange_NewRestriction+pattern RestrictionChange_NewRestriction_FULLYRESTRICTED = RestrictionChange_NewRestriction "FULLY_RESTRICTED"++{-# COMPLETE+ RestrictionChange_NewRestriction_RESTRICTIONUNSPECIFIED,+ RestrictionChange_NewRestriction_Unrestricted,+ RestrictionChange_NewRestriction_FULLYRESTRICTED,+ RestrictionChange_NewRestriction+ #-}++-- | The sub-type of this event.+newtype Suggestion_Subtype = Suggestion_Subtype {fromSuggestion_Subtype :: 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+ )++-- | Subtype not available.+pattern Suggestion_Subtype_SUBTYPEUNSPECIFIED :: Suggestion_Subtype+pattern Suggestion_Subtype_SUBTYPEUNSPECIFIED = Suggestion_Subtype "SUBTYPE_UNSPECIFIED"++-- | A suggestion was added.+pattern Suggestion_Subtype_Added :: Suggestion_Subtype+pattern Suggestion_Subtype_Added = Suggestion_Subtype "ADDED"++-- | A suggestion was deleted.+pattern Suggestion_Subtype_Deleted :: Suggestion_Subtype+pattern Suggestion_Subtype_Deleted = Suggestion_Subtype "DELETED"++-- | A suggestion reply was added.+pattern Suggestion_Subtype_REPLYADDED :: Suggestion_Subtype+pattern Suggestion_Subtype_REPLYADDED = Suggestion_Subtype "REPLY_ADDED"++-- | A suggestion reply was deleted.+pattern Suggestion_Subtype_REPLYDELETED :: Suggestion_Subtype+pattern Suggestion_Subtype_REPLYDELETED = Suggestion_Subtype "REPLY_DELETED"++-- | A suggestion was accepted.+pattern Suggestion_Subtype_Accepted :: Suggestion_Subtype+pattern Suggestion_Subtype_Accepted = Suggestion_Subtype "ACCEPTED"++-- | A suggestion was rejected.+pattern Suggestion_Subtype_Rejected :: Suggestion_Subtype+pattern Suggestion_Subtype_Rejected = Suggestion_Subtype "REJECTED"++-- | An accepted suggestion was deleted.+pattern Suggestion_Subtype_ACCEPTDELETED :: Suggestion_Subtype+pattern Suggestion_Subtype_ACCEPTDELETED = Suggestion_Subtype "ACCEPT_DELETED"++-- | A rejected suggestion was deleted.+pattern Suggestion_Subtype_REJECTDELETED :: Suggestion_Subtype+pattern Suggestion_Subtype_REJECTDELETED = Suggestion_Subtype "REJECT_DELETED"++{-# COMPLETE+ Suggestion_Subtype_SUBTYPEUNSPECIFIED,+ Suggestion_Subtype_Added,+ Suggestion_Subtype_Deleted,+ Suggestion_Subtype_REPLYADDED,+ Suggestion_Subtype_REPLYDELETED,+ Suggestion_Subtype_Accepted,+ Suggestion_Subtype_Rejected,+ Suggestion_Subtype_ACCEPTDELETED,+ Suggestion_Subtype_REJECTDELETED,+ Suggestion_Subtype+ #-}++-- | The type of the system event that may triggered activity.+newtype SystemEvent_Type = SystemEvent_Type {fromSystemEvent_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+ )++-- | The event type is unspecified.+pattern SystemEvent_Type_TYPEUNSPECIFIED :: SystemEvent_Type+pattern SystemEvent_Type_TYPEUNSPECIFIED = SystemEvent_Type "TYPE_UNSPECIFIED"++-- | The event is a consequence of a user account being deleted.+pattern SystemEvent_Type_USERDELETION :: SystemEvent_Type+pattern SystemEvent_Type_USERDELETION = SystemEvent_Type "USER_DELETION"++-- | The event is due to the system automatically purging trash.+pattern SystemEvent_Type_TRASHAUTOPURGE :: SystemEvent_Type+pattern SystemEvent_Type_TRASHAUTOPURGE = SystemEvent_Type "TRASH_AUTO_PURGE"++{-# COMPLETE+ SystemEvent_Type_TYPEUNSPECIFIED,+ SystemEvent_Type_USERDELETION,+ SystemEvent_Type_TRASHAUTOPURGE,+ SystemEvent_Type+ #-}
+ gen/Gogol/DriveActivity/Types.hs view
@@ -0,0 +1,364 @@+{-# 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.DriveActivity.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.DriveActivity.Types+ ( -- * Configuration+ driveActivityService,++ -- * OAuth Scopes+ Drive'Activity,+ Drive'Activity'Readonly,++ -- * Types++ -- ** Xgafv+ Xgafv (..),++ -- ** Action+ Action (..),+ newAction,++ -- ** ActionDetail+ ActionDetail (..),+ newActionDetail,++ -- ** Actor+ Actor (..),+ newActor,++ -- ** Administrator+ Administrator (..),+ newAdministrator,++ -- ** AnonymousUser+ AnonymousUser (..),+ newAnonymousUser,++ -- ** Anyone+ Anyone (..),+ newAnyone,++ -- ** ApplicationReference+ ApplicationReference (..),+ newApplicationReference,++ -- ** ApplicationReference_Type+ ApplicationReference_Type (..),++ -- ** AppliedLabelChange+ AppliedLabelChange (..),+ newAppliedLabelChange,++ -- ** AppliedLabelChangeDetail+ AppliedLabelChangeDetail (..),+ newAppliedLabelChangeDetail,++ -- ** AppliedLabelChangeDetail_TypesItem+ AppliedLabelChangeDetail_TypesItem (..),++ -- ** Assignment+ Assignment (..),+ newAssignment,++ -- ** Assignment_Subtype+ Assignment_Subtype (..),++ -- ** Comment+ Comment (..),+ newComment,++ -- ** ConsolidationStrategy+ ConsolidationStrategy (..),+ newConsolidationStrategy,++ -- ** Copy+ Copy (..),+ newCopy,++ -- ** Create+ Create (..),+ newCreate,++ -- ** DataLeakPreventionChange+ DataLeakPreventionChange (..),+ newDataLeakPreventionChange,++ -- ** DataLeakPreventionChange_Type+ DataLeakPreventionChange_Type (..),++ -- ** Date+ Date (..),+ newDate,++ -- ** Delete'+ Delete' (..),+ newDelete,++ -- ** Delete_Type+ Delete_Type (..),++ -- ** DeletedUser+ DeletedUser (..),+ newDeletedUser,++ -- ** Domain+ Domain (..),+ newDomain,++ -- ** Drive+ Drive (..),+ newDrive,++ -- ** DriveActivity+ DriveActivity (..),+ newDriveActivity,++ -- ** DriveFile+ DriveFile (..),+ newDriveFile,++ -- ** DriveFolder+ DriveFolder (..),+ newDriveFolder,++ -- ** DriveFolder_Type+ DriveFolder_Type (..),++ -- ** DriveItem+ DriveItem (..),+ newDriveItem,++ -- ** DriveItemReference+ DriveItemReference (..),+ newDriveItemReference,++ -- ** DriveReference+ DriveReference (..),+ newDriveReference,++ -- ** Edit+ Edit (..),+ newEdit,++ -- ** FieldValue+ FieldValue (..),+ newFieldValue,++ -- ** FieldValueChange+ FieldValueChange (..),+ newFieldValueChange,++ -- ** File+ File (..),+ newFile,++ -- ** FileComment+ FileComment (..),+ newFileComment,++ -- ** Folder+ Folder (..),+ newFolder,++ -- ** Folder_Type+ Folder_Type (..),++ -- ** Group+ Group (..),+ newGroup,++ -- ** Impersonation+ Impersonation (..),+ newImpersonation,++ -- ** Integer+ Integer (..),+ newInteger,++ -- ** KnownUser+ KnownUser (..),+ newKnownUser,++ -- ** Legacy+ Legacy (..),+ newLegacy,++ -- ** Move+ Move (..),+ newMove,++ -- ** New+ New (..),+ newNew,++ -- ** NoConsolidation+ NoConsolidation (..),+ newNoConsolidation,++ -- ** Owner+ Owner (..),+ newOwner,++ -- ** Permission+ Permission (..),+ newPermission,++ -- ** Permission_Role+ Permission_Role (..),++ -- ** PermissionChange+ PermissionChange (..),+ newPermissionChange,++ -- ** Post'+ Post' (..),+ newPost,++ -- ** Post_Subtype+ Post_Subtype (..),++ -- ** QueryDriveActivityRequest+ QueryDriveActivityRequest (..),+ newQueryDriveActivityRequest,++ -- ** QueryDriveActivityResponse+ QueryDriveActivityResponse (..),+ newQueryDriveActivityResponse,++ -- ** Rename+ Rename (..),+ newRename,++ -- ** Restore+ Restore (..),+ newRestore,++ -- ** Restore_Type+ Restore_Type (..),++ -- ** RestrictionChange+ RestrictionChange (..),+ newRestrictionChange,++ -- ** RestrictionChange_Feature+ RestrictionChange_Feature (..),++ -- ** RestrictionChange_NewRestriction+ RestrictionChange_NewRestriction (..),++ -- ** Selection+ Selection (..),+ newSelection,++ -- ** SelectionList+ SelectionList (..),+ newSelectionList,++ -- ** SettingsChange+ SettingsChange (..),+ newSettingsChange,++ -- ** SingleUser+ SingleUser (..),+ newSingleUser,++ -- ** Suggestion+ Suggestion (..),+ newSuggestion,++ -- ** Suggestion_Subtype+ Suggestion_Subtype (..),++ -- ** SystemEvent+ SystemEvent (..),+ newSystemEvent,++ -- ** SystemEvent_Type+ SystemEvent_Type (..),++ -- ** Target+ Target (..),+ newTarget,++ -- ** TargetReference+ TargetReference (..),+ newTargetReference,++ -- ** TeamDrive+ TeamDrive (..),+ newTeamDrive,++ -- ** TeamDriveReference+ TeamDriveReference (..),+ newTeamDriveReference,++ -- ** Text+ Text (..),+ newText,++ -- ** TextList+ TextList (..),+ newTextList,++ -- ** TimeRange+ TimeRange (..),+ newTimeRange,++ -- ** UnknownUser+ UnknownUser (..),+ newUnknownUser,++ -- ** Upload+ Upload (..),+ newUpload,++ -- ** User+ User (..),+ newUser,++ -- ** UserList+ UserList (..),+ newUserList,+ )+where++import Gogol.DriveActivity.Internal.Product+import Gogol.DriveActivity.Internal.Sum+import Gogol.Prelude qualified as Core++-- | Default request referring to version @v2@ of the Drive Activity API. This contains the host and root path used as a starting point for constructing service requests.+driveActivityService :: Core.ServiceConfig+driveActivityService =+ Core.defaultService+ (Core.ServiceId "driveactivity:v2")+ "driveactivity.googleapis.com"++-- | View and add to the activity record of files in your Google Drive+type Drive'Activity =+ "https://www.googleapis.com/auth/drive.activity"++-- | View the activity record of files in your Google Drive+type Drive'Activity'Readonly =+ "https://www.googleapis.com/auth/drive.activity.readonly"
− gen/Network/Google/DriveActivity.hs
@@ -1,427 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE TypeOperators #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}---- |--- Module : Network.Google.DriveActivity--- 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 in Google Drive.------ /See:/ <https://developers.google.com/drive/activity/ Drive Activity API Reference>-module Network.Google.DriveActivity- (- -- * Service Configuration- driveActivityService-- -- * OAuth Scopes- , driveActivityReadOnlyScope- , driveActivityScope-- -- * API Declaration- , DriveActivityAPI-- -- * Resources-- -- ** driveactivity.activity.query- , module Network.Google.Resource.DriveActivity.Activity.Query-- -- * Types-- -- ** Suggestion- , Suggestion- , suggestion- , sSubtype-- -- ** Drive- , Drive- , drive- , dRoot- , dName- , dTitle-- -- ** Impersonation- , Impersonation- , impersonation- , iImpersonatedUser-- -- ** Edit- , Edit- , edit-- -- ** ActionDetail- , ActionDetail- , actionDetail- , adEdit- , adPermissionChange- , adRestore- , adReference- , adCreate- , adRename- , adComment- , adSettingsChange- , adDlpChange- , adDelete- , adMove-- -- ** DriveReference- , DriveReference- , driveReference- , drName- , drTitle-- -- ** PermissionRole- , PermissionRole (..)-- -- ** Group- , Group- , group'- , gEmail- , gTitle-- -- ** DriveFile- , DriveFile- , driveFile-- -- ** TimeRange- , TimeRange- , timeRange- , trStartTime- , trEndTime-- -- ** RestrictionChangeNewRestriction- , RestrictionChangeNewRestriction (..)-- -- ** DriveFolderType- , DriveFolderType (..)-- -- ** QueryDriveActivityRequest- , QueryDriveActivityRequest- , queryDriveActivityRequest- , qdarAncestorName- , qdarItemName- , qdarConsolidationStrategy- , qdarFilter- , qdarPageToken- , qdarPageSize-- -- ** DriveItemReference- , DriveItemReference- , driveItemReference- , dirDriveFile- , dirFolder- , dirName- , dirDriveFolder- , dirTitle- , dirFile-- -- ** KnownUser- , KnownUser- , knownUser- , kuPersonName- , kuIsCurrentUser-- -- ** TargetReference- , TargetReference- , targetReference- , trDrive- , trTeamDrive- , trDriveItem-- -- ** Copy- , Copy- , copy- , cOriginalObject-- -- ** PermissionChange- , PermissionChange- , permissionChange- , pcAddedPermissions- , pcRemovedPermissions-- -- ** QueryDriveActivityResponse- , QueryDriveActivityResponse- , queryDriveActivityResponse- , qdarNextPageToken- , qdarActivities-- -- ** Post'- , Post'- , post- , pSubtype-- -- ** Restore- , Restore- , restore- , rType-- -- ** Domain- , Domain- , domain- , domLegacyId- , domName-- -- ** Administrator- , Administrator- , administrator-- -- ** DataLeakPreventionChange- , DataLeakPreventionChange- , dataLeakPreventionChange- , dlpcType-- -- ** Actor- , Actor- , actor- , aImpersonation- , aSystem- , aAdministrator- , aUser- , aAnonymous-- -- ** Folder- , Folder- , folder- , fType-- -- ** RestrictionChangeFeature- , RestrictionChangeFeature (..)-- -- ** Action- , Action- , action- , aTimeRange- , aActor- , aTimestamp- , aTarget- , aDetail-- -- ** TeamDrive- , TeamDrive- , teamDrive- , tdRoot- , tdName- , tdTitle-- -- ** UnknownUser- , UnknownUser- , unknownUser-- -- ** Owner- , Owner- , owner- , oDrive- , oDomain- , oTeamDrive- , oUser-- -- ** SystemEventType- , SystemEventType (..)-- -- ** ApplicationReference- , ApplicationReference- , applicationReference- , arType-- -- ** DeleteType- , DeleteType (..)-- -- ** ConsolidationStrategy- , ConsolidationStrategy- , consolidationStrategy- , csNone- , csLegacy-- -- ** User- , User- , user- , uKnownUser- , uUnknownUser- , uDeletedUser-- -- ** DeletedUser- , DeletedUser- , deletedUser-- -- ** Create- , Create- , create- , cCopy- , cNew- , cUpload-- -- ** PostSubtype- , PostSubtype (..)-- -- ** New- , New- , new-- -- ** AssignmentSubtype- , AssignmentSubtype (..)-- -- ** TeamDriveReference- , TeamDriveReference- , teamDriveReference- , tdrName- , tdrTitle-- -- ** Xgafv- , Xgafv (..)-- -- ** AnonymousUser- , AnonymousUser- , anonymousUser-- -- ** DriveFolder- , DriveFolder- , driveFolder- , dfType-- -- ** Anyone- , Anyone- , anyone-- -- ** RestrictionChange- , RestrictionChange- , restrictionChange- , rcFeature- , rcNewRestriction-- -- ** Legacy- , Legacy- , legacy-- -- ** FileComment- , FileComment- , fileComment- , fcParent- , fcLegacyDiscussionId- , fcLegacyCommentId- , fcLinkToDiscussion-- -- ** RestoreType- , RestoreType (..)-- -- ** Rename- , Rename- , rename- , rNewTitle- , rOldTitle-- -- ** SuggestionSubtype- , SuggestionSubtype (..)-- -- ** Upload- , Upload- , upload-- -- ** NoConsolidation- , NoConsolidation- , noConsolidation-- -- ** Assignment- , Assignment- , assignment- , aSubtype-- -- ** SettingsChange- , SettingsChange- , settingsChange- , scRestrictionChanges-- -- ** Comment- , Comment- , comment- , cSuggestion- , cPost- , cMentionedUsers- , cAssignment-- -- ** Permission- , Permission- , permission- , pGroup- , pDomain- , pUser- , pRole- , pAnyone- , pAllowDiscovery-- -- ** DataLeakPreventionChangeType- , DataLeakPreventionChangeType (..)-- -- ** File- , File- , file-- -- ** FolderType- , FolderType (..)-- -- ** Delete'- , Delete'- , delete'- , dType-- -- ** Target- , Target- , target- , tDrive- , tTeamDrive- , tFileComment- , tDriveItem-- -- ** Move- , Move- , move- , mAddedParents- , mRemovedParents-- -- ** ApplicationReferenceType- , ApplicationReferenceType (..)-- -- ** DriveActivity- , DriveActivity- , driveActivity- , daTimeRange- , daActions- , daActors- , daTargets- , daPrimaryActionDetail- , daTimestamp-- -- ** DriveItem- , DriveItem- , driveItem- , diDriveFile- , diFolder- , diOwner- , diMimeType- , diName- , diDriveFolder- , diTitle- , diFile-- -- ** SystemEvent- , SystemEvent- , systemEvent- , seType- ) where--import Network.Google.DriveActivity.Types-import Network.Google.Prelude-import Network.Google.Resource.DriveActivity.Activity.Query--{- $resources-TODO--}---- | Represents the entirety of the methods and resources available for the Drive Activity API service.-type DriveActivityAPI = ActivityQueryResource
− gen/Network/Google/DriveActivity/Types.hs
@@ -1,422 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module : Network.Google.DriveActivity.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.DriveActivity.Types- (- -- * Service Configuration- driveActivityService-- -- * OAuth Scopes- , driveActivityReadOnlyScope- , driveActivityScope-- -- * Suggestion- , Suggestion- , suggestion- , sSubtype-- -- * Drive- , Drive- , drive- , dRoot- , dName- , dTitle-- -- * Impersonation- , Impersonation- , impersonation- , iImpersonatedUser-- -- * Edit- , Edit- , edit-- -- * ActionDetail- , ActionDetail- , actionDetail- , adEdit- , adPermissionChange- , adRestore- , adReference- , adCreate- , adRename- , adComment- , adSettingsChange- , adDlpChange- , adDelete- , adMove-- -- * DriveReference- , DriveReference- , driveReference- , drName- , drTitle-- -- * PermissionRole- , PermissionRole (..)-- -- * Group- , Group- , group'- , gEmail- , gTitle-- -- * DriveFile- , DriveFile- , driveFile-- -- * TimeRange- , TimeRange- , timeRange- , trStartTime- , trEndTime-- -- * RestrictionChangeNewRestriction- , RestrictionChangeNewRestriction (..)-- -- * DriveFolderType- , DriveFolderType (..)-- -- * QueryDriveActivityRequest- , QueryDriveActivityRequest- , queryDriveActivityRequest- , qdarAncestorName- , qdarItemName- , qdarConsolidationStrategy- , qdarFilter- , qdarPageToken- , qdarPageSize-- -- * DriveItemReference- , DriveItemReference- , driveItemReference- , dirDriveFile- , dirFolder- , dirName- , dirDriveFolder- , dirTitle- , dirFile-- -- * KnownUser- , KnownUser- , knownUser- , kuPersonName- , kuIsCurrentUser-- -- * TargetReference- , TargetReference- , targetReference- , trDrive- , trTeamDrive- , trDriveItem-- -- * Copy- , Copy- , copy- , cOriginalObject-- -- * PermissionChange- , PermissionChange- , permissionChange- , pcAddedPermissions- , pcRemovedPermissions-- -- * QueryDriveActivityResponse- , QueryDriveActivityResponse- , queryDriveActivityResponse- , qdarNextPageToken- , qdarActivities-- -- * Post'- , Post'- , post- , pSubtype-- -- * Restore- , Restore- , restore- , rType-- -- * Domain- , Domain- , domain- , domLegacyId- , domName-- -- * Administrator- , Administrator- , administrator-- -- * DataLeakPreventionChange- , DataLeakPreventionChange- , dataLeakPreventionChange- , dlpcType-- -- * Actor- , Actor- , actor- , aImpersonation- , aSystem- , aAdministrator- , aUser- , aAnonymous-- -- * Folder- , Folder- , folder- , fType-- -- * RestrictionChangeFeature- , RestrictionChangeFeature (..)-- -- * Action- , Action- , action- , aTimeRange- , aActor- , aTimestamp- , aTarget- , aDetail-- -- * TeamDrive- , TeamDrive- , teamDrive- , tdRoot- , tdName- , tdTitle-- -- * UnknownUser- , UnknownUser- , unknownUser-- -- * Owner- , Owner- , owner- , oDrive- , oDomain- , oTeamDrive- , oUser-- -- * SystemEventType- , SystemEventType (..)-- -- * ApplicationReference- , ApplicationReference- , applicationReference- , arType-- -- * DeleteType- , DeleteType (..)-- -- * ConsolidationStrategy- , ConsolidationStrategy- , consolidationStrategy- , csNone- , csLegacy-- -- * User- , User- , user- , uKnownUser- , uUnknownUser- , uDeletedUser-- -- * DeletedUser- , DeletedUser- , deletedUser-- -- * Create- , Create- , create- , cCopy- , cNew- , cUpload-- -- * PostSubtype- , PostSubtype (..)-- -- * New- , New- , new-- -- * AssignmentSubtype- , AssignmentSubtype (..)-- -- * TeamDriveReference- , TeamDriveReference- , teamDriveReference- , tdrName- , tdrTitle-- -- * Xgafv- , Xgafv (..)-- -- * AnonymousUser- , AnonymousUser- , anonymousUser-- -- * DriveFolder- , DriveFolder- , driveFolder- , dfType-- -- * Anyone- , Anyone- , anyone-- -- * RestrictionChange- , RestrictionChange- , restrictionChange- , rcFeature- , rcNewRestriction-- -- * Legacy- , Legacy- , legacy-- -- * FileComment- , FileComment- , fileComment- , fcParent- , fcLegacyDiscussionId- , fcLegacyCommentId- , fcLinkToDiscussion-- -- * RestoreType- , RestoreType (..)-- -- * Rename- , Rename- , rename- , rNewTitle- , rOldTitle-- -- * SuggestionSubtype- , SuggestionSubtype (..)-- -- * Upload- , Upload- , upload-- -- * NoConsolidation- , NoConsolidation- , noConsolidation-- -- * Assignment- , Assignment- , assignment- , aSubtype-- -- * SettingsChange- , SettingsChange- , settingsChange- , scRestrictionChanges-- -- * Comment- , Comment- , comment- , cSuggestion- , cPost- , cMentionedUsers- , cAssignment-- -- * Permission- , Permission- , permission- , pGroup- , pDomain- , pUser- , pRole- , pAnyone- , pAllowDiscovery-- -- * DataLeakPreventionChangeType- , DataLeakPreventionChangeType (..)-- -- * File- , File- , file-- -- * FolderType- , FolderType (..)-- -- * Delete'- , Delete'- , delete'- , dType-- -- * Target- , Target- , target- , tDrive- , tTeamDrive- , tFileComment- , tDriveItem-- -- * Move- , Move- , move- , mAddedParents- , mRemovedParents-- -- * ApplicationReferenceType- , ApplicationReferenceType (..)-- -- * DriveActivity- , DriveActivity- , driveActivity- , daTimeRange- , daActions- , daActors- , daTargets- , daPrimaryActionDetail- , daTimestamp-- -- * DriveItem- , DriveItem- , driveItem- , diDriveFile- , diFolder- , diOwner- , diMimeType- , diName- , diDriveFolder- , diTitle- , diFile-- -- * SystemEvent- , SystemEvent- , systemEvent- , seType- ) where--import Network.Google.DriveActivity.Types.Product-import Network.Google.DriveActivity.Types.Sum-import Network.Google.Prelude---- | Default request referring to version 'v2' of the Drive Activity API. This contains the host and root path used as a starting point for constructing service requests.-driveActivityService :: ServiceConfig-driveActivityService- = defaultService (ServiceId "driveactivity:v2")- "driveactivity.googleapis.com"---- | View the activity record of files in your Google Drive-driveActivityReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/drive.activity.readonly"]-driveActivityReadOnlyScope = Proxy---- | View and add to the activity record of files in your Google Drive-driveActivityScope :: Proxy '["https://www.googleapis.com/auth/drive.activity"]-driveActivityScope = Proxy
− gen/Network/Google/DriveActivity/Types/Product.hs
@@ -1,2749 +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.DriveActivity.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.DriveActivity.Types.Product where--import Network.Google.DriveActivity.Types.Sum-import Network.Google.Prelude---- | A suggestion.------ /See:/ 'suggestion' smart constructor.-newtype Suggestion =- Suggestion'- { _sSubtype :: Maybe SuggestionSubtype- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Suggestion' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'sSubtype'-suggestion- :: Suggestion-suggestion = Suggestion' {_sSubtype = Nothing}----- | The sub-type of this event.-sSubtype :: Lens' Suggestion (Maybe SuggestionSubtype)-sSubtype = lens _sSubtype (\ s a -> s{_sSubtype = a})--instance FromJSON Suggestion where- parseJSON- = withObject "Suggestion"- (\ o -> Suggestion' <$> (o .:? "subtype"))--instance ToJSON Suggestion where- toJSON Suggestion'{..}- = object (catMaybes [("subtype" .=) <$> _sSubtype])---- | Information about a shared drive.------ /See:/ 'drive' smart constructor.-data Drive =- Drive'- { _dRoot :: !(Maybe DriveItem)- , _dName :: !(Maybe Text)- , _dTitle :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Drive' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'dRoot'------ * 'dName'------ * 'dTitle'-drive- :: Drive-drive = Drive' {_dRoot = Nothing, _dName = Nothing, _dTitle = Nothing}----- | The root of this shared drive.-dRoot :: Lens' Drive (Maybe DriveItem)-dRoot = lens _dRoot (\ s a -> s{_dRoot = a})---- | The resource name of the shared drive. The format is--- \"COLLECTION_ID\/DRIVE_ID\". Clients should not assume a specific--- collection ID for this resource name.-dName :: Lens' Drive (Maybe Text)-dName = lens _dName (\ s a -> s{_dName = a})---- | The title of the shared drive.-dTitle :: Lens' Drive (Maybe Text)-dTitle = lens _dTitle (\ s a -> s{_dTitle = a})--instance FromJSON Drive where- parseJSON- = withObject "Drive"- (\ o ->- Drive' <$>- (o .:? "root") <*> (o .:? "name") <*>- (o .:? "title"))--instance ToJSON Drive where- toJSON Drive'{..}- = object- (catMaybes- [("root" .=) <$> _dRoot, ("name" .=) <$> _dName,- ("title" .=) <$> _dTitle])---- | Information about an impersonation, where an admin acts on behalf of an--- end user. Information about the acting admin is not currently available.------ /See:/ 'impersonation' smart constructor.-newtype Impersonation =- Impersonation'- { _iImpersonatedUser :: Maybe User- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Impersonation' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'iImpersonatedUser'-impersonation- :: Impersonation-impersonation = Impersonation' {_iImpersonatedUser = Nothing}----- | The impersonated user.-iImpersonatedUser :: Lens' Impersonation (Maybe User)-iImpersonatedUser- = lens _iImpersonatedUser- (\ s a -> s{_iImpersonatedUser = a})--instance FromJSON Impersonation where- parseJSON- = withObject "Impersonation"- (\ o ->- Impersonation' <$> (o .:? "impersonatedUser"))--instance ToJSON Impersonation where- toJSON Impersonation'{..}- = object- (catMaybes- [("impersonatedUser" .=) <$> _iImpersonatedUser])---- | An empty message indicating an object was edited.------ /See:/ 'edit' smart constructor.-data Edit =- Edit'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Edit' with the minimum fields required to make a request.----edit- :: Edit-edit = Edit'---instance FromJSON Edit where- parseJSON = withObject "Edit" (\ o -> pure Edit')--instance ToJSON Edit where- toJSON = const emptyObject---- | Data describing the type and additional information of an action.------ /See:/ 'actionDetail' smart constructor.-data ActionDetail =- ActionDetail'- { _adEdit :: !(Maybe Edit)- , _adPermissionChange :: !(Maybe PermissionChange)- , _adRestore :: !(Maybe Restore)- , _adReference :: !(Maybe ApplicationReference)- , _adCreate :: !(Maybe Create)- , _adRename :: !(Maybe Rename)- , _adComment :: !(Maybe Comment)- , _adSettingsChange :: !(Maybe SettingsChange)- , _adDlpChange :: !(Maybe DataLeakPreventionChange)- , _adDelete :: !(Maybe Delete')- , _adMove :: !(Maybe Move)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'ActionDetail' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'adEdit'------ * 'adPermissionChange'------ * 'adRestore'------ * 'adReference'------ * 'adCreate'------ * 'adRename'------ * 'adComment'------ * 'adSettingsChange'------ * 'adDlpChange'------ * 'adDelete'------ * 'adMove'-actionDetail- :: ActionDetail-actionDetail =- ActionDetail'- { _adEdit = Nothing- , _adPermissionChange = Nothing- , _adRestore = Nothing- , _adReference = Nothing- , _adCreate = Nothing- , _adRename = Nothing- , _adComment = Nothing- , _adSettingsChange = Nothing- , _adDlpChange = Nothing- , _adDelete = Nothing- , _adMove = Nothing- }----- | An object was edited.-adEdit :: Lens' ActionDetail (Maybe Edit)-adEdit = lens _adEdit (\ s a -> s{_adEdit = a})---- | The permission on an object was changed.-adPermissionChange :: Lens' ActionDetail (Maybe PermissionChange)-adPermissionChange- = lens _adPermissionChange- (\ s a -> s{_adPermissionChange = a})---- | A deleted object was restored.-adRestore :: Lens' ActionDetail (Maybe Restore)-adRestore- = lens _adRestore (\ s a -> s{_adRestore = a})---- | An object was referenced in an application outside of Drive\/Docs.-adReference :: Lens' ActionDetail (Maybe ApplicationReference)-adReference- = lens _adReference (\ s a -> s{_adReference = a})---- | An object was created.-adCreate :: Lens' ActionDetail (Maybe Create)-adCreate = lens _adCreate (\ s a -> s{_adCreate = a})---- | An object was renamed.-adRename :: Lens' ActionDetail (Maybe Rename)-adRename = lens _adRename (\ s a -> s{_adRename = a})---- | A change about comments was made.-adComment :: Lens' ActionDetail (Maybe Comment)-adComment- = lens _adComment (\ s a -> s{_adComment = a})---- | Settings were changed.-adSettingsChange :: Lens' ActionDetail (Maybe SettingsChange)-adSettingsChange- = lens _adSettingsChange- (\ s a -> s{_adSettingsChange = a})---- | A change happened in data leak prevention status.-adDlpChange :: Lens' ActionDetail (Maybe DataLeakPreventionChange)-adDlpChange- = lens _adDlpChange (\ s a -> s{_adDlpChange = a})---- | An object was deleted.-adDelete :: Lens' ActionDetail (Maybe Delete')-adDelete = lens _adDelete (\ s a -> s{_adDelete = a})---- | An object was moved.-adMove :: Lens' ActionDetail (Maybe Move)-adMove = lens _adMove (\ s a -> s{_adMove = a})--instance FromJSON ActionDetail where- parseJSON- = withObject "ActionDetail"- (\ o ->- ActionDetail' <$>- (o .:? "edit") <*> (o .:? "permissionChange") <*>- (o .:? "restore")- <*> (o .:? "reference")- <*> (o .:? "create")- <*> (o .:? "rename")- <*> (o .:? "comment")- <*> (o .:? "settingsChange")- <*> (o .:? "dlpChange")- <*> (o .:? "delete")- <*> (o .:? "move"))--instance ToJSON ActionDetail where- toJSON ActionDetail'{..}- = object- (catMaybes- [("edit" .=) <$> _adEdit,- ("permissionChange" .=) <$> _adPermissionChange,- ("restore" .=) <$> _adRestore,- ("reference" .=) <$> _adReference,- ("create" .=) <$> _adCreate,- ("rename" .=) <$> _adRename,- ("comment" .=) <$> _adComment,- ("settingsChange" .=) <$> _adSettingsChange,- ("dlpChange" .=) <$> _adDlpChange,- ("delete" .=) <$> _adDelete,- ("move" .=) <$> _adMove])---- | A lightweight reference to a shared drive.------ /See:/ 'driveReference' smart constructor.-data DriveReference =- DriveReference'- { _drName :: !(Maybe Text)- , _drTitle :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'DriveReference' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'drName'------ * 'drTitle'-driveReference- :: DriveReference-driveReference = DriveReference' {_drName = Nothing, _drTitle = Nothing}----- | The resource name of the shared drive. The format is--- \"COLLECTION_ID\/DRIVE_ID\". Clients should not assume a specific--- collection ID for this resource name.-drName :: Lens' DriveReference (Maybe Text)-drName = lens _drName (\ s a -> s{_drName = a})---- | The title of the shared drive.-drTitle :: Lens' DriveReference (Maybe Text)-drTitle = lens _drTitle (\ s a -> s{_drTitle = a})--instance FromJSON DriveReference where- parseJSON- = withObject "DriveReference"- (\ o ->- DriveReference' <$>- (o .:? "name") <*> (o .:? "title"))--instance ToJSON DriveReference where- toJSON DriveReference'{..}- = object- (catMaybes- [("name" .=) <$> _drName, ("title" .=) <$> _drTitle])---- | Information about a group.------ /See:/ 'group'' smart constructor.-data Group =- Group'- { _gEmail :: !(Maybe Text)- , _gTitle :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Group' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'gEmail'------ * 'gTitle'-group'- :: Group-group' = Group' {_gEmail = Nothing, _gTitle = Nothing}----- | The email address of the group.-gEmail :: Lens' Group (Maybe Text)-gEmail = lens _gEmail (\ s a -> s{_gEmail = a})---- | The title of the group.-gTitle :: Lens' Group (Maybe Text)-gTitle = lens _gTitle (\ s a -> s{_gTitle = a})--instance FromJSON Group where- parseJSON- = withObject "Group"- (\ o ->- Group' <$> (o .:? "email") <*> (o .:? "title"))--instance ToJSON Group where- toJSON Group'{..}- = object- (catMaybes- [("email" .=) <$> _gEmail, ("title" .=) <$> _gTitle])---- | A Drive item which is a file.------ /See:/ 'driveFile' smart constructor.-data DriveFile =- DriveFile'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'DriveFile' with the minimum fields required to make a request.----driveFile- :: DriveFile-driveFile = DriveFile'---instance FromJSON DriveFile where- parseJSON- = withObject "DriveFile" (\ o -> pure DriveFile')--instance ToJSON DriveFile where- toJSON = const emptyObject---- | Information about time ranges.------ /See:/ 'timeRange' smart constructor.-data TimeRange =- TimeRange'- { _trStartTime :: !(Maybe DateTime')- , _trEndTime :: !(Maybe DateTime')- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'TimeRange' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'trStartTime'------ * 'trEndTime'-timeRange- :: TimeRange-timeRange = TimeRange' {_trStartTime = Nothing, _trEndTime = Nothing}----- | The start of the time range.-trStartTime :: Lens' TimeRange (Maybe UTCTime)-trStartTime- = lens _trStartTime (\ s a -> s{_trStartTime = a}) .- mapping _DateTime---- | The end of the time range.-trEndTime :: Lens' TimeRange (Maybe UTCTime)-trEndTime- = lens _trEndTime (\ s a -> s{_trEndTime = a}) .- mapping _DateTime--instance FromJSON TimeRange where- parseJSON- = withObject "TimeRange"- (\ o ->- TimeRange' <$>- (o .:? "startTime") <*> (o .:? "endTime"))--instance ToJSON TimeRange where- toJSON TimeRange'{..}- = object- (catMaybes- [("startTime" .=) <$> _trStartTime,- ("endTime" .=) <$> _trEndTime])---- | The request message for querying Drive activity.------ /See:/ 'queryDriveActivityRequest' smart constructor.-data QueryDriveActivityRequest =- QueryDriveActivityRequest'- { _qdarAncestorName :: !(Maybe Text)- , _qdarItemName :: !(Maybe Text)- , _qdarConsolidationStrategy :: !(Maybe ConsolidationStrategy)- , _qdarFilter :: !(Maybe Text)- , _qdarPageToken :: !(Maybe Text)- , _qdarPageSize :: !(Maybe (Textual Int32))- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'QueryDriveActivityRequest' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'qdarAncestorName'------ * 'qdarItemName'------ * 'qdarConsolidationStrategy'------ * 'qdarFilter'------ * 'qdarPageToken'------ * 'qdarPageSize'-queryDriveActivityRequest- :: QueryDriveActivityRequest-queryDriveActivityRequest =- QueryDriveActivityRequest'- { _qdarAncestorName = Nothing- , _qdarItemName = Nothing- , _qdarConsolidationStrategy = Nothing- , _qdarFilter = Nothing- , _qdarPageToken = Nothing- , _qdarPageSize = Nothing- }----- | Return activities for this Drive folder and all children and--- descendants. The format is \"items\/ITEM_ID\".-qdarAncestorName :: Lens' QueryDriveActivityRequest (Maybe Text)-qdarAncestorName- = lens _qdarAncestorName- (\ s a -> s{_qdarAncestorName = a})---- | Return activities for this Drive item. The format is \"items\/ITEM_ID\".-qdarItemName :: Lens' QueryDriveActivityRequest (Maybe Text)-qdarItemName- = lens _qdarItemName (\ s a -> s{_qdarItemName = a})---- | Details on how to consolidate related actions that make up the activity.--- If not set, then related actions will not be consolidated.-qdarConsolidationStrategy :: Lens' QueryDriveActivityRequest (Maybe ConsolidationStrategy)-qdarConsolidationStrategy- = lens _qdarConsolidationStrategy- (\ s a -> s{_qdarConsolidationStrategy = a})---- | The filtering for items returned from this query request. The format of--- the filter string is a sequence of expressions, joined by an optional--- \"AND\", where each expression is of the form \"field operator value\".--- Supported fields: - 'time': Uses numerical operators on date values--- either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format.--- Examples: - 'time > 1452409200000 AND time \<= 1492812924310' ---- 'time >= \"2016-01-10T01:02:03-05:00\"' - 'detail.action_detail_case':--- Uses the \"has\" operator (:) and either a singular value or a list of--- allowed action types enclosed in parentheses. Examples: ---- 'detail.action_detail_case: RENAME' ---- 'detail.action_detail_case:(CREATE UPLOAD)' ---- '-detail.action_detail_case:MOVE'-qdarFilter :: Lens' QueryDriveActivityRequest (Maybe Text)-qdarFilter- = lens _qdarFilter (\ s a -> s{_qdarFilter = a})---- | The next_page_token value returned from a previous QueryDriveActivity--- request, if any.-qdarPageToken :: Lens' QueryDriveActivityRequest (Maybe Text)-qdarPageToken- = lens _qdarPageToken- (\ s a -> s{_qdarPageToken = a})---- | The requested number of activity to return. If not set, a default value--- will be used.-qdarPageSize :: Lens' QueryDriveActivityRequest (Maybe Int32)-qdarPageSize- = lens _qdarPageSize (\ s a -> s{_qdarPageSize = a})- . mapping _Coerce--instance FromJSON QueryDriveActivityRequest where- parseJSON- = withObject "QueryDriveActivityRequest"- (\ o ->- QueryDriveActivityRequest' <$>- (o .:? "ancestorName") <*> (o .:? "itemName") <*>- (o .:? "consolidationStrategy")- <*> (o .:? "filter")- <*> (o .:? "pageToken")- <*> (o .:? "pageSize"))--instance ToJSON QueryDriveActivityRequest where- toJSON QueryDriveActivityRequest'{..}- = object- (catMaybes- [("ancestorName" .=) <$> _qdarAncestorName,- ("itemName" .=) <$> _qdarItemName,- ("consolidationStrategy" .=) <$>- _qdarConsolidationStrategy,- ("filter" .=) <$> _qdarFilter,- ("pageToken" .=) <$> _qdarPageToken,- ("pageSize" .=) <$> _qdarPageSize])---- | A lightweight reference to a Drive item, such as a file or folder.------ /See:/ 'driveItemReference' smart constructor.-data DriveItemReference =- DriveItemReference'- { _dirDriveFile :: !(Maybe DriveFile)- , _dirFolder :: !(Maybe Folder)- , _dirName :: !(Maybe Text)- , _dirDriveFolder :: !(Maybe DriveFolder)- , _dirTitle :: !(Maybe Text)- , _dirFile :: !(Maybe File)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'DriveItemReference' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'dirDriveFile'------ * 'dirFolder'------ * 'dirName'------ * 'dirDriveFolder'------ * 'dirTitle'------ * 'dirFile'-driveItemReference- :: DriveItemReference-driveItemReference =- DriveItemReference'- { _dirDriveFile = Nothing- , _dirFolder = Nothing- , _dirName = Nothing- , _dirDriveFolder = Nothing- , _dirTitle = Nothing- , _dirFile = Nothing- }----- | The Drive item is a file.-dirDriveFile :: Lens' DriveItemReference (Maybe DriveFile)-dirDriveFile- = lens _dirDriveFile (\ s a -> s{_dirDriveFile = a})---- | This field is deprecated; please use the \`driveFolder\` field instead.-dirFolder :: Lens' DriveItemReference (Maybe Folder)-dirFolder- = lens _dirFolder (\ s a -> s{_dirFolder = a})---- | The target Drive item. The format is \"items\/ITEM_ID\".-dirName :: Lens' DriveItemReference (Maybe Text)-dirName = lens _dirName (\ s a -> s{_dirName = a})---- | The Drive item is a folder.-dirDriveFolder :: Lens' DriveItemReference (Maybe DriveFolder)-dirDriveFolder- = lens _dirDriveFolder- (\ s a -> s{_dirDriveFolder = a})---- | The title of the Drive item.-dirTitle :: Lens' DriveItemReference (Maybe Text)-dirTitle = lens _dirTitle (\ s a -> s{_dirTitle = a})---- | This field is deprecated; please use the \`driveFile\` field instead.-dirFile :: Lens' DriveItemReference (Maybe File)-dirFile = lens _dirFile (\ s a -> s{_dirFile = a})--instance FromJSON DriveItemReference where- parseJSON- = withObject "DriveItemReference"- (\ o ->- DriveItemReference' <$>- (o .:? "driveFile") <*> (o .:? "folder") <*>- (o .:? "name")- <*> (o .:? "driveFolder")- <*> (o .:? "title")- <*> (o .:? "file"))--instance ToJSON DriveItemReference where- toJSON DriveItemReference'{..}- = object- (catMaybes- [("driveFile" .=) <$> _dirDriveFile,- ("folder" .=) <$> _dirFolder,- ("name" .=) <$> _dirName,- ("driveFolder" .=) <$> _dirDriveFolder,- ("title" .=) <$> _dirTitle,- ("file" .=) <$> _dirFile])---- | A known user.------ /See:/ 'knownUser' smart constructor.-data KnownUser =- KnownUser'- { _kuPersonName :: !(Maybe Text)- , _kuIsCurrentUser :: !(Maybe Bool)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'KnownUser' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'kuPersonName'------ * 'kuIsCurrentUser'-knownUser- :: KnownUser-knownUser = KnownUser' {_kuPersonName = Nothing, _kuIsCurrentUser = Nothing}----- | The identifier for this user that can be used with the People API to get--- more information. The format is \"people\/ACCOUNT_ID\". See--- https:\/\/developers.google.com\/people\/.-kuPersonName :: Lens' KnownUser (Maybe Text)-kuPersonName- = lens _kuPersonName (\ s a -> s{_kuPersonName = a})---- | True if this is the user making the request.-kuIsCurrentUser :: Lens' KnownUser (Maybe Bool)-kuIsCurrentUser- = lens _kuIsCurrentUser- (\ s a -> s{_kuIsCurrentUser = a})--instance FromJSON KnownUser where- parseJSON- = withObject "KnownUser"- (\ o ->- KnownUser' <$>- (o .:? "personName") <*> (o .:? "isCurrentUser"))--instance ToJSON KnownUser where- toJSON KnownUser'{..}- = object- (catMaybes- [("personName" .=) <$> _kuPersonName,- ("isCurrentUser" .=) <$> _kuIsCurrentUser])---- | A lightweight reference to the target of activity.------ /See:/ 'targetReference' smart constructor.-data TargetReference =- TargetReference'- { _trDrive :: !(Maybe DriveReference)- , _trTeamDrive :: !(Maybe TeamDriveReference)- , _trDriveItem :: !(Maybe DriveItemReference)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'TargetReference' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'trDrive'------ * 'trTeamDrive'------ * 'trDriveItem'-targetReference- :: TargetReference-targetReference =- TargetReference'- {_trDrive = Nothing, _trTeamDrive = Nothing, _trDriveItem = Nothing}----- | The target is a shared drive.-trDrive :: Lens' TargetReference (Maybe DriveReference)-trDrive = lens _trDrive (\ s a -> s{_trDrive = a})---- | This field is deprecated; please use the \`drive\` field instead.-trTeamDrive :: Lens' TargetReference (Maybe TeamDriveReference)-trTeamDrive- = lens _trTeamDrive (\ s a -> s{_trTeamDrive = a})---- | The target is a Drive item.-trDriveItem :: Lens' TargetReference (Maybe DriveItemReference)-trDriveItem- = lens _trDriveItem (\ s a -> s{_trDriveItem = a})--instance FromJSON TargetReference where- parseJSON- = withObject "TargetReference"- (\ o ->- TargetReference' <$>- (o .:? "drive") <*> (o .:? "teamDrive") <*>- (o .:? "driveItem"))--instance ToJSON TargetReference where- toJSON TargetReference'{..}- = object- (catMaybes- [("drive" .=) <$> _trDrive,- ("teamDrive" .=) <$> _trTeamDrive,- ("driveItem" .=) <$> _trDriveItem])---- | An object was created by copying an existing object.------ /See:/ 'copy' smart constructor.-newtype Copy =- Copy'- { _cOriginalObject :: Maybe TargetReference- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Copy' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'cOriginalObject'-copy- :: Copy-copy = Copy' {_cOriginalObject = Nothing}----- | The the original object.-cOriginalObject :: Lens' Copy (Maybe TargetReference)-cOriginalObject- = lens _cOriginalObject- (\ s a -> s{_cOriginalObject = a})--instance FromJSON Copy where- parseJSON- = withObject "Copy"- (\ o -> Copy' <$> (o .:? "originalObject"))--instance ToJSON Copy where- toJSON Copy'{..}- = object- (catMaybes- [("originalObject" .=) <$> _cOriginalObject])---- | A change of the permission setting on an item.------ /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}----- | The set of permissions added by this change.-pcAddedPermissions :: Lens' PermissionChange [Permission]-pcAddedPermissions- = lens _pcAddedPermissions- (\ s a -> s{_pcAddedPermissions = a})- . _Default- . _Coerce---- | The set of permissions removed by this change.-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])---- | Response message for querying Drive activity.------ /See:/ 'queryDriveActivityResponse' smart constructor.-data QueryDriveActivityResponse =- QueryDriveActivityResponse'- { _qdarNextPageToken :: !(Maybe Text)- , _qdarActivities :: !(Maybe [DriveActivity])- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'QueryDriveActivityResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'qdarNextPageToken'------ * 'qdarActivities'-queryDriveActivityResponse- :: QueryDriveActivityResponse-queryDriveActivityResponse =- QueryDriveActivityResponse'- {_qdarNextPageToken = Nothing, _qdarActivities = Nothing}----- | Token to retrieve the next page of results, or empty if there are no--- more results in the list.-qdarNextPageToken :: Lens' QueryDriveActivityResponse (Maybe Text)-qdarNextPageToken- = lens _qdarNextPageToken- (\ s a -> s{_qdarNextPageToken = a})---- | List of activity requested.-qdarActivities :: Lens' QueryDriveActivityResponse [DriveActivity]-qdarActivities- = lens _qdarActivities- (\ s a -> s{_qdarActivities = a})- . _Default- . _Coerce--instance FromJSON QueryDriveActivityResponse where- parseJSON- = withObject "QueryDriveActivityResponse"- (\ o ->- QueryDriveActivityResponse' <$>- (o .:? "nextPageToken") <*>- (o .:? "activities" .!= mempty))--instance ToJSON QueryDriveActivityResponse where- toJSON QueryDriveActivityResponse'{..}- = object- (catMaybes- [("nextPageToken" .=) <$> _qdarNextPageToken,- ("activities" .=) <$> _qdarActivities])---- | A regular posted comment.------ /See:/ 'post' smart constructor.-newtype Post' =- Post''- { _pSubtype :: Maybe PostSubtype- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Post' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'pSubtype'-post- :: Post'-post = Post'' {_pSubtype = Nothing}----- | The sub-type of this event.-pSubtype :: Lens' Post' (Maybe PostSubtype)-pSubtype = lens _pSubtype (\ s a -> s{_pSubtype = a})--instance FromJSON Post' where- parseJSON- = withObject "Post"- (\ o -> Post'' <$> (o .:? "subtype"))--instance ToJSON Post' where- toJSON Post''{..}- = object (catMaybes [("subtype" .=) <$> _pSubtype])---- | A deleted object was restored.------ /See:/ 'restore' smart constructor.-newtype Restore =- Restore'- { _rType :: Maybe RestoreType- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Restore' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'rType'-restore- :: Restore-restore = Restore' {_rType = Nothing}----- | The type of restore action taken.-rType :: Lens' Restore (Maybe RestoreType)-rType = lens _rType (\ s a -> s{_rType = a})--instance FromJSON Restore where- parseJSON- = withObject "Restore"- (\ o -> Restore' <$> (o .:? "type"))--instance ToJSON Restore where- toJSON Restore'{..}- = object (catMaybes [("type" .=) <$> _rType])---- | Information about a domain.------ /See:/ 'domain' smart constructor.-data Domain =- Domain'- { _domLegacyId :: !(Maybe Text)- , _domName :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Domain' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'domLegacyId'------ * 'domName'-domain- :: Domain-domain = Domain' {_domLegacyId = Nothing, _domName = Nothing}----- | An opaque string used to identify this domain.-domLegacyId :: Lens' Domain (Maybe Text)-domLegacyId- = lens _domLegacyId (\ s a -> s{_domLegacyId = a})---- | The name of the domain, e.g. \"google.com\".-domName :: Lens' Domain (Maybe Text)-domName = lens _domName (\ s a -> s{_domName = a})--instance FromJSON Domain where- parseJSON- = withObject "Domain"- (\ o ->- Domain' <$> (o .:? "legacyId") <*> (o .:? "name"))--instance ToJSON Domain where- toJSON Domain'{..}- = object- (catMaybes- [("legacyId" .=) <$> _domLegacyId,- ("name" .=) <$> _domName])---- | Empty message representing an administrator.------ /See:/ 'administrator' smart constructor.-data Administrator =- Administrator'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Administrator' with the minimum fields required to make a request.----administrator- :: Administrator-administrator = Administrator'---instance FromJSON Administrator where- parseJSON- = withObject "Administrator"- (\ o -> pure Administrator')--instance ToJSON Administrator where- toJSON = const emptyObject---- | A change in the object\'s data leak prevention status.------ /See:/ 'dataLeakPreventionChange' smart constructor.-newtype DataLeakPreventionChange =- DataLeakPreventionChange'- { _dlpcType :: Maybe DataLeakPreventionChangeType- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'DataLeakPreventionChange' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'dlpcType'-dataLeakPreventionChange- :: DataLeakPreventionChange-dataLeakPreventionChange = DataLeakPreventionChange' {_dlpcType = Nothing}----- | The type of Data Leak Prevention (DLP) change.-dlpcType :: Lens' DataLeakPreventionChange (Maybe DataLeakPreventionChangeType)-dlpcType = lens _dlpcType (\ s a -> s{_dlpcType = a})--instance FromJSON DataLeakPreventionChange where- parseJSON- = withObject "DataLeakPreventionChange"- (\ o -> DataLeakPreventionChange' <$> (o .:? "type"))--instance ToJSON DataLeakPreventionChange where- toJSON DataLeakPreventionChange'{..}- = object (catMaybes [("type" .=) <$> _dlpcType])---- | The actor of a Drive activity.------ /See:/ 'actor' smart constructor.-data Actor =- Actor'- { _aImpersonation :: !(Maybe Impersonation)- , _aSystem :: !(Maybe SystemEvent)- , _aAdministrator :: !(Maybe Administrator)- , _aUser :: !(Maybe User)- , _aAnonymous :: !(Maybe AnonymousUser)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Actor' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'aImpersonation'------ * 'aSystem'------ * 'aAdministrator'------ * 'aUser'------ * 'aAnonymous'-actor- :: Actor-actor =- Actor'- { _aImpersonation = Nothing- , _aSystem = Nothing- , _aAdministrator = Nothing- , _aUser = Nothing- , _aAnonymous = Nothing- }----- | An account acting on behalf of another.-aImpersonation :: Lens' Actor (Maybe Impersonation)-aImpersonation- = lens _aImpersonation- (\ s a -> s{_aImpersonation = a})---- | A non-user actor (i.e. system triggered).-aSystem :: Lens' Actor (Maybe SystemEvent)-aSystem = lens _aSystem (\ s a -> s{_aSystem = a})---- | An administrator.-aAdministrator :: Lens' Actor (Maybe Administrator)-aAdministrator- = lens _aAdministrator- (\ s a -> s{_aAdministrator = a})---- | An end user.-aUser :: Lens' Actor (Maybe User)-aUser = lens _aUser (\ s a -> s{_aUser = a})---- | An anonymous user.-aAnonymous :: Lens' Actor (Maybe AnonymousUser)-aAnonymous- = lens _aAnonymous (\ s a -> s{_aAnonymous = a})--instance FromJSON Actor where- parseJSON- = withObject "Actor"- (\ o ->- Actor' <$>- (o .:? "impersonation") <*> (o .:? "system") <*>- (o .:? "administrator")- <*> (o .:? "user")- <*> (o .:? "anonymous"))--instance ToJSON Actor where- toJSON Actor'{..}- = object- (catMaybes- [("impersonation" .=) <$> _aImpersonation,- ("system" .=) <$> _aSystem,- ("administrator" .=) <$> _aAdministrator,- ("user" .=) <$> _aUser,- ("anonymous" .=) <$> _aAnonymous])---- | This item is deprecated; please see \`DriveFolder\` instead.------ /See:/ 'folder' smart constructor.-newtype Folder =- Folder'- { _fType :: Maybe FolderType- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Folder' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'fType'-folder- :: Folder-folder = Folder' {_fType = Nothing}----- | This field is deprecated; please see \`DriveFolder.type\` instead.-fType :: Lens' Folder (Maybe FolderType)-fType = lens _fType (\ s a -> s{_fType = a})--instance FromJSON Folder where- parseJSON- = withObject "Folder"- (\ o -> Folder' <$> (o .:? "type"))--instance ToJSON Folder where- toJSON Folder'{..}- = object (catMaybes [("type" .=) <$> _fType])---- | Information about the action.------ /See:/ 'action' smart constructor.-data Action =- Action'- { _aTimeRange :: !(Maybe TimeRange)- , _aActor :: !(Maybe Actor)- , _aTimestamp :: !(Maybe DateTime')- , _aTarget :: !(Maybe Target)- , _aDetail :: !(Maybe ActionDetail)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Action' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'aTimeRange'------ * 'aActor'------ * 'aTimestamp'------ * 'aTarget'------ * 'aDetail'-action- :: Action-action =- Action'- { _aTimeRange = Nothing- , _aActor = Nothing- , _aTimestamp = Nothing- , _aTarget = Nothing- , _aDetail = Nothing- }----- | The action occurred over this time range.-aTimeRange :: Lens' Action (Maybe TimeRange)-aTimeRange- = lens _aTimeRange (\ s a -> s{_aTimeRange = a})---- | The actor responsible for this action (or empty if all actors are--- responsible).-aActor :: Lens' Action (Maybe Actor)-aActor = lens _aActor (\ s a -> s{_aActor = a})---- | The action occurred at this specific time.-aTimestamp :: Lens' Action (Maybe UTCTime)-aTimestamp- = lens _aTimestamp (\ s a -> s{_aTimestamp = a}) .- mapping _DateTime---- | The target this action affects (or empty if affecting all targets). This--- represents the state of the target immediately after this action--- occurred.-aTarget :: Lens' Action (Maybe Target)-aTarget = lens _aTarget (\ s a -> s{_aTarget = a})---- | The type and detailed information about the action.-aDetail :: Lens' Action (Maybe ActionDetail)-aDetail = lens _aDetail (\ s a -> s{_aDetail = a})--instance FromJSON Action where- parseJSON- = withObject "Action"- (\ o ->- Action' <$>- (o .:? "timeRange") <*> (o .:? "actor") <*>- (o .:? "timestamp")- <*> (o .:? "target")- <*> (o .:? "detail"))--instance ToJSON Action where- toJSON Action'{..}- = object- (catMaybes- [("timeRange" .=) <$> _aTimeRange,- ("actor" .=) <$> _aActor,- ("timestamp" .=) <$> _aTimestamp,- ("target" .=) <$> _aTarget,- ("detail" .=) <$> _aDetail])---- | This item is deprecated; please see \`Drive\` instead.------ /See:/ 'teamDrive' smart constructor.-data TeamDrive =- TeamDrive'- { _tdRoot :: !(Maybe DriveItem)- , _tdName :: !(Maybe Text)- , _tdTitle :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'TeamDrive' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'tdRoot'------ * 'tdName'------ * 'tdTitle'-teamDrive- :: TeamDrive-teamDrive =- TeamDrive' {_tdRoot = Nothing, _tdName = Nothing, _tdTitle = Nothing}----- | This field is deprecated; please see \`Drive.root\` instead.-tdRoot :: Lens' TeamDrive (Maybe DriveItem)-tdRoot = lens _tdRoot (\ s a -> s{_tdRoot = a})---- | This field is deprecated; please see \`Drive.name\` instead.-tdName :: Lens' TeamDrive (Maybe Text)-tdName = lens _tdName (\ s a -> s{_tdName = a})---- | This field is deprecated; please see \`Drive.title\` instead.-tdTitle :: Lens' TeamDrive (Maybe Text)-tdTitle = lens _tdTitle (\ s a -> s{_tdTitle = a})--instance FromJSON TeamDrive where- parseJSON- = withObject "TeamDrive"- (\ o ->- TeamDrive' <$>- (o .:? "root") <*> (o .:? "name") <*>- (o .:? "title"))--instance ToJSON TeamDrive where- toJSON TeamDrive'{..}- = object- (catMaybes- [("root" .=) <$> _tdRoot, ("name" .=) <$> _tdName,- ("title" .=) <$> _tdTitle])---- | A user about whom nothing is currently known.------ /See:/ 'unknownUser' smart constructor.-data UnknownUser =- UnknownUser'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'UnknownUser' with the minimum fields required to make a request.----unknownUser- :: UnknownUser-unknownUser = UnknownUser'---instance FromJSON UnknownUser where- parseJSON- = withObject "UnknownUser" (\ o -> pure UnknownUser')--instance ToJSON UnknownUser where- toJSON = const emptyObject---- | Information about the owner of a Drive item.------ /See:/ 'owner' smart constructor.-data Owner =- Owner'- { _oDrive :: !(Maybe DriveReference)- , _oDomain :: !(Maybe Domain)- , _oTeamDrive :: !(Maybe TeamDriveReference)- , _oUser :: !(Maybe User)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Owner' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'oDrive'------ * 'oDomain'------ * 'oTeamDrive'------ * 'oUser'-owner- :: Owner-owner =- Owner'- { _oDrive = Nothing- , _oDomain = Nothing- , _oTeamDrive = Nothing- , _oUser = Nothing- }----- | The drive that owns the item.-oDrive :: Lens' Owner (Maybe DriveReference)-oDrive = lens _oDrive (\ s a -> s{_oDrive = a})---- | The domain of the Drive item owner.-oDomain :: Lens' Owner (Maybe Domain)-oDomain = lens _oDomain (\ s a -> s{_oDomain = a})---- | This field is deprecated; please use the \`drive\` field instead.-oTeamDrive :: Lens' Owner (Maybe TeamDriveReference)-oTeamDrive- = lens _oTeamDrive (\ s a -> s{_oTeamDrive = a})---- | The user that owns the Drive item.-oUser :: Lens' Owner (Maybe User)-oUser = lens _oUser (\ s a -> s{_oUser = a})--instance FromJSON Owner where- parseJSON- = withObject "Owner"- (\ o ->- Owner' <$>- (o .:? "drive") <*> (o .:? "domain") <*>- (o .:? "teamDrive")- <*> (o .:? "user"))--instance ToJSON Owner where- toJSON Owner'{..}- = object- (catMaybes- [("drive" .=) <$> _oDrive,- ("domain" .=) <$> _oDomain,- ("teamDrive" .=) <$> _oTeamDrive,- ("user" .=) <$> _oUser])---- | Activity in applications other than Drive.------ /See:/ 'applicationReference' smart constructor.-newtype ApplicationReference =- ApplicationReference'- { _arType :: Maybe ApplicationReferenceType- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'ApplicationReference' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'arType'-applicationReference- :: ApplicationReference-applicationReference = ApplicationReference' {_arType = Nothing}----- | The reference type corresponding to this event.-arType :: Lens' ApplicationReference (Maybe ApplicationReferenceType)-arType = lens _arType (\ s a -> s{_arType = a})--instance FromJSON ApplicationReference where- parseJSON- = withObject "ApplicationReference"- (\ o -> ApplicationReference' <$> (o .:? "type"))--instance ToJSON ApplicationReference where- toJSON ApplicationReference'{..}- = object (catMaybes [("type" .=) <$> _arType])---- | How the individual activities are consolidated. A set of activities may--- be consolidated into one combined activity if they are related in some--- way, such as one actor performing the same action on multiple targets,--- or multiple actors performing the same action on a single target. The--- strategy defines the rules for which activities are related.------ /See:/ 'consolidationStrategy' smart constructor.-data ConsolidationStrategy =- ConsolidationStrategy'- { _csNone :: !(Maybe NoConsolidation)- , _csLegacy :: !(Maybe Legacy)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'ConsolidationStrategy' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'csNone'------ * 'csLegacy'-consolidationStrategy- :: ConsolidationStrategy-consolidationStrategy =- ConsolidationStrategy' {_csNone = Nothing, _csLegacy = Nothing}----- | The individual activities are not consolidated.-csNone :: Lens' ConsolidationStrategy (Maybe NoConsolidation)-csNone = lens _csNone (\ s a -> s{_csNone = a})---- | The individual activities are consolidated using the legacy strategy.-csLegacy :: Lens' ConsolidationStrategy (Maybe Legacy)-csLegacy = lens _csLegacy (\ s a -> s{_csLegacy = a})--instance FromJSON ConsolidationStrategy where- parseJSON- = withObject "ConsolidationStrategy"- (\ o ->- ConsolidationStrategy' <$>- (o .:? "none") <*> (o .:? "legacy"))--instance ToJSON ConsolidationStrategy where- toJSON ConsolidationStrategy'{..}- = object- (catMaybes- [("none" .=) <$> _csNone,- ("legacy" .=) <$> _csLegacy])---- | Information about an end user.------ /See:/ 'user' smart constructor.-data User =- User'- { _uKnownUser :: !(Maybe KnownUser)- , _uUnknownUser :: !(Maybe UnknownUser)- , _uDeletedUser :: !(Maybe DeletedUser)- }- 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:------ * 'uKnownUser'------ * 'uUnknownUser'------ * 'uDeletedUser'-user- :: User-user =- User'- {_uKnownUser = Nothing, _uUnknownUser = Nothing, _uDeletedUser = Nothing}----- | A known user.-uKnownUser :: Lens' User (Maybe KnownUser)-uKnownUser- = lens _uKnownUser (\ s a -> s{_uKnownUser = a})---- | A user about whom nothing is currently known.-uUnknownUser :: Lens' User (Maybe UnknownUser)-uUnknownUser- = lens _uUnknownUser (\ s a -> s{_uUnknownUser = a})---- | A user whose account has since been deleted.-uDeletedUser :: Lens' User (Maybe DeletedUser)-uDeletedUser- = lens _uDeletedUser (\ s a -> s{_uDeletedUser = a})--instance FromJSON User where- parseJSON- = withObject "User"- (\ o ->- User' <$>- (o .:? "knownUser") <*> (o .:? "unknownUser") <*>- (o .:? "deletedUser"))--instance ToJSON User where- toJSON User'{..}- = object- (catMaybes- [("knownUser" .=) <$> _uKnownUser,- ("unknownUser" .=) <$> _uUnknownUser,- ("deletedUser" .=) <$> _uDeletedUser])---- | A user whose account has since been deleted.------ /See:/ 'deletedUser' smart constructor.-data DeletedUser =- DeletedUser'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'DeletedUser' with the minimum fields required to make a request.----deletedUser- :: DeletedUser-deletedUser = DeletedUser'---instance FromJSON DeletedUser where- parseJSON- = withObject "DeletedUser" (\ o -> pure DeletedUser')--instance ToJSON DeletedUser where- toJSON = const emptyObject---- | An object was created.------ /See:/ 'create' smart constructor.-data Create =- Create'- { _cCopy :: !(Maybe Copy)- , _cNew :: !(Maybe New)- , _cUpload :: !(Maybe Upload)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Create' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'cCopy'------ * 'cNew'------ * 'cUpload'-create- :: Create-create = Create' {_cCopy = Nothing, _cNew = Nothing, _cUpload = Nothing}----- | If present, indicates the object was created by copying an existing--- Drive object.-cCopy :: Lens' Create (Maybe Copy)-cCopy = lens _cCopy (\ s a -> s{_cCopy = a})---- | If present, indicates the object was newly created (e.g. as a blank--- document), not derived from a Drive object or external object.-cNew :: Lens' Create (Maybe New)-cNew = lens _cNew (\ s a -> s{_cNew = a})---- | If present, indicates the object originated externally and was uploaded--- to Drive.-cUpload :: Lens' Create (Maybe Upload)-cUpload = lens _cUpload (\ s a -> s{_cUpload = a})--instance FromJSON Create where- parseJSON- = withObject "Create"- (\ o ->- Create' <$>- (o .:? "copy") <*> (o .:? "new") <*>- (o .:? "upload"))--instance ToJSON Create where- toJSON Create'{..}- = object- (catMaybes- [("copy" .=) <$> _cCopy, ("new" .=) <$> _cNew,- ("upload" .=) <$> _cUpload])---- | An object was created from scratch.------ /See:/ 'new' smart constructor.-data New =- New'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'New' with the minimum fields required to make a request.----new- :: New-new = New'---instance FromJSON New where- parseJSON = withObject "New" (\ o -> pure New')--instance ToJSON New where- toJSON = const emptyObject---- | This item is deprecated; please see \`DriveReference\` instead.------ /See:/ 'teamDriveReference' smart constructor.-data TeamDriveReference =- TeamDriveReference'- { _tdrName :: !(Maybe Text)- , _tdrTitle :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'TeamDriveReference' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'tdrName'------ * 'tdrTitle'-teamDriveReference- :: TeamDriveReference-teamDriveReference =- TeamDriveReference' {_tdrName = Nothing, _tdrTitle = Nothing}----- | This field is deprecated; please see \`DriveReference.name\` instead.-tdrName :: Lens' TeamDriveReference (Maybe Text)-tdrName = lens _tdrName (\ s a -> s{_tdrName = a})---- | This field is deprecated; please see \`DriveReference.title\` instead.-tdrTitle :: Lens' TeamDriveReference (Maybe Text)-tdrTitle = lens _tdrTitle (\ s a -> s{_tdrTitle = a})--instance FromJSON TeamDriveReference where- parseJSON- = withObject "TeamDriveReference"- (\ o ->- TeamDriveReference' <$>- (o .:? "name") <*> (o .:? "title"))--instance ToJSON TeamDriveReference where- toJSON TeamDriveReference'{..}- = object- (catMaybes- [("name" .=) <$> _tdrName,- ("title" .=) <$> _tdrTitle])---- | Empty message representing an anonymous user or indicating the--- authenticated user should be anonymized.------ /See:/ 'anonymousUser' smart constructor.-data AnonymousUser =- AnonymousUser'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'AnonymousUser' with the minimum fields required to make a request.----anonymousUser- :: AnonymousUser-anonymousUser = AnonymousUser'---instance FromJSON AnonymousUser where- parseJSON- = withObject "AnonymousUser"- (\ o -> pure AnonymousUser')--instance ToJSON AnonymousUser where- toJSON = const emptyObject---- | A Drive item which is a folder.------ /See:/ 'driveFolder' smart constructor.-newtype DriveFolder =- DriveFolder'- { _dfType :: Maybe DriveFolderType- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'DriveFolder' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'dfType'-driveFolder- :: DriveFolder-driveFolder = DriveFolder' {_dfType = Nothing}----- | The type of Drive folder.-dfType :: Lens' DriveFolder (Maybe DriveFolderType)-dfType = lens _dfType (\ s a -> s{_dfType = a})--instance FromJSON DriveFolder where- parseJSON- = withObject "DriveFolder"- (\ o -> DriveFolder' <$> (o .:? "type"))--instance ToJSON DriveFolder where- toJSON DriveFolder'{..}- = object (catMaybes [("type" .=) <$> _dfType])---- | Represents any user (including a logged out user).------ /See:/ 'anyone' smart constructor.-data Anyone =- Anyone'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Anyone' with the minimum fields required to make a request.----anyone- :: Anyone-anyone = Anyone'---instance FromJSON Anyone where- parseJSON = withObject "Anyone" (\ o -> pure Anyone')--instance ToJSON Anyone where- toJSON = const emptyObject---- | Information about restriction policy changes to a feature.------ /See:/ 'restrictionChange' smart constructor.-data RestrictionChange =- RestrictionChange'- { _rcFeature :: !(Maybe RestrictionChangeFeature)- , _rcNewRestriction :: !(Maybe RestrictionChangeNewRestriction)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'RestrictionChange' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'rcFeature'------ * 'rcNewRestriction'-restrictionChange- :: RestrictionChange-restrictionChange =- RestrictionChange' {_rcFeature = Nothing, _rcNewRestriction = Nothing}----- | The feature which had a change in restriction policy.-rcFeature :: Lens' RestrictionChange (Maybe RestrictionChangeFeature)-rcFeature- = lens _rcFeature (\ s a -> s{_rcFeature = a})---- | The restriction in place after the change.-rcNewRestriction :: Lens' RestrictionChange (Maybe RestrictionChangeNewRestriction)-rcNewRestriction- = lens _rcNewRestriction- (\ s a -> s{_rcNewRestriction = a})--instance FromJSON RestrictionChange where- parseJSON- = withObject "RestrictionChange"- (\ o ->- RestrictionChange' <$>- (o .:? "feature") <*> (o .:? "newRestriction"))--instance ToJSON RestrictionChange where- toJSON RestrictionChange'{..}- = object- (catMaybes- [("feature" .=) <$> _rcFeature,- ("newRestriction" .=) <$> _rcNewRestriction])---- | A strategy which consolidates activities using the grouping rules from--- the legacy V1 Activity API. Similar actions occurring within a window of--- time can be grouped across multiple targets (such as moving a set of--- files at once) or multiple actors (such as several users editing the--- same item). Grouping rules for this strategy are specific to each type--- of action.------ /See:/ 'legacy' smart constructor.-data Legacy =- Legacy'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Legacy' with the minimum fields required to make a request.----legacy- :: Legacy-legacy = Legacy'---instance FromJSON Legacy where- parseJSON = withObject "Legacy" (\ o -> pure Legacy')--instance ToJSON Legacy where- toJSON = const emptyObject---- | A comment on a file.------ /See:/ 'fileComment' smart constructor.-data FileComment =- FileComment'- { _fcParent :: !(Maybe DriveItem)- , _fcLegacyDiscussionId :: !(Maybe Text)- , _fcLegacyCommentId :: !(Maybe Text)- , _fcLinkToDiscussion :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'FileComment' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'fcParent'------ * 'fcLegacyDiscussionId'------ * 'fcLegacyCommentId'------ * 'fcLinkToDiscussion'-fileComment- :: FileComment-fileComment =- FileComment'- { _fcParent = Nothing- , _fcLegacyDiscussionId = Nothing- , _fcLegacyCommentId = Nothing- , _fcLinkToDiscussion = Nothing- }----- | The Drive item containing this comment.-fcParent :: Lens' FileComment (Maybe DriveItem)-fcParent = lens _fcParent (\ s a -> s{_fcParent = a})---- | The discussion thread to which the comment was added. This identifier is--- an opaque string compatible with the Drive API and references the first--- comment in a discussion; see--- https:\/\/developers.google.com\/drive\/v3\/reference\/comments\/get-fcLegacyDiscussionId :: Lens' FileComment (Maybe Text)-fcLegacyDiscussionId- = lens _fcLegacyDiscussionId- (\ s a -> s{_fcLegacyDiscussionId = a})---- | The comment in the discussion thread. This identifier is an opaque--- string compatible with the Drive API; see--- https:\/\/developers.google.com\/drive\/v3\/reference\/comments\/get-fcLegacyCommentId :: Lens' FileComment (Maybe Text)-fcLegacyCommentId- = lens _fcLegacyCommentId- (\ s a -> s{_fcLegacyCommentId = a})---- | The link to the discussion thread containing this comment, for example,--- \"https:\/\/docs.google.com\/DOCUMENT_ID\/edit?disco=THREAD_ID\".-fcLinkToDiscussion :: Lens' FileComment (Maybe Text)-fcLinkToDiscussion- = lens _fcLinkToDiscussion- (\ s a -> s{_fcLinkToDiscussion = a})--instance FromJSON FileComment where- parseJSON- = withObject "FileComment"- (\ o ->- FileComment' <$>- (o .:? "parent") <*> (o .:? "legacyDiscussionId") <*>- (o .:? "legacyCommentId")- <*> (o .:? "linkToDiscussion"))--instance ToJSON FileComment where- toJSON FileComment'{..}- = object- (catMaybes- [("parent" .=) <$> _fcParent,- ("legacyDiscussionId" .=) <$> _fcLegacyDiscussionId,- ("legacyCommentId" .=) <$> _fcLegacyCommentId,- ("linkToDiscussion" .=) <$> _fcLinkToDiscussion])---- | An object was renamed.------ /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 of the drive object.-rNewTitle :: Lens' Rename (Maybe Text)-rNewTitle- = lens _rNewTitle (\ s a -> s{_rNewTitle = a})---- | The previous title of the drive object.-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])---- | An object was uploaded into Drive.------ /See:/ 'upload' smart constructor.-data Upload =- Upload'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Upload' with the minimum fields required to make a request.----upload- :: Upload-upload = Upload'---instance FromJSON Upload where- parseJSON = withObject "Upload" (\ o -> pure Upload')--instance ToJSON Upload where- toJSON = const emptyObject---- | A strategy which does no consolidation of individual activities.------ /See:/ 'noConsolidation' smart constructor.-data NoConsolidation =- NoConsolidation'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'NoConsolidation' with the minimum fields required to make a request.----noConsolidation- :: NoConsolidation-noConsolidation = NoConsolidation'---instance FromJSON NoConsolidation where- parseJSON- = withObject "NoConsolidation"- (\ o -> pure NoConsolidation')--instance ToJSON NoConsolidation where- toJSON = const emptyObject---- | A comment with an assignment.------ /See:/ 'assignment' smart constructor.-newtype Assignment =- Assignment'- { _aSubtype :: Maybe AssignmentSubtype- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Assignment' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'aSubtype'-assignment- :: Assignment-assignment = Assignment' {_aSubtype = Nothing}----- | The sub-type of this event.-aSubtype :: Lens' Assignment (Maybe AssignmentSubtype)-aSubtype = lens _aSubtype (\ s a -> s{_aSubtype = a})--instance FromJSON Assignment where- parseJSON- = withObject "Assignment"- (\ o -> Assignment' <$> (o .:? "subtype"))--instance ToJSON Assignment where- toJSON Assignment'{..}- = object (catMaybes [("subtype" .=) <$> _aSubtype])---- | Information about settings changes.------ /See:/ 'settingsChange' smart constructor.-newtype SettingsChange =- SettingsChange'- { _scRestrictionChanges :: Maybe [RestrictionChange]- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'SettingsChange' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'scRestrictionChanges'-settingsChange- :: SettingsChange-settingsChange = SettingsChange' {_scRestrictionChanges = Nothing}----- | The set of changes made to restrictions.-scRestrictionChanges :: Lens' SettingsChange [RestrictionChange]-scRestrictionChanges- = lens _scRestrictionChanges- (\ s a -> s{_scRestrictionChanges = a})- . _Default- . _Coerce--instance FromJSON SettingsChange where- parseJSON- = withObject "SettingsChange"- (\ o ->- SettingsChange' <$>- (o .:? "restrictionChanges" .!= mempty))--instance ToJSON SettingsChange where- toJSON SettingsChange'{..}- = object- (catMaybes- [("restrictionChanges" .=) <$>- _scRestrictionChanges])---- | A change about comments on an object.------ /See:/ 'comment' smart constructor.-data Comment =- Comment'- { _cSuggestion :: !(Maybe Suggestion)- , _cPost :: !(Maybe Post')- , _cMentionedUsers :: !(Maybe [User])- , _cAssignment :: !(Maybe Assignment)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Comment' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'cSuggestion'------ * 'cPost'------ * 'cMentionedUsers'------ * 'cAssignment'-comment- :: Comment-comment =- Comment'- { _cSuggestion = Nothing- , _cPost = Nothing- , _cMentionedUsers = Nothing- , _cAssignment = Nothing- }----- | A change on a suggestion.-cSuggestion :: Lens' Comment (Maybe Suggestion)-cSuggestion- = lens _cSuggestion (\ s a -> s{_cSuggestion = a})---- | A change on a regular posted comment.-cPost :: Lens' Comment (Maybe Post')-cPost = lens _cPost (\ s a -> s{_cPost = a})---- | Users who are mentioned in this comment.-cMentionedUsers :: Lens' Comment [User]-cMentionedUsers- = lens _cMentionedUsers- (\ s a -> s{_cMentionedUsers = a})- . _Default- . _Coerce---- | A change on an assignment.-cAssignment :: Lens' Comment (Maybe Assignment)-cAssignment- = lens _cAssignment (\ s a -> s{_cAssignment = a})--instance FromJSON Comment where- parseJSON- = withObject "Comment"- (\ o ->- Comment' <$>- (o .:? "suggestion") <*> (o .:? "post") <*>- (o .:? "mentionedUsers" .!= mempty)- <*> (o .:? "assignment"))--instance ToJSON Comment where- toJSON Comment'{..}- = object- (catMaybes- [("suggestion" .=) <$> _cSuggestion,- ("post" .=) <$> _cPost,- ("mentionedUsers" .=) <$> _cMentionedUsers,- ("assignment" .=) <$> _cAssignment])---- | The permission setting of an object.------ /See:/ 'permission' smart constructor.-data Permission =- Permission'- { _pGroup :: !(Maybe Group)- , _pDomain :: !(Maybe Domain)- , _pUser :: !(Maybe User)- , _pRole :: !(Maybe PermissionRole)- , _pAnyone :: !(Maybe Anyone)- , _pAllowDiscovery :: !(Maybe Bool)- }- 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:------ * 'pGroup'------ * 'pDomain'------ * 'pUser'------ * 'pRole'------ * 'pAnyone'------ * 'pAllowDiscovery'-permission- :: Permission-permission =- Permission'- { _pGroup = Nothing- , _pDomain = Nothing- , _pUser = Nothing- , _pRole = Nothing- , _pAnyone = Nothing- , _pAllowDiscovery = Nothing- }----- | The group to whom this permission applies.-pGroup :: Lens' Permission (Maybe Group)-pGroup = lens _pGroup (\ s a -> s{_pGroup = a})---- | The domain to whom this permission applies.-pDomain :: Lens' Permission (Maybe Domain)-pDomain = lens _pDomain (\ s a -> s{_pDomain = a})---- | The user to whom this permission applies.-pUser :: Lens' Permission (Maybe User)-pUser = lens _pUser (\ s a -> s{_pUser = a})---- | Indicates the--- </drive/web/manage-sharing#roles Google Drive permissions role>. The--- role determines a user\'s ability to read, write, and comment on items.-pRole :: Lens' Permission (Maybe PermissionRole)-pRole = lens _pRole (\ s a -> s{_pRole = a})---- | If set, this permission applies to anyone, even logged out users.-pAnyone :: Lens' Permission (Maybe Anyone)-pAnyone = lens _pAnyone (\ s a -> s{_pAnyone = a})---- | If true, the item can be discovered (e.g. in the user\'s \"Shared with--- me\" collection) without needing a link to the item.-pAllowDiscovery :: Lens' Permission (Maybe Bool)-pAllowDiscovery- = lens _pAllowDiscovery- (\ s a -> s{_pAllowDiscovery = a})--instance FromJSON Permission where- parseJSON- = withObject "Permission"- (\ o ->- Permission' <$>- (o .:? "group") <*> (o .:? "domain") <*>- (o .:? "user")- <*> (o .:? "role")- <*> (o .:? "anyone")- <*> (o .:? "allowDiscovery"))--instance ToJSON Permission where- toJSON Permission'{..}- = object- (catMaybes- [("group" .=) <$> _pGroup,- ("domain" .=) <$> _pDomain, ("user" .=) <$> _pUser,- ("role" .=) <$> _pRole, ("anyone" .=) <$> _pAnyone,- ("allowDiscovery" .=) <$> _pAllowDiscovery])---- | This item is deprecated; please see \`DriveFile\` instead.------ /See:/ 'file' smart constructor.-data File =- File'- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'File' with the minimum fields required to make a request.----file- :: File-file = File'---instance FromJSON File where- parseJSON = withObject "File" (\ o -> pure File')--instance ToJSON File where- toJSON = const emptyObject---- | An object was deleted.------ /See:/ 'delete'' smart constructor.-newtype Delete' =- Delete''- { _dType :: Maybe DeleteType- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Delete' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'dType'-delete'- :: Delete'-delete' = Delete'' {_dType = Nothing}----- | The type of delete action taken.-dType :: Lens' Delete' (Maybe DeleteType)-dType = lens _dType (\ s a -> s{_dType = a})--instance FromJSON Delete' where- parseJSON- = withObject "Delete"- (\ o -> Delete'' <$> (o .:? "type"))--instance ToJSON Delete' where- toJSON Delete''{..}- = object (catMaybes [("type" .=) <$> _dType])---- | Information about the target of activity.------ /See:/ 'target' smart constructor.-data Target =- Target'- { _tDrive :: !(Maybe Drive)- , _tTeamDrive :: !(Maybe TeamDrive)- , _tFileComment :: !(Maybe FileComment)- , _tDriveItem :: !(Maybe DriveItem)- }- 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:------ * 'tDrive'------ * 'tTeamDrive'------ * 'tFileComment'------ * 'tDriveItem'-target- :: Target-target =- Target'- { _tDrive = Nothing- , _tTeamDrive = Nothing- , _tFileComment = Nothing- , _tDriveItem = Nothing- }----- | The target is a shared drive.-tDrive :: Lens' Target (Maybe Drive)-tDrive = lens _tDrive (\ s a -> s{_tDrive = a})---- | This field is deprecated; please use the \`drive\` field instead.-tTeamDrive :: Lens' Target (Maybe TeamDrive)-tTeamDrive- = lens _tTeamDrive (\ s a -> s{_tTeamDrive = a})---- | The target is a comment on a Drive file.-tFileComment :: Lens' Target (Maybe FileComment)-tFileComment- = lens _tFileComment (\ s a -> s{_tFileComment = a})---- | The target is a Drive item.-tDriveItem :: Lens' Target (Maybe DriveItem)-tDriveItem- = lens _tDriveItem (\ s a -> s{_tDriveItem = a})--instance FromJSON Target where- parseJSON- = withObject "Target"- (\ o ->- Target' <$>- (o .:? "drive") <*> (o .:? "teamDrive") <*>- (o .:? "fileComment")- <*> (o .:? "driveItem"))--instance ToJSON Target where- toJSON Target'{..}- = object- (catMaybes- [("drive" .=) <$> _tDrive,- ("teamDrive" .=) <$> _tTeamDrive,- ("fileComment" .=) <$> _tFileComment,- ("driveItem" .=) <$> _tDriveItem])---- | An object was moved.------ /See:/ 'move' smart constructor.-data Move =- Move'- { _mAddedParents :: !(Maybe [TargetReference])- , _mRemovedParents :: !(Maybe [TargetReference])- }- 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 object(s).-mAddedParents :: Lens' Move [TargetReference]-mAddedParents- = lens _mAddedParents- (\ s a -> s{_mAddedParents = a})- . _Default- . _Coerce---- | The removed parent object(s).-mRemovedParents :: Lens' Move [TargetReference]-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])---- | A single Drive activity comprising one or more Actions by one or more--- Actors on one or more Targets. Some Action groupings occur--- spontaneously, such as moving an item into a shared folder triggering a--- permission change. Other groupings of related Actions, such as multiple--- Actors editing one item or moving multiple files into a new folder, are--- controlled by the selection of a ConsolidationStrategy in the--- QueryDriveActivityRequest.------ /See:/ 'driveActivity' smart constructor.-data DriveActivity =- DriveActivity'- { _daTimeRange :: !(Maybe TimeRange)- , _daActions :: !(Maybe [Action])- , _daActors :: !(Maybe [Actor])- , _daTargets :: !(Maybe [Target])- , _daPrimaryActionDetail :: !(Maybe ActionDetail)- , _daTimestamp :: !(Maybe DateTime')- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'DriveActivity' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'daTimeRange'------ * 'daActions'------ * 'daActors'------ * 'daTargets'------ * 'daPrimaryActionDetail'------ * 'daTimestamp'-driveActivity- :: DriveActivity-driveActivity =- DriveActivity'- { _daTimeRange = Nothing- , _daActions = Nothing- , _daActors = Nothing- , _daTargets = Nothing- , _daPrimaryActionDetail = Nothing- , _daTimestamp = Nothing- }----- | The activity occurred over this time range.-daTimeRange :: Lens' DriveActivity (Maybe TimeRange)-daTimeRange- = lens _daTimeRange (\ s a -> s{_daTimeRange = a})---- | Details on all actions in this activity.-daActions :: Lens' DriveActivity [Action]-daActions- = lens _daActions (\ s a -> s{_daActions = a}) .- _Default- . _Coerce---- | All actor(s) responsible for the activity.-daActors :: Lens' DriveActivity [Actor]-daActors- = lens _daActors (\ s a -> s{_daActors = a}) .- _Default- . _Coerce---- | All Google Drive objects this activity is about (e.g. file, folder,--- drive). This represents the state of the target immediately after the--- actions occurred.-daTargets :: Lens' DriveActivity [Target]-daTargets- = lens _daTargets (\ s a -> s{_daTargets = a}) .- _Default- . _Coerce---- | Key information about the primary action for this activity. This is--- either representative, or the most important, of all actions in the--- activity, according to the ConsolidationStrategy in the request.-daPrimaryActionDetail :: Lens' DriveActivity (Maybe ActionDetail)-daPrimaryActionDetail- = lens _daPrimaryActionDetail- (\ s a -> s{_daPrimaryActionDetail = a})---- | The activity occurred at this specific time.-daTimestamp :: Lens' DriveActivity (Maybe UTCTime)-daTimestamp- = lens _daTimestamp (\ s a -> s{_daTimestamp = a}) .- mapping _DateTime--instance FromJSON DriveActivity where- parseJSON- = withObject "DriveActivity"- (\ o ->- DriveActivity' <$>- (o .:? "timeRange") <*> (o .:? "actions" .!= mempty)- <*> (o .:? "actors" .!= mempty)- <*> (o .:? "targets" .!= mempty)- <*> (o .:? "primaryActionDetail")- <*> (o .:? "timestamp"))--instance ToJSON DriveActivity where- toJSON DriveActivity'{..}- = object- (catMaybes- [("timeRange" .=) <$> _daTimeRange,- ("actions" .=) <$> _daActions,- ("actors" .=) <$> _daActors,- ("targets" .=) <$> _daTargets,- ("primaryActionDetail" .=) <$>- _daPrimaryActionDetail,- ("timestamp" .=) <$> _daTimestamp])---- | A Drive item, such as a file or folder.------ /See:/ 'driveItem' smart constructor.-data DriveItem =- DriveItem'- { _diDriveFile :: !(Maybe DriveFile)- , _diFolder :: !(Maybe Folder)- , _diOwner :: !(Maybe Owner)- , _diMimeType :: !(Maybe Text)- , _diName :: !(Maybe Text)- , _diDriveFolder :: !(Maybe DriveFolder)- , _diTitle :: !(Maybe Text)- , _diFile :: !(Maybe File)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'DriveItem' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'diDriveFile'------ * 'diFolder'------ * 'diOwner'------ * 'diMimeType'------ * 'diName'------ * 'diDriveFolder'------ * 'diTitle'------ * 'diFile'-driveItem- :: DriveItem-driveItem =- DriveItem'- { _diDriveFile = Nothing- , _diFolder = Nothing- , _diOwner = Nothing- , _diMimeType = Nothing- , _diName = Nothing- , _diDriveFolder = Nothing- , _diTitle = Nothing- , _diFile = Nothing- }----- | The Drive item is a file.-diDriveFile :: Lens' DriveItem (Maybe DriveFile)-diDriveFile- = lens _diDriveFile (\ s a -> s{_diDriveFile = a})---- | This field is deprecated; please use the \`driveFolder\` field instead.-diFolder :: Lens' DriveItem (Maybe Folder)-diFolder = lens _diFolder (\ s a -> s{_diFolder = a})---- | Information about the owner of this Drive item.-diOwner :: Lens' DriveItem (Maybe Owner)-diOwner = lens _diOwner (\ s a -> s{_diOwner = a})---- | The MIME type of the Drive item. See--- https:\/\/developers.google.com\/drive\/v3\/web\/mime-types.-diMimeType :: Lens' DriveItem (Maybe Text)-diMimeType- = lens _diMimeType (\ s a -> s{_diMimeType = a})---- | The target Drive item. The format is \"items\/ITEM_ID\".-diName :: Lens' DriveItem (Maybe Text)-diName = lens _diName (\ s a -> s{_diName = a})---- | The Drive item is a folder.-diDriveFolder :: Lens' DriveItem (Maybe DriveFolder)-diDriveFolder- = lens _diDriveFolder- (\ s a -> s{_diDriveFolder = a})---- | The title of the Drive item.-diTitle :: Lens' DriveItem (Maybe Text)-diTitle = lens _diTitle (\ s a -> s{_diTitle = a})---- | This field is deprecated; please use the \`driveFile\` field instead.-diFile :: Lens' DriveItem (Maybe File)-diFile = lens _diFile (\ s a -> s{_diFile = a})--instance FromJSON DriveItem where- parseJSON- = withObject "DriveItem"- (\ o ->- DriveItem' <$>- (o .:? "driveFile") <*> (o .:? "folder") <*>- (o .:? "owner")- <*> (o .:? "mimeType")- <*> (o .:? "name")- <*> (o .:? "driveFolder")- <*> (o .:? "title")- <*> (o .:? "file"))--instance ToJSON DriveItem where- toJSON DriveItem'{..}- = object- (catMaybes- [("driveFile" .=) <$> _diDriveFile,- ("folder" .=) <$> _diFolder,- ("owner" .=) <$> _diOwner,- ("mimeType" .=) <$> _diMimeType,- ("name" .=) <$> _diName,- ("driveFolder" .=) <$> _diDriveFolder,- ("title" .=) <$> _diTitle, ("file" .=) <$> _diFile])---- | Event triggered by system operations instead of end users.------ /See:/ 'systemEvent' smart constructor.-newtype SystemEvent =- SystemEvent'- { _seType :: Maybe SystemEventType- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'SystemEvent' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'seType'-systemEvent- :: SystemEvent-systemEvent = SystemEvent' {_seType = Nothing}----- | The type of the system event that may triggered activity.-seType :: Lens' SystemEvent (Maybe SystemEventType)-seType = lens _seType (\ s a -> s{_seType = a})--instance FromJSON SystemEvent where- parseJSON- = withObject "SystemEvent"- (\ o -> SystemEvent' <$> (o .:? "type"))--instance ToJSON SystemEvent where- toJSON SystemEvent'{..}- = object (catMaybes [("type" .=) <$> _seType])
− gen/Network/Google/DriveActivity/Types/Sum.hs
@@ -1,614 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module : Network.Google.DriveActivity.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.DriveActivity.Types.Sum where--import Network.Google.Prelude hiding (Bytes)---- | Indicates the--- </drive/web/manage-sharing#roles Google Drive permissions role>. The--- role determines a user\'s ability to read, write, and comment on items.-data PermissionRole- = PRRoleUnspecified- -- ^ @ROLE_UNSPECIFIED@- -- The role is not available.- | PROwner- -- ^ @OWNER@- -- A role granting full access.- | PROrganizer- -- ^ @ORGANIZER@- -- A role granting the ability to manage people and settings.- | PRFileOrganizer- -- ^ @FILE_ORGANIZER@- -- A role granting the ability to contribute and manage content.- | PREditor- -- ^ @EDITOR@- -- A role granting the ability to contribute content. This role is- -- sometimes also known as \"writer\".- | PRCommenter- -- ^ @COMMENTER@- -- A role granting the ability to view and comment on content.- | PRViewer- -- ^ @VIEWER@- -- A role granting the ability to view content. This role is sometimes also- -- known as \"reader\".- | PRPublishedViewer- -- ^ @PUBLISHED_VIEWER@- -- A role granting the ability to view content only after it has been- -- published to the web. This role is sometimes also known as \"published- -- reader\". See https:\/\/support.google.com\/sites\/answer\/6372880 for- -- more information.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable PermissionRole--instance FromHttpApiData PermissionRole where- parseQueryParam = \case- "ROLE_UNSPECIFIED" -> Right PRRoleUnspecified- "OWNER" -> Right PROwner- "ORGANIZER" -> Right PROrganizer- "FILE_ORGANIZER" -> Right PRFileOrganizer- "EDITOR" -> Right PREditor- "COMMENTER" -> Right PRCommenter- "VIEWER" -> Right PRViewer- "PUBLISHED_VIEWER" -> Right PRPublishedViewer- x -> Left ("Unable to parse PermissionRole from: " <> x)--instance ToHttpApiData PermissionRole where- toQueryParam = \case- PRRoleUnspecified -> "ROLE_UNSPECIFIED"- PROwner -> "OWNER"- PROrganizer -> "ORGANIZER"- PRFileOrganizer -> "FILE_ORGANIZER"- PREditor -> "EDITOR"- PRCommenter -> "COMMENTER"- PRViewer -> "VIEWER"- PRPublishedViewer -> "PUBLISHED_VIEWER"--instance FromJSON PermissionRole where- parseJSON = parseJSONText "PermissionRole"--instance ToJSON PermissionRole where- toJSON = toJSONText---- | The restriction in place after the change.-data RestrictionChangeNewRestriction- = RestrictionUnspecified- -- ^ @RESTRICTION_UNSPECIFIED@- -- The type of restriction is not available.- | Unrestricted- -- ^ @UNRESTRICTED@- -- The feature is available without restriction.- | FullyRestricted- -- ^ @FULLY_RESTRICTED@- -- The use of this feature is fully restricted.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable RestrictionChangeNewRestriction--instance FromHttpApiData RestrictionChangeNewRestriction where- parseQueryParam = \case- "RESTRICTION_UNSPECIFIED" -> Right RestrictionUnspecified- "UNRESTRICTED" -> Right Unrestricted- "FULLY_RESTRICTED" -> Right FullyRestricted- x -> Left ("Unable to parse RestrictionChangeNewRestriction from: " <> x)--instance ToHttpApiData RestrictionChangeNewRestriction where- toQueryParam = \case- RestrictionUnspecified -> "RESTRICTION_UNSPECIFIED"- Unrestricted -> "UNRESTRICTED"- FullyRestricted -> "FULLY_RESTRICTED"--instance FromJSON RestrictionChangeNewRestriction where- parseJSON = parseJSONText "RestrictionChangeNewRestriction"--instance ToJSON RestrictionChangeNewRestriction where- toJSON = toJSONText---- | The type of Drive folder.-data DriveFolderType- = TypeUnspecified- -- ^ @TYPE_UNSPECIFIED@- -- The folder type is unknown.- | MyDriveRoot- -- ^ @MY_DRIVE_ROOT@- -- The folder is the root of a user\'s MyDrive.- | SharedDriveRoot- -- ^ @SHARED_DRIVE_ROOT@- -- The folder is the root of a shared drive.- | StandardFolder- -- ^ @STANDARD_FOLDER@- -- The folder is a standard, non-root, folder.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable DriveFolderType--instance FromHttpApiData DriveFolderType where- parseQueryParam = \case- "TYPE_UNSPECIFIED" -> Right TypeUnspecified- "MY_DRIVE_ROOT" -> Right MyDriveRoot- "SHARED_DRIVE_ROOT" -> Right SharedDriveRoot- "STANDARD_FOLDER" -> Right StandardFolder- x -> Left ("Unable to parse DriveFolderType from: " <> x)--instance ToHttpApiData DriveFolderType where- toQueryParam = \case- TypeUnspecified -> "TYPE_UNSPECIFIED"- MyDriveRoot -> "MY_DRIVE_ROOT"- SharedDriveRoot -> "SHARED_DRIVE_ROOT"- StandardFolder -> "STANDARD_FOLDER"--instance FromJSON DriveFolderType where- parseJSON = parseJSONText "DriveFolderType"--instance ToJSON DriveFolderType where- toJSON = toJSONText---- | The feature which had a change in restriction policy.-data RestrictionChangeFeature- = FeatureUnspecified- -- ^ @FEATURE_UNSPECIFIED@- -- The feature which changed restriction settings was not available.- | SharingOutsideDomain- -- ^ @SHARING_OUTSIDE_DOMAIN@- -- When restricted, this prevents items from being shared outside the- -- domain.- | DirectSharing- -- ^ @DIRECT_SHARING@- -- When restricted, this prevents direct sharing of individual items.- | ItemDuplication- -- ^ @ITEM_DUPLICATION@- -- When restricted, this prevents actions like copy, download, and print- -- that might result in uncontrolled duplicates of items.- | DriveFileStream- -- ^ @DRIVE_FILE_STREAM@- -- When restricted, this prevents use of Drive File Stream.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable RestrictionChangeFeature--instance FromHttpApiData RestrictionChangeFeature where- parseQueryParam = \case- "FEATURE_UNSPECIFIED" -> Right FeatureUnspecified- "SHARING_OUTSIDE_DOMAIN" -> Right SharingOutsideDomain- "DIRECT_SHARING" -> Right DirectSharing- "ITEM_DUPLICATION" -> Right ItemDuplication- "DRIVE_FILE_STREAM" -> Right DriveFileStream- x -> Left ("Unable to parse RestrictionChangeFeature from: " <> x)--instance ToHttpApiData RestrictionChangeFeature where- toQueryParam = \case- FeatureUnspecified -> "FEATURE_UNSPECIFIED"- SharingOutsideDomain -> "SHARING_OUTSIDE_DOMAIN"- DirectSharing -> "DIRECT_SHARING"- ItemDuplication -> "ITEM_DUPLICATION"- DriveFileStream -> "DRIVE_FILE_STREAM"--instance FromJSON RestrictionChangeFeature where- parseJSON = parseJSONText "RestrictionChangeFeature"--instance ToJSON RestrictionChangeFeature where- toJSON = toJSONText---- | The type of the system event that may triggered activity.-data SystemEventType- = SETTypeUnspecified- -- ^ @TYPE_UNSPECIFIED@- -- The event type is unspecified.- | SETUserDeletion- -- ^ @USER_DELETION@- -- The event is a consequence of a user account being deleted.- | SETTrashAutoPurge- -- ^ @TRASH_AUTO_PURGE@- -- The event is due to the system automatically purging trash.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable SystemEventType--instance FromHttpApiData SystemEventType where- parseQueryParam = \case- "TYPE_UNSPECIFIED" -> Right SETTypeUnspecified- "USER_DELETION" -> Right SETUserDeletion- "TRASH_AUTO_PURGE" -> Right SETTrashAutoPurge- x -> Left ("Unable to parse SystemEventType from: " <> x)--instance ToHttpApiData SystemEventType where- toQueryParam = \case- SETTypeUnspecified -> "TYPE_UNSPECIFIED"- SETUserDeletion -> "USER_DELETION"- SETTrashAutoPurge -> "TRASH_AUTO_PURGE"--instance FromJSON SystemEventType where- parseJSON = parseJSONText "SystemEventType"--instance ToJSON SystemEventType where- toJSON = toJSONText---- | The type of delete action taken.-data DeleteType- = DTTypeUnspecified- -- ^ @TYPE_UNSPECIFIED@- -- Deletion type is not available.- | DTTrash- -- ^ @TRASH@- -- An object was put into the trash.- | DTPermanentDelete- -- ^ @PERMANENT_DELETE@- -- An object was deleted permanently.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable DeleteType--instance FromHttpApiData DeleteType where- parseQueryParam = \case- "TYPE_UNSPECIFIED" -> Right DTTypeUnspecified- "TRASH" -> Right DTTrash- "PERMANENT_DELETE" -> Right DTPermanentDelete- x -> Left ("Unable to parse DeleteType from: " <> x)--instance ToHttpApiData DeleteType where- toQueryParam = \case- DTTypeUnspecified -> "TYPE_UNSPECIFIED"- DTTrash -> "TRASH"- DTPermanentDelete -> "PERMANENT_DELETE"--instance FromJSON DeleteType where- parseJSON = parseJSONText "DeleteType"--instance ToJSON DeleteType where- toJSON = toJSONText---- | The sub-type of this event.-data PostSubtype- = SubtypeUnspecified- -- ^ @SUBTYPE_UNSPECIFIED@- -- Subtype not available.- | Added- -- ^ @ADDED@- -- A post was added.- | Deleted- -- ^ @DELETED@- -- A post was deleted.- | ReplyAdded- -- ^ @REPLY_ADDED@- -- A reply was added.- | ReplyDeleted- -- ^ @REPLY_DELETED@- -- A reply was deleted.- | Resolved- -- ^ @RESOLVED@- -- A posted comment was resolved.- | Reopened- -- ^ @REOPENED@- -- A posted comment was reopened.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable PostSubtype--instance FromHttpApiData PostSubtype where- parseQueryParam = \case- "SUBTYPE_UNSPECIFIED" -> Right SubtypeUnspecified- "ADDED" -> Right Added- "DELETED" -> Right Deleted- "REPLY_ADDED" -> Right ReplyAdded- "REPLY_DELETED" -> Right ReplyDeleted- "RESOLVED" -> Right Resolved- "REOPENED" -> Right Reopened- x -> Left ("Unable to parse PostSubtype from: " <> x)--instance ToHttpApiData PostSubtype where- toQueryParam = \case- SubtypeUnspecified -> "SUBTYPE_UNSPECIFIED"- Added -> "ADDED"- Deleted -> "DELETED"- ReplyAdded -> "REPLY_ADDED"- ReplyDeleted -> "REPLY_DELETED"- Resolved -> "RESOLVED"- Reopened -> "REOPENED"--instance FromJSON PostSubtype where- parseJSON = parseJSONText "PostSubtype"--instance ToJSON PostSubtype where- toJSON = toJSONText---- | The sub-type of this event.-data AssignmentSubtype- = ASSubtypeUnspecified- -- ^ @SUBTYPE_UNSPECIFIED@- -- Subtype not available.- | ASAdded- -- ^ @ADDED@- -- An assignment was added.- | ASDeleted- -- ^ @DELETED@- -- An assignment was deleted.- | ASReplyAdded- -- ^ @REPLY_ADDED@- -- An assignment reply was added.- | ASReplyDeleted- -- ^ @REPLY_DELETED@- -- An assignment reply was deleted.- | ASResolved- -- ^ @RESOLVED@- -- An assignment was resolved.- | ASReopened- -- ^ @REOPENED@- -- A resolved assignment was reopened.- | ASReassigned- -- ^ @REASSIGNED@- -- An assignment was reassigned.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable AssignmentSubtype--instance FromHttpApiData AssignmentSubtype where- parseQueryParam = \case- "SUBTYPE_UNSPECIFIED" -> Right ASSubtypeUnspecified- "ADDED" -> Right ASAdded- "DELETED" -> Right ASDeleted- "REPLY_ADDED" -> Right ASReplyAdded- "REPLY_DELETED" -> Right ASReplyDeleted- "RESOLVED" -> Right ASResolved- "REOPENED" -> Right ASReopened- "REASSIGNED" -> Right ASReassigned- x -> Left ("Unable to parse AssignmentSubtype from: " <> x)--instance ToHttpApiData AssignmentSubtype where- toQueryParam = \case- ASSubtypeUnspecified -> "SUBTYPE_UNSPECIFIED"- ASAdded -> "ADDED"- ASDeleted -> "DELETED"- ASReplyAdded -> "REPLY_ADDED"- ASReplyDeleted -> "REPLY_DELETED"- ASResolved -> "RESOLVED"- ASReopened -> "REOPENED"- ASReassigned -> "REASSIGNED"--instance FromJSON AssignmentSubtype where- parseJSON = parseJSONText "AssignmentSubtype"--instance ToJSON AssignmentSubtype where- toJSON = toJSONText---- | V1 error format.-data Xgafv- = X1- -- ^ @1@- -- v1 error format- | X2- -- ^ @2@- -- v2 error format- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable Xgafv--instance FromHttpApiData Xgafv where- parseQueryParam = \case- "1" -> Right X1- "2" -> Right X2- x -> Left ("Unable to parse Xgafv from: " <> x)--instance ToHttpApiData Xgafv where- toQueryParam = \case- X1 -> "1"- X2 -> "2"--instance FromJSON Xgafv where- parseJSON = parseJSONText "Xgafv"--instance ToJSON Xgafv where- toJSON = toJSONText---- | The type of restore action taken.-data RestoreType- = RTTypeUnspecified- -- ^ @TYPE_UNSPECIFIED@- -- The type is not available.- | RTUntrash- -- ^ @UNTRASH@- -- An object was restored from the trash.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable RestoreType--instance FromHttpApiData RestoreType where- parseQueryParam = \case- "TYPE_UNSPECIFIED" -> Right RTTypeUnspecified- "UNTRASH" -> Right RTUntrash- x -> Left ("Unable to parse RestoreType from: " <> x)--instance ToHttpApiData RestoreType where- toQueryParam = \case- RTTypeUnspecified -> "TYPE_UNSPECIFIED"- RTUntrash -> "UNTRASH"--instance FromJSON RestoreType where- parseJSON = parseJSONText "RestoreType"--instance ToJSON RestoreType where- toJSON = toJSONText---- | The sub-type of this event.-data SuggestionSubtype- = SSSubtypeUnspecified- -- ^ @SUBTYPE_UNSPECIFIED@- -- Subtype not available.- | SSAdded- -- ^ @ADDED@- -- A suggestion was added.- | SSDeleted- -- ^ @DELETED@- -- A suggestion was deleted.- | SSReplyAdded- -- ^ @REPLY_ADDED@- -- A suggestion reply was added.- | SSReplyDeleted- -- ^ @REPLY_DELETED@- -- A suggestion reply was deleted.- | SSAccepted- -- ^ @ACCEPTED@- -- A suggestion was accepted.- | SSRejected- -- ^ @REJECTED@- -- A suggestion was rejected.- | SSAcceptDeleted- -- ^ @ACCEPT_DELETED@- -- An accepted suggestion was deleted.- | SSRejectDeleted- -- ^ @REJECT_DELETED@- -- A rejected suggestion was deleted.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable SuggestionSubtype--instance FromHttpApiData SuggestionSubtype where- parseQueryParam = \case- "SUBTYPE_UNSPECIFIED" -> Right SSSubtypeUnspecified- "ADDED" -> Right SSAdded- "DELETED" -> Right SSDeleted- "REPLY_ADDED" -> Right SSReplyAdded- "REPLY_DELETED" -> Right SSReplyDeleted- "ACCEPTED" -> Right SSAccepted- "REJECTED" -> Right SSRejected- "ACCEPT_DELETED" -> Right SSAcceptDeleted- "REJECT_DELETED" -> Right SSRejectDeleted- x -> Left ("Unable to parse SuggestionSubtype from: " <> x)--instance ToHttpApiData SuggestionSubtype where- toQueryParam = \case- SSSubtypeUnspecified -> "SUBTYPE_UNSPECIFIED"- SSAdded -> "ADDED"- SSDeleted -> "DELETED"- SSReplyAdded -> "REPLY_ADDED"- SSReplyDeleted -> "REPLY_DELETED"- SSAccepted -> "ACCEPTED"- SSRejected -> "REJECTED"- SSAcceptDeleted -> "ACCEPT_DELETED"- SSRejectDeleted -> "REJECT_DELETED"--instance FromJSON SuggestionSubtype where- parseJSON = parseJSONText "SuggestionSubtype"--instance ToJSON SuggestionSubtype where- toJSON = toJSONText---- | The type of Data Leak Prevention (DLP) change.-data DataLeakPreventionChangeType- = DLPCTTypeUnspecified- -- ^ @TYPE_UNSPECIFIED@- -- An update to the DLP state that is neither FLAGGED or CLEARED.- | DLPCTFlagged- -- ^ @FLAGGED@- -- Document has been flagged as containing sensitive content.- | DLPCTCleared- -- ^ @CLEARED@- -- Document is no longer flagged as containing sensitive content.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable DataLeakPreventionChangeType--instance FromHttpApiData DataLeakPreventionChangeType where- parseQueryParam = \case- "TYPE_UNSPECIFIED" -> Right DLPCTTypeUnspecified- "FLAGGED" -> Right DLPCTFlagged- "CLEARED" -> Right DLPCTCleared- x -> Left ("Unable to parse DataLeakPreventionChangeType from: " <> x)--instance ToHttpApiData DataLeakPreventionChangeType where- toQueryParam = \case- DLPCTTypeUnspecified -> "TYPE_UNSPECIFIED"- DLPCTFlagged -> "FLAGGED"- DLPCTCleared -> "CLEARED"--instance FromJSON DataLeakPreventionChangeType where- parseJSON = parseJSONText "DataLeakPreventionChangeType"--instance ToJSON DataLeakPreventionChangeType where- toJSON = toJSONText---- | This field is deprecated; please see \`DriveFolder.type\` instead.-data FolderType- = FTTypeUnspecified- -- ^ @TYPE_UNSPECIFIED@- -- This item is deprecated; please see \`DriveFolder.Type\` instead.- | FTMyDriveRoot- -- ^ @MY_DRIVE_ROOT@- -- This item is deprecated; please see \`DriveFolder.Type\` instead.- | FTTeamDriveRoot- -- ^ @TEAM_DRIVE_ROOT@- -- This item is deprecated; please see \`DriveFolder.Type\` instead.- | FTStandardFolder- -- ^ @STANDARD_FOLDER@- -- This item is deprecated; please see \`DriveFolder.Type\` instead.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable FolderType--instance FromHttpApiData FolderType where- parseQueryParam = \case- "TYPE_UNSPECIFIED" -> Right FTTypeUnspecified- "MY_DRIVE_ROOT" -> Right FTMyDriveRoot- "TEAM_DRIVE_ROOT" -> Right FTTeamDriveRoot- "STANDARD_FOLDER" -> Right FTStandardFolder- x -> Left ("Unable to parse FolderType from: " <> x)--instance ToHttpApiData FolderType where- toQueryParam = \case- FTTypeUnspecified -> "TYPE_UNSPECIFIED"- FTMyDriveRoot -> "MY_DRIVE_ROOT"- FTTeamDriveRoot -> "TEAM_DRIVE_ROOT"- FTStandardFolder -> "STANDARD_FOLDER"--instance FromJSON FolderType where- parseJSON = parseJSONText "FolderType"--instance ToJSON FolderType where- toJSON = toJSONText---- | The reference type corresponding to this event.-data ApplicationReferenceType- = UnspecifiedReferenceType- -- ^ @UNSPECIFIED_REFERENCE_TYPE@- -- The type is not available.- | Link- -- ^ @LINK@- -- The links of one or more Drive items were posted.- | Discuss- -- ^ @DISCUSS@- -- Comments were made regarding a Drive item.- deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable ApplicationReferenceType--instance FromHttpApiData ApplicationReferenceType where- parseQueryParam = \case- "UNSPECIFIED_REFERENCE_TYPE" -> Right UnspecifiedReferenceType- "LINK" -> Right Link- "DISCUSS" -> Right Discuss- x -> Left ("Unable to parse ApplicationReferenceType from: " <> x)--instance ToHttpApiData ApplicationReferenceType where- toQueryParam = \case- UnspecifiedReferenceType -> "UNSPECIFIED_REFERENCE_TYPE"- Link -> "LINK"- Discuss -> "DISCUSS"--instance FromJSON ApplicationReferenceType where- parseJSON = parseJSONText "ApplicationReferenceType"--instance ToJSON ApplicationReferenceType where- toJSON = toJSONText
− gen/Network/Google/Resource/DriveActivity/Activity/Query.hs
@@ -1,150 +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.DriveActivity.Activity.Query--- 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)------ Query past activity in Google Drive.------ /See:/ <https://developers.google.com/drive/activity/ Drive Activity API Reference> for @driveactivity.activity.query@.-module Network.Google.Resource.DriveActivity.Activity.Query- (- -- * REST Resource- ActivityQueryResource-- -- * Creating a Request- , activityQuery- , ActivityQuery-- -- * Request Lenses- , aqXgafv- , aqUploadProtocol- , aqAccessToken- , aqUploadType- , aqPayload- , aqCallback- ) where--import Network.Google.DriveActivity.Types-import Network.Google.Prelude---- | A resource alias for @driveactivity.activity.query@ method which the--- 'ActivityQuery' request conforms to.-type ActivityQueryResource =- "v2" :>- "activity:query" :>- QueryParam "$.xgafv" Xgafv :>- QueryParam "upload_protocol" Text :>- QueryParam "access_token" Text :>- QueryParam "uploadType" Text :>- QueryParam "callback" Text :>- QueryParam "alt" AltJSON :>- ReqBody '[JSON] QueryDriveActivityRequest :>- Post '[JSON] QueryDriveActivityResponse---- | Query past activity in Google Drive.------ /See:/ 'activityQuery' smart constructor.-data ActivityQuery =- ActivityQuery'- { _aqXgafv :: !(Maybe Xgafv)- , _aqUploadProtocol :: !(Maybe Text)- , _aqAccessToken :: !(Maybe Text)- , _aqUploadType :: !(Maybe Text)- , _aqPayload :: !QueryDriveActivityRequest- , _aqCallback :: !(Maybe Text)- }- deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'ActivityQuery' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'aqXgafv'------ * 'aqUploadProtocol'------ * 'aqAccessToken'------ * 'aqUploadType'------ * 'aqPayload'------ * 'aqCallback'-activityQuery- :: QueryDriveActivityRequest -- ^ 'aqPayload'- -> ActivityQuery-activityQuery pAqPayload_ =- ActivityQuery'- { _aqXgafv = Nothing- , _aqUploadProtocol = Nothing- , _aqAccessToken = Nothing- , _aqUploadType = Nothing- , _aqPayload = pAqPayload_- , _aqCallback = Nothing- }----- | V1 error format.-aqXgafv :: Lens' ActivityQuery (Maybe Xgafv)-aqXgafv = lens _aqXgafv (\ s a -> s{_aqXgafv = a})---- | Upload protocol for media (e.g. \"raw\", \"multipart\").-aqUploadProtocol :: Lens' ActivityQuery (Maybe Text)-aqUploadProtocol- = lens _aqUploadProtocol- (\ s a -> s{_aqUploadProtocol = a})---- | OAuth access token.-aqAccessToken :: Lens' ActivityQuery (Maybe Text)-aqAccessToken- = lens _aqAccessToken- (\ s a -> s{_aqAccessToken = a})---- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").-aqUploadType :: Lens' ActivityQuery (Maybe Text)-aqUploadType- = lens _aqUploadType (\ s a -> s{_aqUploadType = a})---- | Multipart request metadata.-aqPayload :: Lens' ActivityQuery QueryDriveActivityRequest-aqPayload- = lens _aqPayload (\ s a -> s{_aqPayload = a})---- | JSONP-aqCallback :: Lens' ActivityQuery (Maybe Text)-aqCallback- = lens _aqCallback (\ s a -> s{_aqCallback = a})--instance GoogleRequest ActivityQuery where- type Rs ActivityQuery = QueryDriveActivityResponse- type Scopes ActivityQuery =- '["https://www.googleapis.com/auth/drive.activity",- "https://www.googleapis.com/auth/drive.activity.readonly"]- requestClient ActivityQuery'{..}- = go _aqXgafv _aqUploadProtocol _aqAccessToken- _aqUploadType- _aqCallback- (Just AltJSON)- _aqPayload- driveActivityService- where go- = buildClient (Proxy :: Proxy ActivityQueryResource)- mempty
gogol-driveactivity.cabal view
@@ -1,46 +1,61 @@-name: gogol-driveactivity-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-driveactivity+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 in Google Drive.- .- /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 @v2@- of the API.+ Provides a historical view of activity in Google Drive.+ .+ /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 @v2@+ 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-driveactivity +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.DriveActivity- , Network.Google.DriveActivity.Types- , Network.Google.Resource.DriveActivity.Activity.Query+ exposed-modules:+ Gogol.DriveActivity+ Gogol.DriveActivity.Activity.Query+ Gogol.DriveActivity.Types - other-modules:- Network.Google.DriveActivity.Types.Product- , Network.Google.DriveActivity.Types.Sum+ other-modules:+ Gogol.DriveActivity.Internal.Product+ Gogol.DriveActivity.Internal.Sum - build-depends:- gogol-core == 0.5.0.*- , base >= 4.7 && < 5+ build-depends: gogol-core ^>=1.0.0