gogol-firebase-rules (empty) → 0.1.0
raw patch · 18 files changed
+3324/−0 lines, 18 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/FirebaseRules.hs +167/−0
- gen/Network/Google/FirebaseRules/Types.hs +111/−0
- gen/Network/Google/FirebaseRules/Types/Product.hs +582/−0
- gen/Network/Google/FirebaseRules/Types/Sum.hs +88/−0
- gen/Network/Google/Resource/FirebaseRules/Projects/Releases/Create.hs +218/−0
- gen/Network/Google/Resource/FirebaseRules/Projects/Releases/Delete.hs +169/−0
- gen/Network/Google/Resource/FirebaseRules/Projects/Releases/Get.hs +165/−0
- gen/Network/Google/Resource/FirebaseRules/Projects/Releases/List.hs +232/−0
- gen/Network/Google/Resource/FirebaseRules/Projects/Releases/Update.hs +201/−0
- gen/Network/Google/Resource/FirebaseRules/Projects/Rulesets/Create.hs +191/−0
- gen/Network/Google/Resource/FirebaseRules/Projects/Rulesets/Delete.hs +171/−0
- gen/Network/Google/Resource/FirebaseRules/Projects/Rulesets/Get.hs +169/−0
- gen/Network/Google/Resource/FirebaseRules/Projects/Rulesets/List.hs +202/−0
- gen/Network/Google/Resource/FirebaseRules/Projects/Test.hs +205/−0
- gogol-firebase-rules.cabal +56/−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-firebase-rules++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`0.1.0`+++## Description++A client library for the Google Firebase Rules.+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/gogol/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `gogol-gen` for more information.+++## Licence++`gogol-firebase-rules` 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/FirebaseRules.hs view
@@ -0,0 +1,167 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- |+-- Module : Network.Google.FirebaseRules+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates and manages rules that determine when a Firebase Rules-enabled+-- service should permit a request.+--+-- /See:/ <https://firebase.google.com/docs/storage/security/start Firebase Rules API Reference>+module Network.Google.FirebaseRules+ (+ -- * Service Configuration+ firebaseRulesService++ -- * OAuth Scopes+ , cloudPlatformScope++ -- * API Declaration+ , FirebaseRulesAPI++ -- * Resources++ -- ** firebaserules.projects.releases.create+ , module Network.Google.Resource.FirebaseRules.Projects.Releases.Create++ -- ** firebaserules.projects.releases.delete+ , module Network.Google.Resource.FirebaseRules.Projects.Releases.Delete++ -- ** firebaserules.projects.releases.get+ , module Network.Google.Resource.FirebaseRules.Projects.Releases.Get++ -- ** firebaserules.projects.releases.list+ , module Network.Google.Resource.FirebaseRules.Projects.Releases.List++ -- ** firebaserules.projects.releases.update+ , module Network.Google.Resource.FirebaseRules.Projects.Releases.Update++ -- ** firebaserules.projects.rulesets.create+ , module Network.Google.Resource.FirebaseRules.Projects.Rulesets.Create++ -- ** firebaserules.projects.rulesets.delete+ , module Network.Google.Resource.FirebaseRules.Projects.Rulesets.Delete++ -- ** firebaserules.projects.rulesets.get+ , module Network.Google.Resource.FirebaseRules.Projects.Rulesets.Get++ -- ** firebaserules.projects.rulesets.list+ , module Network.Google.Resource.FirebaseRules.Projects.Rulesets.List++ -- ** firebaserules.projects.test+ , module Network.Google.Resource.FirebaseRules.Projects.Test++ -- * Types++ -- ** SourcePosition+ , SourcePosition+ , sourcePosition+ , spLine+ , spColumn+ , spFileName++ -- ** Empty+ , Empty+ , empty++ -- ** ListReleasesResponse+ , ListReleasesResponse+ , listReleasesResponse+ , lrrNextPageToken+ , lrrReleases++ -- ** TestRulesetResponse+ , TestRulesetResponse+ , testRulesetResponse+ , trrIssues++ -- ** Release+ , Release+ , release+ , rRulesetName+ , rUpdateTime+ , rName+ , rCreateTime++ -- ** Ruleset+ , Ruleset+ , ruleset+ , rulName+ , rulSource+ , rulCreateTime++ -- ** Xgafv+ , Xgafv (..)++ -- ** IssueSeverity+ , IssueSeverity (..)++ -- ** Source+ , Source+ , source+ , sFiles++ -- ** TestRulesetRequest+ , TestRulesetRequest+ , testRulesetRequest+ , trrSource++ -- ** File+ , File+ , file+ , fFingerprint+ , fContent+ , fName++ -- ** ListRulesetsResponse+ , ListRulesetsResponse+ , listRulesetsResponse+ , lRulesets+ , lNextPageToken++ -- ** Issue+ , Issue+ , issue+ , iSourcePosition+ , iSeverity+ , iDescription+ ) where++import Network.Google.FirebaseRules.Types+import Network.Google.Prelude+import Network.Google.Resource.FirebaseRules.Projects.Releases.Create+import Network.Google.Resource.FirebaseRules.Projects.Releases.Delete+import Network.Google.Resource.FirebaseRules.Projects.Releases.Get+import Network.Google.Resource.FirebaseRules.Projects.Releases.List+import Network.Google.Resource.FirebaseRules.Projects.Releases.Update+import Network.Google.Resource.FirebaseRules.Projects.Rulesets.Create+import Network.Google.Resource.FirebaseRules.Projects.Rulesets.Delete+import Network.Google.Resource.FirebaseRules.Projects.Rulesets.Get+import Network.Google.Resource.FirebaseRules.Projects.Rulesets.List+import Network.Google.Resource.FirebaseRules.Projects.Test++{- $resources+TODO+-}++-- | Represents the entirety of the methods and resources available for the Firebase Rules API service.+type FirebaseRulesAPI =+ ProjectsRulesetsListResource :<|>+ ProjectsRulesetsGetResource+ :<|> ProjectsRulesetsCreateResource+ :<|> ProjectsRulesetsDeleteResource+ :<|> ProjectsReleasesListResource+ :<|> ProjectsReleasesGetResource+ :<|> ProjectsReleasesCreateResource+ :<|> ProjectsReleasesDeleteResource+ :<|> ProjectsReleasesUpdateResource+ :<|> ProjectsTestResource
+ gen/Network/Google/FirebaseRules/Types.hs view
@@ -0,0 +1,111 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.FirebaseRules.Types+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.Google.FirebaseRules.Types+ (+ -- * Service Configuration+ firebaseRulesService++ -- * OAuth Scopes+ , cloudPlatformScope++ -- * SourcePosition+ , SourcePosition+ , sourcePosition+ , spLine+ , spColumn+ , spFileName++ -- * Empty+ , Empty+ , empty++ -- * ListReleasesResponse+ , ListReleasesResponse+ , listReleasesResponse+ , lrrNextPageToken+ , lrrReleases++ -- * TestRulesetResponse+ , TestRulesetResponse+ , testRulesetResponse+ , trrIssues++ -- * Release+ , Release+ , release+ , rRulesetName+ , rUpdateTime+ , rName+ , rCreateTime++ -- * Ruleset+ , Ruleset+ , ruleset+ , rulName+ , rulSource+ , rulCreateTime++ -- * Xgafv+ , Xgafv (..)++ -- * IssueSeverity+ , IssueSeverity (..)++ -- * Source+ , Source+ , source+ , sFiles++ -- * TestRulesetRequest+ , TestRulesetRequest+ , testRulesetRequest+ , trrSource++ -- * File+ , File+ , file+ , fFingerprint+ , fContent+ , fName++ -- * ListRulesetsResponse+ , ListRulesetsResponse+ , listRulesetsResponse+ , lRulesets+ , lNextPageToken++ -- * Issue+ , Issue+ , issue+ , iSourcePosition+ , iSeverity+ , iDescription+ ) where++import Network.Google.FirebaseRules.Types.Product+import Network.Google.FirebaseRules.Types.Sum+import Network.Google.Prelude++-- | Default request referring to version 'v1' of the Firebase Rules API. This contains the host and root path used as a starting point for constructing service requests.+firebaseRulesService :: ServiceConfig+firebaseRulesService+ = defaultService (ServiceId "firebaserules:v1")+ "firebaserules.googleapis.com"++-- | View and manage your data across Google Cloud Platform services+cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]+cloudPlatformScope = Proxy;
+ gen/Network/Google/FirebaseRules/Types/Product.hs view
@@ -0,0 +1,582 @@+{-# 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.FirebaseRules.Types.Product+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.Google.FirebaseRules.Types.Product where++import Network.Google.FirebaseRules.Types.Sum+import Network.Google.Prelude++-- | Position in the \`Source\` content including its line, column number,+-- and an index of the \`File\` in the \`Source\` message. Used for debug+-- purposes.+--+-- /See:/ 'sourcePosition' smart constructor.+data SourcePosition = SourcePosition'+ { _spLine :: !(Maybe (Textual Int32))+ , _spColumn :: !(Maybe (Textual Int32))+ , _spFileName :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SourcePosition' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'spLine'+--+-- * 'spColumn'+--+-- * 'spFileName'+sourcePosition+ :: SourcePosition+sourcePosition =+ SourcePosition'+ { _spLine = Nothing+ , _spColumn = Nothing+ , _spFileName = Nothing+ }++-- | Line number of the source fragment. 1-based.+spLine :: Lens' SourcePosition (Maybe Int32)+spLine+ = lens _spLine (\ s a -> s{_spLine = a}) .+ mapping _Coerce++-- | First column on the source line associated with the source fragment.+spColumn :: Lens' SourcePosition (Maybe Int32)+spColumn+ = lens _spColumn (\ s a -> s{_spColumn = a}) .+ mapping _Coerce++-- | Name of the \`File\`.+spFileName :: Lens' SourcePosition (Maybe Text)+spFileName+ = lens _spFileName (\ s a -> s{_spFileName = a})++instance FromJSON SourcePosition where+ parseJSON+ = withObject "SourcePosition"+ (\ o ->+ SourcePosition' <$>+ (o .:? "line") <*> (o .:? "column") <*>+ (o .:? "fileName"))++instance ToJSON SourcePosition where+ toJSON SourcePosition'{..}+ = object+ (catMaybes+ [("line" .=) <$> _spLine,+ ("column" .=) <$> _spColumn,+ ("fileName" .=) <$> _spFileName])++-- | A generic empty message that you can re-use to avoid defining duplicated+-- empty messages in your APIs. A typical example is to use it as the+-- request or the response type of an API method. For instance: service Foo+-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The+-- JSON representation for \`Empty\` is empty JSON object \`{}\`.+--+-- /See:/ 'empty' smart constructor.+data Empty =+ Empty'+ deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Empty' with the minimum fields required to make a request.+--+empty+ :: Empty+empty = Empty'++instance FromJSON Empty where+ parseJSON = withObject "Empty" (\ o -> pure Empty')++instance ToJSON Empty where+ toJSON = const emptyObject++-- | The response for FirebaseRulesService.ListReleases.+--+-- /See:/ 'listReleasesResponse' smart constructor.+data ListReleasesResponse = ListReleasesResponse'+ { _lrrNextPageToken :: !(Maybe Text)+ , _lrrReleases :: !(Maybe [Release])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListReleasesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrrNextPageToken'+--+-- * 'lrrReleases'+listReleasesResponse+ :: ListReleasesResponse+listReleasesResponse =+ ListReleasesResponse'+ { _lrrNextPageToken = Nothing+ , _lrrReleases = Nothing+ }++-- | The pagination token to retrieve the next page of results. If the value+-- is empty, no further results remain.+lrrNextPageToken :: Lens' ListReleasesResponse (Maybe Text)+lrrNextPageToken+ = lens _lrrNextPageToken+ (\ s a -> s{_lrrNextPageToken = a})++-- | List of \`Release\` instances.+lrrReleases :: Lens' ListReleasesResponse [Release]+lrrReleases+ = lens _lrrReleases (\ s a -> s{_lrrReleases = a}) .+ _Default+ . _Coerce++instance FromJSON ListReleasesResponse where+ parseJSON+ = withObject "ListReleasesResponse"+ (\ o ->+ ListReleasesResponse' <$>+ (o .:? "nextPageToken") <*>+ (o .:? "releases" .!= mempty))++instance ToJSON ListReleasesResponse where+ toJSON ListReleasesResponse'{..}+ = object+ (catMaybes+ [("nextPageToken" .=) <$> _lrrNextPageToken,+ ("releases" .=) <$> _lrrReleases])++-- | The response for FirebaseRulesService.TestRuleset.+--+-- /See:/ 'testRulesetResponse' smart constructor.+newtype TestRulesetResponse = TestRulesetResponse'+ { _trrIssues :: Maybe [Issue]+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'TestRulesetResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'trrIssues'+testRulesetResponse+ :: TestRulesetResponse+testRulesetResponse =+ TestRulesetResponse'+ { _trrIssues = Nothing+ }++-- | Syntactic and semantic \`Source\` issues of varying severity. Issues of+-- \`ERROR\` severity will prevent tests from executing.+trrIssues :: Lens' TestRulesetResponse [Issue]+trrIssues+ = lens _trrIssues (\ s a -> s{_trrIssues = a}) .+ _Default+ . _Coerce++instance FromJSON TestRulesetResponse where+ parseJSON+ = withObject "TestRulesetResponse"+ (\ o ->+ TestRulesetResponse' <$> (o .:? "issues" .!= mempty))++instance ToJSON TestRulesetResponse where+ toJSON TestRulesetResponse'{..}+ = object (catMaybes [("issues" .=) <$> _trrIssues])++-- | \`Release\` is a named reference to a \`Ruleset\`. Once a \`Release\`+-- refers to a \`Ruleset\`, rules-enabled services will be able to enforce+-- the \`Ruleset\`.+--+-- /See:/ 'release' smart constructor.+data Release = Release'+ { _rRulesetName :: !(Maybe Text)+ , _rUpdateTime :: !(Maybe DateTime')+ , _rName :: !(Maybe Text)+ , _rCreateTime :: !(Maybe DateTime')+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Release' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rRulesetName'+--+-- * 'rUpdateTime'+--+-- * 'rName'+--+-- * 'rCreateTime'+release+ :: Release+release =+ Release'+ { _rRulesetName = Nothing+ , _rUpdateTime = Nothing+ , _rName = Nothing+ , _rCreateTime = Nothing+ }++-- | Name of the \`Ruleset\` referred to by this \`Release\`. The \`Ruleset\`+-- must exist the \`Release\` to be created.+rRulesetName :: Lens' Release (Maybe Text)+rRulesetName+ = lens _rRulesetName (\ s a -> s{_rRulesetName = a})++-- | Time the release was updated. \'OutputOnly+rUpdateTime :: Lens' Release (Maybe UTCTime)+rUpdateTime+ = lens _rUpdateTime (\ s a -> s{_rUpdateTime = a}) .+ mapping _DateTime++-- | Resource name for the \`Release\`. \`Release\` names may be structured+-- \`app1\/prod\/v2\` or flat \`app1_prod_v2\` which affords developers a+-- great deal of flexibility in mapping the name to the style that best+-- fits their existing development practices. For example, a name could+-- refer to an environment, an app, a version, or some combination of+-- three. In the table below, for the project name \`projects\/foo\`, the+-- following relative release paths show how flat and structured names+-- might be chosen to match a desired development \/ deployment strategy.+-- Use Case | Flat Name | Structured Name+-- -------------|---------------------|---------------- Environments |+-- releases\/qa | releases\/qa Apps | releases\/app1_qa |+-- releases\/app1\/qa Versions | releases\/app1_v2_qa |+-- releases\/app1\/v2\/qa The delimiter between the release name path+-- elements can be almost anything and it should work equally well with the+-- release name list filter, but in many ways the structured paths provide+-- a clearer picture of the relationship between \`Release\` instances.+-- Format: \`projects\/{project_id}\/releases\/{release_id}\`+rName :: Lens' Release (Maybe Text)+rName = lens _rName (\ s a -> s{_rName = a})++-- | Time the release was created. \'OutputOnly+rCreateTime :: Lens' Release (Maybe UTCTime)+rCreateTime+ = lens _rCreateTime (\ s a -> s{_rCreateTime = a}) .+ mapping _DateTime++instance FromJSON Release where+ parseJSON+ = withObject "Release"+ (\ o ->+ Release' <$>+ (o .:? "rulesetName") <*> (o .:? "updateTime") <*>+ (o .:? "name")+ <*> (o .:? "createTime"))++instance ToJSON Release where+ toJSON Release'{..}+ = object+ (catMaybes+ [("rulesetName" .=) <$> _rRulesetName,+ ("updateTime" .=) <$> _rUpdateTime,+ ("name" .=) <$> _rName,+ ("createTime" .=) <$> _rCreateTime])++-- | \`Ruleset\` is an immutable copy of \`Source\` with a globally unique+-- identifier and a creation time.+--+-- /See:/ 'ruleset' smart constructor.+data Ruleset = Ruleset'+ { _rulName :: !(Maybe Text)+ , _rulSource :: !(Maybe Source)+ , _rulCreateTime :: !(Maybe DateTime')+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Ruleset' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rulName'+--+-- * 'rulSource'+--+-- * 'rulCreateTime'+ruleset+ :: Ruleset+ruleset =+ Ruleset'+ { _rulName = Nothing+ , _rulSource = Nothing+ , _rulCreateTime = Nothing+ }++-- | Name of the \`Ruleset\`. The ruleset_id is auto generated by the+-- service. Format: \`projects\/{project_id}\/rulesets\/{ruleset_id}\`+-- \'OutputOnly+rulName :: Lens' Ruleset (Maybe Text)+rulName = lens _rulName (\ s a -> s{_rulName = a})++-- | \`Source\` for the \`Ruleset\`.+rulSource :: Lens' Ruleset (Maybe Source)+rulSource+ = lens _rulSource (\ s a -> s{_rulSource = a})++-- | Time the \`Ruleset\` was created. \'OutputOnly+rulCreateTime :: Lens' Ruleset (Maybe UTCTime)+rulCreateTime+ = lens _rulCreateTime+ (\ s a -> s{_rulCreateTime = a})+ . mapping _DateTime++instance FromJSON Ruleset where+ parseJSON+ = withObject "Ruleset"+ (\ o ->+ Ruleset' <$>+ (o .:? "name") <*> (o .:? "source") <*>+ (o .:? "createTime"))++instance ToJSON Ruleset where+ toJSON Ruleset'{..}+ = object+ (catMaybes+ [("name" .=) <$> _rulName,+ ("source" .=) <$> _rulSource,+ ("createTime" .=) <$> _rulCreateTime])++-- | \`Source\` is one or more \`File\` messages comprising a logical set of+-- rules.+--+-- /See:/ 'source' smart constructor.+newtype Source = Source'+ { _sFiles :: Maybe [File]+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Source' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sFiles'+source+ :: Source+source =+ Source'+ { _sFiles = Nothing+ }++-- | \`File\` set constituting the \`Source\` bundle.+sFiles :: Lens' Source [File]+sFiles+ = lens _sFiles (\ s a -> s{_sFiles = a}) . _Default .+ _Coerce++instance FromJSON Source where+ parseJSON+ = withObject "Source"+ (\ o -> Source' <$> (o .:? "files" .!= mempty))++instance ToJSON Source where+ toJSON Source'{..}+ = object (catMaybes [("files" .=) <$> _sFiles])++-- | The request for FirebaseRulesService.TestRuleset.+--+-- /See:/ 'testRulesetRequest' smart constructor.+newtype TestRulesetRequest = TestRulesetRequest'+ { _trrSource :: Maybe Source+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'TestRulesetRequest' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'trrSource'+testRulesetRequest+ :: TestRulesetRequest+testRulesetRequest =+ TestRulesetRequest'+ { _trrSource = Nothing+ }++-- | \`Source\` to be checked for correctness.+trrSource :: Lens' TestRulesetRequest (Maybe Source)+trrSource+ = lens _trrSource (\ s a -> s{_trrSource = a})++instance FromJSON TestRulesetRequest where+ parseJSON+ = withObject "TestRulesetRequest"+ (\ o -> TestRulesetRequest' <$> (o .:? "source"))++instance ToJSON TestRulesetRequest where+ toJSON TestRulesetRequest'{..}+ = object (catMaybes [("source" .=) <$> _trrSource])++-- | \`File\` containing source content.+--+-- /See:/ 'file' smart constructor.+data File = File'+ { _fFingerprint :: !(Maybe Base64)+ , _fContent :: !(Maybe Text)+ , _fName :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'File' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'fFingerprint'+--+-- * 'fContent'+--+-- * 'fName'+file+ :: File+file =+ File'+ { _fFingerprint = Nothing+ , _fContent = Nothing+ , _fName = Nothing+ }++-- | Fingerprint (e.g. github sha) associated with the \`File\`.+fFingerprint :: Lens' File (Maybe ByteString)+fFingerprint+ = lens _fFingerprint (\ s a -> s{_fFingerprint = a})+ . mapping _Base64++-- | Textual Content.+fContent :: Lens' File (Maybe Text)+fContent = lens _fContent (\ s a -> s{_fContent = a})++-- | File name.+fName :: Lens' File (Maybe Text)+fName = lens _fName (\ s a -> s{_fName = a})++instance FromJSON File where+ parseJSON+ = withObject "File"+ (\ o ->+ File' <$>+ (o .:? "fingerprint") <*> (o .:? "content") <*>+ (o .:? "name"))++instance ToJSON File where+ toJSON File'{..}+ = object+ (catMaybes+ [("fingerprint" .=) <$> _fFingerprint,+ ("content" .=) <$> _fContent,+ ("name" .=) <$> _fName])++-- | The response for FirebaseRulesService.ListRulesets+--+-- /See:/ 'listRulesetsResponse' smart constructor.+data ListRulesetsResponse = ListRulesetsResponse'+ { _lRulesets :: !(Maybe [Ruleset])+ , _lNextPageToken :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListRulesetsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lRulesets'+--+-- * 'lNextPageToken'+listRulesetsResponse+ :: ListRulesetsResponse+listRulesetsResponse =+ ListRulesetsResponse'+ { _lRulesets = Nothing+ , _lNextPageToken = Nothing+ }++-- | List of \`Ruleset\` instances.+lRulesets :: Lens' ListRulesetsResponse [Ruleset]+lRulesets+ = lens _lRulesets (\ s a -> s{_lRulesets = a}) .+ _Default+ . _Coerce++-- | The pagination token to retrieve the next page of results. If the value+-- is empty, no further results remain.+lNextPageToken :: Lens' ListRulesetsResponse (Maybe Text)+lNextPageToken+ = lens _lNextPageToken+ (\ s a -> s{_lNextPageToken = a})++instance FromJSON ListRulesetsResponse where+ parseJSON+ = withObject "ListRulesetsResponse"+ (\ o ->+ ListRulesetsResponse' <$>+ (o .:? "rulesets" .!= mempty) <*>+ (o .:? "nextPageToken"))++instance ToJSON ListRulesetsResponse where+ toJSON ListRulesetsResponse'{..}+ = object+ (catMaybes+ [("rulesets" .=) <$> _lRulesets,+ ("nextPageToken" .=) <$> _lNextPageToken])++-- | Issues include warnings, errors, and deprecation notices.+--+-- /See:/ 'issue' smart constructor.+data Issue = Issue'+ { _iSourcePosition :: !(Maybe SourcePosition)+ , _iSeverity :: !(Maybe IssueSeverity)+ , _iDescription :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Issue' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'iSourcePosition'+--+-- * 'iSeverity'+--+-- * 'iDescription'+issue+ :: Issue+issue =+ Issue'+ { _iSourcePosition = Nothing+ , _iSeverity = Nothing+ , _iDescription = Nothing+ }++-- | Position of the issue in the \`Source\`.+iSourcePosition :: Lens' Issue (Maybe SourcePosition)+iSourcePosition+ = lens _iSourcePosition+ (\ s a -> s{_iSourcePosition = a})++-- | The severity of the issue.+iSeverity :: Lens' Issue (Maybe IssueSeverity)+iSeverity+ = lens _iSeverity (\ s a -> s{_iSeverity = a})++-- | Short error description.+iDescription :: Lens' Issue (Maybe Text)+iDescription+ = lens _iDescription (\ s a -> s{_iDescription = a})++instance FromJSON Issue where+ parseJSON+ = withObject "Issue"+ (\ o ->+ Issue' <$>+ (o .:? "sourcePosition") <*> (o .:? "severity") <*>+ (o .:? "description"))++instance ToJSON Issue where+ toJSON Issue'{..}+ = object+ (catMaybes+ [("sourcePosition" .=) <$> _iSourcePosition,+ ("severity" .=) <$> _iSeverity,+ ("description" .=) <$> _iDescription])
+ gen/Network/Google/FirebaseRules/Types/Sum.hs view
@@ -0,0 +1,88 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.FirebaseRules.Types.Sum+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.Google.FirebaseRules.Types.Sum where++import Network.Google.Prelude++-- | V1 error format.+data Xgafv+ = X1+ -- ^ @1@+ -- v1 error format+ | X2+ -- ^ @2@+ -- v2 error format+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)++instance Hashable Xgafv++instance FromHttpApiData Xgafv where+ parseQueryParam = \case+ "1" -> Right X1+ "2" -> Right X2+ x -> Left ("Unable to parse Xgafv from: " <> x)++instance ToHttpApiData Xgafv where+ toQueryParam = \case+ X1 -> "1"+ X2 -> "2"++instance FromJSON Xgafv where+ parseJSON = parseJSONText "Xgafv"++instance ToJSON Xgafv where+ toJSON = toJSONText++-- | The severity of the issue.+data IssueSeverity+ = SeverityUnspecified+ -- ^ @SEVERITY_UNSPECIFIED@+ -- An unspecified severity.+ | Deprecation+ -- ^ @DEPRECATION@+ -- Deprecation issue for statements and method that may no longer be+ -- supported or maintained.+ | Warning+ -- ^ @WARNING@+ -- Warnings such as: unused variables.+ | Error'+ -- ^ @ERROR@+ -- Errors such as: unmatched curly braces or variable redefinition.+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)++instance Hashable IssueSeverity++instance FromHttpApiData IssueSeverity where+ parseQueryParam = \case+ "SEVERITY_UNSPECIFIED" -> Right SeverityUnspecified+ "DEPRECATION" -> Right Deprecation+ "WARNING" -> Right Warning+ "ERROR" -> Right Error'+ x -> Left ("Unable to parse IssueSeverity from: " <> x)++instance ToHttpApiData IssueSeverity where+ toQueryParam = \case+ SeverityUnspecified -> "SEVERITY_UNSPECIFIED"+ Deprecation -> "DEPRECATION"+ Warning -> "WARNING"+ Error' -> "ERROR"++instance FromJSON IssueSeverity where+ parseJSON = parseJSONText "IssueSeverity"++instance ToJSON IssueSeverity where+ toJSON = toJSONText
+ gen/Network/Google/Resource/FirebaseRules/Projects/Releases/Create.hs view
@@ -0,0 +1,218 @@+{-# 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.FirebaseRules.Projects.Releases.Create+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Create a \`Release\`. Release names should reflect the developer\'s+-- deployment practices. For example, the release name may include the+-- environment name, application name, application version, or any other+-- name meaningful to the developer. Once a \`Release\` refers to a+-- \`Ruleset\`, the rules can be enforced by Firebase Rules-enabled+-- services. More than one \`Release\` may be \'live\' concurrently.+-- Consider the following three \`Release\` names for \`projects\/foo\` and+-- the \`Ruleset\` to which they refer. Release Name | Ruleset Name+-- --------------------------------|-------------+-- projects\/foo\/releases\/prod | projects\/foo\/rulesets\/uuid123+-- projects\/foo\/releases\/prod\/beta | projects\/foo\/rulesets\/uuid123+-- projects\/foo\/releases\/prod\/v23 | projects\/foo\/rulesets\/uuid456+-- The table reflects the \`Ruleset\` rollout in progress. The \`prod\` and+-- \`prod\/beta\` releases refer to the same \`Ruleset\`. However,+-- \`prod\/v23\` refers to a new \`Ruleset\`. The \`Ruleset\` reference for+-- a \`Release\` may be updated using the UpdateRelease method, and the+-- custom \`Release\` name may be referenced by specifying the+-- \`X-Firebase-Rules-Release-Name\` header.+--+-- /See:/ <https://firebase.google.com/docs/storage/security/start Firebase Rules API Reference> for @firebaserules.projects.releases.create@.+module Network.Google.Resource.FirebaseRules.Projects.Releases.Create+ (+ -- * REST Resource+ ProjectsReleasesCreateResource++ -- * Creating a Request+ , projectsReleasesCreate+ , ProjectsReleasesCreate++ -- * Request Lenses+ , prcrXgafv+ , prcrUploadProtocol+ , prcrPp+ , prcrAccessToken+ , prcrUploadType+ , prcrPayload+ , prcrBearerToken+ , prcrName+ , prcrCallback+ ) where++import Network.Google.FirebaseRules.Types+import Network.Google.Prelude++-- | A resource alias for @firebaserules.projects.releases.create@ method which the+-- 'ProjectsReleasesCreate' request conforms to.+type ProjectsReleasesCreateResource =+ "v1" :>+ Capture "name" Text :>+ "releases" :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "pp" Bool :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "bearer_token" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Release :> Post '[JSON] Release++-- | Create a \`Release\`. Release names should reflect the developer\'s+-- deployment practices. For example, the release name may include the+-- environment name, application name, application version, or any other+-- name meaningful to the developer. Once a \`Release\` refers to a+-- \`Ruleset\`, the rules can be enforced by Firebase Rules-enabled+-- services. More than one \`Release\` may be \'live\' concurrently.+-- Consider the following three \`Release\` names for \`projects\/foo\` and+-- the \`Ruleset\` to which they refer. Release Name | Ruleset Name+-- --------------------------------|-------------+-- projects\/foo\/releases\/prod | projects\/foo\/rulesets\/uuid123+-- projects\/foo\/releases\/prod\/beta | projects\/foo\/rulesets\/uuid123+-- projects\/foo\/releases\/prod\/v23 | projects\/foo\/rulesets\/uuid456+-- The table reflects the \`Ruleset\` rollout in progress. The \`prod\` and+-- \`prod\/beta\` releases refer to the same \`Ruleset\`. However,+-- \`prod\/v23\` refers to a new \`Ruleset\`. The \`Ruleset\` reference for+-- a \`Release\` may be updated using the UpdateRelease method, and the+-- custom \`Release\` name may be referenced by specifying the+-- \`X-Firebase-Rules-Release-Name\` header.+--+-- /See:/ 'projectsReleasesCreate' smart constructor.+data ProjectsReleasesCreate = ProjectsReleasesCreate'+ { _prcrXgafv :: !(Maybe Xgafv)+ , _prcrUploadProtocol :: !(Maybe Text)+ , _prcrPp :: !Bool+ , _prcrAccessToken :: !(Maybe Text)+ , _prcrUploadType :: !(Maybe Text)+ , _prcrPayload :: !Release+ , _prcrBearerToken :: !(Maybe Text)+ , _prcrName :: !Text+ , _prcrCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ProjectsReleasesCreate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'prcrXgafv'+--+-- * 'prcrUploadProtocol'+--+-- * 'prcrPp'+--+-- * 'prcrAccessToken'+--+-- * 'prcrUploadType'+--+-- * 'prcrPayload'+--+-- * 'prcrBearerToken'+--+-- * 'prcrName'+--+-- * 'prcrCallback'+projectsReleasesCreate+ :: Release -- ^ 'prcrPayload'+ -> Text -- ^ 'prcrName'+ -> ProjectsReleasesCreate+projectsReleasesCreate pPrcrPayload_ pPrcrName_ =+ ProjectsReleasesCreate'+ { _prcrXgafv = Nothing+ , _prcrUploadProtocol = Nothing+ , _prcrPp = True+ , _prcrAccessToken = Nothing+ , _prcrUploadType = Nothing+ , _prcrPayload = pPrcrPayload_+ , _prcrBearerToken = Nothing+ , _prcrName = pPrcrName_+ , _prcrCallback = Nothing+ }++-- | V1 error format.+prcrXgafv :: Lens' ProjectsReleasesCreate (Maybe Xgafv)+prcrXgafv+ = lens _prcrXgafv (\ s a -> s{_prcrXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+prcrUploadProtocol :: Lens' ProjectsReleasesCreate (Maybe Text)+prcrUploadProtocol+ = lens _prcrUploadProtocol+ (\ s a -> s{_prcrUploadProtocol = a})++-- | Pretty-print response.+prcrPp :: Lens' ProjectsReleasesCreate Bool+prcrPp = lens _prcrPp (\ s a -> s{_prcrPp = a})++-- | OAuth access token.+prcrAccessToken :: Lens' ProjectsReleasesCreate (Maybe Text)+prcrAccessToken+ = lens _prcrAccessToken+ (\ s a -> s{_prcrAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+prcrUploadType :: Lens' ProjectsReleasesCreate (Maybe Text)+prcrUploadType+ = lens _prcrUploadType+ (\ s a -> s{_prcrUploadType = a})++-- | Multipart request metadata.+prcrPayload :: Lens' ProjectsReleasesCreate Release+prcrPayload+ = lens _prcrPayload (\ s a -> s{_prcrPayload = a})++-- | OAuth bearer token.+prcrBearerToken :: Lens' ProjectsReleasesCreate (Maybe Text)+prcrBearerToken+ = lens _prcrBearerToken+ (\ s a -> s{_prcrBearerToken = a})++-- | Resource name for the project which owns this \`Release\`. Format:+-- \`projects\/{project_id}\`+prcrName :: Lens' ProjectsReleasesCreate Text+prcrName = lens _prcrName (\ s a -> s{_prcrName = a})++-- | JSONP+prcrCallback :: Lens' ProjectsReleasesCreate (Maybe Text)+prcrCallback+ = lens _prcrCallback (\ s a -> s{_prcrCallback = a})++instance GoogleRequest ProjectsReleasesCreate where+ type Rs ProjectsReleasesCreate = Release+ type Scopes ProjectsReleasesCreate =+ '["https://www.googleapis.com/auth/cloud-platform"]+ requestClient ProjectsReleasesCreate'{..}+ = go _prcrName _prcrXgafv _prcrUploadProtocol+ (Just _prcrPp)+ _prcrAccessToken+ _prcrUploadType+ _prcrBearerToken+ _prcrCallback+ (Just AltJSON)+ _prcrPayload+ firebaseRulesService+ where go+ = buildClient+ (Proxy :: Proxy ProjectsReleasesCreateResource)+ mempty
+ gen/Network/Google/Resource/FirebaseRules/Projects/Releases/Delete.hs view
@@ -0,0 +1,169 @@+{-# 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.FirebaseRules.Projects.Releases.Delete+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Delete a \`Release\` by resource name.+--+-- /See:/ <https://firebase.google.com/docs/storage/security/start Firebase Rules API Reference> for @firebaserules.projects.releases.delete@.+module Network.Google.Resource.FirebaseRules.Projects.Releases.Delete+ (+ -- * REST Resource+ ProjectsReleasesDeleteResource++ -- * Creating a Request+ , projectsReleasesDelete+ , ProjectsReleasesDelete++ -- * Request Lenses+ , prdXgafv+ , prdUploadProtocol+ , prdPp+ , prdAccessToken+ , prdUploadType+ , prdBearerToken+ , prdName+ , prdCallback+ ) where++import Network.Google.FirebaseRules.Types+import Network.Google.Prelude++-- | A resource alias for @firebaserules.projects.releases.delete@ method which the+-- 'ProjectsReleasesDelete' request conforms to.+type ProjectsReleasesDeleteResource =+ "v1" :>+ Capture "name" Text :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "pp" Bool :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "bearer_token" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :> Delete '[JSON] Empty++-- | Delete a \`Release\` by resource name.+--+-- /See:/ 'projectsReleasesDelete' smart constructor.+data ProjectsReleasesDelete = ProjectsReleasesDelete'+ { _prdXgafv :: !(Maybe Xgafv)+ , _prdUploadProtocol :: !(Maybe Text)+ , _prdPp :: !Bool+ , _prdAccessToken :: !(Maybe Text)+ , _prdUploadType :: !(Maybe Text)+ , _prdBearerToken :: !(Maybe Text)+ , _prdName :: !Text+ , _prdCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ProjectsReleasesDelete' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'prdXgafv'+--+-- * 'prdUploadProtocol'+--+-- * 'prdPp'+--+-- * 'prdAccessToken'+--+-- * 'prdUploadType'+--+-- * 'prdBearerToken'+--+-- * 'prdName'+--+-- * 'prdCallback'+projectsReleasesDelete+ :: Text -- ^ 'prdName'+ -> ProjectsReleasesDelete+projectsReleasesDelete pPrdName_ =+ ProjectsReleasesDelete'+ { _prdXgafv = Nothing+ , _prdUploadProtocol = Nothing+ , _prdPp = True+ , _prdAccessToken = Nothing+ , _prdUploadType = Nothing+ , _prdBearerToken = Nothing+ , _prdName = pPrdName_+ , _prdCallback = Nothing+ }++-- | V1 error format.+prdXgafv :: Lens' ProjectsReleasesDelete (Maybe Xgafv)+prdXgafv = lens _prdXgafv (\ s a -> s{_prdXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+prdUploadProtocol :: Lens' ProjectsReleasesDelete (Maybe Text)+prdUploadProtocol+ = lens _prdUploadProtocol+ (\ s a -> s{_prdUploadProtocol = a})++-- | Pretty-print response.+prdPp :: Lens' ProjectsReleasesDelete Bool+prdPp = lens _prdPp (\ s a -> s{_prdPp = a})++-- | OAuth access token.+prdAccessToken :: Lens' ProjectsReleasesDelete (Maybe Text)+prdAccessToken+ = lens _prdAccessToken+ (\ s a -> s{_prdAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+prdUploadType :: Lens' ProjectsReleasesDelete (Maybe Text)+prdUploadType+ = lens _prdUploadType+ (\ s a -> s{_prdUploadType = a})++-- | OAuth bearer token.+prdBearerToken :: Lens' ProjectsReleasesDelete (Maybe Text)+prdBearerToken+ = lens _prdBearerToken+ (\ s a -> s{_prdBearerToken = a})++-- | Resource name for the \`Release\` to delete. Format:+-- \`projects\/{project_id}\/releases\/{release_id}\`+prdName :: Lens' ProjectsReleasesDelete Text+prdName = lens _prdName (\ s a -> s{_prdName = a})++-- | JSONP+prdCallback :: Lens' ProjectsReleasesDelete (Maybe Text)+prdCallback+ = lens _prdCallback (\ s a -> s{_prdCallback = a})++instance GoogleRequest ProjectsReleasesDelete where+ type Rs ProjectsReleasesDelete = Empty+ type Scopes ProjectsReleasesDelete =+ '["https://www.googleapis.com/auth/cloud-platform"]+ requestClient ProjectsReleasesDelete'{..}+ = go _prdName _prdXgafv _prdUploadProtocol+ (Just _prdPp)+ _prdAccessToken+ _prdUploadType+ _prdBearerToken+ _prdCallback+ (Just AltJSON)+ firebaseRulesService+ where go+ = buildClient+ (Proxy :: Proxy ProjectsReleasesDeleteResource)+ mempty
+ gen/Network/Google/Resource/FirebaseRules/Projects/Releases/Get.hs view
@@ -0,0 +1,165 @@+{-# 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.FirebaseRules.Projects.Releases.Get+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Get a \`Release\` by name.+--+-- /See:/ <https://firebase.google.com/docs/storage/security/start Firebase Rules API Reference> for @firebaserules.projects.releases.get@.+module Network.Google.Resource.FirebaseRules.Projects.Releases.Get+ (+ -- * REST Resource+ ProjectsReleasesGetResource++ -- * Creating a Request+ , projectsReleasesGet+ , ProjectsReleasesGet++ -- * Request Lenses+ , pXgafv+ , pUploadProtocol+ , pPp+ , pAccessToken+ , pUploadType+ , pBearerToken+ , pName+ , pCallback+ ) where++import Network.Google.FirebaseRules.Types+import Network.Google.Prelude++-- | A resource alias for @firebaserules.projects.releases.get@ method which the+-- 'ProjectsReleasesGet' request conforms to.+type ProjectsReleasesGetResource =+ "v1" :>+ Capture "name" Text :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "pp" Bool :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "bearer_token" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :> Get '[JSON] Release++-- | Get a \`Release\` by name.+--+-- /See:/ 'projectsReleasesGet' smart constructor.+data ProjectsReleasesGet = ProjectsReleasesGet'+ { _pXgafv :: !(Maybe Xgafv)+ , _pUploadProtocol :: !(Maybe Text)+ , _pPp :: !Bool+ , _pAccessToken :: !(Maybe Text)+ , _pUploadType :: !(Maybe Text)+ , _pBearerToken :: !(Maybe Text)+ , _pName :: !Text+ , _pCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ProjectsReleasesGet' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pXgafv'+--+-- * 'pUploadProtocol'+--+-- * 'pPp'+--+-- * 'pAccessToken'+--+-- * 'pUploadType'+--+-- * 'pBearerToken'+--+-- * 'pName'+--+-- * 'pCallback'+projectsReleasesGet+ :: Text -- ^ 'pName'+ -> ProjectsReleasesGet+projectsReleasesGet pPName_ =+ ProjectsReleasesGet'+ { _pXgafv = Nothing+ , _pUploadProtocol = Nothing+ , _pPp = True+ , _pAccessToken = Nothing+ , _pUploadType = Nothing+ , _pBearerToken = Nothing+ , _pName = pPName_+ , _pCallback = Nothing+ }++-- | V1 error format.+pXgafv :: Lens' ProjectsReleasesGet (Maybe Xgafv)+pXgafv = lens _pXgafv (\ s a -> s{_pXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+pUploadProtocol :: Lens' ProjectsReleasesGet (Maybe Text)+pUploadProtocol+ = lens _pUploadProtocol+ (\ s a -> s{_pUploadProtocol = a})++-- | Pretty-print response.+pPp :: Lens' ProjectsReleasesGet Bool+pPp = lens _pPp (\ s a -> s{_pPp = a})++-- | OAuth access token.+pAccessToken :: Lens' ProjectsReleasesGet (Maybe Text)+pAccessToken+ = lens _pAccessToken (\ s a -> s{_pAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+pUploadType :: Lens' ProjectsReleasesGet (Maybe Text)+pUploadType+ = lens _pUploadType (\ s a -> s{_pUploadType = a})++-- | OAuth bearer token.+pBearerToken :: Lens' ProjectsReleasesGet (Maybe Text)+pBearerToken+ = lens _pBearerToken (\ s a -> s{_pBearerToken = a})++-- | Resource name of the \`Release\`. Format:+-- \`projects\/{project_id}\/releases\/{release_id}\`+pName :: Lens' ProjectsReleasesGet Text+pName = lens _pName (\ s a -> s{_pName = a})++-- | JSONP+pCallback :: Lens' ProjectsReleasesGet (Maybe Text)+pCallback+ = lens _pCallback (\ s a -> s{_pCallback = a})++instance GoogleRequest ProjectsReleasesGet where+ type Rs ProjectsReleasesGet = Release+ type Scopes ProjectsReleasesGet =+ '["https://www.googleapis.com/auth/cloud-platform"]+ requestClient ProjectsReleasesGet'{..}+ = go _pName _pXgafv _pUploadProtocol (Just _pPp)+ _pAccessToken+ _pUploadType+ _pBearerToken+ _pCallback+ (Just AltJSON)+ firebaseRulesService+ where go+ = buildClient+ (Proxy :: Proxy ProjectsReleasesGetResource)+ mempty
+ gen/Network/Google/Resource/FirebaseRules/Projects/Releases/List.hs view
@@ -0,0 +1,232 @@+{-# 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.FirebaseRules.Projects.Releases.List+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- List the \`Release\` values for a project. This list may optionally be+-- filtered by \`Release\` name or \`Ruleset\` id or both.+--+-- /See:/ <https://firebase.google.com/docs/storage/security/start Firebase Rules API Reference> for @firebaserules.projects.releases.list@.+module Network.Google.Resource.FirebaseRules.Projects.Releases.List+ (+ -- * REST Resource+ ProjectsReleasesListResource++ -- * Creating a Request+ , projectsReleasesList+ , ProjectsReleasesList++ -- * Request Lenses+ , prlrXgafv+ , prlrUploadProtocol+ , prlrPp+ , prlrAccessToken+ , prlrUploadType+ , prlrBearerToken+ , prlrName+ , prlrFilter+ , prlrPageToken+ , prlrPageSize+ , prlrCallback+ ) where++import Network.Google.FirebaseRules.Types+import Network.Google.Prelude++-- | A resource alias for @firebaserules.projects.releases.list@ method which the+-- 'ProjectsReleasesList' request conforms to.+type ProjectsReleasesListResource =+ "v1" :>+ Capture "name" Text :>+ "releases" :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "pp" Bool :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "bearer_token" Text :>+ QueryParam "filter" Text :>+ QueryParam "pageToken" Text :>+ QueryParam "pageSize" (Textual Int32) :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] ListReleasesResponse++-- | List the \`Release\` values for a project. This list may optionally be+-- filtered by \`Release\` name or \`Ruleset\` id or both.+--+-- /See:/ 'projectsReleasesList' smart constructor.+data ProjectsReleasesList = ProjectsReleasesList'+ { _prlrXgafv :: !(Maybe Xgafv)+ , _prlrUploadProtocol :: !(Maybe Text)+ , _prlrPp :: !Bool+ , _prlrAccessToken :: !(Maybe Text)+ , _prlrUploadType :: !(Maybe Text)+ , _prlrBearerToken :: !(Maybe Text)+ , _prlrName :: !Text+ , _prlrFilter :: !(Maybe Text)+ , _prlrPageToken :: !(Maybe Text)+ , _prlrPageSize :: !(Maybe (Textual Int32))+ , _prlrCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ProjectsReleasesList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'prlrXgafv'+--+-- * 'prlrUploadProtocol'+--+-- * 'prlrPp'+--+-- * 'prlrAccessToken'+--+-- * 'prlrUploadType'+--+-- * 'prlrBearerToken'+--+-- * 'prlrName'+--+-- * 'prlrFilter'+--+-- * 'prlrPageToken'+--+-- * 'prlrPageSize'+--+-- * 'prlrCallback'+projectsReleasesList+ :: Text -- ^ 'prlrName'+ -> ProjectsReleasesList+projectsReleasesList pPrlrName_ =+ ProjectsReleasesList'+ { _prlrXgafv = Nothing+ , _prlrUploadProtocol = Nothing+ , _prlrPp = True+ , _prlrAccessToken = Nothing+ , _prlrUploadType = Nothing+ , _prlrBearerToken = Nothing+ , _prlrName = pPrlrName_+ , _prlrFilter = Nothing+ , _prlrPageToken = Nothing+ , _prlrPageSize = Nothing+ , _prlrCallback = Nothing+ }++-- | V1 error format.+prlrXgafv :: Lens' ProjectsReleasesList (Maybe Xgafv)+prlrXgafv+ = lens _prlrXgafv (\ s a -> s{_prlrXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+prlrUploadProtocol :: Lens' ProjectsReleasesList (Maybe Text)+prlrUploadProtocol+ = lens _prlrUploadProtocol+ (\ s a -> s{_prlrUploadProtocol = a})++-- | Pretty-print response.+prlrPp :: Lens' ProjectsReleasesList Bool+prlrPp = lens _prlrPp (\ s a -> s{_prlrPp = a})++-- | OAuth access token.+prlrAccessToken :: Lens' ProjectsReleasesList (Maybe Text)+prlrAccessToken+ = lens _prlrAccessToken+ (\ s a -> s{_prlrAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+prlrUploadType :: Lens' ProjectsReleasesList (Maybe Text)+prlrUploadType+ = lens _prlrUploadType+ (\ s a -> s{_prlrUploadType = a})++-- | OAuth bearer token.+prlrBearerToken :: Lens' ProjectsReleasesList (Maybe Text)+prlrBearerToken+ = lens _prlrBearerToken+ (\ s a -> s{_prlrBearerToken = a})++-- | Resource name for the project. Format: \`projects\/{project_id}\`+prlrName :: Lens' ProjectsReleasesList Text+prlrName = lens _prlrName (\ s a -> s{_prlrName = a})++-- | \`Release\` filter. The list method supports filters with restrictions+-- on the \`Release\` \`name\` and also on the \`Ruleset\`+-- \`ruleset_name\`. Example 1) A filter of \'name=prod*\' might return+-- \`Release\`s with names within \'projects\/foo\' prefixed with \'prod\':+-- Name | Ruleset Name ------------------------------|-------------+-- projects\/foo\/releases\/prod | projects\/foo\/rulesets\/uuid1234+-- projects\/foo\/releases\/prod\/v1 | projects\/foo\/rulesets\/uuid1234+-- projects\/foo\/releases\/prod\/v2 | projects\/foo\/rulesets\/uuid8888+-- Example 2) A filter of \`name=prod* ruleset_name=uuid1234\` would return+-- only \`Release\` instances for \'projects\/foo\' with names prefixed+-- with \'prod\' referring to the same \`Ruleset\` name of \'uuid1234\':+-- Name | Ruleset Name ------------------------------|-------------+-- projects\/foo\/releases\/prod | projects\/foo\/rulesets\/1234+-- projects\/foo\/releases\/prod\/v1 | projects\/foo\/rulesets\/1234 In the+-- examples, the filter parameters refer to the search filters for release+-- and ruleset names are relative to the project releases and rulesets+-- collections. Fully qualified prefixed may also be used. e.g.+-- \`name=projects\/foo\/releases\/prod*+-- ruleset_name=projects\/foo\/rulesets\/uuid1\`+prlrFilter :: Lens' ProjectsReleasesList (Maybe Text)+prlrFilter+ = lens _prlrFilter (\ s a -> s{_prlrFilter = a})++-- | Next page token for the next batch of \`Release\` instances.+prlrPageToken :: Lens' ProjectsReleasesList (Maybe Text)+prlrPageToken+ = lens _prlrPageToken+ (\ s a -> s{_prlrPageToken = a})++-- | Page size to load. Maximum of 100. Defaults to 10. Note: \`page_size\`+-- is just a hint and the service may choose to load less than+-- \`page_size\` due to the size of the output. To traverse all of the+-- releases, caller should iterate until the \`page_token\` is empty.+prlrPageSize :: Lens' ProjectsReleasesList (Maybe Int32)+prlrPageSize+ = lens _prlrPageSize (\ s a -> s{_prlrPageSize = a})+ . mapping _Coerce++-- | JSONP+prlrCallback :: Lens' ProjectsReleasesList (Maybe Text)+prlrCallback+ = lens _prlrCallback (\ s a -> s{_prlrCallback = a})++instance GoogleRequest ProjectsReleasesList where+ type Rs ProjectsReleasesList = ListReleasesResponse+ type Scopes ProjectsReleasesList =+ '["https://www.googleapis.com/auth/cloud-platform"]+ requestClient ProjectsReleasesList'{..}+ = go _prlrName _prlrXgafv _prlrUploadProtocol+ (Just _prlrPp)+ _prlrAccessToken+ _prlrUploadType+ _prlrBearerToken+ _prlrFilter+ _prlrPageToken+ _prlrPageSize+ _prlrCallback+ (Just AltJSON)+ firebaseRulesService+ where go+ = buildClient+ (Proxy :: Proxy ProjectsReleasesListResource)+ mempty
+ gen/Network/Google/Resource/FirebaseRules/Projects/Releases/Update.hs view
@@ -0,0 +1,201 @@+{-# 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.FirebaseRules.Projects.Releases.Update+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Update a \`Release\`. Only updates to the \`ruleset_name\` field will be+-- honored. \`Release\` rename is not supported. To create a \`Release\`+-- use the CreateRelease method instead.+--+-- /See:/ <https://firebase.google.com/docs/storage/security/start Firebase Rules API Reference> for @firebaserules.projects.releases.update@.+module Network.Google.Resource.FirebaseRules.Projects.Releases.Update+ (+ -- * REST Resource+ ProjectsReleasesUpdateResource++ -- * Creating a Request+ , projectsReleasesUpdate+ , ProjectsReleasesUpdate++ -- * Request Lenses+ , pruXgafv+ , pruUploadProtocol+ , pruPp+ , pruAccessToken+ , pruUploadType+ , pruPayload+ , pruBearerToken+ , pruName+ , pruCallback+ ) where++import Network.Google.FirebaseRules.Types+import Network.Google.Prelude++-- | A resource alias for @firebaserules.projects.releases.update@ method which the+-- 'ProjectsReleasesUpdate' request conforms to.+type ProjectsReleasesUpdateResource =+ "v1" :>+ Capture "name" Text :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "pp" Bool :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "bearer_token" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Release :> Put '[JSON] Release++-- | Update a \`Release\`. Only updates to the \`ruleset_name\` field will be+-- honored. \`Release\` rename is not supported. To create a \`Release\`+-- use the CreateRelease method instead.+--+-- /See:/ 'projectsReleasesUpdate' smart constructor.+data ProjectsReleasesUpdate = ProjectsReleasesUpdate'+ { _pruXgafv :: !(Maybe Xgafv)+ , _pruUploadProtocol :: !(Maybe Text)+ , _pruPp :: !Bool+ , _pruAccessToken :: !(Maybe Text)+ , _pruUploadType :: !(Maybe Text)+ , _pruPayload :: !Release+ , _pruBearerToken :: !(Maybe Text)+ , _pruName :: !Text+ , _pruCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ProjectsReleasesUpdate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pruXgafv'+--+-- * 'pruUploadProtocol'+--+-- * 'pruPp'+--+-- * 'pruAccessToken'+--+-- * 'pruUploadType'+--+-- * 'pruPayload'+--+-- * 'pruBearerToken'+--+-- * 'pruName'+--+-- * 'pruCallback'+projectsReleasesUpdate+ :: Release -- ^ 'pruPayload'+ -> Text -- ^ 'pruName'+ -> ProjectsReleasesUpdate+projectsReleasesUpdate pPruPayload_ pPruName_ =+ ProjectsReleasesUpdate'+ { _pruXgafv = Nothing+ , _pruUploadProtocol = Nothing+ , _pruPp = True+ , _pruAccessToken = Nothing+ , _pruUploadType = Nothing+ , _pruPayload = pPruPayload_+ , _pruBearerToken = Nothing+ , _pruName = pPruName_+ , _pruCallback = Nothing+ }++-- | V1 error format.+pruXgafv :: Lens' ProjectsReleasesUpdate (Maybe Xgafv)+pruXgafv = lens _pruXgafv (\ s a -> s{_pruXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+pruUploadProtocol :: Lens' ProjectsReleasesUpdate (Maybe Text)+pruUploadProtocol+ = lens _pruUploadProtocol+ (\ s a -> s{_pruUploadProtocol = a})++-- | Pretty-print response.+pruPp :: Lens' ProjectsReleasesUpdate Bool+pruPp = lens _pruPp (\ s a -> s{_pruPp = a})++-- | OAuth access token.+pruAccessToken :: Lens' ProjectsReleasesUpdate (Maybe Text)+pruAccessToken+ = lens _pruAccessToken+ (\ s a -> s{_pruAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+pruUploadType :: Lens' ProjectsReleasesUpdate (Maybe Text)+pruUploadType+ = lens _pruUploadType+ (\ s a -> s{_pruUploadType = a})++-- | Multipart request metadata.+pruPayload :: Lens' ProjectsReleasesUpdate Release+pruPayload+ = lens _pruPayload (\ s a -> s{_pruPayload = a})++-- | OAuth bearer token.+pruBearerToken :: Lens' ProjectsReleasesUpdate (Maybe Text)+pruBearerToken+ = lens _pruBearerToken+ (\ s a -> s{_pruBearerToken = a})++-- | Resource name for the \`Release\`. \`Release\` names may be structured+-- \`app1\/prod\/v2\` or flat \`app1_prod_v2\` which affords developers a+-- great deal of flexibility in mapping the name to the style that best+-- fits their existing development practices. For example, a name could+-- refer to an environment, an app, a version, or some combination of+-- three. In the table below, for the project name \`projects\/foo\`, the+-- following relative release paths show how flat and structured names+-- might be chosen to match a desired development \/ deployment strategy.+-- Use Case | Flat Name | Structured Name+-- -------------|---------------------|---------------- Environments |+-- releases\/qa | releases\/qa Apps | releases\/app1_qa |+-- releases\/app1\/qa Versions | releases\/app1_v2_qa |+-- releases\/app1\/v2\/qa The delimiter between the release name path+-- elements can be almost anything and it should work equally well with the+-- release name list filter, but in many ways the structured paths provide+-- a clearer picture of the relationship between \`Release\` instances.+-- Format: \`projects\/{project_id}\/releases\/{release_id}\`+pruName :: Lens' ProjectsReleasesUpdate Text+pruName = lens _pruName (\ s a -> s{_pruName = a})++-- | JSONP+pruCallback :: Lens' ProjectsReleasesUpdate (Maybe Text)+pruCallback+ = lens _pruCallback (\ s a -> s{_pruCallback = a})++instance GoogleRequest ProjectsReleasesUpdate where+ type Rs ProjectsReleasesUpdate = Release+ type Scopes ProjectsReleasesUpdate =+ '["https://www.googleapis.com/auth/cloud-platform"]+ requestClient ProjectsReleasesUpdate'{..}+ = go _pruName _pruXgafv _pruUploadProtocol+ (Just _pruPp)+ _pruAccessToken+ _pruUploadType+ _pruBearerToken+ _pruCallback+ (Just AltJSON)+ _pruPayload+ firebaseRulesService+ where go+ = buildClient+ (Proxy :: Proxy ProjectsReleasesUpdateResource)+ mempty
+ gen/Network/Google/Resource/FirebaseRules/Projects/Rulesets/Create.hs view
@@ -0,0 +1,191 @@+{-# 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.FirebaseRules.Projects.Rulesets.Create+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Create a \`Ruleset\` from \`Source\`. The \`Ruleset\` is given a unique+-- generated name which is returned to the caller. \`Source\` containing+-- syntactic or semantics errors will result in an error response+-- indicating the first error encountered. For a detailed view of+-- \`Source\` issues, use TestRuleset.+--+-- /See:/ <https://firebase.google.com/docs/storage/security/start Firebase Rules API Reference> for @firebaserules.projects.rulesets.create@.+module Network.Google.Resource.FirebaseRules.Projects.Rulesets.Create+ (+ -- * REST Resource+ ProjectsRulesetsCreateResource++ -- * Creating a Request+ , projectsRulesetsCreate+ , ProjectsRulesetsCreate++ -- * Request Lenses+ , prcXgafv+ , prcUploadProtocol+ , prcPp+ , prcAccessToken+ , prcUploadType+ , prcPayload+ , prcBearerToken+ , prcName+ , prcCallback+ ) where++import Network.Google.FirebaseRules.Types+import Network.Google.Prelude++-- | A resource alias for @firebaserules.projects.rulesets.create@ method which the+-- 'ProjectsRulesetsCreate' request conforms to.+type ProjectsRulesetsCreateResource =+ "v1" :>+ Capture "name" Text :>+ "rulesets" :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "pp" Bool :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "bearer_token" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Ruleset :> Post '[JSON] Ruleset++-- | Create a \`Ruleset\` from \`Source\`. The \`Ruleset\` is given a unique+-- generated name which is returned to the caller. \`Source\` containing+-- syntactic or semantics errors will result in an error response+-- indicating the first error encountered. For a detailed view of+-- \`Source\` issues, use TestRuleset.+--+-- /See:/ 'projectsRulesetsCreate' smart constructor.+data ProjectsRulesetsCreate = ProjectsRulesetsCreate'+ { _prcXgafv :: !(Maybe Xgafv)+ , _prcUploadProtocol :: !(Maybe Text)+ , _prcPp :: !Bool+ , _prcAccessToken :: !(Maybe Text)+ , _prcUploadType :: !(Maybe Text)+ , _prcPayload :: !Ruleset+ , _prcBearerToken :: !(Maybe Text)+ , _prcName :: !Text+ , _prcCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ProjectsRulesetsCreate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'prcXgafv'+--+-- * 'prcUploadProtocol'+--+-- * 'prcPp'+--+-- * 'prcAccessToken'+--+-- * 'prcUploadType'+--+-- * 'prcPayload'+--+-- * 'prcBearerToken'+--+-- * 'prcName'+--+-- * 'prcCallback'+projectsRulesetsCreate+ :: Ruleset -- ^ 'prcPayload'+ -> Text -- ^ 'prcName'+ -> ProjectsRulesetsCreate+projectsRulesetsCreate pPrcPayload_ pPrcName_ =+ ProjectsRulesetsCreate'+ { _prcXgafv = Nothing+ , _prcUploadProtocol = Nothing+ , _prcPp = True+ , _prcAccessToken = Nothing+ , _prcUploadType = Nothing+ , _prcPayload = pPrcPayload_+ , _prcBearerToken = Nothing+ , _prcName = pPrcName_+ , _prcCallback = Nothing+ }++-- | V1 error format.+prcXgafv :: Lens' ProjectsRulesetsCreate (Maybe Xgafv)+prcXgafv = lens _prcXgafv (\ s a -> s{_prcXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+prcUploadProtocol :: Lens' ProjectsRulesetsCreate (Maybe Text)+prcUploadProtocol+ = lens _prcUploadProtocol+ (\ s a -> s{_prcUploadProtocol = a})++-- | Pretty-print response.+prcPp :: Lens' ProjectsRulesetsCreate Bool+prcPp = lens _prcPp (\ s a -> s{_prcPp = a})++-- | OAuth access token.+prcAccessToken :: Lens' ProjectsRulesetsCreate (Maybe Text)+prcAccessToken+ = lens _prcAccessToken+ (\ s a -> s{_prcAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+prcUploadType :: Lens' ProjectsRulesetsCreate (Maybe Text)+prcUploadType+ = lens _prcUploadType+ (\ s a -> s{_prcUploadType = a})++-- | Multipart request metadata.+prcPayload :: Lens' ProjectsRulesetsCreate Ruleset+prcPayload+ = lens _prcPayload (\ s a -> s{_prcPayload = a})++-- | OAuth bearer token.+prcBearerToken :: Lens' ProjectsRulesetsCreate (Maybe Text)+prcBearerToken+ = lens _prcBearerToken+ (\ s a -> s{_prcBearerToken = a})++-- | Resource name for Project which owns this \`Ruleset\`. Format:+-- \`projects\/{project_id}\`+prcName :: Lens' ProjectsRulesetsCreate Text+prcName = lens _prcName (\ s a -> s{_prcName = a})++-- | JSONP+prcCallback :: Lens' ProjectsRulesetsCreate (Maybe Text)+prcCallback+ = lens _prcCallback (\ s a -> s{_prcCallback = a})++instance GoogleRequest ProjectsRulesetsCreate where+ type Rs ProjectsRulesetsCreate = Ruleset+ type Scopes ProjectsRulesetsCreate =+ '["https://www.googleapis.com/auth/cloud-platform"]+ requestClient ProjectsRulesetsCreate'{..}+ = go _prcName _prcXgafv _prcUploadProtocol+ (Just _prcPp)+ _prcAccessToken+ _prcUploadType+ _prcBearerToken+ _prcCallback+ (Just AltJSON)+ _prcPayload+ firebaseRulesService+ where go+ = buildClient+ (Proxy :: Proxy ProjectsRulesetsCreateResource)+ mempty
+ gen/Network/Google/Resource/FirebaseRules/Projects/Rulesets/Delete.hs view
@@ -0,0 +1,171 @@+{-# 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.FirebaseRules.Projects.Rulesets.Delete+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Delete a \`Ruleset\` by resource name. If the \`Ruleset\` is referenced+-- by a \`Release\` the operation will fail.+--+-- /See:/ <https://firebase.google.com/docs/storage/security/start Firebase Rules API Reference> for @firebaserules.projects.rulesets.delete@.+module Network.Google.Resource.FirebaseRules.Projects.Rulesets.Delete+ (+ -- * REST Resource+ ProjectsRulesetsDeleteResource++ -- * Creating a Request+ , projectsRulesetsDelete+ , ProjectsRulesetsDelete++ -- * Request Lenses+ , proXgafv+ , proUploadProtocol+ , proPp+ , proAccessToken+ , proUploadType+ , proBearerToken+ , proName+ , proCallback+ ) where++import Network.Google.FirebaseRules.Types+import Network.Google.Prelude++-- | A resource alias for @firebaserules.projects.rulesets.delete@ method which the+-- 'ProjectsRulesetsDelete' request conforms to.+type ProjectsRulesetsDeleteResource =+ "v1" :>+ Capture "name" Text :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "pp" Bool :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "bearer_token" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :> Delete '[JSON] Empty++-- | Delete a \`Ruleset\` by resource name. If the \`Ruleset\` is referenced+-- by a \`Release\` the operation will fail.+--+-- /See:/ 'projectsRulesetsDelete' smart constructor.+data ProjectsRulesetsDelete = ProjectsRulesetsDelete'+ { _proXgafv :: !(Maybe Xgafv)+ , _proUploadProtocol :: !(Maybe Text)+ , _proPp :: !Bool+ , _proAccessToken :: !(Maybe Text)+ , _proUploadType :: !(Maybe Text)+ , _proBearerToken :: !(Maybe Text)+ , _proName :: !Text+ , _proCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ProjectsRulesetsDelete' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'proXgafv'+--+-- * 'proUploadProtocol'+--+-- * 'proPp'+--+-- * 'proAccessToken'+--+-- * 'proUploadType'+--+-- * 'proBearerToken'+--+-- * 'proName'+--+-- * 'proCallback'+projectsRulesetsDelete+ :: Text -- ^ 'proName'+ -> ProjectsRulesetsDelete+projectsRulesetsDelete pProName_ =+ ProjectsRulesetsDelete'+ { _proXgafv = Nothing+ , _proUploadProtocol = Nothing+ , _proPp = True+ , _proAccessToken = Nothing+ , _proUploadType = Nothing+ , _proBearerToken = Nothing+ , _proName = pProName_+ , _proCallback = Nothing+ }++-- | V1 error format.+proXgafv :: Lens' ProjectsRulesetsDelete (Maybe Xgafv)+proXgafv = lens _proXgafv (\ s a -> s{_proXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+proUploadProtocol :: Lens' ProjectsRulesetsDelete (Maybe Text)+proUploadProtocol+ = lens _proUploadProtocol+ (\ s a -> s{_proUploadProtocol = a})++-- | Pretty-print response.+proPp :: Lens' ProjectsRulesetsDelete Bool+proPp = lens _proPp (\ s a -> s{_proPp = a})++-- | OAuth access token.+proAccessToken :: Lens' ProjectsRulesetsDelete (Maybe Text)+proAccessToken+ = lens _proAccessToken+ (\ s a -> s{_proAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+proUploadType :: Lens' ProjectsRulesetsDelete (Maybe Text)+proUploadType+ = lens _proUploadType+ (\ s a -> s{_proUploadType = a})++-- | OAuth bearer token.+proBearerToken :: Lens' ProjectsRulesetsDelete (Maybe Text)+proBearerToken+ = lens _proBearerToken+ (\ s a -> s{_proBearerToken = a})++-- | Resource name for the ruleset to delete. Format:+-- \`projects\/{project_id}\/rulesets\/{ruleset_id}\`+proName :: Lens' ProjectsRulesetsDelete Text+proName = lens _proName (\ s a -> s{_proName = a})++-- | JSONP+proCallback :: Lens' ProjectsRulesetsDelete (Maybe Text)+proCallback+ = lens _proCallback (\ s a -> s{_proCallback = a})++instance GoogleRequest ProjectsRulesetsDelete where+ type Rs ProjectsRulesetsDelete = Empty+ type Scopes ProjectsRulesetsDelete =+ '["https://www.googleapis.com/auth/cloud-platform"]+ requestClient ProjectsRulesetsDelete'{..}+ = go _proName _proXgafv _proUploadProtocol+ (Just _proPp)+ _proAccessToken+ _proUploadType+ _proBearerToken+ _proCallback+ (Just AltJSON)+ firebaseRulesService+ where go+ = buildClient+ (Proxy :: Proxy ProjectsRulesetsDeleteResource)+ mempty
+ gen/Network/Google/Resource/FirebaseRules/Projects/Rulesets/Get.hs view
@@ -0,0 +1,169 @@+{-# 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.FirebaseRules.Projects.Rulesets.Get+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Get a \`Ruleset\` by name including the full \`Source\` contents.+--+-- /See:/ <https://firebase.google.com/docs/storage/security/start Firebase Rules API Reference> for @firebaserules.projects.rulesets.get@.+module Network.Google.Resource.FirebaseRules.Projects.Rulesets.Get+ (+ -- * REST Resource+ ProjectsRulesetsGetResource++ -- * Creating a Request+ , projectsRulesetsGet+ , ProjectsRulesetsGet++ -- * Request Lenses+ , prgXgafv+ , prgUploadProtocol+ , prgPp+ , prgAccessToken+ , prgUploadType+ , prgBearerToken+ , prgName+ , prgCallback+ ) where++import Network.Google.FirebaseRules.Types+import Network.Google.Prelude++-- | A resource alias for @firebaserules.projects.rulesets.get@ method which the+-- 'ProjectsRulesetsGet' request conforms to.+type ProjectsRulesetsGetResource =+ "v1" :>+ Capture "name" Text :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "pp" Bool :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "bearer_token" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :> Get '[JSON] Ruleset++-- | Get a \`Ruleset\` by name including the full \`Source\` contents.+--+-- /See:/ 'projectsRulesetsGet' smart constructor.+data ProjectsRulesetsGet = ProjectsRulesetsGet'+ { _prgXgafv :: !(Maybe Xgafv)+ , _prgUploadProtocol :: !(Maybe Text)+ , _prgPp :: !Bool+ , _prgAccessToken :: !(Maybe Text)+ , _prgUploadType :: !(Maybe Text)+ , _prgBearerToken :: !(Maybe Text)+ , _prgName :: !Text+ , _prgCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ProjectsRulesetsGet' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'prgXgafv'+--+-- * 'prgUploadProtocol'+--+-- * 'prgPp'+--+-- * 'prgAccessToken'+--+-- * 'prgUploadType'+--+-- * 'prgBearerToken'+--+-- * 'prgName'+--+-- * 'prgCallback'+projectsRulesetsGet+ :: Text -- ^ 'prgName'+ -> ProjectsRulesetsGet+projectsRulesetsGet pPrgName_ =+ ProjectsRulesetsGet'+ { _prgXgafv = Nothing+ , _prgUploadProtocol = Nothing+ , _prgPp = True+ , _prgAccessToken = Nothing+ , _prgUploadType = Nothing+ , _prgBearerToken = Nothing+ , _prgName = pPrgName_+ , _prgCallback = Nothing+ }++-- | V1 error format.+prgXgafv :: Lens' ProjectsRulesetsGet (Maybe Xgafv)+prgXgafv = lens _prgXgafv (\ s a -> s{_prgXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+prgUploadProtocol :: Lens' ProjectsRulesetsGet (Maybe Text)+prgUploadProtocol+ = lens _prgUploadProtocol+ (\ s a -> s{_prgUploadProtocol = a})++-- | Pretty-print response.+prgPp :: Lens' ProjectsRulesetsGet Bool+prgPp = lens _prgPp (\ s a -> s{_prgPp = a})++-- | OAuth access token.+prgAccessToken :: Lens' ProjectsRulesetsGet (Maybe Text)+prgAccessToken+ = lens _prgAccessToken+ (\ s a -> s{_prgAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+prgUploadType :: Lens' ProjectsRulesetsGet (Maybe Text)+prgUploadType+ = lens _prgUploadType+ (\ s a -> s{_prgUploadType = a})++-- | OAuth bearer token.+prgBearerToken :: Lens' ProjectsRulesetsGet (Maybe Text)+prgBearerToken+ = lens _prgBearerToken+ (\ s a -> s{_prgBearerToken = a})++-- | Resource name for the ruleset to get. Format:+-- \`projects\/{project_id}\/rulesets\/{ruleset_id}\`+prgName :: Lens' ProjectsRulesetsGet Text+prgName = lens _prgName (\ s a -> s{_prgName = a})++-- | JSONP+prgCallback :: Lens' ProjectsRulesetsGet (Maybe Text)+prgCallback+ = lens _prgCallback (\ s a -> s{_prgCallback = a})++instance GoogleRequest ProjectsRulesetsGet where+ type Rs ProjectsRulesetsGet = Ruleset+ type Scopes ProjectsRulesetsGet =+ '["https://www.googleapis.com/auth/cloud-platform"]+ requestClient ProjectsRulesetsGet'{..}+ = go _prgName _prgXgafv _prgUploadProtocol+ (Just _prgPp)+ _prgAccessToken+ _prgUploadType+ _prgBearerToken+ _prgCallback+ (Just AltJSON)+ firebaseRulesService+ where go+ = buildClient+ (Proxy :: Proxy ProjectsRulesetsGetResource)+ mempty
+ gen/Network/Google/Resource/FirebaseRules/Projects/Rulesets/List.hs view
@@ -0,0 +1,202 @@+{-# 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.FirebaseRules.Projects.Rulesets.List+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- List \`Ruleset\` metadata only and optionally filter the results by+-- Ruleset name. The full \`Source\` contents of a \`Ruleset\` may be+-- retrieved with GetRuleset.+--+-- /See:/ <https://firebase.google.com/docs/storage/security/start Firebase Rules API Reference> for @firebaserules.projects.rulesets.list@.+module Network.Google.Resource.FirebaseRules.Projects.Rulesets.List+ (+ -- * REST Resource+ ProjectsRulesetsListResource++ -- * Creating a Request+ , projectsRulesetsList+ , ProjectsRulesetsList++ -- * Request Lenses+ , prlXgafv+ , prlUploadProtocol+ , prlPp+ , prlAccessToken+ , prlUploadType+ , prlBearerToken+ , prlName+ , prlPageToken+ , prlPageSize+ , prlCallback+ ) where++import Network.Google.FirebaseRules.Types+import Network.Google.Prelude++-- | A resource alias for @firebaserules.projects.rulesets.list@ method which the+-- 'ProjectsRulesetsList' request conforms to.+type ProjectsRulesetsListResource =+ "v1" :>+ Capture "name" Text :>+ "rulesets" :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "pp" Bool :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "bearer_token" Text :>+ QueryParam "pageToken" Text :>+ QueryParam "pageSize" (Textual Int32) :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] ListRulesetsResponse++-- | List \`Ruleset\` metadata only and optionally filter the results by+-- Ruleset name. The full \`Source\` contents of a \`Ruleset\` may be+-- retrieved with GetRuleset.+--+-- /See:/ 'projectsRulesetsList' smart constructor.+data ProjectsRulesetsList = ProjectsRulesetsList'+ { _prlXgafv :: !(Maybe Xgafv)+ , _prlUploadProtocol :: !(Maybe Text)+ , _prlPp :: !Bool+ , _prlAccessToken :: !(Maybe Text)+ , _prlUploadType :: !(Maybe Text)+ , _prlBearerToken :: !(Maybe Text)+ , _prlName :: !Text+ , _prlPageToken :: !(Maybe Text)+ , _prlPageSize :: !(Maybe (Textual Int32))+ , _prlCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ProjectsRulesetsList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'prlXgafv'+--+-- * 'prlUploadProtocol'+--+-- * 'prlPp'+--+-- * 'prlAccessToken'+--+-- * 'prlUploadType'+--+-- * 'prlBearerToken'+--+-- * 'prlName'+--+-- * 'prlPageToken'+--+-- * 'prlPageSize'+--+-- * 'prlCallback'+projectsRulesetsList+ :: Text -- ^ 'prlName'+ -> ProjectsRulesetsList+projectsRulesetsList pPrlName_ =+ ProjectsRulesetsList'+ { _prlXgafv = Nothing+ , _prlUploadProtocol = Nothing+ , _prlPp = True+ , _prlAccessToken = Nothing+ , _prlUploadType = Nothing+ , _prlBearerToken = Nothing+ , _prlName = pPrlName_+ , _prlPageToken = Nothing+ , _prlPageSize = Nothing+ , _prlCallback = Nothing+ }++-- | V1 error format.+prlXgafv :: Lens' ProjectsRulesetsList (Maybe Xgafv)+prlXgafv = lens _prlXgafv (\ s a -> s{_prlXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+prlUploadProtocol :: Lens' ProjectsRulesetsList (Maybe Text)+prlUploadProtocol+ = lens _prlUploadProtocol+ (\ s a -> s{_prlUploadProtocol = a})++-- | Pretty-print response.+prlPp :: Lens' ProjectsRulesetsList Bool+prlPp = lens _prlPp (\ s a -> s{_prlPp = a})++-- | OAuth access token.+prlAccessToken :: Lens' ProjectsRulesetsList (Maybe Text)+prlAccessToken+ = lens _prlAccessToken+ (\ s a -> s{_prlAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+prlUploadType :: Lens' ProjectsRulesetsList (Maybe Text)+prlUploadType+ = lens _prlUploadType+ (\ s a -> s{_prlUploadType = a})++-- | OAuth bearer token.+prlBearerToken :: Lens' ProjectsRulesetsList (Maybe Text)+prlBearerToken+ = lens _prlBearerToken+ (\ s a -> s{_prlBearerToken = a})++-- | Resource name for the project. Format: \`projects\/{project_id}\`+prlName :: Lens' ProjectsRulesetsList Text+prlName = lens _prlName (\ s a -> s{_prlName = a})++-- | Next page token for loading the next batch of \`Ruleset\` instances.+prlPageToken :: Lens' ProjectsRulesetsList (Maybe Text)+prlPageToken+ = lens _prlPageToken (\ s a -> s{_prlPageToken = a})++-- | Page size to load. Maximum of 100. Defaults to 10. Note: \`page_size\`+-- is just a hint and the service may choose to load less than+-- \`page_size\` due to the size of the output. To traverse all of the+-- releases, caller should iterate until the \`page_token\` is empty.+prlPageSize :: Lens' ProjectsRulesetsList (Maybe Int32)+prlPageSize+ = lens _prlPageSize (\ s a -> s{_prlPageSize = a}) .+ mapping _Coerce++-- | JSONP+prlCallback :: Lens' ProjectsRulesetsList (Maybe Text)+prlCallback+ = lens _prlCallback (\ s a -> s{_prlCallback = a})++instance GoogleRequest ProjectsRulesetsList where+ type Rs ProjectsRulesetsList = ListRulesetsResponse+ type Scopes ProjectsRulesetsList =+ '["https://www.googleapis.com/auth/cloud-platform"]+ requestClient ProjectsRulesetsList'{..}+ = go _prlName _prlXgafv _prlUploadProtocol+ (Just _prlPp)+ _prlAccessToken+ _prlUploadType+ _prlBearerToken+ _prlPageToken+ _prlPageSize+ _prlCallback+ (Just AltJSON)+ firebaseRulesService+ where go+ = buildClient+ (Proxy :: Proxy ProjectsRulesetsListResource)+ mempty
+ gen/Network/Google/Resource/FirebaseRules/Projects/Test.hs view
@@ -0,0 +1,205 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.FirebaseRules.Projects.Test+-- Copyright : (c) 2015-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Test \`Source\` for syntactic and semantic correctness. Issues present+-- in the rules, if any, will be returned to the caller with a description,+-- severity, and source location. The test method will typically be+-- executed with a developer provided \`Source\`, but if regression testing+-- is desired, this method may be executed against a \`Ruleset\` resource+-- name and the \`Source\` will be retrieved from the persisted+-- \`Ruleset\`. The following is an example of \`Source\` that permits+-- users to upload images to a bucket bearing their user id and matching+-- the correct metadata: _*Example*_ \/\/ Users are allowed to subscribe+-- and unsubscribe to the blog. service firebase.storage { match+-- \/users\/{userId}\/images\/{imageName} { allow write: if userId ==+-- request.userId && (imageName.endsWith(\'.png\') ||+-- imageName.endsWith(\'.jpg\')) &&+-- resource.mimeType.startsWith(\'image\/\') } }+--+-- /See:/ <https://firebase.google.com/docs/storage/security/start Firebase Rules API Reference> for @firebaserules.projects.test@.+module Network.Google.Resource.FirebaseRules.Projects.Test+ (+ -- * REST Resource+ ProjectsTestResource++ -- * Creating a Request+ , projectsTest+ , ProjectsTest++ -- * Request Lenses+ , ptXgafv+ , ptUploadProtocol+ , ptPp+ , ptAccessToken+ , ptUploadType+ , ptPayload+ , ptBearerToken+ , ptName+ , ptCallback+ ) where++import Network.Google.FirebaseRules.Types+import Network.Google.Prelude++-- | A resource alias for @firebaserules.projects.test@ method which the+-- 'ProjectsTest' request conforms to.+type ProjectsTestResource =+ "v1" :>+ CaptureMode "name" "test" Text :>+ QueryParam "$.xgafv" Xgafv :>+ QueryParam "upload_protocol" Text :>+ QueryParam "pp" Bool :>+ QueryParam "access_token" Text :>+ QueryParam "uploadType" Text :>+ QueryParam "bearer_token" Text :>+ QueryParam "callback" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] TestRulesetRequest :>+ Post '[JSON] TestRulesetResponse++-- | Test \`Source\` for syntactic and semantic correctness. Issues present+-- in the rules, if any, will be returned to the caller with a description,+-- severity, and source location. The test method will typically be+-- executed with a developer provided \`Source\`, but if regression testing+-- is desired, this method may be executed against a \`Ruleset\` resource+-- name and the \`Source\` will be retrieved from the persisted+-- \`Ruleset\`. The following is an example of \`Source\` that permits+-- users to upload images to a bucket bearing their user id and matching+-- the correct metadata: _*Example*_ \/\/ Users are allowed to subscribe+-- and unsubscribe to the blog. service firebase.storage { match+-- \/users\/{userId}\/images\/{imageName} { allow write: if userId ==+-- request.userId && (imageName.endsWith(\'.png\') ||+-- imageName.endsWith(\'.jpg\')) &&+-- resource.mimeType.startsWith(\'image\/\') } }+--+-- /See:/ 'projectsTest' smart constructor.+data ProjectsTest = ProjectsTest'+ { _ptXgafv :: !(Maybe Xgafv)+ , _ptUploadProtocol :: !(Maybe Text)+ , _ptPp :: !Bool+ , _ptAccessToken :: !(Maybe Text)+ , _ptUploadType :: !(Maybe Text)+ , _ptPayload :: !TestRulesetRequest+ , _ptBearerToken :: !(Maybe Text)+ , _ptName :: !Text+ , _ptCallback :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ProjectsTest' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ptXgafv'+--+-- * 'ptUploadProtocol'+--+-- * 'ptPp'+--+-- * 'ptAccessToken'+--+-- * 'ptUploadType'+--+-- * 'ptPayload'+--+-- * 'ptBearerToken'+--+-- * 'ptName'+--+-- * 'ptCallback'+projectsTest+ :: TestRulesetRequest -- ^ 'ptPayload'+ -> Text -- ^ 'ptName'+ -> ProjectsTest+projectsTest pPtPayload_ pPtName_ =+ ProjectsTest'+ { _ptXgafv = Nothing+ , _ptUploadProtocol = Nothing+ , _ptPp = True+ , _ptAccessToken = Nothing+ , _ptUploadType = Nothing+ , _ptPayload = pPtPayload_+ , _ptBearerToken = Nothing+ , _ptName = pPtName_+ , _ptCallback = Nothing+ }++-- | V1 error format.+ptXgafv :: Lens' ProjectsTest (Maybe Xgafv)+ptXgafv = lens _ptXgafv (\ s a -> s{_ptXgafv = a})++-- | Upload protocol for media (e.g. \"raw\", \"multipart\").+ptUploadProtocol :: Lens' ProjectsTest (Maybe Text)+ptUploadProtocol+ = lens _ptUploadProtocol+ (\ s a -> s{_ptUploadProtocol = a})++-- | Pretty-print response.+ptPp :: Lens' ProjectsTest Bool+ptPp = lens _ptPp (\ s a -> s{_ptPp = a})++-- | OAuth access token.+ptAccessToken :: Lens' ProjectsTest (Maybe Text)+ptAccessToken+ = lens _ptAccessToken+ (\ s a -> s{_ptAccessToken = a})++-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+ptUploadType :: Lens' ProjectsTest (Maybe Text)+ptUploadType+ = lens _ptUploadType (\ s a -> s{_ptUploadType = a})++-- | Multipart request metadata.+ptPayload :: Lens' ProjectsTest TestRulesetRequest+ptPayload+ = lens _ptPayload (\ s a -> s{_ptPayload = a})++-- | OAuth bearer token.+ptBearerToken :: Lens' ProjectsTest (Maybe Text)+ptBearerToken+ = lens _ptBearerToken+ (\ s a -> s{_ptBearerToken = a})++-- | Name of the project. Format: \`projects\/{project_id}\`+ptName :: Lens' ProjectsTest Text+ptName = lens _ptName (\ s a -> s{_ptName = a})++-- | JSONP+ptCallback :: Lens' ProjectsTest (Maybe Text)+ptCallback+ = lens _ptCallback (\ s a -> s{_ptCallback = a})++instance GoogleRequest ProjectsTest where+ type Rs ProjectsTest = TestRulesetResponse+ type Scopes ProjectsTest =+ '["https://www.googleapis.com/auth/cloud-platform"]+ requestClient ProjectsTest'{..}+ = go _ptName _ptXgafv _ptUploadProtocol (Just _ptPp)+ _ptAccessToken+ _ptUploadType+ _ptBearerToken+ _ptCallback+ (Just AltJSON)+ _ptPayload+ firebaseRulesService+ where go+ = buildClient (Proxy :: Proxy ProjectsTestResource)+ mempty
+ gogol-firebase-rules.cabal view
@@ -0,0 +1,56 @@+name: gogol-firebase-rules+version: 0.1.0+synopsis: Google Firebase Rules SDK.+homepage: https://github.com/brendanhay/gogol+bug-reports: https://github.com/brendanhay/gogol/issues+license: OtherLicense+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay@gmail.com>+copyright: Copyright (c) 2015-2016 Brendan Hay+category: Network, Google, Cloud+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md++description:+ Creates and manages rules that determine when a Firebase Rules-enabled+ service should permit a request.+ .+ /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.++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.FirebaseRules+ , Network.Google.FirebaseRules.Types+ , Network.Google.Resource.FirebaseRules.Projects.Releases.Create+ , Network.Google.Resource.FirebaseRules.Projects.Releases.Delete+ , Network.Google.Resource.FirebaseRules.Projects.Releases.Get+ , Network.Google.Resource.FirebaseRules.Projects.Releases.List+ , Network.Google.Resource.FirebaseRules.Projects.Releases.Update+ , Network.Google.Resource.FirebaseRules.Projects.Rulesets.Create+ , Network.Google.Resource.FirebaseRules.Projects.Rulesets.Delete+ , Network.Google.Resource.FirebaseRules.Projects.Rulesets.Get+ , Network.Google.Resource.FirebaseRules.Projects.Rulesets.List+ , Network.Google.Resource.FirebaseRules.Projects.Test++ other-modules:+ Network.Google.FirebaseRules.Types.Product+ , Network.Google.FirebaseRules.Types.Sum++ build-depends:+ gogol-core == 0.1.0.*+ , base >= 4.7 && < 5