on develop help sign in
Regenerating gogol-runtimeconfig
commit015a67441c216a642a52134b109c5a3c662989fe authorBrendan Hay <brendan.g.hay@gmail.com> dateFri 28 Oct 2016, 08:23 (10 years ago) parentc495d82
13 files changed+1690
gogol-runtimeconfig/LICENSE+367 gogol-runtimeconfig/Makefile+1 gogol-runtimeconfig/README.md+28 gogol-runtimeconfig/Setup.hs+2 gogol-runtimeconfig/gen/Network/Google/Resource/RuntimeConfig/Operations/Cancel.hs+197 gogol-runtimeconfig/gen/Network/Google/Resource/RuntimeConfig/Operations/Delete.hs+173 gogol-runtimeconfig/gen/Network/Google/Resource/RuntimeConfig/Operations/List.hs+211 gogol-runtimeconfig/gen/Network/Google/RuntimeConfig.hs+107 gogol-runtimeconfig/gen/Network/Google/RuntimeConfig/Types.hs+91 gogol-runtimeconfig/gen/Network/Google/RuntimeConfig/Types/Product.hs+416 gogol-runtimeconfig/gen/Network/Google/RuntimeConfig/Types/Sum.hs+48 gogol-runtimeconfig/gogol-runtimeconfig.cabal+49 gogol-runtimeconfig/src/.gitkeep
gogol-runtimeconfig/LICENSEnew file+367
@@ -0,0 +1,367 @@
1+Mozilla Public License Version 2.0
2+==================================
3+
4+1. Definitions
5+--------------
6+
7+1.1. "Contributor"
8+ means each individual or legal entity that creates, contributes to
9+ the creation of, or owns Covered Software.
10+
11+1.2. "Contributor Version"
12+ means the combination of the Contributions of others (if any) used
13+ by a Contributor and that particular Contributor's Contribution.
14+
15+1.3. "Contribution"
16+ means Covered Software of a particular Contributor.
17+
18+1.4. "Covered Software"
19+ means Source Code Form to which the initial Contributor has attached
20+ the notice in Exhibit A, the Executable Form of such Source Code
21+ Form, and Modifications of such Source Code Form, in each case
22+ including portions thereof.
23+
24+1.5. "Incompatible With Secondary Licenses"
25+ means
26+
27+ (a) that the initial Contributor has attached the notice described
28+ in Exhibit B to the Covered Software; or
29+
30+ (b) that the Covered Software was made available under the terms of
31+ version 1.1 or earlier of the License, but not also under the
32+ terms of a Secondary License.
33+
34+1.6. "Executable Form"
35+ means any form of the work other than Source Code Form.
36+
37+1.7. "Larger Work"
38+ means a work that combines Covered Software with other material, in
39+ a separate file or files, that is not Covered Software.
40+
41+1.8. "License"
42+ means this document.
43+
44+1.9. "Licensable"
45+ means having the right to grant, to the maximum extent possible,
46+ whether at the time of the initial grant or subsequently, any and
47+ all of the rights conveyed by this License.
48+
49+1.10. "Modifications"
50+ means any of the following:
51+
52+ (a) any file in Source Code Form that results from an addition to,
53+ deletion from, or modification of the contents of Covered
54+ Software; or
55+
56+ (b) any new file in Source Code Form that contains any Covered
57+ Software.
58+
59+1.11. "Patent Claims" of a Contributor
60+ means any patent claim(s), including without limitation, method,
61+ process, and apparatus claims, in any patent Licensable by such
62+ Contributor that would be infringed, but for the grant of the
63+ License, by the making, using, selling, offering for sale, having
64+ made, import, or transfer of either its Contributions or its
65+ Contributor Version.
66+
67+1.12. "Secondary License"
68+ means either the GNU General Public License, Version 2.0, the GNU
69+ Lesser General Public License, Version 2.1, the GNU Affero General
70+ Public License, Version 3.0, or any later versions of those
71+ licenses.
72+
73+1.13. "Source Code Form"
74+ means the form of the work preferred for making modifications.
75+
76+1.14. "You" (or "Your")
77+ means an individual or a legal entity exercising rights under this
78+ License. For legal entities, "You" includes any entity that
79+ controls, is controlled by, or is under common control with You. For
80+ purposes of this definition, "control" means (a) the power, direct
81+ or indirect, to cause the direction or management of such entity,
82+ whether by contract or otherwise, or (b) ownership of more than
83+ fifty percent (50%) of the outstanding shares or beneficial
84+ ownership of such entity.
85+
86+2. License Grants and Conditions
87+--------------------------------
88+
89+2.1. Grants
90+
91+Each Contributor hereby grants You a world-wide, royalty-free,
92+non-exclusive license:
93+
94+(a) under intellectual property rights (other than patent or trademark)
95+ Licensable by such Contributor to use, reproduce, make available,
96+ modify, display, perform, distribute, and otherwise exploit its
97+ Contributions, either on an unmodified basis, with Modifications, or
98+ as part of a Larger Work; and
99+
100+(b) under Patent Claims of such Contributor to make, use, sell, offer
101+ for sale, have made, import, and otherwise transfer either its
102+ Contributions or its Contributor Version.
103+
104+2.2. Effective Date
105+
106+The licenses granted in Section 2.1 with respect to any Contribution
107+become effective for each Contribution on the date the Contributor first
108+distributes such Contribution.
109+
110+2.3. Limitations on Grant Scope
111+
112+The licenses granted in this Section 2 are the only rights granted under
113+this License. No additional rights or licenses will be implied from the
114+distribution or licensing of Covered Software under this License.
115+Notwithstanding Section 2.1(b) above, no patent license is granted by a
116+Contributor:
117+
118+(a) for any code that a Contributor has removed from Covered Software;
119+ or
120+
121+(b) for infringements caused by: (i) Your and any other third party's
122+ modifications of Covered Software, or (ii) the combination of its
123+ Contributions with other software (except as part of its Contributor
124+ Version); or
125+
126+(c) under Patent Claims infringed by Covered Software in the absence of
127+ its Contributions.
128+
129+This License does not grant any rights in the trademarks, service marks,
130+or logos of any Contributor (except as may be necessary to comply with
131+the notice requirements in Section 3.4).
132+
133+2.4. Subsequent Licenses
134+
135+No Contributor makes additional grants as a result of Your choice to
136+distribute the Covered Software under a subsequent version of this
137+License (see Section 10.2) or under the terms of a Secondary License (if
138+permitted under the terms of Section 3.3).
139+
140+2.5. Representation
141+
142+Each Contributor represents that the Contributor believes its
143+Contributions are its original creation(s) or it has sufficient rights
144+to grant the rights to its Contributions conveyed by this License.
145+
146+2.6. Fair Use
147+
148+This License is not intended to limit any rights You have under
149+applicable copyright doctrines of fair use, fair dealing, or other
150+equivalents.
151+
152+2.7. Conditions
153+
154+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
155+in Section 2.1.
156+
157+3. Responsibilities
158+-------------------
159+
160+3.1. Distribution of Source Form
161+
162+All distribution of Covered Software in Source Code Form, including any
163+Modifications that You create or to which You contribute, must be under
164+the terms of this License. You must inform recipients that the Source
165+Code Form of the Covered Software is governed by the terms of this
166+License, and how they can obtain a copy of this License. You may not
167+attempt to alter or restrict the recipients' rights in the Source Code
168+Form.
169+
170+3.2. Distribution of Executable Form
171+
172+If You distribute Covered Software in Executable Form then:
173+
174+(a) such Covered Software must also be made available in Source Code
175+ Form, as described in Section 3.1, and You must inform recipients of
176+ the Executable Form how they can obtain a copy of such Source Code
177+ Form by reasonable means in a timely manner, at a charge no more
178+ than the cost of distribution to the recipient; and
179+
180+(b) You may distribute such Executable Form under the terms of this
181+ License, or sublicense it under different terms, provided that the
182+ license for the Executable Form does not attempt to limit or alter
183+ the recipients' rights in the Source Code Form under this License.
184+
185+3.3. Distribution of a Larger Work
186+
187+You may create and distribute a Larger Work under terms of Your choice,
188+provided that You also comply with the requirements of this License for
189+the Covered Software. If the Larger Work is a combination of Covered
190+Software with a work governed by one or more Secondary Licenses, and the
191+Covered Software is not Incompatible With Secondary Licenses, this
192+License permits You to additionally distribute such Covered Software
193+under the terms of such Secondary License(s), so that the recipient of
194+the Larger Work may, at their option, further distribute the Covered
195+Software under the terms of either this License or such Secondary
196+License(s).
197+
198+3.4. Notices
199+
200+You may not remove or alter the substance of any license notices
201+(including copyright notices, patent notices, disclaimers of warranty,
202+or limitations of liability) contained within the Source Code Form of
203+the Covered Software, except that You may alter any license notices to
204+the extent required to remedy known factual inaccuracies.
205+
206+3.5. Application of Additional Terms
207+
208+You may choose to offer, and to charge a fee for, warranty, support,
209+indemnity or liability obligations to one or more recipients of Covered
210+Software. However, You may do so only on Your own behalf, and not on
211+behalf of any Contributor. You must make it absolutely clear that any
212+such warranty, support, indemnity, or liability obligation is offered by
213+You alone, and You hereby agree to indemnify every Contributor for any
214+liability incurred by such Contributor as a result of warranty, support,
215+indemnity or liability terms You offer. You may include additional
216+disclaimers of warranty and limitations of liability specific to any
217+jurisdiction.
218+
219+4. Inability to Comply Due to Statute or Regulation
220+---------------------------------------------------
221+
222+If it is impossible for You to comply with any of the terms of this
223+License with respect to some or all of the Covered Software due to
224+statute, judicial order, or regulation then You must: (a) comply with
225+the terms of this License to the maximum extent possible; and (b)
226+describe the limitations and the code they affect. Such description must
227+be placed in a text file included with all distributions of the Covered
228+Software under this License. Except to the extent prohibited by statute
229+or regulation, such description must be sufficiently detailed for a
230+recipient of ordinary skill to be able to understand it.
231+
232+5. Termination
233+--------------
234+
235+5.1. The rights granted under this License will terminate automatically
236+if You fail to comply with any of its terms. However, if You become
237+compliant, then the rights granted under this License from a particular
238+Contributor are reinstated (a) provisionally, unless and until such
239+Contributor explicitly and finally terminates Your grants, and (b) on an
240+ongoing basis, if such Contributor fails to notify You of the
241+non-compliance by some reasonable means prior to 60 days after You have
242+come back into compliance. Moreover, Your grants from a particular
243+Contributor are reinstated on an ongoing basis if such Contributor
244+notifies You of the non-compliance by some reasonable means, this is the
245+first time You have received notice of non-compliance with this License
246+from such Contributor, and You become compliant prior to 30 days after
247+Your receipt of the notice.
248+
249+5.2. If You initiate litigation against any entity by asserting a patent
250+infringement claim (excluding declaratory judgment actions,
251+counter-claims, and cross-claims) alleging that a Contributor Version
252+directly or indirectly infringes any patent, then the rights granted to
253+You by any and all Contributors for the Covered Software under Section
254+2.1 of this License shall terminate.
255+
256+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
257+end user license agreements (excluding distributors and resellers) which
258+have been validly granted by You or Your distributors under this License
259+prior to termination shall survive termination.
260+
261+************************************************************************
262+* *
263+* 6. Disclaimer of Warranty *
264+* ------------------------- *
265+* *
266+* Covered Software is provided under this License on an "as is" *
267+* basis, without warranty of any kind, either expressed, implied, or *
268+* statutory, including, without limitation, warranties that the *
269+* Covered Software is free of defects, merchantable, fit for a *
270+* particular purpose or non-infringing. The entire risk as to the *
271+* quality and performance of the Covered Software is with You. *
272+* Should any Covered Software prove defective in any respect, You *
273+* (not any Contributor) assume the cost of any necessary servicing, *
274+* repair, or correction. This disclaimer of warranty constitutes an *
275+* essential part of this License. No use of any Covered Software is *
276+* authorized under this License except under this disclaimer. *
277+* *
278+************************************************************************
279+
280+************************************************************************
281+* *
282+* 7. Limitation of Liability *
283+* -------------------------- *
284+* *
285+* Under no circumstances and under no legal theory, whether tort *
286+* (including negligence), contract, or otherwise, shall any *
287+* Contributor, or anyone who distributes Covered Software as *
288+* permitted above, be liable to You for any direct, indirect, *
289+* special, incidental, or consequential damages of any character *
290+* including, without limitation, damages for lost profits, loss of *
291+* goodwill, work stoppage, computer failure or malfunction, or any *
292+* and all other commercial damages or losses, even if such party *
293+* shall have been informed of the possibility of such damages. This *
294+* limitation of liability shall not apply to liability for death or *
295+* personal injury resulting from such party's negligence to the *
296+* extent applicable law prohibits such limitation. Some *
297+* jurisdictions do not allow the exclusion or limitation of *
298+* incidental or consequential damages, so this exclusion and *
299+* limitation may not apply to You. *
300+* *
301+************************************************************************
302+
303+8. Litigation
304+-------------
305+
306+Any litigation relating to this License may be brought only in the
307+courts of a jurisdiction where the defendant maintains its principal
308+place of business and such litigation shall be governed by laws of that
309+jurisdiction, without reference to its conflict-of-law provisions.
310+Nothing in this Section shall prevent a party's ability to bring
311+cross-claims or counter-claims.
312+
313+9. Miscellaneous
314+----------------
315+
316+This License represents the complete agreement concerning the subject
317+matter hereof. If any provision of this License is held to be
318+unenforceable, such provision shall be reformed only to the extent
319+necessary to make it enforceable. Any law or regulation which provides
320+that the language of a contract shall be construed against the drafter
321+shall not be used to construe this License against a Contributor.
322+
323+10. Versions of the License
324+---------------------------
325+
326+10.1. New Versions
327+
328+Mozilla Foundation is the license steward. Except as provided in Section
329+10.3, no one other than the license steward has the right to modify or
330+publish new versions of this License. Each version will be given a
331+distinguishing version number.
332+
333+10.2. Effect of New Versions
334+
335+You may distribute the Covered Software under the terms of the version
336+of the License under which You originally received the Covered Software,
337+or under the terms of any subsequent version published by the license
338+steward.
339+
340+10.3. Modified Versions
341+
342+If you create software not governed by this License, and you want to
343+create a new license for such software, you may create and use a
344+modified version of this License if you rename the license and remove
345+any references to the name of the license steward (except to note that
346+such modified license differs from this License).
347+
348+10.4. Distributing Source Code Form that is Incompatible With Secondary
349+Licenses
350+
351+If You choose to distribute Source Code Form that is Incompatible With
352+Secondary Licenses under the terms of this version of the License, the
353+notice described in Exhibit B of this License must be attached.
354+
355+Exhibit A - Source Code Form License Notice
356+-------------------------------------------
357+
358+ This Source Code Form is subject to the terms of the Mozilla Public
359+ License, v. 2.0. If a copy of the MPL was not distributed with this
360+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
361+
362+If it is not possible or desirable to put the notice in a particular
363+file, then You may include the notice in a location (such as a LICENSE
364+file in a relevant directory) where a recipient would be likely to look
365+for such a notice.
366+
367+You may add additional accurate notices of copyright ownership.
gogol-runtimeconfig/Makefilenew file+1
@@ -0,0 +1 @@
1+include ../share/library.mk
gogol-runtimeconfig/README.mdnew file+28
@@ -0,0 +1,28 @@
1+# gogol-runtimeconfig
2+
3+* [Version](#version)
4+* [Description](#description)
5+* [Contribute](#contribute)
6+* [Licence](#licence)
7+
8+
9+## Version
10+
11+`0.1.0`
12+
13+
14+## Description
15+
16+A client library for the Google Cloud RuntimeConfig.
17+
18+
19+## Contribute
20+
21+For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/gogol/issues).
22+
23+> _Note:_ this library is an auto-generated Haskell package. Please see `gogol-gen` for more information.
24+
25+
26+## Licence
27+
28+`gogol-runtimeconfig` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
gogol-runtimeconfig/Setup.hsnew file+2
@@ -0,0 +1,2 @@
1+import Distribution.Simple
2+main = defaultMain
gogol-runtimeconfig/gen/Network/Google/Resource/RuntimeConfig/Operations/Cancel.hsnew file+197
@@ -0,0 +1,197 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.RuntimeConfig.Operations.Cancel
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Starts asynchronous cancellation on a long-running operation. The server
24+-- makes a best effort to cancel the operation, but success is not
25+-- guaranteed. If the server doesn\'t support this method, it returns
26+-- \`google.rpc.Code.UNIMPLEMENTED\`. Clients can use
27+-- Operations.GetOperation or other methods to check whether the
28+-- cancellation succeeded or whether the operation completed despite
29+-- cancellation. On successful cancellation, the operation is not deleted;
30+-- instead, it becomes an operation with an Operation.error value with a
31+-- google.rpc.Status.code of 1, corresponding to \`Code.CANCELLED\`.
32+--
33+-- /See:/ <https://cloud.google.com/deployment-manager/runtime-configurator/ Google Cloud RuntimeConfig API Reference> for @runtimeconfig.operations.cancel@.
34+module Network.Google.Resource.RuntimeConfig.Operations.Cancel
35+ (
36+ -- * REST Resource
37+ OperationsCancelResource
38+
39+ -- * Creating a Request
40+ , operationsCancel
41+ , OperationsCancel
42+
43+ -- * Request Lenses
44+ , ocXgafv
45+ , ocUploadProtocol
46+ , ocPp
47+ , ocAccessToken
48+ , ocUploadType
49+ , ocPayload
50+ , ocBearerToken
51+ , ocName
52+ , ocCallback
53+ ) where
54+
55+import Network.Google.Prelude
56+import Network.Google.RuntimeConfig.Types
57+
58+-- | A resource alias for @runtimeconfig.operations.cancel@ method which the
59+-- 'OperationsCancel' request conforms to.
60+type OperationsCancelResource =
61+ "v1" :>
62+ CaptureMode "name" "cancel" Text :>
63+ QueryParam "$.xgafv" Xgafv :>
64+ QueryParam "upload_protocol" Text :>
65+ QueryParam "pp" Bool :>
66+ QueryParam "access_token" Text :>
67+ QueryParam "uploadType" Text :>
68+ QueryParam "bearer_token" Text :>
69+ QueryParam "callback" Text :>
70+ QueryParam "alt" AltJSON :>
71+ ReqBody '[JSON] CancelOperationRequest :>
72+ Post '[JSON] Empty
73+
74+-- | Starts asynchronous cancellation on a long-running operation. The server
75+-- makes a best effort to cancel the operation, but success is not
76+-- guaranteed. If the server doesn\'t support this method, it returns
77+-- \`google.rpc.Code.UNIMPLEMENTED\`. Clients can use
78+-- Operations.GetOperation or other methods to check whether the
79+-- cancellation succeeded or whether the operation completed despite
80+-- cancellation. On successful cancellation, the operation is not deleted;
81+-- instead, it becomes an operation with an Operation.error value with a
82+-- google.rpc.Status.code of 1, corresponding to \`Code.CANCELLED\`.
83+--
84+-- /See:/ 'operationsCancel' smart constructor.
85+data OperationsCancel = OperationsCancel'
86+ { _ocXgafv :: !(Maybe Xgafv)
87+ , _ocUploadProtocol :: !(Maybe Text)
88+ , _ocPp :: !Bool
89+ , _ocAccessToken :: !(Maybe Text)
90+ , _ocUploadType :: !(Maybe Text)
91+ , _ocPayload :: !CancelOperationRequest
92+ , _ocBearerToken :: !(Maybe Text)
93+ , _ocName :: !Text
94+ , _ocCallback :: !(Maybe Text)
95+ } deriving (Eq,Show,Data,Typeable,Generic)
96+
97+-- | Creates a value of 'OperationsCancel' with the minimum fields required to make a request.
98+--
99+-- Use one of the following lenses to modify other fields as desired:
100+--
101+-- * 'ocXgafv'
102+--
103+-- * 'ocUploadProtocol'
104+--
105+-- * 'ocPp'
106+--
107+-- * 'ocAccessToken'
108+--
109+-- * 'ocUploadType'
110+--
111+-- * 'ocPayload'
112+--
113+-- * 'ocBearerToken'
114+--
115+-- * 'ocName'
116+--
117+-- * 'ocCallback'
118+operationsCancel
119+ :: CancelOperationRequest -- ^ 'ocPayload'
120+ -> Text -- ^ 'ocName'
121+ -> OperationsCancel
122+operationsCancel pOcPayload_ pOcName_ =
123+ OperationsCancel'
124+ { _ocXgafv = Nothing
125+ , _ocUploadProtocol = Nothing
126+ , _ocPp = True
127+ , _ocAccessToken = Nothing
128+ , _ocUploadType = Nothing
129+ , _ocPayload = pOcPayload_
130+ , _ocBearerToken = Nothing
131+ , _ocName = pOcName_
132+ , _ocCallback = Nothing
133+ }
134+
135+-- | V1 error format.
136+ocXgafv :: Lens' OperationsCancel (Maybe Xgafv)
137+ocXgafv = lens _ocXgafv (\ s a -> s{_ocXgafv = a})
138+
139+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
140+ocUploadProtocol :: Lens' OperationsCancel (Maybe Text)
141+ocUploadProtocol
142+ = lens _ocUploadProtocol
143+ (\ s a -> s{_ocUploadProtocol = a})
144+
145+-- | Pretty-print response.
146+ocPp :: Lens' OperationsCancel Bool
147+ocPp = lens _ocPp (\ s a -> s{_ocPp = a})
148+
149+-- | OAuth access token.
150+ocAccessToken :: Lens' OperationsCancel (Maybe Text)
151+ocAccessToken
152+ = lens _ocAccessToken
153+ (\ s a -> s{_ocAccessToken = a})
154+
155+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
156+ocUploadType :: Lens' OperationsCancel (Maybe Text)
157+ocUploadType
158+ = lens _ocUploadType (\ s a -> s{_ocUploadType = a})
159+
160+-- | Multipart request metadata.
161+ocPayload :: Lens' OperationsCancel CancelOperationRequest
162+ocPayload
163+ = lens _ocPayload (\ s a -> s{_ocPayload = a})
164+
165+-- | OAuth bearer token.
166+ocBearerToken :: Lens' OperationsCancel (Maybe Text)
167+ocBearerToken
168+ = lens _ocBearerToken
169+ (\ s a -> s{_ocBearerToken = a})
170+
171+-- | The name of the operation resource to be cancelled.
172+ocName :: Lens' OperationsCancel Text
173+ocName = lens _ocName (\ s a -> s{_ocName = a})
174+
175+-- | JSONP
176+ocCallback :: Lens' OperationsCancel (Maybe Text)
177+ocCallback
178+ = lens _ocCallback (\ s a -> s{_ocCallback = a})
179+
180+instance GoogleRequest OperationsCancel where
181+ type Rs OperationsCancel = Empty
182+ type Scopes OperationsCancel =
183+ '["https://www.googleapis.com/auth/cloud-platform",
184+ "https://www.googleapis.com/auth/cloudruntimeconfig"]
185+ requestClient OperationsCancel'{..}
186+ = go _ocName _ocXgafv _ocUploadProtocol (Just _ocPp)
187+ _ocAccessToken
188+ _ocUploadType
189+ _ocBearerToken
190+ _ocCallback
191+ (Just AltJSON)
192+ _ocPayload
193+ runtimeConfigService
194+ where go
195+ = buildClient
196+ (Proxy :: Proxy OperationsCancelResource)
197+ mempty
gogol-runtimeconfig/gen/Network/Google/Resource/RuntimeConfig/Operations/Delete.hsnew file+173
@@ -0,0 +1,173 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.RuntimeConfig.Operations.Delete
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Deletes a long-running operation. This method indicates that the client
24+-- is no longer interested in the operation result. It does not cancel the
25+-- operation. If the server doesn\'t support this method, it returns
26+-- \`google.rpc.Code.UNIMPLEMENTED\`.
27+--
28+-- /See:/ <https://cloud.google.com/deployment-manager/runtime-configurator/ Google Cloud RuntimeConfig API Reference> for @runtimeconfig.operations.delete@.
29+module Network.Google.Resource.RuntimeConfig.Operations.Delete
30+ (
31+ -- * REST Resource
32+ OperationsDeleteResource
33+
34+ -- * Creating a Request
35+ , operationsDelete
36+ , OperationsDelete
37+
38+ -- * Request Lenses
39+ , odXgafv
40+ , odUploadProtocol
41+ , odPp
42+ , odAccessToken
43+ , odUploadType
44+ , odBearerToken
45+ , odName
46+ , odCallback
47+ ) where
48+
49+import Network.Google.Prelude
50+import Network.Google.RuntimeConfig.Types
51+
52+-- | A resource alias for @runtimeconfig.operations.delete@ method which the
53+-- 'OperationsDelete' request conforms to.
54+type OperationsDeleteResource =
55+ "v1" :>
56+ Capture "name" Text :>
57+ QueryParam "$.xgafv" Xgafv :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :> Delete '[JSON] Empty
65+
66+-- | Deletes a long-running operation. This method indicates that the client
67+-- is no longer interested in the operation result. It does not cancel the
68+-- operation. If the server doesn\'t support this method, it returns
69+-- \`google.rpc.Code.UNIMPLEMENTED\`.
70+--
71+-- /See:/ 'operationsDelete' smart constructor.
72+data OperationsDelete = OperationsDelete'
73+ { _odXgafv :: !(Maybe Xgafv)
74+ , _odUploadProtocol :: !(Maybe Text)
75+ , _odPp :: !Bool
76+ , _odAccessToken :: !(Maybe Text)
77+ , _odUploadType :: !(Maybe Text)
78+ , _odBearerToken :: !(Maybe Text)
79+ , _odName :: !Text
80+ , _odCallback :: !(Maybe Text)
81+ } deriving (Eq,Show,Data,Typeable,Generic)
82+
83+-- | Creates a value of 'OperationsDelete' with the minimum fields required to make a request.
84+--
85+-- Use one of the following lenses to modify other fields as desired:
86+--
87+-- * 'odXgafv'
88+--
89+-- * 'odUploadProtocol'
90+--
91+-- * 'odPp'
92+--
93+-- * 'odAccessToken'
94+--
95+-- * 'odUploadType'
96+--
97+-- * 'odBearerToken'
98+--
99+-- * 'odName'
100+--
101+-- * 'odCallback'
102+operationsDelete
103+ :: Text -- ^ 'odName'
104+ -> OperationsDelete
105+operationsDelete pOdName_ =
106+ OperationsDelete'
107+ { _odXgafv = Nothing
108+ , _odUploadProtocol = Nothing
109+ , _odPp = True
110+ , _odAccessToken = Nothing
111+ , _odUploadType = Nothing
112+ , _odBearerToken = Nothing
113+ , _odName = pOdName_
114+ , _odCallback = Nothing
115+ }
116+
117+-- | V1 error format.
118+odXgafv :: Lens' OperationsDelete (Maybe Xgafv)
119+odXgafv = lens _odXgafv (\ s a -> s{_odXgafv = a})
120+
121+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
122+odUploadProtocol :: Lens' OperationsDelete (Maybe Text)
123+odUploadProtocol
124+ = lens _odUploadProtocol
125+ (\ s a -> s{_odUploadProtocol = a})
126+
127+-- | Pretty-print response.
128+odPp :: Lens' OperationsDelete Bool
129+odPp = lens _odPp (\ s a -> s{_odPp = a})
130+
131+-- | OAuth access token.
132+odAccessToken :: Lens' OperationsDelete (Maybe Text)
133+odAccessToken
134+ = lens _odAccessToken
135+ (\ s a -> s{_odAccessToken = a})
136+
137+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
138+odUploadType :: Lens' OperationsDelete (Maybe Text)
139+odUploadType
140+ = lens _odUploadType (\ s a -> s{_odUploadType = a})
141+
142+-- | OAuth bearer token.
143+odBearerToken :: Lens' OperationsDelete (Maybe Text)
144+odBearerToken
145+ = lens _odBearerToken
146+ (\ s a -> s{_odBearerToken = a})
147+
148+-- | The name of the operation resource to be deleted.
149+odName :: Lens' OperationsDelete Text
150+odName = lens _odName (\ s a -> s{_odName = a})
151+
152+-- | JSONP
153+odCallback :: Lens' OperationsDelete (Maybe Text)
154+odCallback
155+ = lens _odCallback (\ s a -> s{_odCallback = a})
156+
157+instance GoogleRequest OperationsDelete where
158+ type Rs OperationsDelete = Empty
159+ type Scopes OperationsDelete =
160+ '["https://www.googleapis.com/auth/cloud-platform",
161+ "https://www.googleapis.com/auth/cloudruntimeconfig"]
162+ requestClient OperationsDelete'{..}
163+ = go _odName _odXgafv _odUploadProtocol (Just _odPp)
164+ _odAccessToken
165+ _odUploadType
166+ _odBearerToken
167+ _odCallback
168+ (Just AltJSON)
169+ runtimeConfigService
170+ where go
171+ = buildClient
172+ (Proxy :: Proxy OperationsDeleteResource)
173+ mempty
gogol-runtimeconfig/gen/Network/Google/Resource/RuntimeConfig/Operations/List.hsnew file+211
@@ -0,0 +1,211 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.RuntimeConfig.Operations.List
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Lists operations that match the specified filter in the request. If the
24+-- server doesn\'t support this method, it returns \`UNIMPLEMENTED\`. NOTE:
25+-- the \`name\` binding below allows API services to override the binding
26+-- to use different resource name schemes, such as
27+-- \`users\/*\/operations\`.
28+--
29+-- /See:/ <https://cloud.google.com/deployment-manager/runtime-configurator/ Google Cloud RuntimeConfig API Reference> for @runtimeconfig.operations.list@.
30+module Network.Google.Resource.RuntimeConfig.Operations.List
31+ (
32+ -- * REST Resource
33+ OperationsListResource
34+
35+ -- * Creating a Request
36+ , operationsList
37+ , OperationsList
38+
39+ -- * Request Lenses
40+ , olXgafv
41+ , olUploadProtocol
42+ , olPp
43+ , olAccessToken
44+ , olUploadType
45+ , olBearerToken
46+ , olName
47+ , olFilter
48+ , olPageToken
49+ , olPageSize
50+ , olCallback
51+ ) where
52+
53+import Network.Google.Prelude
54+import Network.Google.RuntimeConfig.Types
55+
56+-- | A resource alias for @runtimeconfig.operations.list@ method which the
57+-- 'OperationsList' request conforms to.
58+type OperationsListResource =
59+ "v1" :>
60+ Capture "name" Text :>
61+ QueryParam "$.xgafv" Xgafv :>
62+ QueryParam "upload_protocol" Text :>
63+ QueryParam "pp" Bool :>
64+ QueryParam "access_token" Text :>
65+ QueryParam "uploadType" Text :>
66+ QueryParam "bearer_token" Text :>
67+ QueryParam "filter" Text :>
68+ QueryParam "pageToken" Text :>
69+ QueryParam "pageSize" (Textual Int32) :>
70+ QueryParam "callback" Text :>
71+ QueryParam "alt" AltJSON :>
72+ Get '[JSON] ListOperationsResponse
73+
74+-- | Lists operations that match the specified filter in the request. If the
75+-- server doesn\'t support this method, it returns \`UNIMPLEMENTED\`. NOTE:
76+-- the \`name\` binding below allows API services to override the binding
77+-- to use different resource name schemes, such as
78+-- \`users\/*\/operations\`.
79+--
80+-- /See:/ 'operationsList' smart constructor.
81+data OperationsList = OperationsList'
82+ { _olXgafv :: !(Maybe Xgafv)
83+ , _olUploadProtocol :: !(Maybe Text)
84+ , _olPp :: !Bool
85+ , _olAccessToken :: !(Maybe Text)
86+ , _olUploadType :: !(Maybe Text)
87+ , _olBearerToken :: !(Maybe Text)
88+ , _olName :: !Text
89+ , _olFilter :: !(Maybe Text)
90+ , _olPageToken :: !(Maybe Text)
91+ , _olPageSize :: !(Maybe (Textual Int32))
92+ , _olCallback :: !(Maybe Text)
93+ } deriving (Eq,Show,Data,Typeable,Generic)
94+
95+-- | Creates a value of 'OperationsList' with the minimum fields required to make a request.
96+--
97+-- Use one of the following lenses to modify other fields as desired:
98+--
99+-- * 'olXgafv'
100+--
101+-- * 'olUploadProtocol'
102+--
103+-- * 'olPp'
104+--
105+-- * 'olAccessToken'
106+--
107+-- * 'olUploadType'
108+--
109+-- * 'olBearerToken'
110+--
111+-- * 'olName'
112+--
113+-- * 'olFilter'
114+--
115+-- * 'olPageToken'
116+--
117+-- * 'olPageSize'
118+--
119+-- * 'olCallback'
120+operationsList
121+ :: Text -- ^ 'olName'
122+ -> OperationsList
123+operationsList pOlName_ =
124+ OperationsList'
125+ { _olXgafv = Nothing
126+ , _olUploadProtocol = Nothing
127+ , _olPp = True
128+ , _olAccessToken = Nothing
129+ , _olUploadType = Nothing
130+ , _olBearerToken = Nothing
131+ , _olName = pOlName_
132+ , _olFilter = Nothing
133+ , _olPageToken = Nothing
134+ , _olPageSize = Nothing
135+ , _olCallback = Nothing
136+ }
137+
138+-- | V1 error format.
139+olXgafv :: Lens' OperationsList (Maybe Xgafv)
140+olXgafv = lens _olXgafv (\ s a -> s{_olXgafv = a})
141+
142+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
143+olUploadProtocol :: Lens' OperationsList (Maybe Text)
144+olUploadProtocol
145+ = lens _olUploadProtocol
146+ (\ s a -> s{_olUploadProtocol = a})
147+
148+-- | Pretty-print response.
149+olPp :: Lens' OperationsList Bool
150+olPp = lens _olPp (\ s a -> s{_olPp = a})
151+
152+-- | OAuth access token.
153+olAccessToken :: Lens' OperationsList (Maybe Text)
154+olAccessToken
155+ = lens _olAccessToken
156+ (\ s a -> s{_olAccessToken = a})
157+
158+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
159+olUploadType :: Lens' OperationsList (Maybe Text)
160+olUploadType
161+ = lens _olUploadType (\ s a -> s{_olUploadType = a})
162+
163+-- | OAuth bearer token.
164+olBearerToken :: Lens' OperationsList (Maybe Text)
165+olBearerToken
166+ = lens _olBearerToken
167+ (\ s a -> s{_olBearerToken = a})
168+
169+-- | The name of the operation collection.
170+olName :: Lens' OperationsList Text
171+olName = lens _olName (\ s a -> s{_olName = a})
172+
173+-- | The standard list filter.
174+olFilter :: Lens' OperationsList (Maybe Text)
175+olFilter = lens _olFilter (\ s a -> s{_olFilter = a})
176+
177+-- | The standard list page token.
178+olPageToken :: Lens' OperationsList (Maybe Text)
179+olPageToken
180+ = lens _olPageToken (\ s a -> s{_olPageToken = a})
181+
182+-- | The standard list page size.
183+olPageSize :: Lens' OperationsList (Maybe Int32)
184+olPageSize
185+ = lens _olPageSize (\ s a -> s{_olPageSize = a}) .
186+ mapping _Coerce
187+
188+-- | JSONP
189+olCallback :: Lens' OperationsList (Maybe Text)
190+olCallback
191+ = lens _olCallback (\ s a -> s{_olCallback = a})
192+
193+instance GoogleRequest OperationsList where
194+ type Rs OperationsList = ListOperationsResponse
195+ type Scopes OperationsList =
196+ '["https://www.googleapis.com/auth/cloud-platform",
197+ "https://www.googleapis.com/auth/cloudruntimeconfig"]
198+ requestClient OperationsList'{..}
199+ = go _olName _olXgafv _olUploadProtocol (Just _olPp)
200+ _olAccessToken
201+ _olUploadType
202+ _olBearerToken
203+ _olFilter
204+ _olPageToken
205+ _olPageSize
206+ _olCallback
207+ (Just AltJSON)
208+ runtimeConfigService
209+ where go
210+ = buildClient (Proxy :: Proxy OperationsListResource)
211+ mempty
gogol-runtimeconfig/gen/Network/Google/RuntimeConfig.hsnew file+107
@@ -0,0 +1,107 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE NoImplicitPrelude #-}
3+{-# LANGUAGE TypeOperators #-}
4+
5+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
6+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
7+
8+-- |
9+-- Module : Network.Google.RuntimeConfig
10+-- Copyright : (c) 2015-2016 Brendan Hay
11+-- License : Mozilla Public License, v. 2.0.
12+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
13+-- Stability : auto-generated
14+-- Portability : non-portable (GHC extensions)
15+--
16+-- Provides capabilities for dynamic configuration and coordination for
17+-- applications running on Google Cloud Platform.
18+--
19+-- /See:/ <https://cloud.google.com/deployment-manager/runtime-configurator/ Google Cloud RuntimeConfig API Reference>
20+module Network.Google.RuntimeConfig
21+ (
22+ -- * Service Configuration
23+ runtimeConfigService
24+
25+ -- * OAuth Scopes
26+ , cloudPlatformScope
27+ , cloudruntimeConfigScope
28+
29+ -- * API Declaration
30+ , RuntimeConfigAPI
31+
32+ -- * Resources
33+
34+ -- ** runtimeconfig.operations.cancel
35+ , module Network.Google.Resource.RuntimeConfig.Operations.Cancel
36+
37+ -- ** runtimeconfig.operations.delete
38+ , module Network.Google.Resource.RuntimeConfig.Operations.Delete
39+
40+ -- ** runtimeconfig.operations.list
41+ , module Network.Google.Resource.RuntimeConfig.Operations.List
42+
43+ -- * Types
44+
45+ -- ** Status
46+ , Status
47+ , status
48+ , sDetails
49+ , sCode
50+ , sMessage
51+
52+ -- ** ListOperationsResponse
53+ , ListOperationsResponse
54+ , listOperationsResponse
55+ , lorNextPageToken
56+ , lorOperations
57+
58+ -- ** CancelOperationRequest
59+ , CancelOperationRequest
60+ , cancelOperationRequest
61+
62+ -- ** Operation
63+ , Operation
64+ , operation
65+ , oDone
66+ , oError
67+ , oResponse
68+ , oName
69+ , oMetadata
70+
71+ -- ** Empty
72+ , Empty
73+ , empty
74+
75+ -- ** StatusDetailsItem
76+ , StatusDetailsItem
77+ , statusDetailsItem
78+ , sdiAddtional
79+
80+ -- ** Xgafv
81+ , Xgafv (..)
82+
83+ -- ** OperationMetadata
84+ , OperationMetadata
85+ , operationMetadata
86+ , omAddtional
87+
88+ -- ** OperationResponse
89+ , OperationResponse
90+ , operationResponse
91+ , orAddtional
92+ ) where
93+
94+import Network.Google.Prelude
95+import Network.Google.Resource.RuntimeConfig.Operations.Cancel
96+import Network.Google.Resource.RuntimeConfig.Operations.Delete
97+import Network.Google.Resource.RuntimeConfig.Operations.List
98+import Network.Google.RuntimeConfig.Types
99+
100+{- $resources
101+TODO
102+-}
103+
104+-- | Represents the entirety of the methods and resources available for the Google Cloud RuntimeConfig API service.
105+type RuntimeConfigAPI =
106+ OperationsListResource :<|> OperationsCancelResource
107+ :<|> OperationsDeleteResource
gogol-runtimeconfig/gen/Network/Google/RuntimeConfig/Types.hsnew file+91
@@ -0,0 +1,91 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE NoImplicitPrelude #-}
5+{-# LANGUAGE OverloadedStrings #-}
6+
7+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
8+
9+-- |
10+-- Module : Network.Google.RuntimeConfig.Types
11+-- Copyright : (c) 2015-2016 Brendan Hay
12+-- License : Mozilla Public License, v. 2.0.
13+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
14+-- Stability : auto-generated
15+-- Portability : non-portable (GHC extensions)
16+--
17+module Network.Google.RuntimeConfig.Types
18+ (
19+ -- * Service Configuration
20+ runtimeConfigService
21+
22+ -- * OAuth Scopes
23+ , cloudPlatformScope
24+ , cloudruntimeConfigScope
25+
26+ -- * Status
27+ , Status
28+ , status
29+ , sDetails
30+ , sCode
31+ , sMessage
32+
33+ -- * ListOperationsResponse
34+ , ListOperationsResponse
35+ , listOperationsResponse
36+ , lorNextPageToken
37+ , lorOperations
38+
39+ -- * CancelOperationRequest
40+ , CancelOperationRequest
41+ , cancelOperationRequest
42+
43+ -- * Operation
44+ , Operation
45+ , operation
46+ , oDone
47+ , oError
48+ , oResponse
49+ , oName
50+ , oMetadata
51+
52+ -- * Empty
53+ , Empty
54+ , empty
55+
56+ -- * StatusDetailsItem
57+ , StatusDetailsItem
58+ , statusDetailsItem
59+ , sdiAddtional
60+
61+ -- * Xgafv
62+ , Xgafv (..)
63+
64+ -- * OperationMetadata
65+ , OperationMetadata
66+ , operationMetadata
67+ , omAddtional
68+
69+ -- * OperationResponse
70+ , OperationResponse
71+ , operationResponse
72+ , orAddtional
73+ ) where
74+
75+import Network.Google.Prelude
76+import Network.Google.RuntimeConfig.Types.Product
77+import Network.Google.RuntimeConfig.Types.Sum
78+
79+-- | Default request referring to version 'v1' of the Google Cloud RuntimeConfig API. This contains the host and root path used as a starting point for constructing service requests.
80+runtimeConfigService :: ServiceConfig
81+runtimeConfigService
82+ = defaultService (ServiceId "runtimeconfig:v1")
83+ "runtimeconfig.googleapis.com"
84+
85+-- | View and manage your data across Google Cloud Platform services
86+cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]
87+cloudPlatformScope = Proxy;
88+
89+-- | Manage your Google Cloud Platform services\' runtime configuration
90+cloudruntimeConfigScope :: Proxy '["https://www.googleapis.com/auth/cloudruntimeconfig"]
91+cloudruntimeConfigScope = Proxy;
gogol-runtimeconfig/gen/Network/Google/RuntimeConfig/Types/Product.hsnew file+416
@@ -0,0 +1,416 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE NoImplicitPrelude #-}
4+{-# LANGUAGE OverloadedStrings #-}
5+{-# LANGUAGE RecordWildCards #-}
6+
7+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
8+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
9+
10+-- |
11+-- Module : Network.Google.RuntimeConfig.Types.Product
12+-- Copyright : (c) 2015-2016 Brendan Hay
13+-- License : Mozilla Public License, v. 2.0.
14+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
15+-- Stability : auto-generated
16+-- Portability : non-portable (GHC extensions)
17+--
18+module Network.Google.RuntimeConfig.Types.Product where
19+
20+import Network.Google.Prelude
21+import Network.Google.RuntimeConfig.Types.Sum
22+
23+-- | The \`Status\` type defines a logical error model that is suitable for
24+-- different programming environments, including REST APIs and RPC APIs. It
25+-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is
26+-- designed to be: - Simple to use and understand for most users - Flexible
27+-- enough to meet unexpected needs # Overview The \`Status\` message
28+-- contains three pieces of data: error code, error message, and error
29+-- details. The error code should be an enum value of google.rpc.Code, but
30+-- it may accept additional error codes if needed. The error message should
31+-- be a developer-facing English message that helps developers *understand*
32+-- and *resolve* the error. If a localized user-facing error message is
33+-- needed, put the localized message in the error details or localize it in
34+-- the client. The optional error details may contain arbitrary information
35+-- about the error. There is a predefined set of error detail types in the
36+-- package \`google.rpc\` which can be used for common error conditions. #
37+-- Language mapping The \`Status\` message is the logical representation of
38+-- the error model, but it is not necessarily the actual wire format. When
39+-- the \`Status\` message is exposed in different client libraries and
40+-- different wire protocols, it can be mapped differently. For example, it
41+-- will likely be mapped to some exceptions in Java, but more likely mapped
42+-- to some error codes in C. # Other uses The error model and the
43+-- \`Status\` message can be used in a variety of environments, either with
44+-- or without APIs, to provide a consistent developer experience across
45+-- different environments. Example uses of this error model include: -
46+-- Partial errors. If a service needs to return partial errors to the
47+-- client, it may embed the \`Status\` in the normal response to indicate
48+-- the partial errors. - Workflow errors. A typical workflow has multiple
49+-- steps. Each step may have a \`Status\` message for error reporting
50+-- purpose. - Batch operations. If a client uses batch request and batch
51+-- response, the \`Status\` message should be used directly inside batch
52+-- response, one for each error sub-response. - Asynchronous operations. If
53+-- an API call embeds asynchronous operation results in its response, the
54+-- status of those operations should be represented directly using the
55+-- \`Status\` message. - Logging. If some API errors are stored in logs,
56+-- the message \`Status\` could be used directly after any stripping needed
57+-- for security\/privacy reasons.
58+--
59+-- /See:/ 'status' smart constructor.
60+data Status = Status'
61+ { _sDetails :: !(Maybe [StatusDetailsItem])
62+ , _sCode :: !(Maybe (Textual Int32))
63+ , _sMessage :: !(Maybe Text)
64+ } deriving (Eq,Show,Data,Typeable,Generic)
65+
66+-- | Creates a value of 'Status' with the minimum fields required to make a request.
67+--
68+-- Use one of the following lenses to modify other fields as desired:
69+--
70+-- * 'sDetails'
71+--
72+-- * 'sCode'
73+--
74+-- * 'sMessage'
75+status
76+ :: Status
77+status =
78+ Status'
79+ { _sDetails = Nothing
80+ , _sCode = Nothing
81+ , _sMessage = Nothing
82+ }
83+
84+-- | A list of messages that carry the error details. There will be a common
85+-- set of message types for APIs to use.
86+sDetails :: Lens' Status [StatusDetailsItem]
87+sDetails
88+ = lens _sDetails (\ s a -> s{_sDetails = a}) .
89+ _Default
90+ . _Coerce
91+
92+-- | The status code, which should be an enum value of google.rpc.Code.
93+sCode :: Lens' Status (Maybe Int32)
94+sCode
95+ = lens _sCode (\ s a -> s{_sCode = a}) .
96+ mapping _Coerce
97+
98+-- | A developer-facing error message, which should be in English. Any
99+-- user-facing error message should be localized and sent in the
100+-- google.rpc.Status.details field, or localized by the client.
101+sMessage :: Lens' Status (Maybe Text)
102+sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
103+
104+instance FromJSON Status where
105+ parseJSON
106+ = withObject "Status"
107+ (\ o ->
108+ Status' <$>
109+ (o .:? "details" .!= mempty) <*> (o .:? "code") <*>
110+ (o .:? "message"))
111+
112+instance ToJSON Status where
113+ toJSON Status'{..}
114+ = object
115+ (catMaybes
116+ [("details" .=) <$> _sDetails,
117+ ("code" .=) <$> _sCode,
118+ ("message" .=) <$> _sMessage])
119+
120+-- | The response message for Operations.ListOperations.
121+--
122+-- /See:/ 'listOperationsResponse' smart constructor.
123+data ListOperationsResponse = ListOperationsResponse'
124+ { _lorNextPageToken :: !(Maybe Text)
125+ , _lorOperations :: !(Maybe [Operation])
126+ } deriving (Eq,Show,Data,Typeable,Generic)
127+
128+-- | Creates a value of 'ListOperationsResponse' with the minimum fields required to make a request.
129+--
130+-- Use one of the following lenses to modify other fields as desired:
131+--
132+-- * 'lorNextPageToken'
133+--
134+-- * 'lorOperations'
135+listOperationsResponse
136+ :: ListOperationsResponse
137+listOperationsResponse =
138+ ListOperationsResponse'
139+ { _lorNextPageToken = Nothing
140+ , _lorOperations = Nothing
141+ }
142+
143+-- | The standard List next-page token.
144+lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text)
145+lorNextPageToken
146+ = lens _lorNextPageToken
147+ (\ s a -> s{_lorNextPageToken = a})
148+
149+-- | A list of operations that matches the specified filter in the request.
150+lorOperations :: Lens' ListOperationsResponse [Operation]
151+lorOperations
152+ = lens _lorOperations
153+ (\ s a -> s{_lorOperations = a})
154+ . _Default
155+ . _Coerce
156+
157+instance FromJSON ListOperationsResponse where
158+ parseJSON
159+ = withObject "ListOperationsResponse"
160+ (\ o ->
161+ ListOperationsResponse' <$>
162+ (o .:? "nextPageToken") <*>
163+ (o .:? "operations" .!= mempty))
164+
165+instance ToJSON ListOperationsResponse where
166+ toJSON ListOperationsResponse'{..}
167+ = object
168+ (catMaybes
169+ [("nextPageToken" .=) <$> _lorNextPageToken,
170+ ("operations" .=) <$> _lorOperations])
171+
172+-- | The request message for Operations.CancelOperation.
173+--
174+-- /See:/ 'cancelOperationRequest' smart constructor.
175+data CancelOperationRequest =
176+ CancelOperationRequest'
177+ deriving (Eq,Show,Data,Typeable,Generic)
178+
179+-- | Creates a value of 'CancelOperationRequest' with the minimum fields required to make a request.
180+--
181+cancelOperationRequest
182+ :: CancelOperationRequest
183+cancelOperationRequest = CancelOperationRequest'
184+
185+instance FromJSON CancelOperationRequest where
186+ parseJSON
187+ = withObject "CancelOperationRequest"
188+ (\ o -> pure CancelOperationRequest')
189+
190+instance ToJSON CancelOperationRequest where
191+ toJSON = const emptyObject
192+
193+-- | This resource represents a long-running operation that is the result of
194+-- a network API call.
195+--
196+-- /See:/ 'operation' smart constructor.
197+data Operation = Operation'
198+ { _oDone :: !(Maybe Bool)
199+ , _oError :: !(Maybe Status)
200+ , _oResponse :: !(Maybe OperationResponse)
201+ , _oName :: !(Maybe Text)
202+ , _oMetadata :: !(Maybe OperationMetadata)
203+ } deriving (Eq,Show,Data,Typeable,Generic)
204+
205+-- | Creates a value of 'Operation' with the minimum fields required to make a request.
206+--
207+-- Use one of the following lenses to modify other fields as desired:
208+--
209+-- * 'oDone'
210+--
211+-- * 'oError'
212+--
213+-- * 'oResponse'
214+--
215+-- * 'oName'
216+--
217+-- * 'oMetadata'
218+operation
219+ :: Operation
220+operation =
221+ Operation'
222+ { _oDone = Nothing
223+ , _oError = Nothing
224+ , _oResponse = Nothing
225+ , _oName = Nothing
226+ , _oMetadata = Nothing
227+ }
228+
229+-- | If the value is \`false\`, it means the operation is still in progress.
230+-- If true, the operation is completed, and either \`error\` or
231+-- \`response\` is available.
232+oDone :: Lens' Operation (Maybe Bool)
233+oDone = lens _oDone (\ s a -> s{_oDone = a})
234+
235+-- | The error result of the operation in case of failure or cancellation.
236+oError :: Lens' Operation (Maybe Status)
237+oError = lens _oError (\ s a -> s{_oError = a})
238+
239+-- | The normal response of the operation in case of success. If the original
240+-- method returns no data on success, such as \`Delete\`, the response is
241+-- \`google.protobuf.Empty\`. If the original method is standard
242+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
243+-- For other methods, the response should have the type \`XxxResponse\`,
244+-- where \`Xxx\` is the original method name. For example, if the original
245+-- method name is \`TakeSnapshot()\`, the inferred response type is
246+-- \`TakeSnapshotResponse\`.
247+oResponse :: Lens' Operation (Maybe OperationResponse)
248+oResponse
249+ = lens _oResponse (\ s a -> s{_oResponse = a})
250+
251+-- | The server-assigned name, which is only unique within the same service
252+-- that originally returns it. If you use the default HTTP mapping, the
253+-- \`name\` should have the format of \`operations\/some\/unique\/name\`.
254+oName :: Lens' Operation (Maybe Text)
255+oName = lens _oName (\ s a -> s{_oName = a})
256+
257+-- | Service-specific metadata associated with the operation. It typically
258+-- contains progress information and common metadata such as create time.
259+-- Some services might not provide such metadata. Any method that returns a
260+-- long-running operation should document the metadata type, if any.
261+oMetadata :: Lens' Operation (Maybe OperationMetadata)
262+oMetadata
263+ = lens _oMetadata (\ s a -> s{_oMetadata = a})
264+
265+instance FromJSON Operation where
266+ parseJSON
267+ = withObject "Operation"
268+ (\ o ->
269+ Operation' <$>
270+ (o .:? "done") <*> (o .:? "error") <*>
271+ (o .:? "response")
272+ <*> (o .:? "name")
273+ <*> (o .:? "metadata"))
274+
275+instance ToJSON Operation where
276+ toJSON Operation'{..}
277+ = object
278+ (catMaybes
279+ [("done" .=) <$> _oDone, ("error" .=) <$> _oError,
280+ ("response" .=) <$> _oResponse,
281+ ("name" .=) <$> _oName,
282+ ("metadata" .=) <$> _oMetadata])
283+
284+-- | A generic empty message that you can re-use to avoid defining duplicated
285+-- empty messages in your APIs. A typical example is to use it as the
286+-- request or the response type of an API method. For instance: service Foo
287+-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The
288+-- JSON representation for \`Empty\` is empty JSON object \`{}\`.
289+--
290+-- /See:/ 'empty' smart constructor.
291+data Empty =
292+ Empty'
293+ deriving (Eq,Show,Data,Typeable,Generic)
294+
295+-- | Creates a value of 'Empty' with the minimum fields required to make a request.
296+--
297+empty
298+ :: Empty
299+empty = Empty'
300+
301+instance FromJSON Empty where
302+ parseJSON = withObject "Empty" (\ o -> pure Empty')
303+
304+instance ToJSON Empty where
305+ toJSON = const emptyObject
306+
307+--
308+-- /See:/ 'statusDetailsItem' smart constructor.
309+newtype StatusDetailsItem = StatusDetailsItem'
310+ { _sdiAddtional :: HashMap Text JSONValue
311+ } deriving (Eq,Show,Data,Typeable,Generic)
312+
313+-- | Creates a value of 'StatusDetailsItem' with the minimum fields required to make a request.
314+--
315+-- Use one of the following lenses to modify other fields as desired:
316+--
317+-- * 'sdiAddtional'
318+statusDetailsItem
319+ :: HashMap Text JSONValue -- ^ 'sdiAddtional'
320+ -> StatusDetailsItem
321+statusDetailsItem pSdiAddtional_ =
322+ StatusDetailsItem'
323+ { _sdiAddtional = _Coerce # pSdiAddtional_
324+ }
325+
326+-- | Properties of the object. Contains field \'type with type URL.
327+sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
328+sdiAddtional
329+ = lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
330+ . _Coerce
331+
332+instance FromJSON StatusDetailsItem where
333+ parseJSON
334+ = withObject "StatusDetailsItem"
335+ (\ o -> StatusDetailsItem' <$> (parseJSONObject o))
336+
337+instance ToJSON StatusDetailsItem where
338+ toJSON = toJSON . _sdiAddtional
339+
340+-- | Service-specific metadata associated with the operation. It typically
341+-- contains progress information and common metadata such as create time.
342+-- Some services might not provide such metadata. Any method that returns a
343+-- long-running operation should document the metadata type, if any.
344+--
345+-- /See:/ 'operationMetadata' smart constructor.
346+newtype OperationMetadata = OperationMetadata'
347+ { _omAddtional :: HashMap Text JSONValue
348+ } deriving (Eq,Show,Data,Typeable,Generic)
349+
350+-- | Creates a value of 'OperationMetadata' with the minimum fields required to make a request.
351+--
352+-- Use one of the following lenses to modify other fields as desired:
353+--
354+-- * 'omAddtional'
355+operationMetadata
356+ :: HashMap Text JSONValue -- ^ 'omAddtional'
357+ -> OperationMetadata
358+operationMetadata pOmAddtional_ =
359+ OperationMetadata'
360+ { _omAddtional = _Coerce # pOmAddtional_
361+ }
362+
363+-- | Properties of the object. Contains field \'type with type URL.
364+omAddtional :: Lens' OperationMetadata (HashMap Text JSONValue)
365+omAddtional
366+ = lens _omAddtional (\ s a -> s{_omAddtional = a}) .
367+ _Coerce
368+
369+instance FromJSON OperationMetadata where
370+ parseJSON
371+ = withObject "OperationMetadata"
372+ (\ o -> OperationMetadata' <$> (parseJSONObject o))
373+
374+instance ToJSON OperationMetadata where
375+ toJSON = toJSON . _omAddtional
376+
377+-- | The normal response of the operation in case of success. If the original
378+-- method returns no data on success, such as \`Delete\`, the response is
379+-- \`google.protobuf.Empty\`. If the original method is standard
380+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
381+-- For other methods, the response should have the type \`XxxResponse\`,
382+-- where \`Xxx\` is the original method name. For example, if the original
383+-- method name is \`TakeSnapshot()\`, the inferred response type is
384+-- \`TakeSnapshotResponse\`.
385+--
386+-- /See:/ 'operationResponse' smart constructor.
387+newtype OperationResponse = OperationResponse'
388+ { _orAddtional :: HashMap Text JSONValue
389+ } deriving (Eq,Show,Data,Typeable,Generic)
390+
391+-- | Creates a value of 'OperationResponse' with the minimum fields required to make a request.
392+--
393+-- Use one of the following lenses to modify other fields as desired:
394+--
395+-- * 'orAddtional'
396+operationResponse
397+ :: HashMap Text JSONValue -- ^ 'orAddtional'
398+ -> OperationResponse
399+operationResponse pOrAddtional_ =
400+ OperationResponse'
401+ { _orAddtional = _Coerce # pOrAddtional_
402+ }
403+
404+-- | Properties of the object. Contains field \'type with type URL.
405+orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
406+orAddtional
407+ = lens _orAddtional (\ s a -> s{_orAddtional = a}) .
408+ _Coerce
409+
410+instance FromJSON OperationResponse where
411+ parseJSON
412+ = withObject "OperationResponse"
413+ (\ o -> OperationResponse' <$> (parseJSONObject o))
414+
415+instance ToJSON OperationResponse where
416+ toJSON = toJSON . _orAddtional
gogol-runtimeconfig/gen/Network/Google/RuntimeConfig/Types/Sum.hsnew file+48
@@ -0,0 +1,48 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE LambdaCase #-}
4+{-# LANGUAGE NoImplicitPrelude #-}
5+{-# LANGUAGE OverloadedStrings #-}
6+
7+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
8+
9+-- |
10+-- Module : Network.Google.RuntimeConfig.Types.Sum
11+-- Copyright : (c) 2015-2016 Brendan Hay
12+-- License : Mozilla Public License, v. 2.0.
13+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
14+-- Stability : auto-generated
15+-- Portability : non-portable (GHC extensions)
16+--
17+module Network.Google.RuntimeConfig.Types.Sum where
18+
19+import Network.Google.Prelude
20+
21+-- | V1 error format.
22+data Xgafv
23+ = X1
24+ -- ^ @1@
25+ -- v1 error format
26+ | X2
27+ -- ^ @2@
28+ -- v2 error format
29+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
30+
31+instance Hashable Xgafv
32+
33+instance FromHttpApiData Xgafv where
34+ parseQueryParam = \case
35+ "1" -> Right X1
36+ "2" -> Right X2
37+ x -> Left ("Unable to parse Xgafv from: " <> x)
38+
39+instance ToHttpApiData Xgafv where
40+ toQueryParam = \case
41+ X1 -> "1"
42+ X2 -> "2"
43+
44+instance FromJSON Xgafv where
45+ parseJSON = parseJSONText "Xgafv"
46+
47+instance ToJSON Xgafv where
48+ toJSON = toJSONText
gogol-runtimeconfig/gogol-runtimeconfig.cabalnew file+49
@@ -0,0 +1,49 @@
1+name: gogol-runtimeconfig
2+version: 0.1.0
3+synopsis: Google Cloud RuntimeConfig SDK.
4+homepage: https://github.com/brendanhay/gogol
5+bug-reports: https://github.com/brendanhay/gogol/issues
6+license: OtherLicense
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay@gmail.com>
10+copyright: Copyright (c) 2015-2016 Brendan Hay
11+category: Network, Google, Cloud
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md
15+
16+description:
17+ Provides capabilities for dynamic configuration and coordination for
18+ applications running on Google Cloud Platform.
19+ .
20+ /Warning:/ This is an experimental prototype/preview release which is still
21+ under exploratory development and not intended for public use, caveat emptor!
22+ .
23+ This library is compatible with version @v1@
24+ of the API.
25+
26+source-repository head
27+ type: git
28+ location: git://github.com/brendanhay/gogol.git
29+
30+library
31+ default-language: Haskell2010
32+ hs-source-dirs: src gen
33+
34+ ghc-options: -Wall
35+
36+ exposed-modules:
37+ Network.Google.Resource.RuntimeConfig.Operations.Cancel
38+ , Network.Google.Resource.RuntimeConfig.Operations.Delete
39+ , Network.Google.Resource.RuntimeConfig.Operations.List
40+ , Network.Google.RuntimeConfig
41+ , Network.Google.RuntimeConfig.Types
42+
43+ other-modules:
44+ Network.Google.RuntimeConfig.Types.Product
45+ , Network.Google.RuntimeConfig.Types.Sum
46+
47+ build-depends:
48+ gogol-core == 0.1.0.*
49+ , base >= 4.7 && < 5
gogol-runtimeconfig/src/.gitkeepnew file

No changes to the content.