gogol-alertcenter (empty) → 0.4.0
raw patch · 17 files changed
+4165/−0 lines, 17 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/AlertCenter.hs +285/−0
- gen/Network/Google/AlertCenter/Types.hs +241/−0
- gen/Network/Google/AlertCenter/Types/Product.hs +1712/−0
- gen/Network/Google/AlertCenter/Types/Sum.hs +117/−0
- gen/Network/Google/Resource/AlertCenter/Alerts/Delete.hs +166/−0
- gen/Network/Google/Resource/AlertCenter/Alerts/Feedback/Create.hs +177/−0
- gen/Network/Google/Resource/AlertCenter/Alerts/Feedback/List.hs +182/−0
- gen/Network/Google/Resource/AlertCenter/Alerts/Get.hs +159/−0
- gen/Network/Google/Resource/AlertCenter/Alerts/List.hs +205/−0
- gen/Network/Google/Resource/AlertCenter/Alerts/Undelete.hs +168/−0
- gen/Network/Google/Resource/AlertCenter/GetSettings.hs +145/−0
- gen/Network/Google/Resource/AlertCenter/UpdateSettings.hs +158/−0
- gogol-alertcenter.cabal +53/−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-alertcenter++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`0.3.0`+++## Description++A client library for the Google G Suite Alert Center.+++## 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-alertcenter` 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/AlertCenter.hs view
@@ -0,0 +1,285 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- |+-- Module : Network.Google.AlertCenter+-- 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)+--+-- Manages alerts on issues affecting your domain.+--+-- /See:/ <https://developers.google.com/admin-sdk/alertcenter/ G Suite Alert Center API Reference>+module Network.Google.AlertCenter+ (+ -- * Service Configuration+ alertCenterService++ -- * OAuth Scopes+ , appsAlertsScope++ -- * API Declaration+ , AlertCenterAPI++ -- * Resources++ -- ** alertcenter.alerts.delete+ , module Network.Google.Resource.AlertCenter.Alerts.Delete++ -- ** alertcenter.alerts.feedback.create+ , module Network.Google.Resource.AlertCenter.Alerts.Feedback.Create++ -- ** alertcenter.alerts.feedback.list+ , module Network.Google.Resource.AlertCenter.Alerts.Feedback.List++ -- ** alertcenter.alerts.get+ , module Network.Google.Resource.AlertCenter.Alerts.Get++ -- ** alertcenter.alerts.list+ , module Network.Google.Resource.AlertCenter.Alerts.List++ -- ** alertcenter.alerts.undelete+ , module Network.Google.Resource.AlertCenter.Alerts.Undelete++ -- ** alertcenter.getSettings+ , module Network.Google.Resource.AlertCenter.GetSettings++ -- ** alertcenter.updateSettings+ , module Network.Google.Resource.AlertCenter.UpdateSettings++ -- * Types++ -- ** ListAlertsResponse+ , ListAlertsResponse+ , listAlertsResponse+ , larNextPageToken+ , larAlerts++ -- ** CSVRow+ , CSVRow+ , csvRow+ , crEntries++ -- ** AlertFeedback+ , AlertFeedback+ , alertFeedback+ , afFeedbackId+ , afEmail+ , afAlertId+ , afCustomerId+ , afType+ , afCreateTime++ -- ** DeviceCompromised+ , DeviceCompromised+ , deviceCompromised+ , dcEmail+ , dcEvents++ -- ** StateSponsoredAttack+ , StateSponsoredAttack+ , stateSponsoredAttack+ , ssaEmail++ -- ** BadWhiteList+ , BadWhiteList+ , badWhiteList+ , bwlSourceIP+ , bwlDomainId+ , bwlMessages+ , bwlMaliciousEntity++ -- ** SuspiciousActivitySecurityDetail+ , SuspiciousActivitySecurityDetail+ , suspiciousActivitySecurityDetail+ , sasdDeviceProperty+ , sasdResourceId+ , sasdIosVendorId+ , sasdOldValue+ , sasdNewValue+ , sasdDeviceModel+ , sasdDeviceId+ , sasdDeviceType+ , sasdSerialNumber++ -- ** Empty+ , Empty+ , empty++ -- ** UndeleteAlertRequest+ , UndeleteAlertRequest+ , undeleteAlertRequest+ , uarCustomerId++ -- ** Settings+ , Settings+ , settings+ , sNotifications++ -- ** Notification+ , Notification+ , notification+ , nCloudPubsubTopic++ -- ** AccountWarning+ , AccountWarning+ , accountWarning+ , awEmail+ , awLoginDetails++ -- ** MailPhishing+ , MailPhishing+ , mailPhishing+ , mpIsInternal+ , mpDomainId+ , mpMessages+ , mpMaliciousEntity++ -- ** GmailMessageInfo+ , GmailMessageInfo+ , gmailMessageInfo+ , gmiMD5HashSubject+ , gmiSubjectText+ , gmiDate+ , gmiMD5HashMessageBody+ , gmiAttachmentsSha256Hash+ , gmiRecipient+ , gmiMessageBodySnippet+ , gmiMessageId++ -- ** AlertData+ , AlertData+ , alertData+ , adAddtional++ -- ** CloudPubsubTopicPayloadFormat+ , CloudPubsubTopicPayloadFormat (..)++ -- ** PhishingSpike+ , PhishingSpike+ , phishingSpike+ , psIsInternal+ , psDomainId+ , psMessages+ , psMaliciousEntity++ -- ** CSV+ , CSV+ , csv+ , cDataRows+ , cHeaders++ -- ** Alert+ , Alert+ , alert+ , aStartTime+ , aData+ , aAlertId+ , aSecurityInvestigationToolLink+ , aCustomerId+ , aEndTime+ , aSource+ , aDeleted+ , aType+ , aCreateTime++ -- ** Attachment+ , Attachment+ , attachment+ , aCSV++ -- ** GoogleOperations+ , GoogleOperations+ , googleOperations+ , goAttachmentData+ , goAffectedUserEmails+ , goTitle+ , goDescription++ -- ** AlertFeedbackType+ , AlertFeedbackType (..)++ -- ** SuspiciousActivity+ , SuspiciousActivity+ , suspiciousActivity+ , saEmail+ , saEvents++ -- ** Xgafv+ , Xgafv (..)++ -- ** DomainWideTakeoutInitiated+ , DomainWideTakeoutInitiated+ , domainWideTakeoutInitiated+ , dwtiEmail+ , dwtiTakeoutRequestId++ -- ** DomainId+ , DomainId+ , domainId+ , diCustomerPrimaryDomain++ -- ** DeviceCompromisedSecurityDetail+ , DeviceCompromisedSecurityDetail+ , deviceCompromisedSecurityDetail+ , dcsdResourceId+ , dcsdDeviceCompromisedState+ , dcsdIosVendorId+ , dcsdDeviceModel+ , dcsdDeviceId+ , dcsdDeviceType+ , dcsdSerialNumber++ -- ** CloudPubsubTopic+ , CloudPubsubTopic+ , cloudPubsubTopic+ , cptTopicName+ , cptPayloadFormat++ -- ** ListAlertFeedbackResponse+ , ListAlertFeedbackResponse+ , listAlertFeedbackResponse+ , lafrFeedback++ -- ** LoginDetails+ , LoginDetails+ , loginDetails+ , ldIPAddress+ , ldLoginTime++ -- ** MaliciousEntity+ , MaliciousEntity+ , maliciousEntity+ , meFromHeader+ ) where++import Network.Google.AlertCenter.Types+import Network.Google.Prelude+import Network.Google.Resource.AlertCenter.Alerts.Delete+import Network.Google.Resource.AlertCenter.Alerts.Feedback.Create+import Network.Google.Resource.AlertCenter.Alerts.Feedback.List+import Network.Google.Resource.AlertCenter.Alerts.Get+import Network.Google.Resource.AlertCenter.Alerts.List+import Network.Google.Resource.AlertCenter.Alerts.Undelete+import Network.Google.Resource.AlertCenter.GetSettings+import Network.Google.Resource.AlertCenter.UpdateSettings++{- $resources+TODO+-}++-- | Represents the entirety of the methods and resources available for the G Suite Alert Center API service.+type AlertCenterAPI =+ UpdateSettingsResource :<|> GetSettingsResource :<|>+ AlertsFeedbackListResource+ :<|> AlertsFeedbackCreateResource+ :<|> AlertsListResource+ :<|> AlertsUndeleteResource+ :<|> AlertsGetResource+ :<|> AlertsDeleteResource
+ gen/Network/Google/AlertCenter/Types.hs view
@@ -0,0 +1,241 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.AlertCenter.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.AlertCenter.Types+ (+ -- * Service Configuration+ alertCenterService++ -- * OAuth Scopes+ , appsAlertsScope++ -- * ListAlertsResponse+ , ListAlertsResponse+ , listAlertsResponse+ , larNextPageToken+ , larAlerts++ -- * CSVRow+ , CSVRow+ , csvRow+ , crEntries++ -- * AlertFeedback+ , AlertFeedback+ , alertFeedback+ , afFeedbackId+ , afEmail+ , afAlertId+ , afCustomerId+ , afType+ , afCreateTime++ -- * DeviceCompromised+ , DeviceCompromised+ , deviceCompromised+ , dcEmail+ , dcEvents++ -- * StateSponsoredAttack+ , StateSponsoredAttack+ , stateSponsoredAttack+ , ssaEmail++ -- * BadWhiteList+ , BadWhiteList+ , badWhiteList+ , bwlSourceIP+ , bwlDomainId+ , bwlMessages+ , bwlMaliciousEntity++ -- * SuspiciousActivitySecurityDetail+ , SuspiciousActivitySecurityDetail+ , suspiciousActivitySecurityDetail+ , sasdDeviceProperty+ , sasdResourceId+ , sasdIosVendorId+ , sasdOldValue+ , sasdNewValue+ , sasdDeviceModel+ , sasdDeviceId+ , sasdDeviceType+ , sasdSerialNumber++ -- * Empty+ , Empty+ , empty++ -- * UndeleteAlertRequest+ , UndeleteAlertRequest+ , undeleteAlertRequest+ , uarCustomerId++ -- * Settings+ , Settings+ , settings+ , sNotifications++ -- * Notification+ , Notification+ , notification+ , nCloudPubsubTopic++ -- * AccountWarning+ , AccountWarning+ , accountWarning+ , awEmail+ , awLoginDetails++ -- * MailPhishing+ , MailPhishing+ , mailPhishing+ , mpIsInternal+ , mpDomainId+ , mpMessages+ , mpMaliciousEntity++ -- * GmailMessageInfo+ , GmailMessageInfo+ , gmailMessageInfo+ , gmiMD5HashSubject+ , gmiSubjectText+ , gmiDate+ , gmiMD5HashMessageBody+ , gmiAttachmentsSha256Hash+ , gmiRecipient+ , gmiMessageBodySnippet+ , gmiMessageId++ -- * AlertData+ , AlertData+ , alertData+ , adAddtional++ -- * CloudPubsubTopicPayloadFormat+ , CloudPubsubTopicPayloadFormat (..)++ -- * PhishingSpike+ , PhishingSpike+ , phishingSpike+ , psIsInternal+ , psDomainId+ , psMessages+ , psMaliciousEntity++ -- * CSV+ , CSV+ , csv+ , cDataRows+ , cHeaders++ -- * Alert+ , Alert+ , alert+ , aStartTime+ , aData+ , aAlertId+ , aSecurityInvestigationToolLink+ , aCustomerId+ , aEndTime+ , aSource+ , aDeleted+ , aType+ , aCreateTime++ -- * Attachment+ , Attachment+ , attachment+ , aCSV++ -- * GoogleOperations+ , GoogleOperations+ , googleOperations+ , goAttachmentData+ , goAffectedUserEmails+ , goTitle+ , goDescription++ -- * AlertFeedbackType+ , AlertFeedbackType (..)++ -- * SuspiciousActivity+ , SuspiciousActivity+ , suspiciousActivity+ , saEmail+ , saEvents++ -- * Xgafv+ , Xgafv (..)++ -- * DomainWideTakeoutInitiated+ , DomainWideTakeoutInitiated+ , domainWideTakeoutInitiated+ , dwtiEmail+ , dwtiTakeoutRequestId++ -- * DomainId+ , DomainId+ , domainId+ , diCustomerPrimaryDomain++ -- * DeviceCompromisedSecurityDetail+ , DeviceCompromisedSecurityDetail+ , deviceCompromisedSecurityDetail+ , dcsdResourceId+ , dcsdDeviceCompromisedState+ , dcsdIosVendorId+ , dcsdDeviceModel+ , dcsdDeviceId+ , dcsdDeviceType+ , dcsdSerialNumber++ -- * CloudPubsubTopic+ , CloudPubsubTopic+ , cloudPubsubTopic+ , cptTopicName+ , cptPayloadFormat++ -- * ListAlertFeedbackResponse+ , ListAlertFeedbackResponse+ , listAlertFeedbackResponse+ , lafrFeedback++ -- * LoginDetails+ , LoginDetails+ , loginDetails+ , ldIPAddress+ , ldLoginTime++ -- * MaliciousEntity+ , MaliciousEntity+ , maliciousEntity+ , meFromHeader+ ) where++import Network.Google.AlertCenter.Types.Product+import Network.Google.AlertCenter.Types.Sum+import Network.Google.Prelude++-- | Default request referring to version 'v1beta1' of the G Suite Alert Center API. This contains the host and root path used as a starting point for constructing service requests.+alertCenterService :: ServiceConfig+alertCenterService+ = defaultService (ServiceId "alertcenter:v1beta1")+ "alertcenter.googleapis.com"++-- | See and delete your domain\'s G Suite alerts, and send alert feedback+appsAlertsScope :: Proxy '["https://www.googleapis.com/auth/apps.alerts"]+appsAlertsScope = Proxy;
+ gen/Network/Google/AlertCenter/Types/Product.hs view
@@ -0,0 +1,1712 @@+{-# 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.AlertCenter.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.AlertCenter.Types.Product where++import Network.Google.AlertCenter.Types.Sum+import Network.Google.Prelude++-- | Response message for an alert listing request.+--+-- /See:/ 'listAlertsResponse' smart constructor.+data ListAlertsResponse = ListAlertsResponse'+ { _larNextPageToken :: !(Maybe Text)+ , _larAlerts :: !(Maybe [Alert])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListAlertsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'larNextPageToken'+--+-- * 'larAlerts'+listAlertsResponse+ :: ListAlertsResponse+listAlertsResponse =+ ListAlertsResponse'+ { _larNextPageToken = Nothing+ , _larAlerts = Nothing+ }++-- | The token for the next page. If not empty, indicates that there may be+-- more alerts that match the listing request; this value can be used in a+-- subsequent ListAlertsRequest to get alerts continuing from last result+-- of the current list call.+larNextPageToken :: Lens' ListAlertsResponse (Maybe Text)+larNextPageToken+ = lens _larNextPageToken+ (\ s a -> s{_larNextPageToken = a})++-- | The list of alerts.+larAlerts :: Lens' ListAlertsResponse [Alert]+larAlerts+ = lens _larAlerts (\ s a -> s{_larAlerts = a}) .+ _Default+ . _Coerce++instance FromJSON ListAlertsResponse where+ parseJSON+ = withObject "ListAlertsResponse"+ (\ o ->+ ListAlertsResponse' <$>+ (o .:? "nextPageToken") <*>+ (o .:? "alerts" .!= mempty))++instance ToJSON ListAlertsResponse where+ toJSON ListAlertsResponse'{..}+ = object+ (catMaybes+ [("nextPageToken" .=) <$> _larNextPageToken,+ ("alerts" .=) <$> _larAlerts])++-- | A representation of a single data row in a CSV file.+--+-- /See:/ 'csvRow' smart constructor.+newtype CSVRow = CSVRow'+ { _crEntries :: Maybe [Text]+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CSVRow' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'crEntries'+csvRow+ :: CSVRow+csvRow =+ CSVRow'+ { _crEntries = Nothing+ }++-- | The data entries in a CSV file row, as a string array rather than a+-- single comma-separated string.+crEntries :: Lens' CSVRow [Text]+crEntries+ = lens _crEntries (\ s a -> s{_crEntries = a}) .+ _Default+ . _Coerce++instance FromJSON CSVRow where+ parseJSON+ = withObject "CSVRow"+ (\ o -> CSVRow' <$> (o .:? "entries" .!= mempty))++instance ToJSON CSVRow where+ toJSON CSVRow'{..}+ = object (catMaybes [("entries" .=) <$> _crEntries])++-- | A customer feedback about an alert.+--+-- /See:/ 'alertFeedback' smart constructor.+data AlertFeedback = AlertFeedback'+ { _afFeedbackId :: !(Maybe Text)+ , _afEmail :: !(Maybe Text)+ , _afAlertId :: !(Maybe Text)+ , _afCustomerId :: !(Maybe Text)+ , _afType :: !(Maybe AlertFeedbackType)+ , _afCreateTime :: !(Maybe DateTime')+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'AlertFeedback' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'afFeedbackId'+--+-- * 'afEmail'+--+-- * 'afAlertId'+--+-- * 'afCustomerId'+--+-- * 'afType'+--+-- * 'afCreateTime'+alertFeedback+ :: AlertFeedback+alertFeedback =+ AlertFeedback'+ { _afFeedbackId = Nothing+ , _afEmail = Nothing+ , _afAlertId = Nothing+ , _afCustomerId = Nothing+ , _afType = Nothing+ , _afCreateTime = Nothing+ }++-- | Output only. The unique identifier for the feedback.+afFeedbackId :: Lens' AlertFeedback (Maybe Text)+afFeedbackId+ = lens _afFeedbackId (\ s a -> s{_afFeedbackId = a})++-- | Output only. The email of the user that provided the feedback.+afEmail :: Lens' AlertFeedback (Maybe Text)+afEmail = lens _afEmail (\ s a -> s{_afEmail = a})++-- | Output only. The alert identifier.+afAlertId :: Lens' AlertFeedback (Maybe Text)+afAlertId+ = lens _afAlertId (\ s a -> s{_afAlertId = a})++-- | Output only. The unique identifier of the Google account of the+-- customer.+afCustomerId :: Lens' AlertFeedback (Maybe Text)+afCustomerId+ = lens _afCustomerId (\ s a -> s{_afCustomerId = a})++-- | Required. The type of the feedback.+afType :: Lens' AlertFeedback (Maybe AlertFeedbackType)+afType = lens _afType (\ s a -> s{_afType = a})++-- | Output only. The time this feedback was created.+afCreateTime :: Lens' AlertFeedback (Maybe UTCTime)+afCreateTime+ = lens _afCreateTime (\ s a -> s{_afCreateTime = a})+ . mapping _DateTime++instance FromJSON AlertFeedback where+ parseJSON+ = withObject "AlertFeedback"+ (\ o ->+ AlertFeedback' <$>+ (o .:? "feedbackId") <*> (o .:? "email") <*>+ (o .:? "alertId")+ <*> (o .:? "customerId")+ <*> (o .:? "type")+ <*> (o .:? "createTime"))++instance ToJSON AlertFeedback where+ toJSON AlertFeedback'{..}+ = object+ (catMaybes+ [("feedbackId" .=) <$> _afFeedbackId,+ ("email" .=) <$> _afEmail,+ ("alertId" .=) <$> _afAlertId,+ ("customerId" .=) <$> _afCustomerId,+ ("type" .=) <$> _afType,+ ("createTime" .=) <$> _afCreateTime])++-- | A mobile device compromised alert. Derived from audit logs.+--+-- /See:/ 'deviceCompromised' smart constructor.+data DeviceCompromised = DeviceCompromised'+ { _dcEmail :: !(Maybe Text)+ , _dcEvents :: !(Maybe [DeviceCompromisedSecurityDetail])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeviceCompromised' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcEmail'+--+-- * 'dcEvents'+deviceCompromised+ :: DeviceCompromised+deviceCompromised =+ DeviceCompromised'+ { _dcEmail = Nothing+ , _dcEvents = Nothing+ }++-- | The email of the user this alert was created for.+dcEmail :: Lens' DeviceCompromised (Maybe Text)+dcEmail = lens _dcEmail (\ s a -> s{_dcEmail = a})++-- | Required. The list of security events.+dcEvents :: Lens' DeviceCompromised [DeviceCompromisedSecurityDetail]+dcEvents+ = lens _dcEvents (\ s a -> s{_dcEvents = a}) .+ _Default+ . _Coerce++instance FromJSON DeviceCompromised where+ parseJSON+ = withObject "DeviceCompromised"+ (\ o ->+ DeviceCompromised' <$>+ (o .:? "email") <*> (o .:? "events" .!= mempty))++instance ToJSON DeviceCompromised where+ toJSON DeviceCompromised'{..}+ = object+ (catMaybes+ [("email" .=) <$> _dcEmail,+ ("events" .=) <$> _dcEvents])++-- | A state-sponsored attack alert. Derived from audit logs.+--+-- /See:/ 'stateSponsoredAttack' smart constructor.+newtype StateSponsoredAttack = StateSponsoredAttack'+ { _ssaEmail :: Maybe Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'StateSponsoredAttack' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ssaEmail'+stateSponsoredAttack+ :: StateSponsoredAttack+stateSponsoredAttack =+ StateSponsoredAttack'+ { _ssaEmail = Nothing+ }++-- | The email of the user this incident was created for.+ssaEmail :: Lens' StateSponsoredAttack (Maybe Text)+ssaEmail = lens _ssaEmail (\ s a -> s{_ssaEmail = a})++instance FromJSON StateSponsoredAttack where+ parseJSON+ = withObject "StateSponsoredAttack"+ (\ o -> StateSponsoredAttack' <$> (o .:? "email"))++instance ToJSON StateSponsoredAttack where+ toJSON StateSponsoredAttack'{..}+ = object (catMaybes [("email" .=) <$> _ssaEmail])++-- | Alert for setting the domain or IP that malicious email comes from as+-- whitelisted domain or IP in Gmail advanced settings.+--+-- /See:/ 'badWhiteList' smart constructor.+data BadWhiteList = BadWhiteList'+ { _bwlSourceIP :: !(Maybe Text)+ , _bwlDomainId :: !(Maybe DomainId)+ , _bwlMessages :: !(Maybe [GmailMessageInfo])+ , _bwlMaliciousEntity :: !(Maybe MaliciousEntity)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'BadWhiteList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bwlSourceIP'+--+-- * 'bwlDomainId'+--+-- * 'bwlMessages'+--+-- * 'bwlMaliciousEntity'+badWhiteList+ :: BadWhiteList+badWhiteList =+ BadWhiteList'+ { _bwlSourceIP = Nothing+ , _bwlDomainId = Nothing+ , _bwlMessages = Nothing+ , _bwlMaliciousEntity = Nothing+ }++-- | The source IP address of the malicious email, for example,+-- \`127.0.0.1\`.+bwlSourceIP :: Lens' BadWhiteList (Maybe Text)+bwlSourceIP+ = lens _bwlSourceIP (\ s a -> s{_bwlSourceIP = a})++-- | The domain ID.+bwlDomainId :: Lens' BadWhiteList (Maybe DomainId)+bwlDomainId+ = lens _bwlDomainId (\ s a -> s{_bwlDomainId = a})++-- | The list of messages contained by this alert.+bwlMessages :: Lens' BadWhiteList [GmailMessageInfo]+bwlMessages+ = lens _bwlMessages (\ s a -> s{_bwlMessages = a}) .+ _Default+ . _Coerce++-- | The entity whose actions triggered a Gmail phishing alert.+bwlMaliciousEntity :: Lens' BadWhiteList (Maybe MaliciousEntity)+bwlMaliciousEntity+ = lens _bwlMaliciousEntity+ (\ s a -> s{_bwlMaliciousEntity = a})++instance FromJSON BadWhiteList where+ parseJSON+ = withObject "BadWhiteList"+ (\ o ->+ BadWhiteList' <$>+ (o .:? "sourceIp") <*> (o .:? "domainId") <*>+ (o .:? "messages" .!= mempty)+ <*> (o .:? "maliciousEntity"))++instance ToJSON BadWhiteList where+ toJSON BadWhiteList'{..}+ = object+ (catMaybes+ [("sourceIp" .=) <$> _bwlSourceIP,+ ("domainId" .=) <$> _bwlDomainId,+ ("messages" .=) <$> _bwlMessages,+ ("maliciousEntity" .=) <$> _bwlMaliciousEntity])++-- | Detailed information of a single MDM suspicious activity event.+--+-- /See:/ 'suspiciousActivitySecurityDetail' smart constructor.+data SuspiciousActivitySecurityDetail = SuspiciousActivitySecurityDetail'+ { _sasdDeviceProperty :: !(Maybe Text)+ , _sasdResourceId :: !(Maybe Text)+ , _sasdIosVendorId :: !(Maybe Text)+ , _sasdOldValue :: !(Maybe Text)+ , _sasdNewValue :: !(Maybe Text)+ , _sasdDeviceModel :: !(Maybe Text)+ , _sasdDeviceId :: !(Maybe Text)+ , _sasdDeviceType :: !(Maybe Text)+ , _sasdSerialNumber :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SuspiciousActivitySecurityDetail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sasdDeviceProperty'+--+-- * 'sasdResourceId'+--+-- * 'sasdIosVendorId'+--+-- * 'sasdOldValue'+--+-- * 'sasdNewValue'+--+-- * 'sasdDeviceModel'+--+-- * 'sasdDeviceId'+--+-- * 'sasdDeviceType'+--+-- * 'sasdSerialNumber'+suspiciousActivitySecurityDetail+ :: SuspiciousActivitySecurityDetail+suspiciousActivitySecurityDetail =+ SuspiciousActivitySecurityDetail'+ { _sasdDeviceProperty = Nothing+ , _sasdResourceId = Nothing+ , _sasdIosVendorId = Nothing+ , _sasdOldValue = Nothing+ , _sasdNewValue = Nothing+ , _sasdDeviceModel = Nothing+ , _sasdDeviceId = Nothing+ , _sasdDeviceType = Nothing+ , _sasdSerialNumber = Nothing+ }++-- | The device property which was changed.+sasdDeviceProperty :: Lens' SuspiciousActivitySecurityDetail (Maybe Text)+sasdDeviceProperty+ = lens _sasdDeviceProperty+ (\ s a -> s{_sasdDeviceProperty = a})++-- | The device resource ID.+sasdResourceId :: Lens' SuspiciousActivitySecurityDetail (Maybe Text)+sasdResourceId+ = lens _sasdResourceId+ (\ s a -> s{_sasdResourceId = a})++-- | Required for iOS, empty for others.+sasdIosVendorId :: Lens' SuspiciousActivitySecurityDetail (Maybe Text)+sasdIosVendorId+ = lens _sasdIosVendorId+ (\ s a -> s{_sasdIosVendorId = a})++-- | The old value of the device property before the change.+sasdOldValue :: Lens' SuspiciousActivitySecurityDetail (Maybe Text)+sasdOldValue+ = lens _sasdOldValue (\ s a -> s{_sasdOldValue = a})++-- | The new value of the device property after the change.+sasdNewValue :: Lens' SuspiciousActivitySecurityDetail (Maybe Text)+sasdNewValue+ = lens _sasdNewValue (\ s a -> s{_sasdNewValue = a})++-- | The model of the device.+sasdDeviceModel :: Lens' SuspiciousActivitySecurityDetail (Maybe Text)+sasdDeviceModel+ = lens _sasdDeviceModel+ (\ s a -> s{_sasdDeviceModel = a})++-- | Required. The device ID.+sasdDeviceId :: Lens' SuspiciousActivitySecurityDetail (Maybe Text)+sasdDeviceId+ = lens _sasdDeviceId (\ s a -> s{_sasdDeviceId = a})++-- | The type of the device.+sasdDeviceType :: Lens' SuspiciousActivitySecurityDetail (Maybe Text)+sasdDeviceType+ = lens _sasdDeviceType+ (\ s a -> s{_sasdDeviceType = a})++-- | The serial number of the device.+sasdSerialNumber :: Lens' SuspiciousActivitySecurityDetail (Maybe Text)+sasdSerialNumber+ = lens _sasdSerialNumber+ (\ s a -> s{_sasdSerialNumber = a})++instance FromJSON SuspiciousActivitySecurityDetail+ where+ parseJSON+ = withObject "SuspiciousActivitySecurityDetail"+ (\ o ->+ SuspiciousActivitySecurityDetail' <$>+ (o .:? "deviceProperty") <*> (o .:? "resourceId") <*>+ (o .:? "iosVendorId")+ <*> (o .:? "oldValue")+ <*> (o .:? "newValue")+ <*> (o .:? "deviceModel")+ <*> (o .:? "deviceId")+ <*> (o .:? "deviceType")+ <*> (o .:? "serialNumber"))++instance ToJSON SuspiciousActivitySecurityDetail+ where+ toJSON SuspiciousActivitySecurityDetail'{..}+ = object+ (catMaybes+ [("deviceProperty" .=) <$> _sasdDeviceProperty,+ ("resourceId" .=) <$> _sasdResourceId,+ ("iosVendorId" .=) <$> _sasdIosVendorId,+ ("oldValue" .=) <$> _sasdOldValue,+ ("newValue" .=) <$> _sasdNewValue,+ ("deviceModel" .=) <$> _sasdDeviceModel,+ ("deviceId" .=) <$> _sasdDeviceId,+ ("deviceType" .=) <$> _sasdDeviceType,+ ("serialNumber" .=) <$> _sasdSerialNumber])++-- | A generic empty message that you can re-use to avoid defining duplicated+-- empty messages in your APIs. A typical example is to use it as the+-- request or the response type of an API method. For instance: service Foo+-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The+-- JSON representation for \`Empty\` is empty JSON object \`{}\`.+--+-- /See:/ 'empty' smart constructor.+data Empty =+ Empty'+ deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Empty' with the minimum fields required to make a request.+--+empty+ :: Empty+empty = Empty'++instance FromJSON Empty where+ parseJSON = withObject "Empty" (\ o -> pure Empty')++instance ToJSON Empty where+ toJSON = const emptyObject++-- | A request to undelete a specific alert that was marked for deletion.+--+-- /See:/ 'undeleteAlertRequest' smart constructor.+newtype UndeleteAlertRequest = UndeleteAlertRequest'+ { _uarCustomerId :: Maybe Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'UndeleteAlertRequest' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uarCustomerId'+undeleteAlertRequest+ :: UndeleteAlertRequest+undeleteAlertRequest =+ UndeleteAlertRequest'+ { _uarCustomerId = Nothing+ }++-- | Optional. The unique identifier of the G Suite organization account of+-- the customer the alert is associated with. Inferred from the caller+-- identity if not provided.+uarCustomerId :: Lens' UndeleteAlertRequest (Maybe Text)+uarCustomerId+ = lens _uarCustomerId+ (\ s a -> s{_uarCustomerId = a})++instance FromJSON UndeleteAlertRequest where+ parseJSON+ = withObject "UndeleteAlertRequest"+ (\ o ->+ UndeleteAlertRequest' <$> (o .:? "customerId"))++instance ToJSON UndeleteAlertRequest where+ toJSON UndeleteAlertRequest'{..}+ = object+ (catMaybes [("customerId" .=) <$> _uarCustomerId])++-- | Customer-level settings.+--+-- /See:/ 'settings' smart constructor.+newtype Settings = Settings'+ { _sNotifications :: Maybe [Notification]+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Settings' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sNotifications'+settings+ :: Settings+settings =+ Settings'+ { _sNotifications = Nothing+ }++-- | The list of notifications.+sNotifications :: Lens' Settings [Notification]+sNotifications+ = lens _sNotifications+ (\ s a -> s{_sNotifications = a})+ . _Default+ . _Coerce++instance FromJSON Settings where+ parseJSON+ = withObject "Settings"+ (\ o ->+ Settings' <$> (o .:? "notifications" .!= mempty))++instance ToJSON Settings where+ toJSON Settings'{..}+ = object+ (catMaybes+ [("notifications" .=) <$> _sNotifications])++-- | Settings for callback notifications. For more details see [G Suite Alert+-- Notification](\/admin-sdk\/alertcenter\/guides\/notifications).+--+-- /See:/ 'notification' smart constructor.+newtype Notification = Notification'+ { _nCloudPubsubTopic :: Maybe CloudPubsubTopic+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Notification' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'nCloudPubsubTopic'+notification+ :: Notification+notification =+ Notification'+ { _nCloudPubsubTopic = Nothing+ }++-- | A Google Cloud Pub\/sub topic destination.+nCloudPubsubTopic :: Lens' Notification (Maybe CloudPubsubTopic)+nCloudPubsubTopic+ = lens _nCloudPubsubTopic+ (\ s a -> s{_nCloudPubsubTopic = a})++instance FromJSON Notification where+ parseJSON+ = withObject "Notification"+ (\ o -> Notification' <$> (o .:? "cloudPubsubTopic"))++instance ToJSON Notification where+ toJSON Notification'{..}+ = object+ (catMaybes+ [("cloudPubsubTopic" .=) <$> _nCloudPubsubTopic])++-- | Alerts for user account warning events.+--+-- /See:/ 'accountWarning' smart constructor.+data AccountWarning = AccountWarning'+ { _awEmail :: !(Maybe Text)+ , _awLoginDetails :: !(Maybe LoginDetails)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'AccountWarning' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'awEmail'+--+-- * 'awLoginDetails'+accountWarning+ :: AccountWarning+accountWarning =+ AccountWarning'+ { _awEmail = Nothing+ , _awLoginDetails = Nothing+ }++-- | Required. The email of the user that this event belongs to.+awEmail :: Lens' AccountWarning (Maybe Text)+awEmail = lens _awEmail (\ s a -> s{_awEmail = a})++-- | Optional. Details of the login action associated with the warning event.+-- This is only available for: * Suspicious login * Suspicious login (less+-- secure app) * User suspended (suspicious activity)+awLoginDetails :: Lens' AccountWarning (Maybe LoginDetails)+awLoginDetails+ = lens _awLoginDetails+ (\ s a -> s{_awLoginDetails = a})++instance FromJSON AccountWarning where+ parseJSON+ = withObject "AccountWarning"+ (\ o ->+ AccountWarning' <$>+ (o .:? "email") <*> (o .:? "loginDetails"))++instance ToJSON AccountWarning where+ toJSON AccountWarning'{..}+ = object+ (catMaybes+ [("email" .=) <$> _awEmail,+ ("loginDetails" .=) <$> _awLoginDetails])++-- | Proto for all phishing alerts with common payload. Supported types are+-- any of the following: * User reported phishing * User reported spam+-- spike * Suspicious message reported * Phishing reclassification *+-- Malware reclassification+--+-- /See:/ 'mailPhishing' smart constructor.+data MailPhishing = MailPhishing'+ { _mpIsInternal :: !(Maybe Bool)+ , _mpDomainId :: !(Maybe DomainId)+ , _mpMessages :: !(Maybe [GmailMessageInfo])+ , _mpMaliciousEntity :: !(Maybe MaliciousEntity)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'MailPhishing' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'mpIsInternal'+--+-- * 'mpDomainId'+--+-- * 'mpMessages'+--+-- * 'mpMaliciousEntity'+mailPhishing+ :: MailPhishing+mailPhishing =+ MailPhishing'+ { _mpIsInternal = Nothing+ , _mpDomainId = Nothing+ , _mpMessages = Nothing+ , _mpMaliciousEntity = Nothing+ }++-- | If \`true\`, the email originated from within the organization.+mpIsInternal :: Lens' MailPhishing (Maybe Bool)+mpIsInternal+ = lens _mpIsInternal (\ s a -> s{_mpIsInternal = a})++-- | The domain ID.+mpDomainId :: Lens' MailPhishing (Maybe DomainId)+mpDomainId+ = lens _mpDomainId (\ s a -> s{_mpDomainId = a})++-- | The list of messages contained by this alert.+mpMessages :: Lens' MailPhishing [GmailMessageInfo]+mpMessages+ = lens _mpMessages (\ s a -> s{_mpMessages = a}) .+ _Default+ . _Coerce++-- | The entity whose actions triggered a Gmail phishing alert.+mpMaliciousEntity :: Lens' MailPhishing (Maybe MaliciousEntity)+mpMaliciousEntity+ = lens _mpMaliciousEntity+ (\ s a -> s{_mpMaliciousEntity = a})++instance FromJSON MailPhishing where+ parseJSON+ = withObject "MailPhishing"+ (\ o ->+ MailPhishing' <$>+ (o .:? "isInternal") <*> (o .:? "domainId") <*>+ (o .:? "messages" .!= mempty)+ <*> (o .:? "maliciousEntity"))++instance ToJSON MailPhishing where+ toJSON MailPhishing'{..}+ = object+ (catMaybes+ [("isInternal" .=) <$> _mpIsInternal,+ ("domainId" .=) <$> _mpDomainId,+ ("messages" .=) <$> _mpMessages,+ ("maliciousEntity" .=) <$> _mpMaliciousEntity])++-- | Details of a message in phishing spike alert.+--+-- /See:/ 'gmailMessageInfo' smart constructor.+data GmailMessageInfo = GmailMessageInfo'+ { _gmiMD5HashSubject :: !(Maybe Text)+ , _gmiSubjectText :: !(Maybe Text)+ , _gmiDate :: !(Maybe DateTime')+ , _gmiMD5HashMessageBody :: !(Maybe Text)+ , _gmiAttachmentsSha256Hash :: !(Maybe [Text])+ , _gmiRecipient :: !(Maybe Text)+ , _gmiMessageBodySnippet :: !(Maybe Text)+ , _gmiMessageId :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'GmailMessageInfo' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gmiMD5HashSubject'+--+-- * 'gmiSubjectText'+--+-- * 'gmiDate'+--+-- * 'gmiMD5HashMessageBody'+--+-- * 'gmiAttachmentsSha256Hash'+--+-- * 'gmiRecipient'+--+-- * 'gmiMessageBodySnippet'+--+-- * 'gmiMessageId'+gmailMessageInfo+ :: GmailMessageInfo+gmailMessageInfo =+ GmailMessageInfo'+ { _gmiMD5HashSubject = Nothing+ , _gmiSubjectText = Nothing+ , _gmiDate = Nothing+ , _gmiMD5HashMessageBody = Nothing+ , _gmiAttachmentsSha256Hash = Nothing+ , _gmiRecipient = Nothing+ , _gmiMessageBodySnippet = Nothing+ , _gmiMessageId = Nothing+ }++-- | The MD5 Hash of email\'s subject (only available for reported emails).+gmiMD5HashSubject :: Lens' GmailMessageInfo (Maybe Text)+gmiMD5HashSubject+ = lens _gmiMD5HashSubject+ (\ s a -> s{_gmiMD5HashSubject = a})++-- | The email subject text (only available for reported emails).+gmiSubjectText :: Lens' GmailMessageInfo (Maybe Text)+gmiSubjectText+ = lens _gmiSubjectText+ (\ s a -> s{_gmiSubjectText = a})++-- | The date the malicious email was sent.+gmiDate :: Lens' GmailMessageInfo (Maybe UTCTime)+gmiDate+ = lens _gmiDate (\ s a -> s{_gmiDate = a}) .+ mapping _DateTime++-- | The hash of the message body text.+gmiMD5HashMessageBody :: Lens' GmailMessageInfo (Maybe Text)+gmiMD5HashMessageBody+ = lens _gmiMD5HashMessageBody+ (\ s a -> s{_gmiMD5HashMessageBody = a})++-- | The \`SHA256\` hash of email\'s attachment and all MIME parts.+gmiAttachmentsSha256Hash :: Lens' GmailMessageInfo [Text]+gmiAttachmentsSha256Hash+ = lens _gmiAttachmentsSha256Hash+ (\ s a -> s{_gmiAttachmentsSha256Hash = a})+ . _Default+ . _Coerce++-- | The recipient of this email.+gmiRecipient :: Lens' GmailMessageInfo (Maybe Text)+gmiRecipient+ = lens _gmiRecipient (\ s a -> s{_gmiRecipient = a})++-- | The snippet of the message body text (only available for reported+-- emails).+gmiMessageBodySnippet :: Lens' GmailMessageInfo (Maybe Text)+gmiMessageBodySnippet+ = lens _gmiMessageBodySnippet+ (\ s a -> s{_gmiMessageBodySnippet = a})++-- | The message ID.+gmiMessageId :: Lens' GmailMessageInfo (Maybe Text)+gmiMessageId+ = lens _gmiMessageId (\ s a -> s{_gmiMessageId = a})++instance FromJSON GmailMessageInfo where+ parseJSON+ = withObject "GmailMessageInfo"+ (\ o ->+ GmailMessageInfo' <$>+ (o .:? "md5HashSubject") <*> (o .:? "subjectText")+ <*> (o .:? "date")+ <*> (o .:? "md5HashMessageBody")+ <*> (o .:? "attachmentsSha256Hash" .!= mempty)+ <*> (o .:? "recipient")+ <*> (o .:? "messageBodySnippet")+ <*> (o .:? "messageId"))++instance ToJSON GmailMessageInfo where+ toJSON GmailMessageInfo'{..}+ = object+ (catMaybes+ [("md5HashSubject" .=) <$> _gmiMD5HashSubject,+ ("subjectText" .=) <$> _gmiSubjectText,+ ("date" .=) <$> _gmiDate,+ ("md5HashMessageBody" .=) <$> _gmiMD5HashMessageBody,+ ("attachmentsSha256Hash" .=) <$>+ _gmiAttachmentsSha256Hash,+ ("recipient" .=) <$> _gmiRecipient,+ ("messageBodySnippet" .=) <$> _gmiMessageBodySnippet,+ ("messageId" .=) <$> _gmiMessageId])++-- | Optional. The data associated with this alert, for example+-- google.apps.alertcenter.type.DeviceCompromised.+--+-- /See:/ 'alertData' smart constructor.+newtype AlertData = AlertData'+ { _adAddtional :: HashMap Text JSONValue+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'AlertData' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'adAddtional'+alertData+ :: HashMap Text JSONValue -- ^ 'adAddtional'+ -> AlertData+alertData pAdAddtional_ =+ AlertData'+ { _adAddtional = _Coerce # pAdAddtional_+ }++-- | Properties of the object. Contains field \'type with type URL.+adAddtional :: Lens' AlertData (HashMap Text JSONValue)+adAddtional+ = lens _adAddtional (\ s a -> s{_adAddtional = a}) .+ _Coerce++instance FromJSON AlertData where+ parseJSON+ = withObject "AlertData"+ (\ o -> AlertData' <$> (parseJSONObject o))++instance ToJSON AlertData where+ toJSON = toJSON . _adAddtional++-- | Alert for a spike in user reported phishing.+-- __Warning__: This type has been deprecated. Use+-- [MailPhishing](\/admin-sdk\/alertcenter\/reference\/rest\/v1beta1\/MailPhishing)+-- instead.+--+-- /See:/ 'phishingSpike' smart constructor.+data PhishingSpike = PhishingSpike'+ { _psIsInternal :: !(Maybe Bool)+ , _psDomainId :: !(Maybe DomainId)+ , _psMessages :: !(Maybe [GmailMessageInfo])+ , _psMaliciousEntity :: !(Maybe MaliciousEntity)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'PhishingSpike' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'psIsInternal'+--+-- * 'psDomainId'+--+-- * 'psMessages'+--+-- * 'psMaliciousEntity'+phishingSpike+ :: PhishingSpike+phishingSpike =+ PhishingSpike'+ { _psIsInternal = Nothing+ , _psDomainId = Nothing+ , _psMessages = Nothing+ , _psMaliciousEntity = Nothing+ }++-- | If \`true\`, the email originated from within the organization.+psIsInternal :: Lens' PhishingSpike (Maybe Bool)+psIsInternal+ = lens _psIsInternal (\ s a -> s{_psIsInternal = a})++-- | The domain ID.+psDomainId :: Lens' PhishingSpike (Maybe DomainId)+psDomainId+ = lens _psDomainId (\ s a -> s{_psDomainId = a})++-- | The list of messages contained by this alert.+psMessages :: Lens' PhishingSpike [GmailMessageInfo]+psMessages+ = lens _psMessages (\ s a -> s{_psMessages = a}) .+ _Default+ . _Coerce++-- | The entity whose actions triggered a Gmail phishing alert.+psMaliciousEntity :: Lens' PhishingSpike (Maybe MaliciousEntity)+psMaliciousEntity+ = lens _psMaliciousEntity+ (\ s a -> s{_psMaliciousEntity = a})++instance FromJSON PhishingSpike where+ parseJSON+ = withObject "PhishingSpike"+ (\ o ->+ PhishingSpike' <$>+ (o .:? "isInternal") <*> (o .:? "domainId") <*>+ (o .:? "messages" .!= mempty)+ <*> (o .:? "maliciousEntity"))++instance ToJSON PhishingSpike where+ toJSON PhishingSpike'{..}+ = object+ (catMaybes+ [("isInternal" .=) <$> _psIsInternal,+ ("domainId" .=) <$> _psDomainId,+ ("messages" .=) <$> _psMessages,+ ("maliciousEntity" .=) <$> _psMaliciousEntity])++-- | A representation of a CSV file attachment, as a list of column headers+-- and a list of data rows.+--+-- /See:/ 'csv' smart constructor.+data CSV = CSV'+ { _cDataRows :: !(Maybe [CSVRow])+ , _cHeaders :: !(Maybe [Text])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CSV' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cDataRows'+--+-- * 'cHeaders'+csv+ :: CSV+csv =+ CSV'+ { _cDataRows = Nothing+ , _cHeaders = Nothing+ }++-- | The list of data rows in a CSV file, as string arrays rather than as a+-- single comma-separated string.+cDataRows :: Lens' CSV [CSVRow]+cDataRows+ = lens _cDataRows (\ s a -> s{_cDataRows = a}) .+ _Default+ . _Coerce++-- | The list of headers for data columns in a CSV file.+cHeaders :: Lens' CSV [Text]+cHeaders+ = lens _cHeaders (\ s a -> s{_cHeaders = a}) .+ _Default+ . _Coerce++instance FromJSON CSV where+ parseJSON+ = withObject "CSV"+ (\ o ->+ CSV' <$>+ (o .:? "dataRows" .!= mempty) <*>+ (o .:? "headers" .!= mempty))++instance ToJSON CSV where+ toJSON CSV'{..}+ = object+ (catMaybes+ [("dataRows" .=) <$> _cDataRows,+ ("headers" .=) <$> _cHeaders])++-- | An alert affecting a customer. All fields are read-only once created.+--+-- /See:/ 'alert' smart constructor.+data Alert = Alert'+ { _aStartTime :: !(Maybe DateTime')+ , _aData :: !(Maybe AlertData)+ , _aAlertId :: !(Maybe Text)+ , _aSecurityInvestigationToolLink :: !(Maybe Text)+ , _aCustomerId :: !(Maybe Text)+ , _aEndTime :: !(Maybe DateTime')+ , _aSource :: !(Maybe Text)+ , _aDeleted :: !(Maybe Bool)+ , _aType :: !(Maybe Text)+ , _aCreateTime :: !(Maybe DateTime')+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Alert' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aStartTime'+--+-- * 'aData'+--+-- * 'aAlertId'+--+-- * 'aSecurityInvestigationToolLink'+--+-- * 'aCustomerId'+--+-- * 'aEndTime'+--+-- * 'aSource'+--+-- * 'aDeleted'+--+-- * 'aType'+--+-- * 'aCreateTime'+alert+ :: Alert+alert =+ Alert'+ { _aStartTime = Nothing+ , _aData = Nothing+ , _aAlertId = Nothing+ , _aSecurityInvestigationToolLink = Nothing+ , _aCustomerId = Nothing+ , _aEndTime = Nothing+ , _aSource = Nothing+ , _aDeleted = Nothing+ , _aType = Nothing+ , _aCreateTime = Nothing+ }++-- | Required. The time the event that caused this alert was started or+-- detected.+aStartTime :: Lens' Alert (Maybe UTCTime)+aStartTime+ = lens _aStartTime (\ s a -> s{_aStartTime = a}) .+ mapping _DateTime++-- | Optional. The data associated with this alert, for example+-- google.apps.alertcenter.type.DeviceCompromised.+aData :: Lens' Alert (Maybe AlertData)+aData = lens _aData (\ s a -> s{_aData = a})++-- | Output only. The unique identifier for the alert.+aAlertId :: Lens' Alert (Maybe Text)+aAlertId = lens _aAlertId (\ s a -> s{_aAlertId = a})++-- | Output only. An optional [Security Investigation+-- Tool](https:\/\/support.google.com\/a\/answer\/7575955) query for this+-- alert.+aSecurityInvestigationToolLink :: Lens' Alert (Maybe Text)+aSecurityInvestigationToolLink+ = lens _aSecurityInvestigationToolLink+ (\ s a -> s{_aSecurityInvestigationToolLink = a})++-- | Output only. The unique identifier of the Google account of the+-- customer.+aCustomerId :: Lens' Alert (Maybe Text)+aCustomerId+ = lens _aCustomerId (\ s a -> s{_aCustomerId = a})++-- | Optional. The time the event that caused this alert ceased being active.+-- If provided, the end time must not be earlier than the start time. If+-- not provided, the end time defaults to the start time.+aEndTime :: Lens' Alert (Maybe UTCTime)+aEndTime+ = lens _aEndTime (\ s a -> s{_aEndTime = a}) .+ mapping _DateTime++-- | Required. A unique identifier for the system that reported the alert.+-- Supported sources are any of the following: * Google Operations * Mobile+-- device management * Gmail phishing * Domain wide takeout * Government+-- attack warning * Google identity+aSource :: Lens' Alert (Maybe Text)+aSource = lens _aSource (\ s a -> s{_aSource = a})++-- | Output only. \`True\` if this alert is marked for deletion.+aDeleted :: Lens' Alert (Maybe Bool)+aDeleted = lens _aDeleted (\ s a -> s{_aDeleted = a})++-- | Required. The type of the alert. For a list of available alert types see+-- [G Suite Alert types](\/admin-sdk\/alertcenter\/reference\/alert-types).+aType :: Lens' Alert (Maybe Text)+aType = lens _aType (\ s a -> s{_aType = a})++-- | Output only. The time this alert was created.+aCreateTime :: Lens' Alert (Maybe UTCTime)+aCreateTime+ = lens _aCreateTime (\ s a -> s{_aCreateTime = a}) .+ mapping _DateTime++instance FromJSON Alert where+ parseJSON+ = withObject "Alert"+ (\ o ->+ Alert' <$>+ (o .:? "startTime") <*> (o .:? "data") <*>+ (o .:? "alertId")+ <*> (o .:? "securityInvestigationToolLink")+ <*> (o .:? "customerId")+ <*> (o .:? "endTime")+ <*> (o .:? "source")+ <*> (o .:? "deleted")+ <*> (o .:? "type")+ <*> (o .:? "createTime"))++instance ToJSON Alert where+ toJSON Alert'{..}+ = object+ (catMaybes+ [("startTime" .=) <$> _aStartTime,+ ("data" .=) <$> _aData, ("alertId" .=) <$> _aAlertId,+ ("securityInvestigationToolLink" .=) <$>+ _aSecurityInvestigationToolLink,+ ("customerId" .=) <$> _aCustomerId,+ ("endTime" .=) <$> _aEndTime,+ ("source" .=) <$> _aSource,+ ("deleted" .=) <$> _aDeleted, ("type" .=) <$> _aType,+ ("createTime" .=) <$> _aCreateTime])++-- | Attachment with application-specific information about an alert.+--+-- /See:/ 'attachment' smart constructor.+newtype Attachment = Attachment'+ { _aCSV :: Maybe CSV+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Attachment' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aCSV'+attachment+ :: Attachment+attachment =+ Attachment'+ { _aCSV = Nothing+ }++-- | A CSV file attachment.+aCSV :: Lens' Attachment (Maybe CSV)+aCSV = lens _aCSV (\ s a -> s{_aCSV = a})++instance FromJSON Attachment where+ parseJSON+ = withObject "Attachment"+ (\ o -> Attachment' <$> (o .:? "csv"))++instance ToJSON Attachment where+ toJSON Attachment'{..}+ = object (catMaybes [("csv" .=) <$> _aCSV])++-- | An incident reported by Google Operations for a G Suite application.+--+-- /See:/ 'googleOperations' smart constructor.+data GoogleOperations = GoogleOperations'+ { _goAttachmentData :: !(Maybe Attachment)+ , _goAffectedUserEmails :: !(Maybe [Text])+ , _goTitle :: !(Maybe Text)+ , _goDescription :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'GoogleOperations' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'goAttachmentData'+--+-- * 'goAffectedUserEmails'+--+-- * 'goTitle'+--+-- * 'goDescription'+googleOperations+ :: GoogleOperations+googleOperations =+ GoogleOperations'+ { _goAttachmentData = Nothing+ , _goAffectedUserEmails = Nothing+ , _goTitle = Nothing+ , _goDescription = Nothing+ }++-- | Optional. Application-specific data for an incident, provided when the G+-- Suite application which reported the incident cannot be completely+-- restored to a valid state.+goAttachmentData :: Lens' GoogleOperations (Maybe Attachment)+goAttachmentData+ = lens _goAttachmentData+ (\ s a -> s{_goAttachmentData = a})++-- | The list of emails which correspond to the users directly affected by+-- the incident.+goAffectedUserEmails :: Lens' GoogleOperations [Text]+goAffectedUserEmails+ = lens _goAffectedUserEmails+ (\ s a -> s{_goAffectedUserEmails = a})+ . _Default+ . _Coerce++-- | A one-line incident description.+goTitle :: Lens' GoogleOperations (Maybe Text)+goTitle = lens _goTitle (\ s a -> s{_goTitle = a})++-- | A detailed, freeform incident description.+goDescription :: Lens' GoogleOperations (Maybe Text)+goDescription+ = lens _goDescription+ (\ s a -> s{_goDescription = a})++instance FromJSON GoogleOperations where+ parseJSON+ = withObject "GoogleOperations"+ (\ o ->+ GoogleOperations' <$>+ (o .:? "attachmentData") <*>+ (o .:? "affectedUserEmails" .!= mempty)+ <*> (o .:? "title")+ <*> (o .:? "description"))++instance ToJSON GoogleOperations where+ toJSON GoogleOperations'{..}+ = object+ (catMaybes+ [("attachmentData" .=) <$> _goAttachmentData,+ ("affectedUserEmails" .=) <$> _goAffectedUserEmails,+ ("title" .=) <$> _goTitle,+ ("description" .=) <$> _goDescription])++-- | A mobile suspicious activity alert. Derived from audit logs.+--+-- /See:/ 'suspiciousActivity' smart constructor.+data SuspiciousActivity = SuspiciousActivity'+ { _saEmail :: !(Maybe Text)+ , _saEvents :: !(Maybe [SuspiciousActivitySecurityDetail])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SuspiciousActivity' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'saEmail'+--+-- * 'saEvents'+suspiciousActivity+ :: SuspiciousActivity+suspiciousActivity =+ SuspiciousActivity'+ { _saEmail = Nothing+ , _saEvents = Nothing+ }++-- | The email of the user this alert was created for.+saEmail :: Lens' SuspiciousActivity (Maybe Text)+saEmail = lens _saEmail (\ s a -> s{_saEmail = a})++-- | Required. The list of security events.+saEvents :: Lens' SuspiciousActivity [SuspiciousActivitySecurityDetail]+saEvents+ = lens _saEvents (\ s a -> s{_saEvents = a}) .+ _Default+ . _Coerce++instance FromJSON SuspiciousActivity where+ parseJSON+ = withObject "SuspiciousActivity"+ (\ o ->+ SuspiciousActivity' <$>+ (o .:? "email") <*> (o .:? "events" .!= mempty))++instance ToJSON SuspiciousActivity where+ toJSON SuspiciousActivity'{..}+ = object+ (catMaybes+ [("email" .=) <$> _saEmail,+ ("events" .=) <$> _saEvents])++-- | A takeout operation for the entire domain was initiated by an admin.+-- Derived from audit logs.+--+-- /See:/ 'domainWideTakeoutInitiated' smart constructor.+data DomainWideTakeoutInitiated = DomainWideTakeoutInitiated'+ { _dwtiEmail :: !(Maybe Text)+ , _dwtiTakeoutRequestId :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'DomainWideTakeoutInitiated' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dwtiEmail'+--+-- * 'dwtiTakeoutRequestId'+domainWideTakeoutInitiated+ :: DomainWideTakeoutInitiated+domainWideTakeoutInitiated =+ DomainWideTakeoutInitiated'+ { _dwtiEmail = Nothing+ , _dwtiTakeoutRequestId = Nothing+ }++-- | The email of the admin who initiated the takeout.+dwtiEmail :: Lens' DomainWideTakeoutInitiated (Maybe Text)+dwtiEmail+ = lens _dwtiEmail (\ s a -> s{_dwtiEmail = a})++-- | The takeout request ID.+dwtiTakeoutRequestId :: Lens' DomainWideTakeoutInitiated (Maybe Text)+dwtiTakeoutRequestId+ = lens _dwtiTakeoutRequestId+ (\ s a -> s{_dwtiTakeoutRequestId = a})++instance FromJSON DomainWideTakeoutInitiated where+ parseJSON+ = withObject "DomainWideTakeoutInitiated"+ (\ o ->+ DomainWideTakeoutInitiated' <$>+ (o .:? "email") <*> (o .:? "takeoutRequestId"))++instance ToJSON DomainWideTakeoutInitiated where+ toJSON DomainWideTakeoutInitiated'{..}+ = object+ (catMaybes+ [("email" .=) <$> _dwtiEmail,+ ("takeoutRequestId" .=) <$> _dwtiTakeoutRequestId])++-- | Domain ID of Gmail phishing alerts.+--+-- /See:/ 'domainId' smart constructor.+newtype DomainId = DomainId'+ { _diCustomerPrimaryDomain :: Maybe Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'DomainId' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'diCustomerPrimaryDomain'+domainId+ :: DomainId+domainId =+ DomainId'+ { _diCustomerPrimaryDomain = Nothing+ }++-- | The primary domain for the customer.+diCustomerPrimaryDomain :: Lens' DomainId (Maybe Text)+diCustomerPrimaryDomain+ = lens _diCustomerPrimaryDomain+ (\ s a -> s{_diCustomerPrimaryDomain = a})++instance FromJSON DomainId where+ parseJSON+ = withObject "DomainId"+ (\ o ->+ DomainId' <$> (o .:? "customerPrimaryDomain"))++instance ToJSON DomainId where+ toJSON DomainId'{..}+ = object+ (catMaybes+ [("customerPrimaryDomain" .=) <$>+ _diCustomerPrimaryDomain])++-- | Detailed information of a single MDM device compromised event.+--+-- /See:/ 'deviceCompromisedSecurityDetail' smart constructor.+data DeviceCompromisedSecurityDetail = DeviceCompromisedSecurityDetail'+ { _dcsdResourceId :: !(Maybe Text)+ , _dcsdDeviceCompromisedState :: !(Maybe Text)+ , _dcsdIosVendorId :: !(Maybe Text)+ , _dcsdDeviceModel :: !(Maybe Text)+ , _dcsdDeviceId :: !(Maybe Text)+ , _dcsdDeviceType :: !(Maybe Text)+ , _dcsdSerialNumber :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeviceCompromisedSecurityDetail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcsdResourceId'+--+-- * 'dcsdDeviceCompromisedState'+--+-- * 'dcsdIosVendorId'+--+-- * 'dcsdDeviceModel'+--+-- * 'dcsdDeviceId'+--+-- * 'dcsdDeviceType'+--+-- * 'dcsdSerialNumber'+deviceCompromisedSecurityDetail+ :: DeviceCompromisedSecurityDetail+deviceCompromisedSecurityDetail =+ DeviceCompromisedSecurityDetail'+ { _dcsdResourceId = Nothing+ , _dcsdDeviceCompromisedState = Nothing+ , _dcsdIosVendorId = Nothing+ , _dcsdDeviceModel = Nothing+ , _dcsdDeviceId = Nothing+ , _dcsdDeviceType = Nothing+ , _dcsdSerialNumber = Nothing+ }++-- | The device resource ID.+dcsdResourceId :: Lens' DeviceCompromisedSecurityDetail (Maybe Text)+dcsdResourceId+ = lens _dcsdResourceId+ (\ s a -> s{_dcsdResourceId = a})++-- | The device compromised state. Possible values are \"\`Compromised\`\" or+-- \"\`Not Compromised\`\".+dcsdDeviceCompromisedState :: Lens' DeviceCompromisedSecurityDetail (Maybe Text)+dcsdDeviceCompromisedState+ = lens _dcsdDeviceCompromisedState+ (\ s a -> s{_dcsdDeviceCompromisedState = a})++-- | Required for iOS, empty for others.+dcsdIosVendorId :: Lens' DeviceCompromisedSecurityDetail (Maybe Text)+dcsdIosVendorId+ = lens _dcsdIosVendorId+ (\ s a -> s{_dcsdIosVendorId = a})++-- | The model of the device.+dcsdDeviceModel :: Lens' DeviceCompromisedSecurityDetail (Maybe Text)+dcsdDeviceModel+ = lens _dcsdDeviceModel+ (\ s a -> s{_dcsdDeviceModel = a})++-- | Required. The device ID.+dcsdDeviceId :: Lens' DeviceCompromisedSecurityDetail (Maybe Text)+dcsdDeviceId+ = lens _dcsdDeviceId (\ s a -> s{_dcsdDeviceId = a})++-- | The type of the device.+dcsdDeviceType :: Lens' DeviceCompromisedSecurityDetail (Maybe Text)+dcsdDeviceType+ = lens _dcsdDeviceType+ (\ s a -> s{_dcsdDeviceType = a})++-- | The serial number of the device.+dcsdSerialNumber :: Lens' DeviceCompromisedSecurityDetail (Maybe Text)+dcsdSerialNumber+ = lens _dcsdSerialNumber+ (\ s a -> s{_dcsdSerialNumber = a})++instance FromJSON DeviceCompromisedSecurityDetail+ where+ parseJSON+ = withObject "DeviceCompromisedSecurityDetail"+ (\ o ->+ DeviceCompromisedSecurityDetail' <$>+ (o .:? "resourceId") <*>+ (o .:? "deviceCompromisedState")+ <*> (o .:? "iosVendorId")+ <*> (o .:? "deviceModel")+ <*> (o .:? "deviceId")+ <*> (o .:? "deviceType")+ <*> (o .:? "serialNumber"))++instance ToJSON DeviceCompromisedSecurityDetail where+ toJSON DeviceCompromisedSecurityDetail'{..}+ = object+ (catMaybes+ [("resourceId" .=) <$> _dcsdResourceId,+ ("deviceCompromisedState" .=) <$>+ _dcsdDeviceCompromisedState,+ ("iosVendorId" .=) <$> _dcsdIosVendorId,+ ("deviceModel" .=) <$> _dcsdDeviceModel,+ ("deviceId" .=) <$> _dcsdDeviceId,+ ("deviceType" .=) <$> _dcsdDeviceType,+ ("serialNumber" .=) <$> _dcsdSerialNumber])++-- | A reference to a Cloud Pubsub topic. To register for notifications, the+-- owner of the topic must grant+-- \`alerts-api-push-notifications\'system.gserviceaccount.com\` the+-- \`projects.topics.publish\` permission.+--+-- /See:/ 'cloudPubsubTopic' smart constructor.+data CloudPubsubTopic = CloudPubsubTopic'+ { _cptTopicName :: !(Maybe Text)+ , _cptPayloadFormat :: !(Maybe CloudPubsubTopicPayloadFormat)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CloudPubsubTopic' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cptTopicName'+--+-- * 'cptPayloadFormat'+cloudPubsubTopic+ :: CloudPubsubTopic+cloudPubsubTopic =+ CloudPubsubTopic'+ { _cptTopicName = Nothing+ , _cptPayloadFormat = Nothing+ }++-- | The \`name\` field of a Cloud Pubsub [Topic]+-- (https:\/\/cloud.google.com\/pubsub\/docs\/reference\/rest\/v1\/projects.topics#Topic).+cptTopicName :: Lens' CloudPubsubTopic (Maybe Text)+cptTopicName+ = lens _cptTopicName (\ s a -> s{_cptTopicName = a})++-- | Optional. The format of the payload that would be sent. If not specified+-- the format will be JSON.+cptPayloadFormat :: Lens' CloudPubsubTopic (Maybe CloudPubsubTopicPayloadFormat)+cptPayloadFormat+ = lens _cptPayloadFormat+ (\ s a -> s{_cptPayloadFormat = a})++instance FromJSON CloudPubsubTopic where+ parseJSON+ = withObject "CloudPubsubTopic"+ (\ o ->+ CloudPubsubTopic' <$>+ (o .:? "topicName") <*> (o .:? "payloadFormat"))++instance ToJSON CloudPubsubTopic where+ toJSON CloudPubsubTopic'{..}+ = object+ (catMaybes+ [("topicName" .=) <$> _cptTopicName,+ ("payloadFormat" .=) <$> _cptPayloadFormat])++-- | Response message for an alert feedback listing request.+--+-- /See:/ 'listAlertFeedbackResponse' smart constructor.+newtype ListAlertFeedbackResponse = ListAlertFeedbackResponse'+ { _lafrFeedback :: Maybe [AlertFeedback]+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListAlertFeedbackResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lafrFeedback'+listAlertFeedbackResponse+ :: ListAlertFeedbackResponse+listAlertFeedbackResponse =+ ListAlertFeedbackResponse'+ { _lafrFeedback = Nothing+ }++-- | The list of alert feedback. Feedback entries for each alert are ordered+-- by creation time descending.+lafrFeedback :: Lens' ListAlertFeedbackResponse [AlertFeedback]+lafrFeedback+ = lens _lafrFeedback (\ s a -> s{_lafrFeedback = a})+ . _Default+ . _Coerce++instance FromJSON ListAlertFeedbackResponse where+ parseJSON+ = withObject "ListAlertFeedbackResponse"+ (\ o ->+ ListAlertFeedbackResponse' <$>+ (o .:? "feedback" .!= mempty))++instance ToJSON ListAlertFeedbackResponse where+ toJSON ListAlertFeedbackResponse'{..}+ = object+ (catMaybes [("feedback" .=) <$> _lafrFeedback])++-- | The details of the login action.+--+-- /See:/ 'loginDetails' smart constructor.+data LoginDetails = LoginDetails'+ { _ldIPAddress :: !(Maybe Text)+ , _ldLoginTime :: !(Maybe DateTime')+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'LoginDetails' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ldIPAddress'+--+-- * 'ldLoginTime'+loginDetails+ :: LoginDetails+loginDetails =+ LoginDetails'+ { _ldIPAddress = Nothing+ , _ldLoginTime = Nothing+ }++-- | Optional. The human-readable IP address (for example, \`11.22.33.44\`)+-- that is associated with the warning event.+ldIPAddress :: Lens' LoginDetails (Maybe Text)+ldIPAddress+ = lens _ldIPAddress (\ s a -> s{_ldIPAddress = a})++-- | Optional. The successful login time that is associated with the warning+-- event. This will not be present for blocked login attempts.+ldLoginTime :: Lens' LoginDetails (Maybe UTCTime)+ldLoginTime+ = lens _ldLoginTime (\ s a -> s{_ldLoginTime = a}) .+ mapping _DateTime++instance FromJSON LoginDetails where+ parseJSON+ = withObject "LoginDetails"+ (\ o ->+ LoginDetails' <$>+ (o .:? "ipAddress") <*> (o .:? "loginTime"))++instance ToJSON LoginDetails where+ toJSON LoginDetails'{..}+ = object+ (catMaybes+ [("ipAddress" .=) <$> _ldIPAddress,+ ("loginTime" .=) <$> _ldLoginTime])++-- | Entity whose actions triggered a Gmail phishing alert.+--+-- /See:/ 'maliciousEntity' smart constructor.+newtype MaliciousEntity = MaliciousEntity'+ { _meFromHeader :: Maybe Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'MaliciousEntity' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'meFromHeader'+maliciousEntity+ :: MaliciousEntity+maliciousEntity =+ MaliciousEntity'+ { _meFromHeader = Nothing+ }++-- | The sender email address.+meFromHeader :: Lens' MaliciousEntity (Maybe Text)+meFromHeader+ = lens _meFromHeader (\ s a -> s{_meFromHeader = a})++instance FromJSON MaliciousEntity where+ parseJSON+ = withObject "MaliciousEntity"+ (\ o -> MaliciousEntity' <$> (o .:? "fromHeader"))++instance ToJSON MaliciousEntity where+ toJSON MaliciousEntity'{..}+ = object+ (catMaybes [("fromHeader" .=) <$> _meFromHeader])
+ gen/Network/Google/AlertCenter/Types/Sum.hs view
@@ -0,0 +1,117 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.AlertCenter.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.AlertCenter.Types.Sum where++import Network.Google.Prelude hiding (Bytes)++-- | Optional. The format of the payload that would be sent. If not specified+-- the format will be JSON.+data CloudPubsubTopicPayloadFormat+ = PayloadFormatUnspecified+ -- ^ @PAYLOAD_FORMAT_UNSPECIFIED@+ -- Payload format is not specified (will use JSON as default).+ | JSON+ -- ^ @JSON@+ -- Use JSON.+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)++instance Hashable CloudPubsubTopicPayloadFormat++instance FromHttpApiData CloudPubsubTopicPayloadFormat where+ parseQueryParam = \case+ "PAYLOAD_FORMAT_UNSPECIFIED" -> Right PayloadFormatUnspecified+ "JSON" -> Right JSON+ x -> Left ("Unable to parse CloudPubsubTopicPayloadFormat from: " <> x)++instance ToHttpApiData CloudPubsubTopicPayloadFormat where+ toQueryParam = \case+ PayloadFormatUnspecified -> "PAYLOAD_FORMAT_UNSPECIFIED"+ JSON -> "JSON"++instance FromJSON CloudPubsubTopicPayloadFormat where+ parseJSON = parseJSONText "CloudPubsubTopicPayloadFormat"++instance ToJSON CloudPubsubTopicPayloadFormat where+ toJSON = toJSONText++-- | Required. The type of the feedback.+data AlertFeedbackType+ = AlertFeedbackTypeUnspecified+ -- ^ @ALERT_FEEDBACK_TYPE_UNSPECIFIED@+ -- The feedback type is not specified.+ | NotUseful+ -- ^ @NOT_USEFUL@+ -- The alert report is not useful.+ | SomewhatUseful+ -- ^ @SOMEWHAT_USEFUL@+ -- The alert report is somewhat useful.+ | VeryUseful+ -- ^ @VERY_USEFUL@+ -- The alert report is very useful.+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)++instance Hashable AlertFeedbackType++instance FromHttpApiData AlertFeedbackType where+ parseQueryParam = \case+ "ALERT_FEEDBACK_TYPE_UNSPECIFIED" -> Right AlertFeedbackTypeUnspecified+ "NOT_USEFUL" -> Right NotUseful+ "SOMEWHAT_USEFUL" -> Right SomewhatUseful+ "VERY_USEFUL" -> Right VeryUseful+ x -> Left ("Unable to parse AlertFeedbackType from: " <> x)++instance ToHttpApiData AlertFeedbackType where+ toQueryParam = \case+ AlertFeedbackTypeUnspecified -> "ALERT_FEEDBACK_TYPE_UNSPECIFIED"+ NotUseful -> "NOT_USEFUL"+ SomewhatUseful -> "SOMEWHAT_USEFUL"+ VeryUseful -> "VERY_USEFUL"++instance FromJSON AlertFeedbackType where+ parseJSON = parseJSONText "AlertFeedbackType"++instance ToJSON AlertFeedbackType 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
+ gen/Network/Google/Resource/AlertCenter/Alerts/Delete.hs view
@@ -0,0 +1,166 @@+{-# 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.AlertCenter.Alerts.Delete+-- 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)+--+-- Marks the specified alert for deletion. An alert that has been marked+-- for deletion is removed from Alert Center after 30 days. Marking an+-- alert for deletion has no effect on an alert which has already been+-- marked for deletion. Attempting to mark a nonexistent alert for deletion+-- results in a \`NOT_FOUND\` error.+--+-- /See:/ <https://developers.google.com/admin-sdk/alertcenter/ G Suite Alert Center API Reference> for @alertcenter.alerts.delete@.+module Network.Google.Resource.AlertCenter.Alerts.Delete+ (+ -- * REST Resource+ AlertsDeleteResource++ -- * Creating a Request+ , alertsDelete+ , AlertsDelete++ -- * Request Lenses+ , adXgafv+ , adUploadProtocol+ , adAccessToken+ , adAlertId+ , adUploadType+ , adCustomerId+ , adCallback+ ) where++import Network.Google.AlertCenter.Types+import Network.Google.Prelude++-- | A resource alias for @alertcenter.alerts.delete@ method which the+-- 'AlertsDelete' request conforms to.+type AlertsDeleteResource =+ "v1beta1" :>+ "alerts" :>+ Capture "alertId" Text :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "customerId" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :> Delete '[JSON] Empty++-- | Marks the specified alert for deletion. An alert that has been marked+-- for deletion is removed from Alert Center after 30 days. Marking an+-- alert for deletion has no effect on an alert which has already been+-- marked for deletion. Attempting to mark a nonexistent alert for deletion+-- results in a \`NOT_FOUND\` error.+--+-- /See:/ 'alertsDelete' smart constructor.+data AlertsDelete = AlertsDelete'+ { _adXgafv :: !(Maybe Xgafv)+ , _adUploadProtocol :: !(Maybe Text)+ , _adAccessToken :: !(Maybe Text)+ , _adAlertId :: !Text+ , _adUploadType :: !(Maybe Text)+ , _adCustomerId :: !(Maybe Text)+ , _adCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'AlertsDelete' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'adXgafv'+--+-- * 'adUploadProtocol'+--+-- * 'adAccessToken'+--+-- * 'adAlertId'+--+-- * 'adUploadType'+--+-- * 'adCustomerId'+--+-- * 'adCallback'+alertsDelete+ :: Text -- ^ 'adAlertId'+ -> AlertsDelete+alertsDelete pAdAlertId_ =+ AlertsDelete'+ { _adXgafv = Nothing+ , _adUploadProtocol = Nothing+ , _adAccessToken = Nothing+ , _adAlertId = pAdAlertId_+ , _adUploadType = Nothing+ , _adCustomerId = Nothing+ , _adCallback = Nothing+ }++-- | V1 error format.+adXgafv :: Lens' AlertsDelete (Maybe Xgafv)+adXgafv = lens _adXgafv (\ s a -> s{_adXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+adUploadProtocol :: Lens' AlertsDelete (Maybe Text)+adUploadProtocol+ = lens _adUploadProtocol+ (\ s a -> s{_adUploadProtocol = a})++-- | OAuth access token.+adAccessToken :: Lens' AlertsDelete (Maybe Text)+adAccessToken+ = lens _adAccessToken+ (\ s a -> s{_adAccessToken = a})++-- | Required. The identifier of the alert to delete.+adAlertId :: Lens' AlertsDelete Text+adAlertId+ = lens _adAlertId (\ s a -> s{_adAlertId = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+adUploadType :: Lens' AlertsDelete (Maybe Text)+adUploadType+ = lens _adUploadType (\ s a -> s{_adUploadType = a})++-- | Optional. The unique identifier of the G Suite organization account of+-- the customer the alert is associated with. Inferred from the caller+-- identity if not provided.+adCustomerId :: Lens' AlertsDelete (Maybe Text)+adCustomerId+ = lens _adCustomerId (\ s a -> s{_adCustomerId = a})++-- | JSONP+adCallback :: Lens' AlertsDelete (Maybe Text)+adCallback+ = lens _adCallback (\ s a -> s{_adCallback = a})++instance GoogleRequest AlertsDelete where+ type Rs AlertsDelete = Empty+ type Scopes AlertsDelete =+ '["https://www.googleapis.com/auth/apps.alerts"]+ requestClient AlertsDelete'{..}+ = go _adAlertId _adXgafv _adUploadProtocol+ _adAccessToken+ _adUploadType+ _adCustomerId+ _adCallback+ (Just AltJSON)+ alertCenterService+ where go+ = buildClient (Proxy :: Proxy AlertsDeleteResource)+ mempty
+ gen/Network/Google/Resource/AlertCenter/Alerts/Feedback/Create.hs view
@@ -0,0 +1,177 @@+{-# 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.AlertCenter.Alerts.Feedback.Create+-- 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)+--+-- Creates new feedback for an alert.+--+-- /See:/ <https://developers.google.com/admin-sdk/alertcenter/ G Suite Alert Center API Reference> for @alertcenter.alerts.feedback.create@.+module Network.Google.Resource.AlertCenter.Alerts.Feedback.Create+ (+ -- * REST Resource+ AlertsFeedbackCreateResource++ -- * Creating a Request+ , alertsFeedbackCreate+ , AlertsFeedbackCreate++ -- * Request Lenses+ , afcXgafv+ , afcUploadProtocol+ , afcAccessToken+ , afcAlertId+ , afcUploadType+ , afcPayload+ , afcCustomerId+ , afcCallback+ ) where++import Network.Google.AlertCenter.Types+import Network.Google.Prelude++-- | A resource alias for @alertcenter.alerts.feedback.create@ method which the+-- 'AlertsFeedbackCreate' request conforms to.+type AlertsFeedbackCreateResource =+ "v1beta1" :>+ "alerts" :>+ Capture "alertId" Text :>+ "feedback" :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "customerId" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] AlertFeedback :>+ Post '[JSON] AlertFeedback++-- | Creates new feedback for an alert.+--+-- /See:/ 'alertsFeedbackCreate' smart constructor.+data AlertsFeedbackCreate = AlertsFeedbackCreate'+ { _afcXgafv :: !(Maybe Xgafv)+ , _afcUploadProtocol :: !(Maybe Text)+ , _afcAccessToken :: !(Maybe Text)+ , _afcAlertId :: !Text+ , _afcUploadType :: !(Maybe Text)+ , _afcPayload :: !AlertFeedback+ , _afcCustomerId :: !(Maybe Text)+ , _afcCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'AlertsFeedbackCreate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'afcXgafv'+--+-- * 'afcUploadProtocol'+--+-- * 'afcAccessToken'+--+-- * 'afcAlertId'+--+-- * 'afcUploadType'+--+-- * 'afcPayload'+--+-- * 'afcCustomerId'+--+-- * 'afcCallback'+alertsFeedbackCreate+ :: Text -- ^ 'afcAlertId'+ -> AlertFeedback -- ^ 'afcPayload'+ -> AlertsFeedbackCreate+alertsFeedbackCreate pAfcAlertId_ pAfcPayload_ =+ AlertsFeedbackCreate'+ { _afcXgafv = Nothing+ , _afcUploadProtocol = Nothing+ , _afcAccessToken = Nothing+ , _afcAlertId = pAfcAlertId_+ , _afcUploadType = Nothing+ , _afcPayload = pAfcPayload_+ , _afcCustomerId = Nothing+ , _afcCallback = Nothing+ }++-- | V1 error format.+afcXgafv :: Lens' AlertsFeedbackCreate (Maybe Xgafv)+afcXgafv = lens _afcXgafv (\ s a -> s{_afcXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+afcUploadProtocol :: Lens' AlertsFeedbackCreate (Maybe Text)+afcUploadProtocol+ = lens _afcUploadProtocol+ (\ s a -> s{_afcUploadProtocol = a})++-- | OAuth access token.+afcAccessToken :: Lens' AlertsFeedbackCreate (Maybe Text)+afcAccessToken+ = lens _afcAccessToken+ (\ s a -> s{_afcAccessToken = a})++-- | Required. The identifier of the alert this feedback belongs to. Returns+-- a \`NOT_FOUND\` error if no such alert.+afcAlertId :: Lens' AlertsFeedbackCreate Text+afcAlertId+ = lens _afcAlertId (\ s a -> s{_afcAlertId = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+afcUploadType :: Lens' AlertsFeedbackCreate (Maybe Text)+afcUploadType+ = lens _afcUploadType+ (\ s a -> s{_afcUploadType = a})++-- | Multipart request metadata.+afcPayload :: Lens' AlertsFeedbackCreate AlertFeedback+afcPayload+ = lens _afcPayload (\ s a -> s{_afcPayload = a})++-- | Optional. The unique identifier of the G Suite organization account of+-- the customer the alert is associated with. Inferred from the caller+-- identity if not provided.+afcCustomerId :: Lens' AlertsFeedbackCreate (Maybe Text)+afcCustomerId+ = lens _afcCustomerId+ (\ s a -> s{_afcCustomerId = a})++-- | JSONP+afcCallback :: Lens' AlertsFeedbackCreate (Maybe Text)+afcCallback+ = lens _afcCallback (\ s a -> s{_afcCallback = a})++instance GoogleRequest AlertsFeedbackCreate where+ type Rs AlertsFeedbackCreate = AlertFeedback+ type Scopes AlertsFeedbackCreate =+ '["https://www.googleapis.com/auth/apps.alerts"]+ requestClient AlertsFeedbackCreate'{..}+ = go _afcAlertId _afcXgafv _afcUploadProtocol+ _afcAccessToken+ _afcUploadType+ _afcCustomerId+ _afcCallback+ (Just AltJSON)+ _afcPayload+ alertCenterService+ where go+ = buildClient+ (Proxy :: Proxy AlertsFeedbackCreateResource)+ mempty
+ gen/Network/Google/Resource/AlertCenter/Alerts/Feedback/List.hs view
@@ -0,0 +1,182 @@+{-# 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.AlertCenter.Alerts.Feedback.List+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists all the feedback for an alert.+--+-- /See:/ <https://developers.google.com/admin-sdk/alertcenter/ G Suite Alert Center API Reference> for @alertcenter.alerts.feedback.list@.+module Network.Google.Resource.AlertCenter.Alerts.Feedback.List+ (+ -- * REST Resource+ AlertsFeedbackListResource++ -- * Creating a Request+ , alertsFeedbackList+ , AlertsFeedbackList++ -- * Request Lenses+ , aflXgafv+ , aflUploadProtocol+ , aflAccessToken+ , aflAlertId+ , aflUploadType+ , aflCustomerId+ , aflFilter+ , aflCallback+ ) where++import Network.Google.AlertCenter.Types+import Network.Google.Prelude++-- | A resource alias for @alertcenter.alerts.feedback.list@ method which the+-- 'AlertsFeedbackList' request conforms to.+type AlertsFeedbackListResource =+ "v1beta1" :>+ "alerts" :>+ Capture "alertId" Text :>+ "feedback" :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "customerId" Text :>+ QueryParam "filter" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] ListAlertFeedbackResponse++-- | Lists all the feedback for an alert.+--+-- /See:/ 'alertsFeedbackList' smart constructor.+data AlertsFeedbackList = AlertsFeedbackList'+ { _aflXgafv :: !(Maybe Xgafv)+ , _aflUploadProtocol :: !(Maybe Text)+ , _aflAccessToken :: !(Maybe Text)+ , _aflAlertId :: !Text+ , _aflUploadType :: !(Maybe Text)+ , _aflCustomerId :: !(Maybe Text)+ , _aflFilter :: !(Maybe Text)+ , _aflCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'AlertsFeedbackList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aflXgafv'+--+-- * 'aflUploadProtocol'+--+-- * 'aflAccessToken'+--+-- * 'aflAlertId'+--+-- * 'aflUploadType'+--+-- * 'aflCustomerId'+--+-- * 'aflFilter'+--+-- * 'aflCallback'+alertsFeedbackList+ :: Text -- ^ 'aflAlertId'+ -> AlertsFeedbackList+alertsFeedbackList pAflAlertId_ =+ AlertsFeedbackList'+ { _aflXgafv = Nothing+ , _aflUploadProtocol = Nothing+ , _aflAccessToken = Nothing+ , _aflAlertId = pAflAlertId_+ , _aflUploadType = Nothing+ , _aflCustomerId = Nothing+ , _aflFilter = Nothing+ , _aflCallback = Nothing+ }++-- | V1 error format.+aflXgafv :: Lens' AlertsFeedbackList (Maybe Xgafv)+aflXgafv = lens _aflXgafv (\ s a -> s{_aflXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+aflUploadProtocol :: Lens' AlertsFeedbackList (Maybe Text)+aflUploadProtocol+ = lens _aflUploadProtocol+ (\ s a -> s{_aflUploadProtocol = a})++-- | OAuth access token.+aflAccessToken :: Lens' AlertsFeedbackList (Maybe Text)+aflAccessToken+ = lens _aflAccessToken+ (\ s a -> s{_aflAccessToken = a})++-- | Required. The alert identifier. The \"-\" wildcard could be used to+-- represent all alerts. If alert does not exist returns a \`NOT_FOUND\`+-- error.+aflAlertId :: Lens' AlertsFeedbackList Text+aflAlertId+ = lens _aflAlertId (\ s a -> s{_aflAlertId = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+aflUploadType :: Lens' AlertsFeedbackList (Maybe Text)+aflUploadType+ = lens _aflUploadType+ (\ s a -> s{_aflUploadType = a})++-- | Optional. The unique identifier of the G Suite organization account of+-- the customer the alert feedback are associated with. Inferred from the+-- caller identity if not provided.+aflCustomerId :: Lens' AlertsFeedbackList (Maybe Text)+aflCustomerId+ = lens _aflCustomerId+ (\ s a -> s{_aflCustomerId = a})++-- | Optional. A query string for filtering alert feedback results. For more+-- details, see [Query+-- filters](\/admin-sdk\/alertcenter\/guides\/query-filters) and [Supported+-- query filter+-- fields](\/admin-sdk\/alertcenter\/reference\/filter-fields#alerts.feedback.list).+aflFilter :: Lens' AlertsFeedbackList (Maybe Text)+aflFilter+ = lens _aflFilter (\ s a -> s{_aflFilter = a})++-- | JSONP+aflCallback :: Lens' AlertsFeedbackList (Maybe Text)+aflCallback+ = lens _aflCallback (\ s a -> s{_aflCallback = a})++instance GoogleRequest AlertsFeedbackList where+ type Rs AlertsFeedbackList =+ ListAlertFeedbackResponse+ type Scopes AlertsFeedbackList =+ '["https://www.googleapis.com/auth/apps.alerts"]+ requestClient AlertsFeedbackList'{..}+ = go _aflAlertId _aflXgafv _aflUploadProtocol+ _aflAccessToken+ _aflUploadType+ _aflCustomerId+ _aflFilter+ _aflCallback+ (Just AltJSON)+ alertCenterService+ where go+ = buildClient+ (Proxy :: Proxy AlertsFeedbackListResource)+ mempty
+ gen/Network/Google/Resource/AlertCenter/Alerts/Get.hs view
@@ -0,0 +1,159 @@+{-# 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.AlertCenter.Alerts.Get+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets the specified alert.+--+-- /See:/ <https://developers.google.com/admin-sdk/alertcenter/ G Suite Alert Center API Reference> for @alertcenter.alerts.get@.+module Network.Google.Resource.AlertCenter.Alerts.Get+ (+ -- * REST Resource+ AlertsGetResource++ -- * Creating a Request+ , alertsGet+ , AlertsGet++ -- * Request Lenses+ , agXgafv+ , agUploadProtocol+ , agAccessToken+ , agAlertId+ , agUploadType+ , agCustomerId+ , agCallback+ ) where++import Network.Google.AlertCenter.Types+import Network.Google.Prelude++-- | A resource alias for @alertcenter.alerts.get@ method which the+-- 'AlertsGet' request conforms to.+type AlertsGetResource =+ "v1beta1" :>+ "alerts" :>+ Capture "alertId" Text :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "customerId" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :> Get '[JSON] Alert++-- | Gets the specified alert.+--+-- /See:/ 'alertsGet' smart constructor.+data AlertsGet = AlertsGet'+ { _agXgafv :: !(Maybe Xgafv)+ , _agUploadProtocol :: !(Maybe Text)+ , _agAccessToken :: !(Maybe Text)+ , _agAlertId :: !Text+ , _agUploadType :: !(Maybe Text)+ , _agCustomerId :: !(Maybe Text)+ , _agCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'AlertsGet' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'agXgafv'+--+-- * 'agUploadProtocol'+--+-- * 'agAccessToken'+--+-- * 'agAlertId'+--+-- * 'agUploadType'+--+-- * 'agCustomerId'+--+-- * 'agCallback'+alertsGet+ :: Text -- ^ 'agAlertId'+ -> AlertsGet+alertsGet pAgAlertId_ =+ AlertsGet'+ { _agXgafv = Nothing+ , _agUploadProtocol = Nothing+ , _agAccessToken = Nothing+ , _agAlertId = pAgAlertId_+ , _agUploadType = Nothing+ , _agCustomerId = Nothing+ , _agCallback = Nothing+ }++-- | V1 error format.+agXgafv :: Lens' AlertsGet (Maybe Xgafv)+agXgafv = lens _agXgafv (\ s a -> s{_agXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+agUploadProtocol :: Lens' AlertsGet (Maybe Text)+agUploadProtocol+ = lens _agUploadProtocol+ (\ s a -> s{_agUploadProtocol = a})++-- | OAuth access token.+agAccessToken :: Lens' AlertsGet (Maybe Text)+agAccessToken+ = lens _agAccessToken+ (\ s a -> s{_agAccessToken = a})++-- | Required. The identifier of the alert to retrieve. Returns a NOT_FOUND+-- error if no such alert.+agAlertId :: Lens' AlertsGet Text+agAlertId+ = lens _agAlertId (\ s a -> s{_agAlertId = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+agUploadType :: Lens' AlertsGet (Maybe Text)+agUploadType+ = lens _agUploadType (\ s a -> s{_agUploadType = a})++-- | Optional. The unique identifier of the G Suite organization account of+-- the customer the alert is associated with. Inferred from the caller+-- identity if not provided.+agCustomerId :: Lens' AlertsGet (Maybe Text)+agCustomerId+ = lens _agCustomerId (\ s a -> s{_agCustomerId = a})++-- | JSONP+agCallback :: Lens' AlertsGet (Maybe Text)+agCallback+ = lens _agCallback (\ s a -> s{_agCallback = a})++instance GoogleRequest AlertsGet where+ type Rs AlertsGet = Alert+ type Scopes AlertsGet =+ '["https://www.googleapis.com/auth/apps.alerts"]+ requestClient AlertsGet'{..}+ = go _agAlertId _agXgafv _agUploadProtocol+ _agAccessToken+ _agUploadType+ _agCustomerId+ _agCallback+ (Just AltJSON)+ alertCenterService+ where go+ = buildClient (Proxy :: Proxy AlertsGetResource)+ mempty
+ gen/Network/Google/Resource/AlertCenter/Alerts/List.hs view
@@ -0,0 +1,205 @@+{-# 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.AlertCenter.Alerts.List+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the alerts.+--+-- /See:/ <https://developers.google.com/admin-sdk/alertcenter/ G Suite Alert Center API Reference> for @alertcenter.alerts.list@.+module Network.Google.Resource.AlertCenter.Alerts.List+ (+ -- * REST Resource+ AlertsListResource++ -- * Creating a Request+ , alertsList+ , AlertsList++ -- * Request Lenses+ , alXgafv+ , alUploadProtocol+ , alOrderBy+ , alAccessToken+ , alUploadType+ , alCustomerId+ , alFilter+ , alPageToken+ , alPageSize+ , alCallback+ ) where++import Network.Google.AlertCenter.Types+import Network.Google.Prelude++-- | A resource alias for @alertcenter.alerts.list@ method which the+-- 'AlertsList' request conforms to.+type AlertsListResource =+ "v1beta1" :>+ "alerts" :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "orderBy" Text :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "customerId" Text :>+ QueryParam "filter" Text :>+ QueryParam "pageToken" Text :>+ QueryParam "pageSize" (Textual Int32) :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] ListAlertsResponse++-- | Lists the alerts.+--+-- /See:/ 'alertsList' smart constructor.+data AlertsList = AlertsList'+ { _alXgafv :: !(Maybe Xgafv)+ , _alUploadProtocol :: !(Maybe Text)+ , _alOrderBy :: !(Maybe Text)+ , _alAccessToken :: !(Maybe Text)+ , _alUploadType :: !(Maybe Text)+ , _alCustomerId :: !(Maybe Text)+ , _alFilter :: !(Maybe Text)+ , _alPageToken :: !(Maybe Text)+ , _alPageSize :: !(Maybe (Textual Int32))+ , _alCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'AlertsList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'alXgafv'+--+-- * 'alUploadProtocol'+--+-- * 'alOrderBy'+--+-- * 'alAccessToken'+--+-- * 'alUploadType'+--+-- * 'alCustomerId'+--+-- * 'alFilter'+--+-- * 'alPageToken'+--+-- * 'alPageSize'+--+-- * 'alCallback'+alertsList+ :: AlertsList+alertsList =+ AlertsList'+ { _alXgafv = Nothing+ , _alUploadProtocol = Nothing+ , _alOrderBy = Nothing+ , _alAccessToken = Nothing+ , _alUploadType = Nothing+ , _alCustomerId = Nothing+ , _alFilter = Nothing+ , _alPageToken = Nothing+ , _alPageSize = Nothing+ , _alCallback = Nothing+ }++-- | V1 error format.+alXgafv :: Lens' AlertsList (Maybe Xgafv)+alXgafv = lens _alXgafv (\ s a -> s{_alXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+alUploadProtocol :: Lens' AlertsList (Maybe Text)+alUploadProtocol+ = lens _alUploadProtocol+ (\ s a -> s{_alUploadProtocol = a})++-- | Optional. The sort order of the list results. If not specified results+-- may be returned in arbitrary order. You can sort the results in+-- descending order based on the creation timestamp using+-- \`order_by=\"create_time desc\"\`. Currently, only sorting by+-- \`create_time desc\` is supported.+alOrderBy :: Lens' AlertsList (Maybe Text)+alOrderBy+ = lens _alOrderBy (\ s a -> s{_alOrderBy = a})++-- | OAuth access token.+alAccessToken :: Lens' AlertsList (Maybe Text)+alAccessToken+ = lens _alAccessToken+ (\ s a -> s{_alAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+alUploadType :: Lens' AlertsList (Maybe Text)+alUploadType+ = lens _alUploadType (\ s a -> s{_alUploadType = a})++-- | Optional. The unique identifier of the G Suite organization account of+-- the customer the alerts are associated with. Inferred from the caller+-- identity if not provided.+alCustomerId :: Lens' AlertsList (Maybe Text)+alCustomerId+ = lens _alCustomerId (\ s a -> s{_alCustomerId = a})++-- | Optional. A query string for filtering alert results. For more details,+-- see [Query filters](\/admin-sdk\/alertcenter\/guides\/query-filters) and+-- [Supported query filter+-- fields](\/admin-sdk\/alertcenter\/reference\/filter-fields#alerts.list).+alFilter :: Lens' AlertsList (Maybe Text)+alFilter = lens _alFilter (\ s a -> s{_alFilter = a})++-- | Optional. A token identifying a page of results the server should+-- return. If empty, a new iteration is started. To continue an iteration,+-- pass in the value from the previous ListAlertsResponse\'s+-- next_page_token field.+alPageToken :: Lens' AlertsList (Maybe Text)+alPageToken+ = lens _alPageToken (\ s a -> s{_alPageToken = a})++-- | Optional. The requested page size. Server may return fewer items than+-- requested. If unspecified, server picks an appropriate default.+alPageSize :: Lens' AlertsList (Maybe Int32)+alPageSize+ = lens _alPageSize (\ s a -> s{_alPageSize = a}) .+ mapping _Coerce++-- | JSONP+alCallback :: Lens' AlertsList (Maybe Text)+alCallback+ = lens _alCallback (\ s a -> s{_alCallback = a})++instance GoogleRequest AlertsList where+ type Rs AlertsList = ListAlertsResponse+ type Scopes AlertsList =+ '["https://www.googleapis.com/auth/apps.alerts"]+ requestClient AlertsList'{..}+ = go _alXgafv _alUploadProtocol _alOrderBy+ _alAccessToken+ _alUploadType+ _alCustomerId+ _alFilter+ _alPageToken+ _alPageSize+ _alCallback+ (Just AltJSON)+ alertCenterService+ where go+ = buildClient (Proxy :: Proxy AlertsListResource)+ mempty
+ gen/Network/Google/Resource/AlertCenter/Alerts/Undelete.hs view
@@ -0,0 +1,168 @@+{-# 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.AlertCenter.Alerts.Undelete+-- 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)+--+-- Restores, or \"undeletes\", an alert that was marked for deletion within+-- the past 30 days. Attempting to undelete an alert which was marked for+-- deletion over 30 days ago (which has been removed from the Alert Center+-- database) or a nonexistent alert returns a \`NOT_FOUND\` error.+-- Attempting to undelete an alert which has not been marked for deletion+-- has no effect.+--+-- /See:/ <https://developers.google.com/admin-sdk/alertcenter/ G Suite Alert Center API Reference> for @alertcenter.alerts.undelete@.+module Network.Google.Resource.AlertCenter.Alerts.Undelete+ (+ -- * REST Resource+ AlertsUndeleteResource++ -- * Creating a Request+ , alertsUndelete+ , AlertsUndelete++ -- * Request Lenses+ , auXgafv+ , auUploadProtocol+ , auAccessToken+ , auAlertId+ , auUploadType+ , auPayload+ , auCallback+ ) where++import Network.Google.AlertCenter.Types+import Network.Google.Prelude++-- | A resource alias for @alertcenter.alerts.undelete@ method which the+-- 'AlertsUndelete' request conforms to.+type AlertsUndeleteResource =+ "v1beta1" :>+ "alerts" :>+ CaptureMode "alertId" "undelete" Text :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] UndeleteAlertRequest :>+ Post '[JSON] Alert++-- | Restores, or \"undeletes\", an alert that was marked for deletion within+-- the past 30 days. Attempting to undelete an alert which was marked for+-- deletion over 30 days ago (which has been removed from the Alert Center+-- database) or a nonexistent alert returns a \`NOT_FOUND\` error.+-- Attempting to undelete an alert which has not been marked for deletion+-- has no effect.+--+-- /See:/ 'alertsUndelete' smart constructor.+data AlertsUndelete = AlertsUndelete'+ { _auXgafv :: !(Maybe Xgafv)+ , _auUploadProtocol :: !(Maybe Text)+ , _auAccessToken :: !(Maybe Text)+ , _auAlertId :: !Text+ , _auUploadType :: !(Maybe Text)+ , _auPayload :: !UndeleteAlertRequest+ , _auCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'AlertsUndelete' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'auXgafv'+--+-- * 'auUploadProtocol'+--+-- * 'auAccessToken'+--+-- * 'auAlertId'+--+-- * 'auUploadType'+--+-- * 'auPayload'+--+-- * 'auCallback'+alertsUndelete+ :: Text -- ^ 'auAlertId'+ -> UndeleteAlertRequest -- ^ 'auPayload'+ -> AlertsUndelete+alertsUndelete pAuAlertId_ pAuPayload_ =+ AlertsUndelete'+ { _auXgafv = Nothing+ , _auUploadProtocol = Nothing+ , _auAccessToken = Nothing+ , _auAlertId = pAuAlertId_+ , _auUploadType = Nothing+ , _auPayload = pAuPayload_+ , _auCallback = Nothing+ }++-- | V1 error format.+auXgafv :: Lens' AlertsUndelete (Maybe Xgafv)+auXgafv = lens _auXgafv (\ s a -> s{_auXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+auUploadProtocol :: Lens' AlertsUndelete (Maybe Text)+auUploadProtocol+ = lens _auUploadProtocol+ (\ s a -> s{_auUploadProtocol = a})++-- | OAuth access token.+auAccessToken :: Lens' AlertsUndelete (Maybe Text)+auAccessToken+ = lens _auAccessToken+ (\ s a -> s{_auAccessToken = a})++-- | Required. The identifier of the alert to undelete.+auAlertId :: Lens' AlertsUndelete Text+auAlertId+ = lens _auAlertId (\ s a -> s{_auAlertId = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+auUploadType :: Lens' AlertsUndelete (Maybe Text)+auUploadType+ = lens _auUploadType (\ s a -> s{_auUploadType = a})++-- | Multipart request metadata.+auPayload :: Lens' AlertsUndelete UndeleteAlertRequest+auPayload+ = lens _auPayload (\ s a -> s{_auPayload = a})++-- | JSONP+auCallback :: Lens' AlertsUndelete (Maybe Text)+auCallback+ = lens _auCallback (\ s a -> s{_auCallback = a})++instance GoogleRequest AlertsUndelete where+ type Rs AlertsUndelete = Alert+ type Scopes AlertsUndelete =+ '["https://www.googleapis.com/auth/apps.alerts"]+ requestClient AlertsUndelete'{..}+ = go _auAlertId _auXgafv _auUploadProtocol+ _auAccessToken+ _auUploadType+ _auCallback+ (Just AltJSON)+ _auPayload+ alertCenterService+ where go+ = buildClient (Proxy :: Proxy AlertsUndeleteResource)+ mempty
+ gen/Network/Google/Resource/AlertCenter/GetSettings.hs view
@@ -0,0 +1,145 @@+{-# 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.AlertCenter.GetSettings+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns customer-level settings.+--+-- /See:/ <https://developers.google.com/admin-sdk/alertcenter/ G Suite Alert Center API Reference> for @alertcenter.getSettings@.+module Network.Google.Resource.AlertCenter.GetSettings+ (+ -- * REST Resource+ GetSettingsResource++ -- * Creating a Request+ , getSettings+ , GetSettings++ -- * Request Lenses+ , gsXgafv+ , gsUploadProtocol+ , gsAccessToken+ , gsUploadType+ , gsCustomerId+ , gsCallback+ ) where++import Network.Google.AlertCenter.Types+import Network.Google.Prelude++-- | A resource alias for @alertcenter.getSettings@ method which the+-- 'GetSettings' request conforms to.+type GetSettingsResource =+ "v1beta1" :>+ "settings" :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "customerId" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :> Get '[JSON] Settings++-- | Returns customer-level settings.+--+-- /See:/ 'getSettings' smart constructor.+data GetSettings = GetSettings'+ { _gsXgafv :: !(Maybe Xgafv)+ , _gsUploadProtocol :: !(Maybe Text)+ , _gsAccessToken :: !(Maybe Text)+ , _gsUploadType :: !(Maybe Text)+ , _gsCustomerId :: !(Maybe Text)+ , _gsCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetSettings' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gsXgafv'+--+-- * 'gsUploadProtocol'+--+-- * 'gsAccessToken'+--+-- * 'gsUploadType'+--+-- * 'gsCustomerId'+--+-- * 'gsCallback'+getSettings+ :: GetSettings+getSettings =+ GetSettings'+ { _gsXgafv = Nothing+ , _gsUploadProtocol = Nothing+ , _gsAccessToken = Nothing+ , _gsUploadType = Nothing+ , _gsCustomerId = Nothing+ , _gsCallback = Nothing+ }++-- | V1 error format.+gsXgafv :: Lens' GetSettings (Maybe Xgafv)+gsXgafv = lens _gsXgafv (\ s a -> s{_gsXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+gsUploadProtocol :: Lens' GetSettings (Maybe Text)+gsUploadProtocol+ = lens _gsUploadProtocol+ (\ s a -> s{_gsUploadProtocol = a})++-- | OAuth access token.+gsAccessToken :: Lens' GetSettings (Maybe Text)+gsAccessToken+ = lens _gsAccessToken+ (\ s a -> s{_gsAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+gsUploadType :: Lens' GetSettings (Maybe Text)+gsUploadType+ = lens _gsUploadType (\ s a -> s{_gsUploadType = a})++-- | Optional. The unique identifier of the G Suite organization account of+-- the customer the alert settings are associated with. Inferred from the+-- caller identity if not provided.+gsCustomerId :: Lens' GetSettings (Maybe Text)+gsCustomerId+ = lens _gsCustomerId (\ s a -> s{_gsCustomerId = a})++-- | JSONP+gsCallback :: Lens' GetSettings (Maybe Text)+gsCallback+ = lens _gsCallback (\ s a -> s{_gsCallback = a})++instance GoogleRequest GetSettings where+ type Rs GetSettings = Settings+ type Scopes GetSettings =+ '["https://www.googleapis.com/auth/apps.alerts"]+ requestClient GetSettings'{..}+ = go _gsXgafv _gsUploadProtocol _gsAccessToken+ _gsUploadType+ _gsCustomerId+ _gsCallback+ (Just AltJSON)+ alertCenterService+ where go+ = buildClient (Proxy :: Proxy GetSettingsResource)+ mempty
+ gen/Network/Google/Resource/AlertCenter/UpdateSettings.hs view
@@ -0,0 +1,158 @@+{-# 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.AlertCenter.UpdateSettings+-- 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)+--+-- Update the customer-level settings.+--+-- /See:/ <https://developers.google.com/admin-sdk/alertcenter/ G Suite Alert Center API Reference> for @alertcenter.updateSettings@.+module Network.Google.Resource.AlertCenter.UpdateSettings+ (+ -- * REST Resource+ UpdateSettingsResource++ -- * Creating a Request+ , updateSettings+ , UpdateSettings++ -- * Request Lenses+ , usXgafv+ , usUploadProtocol+ , usAccessToken+ , usUploadType+ , usPayload+ , usCustomerId+ , usCallback+ ) where++import Network.Google.AlertCenter.Types+import Network.Google.Prelude++-- | A resource alias for @alertcenter.updateSettings@ method which the+-- 'UpdateSettings' request conforms to.+type UpdateSettingsResource =+ "v1beta1" :>+ "settings" :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "customerId" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Settings :> Patch '[JSON] Settings++-- | Update the customer-level settings.+--+-- /See:/ 'updateSettings' smart constructor.+data UpdateSettings = UpdateSettings'+ { _usXgafv :: !(Maybe Xgafv)+ , _usUploadProtocol :: !(Maybe Text)+ , _usAccessToken :: !(Maybe Text)+ , _usUploadType :: !(Maybe Text)+ , _usPayload :: !Settings+ , _usCustomerId :: !(Maybe Text)+ , _usCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateSettings' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'usXgafv'+--+-- * 'usUploadProtocol'+--+-- * 'usAccessToken'+--+-- * 'usUploadType'+--+-- * 'usPayload'+--+-- * 'usCustomerId'+--+-- * 'usCallback'+updateSettings+ :: Settings -- ^ 'usPayload'+ -> UpdateSettings+updateSettings pUsPayload_ =+ UpdateSettings'+ { _usXgafv = Nothing+ , _usUploadProtocol = Nothing+ , _usAccessToken = Nothing+ , _usUploadType = Nothing+ , _usPayload = pUsPayload_+ , _usCustomerId = Nothing+ , _usCallback = Nothing+ }++-- | V1 error format.+usXgafv :: Lens' UpdateSettings (Maybe Xgafv)+usXgafv = lens _usXgafv (\ s a -> s{_usXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+usUploadProtocol :: Lens' UpdateSettings (Maybe Text)+usUploadProtocol+ = lens _usUploadProtocol+ (\ s a -> s{_usUploadProtocol = a})++-- | OAuth access token.+usAccessToken :: Lens' UpdateSettings (Maybe Text)+usAccessToken+ = lens _usAccessToken+ (\ s a -> s{_usAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+usUploadType :: Lens' UpdateSettings (Maybe Text)+usUploadType+ = lens _usUploadType (\ s a -> s{_usUploadType = a})++-- | Multipart request metadata.+usPayload :: Lens' UpdateSettings Settings+usPayload+ = lens _usPayload (\ s a -> s{_usPayload = a})++-- | Optional. The unique identifier of the G Suite organization account of+-- the customer the alert settings are associated with. Inferred from the+-- caller identity if not provided.+usCustomerId :: Lens' UpdateSettings (Maybe Text)+usCustomerId+ = lens _usCustomerId (\ s a -> s{_usCustomerId = a})++-- | JSONP+usCallback :: Lens' UpdateSettings (Maybe Text)+usCallback+ = lens _usCallback (\ s a -> s{_usCallback = a})++instance GoogleRequest UpdateSettings where+ type Rs UpdateSettings = Settings+ type Scopes UpdateSettings =+ '["https://www.googleapis.com/auth/apps.alerts"]+ requestClient UpdateSettings'{..}+ = go _usXgafv _usUploadProtocol _usAccessToken+ _usUploadType+ _usCustomerId+ _usCallback+ (Just AltJSON)+ _usPayload+ alertCenterService+ where go+ = buildClient (Proxy :: Proxy UpdateSettingsResource)+ mempty
+ gogol-alertcenter.cabal view
@@ -0,0 +1,53 @@+name: gogol-alertcenter+version: 0.4.0+synopsis: Google G Suite Alert Center 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:+ Manages alerts on issues affecting your domain.+ .+ /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 @v1beta1@+ 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.AlertCenter+ , Network.Google.AlertCenter.Types+ , Network.Google.Resource.AlertCenter.Alerts.Delete+ , Network.Google.Resource.AlertCenter.Alerts.Feedback.Create+ , Network.Google.Resource.AlertCenter.Alerts.Feedback.List+ , Network.Google.Resource.AlertCenter.Alerts.Get+ , Network.Google.Resource.AlertCenter.Alerts.List+ , Network.Google.Resource.AlertCenter.Alerts.Undelete+ , Network.Google.Resource.AlertCenter.GetSettings+ , Network.Google.Resource.AlertCenter.UpdateSettings++ other-modules:+ Network.Google.AlertCenter.Types.Product+ , Network.Google.AlertCenter.Types.Sum++ build-depends:+ gogol-core == 0.4.0.*+ , base >= 4.7 && < 5
+ src/.gitkeep view