gogol-driveactivity (empty) → 0.4.0
raw patch · 10 files changed
+4378/−0 lines, 10 filesdep +basedep +gogol-coresetup-changed
Dependencies added: base, gogol-core
Files
- LICENSE +367/−0
- README.md +28/−0
- Setup.hs +2/−0
- gen/Network/Google/DriveActivity.hs +395/−0
- gen/Network/Google/DriveActivity/Types.hs +390/−0
- gen/Network/Google/DriveActivity/Types/Product.hs +2428/−0
- gen/Network/Google/DriveActivity/Types/Sum.hs +576/−0
- gen/Network/Google/Resource/DriveActivity/Activity/Query.hs +146/−0
- gogol-driveactivity.cabal +46/−0
- src/.gitkeep +0/−0
+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,28 @@+# gogol-driveactivity++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`0.3.0`+++## Description++A client library for the Google Drive Activity.+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/gogol/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `gogol-gen` for more information.+++## Licence++`gogol-driveactivity` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ gen/Network/Google/DriveActivity.hs view
@@ -0,0 +1,395 @@+{-# 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++ -- ** Impersonation+ , Impersonation+ , impersonation+ , iImpersonatedUser++ -- ** Edit+ , Edit+ , edit++ -- ** ActionDetail+ , ActionDetail+ , actionDetail+ , adEdit+ , adPermissionChange+ , adRestore+ , adReference+ , adCreate+ , adRename+ , adComment+ , adSettingsChange+ , adDlpChange+ , adDelete+ , adMove++ -- ** PermissionRole+ , PermissionRole (..)++ -- ** Group+ , Group+ , group'+ , gEmail+ , gTitle++ -- ** TimeRange+ , TimeRange+ , timeRange+ , trStartTime+ , trEndTime++ -- ** RestrictionChangeNewRestriction+ , RestrictionChangeNewRestriction (..)++ -- ** QueryDriveActivityRequest+ , QueryDriveActivityRequest+ , queryDriveActivityRequest+ , qdarAncestorName+ , qdarItemName+ , qdarConsolidationStrategy+ , qdarFilter+ , qdarPageToken+ , qdarPageSize++ -- ** DriveItemReference+ , DriveItemReference+ , driveItemReference+ , dirFolder+ , dirName+ , dirTitle+ , dirFile++ -- ** KnownUser+ , KnownUser+ , knownUser+ , kuPersonName+ , kuIsCurrentUser++ -- ** TargetReference+ , TargetReference+ , targetReference+ , 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+ , dLegacyId+ , dName++ -- ** 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+ , 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++ -- ** 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+ , tTeamDrive+ , tFileComment+ , tDriveItem++ -- ** Move+ , Move+ , move+ , mAddedParents+ , mRemovedParents++ -- ** ApplicationReferenceType+ , ApplicationReferenceType (..)++ -- ** DriveActivity+ , DriveActivity+ , driveActivity+ , daTimeRange+ , daActions+ , daActors+ , daTargets+ , daPrimaryActionDetail+ , daTimestamp++ -- ** DriveItem+ , DriveItem+ , driveItem+ , diFolder+ , diOwner+ , diMimeType+ , diName+ , 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 view
@@ -0,0 +1,390 @@+{-# 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++ -- * Impersonation+ , Impersonation+ , impersonation+ , iImpersonatedUser++ -- * Edit+ , Edit+ , edit++ -- * ActionDetail+ , ActionDetail+ , actionDetail+ , adEdit+ , adPermissionChange+ , adRestore+ , adReference+ , adCreate+ , adRename+ , adComment+ , adSettingsChange+ , adDlpChange+ , adDelete+ , adMove++ -- * PermissionRole+ , PermissionRole (..)++ -- * Group+ , Group+ , group'+ , gEmail+ , gTitle++ -- * TimeRange+ , TimeRange+ , timeRange+ , trStartTime+ , trEndTime++ -- * RestrictionChangeNewRestriction+ , RestrictionChangeNewRestriction (..)++ -- * QueryDriveActivityRequest+ , QueryDriveActivityRequest+ , queryDriveActivityRequest+ , qdarAncestorName+ , qdarItemName+ , qdarConsolidationStrategy+ , qdarFilter+ , qdarPageToken+ , qdarPageSize++ -- * DriveItemReference+ , DriveItemReference+ , driveItemReference+ , dirFolder+ , dirName+ , dirTitle+ , dirFile++ -- * KnownUser+ , KnownUser+ , knownUser+ , kuPersonName+ , kuIsCurrentUser++ -- * TargetReference+ , TargetReference+ , targetReference+ , 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+ , dLegacyId+ , dName++ -- * 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+ , 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++ -- * 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+ , tTeamDrive+ , tFileComment+ , tDriveItem++ -- * Move+ , Move+ , move+ , mAddedParents+ , mRemovedParents++ -- * ApplicationReferenceType+ , ApplicationReferenceType (..)++ -- * DriveActivity+ , DriveActivity+ , driveActivity+ , daTimeRange+ , daActions+ , daActors+ , daTargets+ , daPrimaryActionDetail+ , daTimestamp++ -- * DriveItem+ , DriveItem+ , driveItem+ , diFolder+ , diOwner+ , diMimeType+ , diName+ , 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 view
@@ -0,0 +1,2428 @@+{-# 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 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])++-- | 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])++-- | 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'+ { _dirFolder :: !(Maybe Folder)+ , _dirName :: !(Maybe Text)+ , _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:+--+-- * 'dirFolder'+--+-- * 'dirName'+--+-- * 'dirTitle'+--+-- * 'dirFile'+driveItemReference+ :: DriveItemReference+driveItemReference =+ DriveItemReference'+ { _dirFolder = Nothing+ , _dirName = Nothing+ , _dirTitle = Nothing+ , _dirFile = Nothing+ }++-- | The Drive item is a folder.+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 title of the Drive item.+dirTitle :: Lens' DriveItemReference (Maybe Text)+dirTitle = lens _dirTitle (\ s a -> s{_dirTitle = a})++-- | The Drive item is a file.+dirFile :: Lens' DriveItemReference (Maybe File)+dirFile = lens _dirFile (\ s a -> s{_dirFile = a})++instance FromJSON DriveItemReference where+ parseJSON+ = withObject "DriveItemReference"+ (\ o ->+ DriveItemReference' <$>+ (o .:? "folder") <*> (o .:? "name") <*>+ (o .:? "title")+ <*> (o .:? "file"))++instance ToJSON DriveItemReference where+ toJSON DriveItemReference'{..}+ = object+ (catMaybes+ [("folder" .=) <$> _dirFolder,+ ("name" .=) <$> _dirName, ("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'+ { _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:+--+-- * 'trTeamDrive'+--+-- * 'trDriveItem'+targetReference+ :: TargetReference+targetReference =+ TargetReference'+ { _trTeamDrive = Nothing+ , _trDriveItem = Nothing+ }++-- | The target is a Team Drive.+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 .:? "teamDrive") <*> (o .:? "driveItem"))++instance ToJSON TargetReference where+ toJSON TargetReference'{..}+ = object+ (catMaybes+ [("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'+ { _dLegacyId :: !(Maybe Text)+ , _dName :: !(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:+--+-- * 'dLegacyId'+--+-- * 'dName'+domain+ :: Domain+domain =+ Domain'+ { _dLegacyId = Nothing+ , _dName = Nothing+ }++-- | An opaque string used to identify this domain.+dLegacyId :: Lens' Domain (Maybe Text)+dLegacyId+ = lens _dLegacyId (\ s a -> s{_dLegacyId = a})++-- | The name of the domain, e.g. \"google.com\".+dName :: Lens' Domain (Maybe Text)+dName = lens _dName (\ s a -> s{_dName = a})++instance FromJSON Domain where+ parseJSON+ = withObject "Domain"+ (\ o ->+ Domain' <$> (o .:? "legacyId") <*> (o .:? "name"))++instance ToJSON Domain where+ toJSON Domain'{..}+ = object+ (catMaybes+ [("legacyId" .=) <$> _dLegacyId,+ ("name" .=) <$> _dName])++-- | 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])++-- | A Drive item which is a folder.+--+-- /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+ }++-- | The type of Drive folder.+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])++-- | Information about a Team Drive.+--+-- /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+ }++-- | The root of this Team Drive.+tdRoot :: Lens' TeamDrive (Maybe DriveItem)+tdRoot = lens _tdRoot (\ s a -> s{_tdRoot = a})++-- | The resource name of the Team Drive. The format is+-- \"teamDrives\/TEAM_DRIVE_ID\".+tdName :: Lens' TeamDrive (Maybe Text)+tdName = lens _tdName (\ s a -> s{_tdName = a})++-- | The title of the Team Drive.+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'+ { _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:+--+-- * 'oDomain'+--+-- * 'oTeamDrive'+--+-- * 'oUser'+owner+ :: Owner+owner =+ Owner'+ { _oDomain = Nothing+ , _oTeamDrive = Nothing+ , _oUser = Nothing+ }++-- | The domain of the Drive item owner.+oDomain :: Lens' Owner (Maybe Domain)+oDomain = lens _oDomain (\ s a -> s{_oDomain = a})++-- | The Team Drive that owns the Drive item.+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 .:? "domain") <*> (o .:? "teamDrive") <*>+ (o .:? "user"))++instance ToJSON Owner where+ toJSON Owner'{..}+ = object+ (catMaybes+ [("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++-- | A lightweight reference to a Team Drive.+--+-- /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+ }++-- | The resource name of the Team Drive. The format is+-- \"teamDrives\/TEAM_DRIVE_ID\".+tdrName :: Lens' TeamDriveReference (Maybe Text)+tdrName = lens _tdrName (\ s a -> s{_tdrName = a})++-- | The title of the Team Drive.+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++-- | 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])++-- | A Drive item which is a file.+--+-- /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'+ { _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:+--+-- * 'tTeamDrive'+--+-- * 'tFileComment'+--+-- * 'tDriveItem'+target+ :: Target+target =+ Target'+ { _tTeamDrive = Nothing+ , _tFileComment = Nothing+ , _tDriveItem = Nothing+ }++-- | The target is a Team Drive.+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 .:? "teamDrive") <*> (o .:? "fileComment") <*>+ (o .:? "driveItem"))++instance ToJSON Target where+ toJSON Target'{..}+ = object+ (catMaybes+ [("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 Drive objects this activity is about (e.g. file, folder, Team+-- 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'+ { _diFolder :: !(Maybe Folder)+ , _diOwner :: !(Maybe Owner)+ , _diMimeType :: !(Maybe Text)+ , _diName :: !(Maybe Text)+ , _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:+--+-- * 'diFolder'+--+-- * 'diOwner'+--+-- * 'diMimeType'+--+-- * 'diName'+--+-- * 'diTitle'+--+-- * 'diFile'+driveItem+ :: DriveItem+driveItem =+ DriveItem'+ { _diFolder = Nothing+ , _diOwner = Nothing+ , _diMimeType = Nothing+ , _diName = Nothing+ , _diTitle = Nothing+ , _diFile = Nothing+ }++-- | The Drive item is a folder.+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 title of the Drive item.+diTitle :: Lens' DriveItem (Maybe Text)+diTitle = lens _diTitle (\ s a -> s{_diTitle = a})++-- | The Drive item is a file.+diFile :: Lens' DriveItem (Maybe File)+diFile = lens _diFile (\ s a -> s{_diFile = a})++instance FromJSON DriveItem where+ parseJSON+ = withObject "DriveItem"+ (\ o ->+ DriveItem' <$>+ (o .:? "folder") <*> (o .:? "owner") <*>+ (o .:? "mimeType")+ <*> (o .:? "name")+ <*> (o .:? "title")+ <*> (o .:? "file"))++instance ToJSON DriveItem where+ toJSON DriveItem'{..}+ = object+ (catMaybes+ [("folder" .=) <$> _diFolder,+ ("owner" .=) <$> _diOwner,+ ("mimeType" .=) <$> _diMimeType,+ ("name" .=) <$> _diName, ("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 view
@@ -0,0 +1,576 @@+{-# 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 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+ = TypeUnspecified+ -- ^ @TYPE_UNSPECIFIED@+ -- The event type is unspecified.+ | UserDeletion+ -- ^ @USER_DELETION@+ -- The event is a consequence of a user account being deleted.+ | TrashAutoPurge+ -- ^ @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 TypeUnspecified+ "USER_DELETION" -> Right UserDeletion+ "TRASH_AUTO_PURGE" -> Right TrashAutoPurge+ x -> Left ("Unable to parse SystemEventType from: " <> x)++instance ToHttpApiData SystemEventType where+ toQueryParam = \case+ TypeUnspecified -> "TYPE_UNSPECIFIED"+ UserDeletion -> "USER_DELETION"+ TrashAutoPurge -> "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++-- | The type of Drive folder.+data FolderType+ = FTTypeUnspecified+ -- ^ @TYPE_UNSPECIFIED@+ -- The folder type is unknown.+ | FTMyDriveRoot+ -- ^ @MY_DRIVE_ROOT@+ -- The folder is the root of a user\'s MyDrive.+ | FTTeamDriveRoot+ -- ^ @TEAM_DRIVE_ROOT@+ -- The folder is the root of a Team Drive. Note that this folder is a Drive+ -- item, and is a distinct entity from the Team Drive itself.+ | FTStandardFolder+ -- ^ @STANDARD_FOLDER@+ -- The folder is a standard, non-root, folder.+ 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 view
@@ -0,0 +1,146 @@+{-# 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
@@ -0,0 +1,46 @@+name: gogol-driveactivity+version: 0.4.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++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.++source-repository head+ type: git+ location: git://github.com/brendanhay/gogol.git++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options: -Wall++ exposed-modules:+ Network.Google.DriveActivity+ , Network.Google.DriveActivity.Types+ , Network.Google.Resource.DriveActivity.Activity.Query++ other-modules:+ Network.Google.DriveActivity.Types.Product+ , Network.Google.DriveActivity.Types.Sum++ build-depends:+ gogol-core == 0.4.0.*+ , base >= 4.7 && < 5
+ src/.gitkeep view