gogol-apps-reseller (empty) → 0.0.1
raw patch · 22 files changed
+3314/−0 lines, 22 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/AppsReseller.hs +210/−0
- gen/Network/Google/AppsReseller/Types.hs +143/−0
- gen/Network/Google/AppsReseller/Types/Product.hs +943/−0
- gen/Network/Google/AppsReseller/Types/Sum.hs +58/−0
- gen/Network/Google/Resource/Reseller/Customers/Get.hs +83/−0
- gen/Network/Google/Resource/Reseller/Customers/Insert.hs +99/−0
- gen/Network/Google/Resource/Reseller/Customers/Patch.hs +98/−0
- gen/Network/Google/Resource/Reseller/Customers/Update.hs +99/−0
- gen/Network/Google/Resource/Reseller/Subscriptions/Activate.hs +100/−0
- gen/Network/Google/Resource/Reseller/Subscriptions/ChangePlan.hs +115/−0
- gen/Network/Google/Resource/Reseller/Subscriptions/ChangeRenewalSettings.hs +119/−0
- gen/Network/Google/Resource/Reseller/Subscriptions/ChangeSeats.hs +114/−0
- gen/Network/Google/Resource/Reseller/Subscriptions/Delete.hs +115/−0
- gen/Network/Google/Resource/Reseller/Subscriptions/Get.hs +99/−0
- gen/Network/Google/Resource/Reseller/Subscriptions/Insert.hs +115/−0
- gen/Network/Google/Resource/Reseller/Subscriptions/List.hs +140/−0
- gen/Network/Google/Resource/Reseller/Subscriptions/StartPaidService.hs +104/−0
- gen/Network/Google/Resource/Reseller/Subscriptions/Suspend.hs +100/−0
- gogol-apps-reseller.cabal +63/−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-apps-reseller++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`0.0.1`+++## Description++A client library for the Google Enterprise Apps Reseller.+++## 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-apps-reseller` 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/AppsReseller.hs view
@@ -0,0 +1,210 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- |+-- Module : Network.Google.AppsReseller+-- 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)+--+-- Lets you create and manage your customers and their subscriptions.+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference>+module Network.Google.AppsReseller+ (+ -- * Service Configuration+ appsResellerService++ -- * API Declaration+ , AppsResellerAPI++ -- * Resources++ -- ** reseller.customers.get+ , module Network.Google.Resource.Reseller.Customers.Get++ -- ** reseller.customers.insert+ , module Network.Google.Resource.Reseller.Customers.Insert++ -- ** reseller.customers.patch+ , module Network.Google.Resource.Reseller.Customers.Patch++ -- ** reseller.customers.update+ , module Network.Google.Resource.Reseller.Customers.Update++ -- ** reseller.subscriptions.activate+ , module Network.Google.Resource.Reseller.Subscriptions.Activate++ -- ** reseller.subscriptions.changePlan+ , module Network.Google.Resource.Reseller.Subscriptions.ChangePlan++ -- ** reseller.subscriptions.changeRenewalSettings+ , module Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings++ -- ** reseller.subscriptions.changeSeats+ , module Network.Google.Resource.Reseller.Subscriptions.ChangeSeats++ -- ** reseller.subscriptions.delete+ , module Network.Google.Resource.Reseller.Subscriptions.Delete++ -- ** reseller.subscriptions.get+ , module Network.Google.Resource.Reseller.Subscriptions.Get++ -- ** reseller.subscriptions.insert+ , module Network.Google.Resource.Reseller.Subscriptions.Insert++ -- ** reseller.subscriptions.list+ , module Network.Google.Resource.Reseller.Subscriptions.List++ -- ** reseller.subscriptions.startPaidService+ , module Network.Google.Resource.Reseller.Subscriptions.StartPaidService++ -- ** reseller.subscriptions.suspend+ , module Network.Google.Resource.Reseller.Subscriptions.Suspend++ -- * Types++ -- ** SubscriptionTrialSettings+ , SubscriptionTrialSettings+ , subscriptionTrialSettings+ , stsIsInTrial+ , stsTrialEndTime++ -- ** Address+ , Address+ , address+ , aOrganizationName+ , aKind+ , aPostalCode+ , aAddressLine1+ , aLocality+ , aContactName+ , aAddressLine2+ , aCountryCode+ , aRegion+ , aAddressLine3++ -- ** Customer+ , Customer+ , customer+ , cResourceUiURL+ , cKind+ , cCustomerId+ , cAlternateEmail+ , cCustomerDomain+ , cPhoneNumber+ , cPostalAddress++ -- ** ChangePlanRequest+ , ChangePlanRequest+ , changePlanRequest+ , cprKind+ , cprPlanName+ , cprPurchaseOrderId+ , cprSeats++ -- ** SubscriptionPlanCommitmentInterval+ , SubscriptionPlanCommitmentInterval+ , subscriptionPlanCommitmentInterval+ , spciStartTime+ , spciEndTime++ -- ** SubscriptionsDeleteDeletionType+ , SubscriptionsDeleteDeletionType (..)++ -- ** SubscriptionPlan+ , SubscriptionPlan+ , subscriptionPlan+ , spCommitmentInterval+ , spIsCommitmentPlan+ , spPlanName++ -- ** Subscriptions+ , Subscriptions+ , subscriptions+ , sNextPageToken+ , sKind+ , sSubscriptions++ -- ** Seats+ , Seats+ , seats+ , seaNumberOfSeats+ , seaMaximumNumberOfSeats+ , seaLicensedNumberOfSeats+ , seaKind++ -- ** RenewalSettings+ , RenewalSettings+ , renewalSettings+ , rsKind+ , rsRenewalType++ -- ** Subscription+ , Subscription+ , subscription+ , subCreationTime+ , subBillingMethod+ , subStatus+ , subTrialSettings+ , subResourceUiURL+ , subKind+ , subSKUId+ , subPlan+ , subCustomerId+ , subSuspensionReasons+ , subTransferInfo+ , subPurchaseOrderId+ , subSeats+ , subRenewalSettings+ , subSubscriptionId++ -- ** SubscriptionTransferInfo+ , SubscriptionTransferInfo+ , subscriptionTransferInfo+ , stiTransferabilityExpirationTime+ , stiMinimumTransferableSeats+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude+import Network.Google.Resource.Reseller.Customers.Get+import Network.Google.Resource.Reseller.Customers.Insert+import Network.Google.Resource.Reseller.Customers.Patch+import Network.Google.Resource.Reseller.Customers.Update+import Network.Google.Resource.Reseller.Subscriptions.Activate+import Network.Google.Resource.Reseller.Subscriptions.ChangePlan+import Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings+import Network.Google.Resource.Reseller.Subscriptions.ChangeSeats+import Network.Google.Resource.Reseller.Subscriptions.Delete+import Network.Google.Resource.Reseller.Subscriptions.Get+import Network.Google.Resource.Reseller.Subscriptions.Insert+import Network.Google.Resource.Reseller.Subscriptions.List+import Network.Google.Resource.Reseller.Subscriptions.StartPaidService+import Network.Google.Resource.Reseller.Subscriptions.Suspend++{- $resources+TODO+-}++-- | Represents the entirety of the methods and resources available for the Enterprise Apps Reseller API service.+type AppsResellerAPI =+ CustomersInsertResource :<|> CustomersPatchResource+ :<|> CustomersGetResource+ :<|> CustomersUpdateResource+ :<|> SubscriptionsInsertResource+ :<|> SubscriptionsListResource+ :<|> SubscriptionsChangeRenewalSettingsResource+ :<|> SubscriptionsGetResource+ :<|> SubscriptionsActivateResource+ :<|> SubscriptionsSuspendResource+ :<|> SubscriptionsChangePlanResource+ :<|> SubscriptionsChangeSeatsResource+ :<|> SubscriptionsDeleteResource+ :<|> SubscriptionsStartPaidServiceResource
+ gen/Network/Google/AppsReseller/Types.hs view
@@ -0,0 +1,143 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.AppsReseller.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.AppsReseller.Types+ (+ -- * Service Configuration+ appsResellerService++ -- * OAuth Scopes+ , appsOrderReadonlyScope+ , appsOrderScope++ -- * SubscriptionTrialSettings+ , SubscriptionTrialSettings+ , subscriptionTrialSettings+ , stsIsInTrial+ , stsTrialEndTime++ -- * Address+ , Address+ , address+ , aOrganizationName+ , aKind+ , aPostalCode+ , aAddressLine1+ , aLocality+ , aContactName+ , aAddressLine2+ , aCountryCode+ , aRegion+ , aAddressLine3++ -- * Customer+ , Customer+ , customer+ , cResourceUiURL+ , cKind+ , cCustomerId+ , cAlternateEmail+ , cCustomerDomain+ , cPhoneNumber+ , cPostalAddress++ -- * ChangePlanRequest+ , ChangePlanRequest+ , changePlanRequest+ , cprKind+ , cprPlanName+ , cprPurchaseOrderId+ , cprSeats++ -- * SubscriptionPlanCommitmentInterval+ , SubscriptionPlanCommitmentInterval+ , subscriptionPlanCommitmentInterval+ , spciStartTime+ , spciEndTime++ -- * SubscriptionsDeleteDeletionType+ , SubscriptionsDeleteDeletionType (..)++ -- * SubscriptionPlan+ , SubscriptionPlan+ , subscriptionPlan+ , spCommitmentInterval+ , spIsCommitmentPlan+ , spPlanName++ -- * Subscriptions+ , Subscriptions+ , subscriptions+ , sNextPageToken+ , sKind+ , sSubscriptions++ -- * Seats+ , Seats+ , seats+ , seaNumberOfSeats+ , seaMaximumNumberOfSeats+ , seaLicensedNumberOfSeats+ , seaKind++ -- * RenewalSettings+ , RenewalSettings+ , renewalSettings+ , rsKind+ , rsRenewalType++ -- * Subscription+ , Subscription+ , subscription+ , subCreationTime+ , subBillingMethod+ , subStatus+ , subTrialSettings+ , subResourceUiURL+ , subKind+ , subSKUId+ , subPlan+ , subCustomerId+ , subSuspensionReasons+ , subTransferInfo+ , subPurchaseOrderId+ , subSeats+ , subRenewalSettings+ , subSubscriptionId++ -- * SubscriptionTransferInfo+ , SubscriptionTransferInfo+ , subscriptionTransferInfo+ , stiTransferabilityExpirationTime+ , stiMinimumTransferableSeats+ ) where++import Network.Google.AppsReseller.Types.Product+import Network.Google.AppsReseller.Types.Sum+import Network.Google.Prelude++-- | Default request referring to version 'v1' of the Enterprise Apps Reseller API. This contains the host and root path used as a starting point for constructing service requests.+appsResellerService :: Service+appsResellerService+ = defaultService (ServiceId "reseller:v1")+ "www.googleapis.com"++-- | Manage users on your domain+appsOrderReadonlyScope :: OAuthScope+appsOrderReadonlyScope = "https://www.googleapis.com/auth/apps.order.readonly";++-- | Manage users on your domain+appsOrderScope :: OAuthScope+appsOrderScope = "https://www.googleapis.com/auth/apps.order";
+ gen/Network/Google/AppsReseller/Types/Product.hs view
@@ -0,0 +1,943 @@+{-# 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.AppsReseller.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.AppsReseller.Types.Product where++import Network.Google.AppsReseller.Types.Sum+import Network.Google.Prelude++-- | Trial Settings of the subscription.+--+-- /See:/ 'subscriptionTrialSettings' smart constructor.+data SubscriptionTrialSettings = SubscriptionTrialSettings+ { _stsIsInTrial :: !(Maybe Bool)+ , _stsTrialEndTime :: !(Maybe (Textual Int64))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionTrialSettings' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'stsIsInTrial'+--+-- * 'stsTrialEndTime'+subscriptionTrialSettings+ :: SubscriptionTrialSettings+subscriptionTrialSettings =+ SubscriptionTrialSettings+ { _stsIsInTrial = Nothing+ , _stsTrialEndTime = Nothing+ }++-- | Whether the subscription is in trial.+stsIsInTrial :: Lens' SubscriptionTrialSettings (Maybe Bool)+stsIsInTrial+ = lens _stsIsInTrial (\ s a -> s{_stsIsInTrial = a})++-- | End time of the trial in milliseconds since Unix epoch.+stsTrialEndTime :: Lens' SubscriptionTrialSettings (Maybe Int64)+stsTrialEndTime+ = lens _stsTrialEndTime+ (\ s a -> s{_stsTrialEndTime = a})+ . mapping _Coerce++instance FromJSON SubscriptionTrialSettings where+ parseJSON+ = withObject "SubscriptionTrialSettings"+ (\ o ->+ SubscriptionTrialSettings <$>+ (o .:? "isInTrial") <*> (o .:? "trialEndTime"))++instance ToJSON SubscriptionTrialSettings where+ toJSON SubscriptionTrialSettings{..}+ = object+ (catMaybes+ [("isInTrial" .=) <$> _stsIsInTrial,+ ("trialEndTime" .=) <$> _stsTrialEndTime])++-- | JSON template for address of a customer.+--+-- /See:/ 'address' smart constructor.+data Address = Address+ { _aOrganizationName :: !(Maybe Text)+ , _aKind :: !Text+ , _aPostalCode :: !(Maybe Text)+ , _aAddressLine1 :: !(Maybe Text)+ , _aLocality :: !(Maybe Text)+ , _aContactName :: !(Maybe Text)+ , _aAddressLine2 :: !(Maybe Text)+ , _aCountryCode :: !(Maybe Text)+ , _aRegion :: !(Maybe Text)+ , _aAddressLine3 :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Address' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aOrganizationName'+--+-- * 'aKind'+--+-- * 'aPostalCode'+--+-- * 'aAddressLine1'+--+-- * 'aLocality'+--+-- * 'aContactName'+--+-- * 'aAddressLine2'+--+-- * 'aCountryCode'+--+-- * 'aRegion'+--+-- * 'aAddressLine3'+address+ :: Address+address =+ Address+ { _aOrganizationName = Nothing+ , _aKind = "customers#address"+ , _aPostalCode = Nothing+ , _aAddressLine1 = Nothing+ , _aLocality = Nothing+ , _aContactName = Nothing+ , _aAddressLine2 = Nothing+ , _aCountryCode = Nothing+ , _aRegion = Nothing+ , _aAddressLine3 = Nothing+ }++-- | Name of the organization.+aOrganizationName :: Lens' Address (Maybe Text)+aOrganizationName+ = lens _aOrganizationName+ (\ s a -> s{_aOrganizationName = a})++-- | Identifies the resource as a customer address.+aKind :: Lens' Address Text+aKind = lens _aKind (\ s a -> s{_aKind = a})++-- | The postal code. This is in accordance with -+-- http:\/\/portablecontacts.net\/draft-spec.html#address_element.+aPostalCode :: Lens' Address (Maybe Text)+aPostalCode+ = lens _aPostalCode (\ s a -> s{_aPostalCode = a})++-- | Address line 1 of the address.+aAddressLine1 :: Lens' Address (Maybe Text)+aAddressLine1+ = lens _aAddressLine1+ (\ s a -> s{_aAddressLine1 = a})++-- | Name of the locality. This is in accordance with -+-- http:\/\/portablecontacts.net\/draft-spec.html#address_element.+aLocality :: Lens' Address (Maybe Text)+aLocality+ = lens _aLocality (\ s a -> s{_aLocality = a})++-- | Name of the contact person.+aContactName :: Lens' Address (Maybe Text)+aContactName+ = lens _aContactName (\ s a -> s{_aContactName = a})++-- | Address line 2 of the address.+aAddressLine2 :: Lens' Address (Maybe Text)+aAddressLine2+ = lens _aAddressLine2+ (\ s a -> s{_aAddressLine2 = a})++-- | ISO 3166 country code.+aCountryCode :: Lens' Address (Maybe Text)+aCountryCode+ = lens _aCountryCode (\ s a -> s{_aCountryCode = a})++-- | Name of the region. This is in accordance with -+-- http:\/\/portablecontacts.net\/draft-spec.html#address_element.+aRegion :: Lens' Address (Maybe Text)+aRegion = lens _aRegion (\ s a -> s{_aRegion = a})++-- | Address line 3 of the address.+aAddressLine3 :: Lens' Address (Maybe Text)+aAddressLine3+ = lens _aAddressLine3+ (\ s a -> s{_aAddressLine3 = a})++instance FromJSON Address where+ parseJSON+ = withObject "Address"+ (\ o ->+ Address <$>+ (o .:? "organizationName") <*>+ (o .:? "kind" .!= "customers#address")+ <*> (o .:? "postalCode")+ <*> (o .:? "addressLine1")+ <*> (o .:? "locality")+ <*> (o .:? "contactName")+ <*> (o .:? "addressLine2")+ <*> (o .:? "countryCode")+ <*> (o .:? "region")+ <*> (o .:? "addressLine3"))++instance ToJSON Address where+ toJSON Address{..}+ = object+ (catMaybes+ [("organizationName" .=) <$> _aOrganizationName,+ Just ("kind" .= _aKind),+ ("postalCode" .=) <$> _aPostalCode,+ ("addressLine1" .=) <$> _aAddressLine1,+ ("locality" .=) <$> _aLocality,+ ("contactName" .=) <$> _aContactName,+ ("addressLine2" .=) <$> _aAddressLine2,+ ("countryCode" .=) <$> _aCountryCode,+ ("region" .=) <$> _aRegion,+ ("addressLine3" .=) <$> _aAddressLine3])++-- | JSON template for a customer.+--+-- /See:/ 'customer' smart constructor.+data Customer = Customer+ { _cResourceUiURL :: !(Maybe Text)+ , _cKind :: !Text+ , _cCustomerId :: !(Maybe Text)+ , _cAlternateEmail :: !(Maybe Text)+ , _cCustomerDomain :: !(Maybe Text)+ , _cPhoneNumber :: !(Maybe Text)+ , _cPostalAddress :: !(Maybe Address)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Customer' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cResourceUiURL'+--+-- * 'cKind'+--+-- * 'cCustomerId'+--+-- * 'cAlternateEmail'+--+-- * 'cCustomerDomain'+--+-- * 'cPhoneNumber'+--+-- * 'cPostalAddress'+customer+ :: Customer+customer =+ Customer+ { _cResourceUiURL = Nothing+ , _cKind = "reseller#customer"+ , _cCustomerId = Nothing+ , _cAlternateEmail = Nothing+ , _cCustomerDomain = Nothing+ , _cPhoneNumber = Nothing+ , _cPostalAddress = Nothing+ }++-- | Ui url for customer resource.+cResourceUiURL :: Lens' Customer (Maybe Text)+cResourceUiURL+ = lens _cResourceUiURL+ (\ s a -> s{_cResourceUiURL = a})++-- | Identifies the resource as a customer.+cKind :: Lens' Customer Text+cKind = lens _cKind (\ s a -> s{_cKind = a})++-- | The id of the customer.+cCustomerId :: Lens' Customer (Maybe Text)+cCustomerId+ = lens _cCustomerId (\ s a -> s{_cCustomerId = a})++-- | The alternate email of the customer.+cAlternateEmail :: Lens' Customer (Maybe Text)+cAlternateEmail+ = lens _cAlternateEmail+ (\ s a -> s{_cAlternateEmail = a})++-- | The domain name of the customer.+cCustomerDomain :: Lens' Customer (Maybe Text)+cCustomerDomain+ = lens _cCustomerDomain+ (\ s a -> s{_cCustomerDomain = a})++-- | The phone number of the customer.+cPhoneNumber :: Lens' Customer (Maybe Text)+cPhoneNumber+ = lens _cPhoneNumber (\ s a -> s{_cPhoneNumber = a})++-- | The postal address of the customer.+cPostalAddress :: Lens' Customer (Maybe Address)+cPostalAddress+ = lens _cPostalAddress+ (\ s a -> s{_cPostalAddress = a})++instance FromJSON Customer where+ parseJSON+ = withObject "Customer"+ (\ o ->+ Customer <$>+ (o .:? "resourceUiUrl") <*>+ (o .:? "kind" .!= "reseller#customer")+ <*> (o .:? "customerId")+ <*> (o .:? "alternateEmail")+ <*> (o .:? "customerDomain")+ <*> (o .:? "phoneNumber")+ <*> (o .:? "postalAddress"))++instance ToJSON Customer where+ toJSON Customer{..}+ = object+ (catMaybes+ [("resourceUiUrl" .=) <$> _cResourceUiURL,+ Just ("kind" .= _cKind),+ ("customerId" .=) <$> _cCustomerId,+ ("alternateEmail" .=) <$> _cAlternateEmail,+ ("customerDomain" .=) <$> _cCustomerDomain,+ ("phoneNumber" .=) <$> _cPhoneNumber,+ ("postalAddress" .=) <$> _cPostalAddress])++-- | JSON template for the ChangePlan rpc request.+--+-- /See:/ 'changePlanRequest' smart constructor.+data ChangePlanRequest = ChangePlanRequest+ { _cprKind :: !Text+ , _cprPlanName :: !(Maybe Text)+ , _cprPurchaseOrderId :: !(Maybe Text)+ , _cprSeats :: !(Maybe Seats)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ChangePlanRequest' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cprKind'+--+-- * 'cprPlanName'+--+-- * 'cprPurchaseOrderId'+--+-- * 'cprSeats'+changePlanRequest+ :: ChangePlanRequest+changePlanRequest =+ ChangePlanRequest+ { _cprKind = "subscriptions#changePlanRequest"+ , _cprPlanName = Nothing+ , _cprPurchaseOrderId = Nothing+ , _cprSeats = Nothing+ }++-- | Identifies the resource as a subscription change plan request.+cprKind :: Lens' ChangePlanRequest Text+cprKind = lens _cprKind (\ s a -> s{_cprKind = a})++-- | Name of the plan to change to.+cprPlanName :: Lens' ChangePlanRequest (Maybe Text)+cprPlanName+ = lens _cprPlanName (\ s a -> s{_cprPlanName = a})++-- | Purchase order id for your order tracking purposes.+cprPurchaseOrderId :: Lens' ChangePlanRequest (Maybe Text)+cprPurchaseOrderId+ = lens _cprPurchaseOrderId+ (\ s a -> s{_cprPurchaseOrderId = a})++-- | Number\/Limit of seats in the new plan.+cprSeats :: Lens' ChangePlanRequest (Maybe Seats)+cprSeats = lens _cprSeats (\ s a -> s{_cprSeats = a})++instance FromJSON ChangePlanRequest where+ parseJSON+ = withObject "ChangePlanRequest"+ (\ o ->+ ChangePlanRequest <$>+ (o .:? "kind" .!= "subscriptions#changePlanRequest")+ <*> (o .:? "planName")+ <*> (o .:? "purchaseOrderId")+ <*> (o .:? "seats"))++instance ToJSON ChangePlanRequest where+ toJSON ChangePlanRequest{..}+ = object+ (catMaybes+ [Just ("kind" .= _cprKind),+ ("planName" .=) <$> _cprPlanName,+ ("purchaseOrderId" .=) <$> _cprPurchaseOrderId,+ ("seats" .=) <$> _cprSeats])++-- | Interval of the commitment if it is a commitment plan.+--+-- /See:/ 'subscriptionPlanCommitmentInterval' smart constructor.+data SubscriptionPlanCommitmentInterval = SubscriptionPlanCommitmentInterval+ { _spciStartTime :: !(Maybe (Textual Int64))+ , _spciEndTime :: !(Maybe (Textual Int64))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionPlanCommitmentInterval' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'spciStartTime'+--+-- * 'spciEndTime'+subscriptionPlanCommitmentInterval+ :: SubscriptionPlanCommitmentInterval+subscriptionPlanCommitmentInterval =+ SubscriptionPlanCommitmentInterval+ { _spciStartTime = Nothing+ , _spciEndTime = Nothing+ }++-- | Start time of the commitment interval in milliseconds since Unix epoch.+spciStartTime :: Lens' SubscriptionPlanCommitmentInterval (Maybe Int64)+spciStartTime+ = lens _spciStartTime+ (\ s a -> s{_spciStartTime = a})+ . mapping _Coerce++-- | End time of the commitment interval in milliseconds since Unix epoch.+spciEndTime :: Lens' SubscriptionPlanCommitmentInterval (Maybe Int64)+spciEndTime+ = lens _spciEndTime (\ s a -> s{_spciEndTime = a}) .+ mapping _Coerce++instance FromJSON SubscriptionPlanCommitmentInterval+ where+ parseJSON+ = withObject "SubscriptionPlanCommitmentInterval"+ (\ o ->+ SubscriptionPlanCommitmentInterval <$>+ (o .:? "startTime") <*> (o .:? "endTime"))++instance ToJSON SubscriptionPlanCommitmentInterval+ where+ toJSON SubscriptionPlanCommitmentInterval{..}+ = object+ (catMaybes+ [("startTime" .=) <$> _spciStartTime,+ ("endTime" .=) <$> _spciEndTime])++-- | Plan details of the subscription+--+-- /See:/ 'subscriptionPlan' smart constructor.+data SubscriptionPlan = SubscriptionPlan+ { _spCommitmentInterval :: !(Maybe SubscriptionPlanCommitmentInterval)+ , _spIsCommitmentPlan :: !(Maybe Bool)+ , _spPlanName :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionPlan' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'spCommitmentInterval'+--+-- * 'spIsCommitmentPlan'+--+-- * 'spPlanName'+subscriptionPlan+ :: SubscriptionPlan+subscriptionPlan =+ SubscriptionPlan+ { _spCommitmentInterval = Nothing+ , _spIsCommitmentPlan = Nothing+ , _spPlanName = Nothing+ }++-- | Interval of the commitment if it is a commitment plan.+spCommitmentInterval :: Lens' SubscriptionPlan (Maybe SubscriptionPlanCommitmentInterval)+spCommitmentInterval+ = lens _spCommitmentInterval+ (\ s a -> s{_spCommitmentInterval = a})++-- | Whether the plan is a commitment plan or not.+spIsCommitmentPlan :: Lens' SubscriptionPlan (Maybe Bool)+spIsCommitmentPlan+ = lens _spIsCommitmentPlan+ (\ s a -> s{_spIsCommitmentPlan = a})++-- | The plan name of this subscription\'s plan.+spPlanName :: Lens' SubscriptionPlan (Maybe Text)+spPlanName+ = lens _spPlanName (\ s a -> s{_spPlanName = a})++instance FromJSON SubscriptionPlan where+ parseJSON+ = withObject "SubscriptionPlan"+ (\ o ->+ SubscriptionPlan <$>+ (o .:? "commitmentInterval") <*>+ (o .:? "isCommitmentPlan")+ <*> (o .:? "planName"))++instance ToJSON SubscriptionPlan where+ toJSON SubscriptionPlan{..}+ = object+ (catMaybes+ [("commitmentInterval" .=) <$> _spCommitmentInterval,+ ("isCommitmentPlan" .=) <$> _spIsCommitmentPlan,+ ("planName" .=) <$> _spPlanName])++-- | JSON template for a subscription list.+--+-- /See:/ 'subscriptions' smart constructor.+data Subscriptions = Subscriptions+ { _sNextPageToken :: !(Maybe Text)+ , _sKind :: !Text+ , _sSubscriptions :: !(Maybe [Subscription])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Subscriptions' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sNextPageToken'+--+-- * 'sKind'+--+-- * 'sSubscriptions'+subscriptions+ :: Subscriptions+subscriptions =+ Subscriptions+ { _sNextPageToken = Nothing+ , _sKind = "reseller#subscriptions"+ , _sSubscriptions = Nothing+ }++-- | The continuation token, used to page through large result sets. Provide+-- this value in a subsequent request to return the next page of results.+sNextPageToken :: Lens' Subscriptions (Maybe Text)+sNextPageToken+ = lens _sNextPageToken+ (\ s a -> s{_sNextPageToken = a})++-- | Identifies the resource as a collection of subscriptions.+sKind :: Lens' Subscriptions Text+sKind = lens _sKind (\ s a -> s{_sKind = a})++-- | The subscriptions in this page of results.+sSubscriptions :: Lens' Subscriptions [Subscription]+sSubscriptions+ = lens _sSubscriptions+ (\ s a -> s{_sSubscriptions = a})+ . _Default+ . _Coerce++instance FromJSON Subscriptions where+ parseJSON+ = withObject "Subscriptions"+ (\ o ->+ Subscriptions <$>+ (o .:? "nextPageToken") <*>+ (o .:? "kind" .!= "reseller#subscriptions")+ <*> (o .:? "subscriptions" .!= mempty))++instance ToJSON Subscriptions where+ toJSON Subscriptions{..}+ = object+ (catMaybes+ [("nextPageToken" .=) <$> _sNextPageToken,+ Just ("kind" .= _sKind),+ ("subscriptions" .=) <$> _sSubscriptions])++-- | JSON template for subscription seats.+--+-- /See:/ 'seats' smart constructor.+data Seats = Seats+ { _seaNumberOfSeats :: !(Maybe (Textual Int32))+ , _seaMaximumNumberOfSeats :: !(Maybe (Textual Int32))+ , _seaLicensedNumberOfSeats :: !(Maybe (Textual Int32))+ , _seaKind :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Seats' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'seaNumberOfSeats'+--+-- * 'seaMaximumNumberOfSeats'+--+-- * 'seaLicensedNumberOfSeats'+--+-- * 'seaKind'+seats+ :: Seats+seats =+ Seats+ { _seaNumberOfSeats = Nothing+ , _seaMaximumNumberOfSeats = Nothing+ , _seaLicensedNumberOfSeats = Nothing+ , _seaKind = "subscriptions#seats"+ }++-- | Number of seats to purchase. This is applicable only for a commitment+-- plan.+seaNumberOfSeats :: Lens' Seats (Maybe Int32)+seaNumberOfSeats+ = lens _seaNumberOfSeats+ (\ s a -> s{_seaNumberOfSeats = a})+ . mapping _Coerce++-- | Maximum number of seats that can be purchased. This needs to be provided+-- only for a non-commitment plan. For a commitment plan it is decided by+-- the contract.+seaMaximumNumberOfSeats :: Lens' Seats (Maybe Int32)+seaMaximumNumberOfSeats+ = lens _seaMaximumNumberOfSeats+ (\ s a -> s{_seaMaximumNumberOfSeats = a})+ . mapping _Coerce++-- | Read-only field containing the current number of licensed seats for+-- FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as+-- Google-Vault and Drive-storage.+seaLicensedNumberOfSeats :: Lens' Seats (Maybe Int32)+seaLicensedNumberOfSeats+ = lens _seaLicensedNumberOfSeats+ (\ s a -> s{_seaLicensedNumberOfSeats = a})+ . mapping _Coerce++-- | Identifies the resource as a subscription change plan request.+seaKind :: Lens' Seats Text+seaKind = lens _seaKind (\ s a -> s{_seaKind = a})++instance FromJSON Seats where+ parseJSON+ = withObject "Seats"+ (\ o ->+ Seats <$>+ (o .:? "numberOfSeats") <*>+ (o .:? "maximumNumberOfSeats")+ <*> (o .:? "licensedNumberOfSeats")+ <*> (o .:? "kind" .!= "subscriptions#seats"))++instance ToJSON Seats where+ toJSON Seats{..}+ = object+ (catMaybes+ [("numberOfSeats" .=) <$> _seaNumberOfSeats,+ ("maximumNumberOfSeats" .=) <$>+ _seaMaximumNumberOfSeats,+ ("licensedNumberOfSeats" .=) <$>+ _seaLicensedNumberOfSeats,+ Just ("kind" .= _seaKind)])++-- | JSON template for a subscription renewal settings.+--+-- /See:/ 'renewalSettings' smart constructor.+data RenewalSettings = RenewalSettings+ { _rsKind :: !Text+ , _rsRenewalType :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'RenewalSettings' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rsKind'+--+-- * 'rsRenewalType'+renewalSettings+ :: RenewalSettings+renewalSettings =+ RenewalSettings+ { _rsKind = "subscriptions#renewalSettings"+ , _rsRenewalType = Nothing+ }++-- | Identifies the resource as a subscription renewal setting.+rsKind :: Lens' RenewalSettings Text+rsKind = lens _rsKind (\ s a -> s{_rsKind = a})++-- | Subscription renewal type.+rsRenewalType :: Lens' RenewalSettings (Maybe Text)+rsRenewalType+ = lens _rsRenewalType+ (\ s a -> s{_rsRenewalType = a})++instance FromJSON RenewalSettings where+ parseJSON+ = withObject "RenewalSettings"+ (\ o ->+ RenewalSettings <$>+ (o .:? "kind" .!= "subscriptions#renewalSettings")+ <*> (o .:? "renewalType"))++instance ToJSON RenewalSettings where+ toJSON RenewalSettings{..}+ = object+ (catMaybes+ [Just ("kind" .= _rsKind),+ ("renewalType" .=) <$> _rsRenewalType])++-- | JSON template for a subscription.+--+-- /See:/ 'subscription' smart constructor.+data Subscription = Subscription+ { _subCreationTime :: !(Maybe (Textual Int64))+ , _subBillingMethod :: !(Maybe Text)+ , _subStatus :: !(Maybe Text)+ , _subTrialSettings :: !(Maybe SubscriptionTrialSettings)+ , _subResourceUiURL :: !(Maybe Text)+ , _subKind :: !Text+ , _subSKUId :: !(Maybe Text)+ , _subPlan :: !(Maybe SubscriptionPlan)+ , _subCustomerId :: !(Maybe Text)+ , _subSuspensionReasons :: !(Maybe [Text])+ , _subTransferInfo :: !(Maybe SubscriptionTransferInfo)+ , _subPurchaseOrderId :: !(Maybe Text)+ , _subSeats :: !(Maybe Seats)+ , _subRenewalSettings :: !(Maybe RenewalSettings)+ , _subSubscriptionId :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Subscription' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'subCreationTime'+--+-- * 'subBillingMethod'+--+-- * 'subStatus'+--+-- * 'subTrialSettings'+--+-- * 'subResourceUiURL'+--+-- * 'subKind'+--+-- * 'subSKUId'+--+-- * 'subPlan'+--+-- * 'subCustomerId'+--+-- * 'subSuspensionReasons'+--+-- * 'subTransferInfo'+--+-- * 'subPurchaseOrderId'+--+-- * 'subSeats'+--+-- * 'subRenewalSettings'+--+-- * 'subSubscriptionId'+subscription+ :: Subscription+subscription =+ Subscription+ { _subCreationTime = Nothing+ , _subBillingMethod = Nothing+ , _subStatus = Nothing+ , _subTrialSettings = Nothing+ , _subResourceUiURL = Nothing+ , _subKind = "reseller#subscription"+ , _subSKUId = Nothing+ , _subPlan = Nothing+ , _subCustomerId = Nothing+ , _subSuspensionReasons = Nothing+ , _subTransferInfo = Nothing+ , _subPurchaseOrderId = Nothing+ , _subSeats = Nothing+ , _subRenewalSettings = Nothing+ , _subSubscriptionId = Nothing+ }++-- | Creation time of this subscription in milliseconds since Unix epoch.+subCreationTime :: Lens' Subscription (Maybe Int64)+subCreationTime+ = lens _subCreationTime+ (\ s a -> s{_subCreationTime = a})+ . mapping _Coerce++-- | Billing method of this subscription.+subBillingMethod :: Lens' Subscription (Maybe Text)+subBillingMethod+ = lens _subBillingMethod+ (\ s a -> s{_subBillingMethod = a})++-- | Status of the subscription.+subStatus :: Lens' Subscription (Maybe Text)+subStatus+ = lens _subStatus (\ s a -> s{_subStatus = a})++-- | Trial Settings of the subscription.+subTrialSettings :: Lens' Subscription (Maybe SubscriptionTrialSettings)+subTrialSettings+ = lens _subTrialSettings+ (\ s a -> s{_subTrialSettings = a})++-- | Ui url for subscription resource.+subResourceUiURL :: Lens' Subscription (Maybe Text)+subResourceUiURL+ = lens _subResourceUiURL+ (\ s a -> s{_subResourceUiURL = a})++-- | Identifies the resource as a Subscription.+subKind :: Lens' Subscription Text+subKind = lens _subKind (\ s a -> s{_subKind = a})++-- | Name of the sku for which this subscription is purchased.+subSKUId :: Lens' Subscription (Maybe Text)+subSKUId = lens _subSKUId (\ s a -> s{_subSKUId = a})++-- | Plan details of the subscription+subPlan :: Lens' Subscription (Maybe SubscriptionPlan)+subPlan = lens _subPlan (\ s a -> s{_subPlan = a})++-- | The id of the customer to whom the subscription belongs.+subCustomerId :: Lens' Subscription (Maybe Text)+subCustomerId+ = lens _subCustomerId+ (\ s a -> s{_subCustomerId = a})++-- | Suspension Reasons+subSuspensionReasons :: Lens' Subscription [Text]+subSuspensionReasons+ = lens _subSuspensionReasons+ (\ s a -> s{_subSuspensionReasons = a})+ . _Default+ . _Coerce++-- | Transfer related information for the subscription.+subTransferInfo :: Lens' Subscription (Maybe SubscriptionTransferInfo)+subTransferInfo+ = lens _subTransferInfo+ (\ s a -> s{_subTransferInfo = a})++-- | Purchase order id for your order tracking purposes.+subPurchaseOrderId :: Lens' Subscription (Maybe Text)+subPurchaseOrderId+ = lens _subPurchaseOrderId+ (\ s a -> s{_subPurchaseOrderId = a})++-- | Number\/Limit of seats in the new plan.+subSeats :: Lens' Subscription (Maybe Seats)+subSeats = lens _subSeats (\ s a -> s{_subSeats = a})++-- | Renewal settings of the subscription.+subRenewalSettings :: Lens' Subscription (Maybe RenewalSettings)+subRenewalSettings+ = lens _subRenewalSettings+ (\ s a -> s{_subRenewalSettings = a})++-- | The id of the subscription.+subSubscriptionId :: Lens' Subscription (Maybe Text)+subSubscriptionId+ = lens _subSubscriptionId+ (\ s a -> s{_subSubscriptionId = a})++instance FromJSON Subscription where+ parseJSON+ = withObject "Subscription"+ (\ o ->+ Subscription <$>+ (o .:? "creationTime") <*> (o .:? "billingMethod")+ <*> (o .:? "status")+ <*> (o .:? "trialSettings")+ <*> (o .:? "resourceUiUrl")+ <*> (o .:? "kind" .!= "reseller#subscription")+ <*> (o .:? "skuId")+ <*> (o .:? "plan")+ <*> (o .:? "customerId")+ <*> (o .:? "suspensionReasons" .!= mempty)+ <*> (o .:? "transferInfo")+ <*> (o .:? "purchaseOrderId")+ <*> (o .:? "seats")+ <*> (o .:? "renewalSettings")+ <*> (o .:? "subscriptionId"))++instance ToJSON Subscription where+ toJSON Subscription{..}+ = object+ (catMaybes+ [("creationTime" .=) <$> _subCreationTime,+ ("billingMethod" .=) <$> _subBillingMethod,+ ("status" .=) <$> _subStatus,+ ("trialSettings" .=) <$> _subTrialSettings,+ ("resourceUiUrl" .=) <$> _subResourceUiURL,+ Just ("kind" .= _subKind),+ ("skuId" .=) <$> _subSKUId, ("plan" .=) <$> _subPlan,+ ("customerId" .=) <$> _subCustomerId,+ ("suspensionReasons" .=) <$> _subSuspensionReasons,+ ("transferInfo" .=) <$> _subTransferInfo,+ ("purchaseOrderId" .=) <$> _subPurchaseOrderId,+ ("seats" .=) <$> _subSeats,+ ("renewalSettings" .=) <$> _subRenewalSettings,+ ("subscriptionId" .=) <$> _subSubscriptionId])++-- | Transfer related information for the subscription.+--+-- /See:/ 'subscriptionTransferInfo' smart constructor.+data SubscriptionTransferInfo = SubscriptionTransferInfo+ { _stiTransferabilityExpirationTime :: !(Maybe (Textual Int64))+ , _stiMinimumTransferableSeats :: !(Maybe (Textual Int32))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionTransferInfo' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'stiTransferabilityExpirationTime'+--+-- * 'stiMinimumTransferableSeats'+subscriptionTransferInfo+ :: SubscriptionTransferInfo+subscriptionTransferInfo =+ SubscriptionTransferInfo+ { _stiTransferabilityExpirationTime = Nothing+ , _stiMinimumTransferableSeats = Nothing+ }++-- | Time when transfer token or intent to transfer will expire.+stiTransferabilityExpirationTime :: Lens' SubscriptionTransferInfo (Maybe Int64)+stiTransferabilityExpirationTime+ = lens _stiTransferabilityExpirationTime+ (\ s a -> s{_stiTransferabilityExpirationTime = a})+ . mapping _Coerce++stiMinimumTransferableSeats :: Lens' SubscriptionTransferInfo (Maybe Int32)+stiMinimumTransferableSeats+ = lens _stiMinimumTransferableSeats+ (\ s a -> s{_stiMinimumTransferableSeats = a})+ . mapping _Coerce++instance FromJSON SubscriptionTransferInfo where+ parseJSON+ = withObject "SubscriptionTransferInfo"+ (\ o ->+ SubscriptionTransferInfo <$>+ (o .:? "transferabilityExpirationTime") <*>+ (o .:? "minimumTransferableSeats"))++instance ToJSON SubscriptionTransferInfo where+ toJSON SubscriptionTransferInfo{..}+ = object+ (catMaybes+ [("transferabilityExpirationTime" .=) <$>+ _stiTransferabilityExpirationTime,+ ("minimumTransferableSeats" .=) <$>+ _stiMinimumTransferableSeats])
+ gen/Network/Google/AppsReseller/Types/Sum.hs view
@@ -0,0 +1,58 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.AppsReseller.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.AppsReseller.Types.Sum where++import Network.Google.Prelude++-- | Whether the subscription is to be fully cancelled or downgraded+data SubscriptionsDeleteDeletionType+ = Cancel+ -- ^ @cancel@+ -- Cancels the subscription immediately+ | Downgrade+ -- ^ @downgrade@+ -- Downgrades a Google Apps for Business subscription to Google Apps+ | Suspend+ -- ^ @suspend@+ -- Suspends the subscriptions for 4 days before cancelling it+ | TransferToDirect+ -- ^ @transfer_to_direct@+ -- Transfers a subscription directly to Google+ deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)++instance Hashable SubscriptionsDeleteDeletionType++instance FromText SubscriptionsDeleteDeletionType where+ fromText = \case+ "cancel" -> Just Cancel+ "downgrade" -> Just Downgrade+ "suspend" -> Just Suspend+ "transfer_to_direct" -> Just TransferToDirect+ _ -> Nothing++instance ToText SubscriptionsDeleteDeletionType where+ toText = \case+ Cancel -> "cancel"+ Downgrade -> "downgrade"+ Suspend -> "suspend"+ TransferToDirect -> "transfer_to_direct"++instance FromJSON SubscriptionsDeleteDeletionType where+ parseJSON = parseJSONText "SubscriptionsDeleteDeletionType"++instance ToJSON SubscriptionsDeleteDeletionType where+ toJSON = toJSONText
+ gen/Network/Google/Resource/Reseller/Customers/Get.hs view
@@ -0,0 +1,83 @@+{-# 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.Reseller.Customers.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)+--+-- Gets a customer resource if one exists and is owned by the reseller.+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.customers.get@.+module Network.Google.Resource.Reseller.Customers.Get+ (+ -- * REST Resource+ CustomersGetResource++ -- * Creating a Request+ , customersGet+ , CustomersGet++ -- * Request Lenses+ , cgCustomerId+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.customers.get@ method which the+-- 'CustomersGet' request conforms to.+type CustomersGetResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ QueryParam "alt" AltJSON :> Get '[JSON] Customer++-- | Gets a customer resource if one exists and is owned by the reseller.+--+-- /See:/ 'customersGet' smart constructor.+newtype CustomersGet = CustomersGet+ { _cgCustomerId :: Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CustomersGet' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cgCustomerId'+customersGet+ :: Text -- ^ 'cgCustomerId'+ -> CustomersGet+customersGet pCgCustomerId_ =+ CustomersGet+ { _cgCustomerId = pCgCustomerId_+ }++-- | Id of the Customer+cgCustomerId :: Lens' CustomersGet Text+cgCustomerId+ = lens _cgCustomerId (\ s a -> s{_cgCustomerId = a})++instance GoogleRequest CustomersGet where+ type Rs CustomersGet = Customer+ requestClient CustomersGet{..}+ = go _cgCustomerId (Just AltJSON) appsResellerService+ where go+ = buildClient (Proxy :: Proxy CustomersGetResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Customers/Insert.hs view
@@ -0,0 +1,99 @@+{-# 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.Reseller.Customers.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)+--+-- Creates a customer resource if one does not already exist.+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.customers.insert@.+module Network.Google.Resource.Reseller.Customers.Insert+ (+ -- * REST Resource+ CustomersInsertResource++ -- * Creating a Request+ , customersInsert+ , CustomersInsert++ -- * Request Lenses+ , ciPayload+ , ciCustomerAuthToken+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.customers.insert@ method which the+-- 'CustomersInsert' request conforms to.+type CustomersInsertResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ QueryParam "customerAuthToken" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Customer :> Post '[JSON] Customer++-- | Creates a customer resource if one does not already exist.+--+-- /See:/ 'customersInsert' smart constructor.+data CustomersInsert = CustomersInsert+ { _ciPayload :: !Customer+ , _ciCustomerAuthToken :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CustomersInsert' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ciPayload'+--+-- * 'ciCustomerAuthToken'+customersInsert+ :: Customer -- ^ 'ciPayload'+ -> CustomersInsert+customersInsert pCiPayload_ =+ CustomersInsert+ { _ciPayload = pCiPayload_+ , _ciCustomerAuthToken = Nothing+ }++-- | Multipart request metadata.+ciPayload :: Lens' CustomersInsert Customer+ciPayload+ = lens _ciPayload (\ s a -> s{_ciPayload = a})++-- | An auth token needed for inserting a customer for which domain already+-- exists. Can be generated at+-- https:\/\/www.google.com\/a\/cpanel\/\/TransferToken. Optional.+ciCustomerAuthToken :: Lens' CustomersInsert (Maybe Text)+ciCustomerAuthToken+ = lens _ciCustomerAuthToken+ (\ s a -> s{_ciCustomerAuthToken = a})++instance GoogleRequest CustomersInsert where+ type Rs CustomersInsert = Customer+ requestClient CustomersInsert{..}+ = go _ciCustomerAuthToken (Just AltJSON) _ciPayload+ appsResellerService+ where go+ = buildClient+ (Proxy :: Proxy CustomersInsertResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Customers/Patch.hs view
@@ -0,0 +1,98 @@+{-# 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.Reseller.Customers.Patch+-- 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)+--+-- Update a customer resource if one it exists and is owned by the+-- reseller. This method supports patch semantics.+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.customers.patch@.+module Network.Google.Resource.Reseller.Customers.Patch+ (+ -- * REST Resource+ CustomersPatchResource++ -- * Creating a Request+ , customersPatch+ , CustomersPatch++ -- * Request Lenses+ , cpPayload+ , cpCustomerId+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.customers.patch@ method which the+-- 'CustomersPatch' request conforms to.+type CustomersPatchResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Customer :> Patch '[JSON] Customer++-- | Update a customer resource if one it exists and is owned by the+-- reseller. This method supports patch semantics.+--+-- /See:/ 'customersPatch' smart constructor.+data CustomersPatch = CustomersPatch+ { _cpPayload :: !Customer+ , _cpCustomerId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CustomersPatch' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cpPayload'+--+-- * 'cpCustomerId'+customersPatch+ :: Customer -- ^ 'cpPayload'+ -> Text -- ^ 'cpCustomerId'+ -> CustomersPatch+customersPatch pCpPayload_ pCpCustomerId_ =+ CustomersPatch+ { _cpPayload = pCpPayload_+ , _cpCustomerId = pCpCustomerId_+ }++-- | Multipart request metadata.+cpPayload :: Lens' CustomersPatch Customer+cpPayload+ = lens _cpPayload (\ s a -> s{_cpPayload = a})++-- | Id of the Customer+cpCustomerId :: Lens' CustomersPatch Text+cpCustomerId+ = lens _cpCustomerId (\ s a -> s{_cpCustomerId = a})++instance GoogleRequest CustomersPatch where+ type Rs CustomersPatch = Customer+ requestClient CustomersPatch{..}+ = go _cpCustomerId (Just AltJSON) _cpPayload+ appsResellerService+ where go+ = buildClient (Proxy :: Proxy CustomersPatchResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Customers/Update.hs view
@@ -0,0 +1,99 @@+{-# 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.Reseller.Customers.Update+-- 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)+--+-- Update a customer resource if one it exists and is owned by the+-- reseller.+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.customers.update@.+module Network.Google.Resource.Reseller.Customers.Update+ (+ -- * REST Resource+ CustomersUpdateResource++ -- * Creating a Request+ , customersUpdate+ , CustomersUpdate++ -- * Request Lenses+ , cuPayload+ , cuCustomerId+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.customers.update@ method which the+-- 'CustomersUpdate' request conforms to.+type CustomersUpdateResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Customer :> Put '[JSON] Customer++-- | Update a customer resource if one it exists and is owned by the+-- reseller.+--+-- /See:/ 'customersUpdate' smart constructor.+data CustomersUpdate = CustomersUpdate+ { _cuPayload :: !Customer+ , _cuCustomerId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CustomersUpdate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cuPayload'+--+-- * 'cuCustomerId'+customersUpdate+ :: Customer -- ^ 'cuPayload'+ -> Text -- ^ 'cuCustomerId'+ -> CustomersUpdate+customersUpdate pCuPayload_ pCuCustomerId_ =+ CustomersUpdate+ { _cuPayload = pCuPayload_+ , _cuCustomerId = pCuCustomerId_+ }++-- | Multipart request metadata.+cuPayload :: Lens' CustomersUpdate Customer+cuPayload+ = lens _cuPayload (\ s a -> s{_cuPayload = a})++-- | Id of the Customer+cuCustomerId :: Lens' CustomersUpdate Text+cuCustomerId+ = lens _cuCustomerId (\ s a -> s{_cuCustomerId = a})++instance GoogleRequest CustomersUpdate where+ type Rs CustomersUpdate = Customer+ requestClient CustomersUpdate{..}+ = go _cuCustomerId (Just AltJSON) _cuPayload+ appsResellerService+ where go+ = buildClient+ (Proxy :: Proxy CustomersUpdateResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Subscriptions/Activate.hs view
@@ -0,0 +1,100 @@+{-# 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.Reseller.Subscriptions.Activate+-- 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)+--+-- Activates a subscription previously suspended by the reseller+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.subscriptions.activate@.+module Network.Google.Resource.Reseller.Subscriptions.Activate+ (+ -- * REST Resource+ SubscriptionsActivateResource++ -- * Creating a Request+ , subscriptionsActivate+ , SubscriptionsActivate++ -- * Request Lenses+ , saCustomerId+ , saSubscriptionId+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.subscriptions.activate@ method which the+-- 'SubscriptionsActivate' request conforms to.+type SubscriptionsActivateResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ "subscriptions" :>+ Capture "subscriptionId" Text :>+ "activate" :>+ QueryParam "alt" AltJSON :> Post '[JSON] Subscription++-- | Activates a subscription previously suspended by the reseller+--+-- /See:/ 'subscriptionsActivate' smart constructor.+data SubscriptionsActivate = SubscriptionsActivate+ { _saCustomerId :: !Text+ , _saSubscriptionId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionsActivate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'saCustomerId'+--+-- * 'saSubscriptionId'+subscriptionsActivate+ :: Text -- ^ 'saCustomerId'+ -> Text -- ^ 'saSubscriptionId'+ -> SubscriptionsActivate+subscriptionsActivate pSaCustomerId_ pSaSubscriptionId_ =+ SubscriptionsActivate+ { _saCustomerId = pSaCustomerId_+ , _saSubscriptionId = pSaSubscriptionId_+ }++-- | Id of the Customer+saCustomerId :: Lens' SubscriptionsActivate Text+saCustomerId+ = lens _saCustomerId (\ s a -> s{_saCustomerId = a})++-- | Id of the subscription, which is unique for a customer+saSubscriptionId :: Lens' SubscriptionsActivate Text+saSubscriptionId+ = lens _saSubscriptionId+ (\ s a -> s{_saSubscriptionId = a})++instance GoogleRequest SubscriptionsActivate where+ type Rs SubscriptionsActivate = Subscription+ requestClient SubscriptionsActivate{..}+ = go _saCustomerId _saSubscriptionId (Just AltJSON)+ appsResellerService+ where go+ = buildClient+ (Proxy :: Proxy SubscriptionsActivateResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Subscriptions/ChangePlan.hs view
@@ -0,0 +1,115 @@+{-# 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.Reseller.Subscriptions.ChangePlan+-- 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)+--+-- Changes the plan of a subscription+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.subscriptions.changePlan@.+module Network.Google.Resource.Reseller.Subscriptions.ChangePlan+ (+ -- * REST Resource+ SubscriptionsChangePlanResource++ -- * Creating a Request+ , subscriptionsChangePlan+ , SubscriptionsChangePlan++ -- * Request Lenses+ , scpPayload+ , scpCustomerId+ , scpSubscriptionId+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.subscriptions.changePlan@ method which the+-- 'SubscriptionsChangePlan' request conforms to.+type SubscriptionsChangePlanResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ "subscriptions" :>+ Capture "subscriptionId" Text :>+ "changePlan" :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] ChangePlanRequest :>+ Post '[JSON] Subscription++-- | Changes the plan of a subscription+--+-- /See:/ 'subscriptionsChangePlan' smart constructor.+data SubscriptionsChangePlan = SubscriptionsChangePlan+ { _scpPayload :: !ChangePlanRequest+ , _scpCustomerId :: !Text+ , _scpSubscriptionId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionsChangePlan' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'scpPayload'+--+-- * 'scpCustomerId'+--+-- * 'scpSubscriptionId'+subscriptionsChangePlan+ :: ChangePlanRequest -- ^ 'scpPayload'+ -> Text -- ^ 'scpCustomerId'+ -> Text -- ^ 'scpSubscriptionId'+ -> SubscriptionsChangePlan+subscriptionsChangePlan pScpPayload_ pScpCustomerId_ pScpSubscriptionId_ =+ SubscriptionsChangePlan+ { _scpPayload = pScpPayload_+ , _scpCustomerId = pScpCustomerId_+ , _scpSubscriptionId = pScpSubscriptionId_+ }++-- | Multipart request metadata.+scpPayload :: Lens' SubscriptionsChangePlan ChangePlanRequest+scpPayload+ = lens _scpPayload (\ s a -> s{_scpPayload = a})++-- | Id of the Customer+scpCustomerId :: Lens' SubscriptionsChangePlan Text+scpCustomerId+ = lens _scpCustomerId+ (\ s a -> s{_scpCustomerId = a})++-- | Id of the subscription, which is unique for a customer+scpSubscriptionId :: Lens' SubscriptionsChangePlan Text+scpSubscriptionId+ = lens _scpSubscriptionId+ (\ s a -> s{_scpSubscriptionId = a})++instance GoogleRequest SubscriptionsChangePlan where+ type Rs SubscriptionsChangePlan = Subscription+ requestClient SubscriptionsChangePlan{..}+ = go _scpCustomerId _scpSubscriptionId (Just AltJSON)+ _scpPayload+ appsResellerService+ where go+ = buildClient+ (Proxy :: Proxy SubscriptionsChangePlanResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Subscriptions/ChangeRenewalSettings.hs view
@@ -0,0 +1,119 @@+{-# 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.Reseller.Subscriptions.ChangeRenewalSettings+-- 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)+--+-- Changes the renewal settings of a subscription+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.subscriptions.changeRenewalSettings@.+module Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings+ (+ -- * REST Resource+ SubscriptionsChangeRenewalSettingsResource++ -- * Creating a Request+ , subscriptionsChangeRenewalSettings+ , SubscriptionsChangeRenewalSettings++ -- * Request Lenses+ , scrsPayload+ , scrsCustomerId+ , scrsSubscriptionId+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.subscriptions.changeRenewalSettings@ method which the+-- 'SubscriptionsChangeRenewalSettings' request conforms to.+type SubscriptionsChangeRenewalSettingsResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ "subscriptions" :>+ Capture "subscriptionId" Text :>+ "changeRenewalSettings" :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] RenewalSettings :>+ Post '[JSON] Subscription++-- | Changes the renewal settings of a subscription+--+-- /See:/ 'subscriptionsChangeRenewalSettings' smart constructor.+data SubscriptionsChangeRenewalSettings = SubscriptionsChangeRenewalSettings+ { _scrsPayload :: !RenewalSettings+ , _scrsCustomerId :: !Text+ , _scrsSubscriptionId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionsChangeRenewalSettings' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'scrsPayload'+--+-- * 'scrsCustomerId'+--+-- * 'scrsSubscriptionId'+subscriptionsChangeRenewalSettings+ :: RenewalSettings -- ^ 'scrsPayload'+ -> Text -- ^ 'scrsCustomerId'+ -> Text -- ^ 'scrsSubscriptionId'+ -> SubscriptionsChangeRenewalSettings+subscriptionsChangeRenewalSettings pScrsPayload_ pScrsCustomerId_ pScrsSubscriptionId_ =+ SubscriptionsChangeRenewalSettings+ { _scrsPayload = pScrsPayload_+ , _scrsCustomerId = pScrsCustomerId_+ , _scrsSubscriptionId = pScrsSubscriptionId_+ }++-- | Multipart request metadata.+scrsPayload :: Lens' SubscriptionsChangeRenewalSettings RenewalSettings+scrsPayload+ = lens _scrsPayload (\ s a -> s{_scrsPayload = a})++-- | Id of the Customer+scrsCustomerId :: Lens' SubscriptionsChangeRenewalSettings Text+scrsCustomerId+ = lens _scrsCustomerId+ (\ s a -> s{_scrsCustomerId = a})++-- | Id of the subscription, which is unique for a customer+scrsSubscriptionId :: Lens' SubscriptionsChangeRenewalSettings Text+scrsSubscriptionId+ = lens _scrsSubscriptionId+ (\ s a -> s{_scrsSubscriptionId = a})++instance GoogleRequest+ SubscriptionsChangeRenewalSettings where+ type Rs SubscriptionsChangeRenewalSettings =+ Subscription+ requestClient SubscriptionsChangeRenewalSettings{..}+ = go _scrsCustomerId _scrsSubscriptionId+ (Just AltJSON)+ _scrsPayload+ appsResellerService+ where go+ = buildClient+ (Proxy ::+ Proxy SubscriptionsChangeRenewalSettingsResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Subscriptions/ChangeSeats.hs view
@@ -0,0 +1,114 @@+{-# 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.Reseller.Subscriptions.ChangeSeats+-- 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)+--+-- Changes the seats configuration of a subscription+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.subscriptions.changeSeats@.+module Network.Google.Resource.Reseller.Subscriptions.ChangeSeats+ (+ -- * REST Resource+ SubscriptionsChangeSeatsResource++ -- * Creating a Request+ , subscriptionsChangeSeats+ , SubscriptionsChangeSeats++ -- * Request Lenses+ , scsPayload+ , scsCustomerId+ , scsSubscriptionId+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.subscriptions.changeSeats@ method which the+-- 'SubscriptionsChangeSeats' request conforms to.+type SubscriptionsChangeSeatsResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ "subscriptions" :>+ Capture "subscriptionId" Text :>+ "changeSeats" :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Seats :> Post '[JSON] Subscription++-- | Changes the seats configuration of a subscription+--+-- /See:/ 'subscriptionsChangeSeats' smart constructor.+data SubscriptionsChangeSeats = SubscriptionsChangeSeats+ { _scsPayload :: !Seats+ , _scsCustomerId :: !Text+ , _scsSubscriptionId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionsChangeSeats' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'scsPayload'+--+-- * 'scsCustomerId'+--+-- * 'scsSubscriptionId'+subscriptionsChangeSeats+ :: Seats -- ^ 'scsPayload'+ -> Text -- ^ 'scsCustomerId'+ -> Text -- ^ 'scsSubscriptionId'+ -> SubscriptionsChangeSeats+subscriptionsChangeSeats pScsPayload_ pScsCustomerId_ pScsSubscriptionId_ =+ SubscriptionsChangeSeats+ { _scsPayload = pScsPayload_+ , _scsCustomerId = pScsCustomerId_+ , _scsSubscriptionId = pScsSubscriptionId_+ }++-- | Multipart request metadata.+scsPayload :: Lens' SubscriptionsChangeSeats Seats+scsPayload+ = lens _scsPayload (\ s a -> s{_scsPayload = a})++-- | Id of the Customer+scsCustomerId :: Lens' SubscriptionsChangeSeats Text+scsCustomerId+ = lens _scsCustomerId+ (\ s a -> s{_scsCustomerId = a})++-- | Id of the subscription, which is unique for a customer+scsSubscriptionId :: Lens' SubscriptionsChangeSeats Text+scsSubscriptionId+ = lens _scsSubscriptionId+ (\ s a -> s{_scsSubscriptionId = a})++instance GoogleRequest SubscriptionsChangeSeats where+ type Rs SubscriptionsChangeSeats = Subscription+ requestClient SubscriptionsChangeSeats{..}+ = go _scsCustomerId _scsSubscriptionId (Just AltJSON)+ _scsPayload+ appsResellerService+ where go+ = buildClient+ (Proxy :: Proxy SubscriptionsChangeSeatsResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Subscriptions/Delete.hs view
@@ -0,0 +1,115 @@+{-# 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.Reseller.Subscriptions.Delete+-- 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)+--+-- Cancels\/Downgrades a subscription.+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.subscriptions.delete@.+module Network.Google.Resource.Reseller.Subscriptions.Delete+ (+ -- * REST Resource+ SubscriptionsDeleteResource++ -- * Creating a Request+ , subscriptionsDelete+ , SubscriptionsDelete++ -- * Request Lenses+ , sdCustomerId+ , sdDeletionType+ , sdSubscriptionId+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.subscriptions.delete@ method which the+-- 'SubscriptionsDelete' request conforms to.+type SubscriptionsDeleteResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ "subscriptions" :>+ Capture "subscriptionId" Text :>+ QueryParam "deletionType"+ SubscriptionsDeleteDeletionType+ :> QueryParam "alt" AltJSON :> Delete '[JSON] ()++-- | Cancels\/Downgrades a subscription.+--+-- /See:/ 'subscriptionsDelete' smart constructor.+data SubscriptionsDelete = SubscriptionsDelete+ { _sdCustomerId :: !Text+ , _sdDeletionType :: !SubscriptionsDeleteDeletionType+ , _sdSubscriptionId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionsDelete' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sdCustomerId'+--+-- * 'sdDeletionType'+--+-- * 'sdSubscriptionId'+subscriptionsDelete+ :: Text -- ^ 'sdCustomerId'+ -> SubscriptionsDeleteDeletionType -- ^ 'sdDeletionType'+ -> Text -- ^ 'sdSubscriptionId'+ -> SubscriptionsDelete+subscriptionsDelete pSdCustomerId_ pSdDeletionType_ pSdSubscriptionId_ =+ SubscriptionsDelete+ { _sdCustomerId = pSdCustomerId_+ , _sdDeletionType = pSdDeletionType_+ , _sdSubscriptionId = pSdSubscriptionId_+ }++-- | Id of the Customer+sdCustomerId :: Lens' SubscriptionsDelete Text+sdCustomerId+ = lens _sdCustomerId (\ s a -> s{_sdCustomerId = a})++-- | Whether the subscription is to be fully cancelled or downgraded+sdDeletionType :: Lens' SubscriptionsDelete SubscriptionsDeleteDeletionType+sdDeletionType+ = lens _sdDeletionType+ (\ s a -> s{_sdDeletionType = a})++-- | Id of the subscription, which is unique for a customer+sdSubscriptionId :: Lens' SubscriptionsDelete Text+sdSubscriptionId+ = lens _sdSubscriptionId+ (\ s a -> s{_sdSubscriptionId = a})++instance GoogleRequest SubscriptionsDelete where+ type Rs SubscriptionsDelete = ()+ requestClient SubscriptionsDelete{..}+ = go _sdCustomerId _sdSubscriptionId+ (Just _sdDeletionType)+ (Just AltJSON)+ appsResellerService+ where go+ = buildClient+ (Proxy :: Proxy SubscriptionsDeleteResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Subscriptions/Get.hs view
@@ -0,0 +1,99 @@+{-# 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.Reseller.Subscriptions.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)+--+-- Gets a subscription of the customer.+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.subscriptions.get@.+module Network.Google.Resource.Reseller.Subscriptions.Get+ (+ -- * REST Resource+ SubscriptionsGetResource++ -- * Creating a Request+ , subscriptionsGet+ , SubscriptionsGet++ -- * Request Lenses+ , sgCustomerId+ , sgSubscriptionId+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.subscriptions.get@ method which the+-- 'SubscriptionsGet' request conforms to.+type SubscriptionsGetResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ "subscriptions" :>+ Capture "subscriptionId" Text :>+ QueryParam "alt" AltJSON :> Get '[JSON] Subscription++-- | Gets a subscription of the customer.+--+-- /See:/ 'subscriptionsGet' smart constructor.+data SubscriptionsGet = SubscriptionsGet+ { _sgCustomerId :: !Text+ , _sgSubscriptionId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionsGet' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sgCustomerId'+--+-- * 'sgSubscriptionId'+subscriptionsGet+ :: Text -- ^ 'sgCustomerId'+ -> Text -- ^ 'sgSubscriptionId'+ -> SubscriptionsGet+subscriptionsGet pSgCustomerId_ pSgSubscriptionId_ =+ SubscriptionsGet+ { _sgCustomerId = pSgCustomerId_+ , _sgSubscriptionId = pSgSubscriptionId_+ }++-- | Id of the Customer+sgCustomerId :: Lens' SubscriptionsGet Text+sgCustomerId+ = lens _sgCustomerId (\ s a -> s{_sgCustomerId = a})++-- | Id of the subscription, which is unique for a customer+sgSubscriptionId :: Lens' SubscriptionsGet Text+sgSubscriptionId+ = lens _sgSubscriptionId+ (\ s a -> s{_sgSubscriptionId = a})++instance GoogleRequest SubscriptionsGet where+ type Rs SubscriptionsGet = Subscription+ requestClient SubscriptionsGet{..}+ = go _sgCustomerId _sgSubscriptionId (Just AltJSON)+ appsResellerService+ where go+ = buildClient+ (Proxy :: Proxy SubscriptionsGetResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Subscriptions/Insert.hs view
@@ -0,0 +1,115 @@+{-# 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.Reseller.Subscriptions.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)+--+-- Creates\/Transfers a subscription for the customer.+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.subscriptions.insert@.+module Network.Google.Resource.Reseller.Subscriptions.Insert+ (+ -- * REST Resource+ SubscriptionsInsertResource++ -- * Creating a Request+ , subscriptionsInsert+ , SubscriptionsInsert++ -- * Request Lenses+ , siPayload+ , siCustomerId+ , siCustomerAuthToken+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.subscriptions.insert@ method which the+-- 'SubscriptionsInsert' request conforms to.+type SubscriptionsInsertResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ "subscriptions" :>+ QueryParam "customerAuthToken" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Subscription :>+ Post '[JSON] Subscription++-- | Creates\/Transfers a subscription for the customer.+--+-- /See:/ 'subscriptionsInsert' smart constructor.+data SubscriptionsInsert = SubscriptionsInsert+ { _siPayload :: !Subscription+ , _siCustomerId :: !Text+ , _siCustomerAuthToken :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionsInsert' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'siPayload'+--+-- * 'siCustomerId'+--+-- * 'siCustomerAuthToken'+subscriptionsInsert+ :: Subscription -- ^ 'siPayload'+ -> Text -- ^ 'siCustomerId'+ -> SubscriptionsInsert+subscriptionsInsert pSiPayload_ pSiCustomerId_ =+ SubscriptionsInsert+ { _siPayload = pSiPayload_+ , _siCustomerId = pSiCustomerId_+ , _siCustomerAuthToken = Nothing+ }++-- | Multipart request metadata.+siPayload :: Lens' SubscriptionsInsert Subscription+siPayload+ = lens _siPayload (\ s a -> s{_siPayload = a})++-- | Id of the Customer+siCustomerId :: Lens' SubscriptionsInsert Text+siCustomerId+ = lens _siCustomerId (\ s a -> s{_siCustomerId = a})++-- | An auth token needed for transferring a subscription. Can be generated+-- at https:\/\/www.google.com\/a\/cpanel\/customer-domain\/TransferToken.+-- Optional.+siCustomerAuthToken :: Lens' SubscriptionsInsert (Maybe Text)+siCustomerAuthToken+ = lens _siCustomerAuthToken+ (\ s a -> s{_siCustomerAuthToken = a})++instance GoogleRequest SubscriptionsInsert where+ type Rs SubscriptionsInsert = Subscription+ requestClient SubscriptionsInsert{..}+ = go _siCustomerId _siCustomerAuthToken+ (Just AltJSON)+ _siPayload+ appsResellerService+ where go+ = buildClient+ (Proxy :: Proxy SubscriptionsInsertResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Subscriptions/List.hs view
@@ -0,0 +1,140 @@+{-# 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.Reseller.Subscriptions.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 subscriptions of a reseller, optionally filtered by a customer+-- name prefix.+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.subscriptions.list@.+module Network.Google.Resource.Reseller.Subscriptions.List+ (+ -- * REST Resource+ SubscriptionsListResource++ -- * Creating a Request+ , subscriptionsList+ , SubscriptionsList++ -- * Request Lenses+ , slCustomerNamePrefix+ , slCustomerId+ , slCustomerAuthToken+ , slPageToken+ , slMaxResults+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.subscriptions.list@ method which the+-- 'SubscriptionsList' request conforms to.+type SubscriptionsListResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "subscriptions" :>+ QueryParam "customerNamePrefix" Text :>+ QueryParam "customerId" Text :>+ QueryParam "customerAuthToken" Text :>+ QueryParam "pageToken" Text :>+ QueryParam "maxResults" (Textual Word32) :>+ QueryParam "alt" AltJSON :> Get '[JSON] Subscriptions++-- | Lists subscriptions of a reseller, optionally filtered by a customer+-- name prefix.+--+-- /See:/ 'subscriptionsList' smart constructor.+data SubscriptionsList = SubscriptionsList+ { _slCustomerNamePrefix :: !(Maybe Text)+ , _slCustomerId :: !(Maybe Text)+ , _slCustomerAuthToken :: !(Maybe Text)+ , _slPageToken :: !(Maybe Text)+ , _slMaxResults :: !(Maybe (Textual Word32))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionsList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'slCustomerNamePrefix'+--+-- * 'slCustomerId'+--+-- * 'slCustomerAuthToken'+--+-- * 'slPageToken'+--+-- * 'slMaxResults'+subscriptionsList+ :: SubscriptionsList+subscriptionsList =+ SubscriptionsList+ { _slCustomerNamePrefix = Nothing+ , _slCustomerId = Nothing+ , _slCustomerAuthToken = Nothing+ , _slPageToken = Nothing+ , _slMaxResults = Nothing+ }++-- | Prefix of the customer\'s domain name by which the subscriptions should+-- be filtered. Optional+slCustomerNamePrefix :: Lens' SubscriptionsList (Maybe Text)+slCustomerNamePrefix+ = lens _slCustomerNamePrefix+ (\ s a -> s{_slCustomerNamePrefix = a})++-- | Id of the Customer+slCustomerId :: Lens' SubscriptionsList (Maybe Text)+slCustomerId+ = lens _slCustomerId (\ s a -> s{_slCustomerId = a})++-- | An auth token needed if the customer is not a resold customer of this+-- reseller. Can be generated at+-- https:\/\/www.google.com\/a\/cpanel\/customer-domain\/TransferToken.Optional.+slCustomerAuthToken :: Lens' SubscriptionsList (Maybe Text)+slCustomerAuthToken+ = lens _slCustomerAuthToken+ (\ s a -> s{_slCustomerAuthToken = a})++-- | Token to specify next page in the list+slPageToken :: Lens' SubscriptionsList (Maybe Text)+slPageToken+ = lens _slPageToken (\ s a -> s{_slPageToken = a})++-- | Maximum number of results to return+slMaxResults :: Lens' SubscriptionsList (Maybe Word32)+slMaxResults+ = lens _slMaxResults (\ s a -> s{_slMaxResults = a})+ . mapping _Coerce++instance GoogleRequest SubscriptionsList where+ type Rs SubscriptionsList = Subscriptions+ requestClient SubscriptionsList{..}+ = go _slCustomerNamePrefix _slCustomerId+ _slCustomerAuthToken+ _slPageToken+ _slMaxResults+ (Just AltJSON)+ appsResellerService+ where go+ = buildClient+ (Proxy :: Proxy SubscriptionsListResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Subscriptions/StartPaidService.hs view
@@ -0,0 +1,104 @@+{-# 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.Reseller.Subscriptions.StartPaidService+-- 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)+--+-- Starts paid service of a trial subscription+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.subscriptions.startPaidService@.+module Network.Google.Resource.Reseller.Subscriptions.StartPaidService+ (+ -- * REST Resource+ SubscriptionsStartPaidServiceResource++ -- * Creating a Request+ , subscriptionsStartPaidService+ , SubscriptionsStartPaidService++ -- * Request Lenses+ , sspsCustomerId+ , sspsSubscriptionId+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.subscriptions.startPaidService@ method which the+-- 'SubscriptionsStartPaidService' request conforms to.+type SubscriptionsStartPaidServiceResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ "subscriptions" :>+ Capture "subscriptionId" Text :>+ "startPaidService" :>+ QueryParam "alt" AltJSON :> Post '[JSON] Subscription++-- | Starts paid service of a trial subscription+--+-- /See:/ 'subscriptionsStartPaidService' smart constructor.+data SubscriptionsStartPaidService = SubscriptionsStartPaidService+ { _sspsCustomerId :: !Text+ , _sspsSubscriptionId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionsStartPaidService' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sspsCustomerId'+--+-- * 'sspsSubscriptionId'+subscriptionsStartPaidService+ :: Text -- ^ 'sspsCustomerId'+ -> Text -- ^ 'sspsSubscriptionId'+ -> SubscriptionsStartPaidService+subscriptionsStartPaidService pSspsCustomerId_ pSspsSubscriptionId_ =+ SubscriptionsStartPaidService+ { _sspsCustomerId = pSspsCustomerId_+ , _sspsSubscriptionId = pSspsSubscriptionId_+ }++-- | Id of the Customer+sspsCustomerId :: Lens' SubscriptionsStartPaidService Text+sspsCustomerId+ = lens _sspsCustomerId+ (\ s a -> s{_sspsCustomerId = a})++-- | Id of the subscription, which is unique for a customer+sspsSubscriptionId :: Lens' SubscriptionsStartPaidService Text+sspsSubscriptionId+ = lens _sspsSubscriptionId+ (\ s a -> s{_sspsSubscriptionId = a})++instance GoogleRequest SubscriptionsStartPaidService+ where+ type Rs SubscriptionsStartPaidService = Subscription+ requestClient SubscriptionsStartPaidService{..}+ = go _sspsCustomerId _sspsSubscriptionId+ (Just AltJSON)+ appsResellerService+ where go+ = buildClient+ (Proxy ::+ Proxy SubscriptionsStartPaidServiceResource)+ mempty
+ gen/Network/Google/Resource/Reseller/Subscriptions/Suspend.hs view
@@ -0,0 +1,100 @@+{-# 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.Reseller.Subscriptions.Suspend+-- 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)+--+-- Suspends an active subscription+--+-- /See:/ <https://developers.google.com/google-apps/reseller/ Enterprise Apps Reseller API Reference> for @reseller.subscriptions.suspend@.+module Network.Google.Resource.Reseller.Subscriptions.Suspend+ (+ -- * REST Resource+ SubscriptionsSuspendResource++ -- * Creating a Request+ , subscriptionsSuspend+ , SubscriptionsSuspend++ -- * Request Lenses+ , ssCustomerId+ , ssSubscriptionId+ ) where++import Network.Google.AppsReseller.Types+import Network.Google.Prelude++-- | A resource alias for @reseller.subscriptions.suspend@ method which the+-- 'SubscriptionsSuspend' request conforms to.+type SubscriptionsSuspendResource =+ "apps" :>+ "reseller" :>+ "v1" :>+ "customers" :>+ Capture "customerId" Text :>+ "subscriptions" :>+ Capture "subscriptionId" Text :>+ "suspend" :>+ QueryParam "alt" AltJSON :> Post '[JSON] Subscription++-- | Suspends an active subscription+--+-- /See:/ 'subscriptionsSuspend' smart constructor.+data SubscriptionsSuspend = SubscriptionsSuspend+ { _ssCustomerId :: !Text+ , _ssSubscriptionId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SubscriptionsSuspend' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ssCustomerId'+--+-- * 'ssSubscriptionId'+subscriptionsSuspend+ :: Text -- ^ 'ssCustomerId'+ -> Text -- ^ 'ssSubscriptionId'+ -> SubscriptionsSuspend+subscriptionsSuspend pSsCustomerId_ pSsSubscriptionId_ =+ SubscriptionsSuspend+ { _ssCustomerId = pSsCustomerId_+ , _ssSubscriptionId = pSsSubscriptionId_+ }++-- | Id of the Customer+ssCustomerId :: Lens' SubscriptionsSuspend Text+ssCustomerId+ = lens _ssCustomerId (\ s a -> s{_ssCustomerId = a})++-- | Id of the subscription, which is unique for a customer+ssSubscriptionId :: Lens' SubscriptionsSuspend Text+ssSubscriptionId+ = lens _ssSubscriptionId+ (\ s a -> s{_ssSubscriptionId = a})++instance GoogleRequest SubscriptionsSuspend where+ type Rs SubscriptionsSuspend = Subscription+ requestClient SubscriptionsSuspend{..}+ = go _ssCustomerId _ssSubscriptionId (Just AltJSON)+ appsResellerService+ where go+ = buildClient+ (Proxy :: Proxy SubscriptionsSuspendResource)+ mempty
+ gogol-apps-reseller.cabal view
@@ -0,0 +1,63 @@+name: gogol-apps-reseller+version: 0.0.1+synopsis: Google Enterprise Apps Reseller 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:+ Lets you create and manage your customers and their subscriptions.+ .+ /Warning:/ This is an experimental prototype/preview release which is still+ under exploratory development and not intended for public use, caveat emptor!+ .+ This library is compatible with version @v1@+ of the API.+ .+ Labels:+ .+ * Limited Availability++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.AppsReseller+ , Network.Google.AppsReseller.Types+ , Network.Google.Resource.Reseller.Customers.Get+ , Network.Google.Resource.Reseller.Customers.Insert+ , Network.Google.Resource.Reseller.Customers.Patch+ , Network.Google.Resource.Reseller.Customers.Update+ , Network.Google.Resource.Reseller.Subscriptions.Activate+ , Network.Google.Resource.Reseller.Subscriptions.ChangePlan+ , Network.Google.Resource.Reseller.Subscriptions.ChangeRenewalSettings+ , Network.Google.Resource.Reseller.Subscriptions.ChangeSeats+ , Network.Google.Resource.Reseller.Subscriptions.Delete+ , Network.Google.Resource.Reseller.Subscriptions.Get+ , Network.Google.Resource.Reseller.Subscriptions.Insert+ , Network.Google.Resource.Reseller.Subscriptions.List+ , Network.Google.Resource.Reseller.Subscriptions.StartPaidService+ , Network.Google.Resource.Reseller.Subscriptions.Suspend++ other-modules:+ Network.Google.AppsReseller.Types.Product+ , Network.Google.AppsReseller.Types.Sum++ build-depends:+ gogol-core == 0.0.1.*+ , base >= 4.7 && < 5