gogol-admin-datatransfer (empty) → 0.0.1
raw patch · 13 files changed
+1678/−0 lines, 13 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/DataTransfer.hs +115/−0
- gen/Network/Google/DataTransfer/Types.hs +92/−0
- gen/Network/Google/DataTransfer/Types/Product.hs +490/−0
- gen/Network/Google/DataTransfer/Types/Sum.hs +19/−0
- gen/Network/Google/Resource/DataTransfer/Applications/Get.hs +87/−0
- gen/Network/Google/Resource/DataTransfer/Applications/List.hs +109/−0
- gen/Network/Google/Resource/DataTransfer/Transfers/Get.hs +86/−0
- gen/Network/Google/Resource/DataTransfer/Transfers/Insert.hs +85/−0
- gen/Network/Google/Resource/DataTransfer/Transfers/List.hs +147/−0
- gogol-admin-datatransfer.cabal +51/−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-admin-datatransfer++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`0.0.1`+++## Description++A client library for the Google Admin Data Transfer.+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`gogol-admin-datatransfer` 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/DataTransfer.hs view
@@ -0,0 +1,115 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- |+-- Module : Network.Google.DataTransfer+-- Copyright : (c) 2015 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)+--+-- Admin Data Transfer API lets you transfer user data from one user to+-- another.+--+-- /See:/ <https://developers.google.com/admin-sdk/data-transfer/ Admin Data Transfer API Reference>+module Network.Google.DataTransfer+ (+ -- * Service Configuration+ dataTransferService++ -- * API Declaration+ , DataTransferAPI++ -- * Resources++ -- ** datatransfer.applications.get+ , module Network.Google.Resource.DataTransfer.Applications.Get++ -- ** datatransfer.applications.list+ , module Network.Google.Resource.DataTransfer.Applications.List++ -- ** datatransfer.transfers.get+ , module Network.Google.Resource.DataTransfer.Transfers.Get++ -- ** datatransfer.transfers.insert+ , module Network.Google.Resource.DataTransfer.Transfers.Insert++ -- ** datatransfer.transfers.list+ , module Network.Google.Resource.DataTransfer.Transfers.List++ -- * Types++ -- ** Application+ , Application+ , application+ , aTransferParams+ , aEtag+ , aKind+ , aName+ , aId++ -- ** ApplicationTransferParam+ , ApplicationTransferParam+ , applicationTransferParam+ , atpValue+ , atpKey++ -- ** ApplicationsListResponse+ , ApplicationsListResponse+ , applicationsListResponse+ , alrEtag+ , alrNextPageToken+ , alrKind+ , alrApplications++ -- ** DataTransfer+ , DataTransfer+ , dataTransfer+ , dtEtag+ , dtOldOwnerUserId+ , dtKind+ , dtNewOwnerUserId+ , dtRequestTime+ , dtApplicationDataTransfers+ , dtId+ , dtOverallTransferStatusCode++ -- ** DataTransfersListResponse+ , DataTransfersListResponse+ , dataTransfersListResponse+ , dtlrEtag+ , dtlrNextPageToken+ , dtlrKind+ , dtlrDataTransfers++ -- ** ApplicationDataTransfer+ , ApplicationDataTransfer+ , applicationDataTransfer+ , adtApplicationTransferParams+ , adtApplicationId+ , adtApplicationTransferStatus+ ) where++import Network.Google.DataTransfer.Types+import Network.Google.Prelude+import Network.Google.Resource.DataTransfer.Applications.Get+import Network.Google.Resource.DataTransfer.Applications.List+import Network.Google.Resource.DataTransfer.Transfers.Get+import Network.Google.Resource.DataTransfer.Transfers.Insert+import Network.Google.Resource.DataTransfer.Transfers.List++{- $resources+TODO+-}++-- | Represents the entirety of the methods and resources available for the Admin Data Transfer API service.+type DataTransferAPI =+ TransfersInsertResource :<|> TransfersListResource+ :<|> TransfersGetResource+ :<|> ApplicationsListResource+ :<|> ApplicationsGetResource
+ gen/Network/Google/DataTransfer/Types.hs view
@@ -0,0 +1,92 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.DataTransfer.Types+-- Copyright : (c) 2015 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.DataTransfer.Types+ (+ -- * Service Configuration+ dataTransferService++ -- * OAuth Scopes+ , adminDatatransferReadonlyScope+ , adminDatatransferScope++ -- * Application+ , Application+ , application+ , aTransferParams+ , aEtag+ , aKind+ , aName+ , aId++ -- * ApplicationTransferParam+ , ApplicationTransferParam+ , applicationTransferParam+ , atpValue+ , atpKey++ -- * ApplicationsListResponse+ , ApplicationsListResponse+ , applicationsListResponse+ , alrEtag+ , alrNextPageToken+ , alrKind+ , alrApplications++ -- * DataTransfer+ , DataTransfer+ , dataTransfer+ , dtEtag+ , dtOldOwnerUserId+ , dtKind+ , dtNewOwnerUserId+ , dtRequestTime+ , dtApplicationDataTransfers+ , dtId+ , dtOverallTransferStatusCode++ -- * DataTransfersListResponse+ , DataTransfersListResponse+ , dataTransfersListResponse+ , dtlrEtag+ , dtlrNextPageToken+ , dtlrKind+ , dtlrDataTransfers++ -- * ApplicationDataTransfer+ , ApplicationDataTransfer+ , applicationDataTransfer+ , adtApplicationTransferParams+ , adtApplicationId+ , adtApplicationTransferStatus+ ) where++import Network.Google.DataTransfer.Types.Product+import Network.Google.DataTransfer.Types.Sum+import Network.Google.Prelude++-- | Default request referring to version 'datatransfer_v1' of the Admin Data Transfer API. This contains the host and root path used as a starting point for constructing service requests.+dataTransferService :: Service+dataTransferService+ = defaultService (ServiceId "admin:datatransfer_v1")+ "www.googleapis.com"++-- | View data transfers between users in your organization+adminDatatransferReadonlyScope :: OAuthScope+adminDatatransferReadonlyScope = "https://www.googleapis.com/auth/admin.datatransfer.readonly";++-- | View and manage data transfers between users in your organization+adminDatatransferScope :: OAuthScope+adminDatatransferScope = "https://www.googleapis.com/auth/admin.datatransfer";
+ gen/Network/Google/DataTransfer/Types/Product.hs view
@@ -0,0 +1,490 @@+{-# 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.DataTransfer.Types.Product+-- Copyright : (c) 2015 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.DataTransfer.Types.Product where++import Network.Google.DataTransfer.Types.Sum+import Network.Google.Prelude++-- | The JSON template for an Application resource.+--+-- /See:/ 'application' smart constructor.+data Application = Application+ { _aTransferParams :: !(Maybe [ApplicationTransferParam])+ , _aEtag :: !(Maybe Text)+ , _aKind :: !Text+ , _aName :: !(Maybe Text)+ , _aId :: !(Maybe (Textual Int64))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Application' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aTransferParams'+--+-- * 'aEtag'+--+-- * 'aKind'+--+-- * 'aName'+--+-- * 'aId'+application+ :: Application+application =+ Application+ { _aTransferParams = Nothing+ , _aEtag = Nothing+ , _aKind = "admin#datatransfer#ApplicationResource"+ , _aName = Nothing+ , _aId = Nothing+ }++-- | The list of all possible transfer parameters for this application. These+-- parameters can be used to select the data of the user in this+-- application to be transfered.+aTransferParams :: Lens' Application [ApplicationTransferParam]+aTransferParams+ = lens _aTransferParams+ (\ s a -> s{_aTransferParams = a})+ . _Default+ . _Coerce++-- | Etag of the resource.+aEtag :: Lens' Application (Maybe Text)+aEtag = lens _aEtag (\ s a -> s{_aEtag = a})++-- | Identifies the resource as a DataTransfer Application Resource.+aKind :: Lens' Application Text+aKind = lens _aKind (\ s a -> s{_aKind = a})++-- | The application\'s name.+aName :: Lens' Application (Maybe Text)+aName = lens _aName (\ s a -> s{_aName = a})++-- | The application\'s ID.+aId :: Lens' Application (Maybe Int64)+aId+ = lens _aId (\ s a -> s{_aId = a}) . mapping _Coerce++instance FromJSON Application where+ parseJSON+ = withObject "Application"+ (\ o ->+ Application <$>+ (o .:? "transferParams" .!= mempty) <*>+ (o .:? "etag")+ <*>+ (o .:? "kind" .!=+ "admin#datatransfer#ApplicationResource")+ <*> (o .:? "name")+ <*> (o .:? "id"))++instance ToJSON Application where+ toJSON Application{..}+ = object+ (catMaybes+ [("transferParams" .=) <$> _aTransferParams,+ ("etag" .=) <$> _aEtag, Just ("kind" .= _aKind),+ ("name" .=) <$> _aName, ("id" .=) <$> _aId])++-- | Template for application transfer parameters.+--+-- /See:/ 'applicationTransferParam' smart constructor.+data ApplicationTransferParam = ApplicationTransferParam+ { _atpValue :: !(Maybe [Text])+ , _atpKey :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ApplicationTransferParam' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'atpValue'+--+-- * 'atpKey'+applicationTransferParam+ :: ApplicationTransferParam+applicationTransferParam =+ ApplicationTransferParam+ { _atpValue = Nothing+ , _atpKey = Nothing+ }++-- | The value of the coressponding transfer parameter. eg: \'PRIVATE\' or+-- \'SHARED\'+atpValue :: Lens' ApplicationTransferParam [Text]+atpValue+ = lens _atpValue (\ s a -> s{_atpValue = a}) .+ _Default+ . _Coerce++-- | The type of the transfer parameter. eg: \'PRIVACY_LEVEL\'+atpKey :: Lens' ApplicationTransferParam (Maybe Text)+atpKey = lens _atpKey (\ s a -> s{_atpKey = a})++instance FromJSON ApplicationTransferParam where+ parseJSON+ = withObject "ApplicationTransferParam"+ (\ o ->+ ApplicationTransferParam <$>+ (o .:? "value" .!= mempty) <*> (o .:? "key"))++instance ToJSON ApplicationTransferParam where+ toJSON ApplicationTransferParam{..}+ = object+ (catMaybes+ [("value" .=) <$> _atpValue, ("key" .=) <$> _atpKey])++-- | Template for a collection of Applications.+--+-- /See:/ 'applicationsListResponse' smart constructor.+data ApplicationsListResponse = ApplicationsListResponse+ { _alrEtag :: !(Maybe Text)+ , _alrNextPageToken :: !(Maybe Text)+ , _alrKind :: !Text+ , _alrApplications :: !(Maybe [Application])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ApplicationsListResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'alrEtag'+--+-- * 'alrNextPageToken'+--+-- * 'alrKind'+--+-- * 'alrApplications'+applicationsListResponse+ :: ApplicationsListResponse+applicationsListResponse =+ ApplicationsListResponse+ { _alrEtag = Nothing+ , _alrNextPageToken = Nothing+ , _alrKind = "admin#datatransfer#applicationsList"+ , _alrApplications = Nothing+ }++-- | ETag of the resource.+alrEtag :: Lens' ApplicationsListResponse (Maybe Text)+alrEtag = lens _alrEtag (\ s a -> s{_alrEtag = a})++-- | Continuation token which will be used to specify next page in list API.+alrNextPageToken :: Lens' ApplicationsListResponse (Maybe Text)+alrNextPageToken+ = lens _alrNextPageToken+ (\ s a -> s{_alrNextPageToken = a})++-- | Identifies the resource as a collection of Applications.+alrKind :: Lens' ApplicationsListResponse Text+alrKind = lens _alrKind (\ s a -> s{_alrKind = a})++-- | List of applications that support data transfer and are also installed+-- for the customer.+alrApplications :: Lens' ApplicationsListResponse [Application]+alrApplications+ = lens _alrApplications+ (\ s a -> s{_alrApplications = a})+ . _Default+ . _Coerce++instance FromJSON ApplicationsListResponse where+ parseJSON+ = withObject "ApplicationsListResponse"+ (\ o ->+ ApplicationsListResponse <$>+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>+ (o .:? "kind" .!=+ "admin#datatransfer#applicationsList")+ <*> (o .:? "applications" .!= mempty))++instance ToJSON ApplicationsListResponse where+ toJSON ApplicationsListResponse{..}+ = object+ (catMaybes+ [("etag" .=) <$> _alrEtag,+ ("nextPageToken" .=) <$> _alrNextPageToken,+ Just ("kind" .= _alrKind),+ ("applications" .=) <$> _alrApplications])++-- | The JSON template for a DataTransfer resource.+--+-- /See:/ 'dataTransfer' smart constructor.+data DataTransfer = DataTransfer+ { _dtEtag :: !(Maybe Text)+ , _dtOldOwnerUserId :: !(Maybe Text)+ , _dtKind :: !Text+ , _dtNewOwnerUserId :: !(Maybe Text)+ , _dtRequestTime :: !(Maybe DateTime')+ , _dtApplicationDataTransfers :: !(Maybe [ApplicationDataTransfer])+ , _dtId :: !(Maybe Text)+ , _dtOverallTransferStatusCode :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'DataTransfer' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dtEtag'+--+-- * 'dtOldOwnerUserId'+--+-- * 'dtKind'+--+-- * 'dtNewOwnerUserId'+--+-- * 'dtRequestTime'+--+-- * 'dtApplicationDataTransfers'+--+-- * 'dtId'+--+-- * 'dtOverallTransferStatusCode'+dataTransfer+ :: DataTransfer+dataTransfer =+ DataTransfer+ { _dtEtag = Nothing+ , _dtOldOwnerUserId = Nothing+ , _dtKind = "admin#datatransfer#DataTransfer"+ , _dtNewOwnerUserId = Nothing+ , _dtRequestTime = Nothing+ , _dtApplicationDataTransfers = Nothing+ , _dtId = Nothing+ , _dtOverallTransferStatusCode = Nothing+ }++-- | ETag of the resource.+dtEtag :: Lens' DataTransfer (Maybe Text)+dtEtag = lens _dtEtag (\ s a -> s{_dtEtag = a})++-- | ID of the user whose data is being transfered.+dtOldOwnerUserId :: Lens' DataTransfer (Maybe Text)+dtOldOwnerUserId+ = lens _dtOldOwnerUserId+ (\ s a -> s{_dtOldOwnerUserId = a})++-- | Identifies the resource as a DataTransfer request.+dtKind :: Lens' DataTransfer Text+dtKind = lens _dtKind (\ s a -> s{_dtKind = a})++-- | ID of the user to whom the data is being transfered.+dtNewOwnerUserId :: Lens' DataTransfer (Maybe Text)+dtNewOwnerUserId+ = lens _dtNewOwnerUserId+ (\ s a -> s{_dtNewOwnerUserId = a})++-- | The time at which the data transfer was requested (Read-only).+dtRequestTime :: Lens' DataTransfer (Maybe UTCTime)+dtRequestTime+ = lens _dtRequestTime+ (\ s a -> s{_dtRequestTime = a})+ . mapping _DateTime++-- | List of per application data transfer resources. It contains data+-- transfer details of the applications associated with this transfer+-- resource. Note that this list is also used to specify the applications+-- for which data transfer has to be done at the time of the transfer+-- resource creation.+dtApplicationDataTransfers :: Lens' DataTransfer [ApplicationDataTransfer]+dtApplicationDataTransfers+ = lens _dtApplicationDataTransfers+ (\ s a -> s{_dtApplicationDataTransfers = a})+ . _Default+ . _Coerce++-- | The transfer\'s ID (Read-only).+dtId :: Lens' DataTransfer (Maybe Text)+dtId = lens _dtId (\ s a -> s{_dtId = a})++-- | Overall transfer status (Read-only).+dtOverallTransferStatusCode :: Lens' DataTransfer (Maybe Text)+dtOverallTransferStatusCode+ = lens _dtOverallTransferStatusCode+ (\ s a -> s{_dtOverallTransferStatusCode = a})++instance FromJSON DataTransfer where+ parseJSON+ = withObject "DataTransfer"+ (\ o ->+ DataTransfer <$>+ (o .:? "etag") <*> (o .:? "oldOwnerUserId") <*>+ (o .:? "kind" .!= "admin#datatransfer#DataTransfer")+ <*> (o .:? "newOwnerUserId")+ <*> (o .:? "requestTime")+ <*> (o .:? "applicationDataTransfers" .!= mempty)+ <*> (o .:? "id")+ <*> (o .:? "overallTransferStatusCode"))++instance ToJSON DataTransfer where+ toJSON DataTransfer{..}+ = object+ (catMaybes+ [("etag" .=) <$> _dtEtag,+ ("oldOwnerUserId" .=) <$> _dtOldOwnerUserId,+ Just ("kind" .= _dtKind),+ ("newOwnerUserId" .=) <$> _dtNewOwnerUserId,+ ("requestTime" .=) <$> _dtRequestTime,+ ("applicationDataTransfers" .=) <$>+ _dtApplicationDataTransfers,+ ("id" .=) <$> _dtId,+ ("overallTransferStatusCode" .=) <$>+ _dtOverallTransferStatusCode])++-- | Template for a collection of DataTransfer resources.+--+-- /See:/ 'dataTransfersListResponse' smart constructor.+data DataTransfersListResponse = DataTransfersListResponse+ { _dtlrEtag :: !(Maybe Text)+ , _dtlrNextPageToken :: !(Maybe Text)+ , _dtlrKind :: !Text+ , _dtlrDataTransfers :: !(Maybe [DataTransfer])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'DataTransfersListResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dtlrEtag'+--+-- * 'dtlrNextPageToken'+--+-- * 'dtlrKind'+--+-- * 'dtlrDataTransfers'+dataTransfersListResponse+ :: DataTransfersListResponse+dataTransfersListResponse =+ DataTransfersListResponse+ { _dtlrEtag = Nothing+ , _dtlrNextPageToken = Nothing+ , _dtlrKind = "admin#datatransfer#dataTransfersList"+ , _dtlrDataTransfers = Nothing+ }++-- | ETag of the resource.+dtlrEtag :: Lens' DataTransfersListResponse (Maybe Text)+dtlrEtag = lens _dtlrEtag (\ s a -> s{_dtlrEtag = a})++-- | Continuation token which will be used to specify next page in list API.+dtlrNextPageToken :: Lens' DataTransfersListResponse (Maybe Text)+dtlrNextPageToken+ = lens _dtlrNextPageToken+ (\ s a -> s{_dtlrNextPageToken = a})++-- | Identifies the resource as a collection of data transfer requests.+dtlrKind :: Lens' DataTransfersListResponse Text+dtlrKind = lens _dtlrKind (\ s a -> s{_dtlrKind = a})++-- | List of data transfer requests.+dtlrDataTransfers :: Lens' DataTransfersListResponse [DataTransfer]+dtlrDataTransfers+ = lens _dtlrDataTransfers+ (\ s a -> s{_dtlrDataTransfers = a})+ . _Default+ . _Coerce++instance FromJSON DataTransfersListResponse where+ parseJSON+ = withObject "DataTransfersListResponse"+ (\ o ->+ DataTransfersListResponse <$>+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>+ (o .:? "kind" .!=+ "admin#datatransfer#dataTransfersList")+ <*> (o .:? "dataTransfers" .!= mempty))++instance ToJSON DataTransfersListResponse where+ toJSON DataTransfersListResponse{..}+ = object+ (catMaybes+ [("etag" .=) <$> _dtlrEtag,+ ("nextPageToken" .=) <$> _dtlrNextPageToken,+ Just ("kind" .= _dtlrKind),+ ("dataTransfers" .=) <$> _dtlrDataTransfers])++-- | Template to map fields of ApplicationDataTransfer resource.+--+-- /See:/ 'applicationDataTransfer' smart constructor.+data ApplicationDataTransfer = ApplicationDataTransfer+ { _adtApplicationTransferParams :: !(Maybe [ApplicationTransferParam])+ , _adtApplicationId :: !(Maybe (Textual Int64))+ , _adtApplicationTransferStatus :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ApplicationDataTransfer' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'adtApplicationTransferParams'+--+-- * 'adtApplicationId'+--+-- * 'adtApplicationTransferStatus'+applicationDataTransfer+ :: ApplicationDataTransfer+applicationDataTransfer =+ ApplicationDataTransfer+ { _adtApplicationTransferParams = Nothing+ , _adtApplicationId = Nothing+ , _adtApplicationTransferStatus = Nothing+ }++-- | The transfer parameters for the application. These parameters are used+-- to select the data which will get transfered in context of this+-- application.+adtApplicationTransferParams :: Lens' ApplicationDataTransfer [ApplicationTransferParam]+adtApplicationTransferParams+ = lens _adtApplicationTransferParams+ (\ s a -> s{_adtApplicationTransferParams = a})+ . _Default+ . _Coerce++-- | The application\'s ID.+adtApplicationId :: Lens' ApplicationDataTransfer (Maybe Int64)+adtApplicationId+ = lens _adtApplicationId+ (\ s a -> s{_adtApplicationId = a})+ . mapping _Coerce++-- | Current status of transfer for this application. (Read-only)+adtApplicationTransferStatus :: Lens' ApplicationDataTransfer (Maybe Text)+adtApplicationTransferStatus+ = lens _adtApplicationTransferStatus+ (\ s a -> s{_adtApplicationTransferStatus = a})++instance FromJSON ApplicationDataTransfer where+ parseJSON+ = withObject "ApplicationDataTransfer"+ (\ o ->+ ApplicationDataTransfer <$>+ (o .:? "applicationTransferParams" .!= mempty) <*>+ (o .:? "applicationId")+ <*> (o .:? "applicationTransferStatus"))++instance ToJSON ApplicationDataTransfer where+ toJSON ApplicationDataTransfer{..}+ = object+ (catMaybes+ [("applicationTransferParams" .=) <$>+ _adtApplicationTransferParams,+ ("applicationId" .=) <$> _adtApplicationId,+ ("applicationTransferStatus" .=) <$>+ _adtApplicationTransferStatus])
+ gen/Network/Google/DataTransfer/Types/Sum.hs view
@@ -0,0 +1,19 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.DataTransfer.Types.Sum+-- Copyright : (c) 2015 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.DataTransfer.Types.Sum where++import Network.Google.Prelude
+ gen/Network/Google/Resource/DataTransfer/Applications/Get.hs view
@@ -0,0 +1,87 @@+{-# 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.DataTransfer.Applications.Get+-- Copyright : (c) 2015 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)+--+-- Retrieves information about an application for the given application ID.+--+-- /See:/ <https://developers.google.com/admin-sdk/data-transfer/ Admin Data Transfer API Reference> for @datatransfer.applications.get@.+module Network.Google.Resource.DataTransfer.Applications.Get+ (+ -- * REST Resource+ ApplicationsGetResource++ -- * Creating a Request+ , applicationsGet+ , ApplicationsGet++ -- * Request Lenses+ , agApplicationId+ ) where++import Network.Google.DataTransfer.Types+import Network.Google.Prelude++-- | A resource alias for @datatransfer.applications.get@ method which the+-- 'ApplicationsGet' request conforms to.+type ApplicationsGetResource =+ "admin" :>+ "datatransfer" :>+ "v1" :>+ "applications" :>+ Capture "applicationId" (Textual Int64) :>+ QueryParam "alt" AltJSON :> Get '[JSON] Application++-- | Retrieves information about an application for the given application ID.+--+-- /See:/ 'applicationsGet' smart constructor.+newtype ApplicationsGet = ApplicationsGet+ { _agApplicationId :: Textual Int64+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ApplicationsGet' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'agApplicationId'+applicationsGet+ :: Int64 -- ^ 'agApplicationId'+ -> ApplicationsGet+applicationsGet pAgApplicationId_ =+ ApplicationsGet+ { _agApplicationId = _Coerce # pAgApplicationId_+ }++-- | ID of the application resource to be retrieved.+agApplicationId :: Lens' ApplicationsGet Int64+agApplicationId+ = lens _agApplicationId+ (\ s a -> s{_agApplicationId = a})+ . _Coerce++instance GoogleRequest ApplicationsGet where+ type Rs ApplicationsGet = Application+ requestClient ApplicationsGet{..}+ = go _agApplicationId (Just AltJSON)+ dataTransferService+ where go+ = buildClient+ (Proxy :: Proxy ApplicationsGetResource)+ mempty
+ gen/Network/Google/Resource/DataTransfer/Applications/List.hs view
@@ -0,0 +1,109 @@+{-# 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.DataTransfer.Applications.List+-- Copyright : (c) 2015 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 applications available for data transfer for a customer.+--+-- /See:/ <https://developers.google.com/admin-sdk/data-transfer/ Admin Data Transfer API Reference> for @datatransfer.applications.list@.+module Network.Google.Resource.DataTransfer.Applications.List+ (+ -- * REST Resource+ ApplicationsListResource++ -- * Creating a Request+ , applicationsList+ , ApplicationsList++ -- * Request Lenses+ , alCustomerId+ , alPageToken+ , alMaxResults+ ) where++import Network.Google.DataTransfer.Types+import Network.Google.Prelude++-- | A resource alias for @datatransfer.applications.list@ method which the+-- 'ApplicationsList' request conforms to.+type ApplicationsListResource =+ "admin" :>+ "datatransfer" :>+ "v1" :>+ "applications" :>+ QueryParam "customerId" Text :>+ QueryParam "pageToken" Text :>+ QueryParam "maxResults" (Textual Word32) :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] ApplicationsListResponse++-- | Lists the applications available for data transfer for a customer.+--+-- /See:/ 'applicationsList' smart constructor.+data ApplicationsList = ApplicationsList+ { _alCustomerId :: !(Maybe Text)+ , _alPageToken :: !(Maybe Text)+ , _alMaxResults :: !(Maybe (Textual Word32))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ApplicationsList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'alCustomerId'+--+-- * 'alPageToken'+--+-- * 'alMaxResults'+applicationsList+ :: ApplicationsList+applicationsList =+ ApplicationsList+ { _alCustomerId = Nothing+ , _alPageToken = Nothing+ , _alMaxResults = Nothing+ }++-- | Immutable ID of the Google Apps account.+alCustomerId :: Lens' ApplicationsList (Maybe Text)+alCustomerId+ = lens _alCustomerId (\ s a -> s{_alCustomerId = a})++-- | Token to specify next page in the list.+alPageToken :: Lens' ApplicationsList (Maybe Text)+alPageToken+ = lens _alPageToken (\ s a -> s{_alPageToken = a})++-- | Maximum number of results to return. Default is 100.+alMaxResults :: Lens' ApplicationsList (Maybe Word32)+alMaxResults+ = lens _alMaxResults (\ s a -> s{_alMaxResults = a})+ . mapping _Coerce++instance GoogleRequest ApplicationsList where+ type Rs ApplicationsList = ApplicationsListResponse+ requestClient ApplicationsList{..}+ = go _alCustomerId _alPageToken _alMaxResults+ (Just AltJSON)+ dataTransferService+ where go+ = buildClient+ (Proxy :: Proxy ApplicationsListResource)+ mempty
+ gen/Network/Google/Resource/DataTransfer/Transfers/Get.hs view
@@ -0,0 +1,86 @@+{-# 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.DataTransfer.Transfers.Get+-- Copyright : (c) 2015 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)+--+-- Retrieves a data transfer request by its resource ID.+--+-- /See:/ <https://developers.google.com/admin-sdk/data-transfer/ Admin Data Transfer API Reference> for @datatransfer.transfers.get@.+module Network.Google.Resource.DataTransfer.Transfers.Get+ (+ -- * REST Resource+ TransfersGetResource++ -- * Creating a Request+ , transfersGet+ , TransfersGet++ -- * Request Lenses+ , tgDataTransferId+ ) where++import Network.Google.DataTransfer.Types+import Network.Google.Prelude++-- | A resource alias for @datatransfer.transfers.get@ method which the+-- 'TransfersGet' request conforms to.+type TransfersGetResource =+ "admin" :>+ "datatransfer" :>+ "v1" :>+ "transfers" :>+ Capture "dataTransferId" Text :>+ QueryParam "alt" AltJSON :> Get '[JSON] DataTransfer++-- | Retrieves a data transfer request by its resource ID.+--+-- /See:/ 'transfersGet' smart constructor.+newtype TransfersGet = TransfersGet+ { _tgDataTransferId :: Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'TransfersGet' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tgDataTransferId'+transfersGet+ :: Text -- ^ 'tgDataTransferId'+ -> TransfersGet+transfersGet pTgDataTransferId_ =+ TransfersGet+ { _tgDataTransferId = pTgDataTransferId_+ }++-- | ID of the resource to be retrieved. This is returned in the response+-- from the insert method.+tgDataTransferId :: Lens' TransfersGet Text+tgDataTransferId+ = lens _tgDataTransferId+ (\ s a -> s{_tgDataTransferId = a})++instance GoogleRequest TransfersGet where+ type Rs TransfersGet = DataTransfer+ requestClient TransfersGet{..}+ = go _tgDataTransferId (Just AltJSON)+ dataTransferService+ where go+ = buildClient (Proxy :: Proxy TransfersGetResource)+ mempty
+ gen/Network/Google/Resource/DataTransfer/Transfers/Insert.hs view
@@ -0,0 +1,85 @@+{-# 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.DataTransfer.Transfers.Insert+-- Copyright : (c) 2015 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)+--+-- Inserts a data transfer request.+--+-- /See:/ <https://developers.google.com/admin-sdk/data-transfer/ Admin Data Transfer API Reference> for @datatransfer.transfers.insert@.+module Network.Google.Resource.DataTransfer.Transfers.Insert+ (+ -- * REST Resource+ TransfersInsertResource++ -- * Creating a Request+ , transfersInsert+ , TransfersInsert++ -- * Request Lenses+ , tiPayload+ ) where++import Network.Google.DataTransfer.Types+import Network.Google.Prelude++-- | A resource alias for @datatransfer.transfers.insert@ method which the+-- 'TransfersInsert' request conforms to.+type TransfersInsertResource =+ "admin" :>+ "datatransfer" :>+ "v1" :>+ "transfers" :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] DataTransfer :>+ Post '[JSON] DataTransfer++-- | Inserts a data transfer request.+--+-- /See:/ 'transfersInsert' smart constructor.+newtype TransfersInsert = TransfersInsert+ { _tiPayload :: DataTransfer+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'TransfersInsert' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tiPayload'+transfersInsert+ :: DataTransfer -- ^ 'tiPayload'+ -> TransfersInsert+transfersInsert pTiPayload_ =+ TransfersInsert+ { _tiPayload = pTiPayload_+ }++-- | Multipart request metadata.+tiPayload :: Lens' TransfersInsert DataTransfer+tiPayload+ = lens _tiPayload (\ s a -> s{_tiPayload = a})++instance GoogleRequest TransfersInsert where+ type Rs TransfersInsert = DataTransfer+ requestClient TransfersInsert{..}+ = go (Just AltJSON) _tiPayload dataTransferService+ where go+ = buildClient+ (Proxy :: Proxy TransfersInsertResource)+ mempty
+ gen/Network/Google/Resource/DataTransfer/Transfers/List.hs view
@@ -0,0 +1,147 @@+{-# 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.DataTransfer.Transfers.List+-- Copyright : (c) 2015 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 transfers for a customer by source user, destination user, or+-- status.+--+-- /See:/ <https://developers.google.com/admin-sdk/data-transfer/ Admin Data Transfer API Reference> for @datatransfer.transfers.list@.+module Network.Google.Resource.DataTransfer.Transfers.List+ (+ -- * REST Resource+ TransfersListResource++ -- * Creating a Request+ , transfersList+ , TransfersList++ -- * Request Lenses+ , tlStatus+ , tlOldOwnerUserId+ , tlNewOwnerUserId+ , tlCustomerId+ , tlPageToken+ , tlMaxResults+ ) where++import Network.Google.DataTransfer.Types+import Network.Google.Prelude++-- | A resource alias for @datatransfer.transfers.list@ method which the+-- 'TransfersList' request conforms to.+type TransfersListResource =+ "admin" :>+ "datatransfer" :>+ "v1" :>+ "transfers" :>+ QueryParam "status" Text :>+ QueryParam "oldOwnerUserId" Text :>+ QueryParam "newOwnerUserId" Text :>+ QueryParam "customerId" Text :>+ QueryParam "pageToken" Text :>+ QueryParam "maxResults" (Textual Int32) :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] DataTransfersListResponse++-- | Lists the transfers for a customer by source user, destination user, or+-- status.+--+-- /See:/ 'transfersList' smart constructor.+data TransfersList = TransfersList+ { _tlStatus :: !(Maybe Text)+ , _tlOldOwnerUserId :: !(Maybe Text)+ , _tlNewOwnerUserId :: !(Maybe Text)+ , _tlCustomerId :: !(Maybe Text)+ , _tlPageToken :: !(Maybe Text)+ , _tlMaxResults :: !(Maybe (Textual Int32))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'TransfersList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tlStatus'+--+-- * 'tlOldOwnerUserId'+--+-- * 'tlNewOwnerUserId'+--+-- * 'tlCustomerId'+--+-- * 'tlPageToken'+--+-- * 'tlMaxResults'+transfersList+ :: TransfersList+transfersList =+ TransfersList+ { _tlStatus = Nothing+ , _tlOldOwnerUserId = Nothing+ , _tlNewOwnerUserId = Nothing+ , _tlCustomerId = Nothing+ , _tlPageToken = Nothing+ , _tlMaxResults = Nothing+ }++-- | Status of the transfer.+tlStatus :: Lens' TransfersList (Maybe Text)+tlStatus = lens _tlStatus (\ s a -> s{_tlStatus = a})++-- | Source user\'s profile ID.+tlOldOwnerUserId :: Lens' TransfersList (Maybe Text)+tlOldOwnerUserId+ = lens _tlOldOwnerUserId+ (\ s a -> s{_tlOldOwnerUserId = a})++-- | Destination user\'s profile ID.+tlNewOwnerUserId :: Lens' TransfersList (Maybe Text)+tlNewOwnerUserId+ = lens _tlNewOwnerUserId+ (\ s a -> s{_tlNewOwnerUserId = a})++-- | Immutable ID of the Google Apps account.+tlCustomerId :: Lens' TransfersList (Maybe Text)+tlCustomerId+ = lens _tlCustomerId (\ s a -> s{_tlCustomerId = a})++-- | Token to specify the next page in the list.+tlPageToken :: Lens' TransfersList (Maybe Text)+tlPageToken+ = lens _tlPageToken (\ s a -> s{_tlPageToken = a})++-- | Maximum number of results to return. Default is 100.+tlMaxResults :: Lens' TransfersList (Maybe Int32)+tlMaxResults+ = lens _tlMaxResults (\ s a -> s{_tlMaxResults = a})+ . mapping _Coerce++instance GoogleRequest TransfersList where+ type Rs TransfersList = DataTransfersListResponse+ requestClient TransfersList{..}+ = go _tlStatus _tlOldOwnerUserId _tlNewOwnerUserId+ _tlCustomerId+ _tlPageToken+ _tlMaxResults+ (Just AltJSON)+ dataTransferService+ where go+ = buildClient (Proxy :: Proxy TransfersListResource)+ mempty
+ gogol-admin-datatransfer.cabal view
@@ -0,0 +1,51 @@+name: gogol-admin-datatransfer+version: 0.0.1+synopsis: Google Admin Data Transfer 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 Brendan Hay+category: Network, Google, Cloud+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md++description:+ Admin Data Transfer API lets you transfer user data from one user to+ another.+ .+ /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 @datatransfer_v1@+ 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.DataTransfer+ , Network.Google.DataTransfer.Types+ , Network.Google.Resource.DataTransfer.Applications.Get+ , Network.Google.Resource.DataTransfer.Applications.List+ , Network.Google.Resource.DataTransfer.Transfers.Get+ , Network.Google.Resource.DataTransfer.Transfers.Insert+ , Network.Google.Resource.DataTransfer.Transfers.List++ other-modules:+ Network.Google.DataTransfer.Types.Product+ , Network.Google.DataTransfer.Types.Sum++ build-depends:+ gogol-core == 0.0.1.*+ , base >= 4.7 && < 5