on develop help sign in
Regenerating gogol-servicemanagement
commited7402d8f982fbbfdf922340fe07a863b269fd10 authorBrendan Hay <brendan.g.hay@gmail.com> dateFri 28 Oct 2016, 08:23 (10 years ago) parent3397f20
30 files changed+12931
gogol-servicemanagement/LICENSE+367 gogol-servicemanagement/Makefile+1 gogol-servicemanagement/README.md+28 gogol-servicemanagement/Setup.hs+2 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Operations/Get.hs+170 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Configs/Create.hs+194 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Configs/Get.hs+189 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Configs/List.hs+206 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Configs/Submit.hs+199 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Create.hs+172 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Delete.hs+178 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Disable.hs+182 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Enable.hs+189 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/GenerateConfigReport.hs+193 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Get.hs+174 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/GetConfig.hs+188 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/GetIAMPolicy.hs+189 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/List.hs+198 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Rollouts/Create.hs+200 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Rollouts/Get.hs+190 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Rollouts/List.hs+206 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/SetIAMPolicy.hs+189 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/TestIAMPermissions.hs+189 gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Undelete.hs+179 gogol-servicemanagement/gen/Network/Google/ServiceManagement.hs+844 gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types.hs+749 gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Product.hs+6247 gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Sum.hs+852 gogol-servicemanagement/gogol-servicemanagement.cabal+67 gogol-servicemanagement/src/.gitkeep
gogol-servicemanagement/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-servicemanagement/Makefilenew file+1
@@ -0,0 +1 @@
1+include ../share/library.mk
gogol-servicemanagement/README.mdnew file+28
@@ -0,0 +1,28 @@
1+# gogol-servicemanagement
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 Service Management.
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-servicemanagement` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
gogol-servicemanagement/Setup.hsnew file+2
@@ -0,0 +1,2 @@
1+import Distribution.Simple
2+main = defaultMain
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Operations/Get.hsnew file+170
@@ -0,0 +1,170 @@
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.ServiceManagement.Operations.Get
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+-- Gets the latest state of a long-running operation. Clients can use this
24+-- method to poll the operation result at intervals as recommended by the
25+-- API service.
26+--
27+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.operations.get@.
28+module Network.Google.Resource.ServiceManagement.Operations.Get
29+ (
30+ -- * REST Resource
31+ OperationsGetResource
32+
33+ -- * Creating a Request
34+ , operationsGet
35+ , OperationsGet
36+
37+ -- * Request Lenses
38+ , ogXgafv
39+ , ogUploadProtocol
40+ , ogPp
41+ , ogAccessToken
42+ , ogUploadType
43+ , ogBearerToken
44+ , ogName
45+ , ogCallback
46+ ) where
47+
48+import Network.Google.Prelude
49+import Network.Google.ServiceManagement.Types
50+
51+-- | A resource alias for @servicemanagement.operations.get@ method which the
52+-- 'OperationsGet' request conforms to.
53+type OperationsGetResource =
54+ "v1" :>
55+ Capture "name" Text :>
56+ QueryParam "$.xgafv" Xgafv :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :> Get '[JSON] Operation
64+
65+-- | Gets the latest state of a long-running operation. Clients can use this
66+-- method to poll the operation result at intervals as recommended by the
67+-- API service.
68+--
69+-- /See:/ 'operationsGet' smart constructor.
70+data OperationsGet = OperationsGet'
71+ { _ogXgafv :: !(Maybe Xgafv)
72+ , _ogUploadProtocol :: !(Maybe Text)
73+ , _ogPp :: !Bool
74+ , _ogAccessToken :: !(Maybe Text)
75+ , _ogUploadType :: !(Maybe Text)
76+ , _ogBearerToken :: !(Maybe Text)
77+ , _ogName :: !Text
78+ , _ogCallback :: !(Maybe Text)
79+ } deriving (Eq,Show,Data,Typeable,Generic)
80+
81+-- | Creates a value of 'OperationsGet' with the minimum fields required to make a request.
82+--
83+-- Use one of the following lenses to modify other fields as desired:
84+--
85+-- * 'ogXgafv'
86+--
87+-- * 'ogUploadProtocol'
88+--
89+-- * 'ogPp'
90+--
91+-- * 'ogAccessToken'
92+--
93+-- * 'ogUploadType'
94+--
95+-- * 'ogBearerToken'
96+--
97+-- * 'ogName'
98+--
99+-- * 'ogCallback'
100+operationsGet
101+ :: Text -- ^ 'ogName'
102+ -> OperationsGet
103+operationsGet pOgName_ =
104+ OperationsGet'
105+ { _ogXgafv = Nothing
106+ , _ogUploadProtocol = Nothing
107+ , _ogPp = True
108+ , _ogAccessToken = Nothing
109+ , _ogUploadType = Nothing
110+ , _ogBearerToken = Nothing
111+ , _ogName = pOgName_
112+ , _ogCallback = Nothing
113+ }
114+
115+-- | V1 error format.
116+ogXgafv :: Lens' OperationsGet (Maybe Xgafv)
117+ogXgafv = lens _ogXgafv (\ s a -> s{_ogXgafv = a})
118+
119+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
120+ogUploadProtocol :: Lens' OperationsGet (Maybe Text)
121+ogUploadProtocol
122+ = lens _ogUploadProtocol
123+ (\ s a -> s{_ogUploadProtocol = a})
124+
125+-- | Pretty-print response.
126+ogPp :: Lens' OperationsGet Bool
127+ogPp = lens _ogPp (\ s a -> s{_ogPp = a})
128+
129+-- | OAuth access token.
130+ogAccessToken :: Lens' OperationsGet (Maybe Text)
131+ogAccessToken
132+ = lens _ogAccessToken
133+ (\ s a -> s{_ogAccessToken = a})
134+
135+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
136+ogUploadType :: Lens' OperationsGet (Maybe Text)
137+ogUploadType
138+ = lens _ogUploadType (\ s a -> s{_ogUploadType = a})
139+
140+-- | OAuth bearer token.
141+ogBearerToken :: Lens' OperationsGet (Maybe Text)
142+ogBearerToken
143+ = lens _ogBearerToken
144+ (\ s a -> s{_ogBearerToken = a})
145+
146+-- | The name of the operation resource.
147+ogName :: Lens' OperationsGet Text
148+ogName = lens _ogName (\ s a -> s{_ogName = a})
149+
150+-- | JSONP
151+ogCallback :: Lens' OperationsGet (Maybe Text)
152+ogCallback
153+ = lens _ogCallback (\ s a -> s{_ogCallback = a})
154+
155+instance GoogleRequest OperationsGet where
156+ type Rs OperationsGet = Operation
157+ type Scopes OperationsGet =
158+ '["https://www.googleapis.com/auth/cloud-platform",
159+ "https://www.googleapis.com/auth/service.management"]
160+ requestClient OperationsGet'{..}
161+ = go _ogName _ogXgafv _ogUploadProtocol (Just _ogPp)
162+ _ogAccessToken
163+ _ogUploadType
164+ _ogBearerToken
165+ _ogCallback
166+ (Just AltJSON)
167+ serviceManagementService
168+ where go
169+ = buildClient (Proxy :: Proxy OperationsGetResource)
170+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Configs/Create.hsnew file+194
@@ -0,0 +1,194 @@
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.ServiceManagement.Services.Configs.Create
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+-- Creates a new service configuration (version) for a managed service.
24+-- This method only stores the service configuration. To roll out the
25+-- service configuration to backend systems please call
26+-- CreateServiceRollout.
27+--
28+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.configs.create@.
29+module Network.Google.Resource.ServiceManagement.Services.Configs.Create
30+ (
31+ -- * REST Resource
32+ ServicesConfigsCreateResource
33+
34+ -- * Creating a Request
35+ , servicesConfigsCreate
36+ , ServicesConfigsCreate
37+
38+ -- * Request Lenses
39+ , sccXgafv
40+ , sccUploadProtocol
41+ , sccPp
42+ , sccAccessToken
43+ , sccUploadType
44+ , sccPayload
45+ , sccBearerToken
46+ , sccServiceName
47+ , sccCallback
48+ ) where
49+
50+import Network.Google.Prelude
51+import Network.Google.ServiceManagement.Types
52+
53+-- | A resource alias for @servicemanagement.services.configs.create@ method which the
54+-- 'ServicesConfigsCreate' request conforms to.
55+type ServicesConfigsCreateResource =
56+ "v1" :>
57+ "services" :>
58+ Capture "serviceName" Text :>
59+ "configs" :>
60+ QueryParam "$.xgafv" Xgafv :>
61+ QueryParam "upload_protocol" Text :>
62+ QueryParam "pp" Bool :>
63+ QueryParam "access_token" Text :>
64+ QueryParam "uploadType" Text :>
65+ QueryParam "bearer_token" Text :>
66+ QueryParam "callback" Text :>
67+ QueryParam "alt" AltJSON :>
68+ ReqBody '[JSON] Service :> Post '[JSON] Service
69+
70+-- | Creates a new service configuration (version) for a managed service.
71+-- This method only stores the service configuration. To roll out the
72+-- service configuration to backend systems please call
73+-- CreateServiceRollout.
74+--
75+-- /See:/ 'servicesConfigsCreate' smart constructor.
76+data ServicesConfigsCreate = ServicesConfigsCreate'
77+ { _sccXgafv :: !(Maybe Xgafv)
78+ , _sccUploadProtocol :: !(Maybe Text)
79+ , _sccPp :: !Bool
80+ , _sccAccessToken :: !(Maybe Text)
81+ , _sccUploadType :: !(Maybe Text)
82+ , _sccPayload :: !Service
83+ , _sccBearerToken :: !(Maybe Text)
84+ , _sccServiceName :: !Text
85+ , _sccCallback :: !(Maybe Text)
86+ } deriving (Eq,Show,Data,Typeable,Generic)
87+
88+-- | Creates a value of 'ServicesConfigsCreate' with the minimum fields required to make a request.
89+--
90+-- Use one of the following lenses to modify other fields as desired:
91+--
92+-- * 'sccXgafv'
93+--
94+-- * 'sccUploadProtocol'
95+--
96+-- * 'sccPp'
97+--
98+-- * 'sccAccessToken'
99+--
100+-- * 'sccUploadType'
101+--
102+-- * 'sccPayload'
103+--
104+-- * 'sccBearerToken'
105+--
106+-- * 'sccServiceName'
107+--
108+-- * 'sccCallback'
109+servicesConfigsCreate
110+ :: Service -- ^ 'sccPayload'
111+ -> Text -- ^ 'sccServiceName'
112+ -> ServicesConfigsCreate
113+servicesConfigsCreate pSccPayload_ pSccServiceName_ =
114+ ServicesConfigsCreate'
115+ { _sccXgafv = Nothing
116+ , _sccUploadProtocol = Nothing
117+ , _sccPp = True
118+ , _sccAccessToken = Nothing
119+ , _sccUploadType = Nothing
120+ , _sccPayload = pSccPayload_
121+ , _sccBearerToken = Nothing
122+ , _sccServiceName = pSccServiceName_
123+ , _sccCallback = Nothing
124+ }
125+
126+-- | V1 error format.
127+sccXgafv :: Lens' ServicesConfigsCreate (Maybe Xgafv)
128+sccXgafv = lens _sccXgafv (\ s a -> s{_sccXgafv = a})
129+
130+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
131+sccUploadProtocol :: Lens' ServicesConfigsCreate (Maybe Text)
132+sccUploadProtocol
133+ = lens _sccUploadProtocol
134+ (\ s a -> s{_sccUploadProtocol = a})
135+
136+-- | Pretty-print response.
137+sccPp :: Lens' ServicesConfigsCreate Bool
138+sccPp = lens _sccPp (\ s a -> s{_sccPp = a})
139+
140+-- | OAuth access token.
141+sccAccessToken :: Lens' ServicesConfigsCreate (Maybe Text)
142+sccAccessToken
143+ = lens _sccAccessToken
144+ (\ s a -> s{_sccAccessToken = a})
145+
146+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
147+sccUploadType :: Lens' ServicesConfigsCreate (Maybe Text)
148+sccUploadType
149+ = lens _sccUploadType
150+ (\ s a -> s{_sccUploadType = a})
151+
152+-- | Multipart request metadata.
153+sccPayload :: Lens' ServicesConfigsCreate Service
154+sccPayload
155+ = lens _sccPayload (\ s a -> s{_sccPayload = a})
156+
157+-- | OAuth bearer token.
158+sccBearerToken :: Lens' ServicesConfigsCreate (Maybe Text)
159+sccBearerToken
160+ = lens _sccBearerToken
161+ (\ s a -> s{_sccBearerToken = a})
162+
163+-- | The name of the service. See the
164+-- [overview](\/service-management\/overview) for naming requirements. For
165+-- example: \`example.googleapis.com\`.
166+sccServiceName :: Lens' ServicesConfigsCreate Text
167+sccServiceName
168+ = lens _sccServiceName
169+ (\ s a -> s{_sccServiceName = a})
170+
171+-- | JSONP
172+sccCallback :: Lens' ServicesConfigsCreate (Maybe Text)
173+sccCallback
174+ = lens _sccCallback (\ s a -> s{_sccCallback = a})
175+
176+instance GoogleRequest ServicesConfigsCreate where
177+ type Rs ServicesConfigsCreate = Service
178+ type Scopes ServicesConfigsCreate =
179+ '["https://www.googleapis.com/auth/cloud-platform",
180+ "https://www.googleapis.com/auth/service.management"]
181+ requestClient ServicesConfigsCreate'{..}
182+ = go _sccServiceName _sccXgafv _sccUploadProtocol
183+ (Just _sccPp)
184+ _sccAccessToken
185+ _sccUploadType
186+ _sccBearerToken
187+ _sccCallback
188+ (Just AltJSON)
189+ _sccPayload
190+ serviceManagementService
191+ where go
192+ = buildClient
193+ (Proxy :: Proxy ServicesConfigsCreateResource)
194+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Configs/Get.hsnew file+189
@@ -0,0 +1,189 @@
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.ServiceManagement.Services.Configs.Get
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+-- Gets a service configuration (version) for a managed service.
24+--
25+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.configs.get@.
26+module Network.Google.Resource.ServiceManagement.Services.Configs.Get
27+ (
28+ -- * REST Resource
29+ ServicesConfigsGetResource
30+
31+ -- * Creating a Request
32+ , servicesConfigsGet
33+ , ServicesConfigsGet
34+
35+ -- * Request Lenses
36+ , scgXgafv
37+ , scgUploadProtocol
38+ , scgPp
39+ , scgAccessToken
40+ , scgUploadType
41+ , scgBearerToken
42+ , scgConfigId
43+ , scgServiceName
44+ , scgCallback
45+ ) where
46+
47+import Network.Google.Prelude
48+import Network.Google.ServiceManagement.Types
49+
50+-- | A resource alias for @servicemanagement.services.configs.get@ method which the
51+-- 'ServicesConfigsGet' request conforms to.
52+type ServicesConfigsGetResource =
53+ "v1" :>
54+ "services" :>
55+ Capture "serviceName" Text :>
56+ "configs" :>
57+ Capture "configId" Text :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "callback" Text :>
65+ QueryParam "alt" AltJSON :> Get '[JSON] Service
66+
67+-- | Gets a service configuration (version) for a managed service.
68+--
69+-- /See:/ 'servicesConfigsGet' smart constructor.
70+data ServicesConfigsGet = ServicesConfigsGet'
71+ { _scgXgafv :: !(Maybe Xgafv)
72+ , _scgUploadProtocol :: !(Maybe Text)
73+ , _scgPp :: !Bool
74+ , _scgAccessToken :: !(Maybe Text)
75+ , _scgUploadType :: !(Maybe Text)
76+ , _scgBearerToken :: !(Maybe Text)
77+ , _scgConfigId :: !Text
78+ , _scgServiceName :: !Text
79+ , _scgCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ServicesConfigsGet' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'scgXgafv'
87+--
88+-- * 'scgUploadProtocol'
89+--
90+-- * 'scgPp'
91+--
92+-- * 'scgAccessToken'
93+--
94+-- * 'scgUploadType'
95+--
96+-- * 'scgBearerToken'
97+--
98+-- * 'scgConfigId'
99+--
100+-- * 'scgServiceName'
101+--
102+-- * 'scgCallback'
103+servicesConfigsGet
104+ :: Text -- ^ 'scgConfigId'
105+ -> Text -- ^ 'scgServiceName'
106+ -> ServicesConfigsGet
107+servicesConfigsGet pScgConfigId_ pScgServiceName_ =
108+ ServicesConfigsGet'
109+ { _scgXgafv = Nothing
110+ , _scgUploadProtocol = Nothing
111+ , _scgPp = True
112+ , _scgAccessToken = Nothing
113+ , _scgUploadType = Nothing
114+ , _scgBearerToken = Nothing
115+ , _scgConfigId = pScgConfigId_
116+ , _scgServiceName = pScgServiceName_
117+ , _scgCallback = Nothing
118+ }
119+
120+-- | V1 error format.
121+scgXgafv :: Lens' ServicesConfigsGet (Maybe Xgafv)
122+scgXgafv = lens _scgXgafv (\ s a -> s{_scgXgafv = a})
123+
124+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
125+scgUploadProtocol :: Lens' ServicesConfigsGet (Maybe Text)
126+scgUploadProtocol
127+ = lens _scgUploadProtocol
128+ (\ s a -> s{_scgUploadProtocol = a})
129+
130+-- | Pretty-print response.
131+scgPp :: Lens' ServicesConfigsGet Bool
132+scgPp = lens _scgPp (\ s a -> s{_scgPp = a})
133+
134+-- | OAuth access token.
135+scgAccessToken :: Lens' ServicesConfigsGet (Maybe Text)
136+scgAccessToken
137+ = lens _scgAccessToken
138+ (\ s a -> s{_scgAccessToken = a})
139+
140+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
141+scgUploadType :: Lens' ServicesConfigsGet (Maybe Text)
142+scgUploadType
143+ = lens _scgUploadType
144+ (\ s a -> s{_scgUploadType = a})
145+
146+-- | OAuth bearer token.
147+scgBearerToken :: Lens' ServicesConfigsGet (Maybe Text)
148+scgBearerToken
149+ = lens _scgBearerToken
150+ (\ s a -> s{_scgBearerToken = a})
151+
152+scgConfigId :: Lens' ServicesConfigsGet Text
153+scgConfigId
154+ = lens _scgConfigId (\ s a -> s{_scgConfigId = a})
155+
156+-- | The name of the service. See the
157+-- [overview](\/service-management\/overview) for naming requirements. For
158+-- example: \`example.googleapis.com\`.
159+scgServiceName :: Lens' ServicesConfigsGet Text
160+scgServiceName
161+ = lens _scgServiceName
162+ (\ s a -> s{_scgServiceName = a})
163+
164+-- | JSONP
165+scgCallback :: Lens' ServicesConfigsGet (Maybe Text)
166+scgCallback
167+ = lens _scgCallback (\ s a -> s{_scgCallback = a})
168+
169+instance GoogleRequest ServicesConfigsGet where
170+ type Rs ServicesConfigsGet = Service
171+ type Scopes ServicesConfigsGet =
172+ '["https://www.googleapis.com/auth/cloud-platform",
173+ "https://www.googleapis.com/auth/cloud-platform.read-only",
174+ "https://www.googleapis.com/auth/service.management",
175+ "https://www.googleapis.com/auth/service.management.readonly"]
176+ requestClient ServicesConfigsGet'{..}
177+ = go _scgServiceName _scgConfigId _scgXgafv
178+ _scgUploadProtocol
179+ (Just _scgPp)
180+ _scgAccessToken
181+ _scgUploadType
182+ _scgBearerToken
183+ _scgCallback
184+ (Just AltJSON)
185+ serviceManagementService
186+ where go
187+ = buildClient
188+ (Proxy :: Proxy ServicesConfigsGetResource)
189+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Configs/List.hsnew file+206
@@ -0,0 +1,206 @@
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.ServiceManagement.Services.Configs.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 the history of the service configuration for a managed service,
24+-- from the newest to the oldest.
25+--
26+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.configs.list@.
27+module Network.Google.Resource.ServiceManagement.Services.Configs.List
28+ (
29+ -- * REST Resource
30+ ServicesConfigsListResource
31+
32+ -- * Creating a Request
33+ , servicesConfigsList
34+ , ServicesConfigsList
35+
36+ -- * Request Lenses
37+ , sclXgafv
38+ , sclUploadProtocol
39+ , sclPp
40+ , sclAccessToken
41+ , sclUploadType
42+ , sclBearerToken
43+ , sclServiceName
44+ , sclPageToken
45+ , sclPageSize
46+ , sclCallback
47+ ) where
48+
49+import Network.Google.Prelude
50+import Network.Google.ServiceManagement.Types
51+
52+-- | A resource alias for @servicemanagement.services.configs.list@ method which the
53+-- 'ServicesConfigsList' request conforms to.
54+type ServicesConfigsListResource =
55+ "v1" :>
56+ "services" :>
57+ Capture "serviceName" Text :>
58+ "configs" :>
59+ QueryParam "$.xgafv" Xgafv :>
60+ QueryParam "upload_protocol" Text :>
61+ QueryParam "pp" Bool :>
62+ QueryParam "access_token" Text :>
63+ QueryParam "uploadType" Text :>
64+ QueryParam "bearer_token" Text :>
65+ QueryParam "pageToken" Text :>
66+ QueryParam "pageSize" (Textual Int32) :>
67+ QueryParam "callback" Text :>
68+ QueryParam "alt" AltJSON :>
69+ Get '[JSON] ListServiceConfigsResponse
70+
71+-- | Lists the history of the service configuration for a managed service,
72+-- from the newest to the oldest.
73+--
74+-- /See:/ 'servicesConfigsList' smart constructor.
75+data ServicesConfigsList = ServicesConfigsList'
76+ { _sclXgafv :: !(Maybe Xgafv)
77+ , _sclUploadProtocol :: !(Maybe Text)
78+ , _sclPp :: !Bool
79+ , _sclAccessToken :: !(Maybe Text)
80+ , _sclUploadType :: !(Maybe Text)
81+ , _sclBearerToken :: !(Maybe Text)
82+ , _sclServiceName :: !Text
83+ , _sclPageToken :: !(Maybe Text)
84+ , _sclPageSize :: !(Maybe (Textual Int32))
85+ , _sclCallback :: !(Maybe Text)
86+ } deriving (Eq,Show,Data,Typeable,Generic)
87+
88+-- | Creates a value of 'ServicesConfigsList' with the minimum fields required to make a request.
89+--
90+-- Use one of the following lenses to modify other fields as desired:
91+--
92+-- * 'sclXgafv'
93+--
94+-- * 'sclUploadProtocol'
95+--
96+-- * 'sclPp'
97+--
98+-- * 'sclAccessToken'
99+--
100+-- * 'sclUploadType'
101+--
102+-- * 'sclBearerToken'
103+--
104+-- * 'sclServiceName'
105+--
106+-- * 'sclPageToken'
107+--
108+-- * 'sclPageSize'
109+--
110+-- * 'sclCallback'
111+servicesConfigsList
112+ :: Text -- ^ 'sclServiceName'
113+ -> ServicesConfigsList
114+servicesConfigsList pSclServiceName_ =
115+ ServicesConfigsList'
116+ { _sclXgafv = Nothing
117+ , _sclUploadProtocol = Nothing
118+ , _sclPp = True
119+ , _sclAccessToken = Nothing
120+ , _sclUploadType = Nothing
121+ , _sclBearerToken = Nothing
122+ , _sclServiceName = pSclServiceName_
123+ , _sclPageToken = Nothing
124+ , _sclPageSize = Nothing
125+ , _sclCallback = Nothing
126+ }
127+
128+-- | V1 error format.
129+sclXgafv :: Lens' ServicesConfigsList (Maybe Xgafv)
130+sclXgafv = lens _sclXgafv (\ s a -> s{_sclXgafv = a})
131+
132+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
133+sclUploadProtocol :: Lens' ServicesConfigsList (Maybe Text)
134+sclUploadProtocol
135+ = lens _sclUploadProtocol
136+ (\ s a -> s{_sclUploadProtocol = a})
137+
138+-- | Pretty-print response.
139+sclPp :: Lens' ServicesConfigsList Bool
140+sclPp = lens _sclPp (\ s a -> s{_sclPp = a})
141+
142+-- | OAuth access token.
143+sclAccessToken :: Lens' ServicesConfigsList (Maybe Text)
144+sclAccessToken
145+ = lens _sclAccessToken
146+ (\ s a -> s{_sclAccessToken = a})
147+
148+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
149+sclUploadType :: Lens' ServicesConfigsList (Maybe Text)
150+sclUploadType
151+ = lens _sclUploadType
152+ (\ s a -> s{_sclUploadType = a})
153+
154+-- | OAuth bearer token.
155+sclBearerToken :: Lens' ServicesConfigsList (Maybe Text)
156+sclBearerToken
157+ = lens _sclBearerToken
158+ (\ s a -> s{_sclBearerToken = a})
159+
160+-- | The name of the service. See the
161+-- [overview](\/service-management\/overview) for naming requirements. For
162+-- example: \`example.googleapis.com\`.
163+sclServiceName :: Lens' ServicesConfigsList Text
164+sclServiceName
165+ = lens _sclServiceName
166+ (\ s a -> s{_sclServiceName = a})
167+
168+-- | The token of the page to retrieve.
169+sclPageToken :: Lens' ServicesConfigsList (Maybe Text)
170+sclPageToken
171+ = lens _sclPageToken (\ s a -> s{_sclPageToken = a})
172+
173+-- | The max number of items to include in the response list.
174+sclPageSize :: Lens' ServicesConfigsList (Maybe Int32)
175+sclPageSize
176+ = lens _sclPageSize (\ s a -> s{_sclPageSize = a}) .
177+ mapping _Coerce
178+
179+-- | JSONP
180+sclCallback :: Lens' ServicesConfigsList (Maybe Text)
181+sclCallback
182+ = lens _sclCallback (\ s a -> s{_sclCallback = a})
183+
184+instance GoogleRequest ServicesConfigsList where
185+ type Rs ServicesConfigsList =
186+ ListServiceConfigsResponse
187+ type Scopes ServicesConfigsList =
188+ '["https://www.googleapis.com/auth/cloud-platform",
189+ "https://www.googleapis.com/auth/cloud-platform.read-only",
190+ "https://www.googleapis.com/auth/service.management",
191+ "https://www.googleapis.com/auth/service.management.readonly"]
192+ requestClient ServicesConfigsList'{..}
193+ = go _sclServiceName _sclXgafv _sclUploadProtocol
194+ (Just _sclPp)
195+ _sclAccessToken
196+ _sclUploadType
197+ _sclBearerToken
198+ _sclPageToken
199+ _sclPageSize
200+ _sclCallback
201+ (Just AltJSON)
202+ serviceManagementService
203+ where go
204+ = buildClient
205+ (Proxy :: Proxy ServicesConfigsListResource)
206+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Configs/Submit.hsnew file+199
@@ -0,0 +1,199 @@
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.ServiceManagement.Services.Configs.Submit
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+-- Creates a new service configuration (version) for a managed service
24+-- based on user-supplied configuration source files (for example: OpenAPI
25+-- Specification). This method stores the source configurations as well as
26+-- the generated service configuration. To rollout the service
27+-- configuration to other services, please call CreateServiceRollout.
28+-- Operation
29+--
30+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.configs.submit@.
31+module Network.Google.Resource.ServiceManagement.Services.Configs.Submit
32+ (
33+ -- * REST Resource
34+ ServicesConfigsSubmitResource
35+
36+ -- * Creating a Request
37+ , servicesConfigsSubmit
38+ , ServicesConfigsSubmit
39+
40+ -- * Request Lenses
41+ , scsXgafv
42+ , scsUploadProtocol
43+ , scsPp
44+ , scsAccessToken
45+ , scsUploadType
46+ , scsPayload
47+ , scsBearerToken
48+ , scsServiceName
49+ , scsCallback
50+ ) where
51+
52+import Network.Google.Prelude
53+import Network.Google.ServiceManagement.Types
54+
55+-- | A resource alias for @servicemanagement.services.configs.submit@ method which the
56+-- 'ServicesConfigsSubmit' request conforms to.
57+type ServicesConfigsSubmitResource =
58+ "v1" :>
59+ "services" :>
60+ Capture "serviceName" Text :>
61+ "configs:submit" :>
62+ QueryParam "$.xgafv" Xgafv :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] SubmitConfigSourceRequest :>
71+ Post '[JSON] Operation
72+
73+-- | Creates a new service configuration (version) for a managed service
74+-- based on user-supplied configuration source files (for example: OpenAPI
75+-- Specification). This method stores the source configurations as well as
76+-- the generated service configuration. To rollout the service
77+-- configuration to other services, please call CreateServiceRollout.
78+-- Operation
79+--
80+-- /See:/ 'servicesConfigsSubmit' smart constructor.
81+data ServicesConfigsSubmit = ServicesConfigsSubmit'
82+ { _scsXgafv :: !(Maybe Xgafv)
83+ , _scsUploadProtocol :: !(Maybe Text)
84+ , _scsPp :: !Bool
85+ , _scsAccessToken :: !(Maybe Text)
86+ , _scsUploadType :: !(Maybe Text)
87+ , _scsPayload :: !SubmitConfigSourceRequest
88+ , _scsBearerToken :: !(Maybe Text)
89+ , _scsServiceName :: !Text
90+ , _scsCallback :: !(Maybe Text)
91+ } deriving (Eq,Show,Data,Typeable,Generic)
92+
93+-- | Creates a value of 'ServicesConfigsSubmit' with the minimum fields required to make a request.
94+--
95+-- Use one of the following lenses to modify other fields as desired:
96+--
97+-- * 'scsXgafv'
98+--
99+-- * 'scsUploadProtocol'
100+--
101+-- * 'scsPp'
102+--
103+-- * 'scsAccessToken'
104+--
105+-- * 'scsUploadType'
106+--
107+-- * 'scsPayload'
108+--
109+-- * 'scsBearerToken'
110+--
111+-- * 'scsServiceName'
112+--
113+-- * 'scsCallback'
114+servicesConfigsSubmit
115+ :: SubmitConfigSourceRequest -- ^ 'scsPayload'
116+ -> Text -- ^ 'scsServiceName'
117+ -> ServicesConfigsSubmit
118+servicesConfigsSubmit pScsPayload_ pScsServiceName_ =
119+ ServicesConfigsSubmit'
120+ { _scsXgafv = Nothing
121+ , _scsUploadProtocol = Nothing
122+ , _scsPp = True
123+ , _scsAccessToken = Nothing
124+ , _scsUploadType = Nothing
125+ , _scsPayload = pScsPayload_
126+ , _scsBearerToken = Nothing
127+ , _scsServiceName = pScsServiceName_
128+ , _scsCallback = Nothing
129+ }
130+
131+-- | V1 error format.
132+scsXgafv :: Lens' ServicesConfigsSubmit (Maybe Xgafv)
133+scsXgafv = lens _scsXgafv (\ s a -> s{_scsXgafv = a})
134+
135+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
136+scsUploadProtocol :: Lens' ServicesConfigsSubmit (Maybe Text)
137+scsUploadProtocol
138+ = lens _scsUploadProtocol
139+ (\ s a -> s{_scsUploadProtocol = a})
140+
141+-- | Pretty-print response.
142+scsPp :: Lens' ServicesConfigsSubmit Bool
143+scsPp = lens _scsPp (\ s a -> s{_scsPp = a})
144+
145+-- | OAuth access token.
146+scsAccessToken :: Lens' ServicesConfigsSubmit (Maybe Text)
147+scsAccessToken
148+ = lens _scsAccessToken
149+ (\ s a -> s{_scsAccessToken = a})
150+
151+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
152+scsUploadType :: Lens' ServicesConfigsSubmit (Maybe Text)
153+scsUploadType
154+ = lens _scsUploadType
155+ (\ s a -> s{_scsUploadType = a})
156+
157+-- | Multipart request metadata.
158+scsPayload :: Lens' ServicesConfigsSubmit SubmitConfigSourceRequest
159+scsPayload
160+ = lens _scsPayload (\ s a -> s{_scsPayload = a})
161+
162+-- | OAuth bearer token.
163+scsBearerToken :: Lens' ServicesConfigsSubmit (Maybe Text)
164+scsBearerToken
165+ = lens _scsBearerToken
166+ (\ s a -> s{_scsBearerToken = a})
167+
168+-- | The name of the service. See the
169+-- [overview](\/service-management\/overview) for naming requirements. For
170+-- example: \`example.googleapis.com\`.
171+scsServiceName :: Lens' ServicesConfigsSubmit Text
172+scsServiceName
173+ = lens _scsServiceName
174+ (\ s a -> s{_scsServiceName = a})
175+
176+-- | JSONP
177+scsCallback :: Lens' ServicesConfigsSubmit (Maybe Text)
178+scsCallback
179+ = lens _scsCallback (\ s a -> s{_scsCallback = a})
180+
181+instance GoogleRequest ServicesConfigsSubmit where
182+ type Rs ServicesConfigsSubmit = Operation
183+ type Scopes ServicesConfigsSubmit =
184+ '["https://www.googleapis.com/auth/cloud-platform",
185+ "https://www.googleapis.com/auth/service.management"]
186+ requestClient ServicesConfigsSubmit'{..}
187+ = go _scsServiceName _scsXgafv _scsUploadProtocol
188+ (Just _scsPp)
189+ _scsAccessToken
190+ _scsUploadType
191+ _scsBearerToken
192+ _scsCallback
193+ (Just AltJSON)
194+ _scsPayload
195+ serviceManagementService
196+ where go
197+ = buildClient
198+ (Proxy :: Proxy ServicesConfigsSubmitResource)
199+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Create.hsnew file+172
@@ -0,0 +1,172 @@
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.ServiceManagement.Services.Create
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+-- Creates a new managed service. Please note one producer project can own
24+-- no more than 20 services. Operation
25+--
26+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.create@.
27+module Network.Google.Resource.ServiceManagement.Services.Create
28+ (
29+ -- * REST Resource
30+ ServicesCreateResource
31+
32+ -- * Creating a Request
33+ , servicesCreate
34+ , ServicesCreate
35+
36+ -- * Request Lenses
37+ , scXgafv
38+ , scUploadProtocol
39+ , scPp
40+ , scAccessToken
41+ , scUploadType
42+ , scPayload
43+ , scBearerToken
44+ , scCallback
45+ ) where
46+
47+import Network.Google.Prelude
48+import Network.Google.ServiceManagement.Types
49+
50+-- | A resource alias for @servicemanagement.services.create@ method which the
51+-- 'ServicesCreate' request conforms to.
52+type ServicesCreateResource =
53+ "v1" :>
54+ "services" :>
55+ QueryParam "$.xgafv" Xgafv :>
56+ QueryParam "upload_protocol" Text :>
57+ QueryParam "pp" Bool :>
58+ QueryParam "access_token" Text :>
59+ QueryParam "uploadType" Text :>
60+ QueryParam "bearer_token" Text :>
61+ QueryParam "callback" Text :>
62+ QueryParam "alt" AltJSON :>
63+ ReqBody '[JSON] ManagedService :>
64+ Post '[JSON] Operation
65+
66+-- | Creates a new managed service. Please note one producer project can own
67+-- no more than 20 services. Operation
68+--
69+-- /See:/ 'servicesCreate' smart constructor.
70+data ServicesCreate = ServicesCreate'
71+ { _scXgafv :: !(Maybe Xgafv)
72+ , _scUploadProtocol :: !(Maybe Text)
73+ , _scPp :: !Bool
74+ , _scAccessToken :: !(Maybe Text)
75+ , _scUploadType :: !(Maybe Text)
76+ , _scPayload :: !ManagedService
77+ , _scBearerToken :: !(Maybe Text)
78+ , _scCallback :: !(Maybe Text)
79+ } deriving (Eq,Show,Data,Typeable,Generic)
80+
81+-- | Creates a value of 'ServicesCreate' with the minimum fields required to make a request.
82+--
83+-- Use one of the following lenses to modify other fields as desired:
84+--
85+-- * 'scXgafv'
86+--
87+-- * 'scUploadProtocol'
88+--
89+-- * 'scPp'
90+--
91+-- * 'scAccessToken'
92+--
93+-- * 'scUploadType'
94+--
95+-- * 'scPayload'
96+--
97+-- * 'scBearerToken'
98+--
99+-- * 'scCallback'
100+servicesCreate
101+ :: ManagedService -- ^ 'scPayload'
102+ -> ServicesCreate
103+servicesCreate pScPayload_ =
104+ ServicesCreate'
105+ { _scXgafv = Nothing
106+ , _scUploadProtocol = Nothing
107+ , _scPp = True
108+ , _scAccessToken = Nothing
109+ , _scUploadType = Nothing
110+ , _scPayload = pScPayload_
111+ , _scBearerToken = Nothing
112+ , _scCallback = Nothing
113+ }
114+
115+-- | V1 error format.
116+scXgafv :: Lens' ServicesCreate (Maybe Xgafv)
117+scXgafv = lens _scXgafv (\ s a -> s{_scXgafv = a})
118+
119+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
120+scUploadProtocol :: Lens' ServicesCreate (Maybe Text)
121+scUploadProtocol
122+ = lens _scUploadProtocol
123+ (\ s a -> s{_scUploadProtocol = a})
124+
125+-- | Pretty-print response.
126+scPp :: Lens' ServicesCreate Bool
127+scPp = lens _scPp (\ s a -> s{_scPp = a})
128+
129+-- | OAuth access token.
130+scAccessToken :: Lens' ServicesCreate (Maybe Text)
131+scAccessToken
132+ = lens _scAccessToken
133+ (\ s a -> s{_scAccessToken = a})
134+
135+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
136+scUploadType :: Lens' ServicesCreate (Maybe Text)
137+scUploadType
138+ = lens _scUploadType (\ s a -> s{_scUploadType = a})
139+
140+-- | Multipart request metadata.
141+scPayload :: Lens' ServicesCreate ManagedService
142+scPayload
143+ = lens _scPayload (\ s a -> s{_scPayload = a})
144+
145+-- | OAuth bearer token.
146+scBearerToken :: Lens' ServicesCreate (Maybe Text)
147+scBearerToken
148+ = lens _scBearerToken
149+ (\ s a -> s{_scBearerToken = a})
150+
151+-- | JSONP
152+scCallback :: Lens' ServicesCreate (Maybe Text)
153+scCallback
154+ = lens _scCallback (\ s a -> s{_scCallback = a})
155+
156+instance GoogleRequest ServicesCreate where
157+ type Rs ServicesCreate = Operation
158+ type Scopes ServicesCreate =
159+ '["https://www.googleapis.com/auth/cloud-platform",
160+ "https://www.googleapis.com/auth/service.management"]
161+ requestClient ServicesCreate'{..}
162+ = go _scXgafv _scUploadProtocol (Just _scPp)
163+ _scAccessToken
164+ _scUploadType
165+ _scBearerToken
166+ _scCallback
167+ (Just AltJSON)
168+ _scPayload
169+ serviceManagementService
170+ where go
171+ = buildClient (Proxy :: Proxy ServicesCreateResource)
172+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Delete.hsnew file+178
@@ -0,0 +1,178 @@
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.ServiceManagement.Services.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 managed service. This method will change the serivce in the
24+-- \`Soft-Delete\` state for 30 days. Within this period, service producers
25+-- may call UndeleteService to restore the service. After 30 days, the
26+-- service will be permanently deleted. Operation
27+--
28+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.delete@.
29+module Network.Google.Resource.ServiceManagement.Services.Delete
30+ (
31+ -- * REST Resource
32+ ServicesDeleteResource
33+
34+ -- * Creating a Request
35+ , servicesDelete
36+ , ServicesDelete
37+
38+ -- * Request Lenses
39+ , sdXgafv
40+ , sdUploadProtocol
41+ , sdPp
42+ , sdAccessToken
43+ , sdUploadType
44+ , sdBearerToken
45+ , sdServiceName
46+ , sdCallback
47+ ) where
48+
49+import Network.Google.Prelude
50+import Network.Google.ServiceManagement.Types
51+
52+-- | A resource alias for @servicemanagement.services.delete@ method which the
53+-- 'ServicesDelete' request conforms to.
54+type ServicesDeleteResource =
55+ "v1" :>
56+ "services" :>
57+ Capture "serviceName" Text :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "callback" Text :>
65+ QueryParam "alt" AltJSON :> Delete '[JSON] Operation
66+
67+-- | Deletes a managed service. This method will change the serivce in the
68+-- \`Soft-Delete\` state for 30 days. Within this period, service producers
69+-- may call UndeleteService to restore the service. After 30 days, the
70+-- service will be permanently deleted. Operation
71+--
72+-- /See:/ 'servicesDelete' smart constructor.
73+data ServicesDelete = ServicesDelete'
74+ { _sdXgafv :: !(Maybe Xgafv)
75+ , _sdUploadProtocol :: !(Maybe Text)
76+ , _sdPp :: !Bool
77+ , _sdAccessToken :: !(Maybe Text)
78+ , _sdUploadType :: !(Maybe Text)
79+ , _sdBearerToken :: !(Maybe Text)
80+ , _sdServiceName :: !Text
81+ , _sdCallback :: !(Maybe Text)
82+ } deriving (Eq,Show,Data,Typeable,Generic)
83+
84+-- | Creates a value of 'ServicesDelete' with the minimum fields required to make a request.
85+--
86+-- Use one of the following lenses to modify other fields as desired:
87+--
88+-- * 'sdXgafv'
89+--
90+-- * 'sdUploadProtocol'
91+--
92+-- * 'sdPp'
93+--
94+-- * 'sdAccessToken'
95+--
96+-- * 'sdUploadType'
97+--
98+-- * 'sdBearerToken'
99+--
100+-- * 'sdServiceName'
101+--
102+-- * 'sdCallback'
103+servicesDelete
104+ :: Text -- ^ 'sdServiceName'
105+ -> ServicesDelete
106+servicesDelete pSdServiceName_ =
107+ ServicesDelete'
108+ { _sdXgafv = Nothing
109+ , _sdUploadProtocol = Nothing
110+ , _sdPp = True
111+ , _sdAccessToken = Nothing
112+ , _sdUploadType = Nothing
113+ , _sdBearerToken = Nothing
114+ , _sdServiceName = pSdServiceName_
115+ , _sdCallback = Nothing
116+ }
117+
118+-- | V1 error format.
119+sdXgafv :: Lens' ServicesDelete (Maybe Xgafv)
120+sdXgafv = lens _sdXgafv (\ s a -> s{_sdXgafv = a})
121+
122+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
123+sdUploadProtocol :: Lens' ServicesDelete (Maybe Text)
124+sdUploadProtocol
125+ = lens _sdUploadProtocol
126+ (\ s a -> s{_sdUploadProtocol = a})
127+
128+-- | Pretty-print response.
129+sdPp :: Lens' ServicesDelete Bool
130+sdPp = lens _sdPp (\ s a -> s{_sdPp = a})
131+
132+-- | OAuth access token.
133+sdAccessToken :: Lens' ServicesDelete (Maybe Text)
134+sdAccessToken
135+ = lens _sdAccessToken
136+ (\ s a -> s{_sdAccessToken = a})
137+
138+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
139+sdUploadType :: Lens' ServicesDelete (Maybe Text)
140+sdUploadType
141+ = lens _sdUploadType (\ s a -> s{_sdUploadType = a})
142+
143+-- | OAuth bearer token.
144+sdBearerToken :: Lens' ServicesDelete (Maybe Text)
145+sdBearerToken
146+ = lens _sdBearerToken
147+ (\ s a -> s{_sdBearerToken = a})
148+
149+-- | The name of the service. See the
150+-- [overview](\/service-management\/overview) for naming requirements. For
151+-- example: \`example.googleapis.com\`.
152+sdServiceName :: Lens' ServicesDelete Text
153+sdServiceName
154+ = lens _sdServiceName
155+ (\ s a -> s{_sdServiceName = a})
156+
157+-- | JSONP
158+sdCallback :: Lens' ServicesDelete (Maybe Text)
159+sdCallback
160+ = lens _sdCallback (\ s a -> s{_sdCallback = a})
161+
162+instance GoogleRequest ServicesDelete where
163+ type Rs ServicesDelete = Operation
164+ type Scopes ServicesDelete =
165+ '["https://www.googleapis.com/auth/cloud-platform",
166+ "https://www.googleapis.com/auth/service.management"]
167+ requestClient ServicesDelete'{..}
168+ = go _sdServiceName _sdXgafv _sdUploadProtocol
169+ (Just _sdPp)
170+ _sdAccessToken
171+ _sdUploadType
172+ _sdBearerToken
173+ _sdCallback
174+ (Just AltJSON)
175+ serviceManagementService
176+ where go
177+ = buildClient (Proxy :: Proxy ServicesDeleteResource)
178+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Disable.hsnew file+182
@@ -0,0 +1,182 @@
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.ServiceManagement.Services.Disable
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+-- Disable a managed service for a project. Operation
24+--
25+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.disable@.
26+module Network.Google.Resource.ServiceManagement.Services.Disable
27+ (
28+ -- * REST Resource
29+ ServicesDisableResource
30+
31+ -- * Creating a Request
32+ , servicesDisable
33+ , ServicesDisable
34+
35+ -- * Request Lenses
36+ , sXgafv
37+ , sUploadProtocol
38+ , sPp
39+ , sAccessToken
40+ , sUploadType
41+ , sPayload
42+ , sBearerToken
43+ , sServiceName
44+ , sCallback
45+ ) where
46+
47+import Network.Google.Prelude
48+import Network.Google.ServiceManagement.Types
49+
50+-- | A resource alias for @servicemanagement.services.disable@ method which the
51+-- 'ServicesDisable' request conforms to.
52+type ServicesDisableResource =
53+ "v1" :>
54+ "services" :>
55+ CaptureMode "serviceName" "disable" Text :>
56+ QueryParam "$.xgafv" Xgafv :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :>
64+ ReqBody '[JSON] DisableServiceRequest :>
65+ Post '[JSON] Operation
66+
67+-- | Disable a managed service for a project. Operation
68+--
69+-- /See:/ 'servicesDisable' smart constructor.
70+data ServicesDisable = ServicesDisable'
71+ { _sXgafv :: !(Maybe Xgafv)
72+ , _sUploadProtocol :: !(Maybe Text)
73+ , _sPp :: !Bool
74+ , _sAccessToken :: !(Maybe Text)
75+ , _sUploadType :: !(Maybe Text)
76+ , _sPayload :: !DisableServiceRequest
77+ , _sBearerToken :: !(Maybe Text)
78+ , _sServiceName :: !Text
79+ , _sCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ServicesDisable' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'sXgafv'
87+--
88+-- * 'sUploadProtocol'
89+--
90+-- * 'sPp'
91+--
92+-- * 'sAccessToken'
93+--
94+-- * 'sUploadType'
95+--
96+-- * 'sPayload'
97+--
98+-- * 'sBearerToken'
99+--
100+-- * 'sServiceName'
101+--
102+-- * 'sCallback'
103+servicesDisable
104+ :: DisableServiceRequest -- ^ 'sPayload'
105+ -> Text -- ^ 'sServiceName'
106+ -> ServicesDisable
107+servicesDisable pSPayload_ pSServiceName_ =
108+ ServicesDisable'
109+ { _sXgafv = Nothing
110+ , _sUploadProtocol = Nothing
111+ , _sPp = True
112+ , _sAccessToken = Nothing
113+ , _sUploadType = Nothing
114+ , _sPayload = pSPayload_
115+ , _sBearerToken = Nothing
116+ , _sServiceName = pSServiceName_
117+ , _sCallback = Nothing
118+ }
119+
120+-- | V1 error format.
121+sXgafv :: Lens' ServicesDisable (Maybe Xgafv)
122+sXgafv = lens _sXgafv (\ s a -> s{_sXgafv = a})
123+
124+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
125+sUploadProtocol :: Lens' ServicesDisable (Maybe Text)
126+sUploadProtocol
127+ = lens _sUploadProtocol
128+ (\ s a -> s{_sUploadProtocol = a})
129+
130+-- | Pretty-print response.
131+sPp :: Lens' ServicesDisable Bool
132+sPp = lens _sPp (\ s a -> s{_sPp = a})
133+
134+-- | OAuth access token.
135+sAccessToken :: Lens' ServicesDisable (Maybe Text)
136+sAccessToken
137+ = lens _sAccessToken (\ s a -> s{_sAccessToken = a})
138+
139+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
140+sUploadType :: Lens' ServicesDisable (Maybe Text)
141+sUploadType
142+ = lens _sUploadType (\ s a -> s{_sUploadType = a})
143+
144+-- | Multipart request metadata.
145+sPayload :: Lens' ServicesDisable DisableServiceRequest
146+sPayload = lens _sPayload (\ s a -> s{_sPayload = a})
147+
148+-- | OAuth bearer token.
149+sBearerToken :: Lens' ServicesDisable (Maybe Text)
150+sBearerToken
151+ = lens _sBearerToken (\ s a -> s{_sBearerToken = a})
152+
153+-- | Name of the service to disable. Specifying an unknown service name will
154+-- cause the request to fail.
155+sServiceName :: Lens' ServicesDisable Text
156+sServiceName
157+ = lens _sServiceName (\ s a -> s{_sServiceName = a})
158+
159+-- | JSONP
160+sCallback :: Lens' ServicesDisable (Maybe Text)
161+sCallback
162+ = lens _sCallback (\ s a -> s{_sCallback = a})
163+
164+instance GoogleRequest ServicesDisable where
165+ type Rs ServicesDisable = Operation
166+ type Scopes ServicesDisable =
167+ '["https://www.googleapis.com/auth/cloud-platform",
168+ "https://www.googleapis.com/auth/service.management"]
169+ requestClient ServicesDisable'{..}
170+ = go _sServiceName _sXgafv _sUploadProtocol
171+ (Just _sPp)
172+ _sAccessToken
173+ _sUploadType
174+ _sBearerToken
175+ _sCallback
176+ (Just AltJSON)
177+ _sPayload
178+ serviceManagementService
179+ where go
180+ = buildClient
181+ (Proxy :: Proxy ServicesDisableResource)
182+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Enable.hsnew file+189
@@ -0,0 +1,189 @@
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.ServiceManagement.Services.Enable
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+-- Enable a managed service for a project with default setting. Operation
24+-- google.rpc.Status errors may contain a google.rpc.PreconditionFailure
25+-- error detail.
26+--
27+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.enable@.
28+module Network.Google.Resource.ServiceManagement.Services.Enable
29+ (
30+ -- * REST Resource
31+ ServicesEnableResource
32+
33+ -- * Creating a Request
34+ , servicesEnable
35+ , ServicesEnable
36+
37+ -- * Request Lenses
38+ , seXgafv
39+ , seUploadProtocol
40+ , sePp
41+ , seAccessToken
42+ , seUploadType
43+ , sePayload
44+ , seBearerToken
45+ , seServiceName
46+ , seCallback
47+ ) where
48+
49+import Network.Google.Prelude
50+import Network.Google.ServiceManagement.Types
51+
52+-- | A resource alias for @servicemanagement.services.enable@ method which the
53+-- 'ServicesEnable' request conforms to.
54+type ServicesEnableResource =
55+ "v1" :>
56+ "services" :>
57+ CaptureMode "serviceName" "enable" Text :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "callback" Text :>
65+ QueryParam "alt" AltJSON :>
66+ ReqBody '[JSON] EnableServiceRequest :>
67+ Post '[JSON] Operation
68+
69+-- | Enable a managed service for a project with default setting. Operation
70+-- google.rpc.Status errors may contain a google.rpc.PreconditionFailure
71+-- error detail.
72+--
73+-- /See:/ 'servicesEnable' smart constructor.
74+data ServicesEnable = ServicesEnable'
75+ { _seXgafv :: !(Maybe Xgafv)
76+ , _seUploadProtocol :: !(Maybe Text)
77+ , _sePp :: !Bool
78+ , _seAccessToken :: !(Maybe Text)
79+ , _seUploadType :: !(Maybe Text)
80+ , _sePayload :: !EnableServiceRequest
81+ , _seBearerToken :: !(Maybe Text)
82+ , _seServiceName :: !Text
83+ , _seCallback :: !(Maybe Text)
84+ } deriving (Eq,Show,Data,Typeable,Generic)
85+
86+-- | Creates a value of 'ServicesEnable' with the minimum fields required to make a request.
87+--
88+-- Use one of the following lenses to modify other fields as desired:
89+--
90+-- * 'seXgafv'
91+--
92+-- * 'seUploadProtocol'
93+--
94+-- * 'sePp'
95+--
96+-- * 'seAccessToken'
97+--
98+-- * 'seUploadType'
99+--
100+-- * 'sePayload'
101+--
102+-- * 'seBearerToken'
103+--
104+-- * 'seServiceName'
105+--
106+-- * 'seCallback'
107+servicesEnable
108+ :: EnableServiceRequest -- ^ 'sePayload'
109+ -> Text -- ^ 'seServiceName'
110+ -> ServicesEnable
111+servicesEnable pSePayload_ pSeServiceName_ =
112+ ServicesEnable'
113+ { _seXgafv = Nothing
114+ , _seUploadProtocol = Nothing
115+ , _sePp = True
116+ , _seAccessToken = Nothing
117+ , _seUploadType = Nothing
118+ , _sePayload = pSePayload_
119+ , _seBearerToken = Nothing
120+ , _seServiceName = pSeServiceName_
121+ , _seCallback = Nothing
122+ }
123+
124+-- | V1 error format.
125+seXgafv :: Lens' ServicesEnable (Maybe Xgafv)
126+seXgafv = lens _seXgafv (\ s a -> s{_seXgafv = a})
127+
128+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
129+seUploadProtocol :: Lens' ServicesEnable (Maybe Text)
130+seUploadProtocol
131+ = lens _seUploadProtocol
132+ (\ s a -> s{_seUploadProtocol = a})
133+
134+-- | Pretty-print response.
135+sePp :: Lens' ServicesEnable Bool
136+sePp = lens _sePp (\ s a -> s{_sePp = a})
137+
138+-- | OAuth access token.
139+seAccessToken :: Lens' ServicesEnable (Maybe Text)
140+seAccessToken
141+ = lens _seAccessToken
142+ (\ s a -> s{_seAccessToken = a})
143+
144+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
145+seUploadType :: Lens' ServicesEnable (Maybe Text)
146+seUploadType
147+ = lens _seUploadType (\ s a -> s{_seUploadType = a})
148+
149+-- | Multipart request metadata.
150+sePayload :: Lens' ServicesEnable EnableServiceRequest
151+sePayload
152+ = lens _sePayload (\ s a -> s{_sePayload = a})
153+
154+-- | OAuth bearer token.
155+seBearerToken :: Lens' ServicesEnable (Maybe Text)
156+seBearerToken
157+ = lens _seBearerToken
158+ (\ s a -> s{_seBearerToken = a})
159+
160+-- | Name of the service to enable. Specifying an unknown service name will
161+-- cause the request to fail.
162+seServiceName :: Lens' ServicesEnable Text
163+seServiceName
164+ = lens _seServiceName
165+ (\ s a -> s{_seServiceName = a})
166+
167+-- | JSONP
168+seCallback :: Lens' ServicesEnable (Maybe Text)
169+seCallback
170+ = lens _seCallback (\ s a -> s{_seCallback = a})
171+
172+instance GoogleRequest ServicesEnable where
173+ type Rs ServicesEnable = Operation
174+ type Scopes ServicesEnable =
175+ '["https://www.googleapis.com/auth/cloud-platform",
176+ "https://www.googleapis.com/auth/service.management"]
177+ requestClient ServicesEnable'{..}
178+ = go _seServiceName _seXgafv _seUploadProtocol
179+ (Just _sePp)
180+ _seAccessToken
181+ _seUploadType
182+ _seBearerToken
183+ _seCallback
184+ (Just AltJSON)
185+ _sePayload
186+ serviceManagementService
187+ where go
188+ = buildClient (Proxy :: Proxy ServicesEnableResource)
189+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/GenerateConfigReport.hsnew file+193
@@ -0,0 +1,193 @@
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.ServiceManagement.Services.GenerateConfigReport
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+-- Generates and returns a report (errors, warnings and changes from
24+-- existing configurations) associated with
25+-- GenerateConfigReportRequest.new_value If
26+-- GenerateConfigReportRequest.old_value is specified,
27+-- GenerateConfigReportRequest will contain a single ChangeReport based on
28+-- the comparison between GenerateConfigReportRequest.new_value and
29+-- GenerateConfigReportRequest.old_value. If
30+-- GenerateConfigReportRequest.old_value is not specified, this method will
31+-- compare GenerateConfigReportRequest.new_value with the last pushed
32+-- service configuration.
33+--
34+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.generateConfigReport@.
35+module Network.Google.Resource.ServiceManagement.Services.GenerateConfigReport
36+ (
37+ -- * REST Resource
38+ ServicesGenerateConfigReportResource
39+
40+ -- * Creating a Request
41+ , servicesGenerateConfigReport
42+ , ServicesGenerateConfigReport
43+
44+ -- * Request Lenses
45+ , sgcrXgafv
46+ , sgcrUploadProtocol
47+ , sgcrPp
48+ , sgcrAccessToken
49+ , sgcrUploadType
50+ , sgcrPayload
51+ , sgcrBearerToken
52+ , sgcrCallback
53+ ) where
54+
55+import Network.Google.Prelude
56+import Network.Google.ServiceManagement.Types
57+
58+-- | A resource alias for @servicemanagement.services.generateConfigReport@ method which the
59+-- 'ServicesGenerateConfigReport' request conforms to.
60+type ServicesGenerateConfigReportResource =
61+ "v1" :>
62+ "services:generateConfigReport" :>
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] GenerateConfigReportRequest :>
72+ Post '[JSON] GenerateConfigReportResponse
73+
74+-- | Generates and returns a report (errors, warnings and changes from
75+-- existing configurations) associated with
76+-- GenerateConfigReportRequest.new_value If
77+-- GenerateConfigReportRequest.old_value is specified,
78+-- GenerateConfigReportRequest will contain a single ChangeReport based on
79+-- the comparison between GenerateConfigReportRequest.new_value and
80+-- GenerateConfigReportRequest.old_value. If
81+-- GenerateConfigReportRequest.old_value is not specified, this method will
82+-- compare GenerateConfigReportRequest.new_value with the last pushed
83+-- service configuration.
84+--
85+-- /See:/ 'servicesGenerateConfigReport' smart constructor.
86+data ServicesGenerateConfigReport = ServicesGenerateConfigReport'
87+ { _sgcrXgafv :: !(Maybe Xgafv)
88+ , _sgcrUploadProtocol :: !(Maybe Text)
89+ , _sgcrPp :: !Bool
90+ , _sgcrAccessToken :: !(Maybe Text)
91+ , _sgcrUploadType :: !(Maybe Text)
92+ , _sgcrPayload :: !GenerateConfigReportRequest
93+ , _sgcrBearerToken :: !(Maybe Text)
94+ , _sgcrCallback :: !(Maybe Text)
95+ } deriving (Eq,Show,Data,Typeable,Generic)
96+
97+-- | Creates a value of 'ServicesGenerateConfigReport' 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+-- * 'sgcrXgafv'
102+--
103+-- * 'sgcrUploadProtocol'
104+--
105+-- * 'sgcrPp'
106+--
107+-- * 'sgcrAccessToken'
108+--
109+-- * 'sgcrUploadType'
110+--
111+-- * 'sgcrPayload'
112+--
113+-- * 'sgcrBearerToken'
114+--
115+-- * 'sgcrCallback'
116+servicesGenerateConfigReport
117+ :: GenerateConfigReportRequest -- ^ 'sgcrPayload'
118+ -> ServicesGenerateConfigReport
119+servicesGenerateConfigReport pSgcrPayload_ =
120+ ServicesGenerateConfigReport'
121+ { _sgcrXgafv = Nothing
122+ , _sgcrUploadProtocol = Nothing
123+ , _sgcrPp = True
124+ , _sgcrAccessToken = Nothing
125+ , _sgcrUploadType = Nothing
126+ , _sgcrPayload = pSgcrPayload_
127+ , _sgcrBearerToken = Nothing
128+ , _sgcrCallback = Nothing
129+ }
130+
131+-- | V1 error format.
132+sgcrXgafv :: Lens' ServicesGenerateConfigReport (Maybe Xgafv)
133+sgcrXgafv
134+ = lens _sgcrXgafv (\ s a -> s{_sgcrXgafv = a})
135+
136+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
137+sgcrUploadProtocol :: Lens' ServicesGenerateConfigReport (Maybe Text)
138+sgcrUploadProtocol
139+ = lens _sgcrUploadProtocol
140+ (\ s a -> s{_sgcrUploadProtocol = a})
141+
142+-- | Pretty-print response.
143+sgcrPp :: Lens' ServicesGenerateConfigReport Bool
144+sgcrPp = lens _sgcrPp (\ s a -> s{_sgcrPp = a})
145+
146+-- | OAuth access token.
147+sgcrAccessToken :: Lens' ServicesGenerateConfigReport (Maybe Text)
148+sgcrAccessToken
149+ = lens _sgcrAccessToken
150+ (\ s a -> s{_sgcrAccessToken = a})
151+
152+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
153+sgcrUploadType :: Lens' ServicesGenerateConfigReport (Maybe Text)
154+sgcrUploadType
155+ = lens _sgcrUploadType
156+ (\ s a -> s{_sgcrUploadType = a})
157+
158+-- | Multipart request metadata.
159+sgcrPayload :: Lens' ServicesGenerateConfigReport GenerateConfigReportRequest
160+sgcrPayload
161+ = lens _sgcrPayload (\ s a -> s{_sgcrPayload = a})
162+
163+-- | OAuth bearer token.
164+sgcrBearerToken :: Lens' ServicesGenerateConfigReport (Maybe Text)
165+sgcrBearerToken
166+ = lens _sgcrBearerToken
167+ (\ s a -> s{_sgcrBearerToken = a})
168+
169+-- | JSONP
170+sgcrCallback :: Lens' ServicesGenerateConfigReport (Maybe Text)
171+sgcrCallback
172+ = lens _sgcrCallback (\ s a -> s{_sgcrCallback = a})
173+
174+instance GoogleRequest ServicesGenerateConfigReport
175+ where
176+ type Rs ServicesGenerateConfigReport =
177+ GenerateConfigReportResponse
178+ type Scopes ServicesGenerateConfigReport =
179+ '["https://www.googleapis.com/auth/cloud-platform",
180+ "https://www.googleapis.com/auth/service.management"]
181+ requestClient ServicesGenerateConfigReport'{..}
182+ = go _sgcrXgafv _sgcrUploadProtocol (Just _sgcrPp)
183+ _sgcrAccessToken
184+ _sgcrUploadType
185+ _sgcrBearerToken
186+ _sgcrCallback
187+ (Just AltJSON)
188+ _sgcrPayload
189+ serviceManagementService
190+ where go
191+ = buildClient
192+ (Proxy :: Proxy ServicesGenerateConfigReportResource)
193+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Get.hsnew file+174
@@ -0,0 +1,174 @@
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.ServiceManagement.Services.Get
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+-- Gets a managed service.
24+--
25+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.get@.
26+module Network.Google.Resource.ServiceManagement.Services.Get
27+ (
28+ -- * REST Resource
29+ ServicesGetResource
30+
31+ -- * Creating a Request
32+ , servicesGet
33+ , ServicesGet
34+
35+ -- * Request Lenses
36+ , sgXgafv
37+ , sgUploadProtocol
38+ , sgPp
39+ , sgAccessToken
40+ , sgUploadType
41+ , sgBearerToken
42+ , sgServiceName
43+ , sgCallback
44+ ) where
45+
46+import Network.Google.Prelude
47+import Network.Google.ServiceManagement.Types
48+
49+-- | A resource alias for @servicemanagement.services.get@ method which the
50+-- 'ServicesGet' request conforms to.
51+type ServicesGetResource =
52+ "v1" :>
53+ "services" :>
54+ Capture "serviceName" Text :>
55+ QueryParam "$.xgafv" Xgafv :>
56+ QueryParam "upload_protocol" Text :>
57+ QueryParam "pp" Bool :>
58+ QueryParam "access_token" Text :>
59+ QueryParam "uploadType" Text :>
60+ QueryParam "bearer_token" Text :>
61+ QueryParam "callback" Text :>
62+ QueryParam "alt" AltJSON :>
63+ Get '[JSON] ManagedService
64+
65+-- | Gets a managed service.
66+--
67+-- /See:/ 'servicesGet' smart constructor.
68+data ServicesGet = ServicesGet'
69+ { _sgXgafv :: !(Maybe Xgafv)
70+ , _sgUploadProtocol :: !(Maybe Text)
71+ , _sgPp :: !Bool
72+ , _sgAccessToken :: !(Maybe Text)
73+ , _sgUploadType :: !(Maybe Text)
74+ , _sgBearerToken :: !(Maybe Text)
75+ , _sgServiceName :: !Text
76+ , _sgCallback :: !(Maybe Text)
77+ } deriving (Eq,Show,Data,Typeable,Generic)
78+
79+-- | Creates a value of 'ServicesGet' with the minimum fields required to make a request.
80+--
81+-- Use one of the following lenses to modify other fields as desired:
82+--
83+-- * 'sgXgafv'
84+--
85+-- * 'sgUploadProtocol'
86+--
87+-- * 'sgPp'
88+--
89+-- * 'sgAccessToken'
90+--
91+-- * 'sgUploadType'
92+--
93+-- * 'sgBearerToken'
94+--
95+-- * 'sgServiceName'
96+--
97+-- * 'sgCallback'
98+servicesGet
99+ :: Text -- ^ 'sgServiceName'
100+ -> ServicesGet
101+servicesGet pSgServiceName_ =
102+ ServicesGet'
103+ { _sgXgafv = Nothing
104+ , _sgUploadProtocol = Nothing
105+ , _sgPp = True
106+ , _sgAccessToken = Nothing
107+ , _sgUploadType = Nothing
108+ , _sgBearerToken = Nothing
109+ , _sgServiceName = pSgServiceName_
110+ , _sgCallback = Nothing
111+ }
112+
113+-- | V1 error format.
114+sgXgafv :: Lens' ServicesGet (Maybe Xgafv)
115+sgXgafv = lens _sgXgafv (\ s a -> s{_sgXgafv = a})
116+
117+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
118+sgUploadProtocol :: Lens' ServicesGet (Maybe Text)
119+sgUploadProtocol
120+ = lens _sgUploadProtocol
121+ (\ s a -> s{_sgUploadProtocol = a})
122+
123+-- | Pretty-print response.
124+sgPp :: Lens' ServicesGet Bool
125+sgPp = lens _sgPp (\ s a -> s{_sgPp = a})
126+
127+-- | OAuth access token.
128+sgAccessToken :: Lens' ServicesGet (Maybe Text)
129+sgAccessToken
130+ = lens _sgAccessToken
131+ (\ s a -> s{_sgAccessToken = a})
132+
133+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
134+sgUploadType :: Lens' ServicesGet (Maybe Text)
135+sgUploadType
136+ = lens _sgUploadType (\ s a -> s{_sgUploadType = a})
137+
138+-- | OAuth bearer token.
139+sgBearerToken :: Lens' ServicesGet (Maybe Text)
140+sgBearerToken
141+ = lens _sgBearerToken
142+ (\ s a -> s{_sgBearerToken = a})
143+
144+-- | The name of the service. See the \`ServiceManager\` overview for naming
145+-- requirements. For example: \`example.googleapis.com\`.
146+sgServiceName :: Lens' ServicesGet Text
147+sgServiceName
148+ = lens _sgServiceName
149+ (\ s a -> s{_sgServiceName = a})
150+
151+-- | JSONP
152+sgCallback :: Lens' ServicesGet (Maybe Text)
153+sgCallback
154+ = lens _sgCallback (\ s a -> s{_sgCallback = a})
155+
156+instance GoogleRequest ServicesGet where
157+ type Rs ServicesGet = ManagedService
158+ type Scopes ServicesGet =
159+ '["https://www.googleapis.com/auth/cloud-platform",
160+ "https://www.googleapis.com/auth/cloud-platform.read-only",
161+ "https://www.googleapis.com/auth/service.management",
162+ "https://www.googleapis.com/auth/service.management.readonly"]
163+ requestClient ServicesGet'{..}
164+ = go _sgServiceName _sgXgafv _sgUploadProtocol
165+ (Just _sgPp)
166+ _sgAccessToken
167+ _sgUploadType
168+ _sgBearerToken
169+ _sgCallback
170+ (Just AltJSON)
171+ serviceManagementService
172+ where go
173+ = buildClient (Proxy :: Proxy ServicesGetResource)
174+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/GetConfig.hsnew file+188
@@ -0,0 +1,188 @@
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.ServiceManagement.Services.GetConfig
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+-- Gets a service configuration (version) for a managed service.
24+--
25+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.getConfig@.
26+module Network.Google.Resource.ServiceManagement.Services.GetConfig
27+ (
28+ -- * REST Resource
29+ ServicesGetConfigResource
30+
31+ -- * Creating a Request
32+ , servicesGetConfig
33+ , ServicesGetConfig
34+
35+ -- * Request Lenses
36+ , sgcXgafv
37+ , sgcUploadProtocol
38+ , sgcPp
39+ , sgcAccessToken
40+ , sgcUploadType
41+ , sgcBearerToken
42+ , sgcConfigId
43+ , sgcServiceName
44+ , sgcCallback
45+ ) where
46+
47+import Network.Google.Prelude
48+import Network.Google.ServiceManagement.Types
49+
50+-- | A resource alias for @servicemanagement.services.getConfig@ method which the
51+-- 'ServicesGetConfig' request conforms to.
52+type ServicesGetConfigResource =
53+ "v1" :>
54+ "services" :>
55+ Capture "serviceName" Text :>
56+ "config" :>
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 "configId" Text :>
64+ QueryParam "callback" Text :>
65+ QueryParam "alt" AltJSON :> Get '[JSON] Service
66+
67+-- | Gets a service configuration (version) for a managed service.
68+--
69+-- /See:/ 'servicesGetConfig' smart constructor.
70+data ServicesGetConfig = ServicesGetConfig'
71+ { _sgcXgafv :: !(Maybe Xgafv)
72+ , _sgcUploadProtocol :: !(Maybe Text)
73+ , _sgcPp :: !Bool
74+ , _sgcAccessToken :: !(Maybe Text)
75+ , _sgcUploadType :: !(Maybe Text)
76+ , _sgcBearerToken :: !(Maybe Text)
77+ , _sgcConfigId :: !(Maybe Text)
78+ , _sgcServiceName :: !Text
79+ , _sgcCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ServicesGetConfig' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'sgcXgafv'
87+--
88+-- * 'sgcUploadProtocol'
89+--
90+-- * 'sgcPp'
91+--
92+-- * 'sgcAccessToken'
93+--
94+-- * 'sgcUploadType'
95+--
96+-- * 'sgcBearerToken'
97+--
98+-- * 'sgcConfigId'
99+--
100+-- * 'sgcServiceName'
101+--
102+-- * 'sgcCallback'
103+servicesGetConfig
104+ :: Text -- ^ 'sgcServiceName'
105+ -> ServicesGetConfig
106+servicesGetConfig pSgcServiceName_ =
107+ ServicesGetConfig'
108+ { _sgcXgafv = Nothing
109+ , _sgcUploadProtocol = Nothing
110+ , _sgcPp = True
111+ , _sgcAccessToken = Nothing
112+ , _sgcUploadType = Nothing
113+ , _sgcBearerToken = Nothing
114+ , _sgcConfigId = Nothing
115+ , _sgcServiceName = pSgcServiceName_
116+ , _sgcCallback = Nothing
117+ }
118+
119+-- | V1 error format.
120+sgcXgafv :: Lens' ServicesGetConfig (Maybe Xgafv)
121+sgcXgafv = lens _sgcXgafv (\ s a -> s{_sgcXgafv = a})
122+
123+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
124+sgcUploadProtocol :: Lens' ServicesGetConfig (Maybe Text)
125+sgcUploadProtocol
126+ = lens _sgcUploadProtocol
127+ (\ s a -> s{_sgcUploadProtocol = a})
128+
129+-- | Pretty-print response.
130+sgcPp :: Lens' ServicesGetConfig Bool
131+sgcPp = lens _sgcPp (\ s a -> s{_sgcPp = a})
132+
133+-- | OAuth access token.
134+sgcAccessToken :: Lens' ServicesGetConfig (Maybe Text)
135+sgcAccessToken
136+ = lens _sgcAccessToken
137+ (\ s a -> s{_sgcAccessToken = a})
138+
139+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
140+sgcUploadType :: Lens' ServicesGetConfig (Maybe Text)
141+sgcUploadType
142+ = lens _sgcUploadType
143+ (\ s a -> s{_sgcUploadType = a})
144+
145+-- | OAuth bearer token.
146+sgcBearerToken :: Lens' ServicesGetConfig (Maybe Text)
147+sgcBearerToken
148+ = lens _sgcBearerToken
149+ (\ s a -> s{_sgcBearerToken = a})
150+
151+sgcConfigId :: Lens' ServicesGetConfig (Maybe Text)
152+sgcConfigId
153+ = lens _sgcConfigId (\ s a -> s{_sgcConfigId = a})
154+
155+-- | The name of the service. See the
156+-- [overview](\/service-management\/overview) for naming requirements. For
157+-- example: \`example.googleapis.com\`.
158+sgcServiceName :: Lens' ServicesGetConfig Text
159+sgcServiceName
160+ = lens _sgcServiceName
161+ (\ s a -> s{_sgcServiceName = a})
162+
163+-- | JSONP
164+sgcCallback :: Lens' ServicesGetConfig (Maybe Text)
165+sgcCallback
166+ = lens _sgcCallback (\ s a -> s{_sgcCallback = a})
167+
168+instance GoogleRequest ServicesGetConfig where
169+ type Rs ServicesGetConfig = Service
170+ type Scopes ServicesGetConfig =
171+ '["https://www.googleapis.com/auth/cloud-platform",
172+ "https://www.googleapis.com/auth/cloud-platform.read-only",
173+ "https://www.googleapis.com/auth/service.management",
174+ "https://www.googleapis.com/auth/service.management.readonly"]
175+ requestClient ServicesGetConfig'{..}
176+ = go _sgcServiceName _sgcXgafv _sgcUploadProtocol
177+ (Just _sgcPp)
178+ _sgcAccessToken
179+ _sgcUploadType
180+ _sgcBearerToken
181+ _sgcConfigId
182+ _sgcCallback
183+ (Just AltJSON)
184+ serviceManagementService
185+ where go
186+ = buildClient
187+ (Proxy :: Proxy ServicesGetConfigResource)
188+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/GetIAMPolicy.hsnew file+189
@@ -0,0 +1,189 @@
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.ServiceManagement.Services.GetIAMPolicy
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+-- Gets the access control policy for a resource. Returns an empty policy
24+-- if the resource exists and does not have a policy set.
25+--
26+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.getIamPolicy@.
27+module Network.Google.Resource.ServiceManagement.Services.GetIAMPolicy
28+ (
29+ -- * REST Resource
30+ ServicesGetIAMPolicyResource
31+
32+ -- * Creating a Request
33+ , servicesGetIAMPolicy
34+ , ServicesGetIAMPolicy
35+
36+ -- * Request Lenses
37+ , sgipXgafv
38+ , sgipUploadProtocol
39+ , sgipPp
40+ , sgipAccessToken
41+ , sgipUploadType
42+ , sgipPayload
43+ , sgipBearerToken
44+ , sgipResource
45+ , sgipCallback
46+ ) where
47+
48+import Network.Google.Prelude
49+import Network.Google.ServiceManagement.Types
50+
51+-- | A resource alias for @servicemanagement.services.getIamPolicy@ method which the
52+-- 'ServicesGetIAMPolicy' request conforms to.
53+type ServicesGetIAMPolicyResource =
54+ "v1" :>
55+ CaptureMode "resource" "getIamPolicy" Text :>
56+ QueryParam "$.xgafv" Xgafv :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :>
64+ ReqBody '[JSON] GetIAMPolicyRequest :>
65+ Post '[JSON] Policy
66+
67+-- | Gets the access control policy for a resource. Returns an empty policy
68+-- if the resource exists and does not have a policy set.
69+--
70+-- /See:/ 'servicesGetIAMPolicy' smart constructor.
71+data ServicesGetIAMPolicy = ServicesGetIAMPolicy'
72+ { _sgipXgafv :: !(Maybe Xgafv)
73+ , _sgipUploadProtocol :: !(Maybe Text)
74+ , _sgipPp :: !Bool
75+ , _sgipAccessToken :: !(Maybe Text)
76+ , _sgipUploadType :: !(Maybe Text)
77+ , _sgipPayload :: !GetIAMPolicyRequest
78+ , _sgipBearerToken :: !(Maybe Text)
79+ , _sgipResource :: !Text
80+ , _sgipCallback :: !(Maybe Text)
81+ } deriving (Eq,Show,Data,Typeable,Generic)
82+
83+-- | Creates a value of 'ServicesGetIAMPolicy' 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+-- * 'sgipXgafv'
88+--
89+-- * 'sgipUploadProtocol'
90+--
91+-- * 'sgipPp'
92+--
93+-- * 'sgipAccessToken'
94+--
95+-- * 'sgipUploadType'
96+--
97+-- * 'sgipPayload'
98+--
99+-- * 'sgipBearerToken'
100+--
101+-- * 'sgipResource'
102+--
103+-- * 'sgipCallback'
104+servicesGetIAMPolicy
105+ :: GetIAMPolicyRequest -- ^ 'sgipPayload'
106+ -> Text -- ^ 'sgipResource'
107+ -> ServicesGetIAMPolicy
108+servicesGetIAMPolicy pSgipPayload_ pSgipResource_ =
109+ ServicesGetIAMPolicy'
110+ { _sgipXgafv = Nothing
111+ , _sgipUploadProtocol = Nothing
112+ , _sgipPp = True
113+ , _sgipAccessToken = Nothing
114+ , _sgipUploadType = Nothing
115+ , _sgipPayload = pSgipPayload_
116+ , _sgipBearerToken = Nothing
117+ , _sgipResource = pSgipResource_
118+ , _sgipCallback = Nothing
119+ }
120+
121+-- | V1 error format.
122+sgipXgafv :: Lens' ServicesGetIAMPolicy (Maybe Xgafv)
123+sgipXgafv
124+ = lens _sgipXgafv (\ s a -> s{_sgipXgafv = a})
125+
126+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
127+sgipUploadProtocol :: Lens' ServicesGetIAMPolicy (Maybe Text)
128+sgipUploadProtocol
129+ = lens _sgipUploadProtocol
130+ (\ s a -> s{_sgipUploadProtocol = a})
131+
132+-- | Pretty-print response.
133+sgipPp :: Lens' ServicesGetIAMPolicy Bool
134+sgipPp = lens _sgipPp (\ s a -> s{_sgipPp = a})
135+
136+-- | OAuth access token.
137+sgipAccessToken :: Lens' ServicesGetIAMPolicy (Maybe Text)
138+sgipAccessToken
139+ = lens _sgipAccessToken
140+ (\ s a -> s{_sgipAccessToken = a})
141+
142+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
143+sgipUploadType :: Lens' ServicesGetIAMPolicy (Maybe Text)
144+sgipUploadType
145+ = lens _sgipUploadType
146+ (\ s a -> s{_sgipUploadType = a})
147+
148+-- | Multipart request metadata.
149+sgipPayload :: Lens' ServicesGetIAMPolicy GetIAMPolicyRequest
150+sgipPayload
151+ = lens _sgipPayload (\ s a -> s{_sgipPayload = a})
152+
153+-- | OAuth bearer token.
154+sgipBearerToken :: Lens' ServicesGetIAMPolicy (Maybe Text)
155+sgipBearerToken
156+ = lens _sgipBearerToken
157+ (\ s a -> s{_sgipBearerToken = a})
158+
159+-- | REQUIRED: The resource for which the policy is being requested.
160+-- \`resource\` is usually specified as a path. For example, a Project
161+-- resource is specified as \`projects\/{project}\`.
162+sgipResource :: Lens' ServicesGetIAMPolicy Text
163+sgipResource
164+ = lens _sgipResource (\ s a -> s{_sgipResource = a})
165+
166+-- | JSONP
167+sgipCallback :: Lens' ServicesGetIAMPolicy (Maybe Text)
168+sgipCallback
169+ = lens _sgipCallback (\ s a -> s{_sgipCallback = a})
170+
171+instance GoogleRequest ServicesGetIAMPolicy where
172+ type Rs ServicesGetIAMPolicy = Policy
173+ type Scopes ServicesGetIAMPolicy =
174+ '["https://www.googleapis.com/auth/cloud-platform",
175+ "https://www.googleapis.com/auth/service.management"]
176+ requestClient ServicesGetIAMPolicy'{..}
177+ = go _sgipResource _sgipXgafv _sgipUploadProtocol
178+ (Just _sgipPp)
179+ _sgipAccessToken
180+ _sgipUploadType
181+ _sgipBearerToken
182+ _sgipCallback
183+ (Just AltJSON)
184+ _sgipPayload
185+ serviceManagementService
186+ where go
187+ = buildClient
188+ (Proxy :: Proxy ServicesGetIAMPolicyResource)
189+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/List.hsnew file+198
@@ -0,0 +1,198 @@
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.ServiceManagement.Services.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 all managed services.
24+--
25+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.list@.
26+module Network.Google.Resource.ServiceManagement.Services.List
27+ (
28+ -- * REST Resource
29+ ServicesListResource
30+
31+ -- * Creating a Request
32+ , servicesList
33+ , ServicesList
34+
35+ -- * Request Lenses
36+ , slXgafv
37+ , slUploadProtocol
38+ , slPp
39+ , slAccessToken
40+ , slUploadType
41+ , slBearerToken
42+ , slPageToken
43+ , slProducerProjectId
44+ , slPageSize
45+ , slCallback
46+ ) where
47+
48+import Network.Google.Prelude
49+import Network.Google.ServiceManagement.Types
50+
51+-- | A resource alias for @servicemanagement.services.list@ method which the
52+-- 'ServicesList' request conforms to.
53+type ServicesListResource =
54+ "v1" :>
55+ "services" :>
56+ QueryParam "$.xgafv" Xgafv :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "pageToken" Text :>
63+ QueryParam "producerProjectId" Text :>
64+ QueryParam "pageSize" (Textual Int32) :>
65+ QueryParam "callback" Text :>
66+ QueryParam "alt" AltJSON :>
67+ Get '[JSON] ListServicesResponse
68+
69+-- | Lists all managed services.
70+--
71+-- /See:/ 'servicesList' smart constructor.
72+data ServicesList = ServicesList'
73+ { _slXgafv :: !(Maybe Xgafv)
74+ , _slUploadProtocol :: !(Maybe Text)
75+ , _slPp :: !Bool
76+ , _slAccessToken :: !(Maybe Text)
77+ , _slUploadType :: !(Maybe Text)
78+ , _slBearerToken :: !(Maybe Text)
79+ , _slPageToken :: !(Maybe Text)
80+ , _slProducerProjectId :: !(Maybe Text)
81+ , _slPageSize :: !(Maybe (Textual Int32))
82+ , _slCallback :: !(Maybe Text)
83+ } deriving (Eq,Show,Data,Typeable,Generic)
84+
85+-- | Creates a value of 'ServicesList' with the minimum fields required to make a request.
86+--
87+-- Use one of the following lenses to modify other fields as desired:
88+--
89+-- * 'slXgafv'
90+--
91+-- * 'slUploadProtocol'
92+--
93+-- * 'slPp'
94+--
95+-- * 'slAccessToken'
96+--
97+-- * 'slUploadType'
98+--
99+-- * 'slBearerToken'
100+--
101+-- * 'slPageToken'
102+--
103+-- * 'slProducerProjectId'
104+--
105+-- * 'slPageSize'
106+--
107+-- * 'slCallback'
108+servicesList
109+ :: ServicesList
110+servicesList =
111+ ServicesList'
112+ { _slXgafv = Nothing
113+ , _slUploadProtocol = Nothing
114+ , _slPp = True
115+ , _slAccessToken = Nothing
116+ , _slUploadType = Nothing
117+ , _slBearerToken = Nothing
118+ , _slPageToken = Nothing
119+ , _slProducerProjectId = Nothing
120+ , _slPageSize = Nothing
121+ , _slCallback = Nothing
122+ }
123+
124+-- | V1 error format.
125+slXgafv :: Lens' ServicesList (Maybe Xgafv)
126+slXgafv = lens _slXgafv (\ s a -> s{_slXgafv = a})
127+
128+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
129+slUploadProtocol :: Lens' ServicesList (Maybe Text)
130+slUploadProtocol
131+ = lens _slUploadProtocol
132+ (\ s a -> s{_slUploadProtocol = a})
133+
134+-- | Pretty-print response.
135+slPp :: Lens' ServicesList Bool
136+slPp = lens _slPp (\ s a -> s{_slPp = a})
137+
138+-- | OAuth access token.
139+slAccessToken :: Lens' ServicesList (Maybe Text)
140+slAccessToken
141+ = lens _slAccessToken
142+ (\ s a -> s{_slAccessToken = a})
143+
144+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
145+slUploadType :: Lens' ServicesList (Maybe Text)
146+slUploadType
147+ = lens _slUploadType (\ s a -> s{_slUploadType = a})
148+
149+-- | OAuth bearer token.
150+slBearerToken :: Lens' ServicesList (Maybe Text)
151+slBearerToken
152+ = lens _slBearerToken
153+ (\ s a -> s{_slBearerToken = a})
154+
155+-- | Token identifying which result to start with; returned by a previous
156+-- list call.
157+slPageToken :: Lens' ServicesList (Maybe Text)
158+slPageToken
159+ = lens _slPageToken (\ s a -> s{_slPageToken = a})
160+
161+-- | Include services produced by the specified project.
162+slProducerProjectId :: Lens' ServicesList (Maybe Text)
163+slProducerProjectId
164+ = lens _slProducerProjectId
165+ (\ s a -> s{_slProducerProjectId = a})
166+
167+-- | Requested size of the next page of data.
168+slPageSize :: Lens' ServicesList (Maybe Int32)
169+slPageSize
170+ = lens _slPageSize (\ s a -> s{_slPageSize = a}) .
171+ mapping _Coerce
172+
173+-- | JSONP
174+slCallback :: Lens' ServicesList (Maybe Text)
175+slCallback
176+ = lens _slCallback (\ s a -> s{_slCallback = a})
177+
178+instance GoogleRequest ServicesList where
179+ type Rs ServicesList = ListServicesResponse
180+ type Scopes ServicesList =
181+ '["https://www.googleapis.com/auth/cloud-platform",
182+ "https://www.googleapis.com/auth/cloud-platform.read-only",
183+ "https://www.googleapis.com/auth/service.management",
184+ "https://www.googleapis.com/auth/service.management.readonly"]
185+ requestClient ServicesList'{..}
186+ = go _slXgafv _slUploadProtocol (Just _slPp)
187+ _slAccessToken
188+ _slUploadType
189+ _slBearerToken
190+ _slPageToken
191+ _slProducerProjectId
192+ _slPageSize
193+ _slCallback
194+ (Just AltJSON)
195+ serviceManagementService
196+ where go
197+ = buildClient (Proxy :: Proxy ServicesListResource)
198+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Rollouts/Create.hsnew file+200
@@ -0,0 +1,200 @@
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.ServiceManagement.Services.Rollouts.Create
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+-- Creates a new service configuration rollout. Based on rollout, the
24+-- Google Service Management will roll out the service configurations to
25+-- different backend services. For example, the logging configuration will
26+-- be pushed to Google Cloud Logging. Please note that any previous pending
27+-- and running Rollouts and associated Operations will be automatically
28+-- cancelled so that the latest Rollout will not be blocked by previous
29+-- Rollouts. Operation
30+--
31+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.rollouts.create@.
32+module Network.Google.Resource.ServiceManagement.Services.Rollouts.Create
33+ (
34+ -- * REST Resource
35+ ServicesRolloutsCreateResource
36+
37+ -- * Creating a Request
38+ , servicesRolloutsCreate
39+ , ServicesRolloutsCreate
40+
41+ -- * Request Lenses
42+ , srcXgafv
43+ , srcUploadProtocol
44+ , srcPp
45+ , srcAccessToken
46+ , srcUploadType
47+ , srcPayload
48+ , srcBearerToken
49+ , srcServiceName
50+ , srcCallback
51+ ) where
52+
53+import Network.Google.Prelude
54+import Network.Google.ServiceManagement.Types
55+
56+-- | A resource alias for @servicemanagement.services.rollouts.create@ method which the
57+-- 'ServicesRolloutsCreate' request conforms to.
58+type ServicesRolloutsCreateResource =
59+ "v1" :>
60+ "services" :>
61+ Capture "serviceName" Text :>
62+ "rollouts" :>
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] Rollout :> Post '[JSON] Operation
72+
73+-- | Creates a new service configuration rollout. Based on rollout, the
74+-- Google Service Management will roll out the service configurations to
75+-- different backend services. For example, the logging configuration will
76+-- be pushed to Google Cloud Logging. Please note that any previous pending
77+-- and running Rollouts and associated Operations will be automatically
78+-- cancelled so that the latest Rollout will not be blocked by previous
79+-- Rollouts. Operation
80+--
81+-- /See:/ 'servicesRolloutsCreate' smart constructor.
82+data ServicesRolloutsCreate = ServicesRolloutsCreate'
83+ { _srcXgafv :: !(Maybe Xgafv)
84+ , _srcUploadProtocol :: !(Maybe Text)
85+ , _srcPp :: !Bool
86+ , _srcAccessToken :: !(Maybe Text)
87+ , _srcUploadType :: !(Maybe Text)
88+ , _srcPayload :: !Rollout
89+ , _srcBearerToken :: !(Maybe Text)
90+ , _srcServiceName :: !Text
91+ , _srcCallback :: !(Maybe Text)
92+ } deriving (Eq,Show,Data,Typeable,Generic)
93+
94+-- | Creates a value of 'ServicesRolloutsCreate' with the minimum fields required to make a request.
95+--
96+-- Use one of the following lenses to modify other fields as desired:
97+--
98+-- * 'srcXgafv'
99+--
100+-- * 'srcUploadProtocol'
101+--
102+-- * 'srcPp'
103+--
104+-- * 'srcAccessToken'
105+--
106+-- * 'srcUploadType'
107+--
108+-- * 'srcPayload'
109+--
110+-- * 'srcBearerToken'
111+--
112+-- * 'srcServiceName'
113+--
114+-- * 'srcCallback'
115+servicesRolloutsCreate
116+ :: Rollout -- ^ 'srcPayload'
117+ -> Text -- ^ 'srcServiceName'
118+ -> ServicesRolloutsCreate
119+servicesRolloutsCreate pSrcPayload_ pSrcServiceName_ =
120+ ServicesRolloutsCreate'
121+ { _srcXgafv = Nothing
122+ , _srcUploadProtocol = Nothing
123+ , _srcPp = True
124+ , _srcAccessToken = Nothing
125+ , _srcUploadType = Nothing
126+ , _srcPayload = pSrcPayload_
127+ , _srcBearerToken = Nothing
128+ , _srcServiceName = pSrcServiceName_
129+ , _srcCallback = Nothing
130+ }
131+
132+-- | V1 error format.
133+srcXgafv :: Lens' ServicesRolloutsCreate (Maybe Xgafv)
134+srcXgafv = lens _srcXgafv (\ s a -> s{_srcXgafv = a})
135+
136+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
137+srcUploadProtocol :: Lens' ServicesRolloutsCreate (Maybe Text)
138+srcUploadProtocol
139+ = lens _srcUploadProtocol
140+ (\ s a -> s{_srcUploadProtocol = a})
141+
142+-- | Pretty-print response.
143+srcPp :: Lens' ServicesRolloutsCreate Bool
144+srcPp = lens _srcPp (\ s a -> s{_srcPp = a})
145+
146+-- | OAuth access token.
147+srcAccessToken :: Lens' ServicesRolloutsCreate (Maybe Text)
148+srcAccessToken
149+ = lens _srcAccessToken
150+ (\ s a -> s{_srcAccessToken = a})
151+
152+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
153+srcUploadType :: Lens' ServicesRolloutsCreate (Maybe Text)
154+srcUploadType
155+ = lens _srcUploadType
156+ (\ s a -> s{_srcUploadType = a})
157+
158+-- | Multipart request metadata.
159+srcPayload :: Lens' ServicesRolloutsCreate Rollout
160+srcPayload
161+ = lens _srcPayload (\ s a -> s{_srcPayload = a})
162+
163+-- | OAuth bearer token.
164+srcBearerToken :: Lens' ServicesRolloutsCreate (Maybe Text)
165+srcBearerToken
166+ = lens _srcBearerToken
167+ (\ s a -> s{_srcBearerToken = a})
168+
169+-- | The name of the service. See the
170+-- [overview](\/service-management\/overview) for naming requirements. For
171+-- example: \`example.googleapis.com\`.
172+srcServiceName :: Lens' ServicesRolloutsCreate Text
173+srcServiceName
174+ = lens _srcServiceName
175+ (\ s a -> s{_srcServiceName = a})
176+
177+-- | JSONP
178+srcCallback :: Lens' ServicesRolloutsCreate (Maybe Text)
179+srcCallback
180+ = lens _srcCallback (\ s a -> s{_srcCallback = a})
181+
182+instance GoogleRequest ServicesRolloutsCreate where
183+ type Rs ServicesRolloutsCreate = Operation
184+ type Scopes ServicesRolloutsCreate =
185+ '["https://www.googleapis.com/auth/cloud-platform",
186+ "https://www.googleapis.com/auth/service.management"]
187+ requestClient ServicesRolloutsCreate'{..}
188+ = go _srcServiceName _srcXgafv _srcUploadProtocol
189+ (Just _srcPp)
190+ _srcAccessToken
191+ _srcUploadType
192+ _srcBearerToken
193+ _srcCallback
194+ (Just AltJSON)
195+ _srcPayload
196+ serviceManagementService
197+ where go
198+ = buildClient
199+ (Proxy :: Proxy ServicesRolloutsCreateResource)
200+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Rollouts/Get.hsnew file+190
@@ -0,0 +1,190 @@
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.ServiceManagement.Services.Rollouts.Get
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+-- Gets a service configuration rollout.
24+--
25+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.rollouts.get@.
26+module Network.Google.Resource.ServiceManagement.Services.Rollouts.Get
27+ (
28+ -- * REST Resource
29+ ServicesRolloutsGetResource
30+
31+ -- * Creating a Request
32+ , servicesRolloutsGet
33+ , ServicesRolloutsGet
34+
35+ -- * Request Lenses
36+ , srgXgafv
37+ , srgUploadProtocol
38+ , srgPp
39+ , srgAccessToken
40+ , srgUploadType
41+ , srgBearerToken
42+ , srgServiceName
43+ , srgRolloutId
44+ , srgCallback
45+ ) where
46+
47+import Network.Google.Prelude
48+import Network.Google.ServiceManagement.Types
49+
50+-- | A resource alias for @servicemanagement.services.rollouts.get@ method which the
51+-- 'ServicesRolloutsGet' request conforms to.
52+type ServicesRolloutsGetResource =
53+ "v1" :>
54+ "services" :>
55+ Capture "serviceName" Text :>
56+ "rollouts" :>
57+ Capture "rolloutId" Text :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "callback" Text :>
65+ QueryParam "alt" AltJSON :> Get '[JSON] Rollout
66+
67+-- | Gets a service configuration rollout.
68+--
69+-- /See:/ 'servicesRolloutsGet' smart constructor.
70+data ServicesRolloutsGet = ServicesRolloutsGet'
71+ { _srgXgafv :: !(Maybe Xgafv)
72+ , _srgUploadProtocol :: !(Maybe Text)
73+ , _srgPp :: !Bool
74+ , _srgAccessToken :: !(Maybe Text)
75+ , _srgUploadType :: !(Maybe Text)
76+ , _srgBearerToken :: !(Maybe Text)
77+ , _srgServiceName :: !Text
78+ , _srgRolloutId :: !Text
79+ , _srgCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ServicesRolloutsGet' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'srgXgafv'
87+--
88+-- * 'srgUploadProtocol'
89+--
90+-- * 'srgPp'
91+--
92+-- * 'srgAccessToken'
93+--
94+-- * 'srgUploadType'
95+--
96+-- * 'srgBearerToken'
97+--
98+-- * 'srgServiceName'
99+--
100+-- * 'srgRolloutId'
101+--
102+-- * 'srgCallback'
103+servicesRolloutsGet
104+ :: Text -- ^ 'srgServiceName'
105+ -> Text -- ^ 'srgRolloutId'
106+ -> ServicesRolloutsGet
107+servicesRolloutsGet pSrgServiceName_ pSrgRolloutId_ =
108+ ServicesRolloutsGet'
109+ { _srgXgafv = Nothing
110+ , _srgUploadProtocol = Nothing
111+ , _srgPp = True
112+ , _srgAccessToken = Nothing
113+ , _srgUploadType = Nothing
114+ , _srgBearerToken = Nothing
115+ , _srgServiceName = pSrgServiceName_
116+ , _srgRolloutId = pSrgRolloutId_
117+ , _srgCallback = Nothing
118+ }
119+
120+-- | V1 error format.
121+srgXgafv :: Lens' ServicesRolloutsGet (Maybe Xgafv)
122+srgXgafv = lens _srgXgafv (\ s a -> s{_srgXgafv = a})
123+
124+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
125+srgUploadProtocol :: Lens' ServicesRolloutsGet (Maybe Text)
126+srgUploadProtocol
127+ = lens _srgUploadProtocol
128+ (\ s a -> s{_srgUploadProtocol = a})
129+
130+-- | Pretty-print response.
131+srgPp :: Lens' ServicesRolloutsGet Bool
132+srgPp = lens _srgPp (\ s a -> s{_srgPp = a})
133+
134+-- | OAuth access token.
135+srgAccessToken :: Lens' ServicesRolloutsGet (Maybe Text)
136+srgAccessToken
137+ = lens _srgAccessToken
138+ (\ s a -> s{_srgAccessToken = a})
139+
140+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
141+srgUploadType :: Lens' ServicesRolloutsGet (Maybe Text)
142+srgUploadType
143+ = lens _srgUploadType
144+ (\ s a -> s{_srgUploadType = a})
145+
146+-- | OAuth bearer token.
147+srgBearerToken :: Lens' ServicesRolloutsGet (Maybe Text)
148+srgBearerToken
149+ = lens _srgBearerToken
150+ (\ s a -> s{_srgBearerToken = a})
151+
152+-- | The name of the service. See the
153+-- [overview](\/service-management\/overview) for naming requirements. For
154+-- example: \`example.googleapis.com\`.
155+srgServiceName :: Lens' ServicesRolloutsGet Text
156+srgServiceName
157+ = lens _srgServiceName
158+ (\ s a -> s{_srgServiceName = a})
159+
160+-- | The id of the rollout resource.
161+srgRolloutId :: Lens' ServicesRolloutsGet Text
162+srgRolloutId
163+ = lens _srgRolloutId (\ s a -> s{_srgRolloutId = a})
164+
165+-- | JSONP
166+srgCallback :: Lens' ServicesRolloutsGet (Maybe Text)
167+srgCallback
168+ = lens _srgCallback (\ s a -> s{_srgCallback = a})
169+
170+instance GoogleRequest ServicesRolloutsGet where
171+ type Rs ServicesRolloutsGet = Rollout
172+ type Scopes ServicesRolloutsGet =
173+ '["https://www.googleapis.com/auth/cloud-platform",
174+ "https://www.googleapis.com/auth/cloud-platform.read-only",
175+ "https://www.googleapis.com/auth/service.management",
176+ "https://www.googleapis.com/auth/service.management.readonly"]
177+ requestClient ServicesRolloutsGet'{..}
178+ = go _srgServiceName _srgRolloutId _srgXgafv
179+ _srgUploadProtocol
180+ (Just _srgPp)
181+ _srgAccessToken
182+ _srgUploadType
183+ _srgBearerToken
184+ _srgCallback
185+ (Just AltJSON)
186+ serviceManagementService
187+ where go
188+ = buildClient
189+ (Proxy :: Proxy ServicesRolloutsGetResource)
190+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Rollouts/List.hsnew file+206
@@ -0,0 +1,206 @@
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.ServiceManagement.Services.Rollouts.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 the history of the service configuration rollouts for a managed
24+-- service, from the newest to the oldest.
25+--
26+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.rollouts.list@.
27+module Network.Google.Resource.ServiceManagement.Services.Rollouts.List
28+ (
29+ -- * REST Resource
30+ ServicesRolloutsListResource
31+
32+ -- * Creating a Request
33+ , servicesRolloutsList
34+ , ServicesRolloutsList
35+
36+ -- * Request Lenses
37+ , srlXgafv
38+ , srlUploadProtocol
39+ , srlPp
40+ , srlAccessToken
41+ , srlUploadType
42+ , srlBearerToken
43+ , srlServiceName
44+ , srlPageToken
45+ , srlPageSize
46+ , srlCallback
47+ ) where
48+
49+import Network.Google.Prelude
50+import Network.Google.ServiceManagement.Types
51+
52+-- | A resource alias for @servicemanagement.services.rollouts.list@ method which the
53+-- 'ServicesRolloutsList' request conforms to.
54+type ServicesRolloutsListResource =
55+ "v1" :>
56+ "services" :>
57+ Capture "serviceName" Text :>
58+ "rollouts" :>
59+ QueryParam "$.xgafv" Xgafv :>
60+ QueryParam "upload_protocol" Text :>
61+ QueryParam "pp" Bool :>
62+ QueryParam "access_token" Text :>
63+ QueryParam "uploadType" Text :>
64+ QueryParam "bearer_token" Text :>
65+ QueryParam "pageToken" Text :>
66+ QueryParam "pageSize" (Textual Int32) :>
67+ QueryParam "callback" Text :>
68+ QueryParam "alt" AltJSON :>
69+ Get '[JSON] ListServiceRolloutsResponse
70+
71+-- | Lists the history of the service configuration rollouts for a managed
72+-- service, from the newest to the oldest.
73+--
74+-- /See:/ 'servicesRolloutsList' smart constructor.
75+data ServicesRolloutsList = ServicesRolloutsList'
76+ { _srlXgafv :: !(Maybe Xgafv)
77+ , _srlUploadProtocol :: !(Maybe Text)
78+ , _srlPp :: !Bool
79+ , _srlAccessToken :: !(Maybe Text)
80+ , _srlUploadType :: !(Maybe Text)
81+ , _srlBearerToken :: !(Maybe Text)
82+ , _srlServiceName :: !Text
83+ , _srlPageToken :: !(Maybe Text)
84+ , _srlPageSize :: !(Maybe (Textual Int32))
85+ , _srlCallback :: !(Maybe Text)
86+ } deriving (Eq,Show,Data,Typeable,Generic)
87+
88+-- | Creates a value of 'ServicesRolloutsList' with the minimum fields required to make a request.
89+--
90+-- Use one of the following lenses to modify other fields as desired:
91+--
92+-- * 'srlXgafv'
93+--
94+-- * 'srlUploadProtocol'
95+--
96+-- * 'srlPp'
97+--
98+-- * 'srlAccessToken'
99+--
100+-- * 'srlUploadType'
101+--
102+-- * 'srlBearerToken'
103+--
104+-- * 'srlServiceName'
105+--
106+-- * 'srlPageToken'
107+--
108+-- * 'srlPageSize'
109+--
110+-- * 'srlCallback'
111+servicesRolloutsList
112+ :: Text -- ^ 'srlServiceName'
113+ -> ServicesRolloutsList
114+servicesRolloutsList pSrlServiceName_ =
115+ ServicesRolloutsList'
116+ { _srlXgafv = Nothing
117+ , _srlUploadProtocol = Nothing
118+ , _srlPp = True
119+ , _srlAccessToken = Nothing
120+ , _srlUploadType = Nothing
121+ , _srlBearerToken = Nothing
122+ , _srlServiceName = pSrlServiceName_
123+ , _srlPageToken = Nothing
124+ , _srlPageSize = Nothing
125+ , _srlCallback = Nothing
126+ }
127+
128+-- | V1 error format.
129+srlXgafv :: Lens' ServicesRolloutsList (Maybe Xgafv)
130+srlXgafv = lens _srlXgafv (\ s a -> s{_srlXgafv = a})
131+
132+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
133+srlUploadProtocol :: Lens' ServicesRolloutsList (Maybe Text)
134+srlUploadProtocol
135+ = lens _srlUploadProtocol
136+ (\ s a -> s{_srlUploadProtocol = a})
137+
138+-- | Pretty-print response.
139+srlPp :: Lens' ServicesRolloutsList Bool
140+srlPp = lens _srlPp (\ s a -> s{_srlPp = a})
141+
142+-- | OAuth access token.
143+srlAccessToken :: Lens' ServicesRolloutsList (Maybe Text)
144+srlAccessToken
145+ = lens _srlAccessToken
146+ (\ s a -> s{_srlAccessToken = a})
147+
148+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
149+srlUploadType :: Lens' ServicesRolloutsList (Maybe Text)
150+srlUploadType
151+ = lens _srlUploadType
152+ (\ s a -> s{_srlUploadType = a})
153+
154+-- | OAuth bearer token.
155+srlBearerToken :: Lens' ServicesRolloutsList (Maybe Text)
156+srlBearerToken
157+ = lens _srlBearerToken
158+ (\ s a -> s{_srlBearerToken = a})
159+
160+-- | The name of the service. See the
161+-- [overview](\/service-management\/overview) for naming requirements. For
162+-- example: \`example.googleapis.com\`.
163+srlServiceName :: Lens' ServicesRolloutsList Text
164+srlServiceName
165+ = lens _srlServiceName
166+ (\ s a -> s{_srlServiceName = a})
167+
168+-- | The token of the page to retrieve.
169+srlPageToken :: Lens' ServicesRolloutsList (Maybe Text)
170+srlPageToken
171+ = lens _srlPageToken (\ s a -> s{_srlPageToken = a})
172+
173+-- | The max number of items to include in the response list.
174+srlPageSize :: Lens' ServicesRolloutsList (Maybe Int32)
175+srlPageSize
176+ = lens _srlPageSize (\ s a -> s{_srlPageSize = a}) .
177+ mapping _Coerce
178+
179+-- | JSONP
180+srlCallback :: Lens' ServicesRolloutsList (Maybe Text)
181+srlCallback
182+ = lens _srlCallback (\ s a -> s{_srlCallback = a})
183+
184+instance GoogleRequest ServicesRolloutsList where
185+ type Rs ServicesRolloutsList =
186+ ListServiceRolloutsResponse
187+ type Scopes ServicesRolloutsList =
188+ '["https://www.googleapis.com/auth/cloud-platform",
189+ "https://www.googleapis.com/auth/cloud-platform.read-only",
190+ "https://www.googleapis.com/auth/service.management",
191+ "https://www.googleapis.com/auth/service.management.readonly"]
192+ requestClient ServicesRolloutsList'{..}
193+ = go _srlServiceName _srlXgafv _srlUploadProtocol
194+ (Just _srlPp)
195+ _srlAccessToken
196+ _srlUploadType
197+ _srlBearerToken
198+ _srlPageToken
199+ _srlPageSize
200+ _srlCallback
201+ (Just AltJSON)
202+ serviceManagementService
203+ where go
204+ = buildClient
205+ (Proxy :: Proxy ServicesRolloutsListResource)
206+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/SetIAMPolicy.hsnew file+189
@@ -0,0 +1,189 @@
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.ServiceManagement.Services.SetIAMPolicy
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+-- Sets the access control policy on the specified resource. Replaces any
24+-- existing policy.
25+--
26+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.setIamPolicy@.
27+module Network.Google.Resource.ServiceManagement.Services.SetIAMPolicy
28+ (
29+ -- * REST Resource
30+ ServicesSetIAMPolicyResource
31+
32+ -- * Creating a Request
33+ , servicesSetIAMPolicy
34+ , ServicesSetIAMPolicy
35+
36+ -- * Request Lenses
37+ , ssipXgafv
38+ , ssipUploadProtocol
39+ , ssipPp
40+ , ssipAccessToken
41+ , ssipUploadType
42+ , ssipPayload
43+ , ssipBearerToken
44+ , ssipResource
45+ , ssipCallback
46+ ) where
47+
48+import Network.Google.Prelude
49+import Network.Google.ServiceManagement.Types
50+
51+-- | A resource alias for @servicemanagement.services.setIamPolicy@ method which the
52+-- 'ServicesSetIAMPolicy' request conforms to.
53+type ServicesSetIAMPolicyResource =
54+ "v1" :>
55+ CaptureMode "resource" "setIamPolicy" Text :>
56+ QueryParam "$.xgafv" Xgafv :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :>
64+ ReqBody '[JSON] SetIAMPolicyRequest :>
65+ Post '[JSON] Policy
66+
67+-- | Sets the access control policy on the specified resource. Replaces any
68+-- existing policy.
69+--
70+-- /See:/ 'servicesSetIAMPolicy' smart constructor.
71+data ServicesSetIAMPolicy = ServicesSetIAMPolicy'
72+ { _ssipXgafv :: !(Maybe Xgafv)
73+ , _ssipUploadProtocol :: !(Maybe Text)
74+ , _ssipPp :: !Bool
75+ , _ssipAccessToken :: !(Maybe Text)
76+ , _ssipUploadType :: !(Maybe Text)
77+ , _ssipPayload :: !SetIAMPolicyRequest
78+ , _ssipBearerToken :: !(Maybe Text)
79+ , _ssipResource :: !Text
80+ , _ssipCallback :: !(Maybe Text)
81+ } deriving (Eq,Show,Data,Typeable,Generic)
82+
83+-- | Creates a value of 'ServicesSetIAMPolicy' 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+-- * 'ssipXgafv'
88+--
89+-- * 'ssipUploadProtocol'
90+--
91+-- * 'ssipPp'
92+--
93+-- * 'ssipAccessToken'
94+--
95+-- * 'ssipUploadType'
96+--
97+-- * 'ssipPayload'
98+--
99+-- * 'ssipBearerToken'
100+--
101+-- * 'ssipResource'
102+--
103+-- * 'ssipCallback'
104+servicesSetIAMPolicy
105+ :: SetIAMPolicyRequest -- ^ 'ssipPayload'
106+ -> Text -- ^ 'ssipResource'
107+ -> ServicesSetIAMPolicy
108+servicesSetIAMPolicy pSsipPayload_ pSsipResource_ =
109+ ServicesSetIAMPolicy'
110+ { _ssipXgafv = Nothing
111+ , _ssipUploadProtocol = Nothing
112+ , _ssipPp = True
113+ , _ssipAccessToken = Nothing
114+ , _ssipUploadType = Nothing
115+ , _ssipPayload = pSsipPayload_
116+ , _ssipBearerToken = Nothing
117+ , _ssipResource = pSsipResource_
118+ , _ssipCallback = Nothing
119+ }
120+
121+-- | V1 error format.
122+ssipXgafv :: Lens' ServicesSetIAMPolicy (Maybe Xgafv)
123+ssipXgafv
124+ = lens _ssipXgafv (\ s a -> s{_ssipXgafv = a})
125+
126+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
127+ssipUploadProtocol :: Lens' ServicesSetIAMPolicy (Maybe Text)
128+ssipUploadProtocol
129+ = lens _ssipUploadProtocol
130+ (\ s a -> s{_ssipUploadProtocol = a})
131+
132+-- | Pretty-print response.
133+ssipPp :: Lens' ServicesSetIAMPolicy Bool
134+ssipPp = lens _ssipPp (\ s a -> s{_ssipPp = a})
135+
136+-- | OAuth access token.
137+ssipAccessToken :: Lens' ServicesSetIAMPolicy (Maybe Text)
138+ssipAccessToken
139+ = lens _ssipAccessToken
140+ (\ s a -> s{_ssipAccessToken = a})
141+
142+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
143+ssipUploadType :: Lens' ServicesSetIAMPolicy (Maybe Text)
144+ssipUploadType
145+ = lens _ssipUploadType
146+ (\ s a -> s{_ssipUploadType = a})
147+
148+-- | Multipart request metadata.
149+ssipPayload :: Lens' ServicesSetIAMPolicy SetIAMPolicyRequest
150+ssipPayload
151+ = lens _ssipPayload (\ s a -> s{_ssipPayload = a})
152+
153+-- | OAuth bearer token.
154+ssipBearerToken :: Lens' ServicesSetIAMPolicy (Maybe Text)
155+ssipBearerToken
156+ = lens _ssipBearerToken
157+ (\ s a -> s{_ssipBearerToken = a})
158+
159+-- | REQUIRED: The resource for which the policy is being specified.
160+-- \`resource\` is usually specified as a path. For example, a Project
161+-- resource is specified as \`projects\/{project}\`.
162+ssipResource :: Lens' ServicesSetIAMPolicy Text
163+ssipResource
164+ = lens _ssipResource (\ s a -> s{_ssipResource = a})
165+
166+-- | JSONP
167+ssipCallback :: Lens' ServicesSetIAMPolicy (Maybe Text)
168+ssipCallback
169+ = lens _ssipCallback (\ s a -> s{_ssipCallback = a})
170+
171+instance GoogleRequest ServicesSetIAMPolicy where
172+ type Rs ServicesSetIAMPolicy = Policy
173+ type Scopes ServicesSetIAMPolicy =
174+ '["https://www.googleapis.com/auth/cloud-platform",
175+ "https://www.googleapis.com/auth/service.management"]
176+ requestClient ServicesSetIAMPolicy'{..}
177+ = go _ssipResource _ssipXgafv _ssipUploadProtocol
178+ (Just _ssipPp)
179+ _ssipAccessToken
180+ _ssipUploadType
181+ _ssipBearerToken
182+ _ssipCallback
183+ (Just AltJSON)
184+ _ssipPayload
185+ serviceManagementService
186+ where go
187+ = buildClient
188+ (Proxy :: Proxy ServicesSetIAMPolicyResource)
189+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/TestIAMPermissions.hsnew file+189
@@ -0,0 +1,189 @@
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.ServiceManagement.Services.TestIAMPermissions
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+-- Returns permissions that a caller has on the specified resource.
24+--
25+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.testIamPermissions@.
26+module Network.Google.Resource.ServiceManagement.Services.TestIAMPermissions
27+ (
28+ -- * REST Resource
29+ ServicesTestIAMPermissionsResource
30+
31+ -- * Creating a Request
32+ , servicesTestIAMPermissions
33+ , ServicesTestIAMPermissions
34+
35+ -- * Request Lenses
36+ , stipXgafv
37+ , stipUploadProtocol
38+ , stipPp
39+ , stipAccessToken
40+ , stipUploadType
41+ , stipPayload
42+ , stipBearerToken
43+ , stipResource
44+ , stipCallback
45+ ) where
46+
47+import Network.Google.Prelude
48+import Network.Google.ServiceManagement.Types
49+
50+-- | A resource alias for @servicemanagement.services.testIamPermissions@ method which the
51+-- 'ServicesTestIAMPermissions' request conforms to.
52+type ServicesTestIAMPermissionsResource =
53+ "v1" :>
54+ CaptureMode "resource" "testIamPermissions" Text :>
55+ QueryParam "$.xgafv" Xgafv :>
56+ QueryParam "upload_protocol" Text :>
57+ QueryParam "pp" Bool :>
58+ QueryParam "access_token" Text :>
59+ QueryParam "uploadType" Text :>
60+ QueryParam "bearer_token" Text :>
61+ QueryParam "callback" Text :>
62+ QueryParam "alt" AltJSON :>
63+ ReqBody '[JSON] TestIAMPermissionsRequest :>
64+ Post '[JSON] TestIAMPermissionsResponse
65+
66+-- | Returns permissions that a caller has on the specified resource.
67+--
68+-- /See:/ 'servicesTestIAMPermissions' smart constructor.
69+data ServicesTestIAMPermissions = ServicesTestIAMPermissions'
70+ { _stipXgafv :: !(Maybe Xgafv)
71+ , _stipUploadProtocol :: !(Maybe Text)
72+ , _stipPp :: !Bool
73+ , _stipAccessToken :: !(Maybe Text)
74+ , _stipUploadType :: !(Maybe Text)
75+ , _stipPayload :: !TestIAMPermissionsRequest
76+ , _stipBearerToken :: !(Maybe Text)
77+ , _stipResource :: !Text
78+ , _stipCallback :: !(Maybe Text)
79+ } deriving (Eq,Show,Data,Typeable,Generic)
80+
81+-- | Creates a value of 'ServicesTestIAMPermissions' with the minimum fields required to make a request.
82+--
83+-- Use one of the following lenses to modify other fields as desired:
84+--
85+-- * 'stipXgafv'
86+--
87+-- * 'stipUploadProtocol'
88+--
89+-- * 'stipPp'
90+--
91+-- * 'stipAccessToken'
92+--
93+-- * 'stipUploadType'
94+--
95+-- * 'stipPayload'
96+--
97+-- * 'stipBearerToken'
98+--
99+-- * 'stipResource'
100+--
101+-- * 'stipCallback'
102+servicesTestIAMPermissions
103+ :: TestIAMPermissionsRequest -- ^ 'stipPayload'
104+ -> Text -- ^ 'stipResource'
105+ -> ServicesTestIAMPermissions
106+servicesTestIAMPermissions pStipPayload_ pStipResource_ =
107+ ServicesTestIAMPermissions'
108+ { _stipXgafv = Nothing
109+ , _stipUploadProtocol = Nothing
110+ , _stipPp = True
111+ , _stipAccessToken = Nothing
112+ , _stipUploadType = Nothing
113+ , _stipPayload = pStipPayload_
114+ , _stipBearerToken = Nothing
115+ , _stipResource = pStipResource_
116+ , _stipCallback = Nothing
117+ }
118+
119+-- | V1 error format.
120+stipXgafv :: Lens' ServicesTestIAMPermissions (Maybe Xgafv)
121+stipXgafv
122+ = lens _stipXgafv (\ s a -> s{_stipXgafv = a})
123+
124+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
125+stipUploadProtocol :: Lens' ServicesTestIAMPermissions (Maybe Text)
126+stipUploadProtocol
127+ = lens _stipUploadProtocol
128+ (\ s a -> s{_stipUploadProtocol = a})
129+
130+-- | Pretty-print response.
131+stipPp :: Lens' ServicesTestIAMPermissions Bool
132+stipPp = lens _stipPp (\ s a -> s{_stipPp = a})
133+
134+-- | OAuth access token.
135+stipAccessToken :: Lens' ServicesTestIAMPermissions (Maybe Text)
136+stipAccessToken
137+ = lens _stipAccessToken
138+ (\ s a -> s{_stipAccessToken = a})
139+
140+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
141+stipUploadType :: Lens' ServicesTestIAMPermissions (Maybe Text)
142+stipUploadType
143+ = lens _stipUploadType
144+ (\ s a -> s{_stipUploadType = a})
145+
146+-- | Multipart request metadata.
147+stipPayload :: Lens' ServicesTestIAMPermissions TestIAMPermissionsRequest
148+stipPayload
149+ = lens _stipPayload (\ s a -> s{_stipPayload = a})
150+
151+-- | OAuth bearer token.
152+stipBearerToken :: Lens' ServicesTestIAMPermissions (Maybe Text)
153+stipBearerToken
154+ = lens _stipBearerToken
155+ (\ s a -> s{_stipBearerToken = a})
156+
157+-- | REQUIRED: The resource for which the policy detail is being requested.
158+-- \`resource\` is usually specified as a path. For example, a Project
159+-- resource is specified as \`projects\/{project}\`.
160+stipResource :: Lens' ServicesTestIAMPermissions Text
161+stipResource
162+ = lens _stipResource (\ s a -> s{_stipResource = a})
163+
164+-- | JSONP
165+stipCallback :: Lens' ServicesTestIAMPermissions (Maybe Text)
166+stipCallback
167+ = lens _stipCallback (\ s a -> s{_stipCallback = a})
168+
169+instance GoogleRequest ServicesTestIAMPermissions
170+ where
171+ type Rs ServicesTestIAMPermissions =
172+ TestIAMPermissionsResponse
173+ type Scopes ServicesTestIAMPermissions =
174+ '["https://www.googleapis.com/auth/cloud-platform",
175+ "https://www.googleapis.com/auth/service.management"]
176+ requestClient ServicesTestIAMPermissions'{..}
177+ = go _stipResource _stipXgafv _stipUploadProtocol
178+ (Just _stipPp)
179+ _stipAccessToken
180+ _stipUploadType
181+ _stipBearerToken
182+ _stipCallback
183+ (Just AltJSON)
184+ _stipPayload
185+ serviceManagementService
186+ where go
187+ = buildClient
188+ (Proxy :: Proxy ServicesTestIAMPermissionsResource)
189+ mempty
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Undelete.hsnew file+179
@@ -0,0 +1,179 @@
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.ServiceManagement.Services.Undelete
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+-- Revives a previously deleted managed service. The method restores the
24+-- service using the configuration at the time the service was deleted. The
25+-- target service must exist and must have been deleted within the last 30
26+-- days. Operation
27+--
28+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference> for @servicemanagement.services.undelete@.
29+module Network.Google.Resource.ServiceManagement.Services.Undelete
30+ (
31+ -- * REST Resource
32+ ServicesUndeleteResource
33+
34+ -- * Creating a Request
35+ , servicesUndelete
36+ , ServicesUndelete
37+
38+ -- * Request Lenses
39+ , suXgafv
40+ , suUploadProtocol
41+ , suPp
42+ , suAccessToken
43+ , suUploadType
44+ , suBearerToken
45+ , suServiceName
46+ , suCallback
47+ ) where
48+
49+import Network.Google.Prelude
50+import Network.Google.ServiceManagement.Types
51+
52+-- | A resource alias for @servicemanagement.services.undelete@ method which the
53+-- 'ServicesUndelete' request conforms to.
54+type ServicesUndeleteResource =
55+ "v1" :>
56+ "services" :>
57+ CaptureMode "serviceName" "undelete" Text :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "callback" Text :>
65+ QueryParam "alt" AltJSON :> Post '[JSON] Operation
66+
67+-- | Revives a previously deleted managed service. The method restores the
68+-- service using the configuration at the time the service was deleted. The
69+-- target service must exist and must have been deleted within the last 30
70+-- days. Operation
71+--
72+-- /See:/ 'servicesUndelete' smart constructor.
73+data ServicesUndelete = ServicesUndelete'
74+ { _suXgafv :: !(Maybe Xgafv)
75+ , _suUploadProtocol :: !(Maybe Text)
76+ , _suPp :: !Bool
77+ , _suAccessToken :: !(Maybe Text)
78+ , _suUploadType :: !(Maybe Text)
79+ , _suBearerToken :: !(Maybe Text)
80+ , _suServiceName :: !Text
81+ , _suCallback :: !(Maybe Text)
82+ } deriving (Eq,Show,Data,Typeable,Generic)
83+
84+-- | Creates a value of 'ServicesUndelete' with the minimum fields required to make a request.
85+--
86+-- Use one of the following lenses to modify other fields as desired:
87+--
88+-- * 'suXgafv'
89+--
90+-- * 'suUploadProtocol'
91+--
92+-- * 'suPp'
93+--
94+-- * 'suAccessToken'
95+--
96+-- * 'suUploadType'
97+--
98+-- * 'suBearerToken'
99+--
100+-- * 'suServiceName'
101+--
102+-- * 'suCallback'
103+servicesUndelete
104+ :: Text -- ^ 'suServiceName'
105+ -> ServicesUndelete
106+servicesUndelete pSuServiceName_ =
107+ ServicesUndelete'
108+ { _suXgafv = Nothing
109+ , _suUploadProtocol = Nothing
110+ , _suPp = True
111+ , _suAccessToken = Nothing
112+ , _suUploadType = Nothing
113+ , _suBearerToken = Nothing
114+ , _suServiceName = pSuServiceName_
115+ , _suCallback = Nothing
116+ }
117+
118+-- | V1 error format.
119+suXgafv :: Lens' ServicesUndelete (Maybe Xgafv)
120+suXgafv = lens _suXgafv (\ s a -> s{_suXgafv = a})
121+
122+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
123+suUploadProtocol :: Lens' ServicesUndelete (Maybe Text)
124+suUploadProtocol
125+ = lens _suUploadProtocol
126+ (\ s a -> s{_suUploadProtocol = a})
127+
128+-- | Pretty-print response.
129+suPp :: Lens' ServicesUndelete Bool
130+suPp = lens _suPp (\ s a -> s{_suPp = a})
131+
132+-- | OAuth access token.
133+suAccessToken :: Lens' ServicesUndelete (Maybe Text)
134+suAccessToken
135+ = lens _suAccessToken
136+ (\ s a -> s{_suAccessToken = a})
137+
138+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
139+suUploadType :: Lens' ServicesUndelete (Maybe Text)
140+suUploadType
141+ = lens _suUploadType (\ s a -> s{_suUploadType = a})
142+
143+-- | OAuth bearer token.
144+suBearerToken :: Lens' ServicesUndelete (Maybe Text)
145+suBearerToken
146+ = lens _suBearerToken
147+ (\ s a -> s{_suBearerToken = a})
148+
149+-- | The name of the service. See the
150+-- [overview](\/service-management\/overview) for naming requirements. For
151+-- example: \`example.googleapis.com\`.
152+suServiceName :: Lens' ServicesUndelete Text
153+suServiceName
154+ = lens _suServiceName
155+ (\ s a -> s{_suServiceName = a})
156+
157+-- | JSONP
158+suCallback :: Lens' ServicesUndelete (Maybe Text)
159+suCallback
160+ = lens _suCallback (\ s a -> s{_suCallback = a})
161+
162+instance GoogleRequest ServicesUndelete where
163+ type Rs ServicesUndelete = Operation
164+ type Scopes ServicesUndelete =
165+ '["https://www.googleapis.com/auth/cloud-platform",
166+ "https://www.googleapis.com/auth/service.management"]
167+ requestClient ServicesUndelete'{..}
168+ = go _suServiceName _suXgafv _suUploadProtocol
169+ (Just _suPp)
170+ _suAccessToken
171+ _suUploadType
172+ _suBearerToken
173+ _suCallback
174+ (Just AltJSON)
175+ serviceManagementService
176+ where go
177+ = buildClient
178+ (Proxy :: Proxy ServicesUndeleteResource)
179+ mempty
gogol-servicemanagement/gen/Network/Google/ServiceManagement.hsnew file+844
@@ -0,0 +1,844 @@
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.ServiceManagement
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+-- Google Service Management allows service producers to publish their
17+-- services on Google Cloud Platform so that they can be discovered and
18+-- used by service consumers.
19+--
20+-- /See:/ <https://cloud.google.com/service-management/ Google Service Management API Reference>
21+module Network.Google.ServiceManagement
22+ (
23+ -- * Service Configuration
24+ serviceManagementService
25+
26+ -- * OAuth Scopes
27+ , cloudPlatformReadOnlyScope
28+ , cloudPlatformScope
29+ , serviceManagementReadOnlyScope
30+ , serviceManagementScope
31+
32+ -- * API Declaration
33+ , ServiceManagementAPI
34+
35+ -- * Resources
36+
37+ -- ** servicemanagement.operations.get
38+ , module Network.Google.Resource.ServiceManagement.Operations.Get
39+
40+ -- ** servicemanagement.services.configs.create
41+ , module Network.Google.Resource.ServiceManagement.Services.Configs.Create
42+
43+ -- ** servicemanagement.services.configs.get
44+ , module Network.Google.Resource.ServiceManagement.Services.Configs.Get
45+
46+ -- ** servicemanagement.services.configs.list
47+ , module Network.Google.Resource.ServiceManagement.Services.Configs.List
48+
49+ -- ** servicemanagement.services.configs.submit
50+ , module Network.Google.Resource.ServiceManagement.Services.Configs.Submit
51+
52+ -- ** servicemanagement.services.create
53+ , module Network.Google.Resource.ServiceManagement.Services.Create
54+
55+ -- ** servicemanagement.services.delete
56+ , module Network.Google.Resource.ServiceManagement.Services.Delete
57+
58+ -- ** servicemanagement.services.disable
59+ , module Network.Google.Resource.ServiceManagement.Services.Disable
60+
61+ -- ** servicemanagement.services.enable
62+ , module Network.Google.Resource.ServiceManagement.Services.Enable
63+
64+ -- ** servicemanagement.services.generateConfigReport
65+ , module Network.Google.Resource.ServiceManagement.Services.GenerateConfigReport
66+
67+ -- ** servicemanagement.services.get
68+ , module Network.Google.Resource.ServiceManagement.Services.Get
69+
70+ -- ** servicemanagement.services.getConfig
71+ , module Network.Google.Resource.ServiceManagement.Services.GetConfig
72+
73+ -- ** servicemanagement.services.getIamPolicy
74+ , module Network.Google.Resource.ServiceManagement.Services.GetIAMPolicy
75+
76+ -- ** servicemanagement.services.list
77+ , module Network.Google.Resource.ServiceManagement.Services.List
78+
79+ -- ** servicemanagement.services.rollouts.create
80+ , module Network.Google.Resource.ServiceManagement.Services.Rollouts.Create
81+
82+ -- ** servicemanagement.services.rollouts.get
83+ , module Network.Google.Resource.ServiceManagement.Services.Rollouts.Get
84+
85+ -- ** servicemanagement.services.rollouts.list
86+ , module Network.Google.Resource.ServiceManagement.Services.Rollouts.List
87+
88+ -- ** servicemanagement.services.setIamPolicy
89+ , module Network.Google.Resource.ServiceManagement.Services.SetIAMPolicy
90+
91+ -- ** servicemanagement.services.testIamPermissions
92+ , module Network.Google.Resource.ServiceManagement.Services.TestIAMPermissions
93+
94+ -- ** servicemanagement.services.undelete
95+ , module Network.Google.Resource.ServiceManagement.Services.Undelete
96+
97+ -- * Types
98+
99+ -- ** MetricDescriptorValueType
100+ , MetricDescriptorValueType (..)
101+
102+ -- ** UndeleteServiceResponse
103+ , UndeleteServiceResponse
104+ , undeleteServiceResponse
105+ , usrService
106+
107+ -- ** SystemParameter
108+ , SystemParameter
109+ , systemParameter
110+ , spHTTPHeader
111+ , spURLQueryParameter
112+ , spName
113+
114+ -- ** Advice
115+ , Advice
116+ , advice
117+ , aDescription
118+
119+ -- ** ConfigFile
120+ , ConfigFile
121+ , configFile
122+ , cfFileContents
123+ , cfFilePath
124+ , cfFileType
125+
126+ -- ** MonitoredResourceDescriptor
127+ , MonitoredResourceDescriptor
128+ , monitoredResourceDescriptor
129+ , mrdName
130+ , mrdDisplayName
131+ , mrdLabels
132+ , mrdType
133+ , mrdDescription
134+
135+ -- ** DocumentationRule
136+ , DocumentationRule
137+ , documentationRule
138+ , drSelector
139+ , drDeprecationDescription
140+ , drDescription
141+
142+ -- ** Status
143+ , Status
144+ , status
145+ , sDetails
146+ , sCode
147+ , sMessage
148+
149+ -- ** OperationSchema
150+ , OperationSchema
151+ , operationSchema
152+ , osAddtional
153+
154+ -- ** GenerateConfigReportResponse
155+ , GenerateConfigReportResponse
156+ , generateConfigReportResponse
157+ , gcrrDiagnostics
158+ , gcrrServiceName
159+ , gcrrId
160+ , gcrrChangeReports
161+
162+ -- ** CounterOptions
163+ , CounterOptions
164+ , counterOptions
165+ , coField
166+ , coMetric
167+
168+ -- ** MediaUpload'
169+ , MediaUpload'
170+ , mediaUpload
171+ , muEnabled
172+
173+ -- ** AuditConfig
174+ , AuditConfig
175+ , auditConfig
176+ , acService
177+ , acExemptedMembers
178+
179+ -- ** Control
180+ , Control
181+ , control
182+ , cEnvironment
183+
184+ -- ** DeleteServiceStrategy
185+ , DeleteServiceStrategy
186+ , deleteServiceStrategy
187+
188+ -- ** AuthRequirement
189+ , AuthRequirement
190+ , authRequirement
191+ , arProviderId
192+ , arAudiences
193+
194+ -- ** ListServicesResponse
195+ , ListServicesResponse
196+ , listServicesResponse
197+ , lsrNextPageToken
198+ , lsrServices
199+
200+ -- ** Context
201+ , Context
202+ , context
203+ , cRules
204+
205+ -- ** LoggingDestination
206+ , LoggingDestination
207+ , loggingDestination
208+ , ldMonitoredResource
209+ , ldLogs
210+
211+ -- ** MetricDescriptor
212+ , MetricDescriptor
213+ , metricDescriptor
214+ , mdMetricKind
215+ , mdName
216+ , mdDisplayName
217+ , mdLabels
218+ , mdType
219+ , mdValueType
220+ , mdDescription
221+ , mdUnit
222+
223+ -- ** GetIAMPolicyRequest
224+ , GetIAMPolicyRequest
225+ , getIAMPolicyRequest
226+
227+ -- ** BackendRule
228+ , BackendRule
229+ , backendRule
230+ , brSelector
231+ , brAddress
232+ , brDeadline
233+
234+ -- ** SubmitConfigSourceRequest
235+ , SubmitConfigSourceRequest
236+ , submitConfigSourceRequest
237+ , scsrValidateOnly
238+ , scsrConfigSource
239+
240+ -- ** SourceContext
241+ , SourceContext
242+ , sourceContext
243+ , scFileName
244+
245+ -- ** ConditionSys
246+ , ConditionSys (..)
247+
248+ -- ** Field
249+ , Field
250+ , field
251+ , fKind
252+ , fOneofIndex
253+ , fName
254+ , fJSONName
255+ , fCardinality
256+ , fOptions
257+ , fPacked
258+ , fDefaultValue
259+ , fNumber
260+ , fTypeURL
261+
262+ -- ** FieldKind
263+ , FieldKind (..)
264+
265+ -- ** EnumSyntax
266+ , EnumSyntax (..)
267+
268+ -- ** TrafficPercentStrategy
269+ , TrafficPercentStrategy
270+ , trafficPercentStrategy
271+ , tpsPercentages
272+
273+ -- ** Service
274+ , Service
275+ , service
276+ , sControl
277+ , sMetrics
278+ , sContext
279+ , sAuthentication
280+ , sAPIs
281+ , sTypes
282+ , sAnalytics
283+ , sVisibility
284+ , sSystemTypes
285+ , sMonitoredResources
286+ , sBackend
287+ , sMonitoring
288+ , sName
289+ , sSystemParameters
290+ , sLogs
291+ , sDocumentation
292+ , sId
293+ , sUsage
294+ , sEndpoints
295+ , sEnums
296+ , sConfigVersion
297+ , sHTTP
298+ , sTitle
299+ , sProducerProjectId
300+ , sCustomError
301+ , sLogging
302+
303+ -- ** Operation
304+ , Operation
305+ , operation
306+ , oDone
307+ , oError
308+ , oResponse
309+ , oName
310+ , oMetadata
311+
312+ -- ** EnableServiceRequest
313+ , EnableServiceRequest
314+ , enableServiceRequest
315+ , esrConsumerId
316+
317+ -- ** ListServiceConfigsResponse
318+ , ListServiceConfigsResponse
319+ , listServiceConfigsResponse
320+ , lscrServiceConfigs
321+ , lscrNextPageToken
322+
323+ -- ** CustomErrorRule
324+ , CustomErrorRule
325+ , customErrorRule
326+ , cerIsErrorType
327+ , cerSelector
328+
329+ -- ** SubmitConfigSourceResponse
330+ , SubmitConfigSourceResponse
331+ , submitConfigSourceResponse
332+ , scsrServiceConfig
333+
334+ -- ** VisibilityRule
335+ , VisibilityRule
336+ , visibilityRule
337+ , vrRestriction
338+ , vrSelector
339+
340+ -- ** ChangeReport
341+ , ChangeReport
342+ , changeReport
343+ , crConfigChanges
344+
345+ -- ** MediaDownload'
346+ , MediaDownload'
347+ , mediaDownload
348+ , mdEnabled
349+
350+ -- ** OptionValue
351+ , OptionValue
352+ , optionValue
353+ , ovAddtional
354+
355+ -- ** EnumValue
356+ , EnumValue
357+ , enumValue
358+ , evName
359+ , evOptions
360+ , evNumber
361+
362+ -- ** Authentication
363+ , Authentication
364+ , authentication
365+ , aRules
366+ , aProviders
367+
368+ -- ** RuleAction
369+ , RuleAction (..)
370+
371+ -- ** Mixin
372+ , Mixin
373+ , mixin
374+ , mRoot
375+ , mName
376+
377+ -- ** CustomHTTPPattern
378+ , CustomHTTPPattern
379+ , customHTTPPattern
380+ , chttppPath
381+ , chttppKind
382+
383+ -- ** UsageRule
384+ , UsageRule
385+ , usageRule
386+ , urSelector
387+ , urAllowUnregisteredCalls
388+
389+ -- ** StatusDetailsItem
390+ , StatusDetailsItem
391+ , statusDetailsItem
392+ , sdiAddtional
393+
394+ -- ** Page
395+ , Page
396+ , page
397+ , pSubpages
398+ , pContent
399+ , pName
400+
401+ -- ** GenerateConfigReportRequestOldConfig
402+ , GenerateConfigReportRequestOldConfig
403+ , generateConfigReportRequestOldConfig
404+ , gcrrocAddtional
405+
406+ -- ** Analytics
407+ , Analytics
408+ , analytics
409+ , aProducerDestinations
410+
411+ -- ** Rule
412+ , Rule
413+ , rule
414+ , rAction
415+ , rIn
416+ , rNotIn
417+ , rConditions
418+ , rPermissions
419+ , rLogConfig
420+ , rDescription
421+
422+ -- ** Visibility
423+ , Visibility
424+ , visibility
425+ , vRules
426+
427+ -- ** AuthenticationRule
428+ , AuthenticationRule
429+ , authenticationRule
430+ , arRequirements
431+ , arSelector
432+ , arAllowWithoutCredential
433+ , arOAuth
434+
435+ -- ** StepStatus
436+ , StepStatus (..)
437+
438+ -- ** LabelDescriptorValueType
439+ , LabelDescriptorValueType (..)
440+
441+ -- ** SetIAMPolicyRequest
442+ , SetIAMPolicyRequest
443+ , setIAMPolicyRequest
444+ , siprPolicy
445+
446+ -- ** TrafficPercentStrategyPercentages
447+ , TrafficPercentStrategyPercentages
448+ , trafficPercentStrategyPercentages
449+ , tpspAddtional
450+
451+ -- ** APISyntax
452+ , APISyntax (..)
453+
454+ -- ** TypeSyntax
455+ , TypeSyntax (..)
456+
457+ -- ** ListServiceRolloutsResponse
458+ , ListServiceRolloutsResponse
459+ , listServiceRolloutsResponse
460+ , lsrrNextPageToken
461+ , lsrrRollouts
462+
463+ -- ** ConfigChange
464+ , ConfigChange
465+ , configChange
466+ , ccOldValue
467+ , ccNewValue
468+ , ccAdvices
469+ , ccChangeType
470+ , ccElement
471+
472+ -- ** CloudAuditOptions
473+ , CloudAuditOptions
474+ , cloudAuditOptions
475+
476+ -- ** Backend
477+ , Backend
478+ , backend
479+ , bRules
480+
481+ -- ** ConditionOp
482+ , ConditionOp (..)
483+
484+ -- ** DataAccessOptions
485+ , DataAccessOptions
486+ , dataAccessOptions
487+
488+ -- ** Monitoring
489+ , Monitoring
490+ , monitoring
491+ , mProducerDestinations
492+ , mConsumerDestinations
493+
494+ -- ** LogDescriptor
495+ , LogDescriptor
496+ , logDescriptor
497+ , ldName
498+ , ldDisplayName
499+ , ldLabels
500+ , ldDescription
501+
502+ -- ** Method
503+ , Method
504+ , method
505+ , metRequestStreaming
506+ , metResponseTypeURL
507+ , metName
508+ , metResponseStreaming
509+ , metRequestTypeURL
510+ , metOptions
511+ , metSyntax
512+
513+ -- ** Diagnostic
514+ , Diagnostic
515+ , diagnostic
516+ , dLocation
517+ , dKind
518+ , dMessage
519+
520+ -- ** RolloutStatus
521+ , RolloutStatus (..)
522+
523+ -- ** SystemParameters
524+ , SystemParameters
525+ , systemParameters
526+ , spRules
527+
528+ -- ** DiagnosticKind
529+ , DiagnosticKind (..)
530+
531+ -- ** ConfigSource
532+ , ConfigSource
533+ , configSource
534+ , csFiles
535+ , csId
536+
537+ -- ** Documentation
538+ , Documentation
539+ , documentation
540+ , dSummary
541+ , dDocumentationRootURL
542+ , dRules
543+ , dPages
544+ , dOverview
545+
546+ -- ** Step
547+ , Step
548+ , step
549+ , sStatus
550+ , sDescription
551+
552+ -- ** Xgafv
553+ , Xgafv (..)
554+
555+ -- ** AnalyticsDestination
556+ , AnalyticsDestination
557+ , analyticsDestination
558+ , adMetrics
559+ , adMonitoredResource
560+
561+ -- ** ConfigFileFileType
562+ , ConfigFileFileType (..)
563+
564+ -- ** TestIAMPermissionsRequest
565+ , TestIAMPermissionsRequest
566+ , testIAMPermissionsRequest
567+ , tiprPermissions
568+
569+ -- ** ConfigChangeChangeType
570+ , ConfigChangeChangeType (..)
571+
572+ -- ** SystemParameterRule
573+ , SystemParameterRule
574+ , systemParameterRule
575+ , sprSelector
576+ , sprParameters
577+
578+ -- ** LabelDescriptor
579+ , LabelDescriptor
580+ , labelDescriptor
581+ , lKey
582+ , lValueType
583+ , lDescription
584+
585+ -- ** Usage
586+ , Usage
587+ , usage
588+ , uRequirements
589+ , uRules
590+
591+ -- ** FieldCardinality
592+ , FieldCardinality (..)
593+
594+ -- ** TestIAMPermissionsResponse
595+ , TestIAMPermissionsResponse
596+ , testIAMPermissionsResponse
597+ , tiamprPermissions
598+
599+ -- ** GenerateConfigReportRequestNewConfig
600+ , GenerateConfigReportRequestNewConfig
601+ , generateConfigReportRequestNewConfig
602+ , gcrrncAddtional
603+
604+ -- ** HTTP
605+ , HTTP
606+ , hTTP
607+ , hRules
608+
609+ -- ** DisableServiceRequest
610+ , DisableServiceRequest
611+ , disableServiceRequest
612+ , dsrConsumerId
613+
614+ -- ** Policy
615+ , Policy
616+ , policy
617+ , pAuditConfigs
618+ , pEtag
619+ , pRules
620+ , pVersion
621+ , pBindings
622+ , pIAMOwned
623+
624+ -- ** Type
625+ , Type
626+ , type'
627+ , tSourceContext
628+ , tOneofs
629+ , tName
630+ , tOptions
631+ , tFields
632+ , tSyntax
633+
634+ -- ** API
635+ , API
636+ , api
637+ , aSourceContext
638+ , aMixins
639+ , aMethods
640+ , aName
641+ , aVersion
642+ , aOptions
643+ , aSyntax
644+
645+ -- ** MonitoringDestination
646+ , MonitoringDestination
647+ , monitoringDestination
648+ , mdMetrics
649+ , mdMonitoredResource
650+
651+ -- ** ManagedService
652+ , ManagedService
653+ , managedService
654+ , msServiceName
655+ , msProducerProjectId
656+
657+ -- ** OperationMetadata
658+ , OperationMetadata
659+ , operationMetadata
660+ , omStartTime
661+ , omSteps
662+ , omProgressPercentage
663+ , omResourceNames
664+
665+ -- ** Endpoint
666+ , Endpoint
667+ , endpoint
668+ , eAliases
669+ , eAPIs
670+ , eAllowCORS
671+ , eName
672+ , eFeatures
673+
674+ -- ** OAuthRequirements
675+ , OAuthRequirements
676+ , oAuthRequirements
677+ , oarCanonicalScopes
678+
679+ -- ** MetricDescriptorMetricKind
680+ , MetricDescriptorMetricKind (..)
681+
682+ -- ** CustomError
683+ , CustomError
684+ , customError
685+ , ceRules
686+ , ceTypes
687+
688+ -- ** Option
689+ , Option
690+ , option
691+ , optValue
692+ , optName
693+
694+ -- ** Rollout
695+ , Rollout
696+ , rollout
697+ , rStatus
698+ , rDeleteServiceStrategy
699+ , rTrafficPercentStrategy
700+ , rCreatedBy
701+ , rServiceName
702+ , rRolloutId
703+ , rCreateTime
704+
705+ -- ** Condition
706+ , Condition
707+ , condition
708+ , cOp
709+ , cIAM
710+ , cValues
711+ , cValue
712+ , cSys
713+ , cSvc
714+
715+ -- ** Enum
716+ , Enum
717+ , enum
718+ , enuSourceContext
719+ , enuEnumvalue
720+ , enuName
721+ , enuOptions
722+ , enuSyntax
723+
724+ -- ** Logging
725+ , Logging
726+ , logging
727+ , lProducerDestinations
728+ , lConsumerDestinations
729+
730+ -- ** ConfigRef
731+ , ConfigRef
732+ , configRef
733+ , crName
734+
735+ -- ** MethodSyntax
736+ , MethodSyntax (..)
737+
738+ -- ** GenerateConfigReportRequest
739+ , GenerateConfigReportRequest
740+ , generateConfigReportRequest
741+ , gcrrOldConfig
742+ , gcrrNewConfig
743+
744+ -- ** HTTPRule
745+ , HTTPRule
746+ , hTTPRule
747+ , httprMediaUpload
748+ , httprSelector
749+ , httprPost
750+ , httprMediaDownload
751+ , httprBody
752+ , httprCustom
753+ , httprResponseBody
754+ , httprPatch
755+ , httprGet
756+ , httprAdditionalBindings
757+ , httprDelete
758+ , httprPut
759+
760+ -- ** ConditionIAM
761+ , ConditionIAM (..)
762+
763+ -- ** OperationResponse
764+ , OperationResponse
765+ , operationResponse
766+ , orAddtional
767+
768+ -- ** LogConfig
769+ , LogConfig
770+ , logConfig
771+ , lcCloudAudit
772+ , lcDataAccess
773+ , lcCounter
774+
775+ -- ** AuthProvider
776+ , AuthProvider
777+ , authProvider
778+ , apJWKsURI
779+ , apId
780+ , apIssuer
781+
782+ -- ** Binding
783+ , Binding
784+ , binding
785+ , bMembers
786+ , bRole
787+
788+ -- ** ContextRule
789+ , ContextRule
790+ , contextRule
791+ , crSelector
792+ , crRequested
793+ , crProvided
794+ ) where
795+
796+import Network.Google.Prelude
797+import Network.Google.Resource.ServiceManagement.Operations.Get
798+import Network.Google.Resource.ServiceManagement.Services.Configs.Create
799+import Network.Google.Resource.ServiceManagement.Services.Configs.Get
800+import Network.Google.Resource.ServiceManagement.Services.Configs.List
801+import Network.Google.Resource.ServiceManagement.Services.Configs.Submit
802+import Network.Google.Resource.ServiceManagement.Services.Create
803+import Network.Google.Resource.ServiceManagement.Services.Delete
804+import Network.Google.Resource.ServiceManagement.Services.Disable
805+import Network.Google.Resource.ServiceManagement.Services.Enable
806+import Network.Google.Resource.ServiceManagement.Services.GenerateConfigReport
807+import Network.Google.Resource.ServiceManagement.Services.Get
808+import Network.Google.Resource.ServiceManagement.Services.GetConfig
809+import Network.Google.Resource.ServiceManagement.Services.GetIAMPolicy
810+import Network.Google.Resource.ServiceManagement.Services.List
811+import Network.Google.Resource.ServiceManagement.Services.Rollouts.Create
812+import Network.Google.Resource.ServiceManagement.Services.Rollouts.Get
813+import Network.Google.Resource.ServiceManagement.Services.Rollouts.List
814+import Network.Google.Resource.ServiceManagement.Services.SetIAMPolicy
815+import Network.Google.Resource.ServiceManagement.Services.TestIAMPermissions
816+import Network.Google.Resource.ServiceManagement.Services.Undelete
817+import Network.Google.ServiceManagement.Types
818+
819+{- $resources
820+TODO
821+-}
822+
823+-- | Represents the entirety of the methods and resources available for the Google Service Management API service.
824+type ServiceManagementAPI =
825+ OperationsGetResource :<|>
826+ ServicesRolloutsListResource
827+ :<|> ServicesRolloutsGetResource
828+ :<|> ServicesRolloutsCreateResource
829+ :<|> ServicesConfigsListResource
830+ :<|> ServicesConfigsGetResource
831+ :<|> ServicesConfigsSubmitResource
832+ :<|> ServicesConfigsCreateResource
833+ :<|> ServicesGenerateConfigReportResource
834+ :<|> ServicesListResource
835+ :<|> ServicesUndeleteResource
836+ :<|> ServicesGetIAMPolicyResource
837+ :<|> ServicesGetResource
838+ :<|> ServicesEnableResource
839+ :<|> ServicesCreateResource
840+ :<|> ServicesDisableResource
841+ :<|> ServicesGetConfigResource
842+ :<|> ServicesSetIAMPolicyResource
843+ :<|> ServicesTestIAMPermissionsResource
844+ :<|> ServicesDeleteResource
gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types.hsnew file+749
@@ -0,0 +1,749 @@
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.ServiceManagement.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.ServiceManagement.Types
18+ (
19+ -- * Service Configuration
20+ serviceManagementService
21+
22+ -- * OAuth Scopes
23+ , cloudPlatformReadOnlyScope
24+ , cloudPlatformScope
25+ , serviceManagementReadOnlyScope
26+ , serviceManagementScope
27+
28+ -- * MetricDescriptorValueType
29+ , MetricDescriptorValueType (..)
30+
31+ -- * UndeleteServiceResponse
32+ , UndeleteServiceResponse
33+ , undeleteServiceResponse
34+ , usrService
35+
36+ -- * SystemParameter
37+ , SystemParameter
38+ , systemParameter
39+ , spHTTPHeader
40+ , spURLQueryParameter
41+ , spName
42+
43+ -- * Advice
44+ , Advice
45+ , advice
46+ , aDescription
47+
48+ -- * ConfigFile
49+ , ConfigFile
50+ , configFile
51+ , cfFileContents
52+ , cfFilePath
53+ , cfFileType
54+
55+ -- * MonitoredResourceDescriptor
56+ , MonitoredResourceDescriptor
57+ , monitoredResourceDescriptor
58+ , mrdName
59+ , mrdDisplayName
60+ , mrdLabels
61+ , mrdType
62+ , mrdDescription
63+
64+ -- * DocumentationRule
65+ , DocumentationRule
66+ , documentationRule
67+ , drSelector
68+ , drDeprecationDescription
69+ , drDescription
70+
71+ -- * Status
72+ , Status
73+ , status
74+ , sDetails
75+ , sCode
76+ , sMessage
77+
78+ -- * OperationSchema
79+ , OperationSchema
80+ , operationSchema
81+ , osAddtional
82+
83+ -- * GenerateConfigReportResponse
84+ , GenerateConfigReportResponse
85+ , generateConfigReportResponse
86+ , gcrrDiagnostics
87+ , gcrrServiceName
88+ , gcrrId
89+ , gcrrChangeReports
90+
91+ -- * CounterOptions
92+ , CounterOptions
93+ , counterOptions
94+ , coField
95+ , coMetric
96+
97+ -- * MediaUpload'
98+ , MediaUpload'
99+ , mediaUpload
100+ , muEnabled
101+
102+ -- * AuditConfig
103+ , AuditConfig
104+ , auditConfig
105+ , acService
106+ , acExemptedMembers
107+
108+ -- * Control
109+ , Control
110+ , control
111+ , cEnvironment
112+
113+ -- * DeleteServiceStrategy
114+ , DeleteServiceStrategy
115+ , deleteServiceStrategy
116+
117+ -- * AuthRequirement
118+ , AuthRequirement
119+ , authRequirement
120+ , arProviderId
121+ , arAudiences
122+
123+ -- * ListServicesResponse
124+ , ListServicesResponse
125+ , listServicesResponse
126+ , lsrNextPageToken
127+ , lsrServices
128+
129+ -- * Context
130+ , Context
131+ , context
132+ , cRules
133+
134+ -- * LoggingDestination
135+ , LoggingDestination
136+ , loggingDestination
137+ , ldMonitoredResource
138+ , ldLogs
139+
140+ -- * MetricDescriptor
141+ , MetricDescriptor
142+ , metricDescriptor
143+ , mdMetricKind
144+ , mdName
145+ , mdDisplayName
146+ , mdLabels
147+ , mdType
148+ , mdValueType
149+ , mdDescription
150+ , mdUnit
151+
152+ -- * GetIAMPolicyRequest
153+ , GetIAMPolicyRequest
154+ , getIAMPolicyRequest
155+
156+ -- * BackendRule
157+ , BackendRule
158+ , backendRule
159+ , brSelector
160+ , brAddress
161+ , brDeadline
162+
163+ -- * SubmitConfigSourceRequest
164+ , SubmitConfigSourceRequest
165+ , submitConfigSourceRequest
166+ , scsrValidateOnly
167+ , scsrConfigSource
168+
169+ -- * SourceContext
170+ , SourceContext
171+ , sourceContext
172+ , scFileName
173+
174+ -- * ConditionSys
175+ , ConditionSys (..)
176+
177+ -- * Field
178+ , Field
179+ , field
180+ , fKind
181+ , fOneofIndex
182+ , fName
183+ , fJSONName
184+ , fCardinality
185+ , fOptions
186+ , fPacked
187+ , fDefaultValue
188+ , fNumber
189+ , fTypeURL
190+
191+ -- * FieldKind
192+ , FieldKind (..)
193+
194+ -- * EnumSyntax
195+ , EnumSyntax (..)
196+
197+ -- * TrafficPercentStrategy
198+ , TrafficPercentStrategy
199+ , trafficPercentStrategy
200+ , tpsPercentages
201+
202+ -- * Service
203+ , Service
204+ , service
205+ , sControl
206+ , sMetrics
207+ , sContext
208+ , sAuthentication
209+ , sAPIs
210+ , sTypes
211+ , sAnalytics
212+ , sVisibility
213+ , sSystemTypes
214+ , sMonitoredResources
215+ , sBackend
216+ , sMonitoring
217+ , sName
218+ , sSystemParameters
219+ , sLogs
220+ , sDocumentation
221+ , sId
222+ , sUsage
223+ , sEndpoints
224+ , sEnums
225+ , sConfigVersion
226+ , sHTTP
227+ , sTitle
228+ , sProducerProjectId
229+ , sCustomError
230+ , sLogging
231+
232+ -- * Operation
233+ , Operation
234+ , operation
235+ , oDone
236+ , oError
237+ , oResponse
238+ , oName
239+ , oMetadata
240+
241+ -- * EnableServiceRequest
242+ , EnableServiceRequest
243+ , enableServiceRequest
244+ , esrConsumerId
245+
246+ -- * ListServiceConfigsResponse
247+ , ListServiceConfigsResponse
248+ , listServiceConfigsResponse
249+ , lscrServiceConfigs
250+ , lscrNextPageToken
251+
252+ -- * CustomErrorRule
253+ , CustomErrorRule
254+ , customErrorRule
255+ , cerIsErrorType
256+ , cerSelector
257+
258+ -- * SubmitConfigSourceResponse
259+ , SubmitConfigSourceResponse
260+ , submitConfigSourceResponse
261+ , scsrServiceConfig
262+
263+ -- * VisibilityRule
264+ , VisibilityRule
265+ , visibilityRule
266+ , vrRestriction
267+ , vrSelector
268+
269+ -- * ChangeReport
270+ , ChangeReport
271+ , changeReport
272+ , crConfigChanges
273+
274+ -- * MediaDownload'
275+ , MediaDownload'
276+ , mediaDownload
277+ , mdEnabled
278+
279+ -- * OptionValue
280+ , OptionValue
281+ , optionValue
282+ , ovAddtional
283+
284+ -- * EnumValue
285+ , EnumValue
286+ , enumValue
287+ , evName
288+ , evOptions
289+ , evNumber
290+
291+ -- * Authentication
292+ , Authentication
293+ , authentication
294+ , aRules
295+ , aProviders
296+
297+ -- * RuleAction
298+ , RuleAction (..)
299+
300+ -- * Mixin
301+ , Mixin
302+ , mixin
303+ , mRoot
304+ , mName
305+
306+ -- * CustomHTTPPattern
307+ , CustomHTTPPattern
308+ , customHTTPPattern
309+ , chttppPath
310+ , chttppKind
311+
312+ -- * UsageRule
313+ , UsageRule
314+ , usageRule
315+ , urSelector
316+ , urAllowUnregisteredCalls
317+
318+ -- * StatusDetailsItem
319+ , StatusDetailsItem
320+ , statusDetailsItem
321+ , sdiAddtional
322+
323+ -- * Page
324+ , Page
325+ , page
326+ , pSubpages
327+ , pContent
328+ , pName
329+
330+ -- * GenerateConfigReportRequestOldConfig
331+ , GenerateConfigReportRequestOldConfig
332+ , generateConfigReportRequestOldConfig
333+ , gcrrocAddtional
334+
335+ -- * Analytics
336+ , Analytics
337+ , analytics
338+ , aProducerDestinations
339+
340+ -- * Rule
341+ , Rule
342+ , rule
343+ , rAction
344+ , rIn
345+ , rNotIn
346+ , rConditions
347+ , rPermissions
348+ , rLogConfig
349+ , rDescription
350+
351+ -- * Visibility
352+ , Visibility
353+ , visibility
354+ , vRules
355+
356+ -- * AuthenticationRule
357+ , AuthenticationRule
358+ , authenticationRule
359+ , arRequirements
360+ , arSelector
361+ , arAllowWithoutCredential
362+ , arOAuth
363+
364+ -- * StepStatus
365+ , StepStatus (..)
366+
367+ -- * LabelDescriptorValueType
368+ , LabelDescriptorValueType (..)
369+
370+ -- * SetIAMPolicyRequest
371+ , SetIAMPolicyRequest
372+ , setIAMPolicyRequest
373+ , siprPolicy
374+
375+ -- * TrafficPercentStrategyPercentages
376+ , TrafficPercentStrategyPercentages
377+ , trafficPercentStrategyPercentages
378+ , tpspAddtional
379+
380+ -- * APISyntax
381+ , APISyntax (..)
382+
383+ -- * TypeSyntax
384+ , TypeSyntax (..)
385+
386+ -- * ListServiceRolloutsResponse
387+ , ListServiceRolloutsResponse
388+ , listServiceRolloutsResponse
389+ , lsrrNextPageToken
390+ , lsrrRollouts
391+
392+ -- * ConfigChange
393+ , ConfigChange
394+ , configChange
395+ , ccOldValue
396+ , ccNewValue
397+ , ccAdvices
398+ , ccChangeType
399+ , ccElement
400+
401+ -- * CloudAuditOptions
402+ , CloudAuditOptions
403+ , cloudAuditOptions
404+
405+ -- * Backend
406+ , Backend
407+ , backend
408+ , bRules
409+
410+ -- * ConditionOp
411+ , ConditionOp (..)
412+
413+ -- * DataAccessOptions
414+ , DataAccessOptions
415+ , dataAccessOptions
416+
417+ -- * Monitoring
418+ , Monitoring
419+ , monitoring
420+ , mProducerDestinations
421+ , mConsumerDestinations
422+
423+ -- * LogDescriptor
424+ , LogDescriptor
425+ , logDescriptor
426+ , ldName
427+ , ldDisplayName
428+ , ldLabels
429+ , ldDescription
430+
431+ -- * Method
432+ , Method
433+ , method
434+ , metRequestStreaming
435+ , metResponseTypeURL
436+ , metName
437+ , metResponseStreaming
438+ , metRequestTypeURL
439+ , metOptions
440+ , metSyntax
441+
442+ -- * Diagnostic
443+ , Diagnostic
444+ , diagnostic
445+ , dLocation
446+ , dKind
447+ , dMessage
448+
449+ -- * RolloutStatus
450+ , RolloutStatus (..)
451+
452+ -- * SystemParameters
453+ , SystemParameters
454+ , systemParameters
455+ , spRules
456+
457+ -- * DiagnosticKind
458+ , DiagnosticKind (..)
459+
460+ -- * ConfigSource
461+ , ConfigSource
462+ , configSource
463+ , csFiles
464+ , csId
465+
466+ -- * Documentation
467+ , Documentation
468+ , documentation
469+ , dSummary
470+ , dDocumentationRootURL
471+ , dRules
472+ , dPages
473+ , dOverview
474+
475+ -- * Step
476+ , Step
477+ , step
478+ , sStatus
479+ , sDescription
480+
481+ -- * Xgafv
482+ , Xgafv (..)
483+
484+ -- * AnalyticsDestination
485+ , AnalyticsDestination
486+ , analyticsDestination
487+ , adMetrics
488+ , adMonitoredResource
489+
490+ -- * ConfigFileFileType
491+ , ConfigFileFileType (..)
492+
493+ -- * TestIAMPermissionsRequest
494+ , TestIAMPermissionsRequest
495+ , testIAMPermissionsRequest
496+ , tiprPermissions
497+
498+ -- * ConfigChangeChangeType
499+ , ConfigChangeChangeType (..)
500+
501+ -- * SystemParameterRule
502+ , SystemParameterRule
503+ , systemParameterRule
504+ , sprSelector
505+ , sprParameters
506+
507+ -- * LabelDescriptor
508+ , LabelDescriptor
509+ , labelDescriptor
510+ , lKey
511+ , lValueType
512+ , lDescription
513+
514+ -- * Usage
515+ , Usage
516+ , usage
517+ , uRequirements
518+ , uRules
519+
520+ -- * FieldCardinality
521+ , FieldCardinality (..)
522+
523+ -- * TestIAMPermissionsResponse
524+ , TestIAMPermissionsResponse
525+ , testIAMPermissionsResponse
526+ , tiamprPermissions
527+
528+ -- * GenerateConfigReportRequestNewConfig
529+ , GenerateConfigReportRequestNewConfig
530+ , generateConfigReportRequestNewConfig
531+ , gcrrncAddtional
532+
533+ -- * HTTP
534+ , HTTP
535+ , hTTP
536+ , hRules
537+
538+ -- * DisableServiceRequest
539+ , DisableServiceRequest
540+ , disableServiceRequest
541+ , dsrConsumerId
542+
543+ -- * Policy
544+ , Policy
545+ , policy
546+ , pAuditConfigs
547+ , pEtag
548+ , pRules
549+ , pVersion
550+ , pBindings
551+ , pIAMOwned
552+
553+ -- * Type
554+ , Type
555+ , type'
556+ , tSourceContext
557+ , tOneofs
558+ , tName
559+ , tOptions
560+ , tFields
561+ , tSyntax
562+
563+ -- * API
564+ , API
565+ , api
566+ , aSourceContext
567+ , aMixins
568+ , aMethods
569+ , aName
570+ , aVersion
571+ , aOptions
572+ , aSyntax
573+
574+ -- * MonitoringDestination
575+ , MonitoringDestination
576+ , monitoringDestination
577+ , mdMetrics
578+ , mdMonitoredResource
579+
580+ -- * ManagedService
581+ , ManagedService
582+ , managedService
583+ , msServiceName
584+ , msProducerProjectId
585+
586+ -- * OperationMetadata
587+ , OperationMetadata
588+ , operationMetadata
589+ , omStartTime
590+ , omSteps
591+ , omProgressPercentage
592+ , omResourceNames
593+
594+ -- * Endpoint
595+ , Endpoint
596+ , endpoint
597+ , eAliases
598+ , eAPIs
599+ , eAllowCORS
600+ , eName
601+ , eFeatures
602+
603+ -- * OAuthRequirements
604+ , OAuthRequirements
605+ , oAuthRequirements
606+ , oarCanonicalScopes
607+
608+ -- * MetricDescriptorMetricKind
609+ , MetricDescriptorMetricKind (..)
610+
611+ -- * CustomError
612+ , CustomError
613+ , customError
614+ , ceRules
615+ , ceTypes
616+
617+ -- * Option
618+ , Option
619+ , option
620+ , optValue
621+ , optName
622+
623+ -- * Rollout
624+ , Rollout
625+ , rollout
626+ , rStatus
627+ , rDeleteServiceStrategy
628+ , rTrafficPercentStrategy
629+ , rCreatedBy
630+ , rServiceName
631+ , rRolloutId
632+ , rCreateTime
633+
634+ -- * Condition
635+ , Condition
636+ , condition
637+ , cOp
638+ , cIAM
639+ , cValues
640+ , cValue
641+ , cSys
642+ , cSvc
643+
644+ -- * Enum
645+ , Enum
646+ , enum
647+ , enuSourceContext
648+ , enuEnumvalue
649+ , enuName
650+ , enuOptions
651+ , enuSyntax
652+
653+ -- * Logging
654+ , Logging
655+ , logging
656+ , lProducerDestinations
657+ , lConsumerDestinations
658+
659+ -- * ConfigRef
660+ , ConfigRef
661+ , configRef
662+ , crName
663+
664+ -- * MethodSyntax
665+ , MethodSyntax (..)
666+
667+ -- * GenerateConfigReportRequest
668+ , GenerateConfigReportRequest
669+ , generateConfigReportRequest
670+ , gcrrOldConfig
671+ , gcrrNewConfig
672+
673+ -- * HTTPRule
674+ , HTTPRule
675+ , hTTPRule
676+ , httprMediaUpload
677+ , httprSelector
678+ , httprPost
679+ , httprMediaDownload
680+ , httprBody
681+ , httprCustom
682+ , httprResponseBody
683+ , httprPatch
684+ , httprGet
685+ , httprAdditionalBindings
686+ , httprDelete
687+ , httprPut
688+
689+ -- * ConditionIAM
690+ , ConditionIAM (..)
691+
692+ -- * OperationResponse
693+ , OperationResponse
694+ , operationResponse
695+ , orAddtional
696+
697+ -- * LogConfig
698+ , LogConfig
699+ , logConfig
700+ , lcCloudAudit
701+ , lcDataAccess
702+ , lcCounter
703+
704+ -- * AuthProvider
705+ , AuthProvider
706+ , authProvider
707+ , apJWKsURI
708+ , apId
709+ , apIssuer
710+
711+ -- * Binding
712+ , Binding
713+ , binding
714+ , bMembers
715+ , bRole
716+
717+ -- * ContextRule
718+ , ContextRule
719+ , contextRule
720+ , crSelector
721+ , crRequested
722+ , crProvided
723+ ) where
724+
725+import Network.Google.Prelude
726+import Network.Google.ServiceManagement.Types.Product
727+import Network.Google.ServiceManagement.Types.Sum
728+
729+-- | Default request referring to version 'v1' of the Google Service Management API. This contains the host and root path used as a starting point for constructing service requests.
730+serviceManagementService :: ServiceConfig
731+serviceManagementService
732+ = defaultService (ServiceId "servicemanagement:v1")
733+ "servicemanagement.googleapis.com"
734+
735+-- | View your data across Google Cloud Platform services
736+cloudPlatformReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform.read-only"]
737+cloudPlatformReadOnlyScope = Proxy;
738+
739+-- | View and manage your data across Google Cloud Platform services
740+cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]
741+cloudPlatformScope = Proxy;
742+
743+-- | View your Google API service configuration
744+serviceManagementReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/service.management.readonly"]
745+serviceManagementReadOnlyScope = Proxy;
746+
747+-- | Manage your Google API service configuration
748+serviceManagementScope :: Proxy '["https://www.googleapis.com/auth/service.management"]
749+serviceManagementScope = Proxy;
gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Product.hsnew file+6247
@@ -0,0 +1,6247 @@
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.ServiceManagement.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.ServiceManagement.Types.Product where
19+
20+import Network.Google.Prelude
21+import Network.Google.ServiceManagement.Types.Sum
22+
23+-- | Response message for UndeleteService method.
24+--
25+-- /See:/ 'undeleteServiceResponse' smart constructor.
26+newtype UndeleteServiceResponse = UndeleteServiceResponse'
27+ { _usrService :: Maybe ManagedService
28+ } deriving (Eq,Show,Data,Typeable,Generic)
29+
30+-- | Creates a value of 'UndeleteServiceResponse' with the minimum fields required to make a request.
31+--
32+-- Use one of the following lenses to modify other fields as desired:
33+--
34+-- * 'usrService'
35+undeleteServiceResponse
36+ :: UndeleteServiceResponse
37+undeleteServiceResponse =
38+ UndeleteServiceResponse'
39+ { _usrService = Nothing
40+ }
41+
42+-- | Revived service resource.
43+usrService :: Lens' UndeleteServiceResponse (Maybe ManagedService)
44+usrService
45+ = lens _usrService (\ s a -> s{_usrService = a})
46+
47+instance FromJSON UndeleteServiceResponse where
48+ parseJSON
49+ = withObject "UndeleteServiceResponse"
50+ (\ o ->
51+ UndeleteServiceResponse' <$> (o .:? "service"))
52+
53+instance ToJSON UndeleteServiceResponse where
54+ toJSON UndeleteServiceResponse'{..}
55+ = object (catMaybes [("service" .=) <$> _usrService])
56+
57+-- | Define a parameter\'s name and location. The parameter may be passed as
58+-- either an HTTP header or a URL query parameter, and if both are passed
59+-- the behavior is implementation-dependent.
60+--
61+-- /See:/ 'systemParameter' smart constructor.
62+data SystemParameter = SystemParameter'
63+ { _spHTTPHeader :: !(Maybe Text)
64+ , _spURLQueryParameter :: !(Maybe Text)
65+ , _spName :: !(Maybe Text)
66+ } deriving (Eq,Show,Data,Typeable,Generic)
67+
68+-- | Creates a value of 'SystemParameter' with the minimum fields required to make a request.
69+--
70+-- Use one of the following lenses to modify other fields as desired:
71+--
72+-- * 'spHTTPHeader'
73+--
74+-- * 'spURLQueryParameter'
75+--
76+-- * 'spName'
77+systemParameter
78+ :: SystemParameter
79+systemParameter =
80+ SystemParameter'
81+ { _spHTTPHeader = Nothing
82+ , _spURLQueryParameter = Nothing
83+ , _spName = Nothing
84+ }
85+
86+-- | Define the HTTP header name to use for the parameter. It is case
87+-- insensitive.
88+spHTTPHeader :: Lens' SystemParameter (Maybe Text)
89+spHTTPHeader
90+ = lens _spHTTPHeader (\ s a -> s{_spHTTPHeader = a})
91+
92+-- | Define the URL query parameter name to use for the parameter. It is case
93+-- sensitive.
94+spURLQueryParameter :: Lens' SystemParameter (Maybe Text)
95+spURLQueryParameter
96+ = lens _spURLQueryParameter
97+ (\ s a -> s{_spURLQueryParameter = a})
98+
99+-- | Define the name of the parameter, such as \"api_key\", \"alt\",
100+-- \"callback\", and etc. It is case sensitive.
101+spName :: Lens' SystemParameter (Maybe Text)
102+spName = lens _spName (\ s a -> s{_spName = a})
103+
104+instance FromJSON SystemParameter where
105+ parseJSON
106+ = withObject "SystemParameter"
107+ (\ o ->
108+ SystemParameter' <$>
109+ (o .:? "httpHeader") <*> (o .:? "urlQueryParameter")
110+ <*> (o .:? "name"))
111+
112+instance ToJSON SystemParameter where
113+ toJSON SystemParameter'{..}
114+ = object
115+ (catMaybes
116+ [("httpHeader" .=) <$> _spHTTPHeader,
117+ ("urlQueryParameter" .=) <$> _spURLQueryParameter,
118+ ("name" .=) <$> _spName])
119+
120+-- | Generated advice about this change, used for providing more information
121+-- about how a change will affect the existing service.
122+--
123+-- /See:/ 'advice' smart constructor.
124+newtype Advice = Advice'
125+ { _aDescription :: Maybe Text
126+ } deriving (Eq,Show,Data,Typeable,Generic)
127+
128+-- | Creates a value of 'Advice' 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+-- * 'aDescription'
133+advice
134+ :: Advice
135+advice =
136+ Advice'
137+ { _aDescription = Nothing
138+ }
139+
140+-- | Useful description for why this advice was applied and what actions
141+-- should be taken to mitigate any implied risks.
142+aDescription :: Lens' Advice (Maybe Text)
143+aDescription
144+ = lens _aDescription (\ s a -> s{_aDescription = a})
145+
146+instance FromJSON Advice where
147+ parseJSON
148+ = withObject "Advice"
149+ (\ o -> Advice' <$> (o .:? "description"))
150+
151+instance ToJSON Advice where
152+ toJSON Advice'{..}
153+ = object
154+ (catMaybes [("description" .=) <$> _aDescription])
155+
156+-- | Generic specification of a source configuration file
157+--
158+-- /See:/ 'configFile' smart constructor.
159+data ConfigFile = ConfigFile'
160+ { _cfFileContents :: !(Maybe Base64)
161+ , _cfFilePath :: !(Maybe Text)
162+ , _cfFileType :: !(Maybe ConfigFileFileType)
163+ } deriving (Eq,Show,Data,Typeable,Generic)
164+
165+-- | Creates a value of 'ConfigFile' with the minimum fields required to make a request.
166+--
167+-- Use one of the following lenses to modify other fields as desired:
168+--
169+-- * 'cfFileContents'
170+--
171+-- * 'cfFilePath'
172+--
173+-- * 'cfFileType'
174+configFile
175+ :: ConfigFile
176+configFile =
177+ ConfigFile'
178+ { _cfFileContents = Nothing
179+ , _cfFilePath = Nothing
180+ , _cfFileType = Nothing
181+ }
182+
183+-- | The bytes that constitute the file.
184+cfFileContents :: Lens' ConfigFile (Maybe ByteString)
185+cfFileContents
186+ = lens _cfFileContents
187+ (\ s a -> s{_cfFileContents = a})
188+ . mapping _Base64
189+
190+-- | The file name of the configuration file (full or relative path).
191+cfFilePath :: Lens' ConfigFile (Maybe Text)
192+cfFilePath
193+ = lens _cfFilePath (\ s a -> s{_cfFilePath = a})
194+
195+-- | The type of configuration file this represents.
196+cfFileType :: Lens' ConfigFile (Maybe ConfigFileFileType)
197+cfFileType
198+ = lens _cfFileType (\ s a -> s{_cfFileType = a})
199+
200+instance FromJSON ConfigFile where
201+ parseJSON
202+ = withObject "ConfigFile"
203+ (\ o ->
204+ ConfigFile' <$>
205+ (o .:? "fileContents") <*> (o .:? "filePath") <*>
206+ (o .:? "fileType"))
207+
208+instance ToJSON ConfigFile where
209+ toJSON ConfigFile'{..}
210+ = object
211+ (catMaybes
212+ [("fileContents" .=) <$> _cfFileContents,
213+ ("filePath" .=) <$> _cfFilePath,
214+ ("fileType" .=) <$> _cfFileType])
215+
216+-- | An object that describes the schema of a MonitoredResource object using
217+-- a type name and a set of labels. For example, the monitored resource
218+-- descriptor for Google Compute Engine VM instances has a type of
219+-- \`\"gce_instance\"\` and specifies the use of the labels
220+-- \`\"instance_id\"\` and \`\"zone\"\` to identify particular VM
221+-- instances. Different APIs can support different monitored resource
222+-- types. APIs generally provide a \`list\` method that returns the
223+-- monitored resource descriptors used by the API.
224+--
225+-- /See:/ 'monitoredResourceDescriptor' smart constructor.
226+data MonitoredResourceDescriptor = MonitoredResourceDescriptor'
227+ { _mrdName :: !(Maybe Text)
228+ , _mrdDisplayName :: !(Maybe Text)
229+ , _mrdLabels :: !(Maybe [LabelDescriptor])
230+ , _mrdType :: !(Maybe Text)
231+ , _mrdDescription :: !(Maybe Text)
232+ } deriving (Eq,Show,Data,Typeable,Generic)
233+
234+-- | Creates a value of 'MonitoredResourceDescriptor' with the minimum fields required to make a request.
235+--
236+-- Use one of the following lenses to modify other fields as desired:
237+--
238+-- * 'mrdName'
239+--
240+-- * 'mrdDisplayName'
241+--
242+-- * 'mrdLabels'
243+--
244+-- * 'mrdType'
245+--
246+-- * 'mrdDescription'
247+monitoredResourceDescriptor
248+ :: MonitoredResourceDescriptor
249+monitoredResourceDescriptor =
250+ MonitoredResourceDescriptor'
251+ { _mrdName = Nothing
252+ , _mrdDisplayName = Nothing
253+ , _mrdLabels = Nothing
254+ , _mrdType = Nothing
255+ , _mrdDescription = Nothing
256+ }
257+
258+-- | Optional. The resource name of the monitored resource descriptor:
259+-- \`\"projects\/{project_id}\/monitoredResourceDescriptors\/{type}\"\`
260+-- where {type} is the value of the \`type\` field in this object and
261+-- {project_id} is a project ID that provides API-specific context for
262+-- accessing the type. APIs that do not use project information can use the
263+-- resource name format \`\"monitoredResourceDescriptors\/{type}\"\`.
264+mrdName :: Lens' MonitoredResourceDescriptor (Maybe Text)
265+mrdName = lens _mrdName (\ s a -> s{_mrdName = a})
266+
267+-- | Optional. A concise name for the monitored resource type that might be
268+-- displayed in user interfaces. It should be a Title Cased Noun Phrase,
269+-- without any article or other determiners. For example, \`\"Google Cloud
270+-- SQL Database\"\`.
271+mrdDisplayName :: Lens' MonitoredResourceDescriptor (Maybe Text)
272+mrdDisplayName
273+ = lens _mrdDisplayName
274+ (\ s a -> s{_mrdDisplayName = a})
275+
276+-- | Required. A set of labels used to describe instances of this monitored
277+-- resource type. For example, an individual Google Cloud SQL database is
278+-- identified by values for the labels \`\"database_id\"\` and
279+-- \`\"zone\"\`.
280+mrdLabels :: Lens' MonitoredResourceDescriptor [LabelDescriptor]
281+mrdLabels
282+ = lens _mrdLabels (\ s a -> s{_mrdLabels = a}) .
283+ _Default
284+ . _Coerce
285+
286+-- | Required. The monitored resource type. For example, the type
287+-- \`\"cloudsql_database\"\` represents databases in Google Cloud SQL. The
288+-- maximum length of this value is 256 characters.
289+mrdType :: Lens' MonitoredResourceDescriptor (Maybe Text)
290+mrdType = lens _mrdType (\ s a -> s{_mrdType = a})
291+
292+-- | Optional. A detailed description of the monitored resource type that
293+-- might be used in documentation.
294+mrdDescription :: Lens' MonitoredResourceDescriptor (Maybe Text)
295+mrdDescription
296+ = lens _mrdDescription
297+ (\ s a -> s{_mrdDescription = a})
298+
299+instance FromJSON MonitoredResourceDescriptor where
300+ parseJSON
301+ = withObject "MonitoredResourceDescriptor"
302+ (\ o ->
303+ MonitoredResourceDescriptor' <$>
304+ (o .:? "name") <*> (o .:? "displayName") <*>
305+ (o .:? "labels" .!= mempty)
306+ <*> (o .:? "type")
307+ <*> (o .:? "description"))
308+
309+instance ToJSON MonitoredResourceDescriptor where
310+ toJSON MonitoredResourceDescriptor'{..}
311+ = object
312+ (catMaybes
313+ [("name" .=) <$> _mrdName,
314+ ("displayName" .=) <$> _mrdDisplayName,
315+ ("labels" .=) <$> _mrdLabels,
316+ ("type" .=) <$> _mrdType,
317+ ("description" .=) <$> _mrdDescription])
318+
319+-- | A documentation rule provides information about individual API elements.
320+--
321+-- /See:/ 'documentationRule' smart constructor.
322+data DocumentationRule = DocumentationRule'
323+ { _drSelector :: !(Maybe Text)
324+ , _drDeprecationDescription :: !(Maybe Text)
325+ , _drDescription :: !(Maybe Text)
326+ } deriving (Eq,Show,Data,Typeable,Generic)
327+
328+-- | Creates a value of 'DocumentationRule' with the minimum fields required to make a request.
329+--
330+-- Use one of the following lenses to modify other fields as desired:
331+--
332+-- * 'drSelector'
333+--
334+-- * 'drDeprecationDescription'
335+--
336+-- * 'drDescription'
337+documentationRule
338+ :: DocumentationRule
339+documentationRule =
340+ DocumentationRule'
341+ { _drSelector = Nothing
342+ , _drDeprecationDescription = Nothing
343+ , _drDescription = Nothing
344+ }
345+
346+-- | The selector is a comma-separated list of patterns. Each pattern is a
347+-- qualified name of the element which may end in \"*\", indicating a
348+-- wildcard. Wildcards are only allowed at the end and for a whole
349+-- component of the qualified name, i.e. \"foo.*\" is ok, but not
350+-- \"foo.b*\" or \"foo.*.bar\". To specify a default for all applicable
351+-- elements, the whole pattern \"*\" is used.
352+drSelector :: Lens' DocumentationRule (Maybe Text)
353+drSelector
354+ = lens _drSelector (\ s a -> s{_drSelector = a})
355+
356+-- | Deprecation description of the selected element(s). It can be provided
357+-- if an element is marked as \`deprecated\`.
358+drDeprecationDescription :: Lens' DocumentationRule (Maybe Text)
359+drDeprecationDescription
360+ = lens _drDeprecationDescription
361+ (\ s a -> s{_drDeprecationDescription = a})
362+
363+-- | Description of the selected API(s).
364+drDescription :: Lens' DocumentationRule (Maybe Text)
365+drDescription
366+ = lens _drDescription
367+ (\ s a -> s{_drDescription = a})
368+
369+instance FromJSON DocumentationRule where
370+ parseJSON
371+ = withObject "DocumentationRule"
372+ (\ o ->
373+ DocumentationRule' <$>
374+ (o .:? "selector") <*>
375+ (o .:? "deprecationDescription")
376+ <*> (o .:? "description"))
377+
378+instance ToJSON DocumentationRule where
379+ toJSON DocumentationRule'{..}
380+ = object
381+ (catMaybes
382+ [("selector" .=) <$> _drSelector,
383+ ("deprecationDescription" .=) <$>
384+ _drDeprecationDescription,
385+ ("description" .=) <$> _drDescription])
386+
387+-- | The \`Status\` type defines a logical error model that is suitable for
388+-- different programming environments, including REST APIs and RPC APIs. It
389+-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is
390+-- designed to be: - Simple to use and understand for most users - Flexible
391+-- enough to meet unexpected needs # Overview The \`Status\` message
392+-- contains three pieces of data: error code, error message, and error
393+-- details. The error code should be an enum value of google.rpc.Code, but
394+-- it may accept additional error codes if needed. The error message should
395+-- be a developer-facing English message that helps developers *understand*
396+-- and *resolve* the error. If a localized user-facing error message is
397+-- needed, put the localized message in the error details or localize it in
398+-- the client. The optional error details may contain arbitrary information
399+-- about the error. There is a predefined set of error detail types in the
400+-- package \`google.rpc\` which can be used for common error conditions. #
401+-- Language mapping The \`Status\` message is the logical representation of
402+-- the error model, but it is not necessarily the actual wire format. When
403+-- the \`Status\` message is exposed in different client libraries and
404+-- different wire protocols, it can be mapped differently. For example, it
405+-- will likely be mapped to some exceptions in Java, but more likely mapped
406+-- to some error codes in C. # Other uses The error model and the
407+-- \`Status\` message can be used in a variety of environments, either with
408+-- or without APIs, to provide a consistent developer experience across
409+-- different environments. Example uses of this error model include: -
410+-- Partial errors. If a service needs to return partial errors to the
411+-- client, it may embed the \`Status\` in the normal response to indicate
412+-- the partial errors. - Workflow errors. A typical workflow has multiple
413+-- steps. Each step may have a \`Status\` message for error reporting
414+-- purpose. - Batch operations. If a client uses batch request and batch
415+-- response, the \`Status\` message should be used directly inside batch
416+-- response, one for each error sub-response. - Asynchronous operations. If
417+-- an API call embeds asynchronous operation results in its response, the
418+-- status of those operations should be represented directly using the
419+-- \`Status\` message. - Logging. If some API errors are stored in logs,
420+-- the message \`Status\` could be used directly after any stripping needed
421+-- for security\/privacy reasons.
422+--
423+-- /See:/ 'status' smart constructor.
424+data Status = Status'
425+ { _sDetails :: !(Maybe [StatusDetailsItem])
426+ , _sCode :: !(Maybe (Textual Int32))
427+ , _sMessage :: !(Maybe Text)
428+ } deriving (Eq,Show,Data,Typeable,Generic)
429+
430+-- | Creates a value of 'Status' with the minimum fields required to make a request.
431+--
432+-- Use one of the following lenses to modify other fields as desired:
433+--
434+-- * 'sDetails'
435+--
436+-- * 'sCode'
437+--
438+-- * 'sMessage'
439+status
440+ :: Status
441+status =
442+ Status'
443+ { _sDetails = Nothing
444+ , _sCode = Nothing
445+ , _sMessage = Nothing
446+ }
447+
448+-- | A list of messages that carry the error details. There will be a common
449+-- set of message types for APIs to use.
450+sDetails :: Lens' Status [StatusDetailsItem]
451+sDetails
452+ = lens _sDetails (\ s a -> s{_sDetails = a}) .
453+ _Default
454+ . _Coerce
455+
456+-- | The status code, which should be an enum value of google.rpc.Code.
457+sCode :: Lens' Status (Maybe Int32)
458+sCode
459+ = lens _sCode (\ s a -> s{_sCode = a}) .
460+ mapping _Coerce
461+
462+-- | A developer-facing error message, which should be in English. Any
463+-- user-facing error message should be localized and sent in the
464+-- google.rpc.Status.details field, or localized by the client.
465+sMessage :: Lens' Status (Maybe Text)
466+sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
467+
468+instance FromJSON Status where
469+ parseJSON
470+ = withObject "Status"
471+ (\ o ->
472+ Status' <$>
473+ (o .:? "details" .!= mempty) <*> (o .:? "code") <*>
474+ (o .:? "message"))
475+
476+instance ToJSON Status where
477+ toJSON Status'{..}
478+ = object
479+ (catMaybes
480+ [("details" .=) <$> _sDetails,
481+ ("code" .=) <$> _sCode,
482+ ("message" .=) <$> _sMessage])
483+
484+-- | Service-specific metadata associated with the operation. It typically
485+-- contains progress information and common metadata such as create time.
486+-- Some services might not provide such metadata. Any method that returns a
487+-- long-running operation should document the metadata type, if any.
488+--
489+-- /See:/ 'operationSchema' smart constructor.
490+newtype OperationSchema = OperationSchema'
491+ { _osAddtional :: HashMap Text JSONValue
492+ } deriving (Eq,Show,Data,Typeable,Generic)
493+
494+-- | Creates a value of 'OperationSchema' with the minimum fields required to make a request.
495+--
496+-- Use one of the following lenses to modify other fields as desired:
497+--
498+-- * 'osAddtional'
499+operationSchema
500+ :: HashMap Text JSONValue -- ^ 'osAddtional'
501+ -> OperationSchema
502+operationSchema pOsAddtional_ =
503+ OperationSchema'
504+ { _osAddtional = _Coerce # pOsAddtional_
505+ }
506+
507+-- | Properties of the object. Contains field \'type with type URL.
508+osAddtional :: Lens' OperationSchema (HashMap Text JSONValue)
509+osAddtional
510+ = lens _osAddtional (\ s a -> s{_osAddtional = a}) .
511+ _Coerce
512+
513+instance FromJSON OperationSchema where
514+ parseJSON
515+ = withObject "OperationSchema"
516+ (\ o -> OperationSchema' <$> (parseJSONObject o))
517+
518+instance ToJSON OperationSchema where
519+ toJSON = toJSON . _osAddtional
520+
521+-- | Response message for GenerateConfigReport method.
522+--
523+-- /See:/ 'generateConfigReportResponse' smart constructor.
524+data GenerateConfigReportResponse = GenerateConfigReportResponse'
525+ { _gcrrDiagnostics :: !(Maybe [Diagnostic])
526+ , _gcrrServiceName :: !(Maybe Text)
527+ , _gcrrId :: !(Maybe Text)
528+ , _gcrrChangeReports :: !(Maybe [ChangeReport])
529+ } deriving (Eq,Show,Data,Typeable,Generic)
530+
531+-- | Creates a value of 'GenerateConfigReportResponse' with the minimum fields required to make a request.
532+--
533+-- Use one of the following lenses to modify other fields as desired:
534+--
535+-- * 'gcrrDiagnostics'
536+--
537+-- * 'gcrrServiceName'
538+--
539+-- * 'gcrrId'
540+--
541+-- * 'gcrrChangeReports'
542+generateConfigReportResponse
543+ :: GenerateConfigReportResponse
544+generateConfigReportResponse =
545+ GenerateConfigReportResponse'
546+ { _gcrrDiagnostics = Nothing
547+ , _gcrrServiceName = Nothing
548+ , _gcrrId = Nothing
549+ , _gcrrChangeReports = Nothing
550+ }
551+
552+-- | Errors \/ Linter warnings associated with the service definition this
553+-- report belongs to.
554+gcrrDiagnostics :: Lens' GenerateConfigReportResponse [Diagnostic]
555+gcrrDiagnostics
556+ = lens _gcrrDiagnostics
557+ (\ s a -> s{_gcrrDiagnostics = a})
558+ . _Default
559+ . _Coerce
560+
561+-- | Name of the service this report belongs to.
562+gcrrServiceName :: Lens' GenerateConfigReportResponse (Maybe Text)
563+gcrrServiceName
564+ = lens _gcrrServiceName
565+ (\ s a -> s{_gcrrServiceName = a})
566+
567+-- | ID of the service configuration this report belongs to.
568+gcrrId :: Lens' GenerateConfigReportResponse (Maybe Text)
569+gcrrId = lens _gcrrId (\ s a -> s{_gcrrId = a})
570+
571+-- | list of ChangeReport, each corresponding to comparison between two
572+-- service configurations.
573+gcrrChangeReports :: Lens' GenerateConfigReportResponse [ChangeReport]
574+gcrrChangeReports
575+ = lens _gcrrChangeReports
576+ (\ s a -> s{_gcrrChangeReports = a})
577+ . _Default
578+ . _Coerce
579+
580+instance FromJSON GenerateConfigReportResponse where
581+ parseJSON
582+ = withObject "GenerateConfigReportResponse"
583+ (\ o ->
584+ GenerateConfigReportResponse' <$>
585+ (o .:? "diagnostics" .!= mempty) <*>
586+ (o .:? "serviceName")
587+ <*> (o .:? "id")
588+ <*> (o .:? "changeReports" .!= mempty))
589+
590+instance ToJSON GenerateConfigReportResponse where
591+ toJSON GenerateConfigReportResponse'{..}
592+ = object
593+ (catMaybes
594+ [("diagnostics" .=) <$> _gcrrDiagnostics,
595+ ("serviceName" .=) <$> _gcrrServiceName,
596+ ("id" .=) <$> _gcrrId,
597+ ("changeReports" .=) <$> _gcrrChangeReports])
598+
599+-- | Options for counters
600+--
601+-- /See:/ 'counterOptions' smart constructor.
602+data CounterOptions = CounterOptions'
603+ { _coField :: !(Maybe Text)
604+ , _coMetric :: !(Maybe Text)
605+ } deriving (Eq,Show,Data,Typeable,Generic)
606+
607+-- | Creates a value of 'CounterOptions' with the minimum fields required to make a request.
608+--
609+-- Use one of the following lenses to modify other fields as desired:
610+--
611+-- * 'coField'
612+--
613+-- * 'coMetric'
614+counterOptions
615+ :: CounterOptions
616+counterOptions =
617+ CounterOptions'
618+ { _coField = Nothing
619+ , _coMetric = Nothing
620+ }
621+
622+-- | The field value to attribute.
623+coField :: Lens' CounterOptions (Maybe Text)
624+coField = lens _coField (\ s a -> s{_coField = a})
625+
626+-- | The metric to update.
627+coMetric :: Lens' CounterOptions (Maybe Text)
628+coMetric = lens _coMetric (\ s a -> s{_coMetric = a})
629+
630+instance FromJSON CounterOptions where
631+ parseJSON
632+ = withObject "CounterOptions"
633+ (\ o ->
634+ CounterOptions' <$>
635+ (o .:? "field") <*> (o .:? "metric"))
636+
637+instance ToJSON CounterOptions where
638+ toJSON CounterOptions'{..}
639+ = object
640+ (catMaybes
641+ [("field" .=) <$> _coField,
642+ ("metric" .=) <$> _coMetric])
643+
644+-- | Do not use this. For media support, add instead
645+-- [][google.bytestream.RestByteStream] as an API to your configuration.
646+--
647+-- /See:/ 'mediaUpload' smart constructor.
648+newtype MediaUpload' = MediaUpload''
649+ { _muEnabled :: Maybe Bool
650+ } deriving (Eq,Show,Data,Typeable,Generic)
651+
652+-- | Creates a value of 'MediaUpload' with the minimum fields required to make a request.
653+--
654+-- Use one of the following lenses to modify other fields as desired:
655+--
656+-- * 'muEnabled'
657+mediaUpload
658+ :: MediaUpload'
659+mediaUpload =
660+ MediaUpload''
661+ { _muEnabled = Nothing
662+ }
663+
664+-- | Whether upload is enabled.
665+muEnabled :: Lens' MediaUpload' (Maybe Bool)
666+muEnabled
667+ = lens _muEnabled (\ s a -> s{_muEnabled = a})
668+
669+instance FromJSON MediaUpload' where
670+ parseJSON
671+ = withObject "MediaUpload"
672+ (\ o -> MediaUpload'' <$> (o .:? "enabled"))
673+
674+instance ToJSON MediaUpload' where
675+ toJSON MediaUpload''{..}
676+ = object (catMaybes [("enabled" .=) <$> _muEnabled])
677+
678+-- | Enables \"data access\" audit logging for a service and specifies a list
679+-- of members that are log-exempted.
680+--
681+-- /See:/ 'auditConfig' smart constructor.
682+data AuditConfig = AuditConfig'
683+ { _acService :: !(Maybe Text)
684+ , _acExemptedMembers :: !(Maybe [Text])
685+ } deriving (Eq,Show,Data,Typeable,Generic)
686+
687+-- | Creates a value of 'AuditConfig' with the minimum fields required to make a request.
688+--
689+-- Use one of the following lenses to modify other fields as desired:
690+--
691+-- * 'acService'
692+--
693+-- * 'acExemptedMembers'
694+auditConfig
695+ :: AuditConfig
696+auditConfig =
697+ AuditConfig'
698+ { _acService = Nothing
699+ , _acExemptedMembers = Nothing
700+ }
701+
702+-- | Specifies a service that will be enabled for \"data access\" audit
703+-- logging. For example, \`resourcemanager\`, \`storage\`, \`compute\`.
704+-- \`allServices\` is a special value that covers all services.
705+acService :: Lens' AuditConfig (Maybe Text)
706+acService
707+ = lens _acService (\ s a -> s{_acService = a})
708+
709+-- | Specifies the identities that are exempted from \"data access\" audit
710+-- logging for the \`service\` specified above. Follows the same format of
711+-- Binding.members.
712+acExemptedMembers :: Lens' AuditConfig [Text]
713+acExemptedMembers
714+ = lens _acExemptedMembers
715+ (\ s a -> s{_acExemptedMembers = a})
716+ . _Default
717+ . _Coerce
718+
719+instance FromJSON AuditConfig where
720+ parseJSON
721+ = withObject "AuditConfig"
722+ (\ o ->
723+ AuditConfig' <$>
724+ (o .:? "service") <*>
725+ (o .:? "exemptedMembers" .!= mempty))
726+
727+instance ToJSON AuditConfig where
728+ toJSON AuditConfig'{..}
729+ = object
730+ (catMaybes
731+ [("service" .=) <$> _acService,
732+ ("exemptedMembers" .=) <$> _acExemptedMembers])
733+
734+-- | Selects and configures the service controller used by the service. The
735+-- service controller handles features like abuse, quota, billing, logging,
736+-- monitoring, etc.
737+--
738+-- /See:/ 'control' smart constructor.
739+newtype Control = Control'
740+ { _cEnvironment :: Maybe Text
741+ } deriving (Eq,Show,Data,Typeable,Generic)
742+
743+-- | Creates a value of 'Control' with the minimum fields required to make a request.
744+--
745+-- Use one of the following lenses to modify other fields as desired:
746+--
747+-- * 'cEnvironment'
748+control
749+ :: Control
750+control =
751+ Control'
752+ { _cEnvironment = Nothing
753+ }
754+
755+-- | The service control environment to use. If empty, no control plane
756+-- feature (like quota and billing) will be enabled.
757+cEnvironment :: Lens' Control (Maybe Text)
758+cEnvironment
759+ = lens _cEnvironment (\ s a -> s{_cEnvironment = a})
760+
761+instance FromJSON Control where
762+ parseJSON
763+ = withObject "Control"
764+ (\ o -> Control' <$> (o .:? "environment"))
765+
766+instance ToJSON Control where
767+ toJSON Control'{..}
768+ = object
769+ (catMaybes [("environment" .=) <$> _cEnvironment])
770+
771+-- | Strategy used to delete a service. This strategy is a placeholder only
772+-- used by the system generated rollout to delete a service.
773+--
774+-- /See:/ 'deleteServiceStrategy' smart constructor.
775+data DeleteServiceStrategy =
776+ DeleteServiceStrategy'
777+ deriving (Eq,Show,Data,Typeable,Generic)
778+
779+-- | Creates a value of 'DeleteServiceStrategy' with the minimum fields required to make a request.
780+--
781+deleteServiceStrategy
782+ :: DeleteServiceStrategy
783+deleteServiceStrategy = DeleteServiceStrategy'
784+
785+instance FromJSON DeleteServiceStrategy where
786+ parseJSON
787+ = withObject "DeleteServiceStrategy"
788+ (\ o -> pure DeleteServiceStrategy')
789+
790+instance ToJSON DeleteServiceStrategy where
791+ toJSON = const emptyObject
792+
793+-- | User-defined authentication requirements, including support for [JSON
794+-- Web Token
795+-- (JWT)](https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-json-web-token-32).
796+--
797+-- /See:/ 'authRequirement' smart constructor.
798+data AuthRequirement = AuthRequirement'
799+ { _arProviderId :: !(Maybe Text)
800+ , _arAudiences :: !(Maybe Text)
801+ } deriving (Eq,Show,Data,Typeable,Generic)
802+
803+-- | Creates a value of 'AuthRequirement' with the minimum fields required to make a request.
804+--
805+-- Use one of the following lenses to modify other fields as desired:
806+--
807+-- * 'arProviderId'
808+--
809+-- * 'arAudiences'
810+authRequirement
811+ :: AuthRequirement
812+authRequirement =
813+ AuthRequirement'
814+ { _arProviderId = Nothing
815+ , _arAudiences = Nothing
816+ }
817+
818+-- | id from authentication provider. Example: provider_id: bookstore_auth
819+arProviderId :: Lens' AuthRequirement (Maybe Text)
820+arProviderId
821+ = lens _arProviderId (\ s a -> s{_arProviderId = a})
822+
823+-- | The list of JWT
824+-- [audiences](https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-json-web-token-32#section-4.1.3).
825+-- that are allowed to access. A JWT containing any of these audiences will
826+-- be accepted. When this setting is absent, only JWTs with audience
827+-- \"https:\/\/Service_name\/API_name\" will be accepted. For example, if
828+-- no audiences are in the setting, LibraryService API will only accept
829+-- JWTs with the following audience
830+-- \"https:\/\/library-example.googleapis.com\/google.example.library.v1.LibraryService\".
831+-- Example: audiences: bookstore_android.apps.googleusercontent.com,
832+-- bookstore_web.apps.googleusercontent.com
833+arAudiences :: Lens' AuthRequirement (Maybe Text)
834+arAudiences
835+ = lens _arAudiences (\ s a -> s{_arAudiences = a})
836+
837+instance FromJSON AuthRequirement where
838+ parseJSON
839+ = withObject "AuthRequirement"
840+ (\ o ->
841+ AuthRequirement' <$>
842+ (o .:? "providerId") <*> (o .:? "audiences"))
843+
844+instance ToJSON AuthRequirement where
845+ toJSON AuthRequirement'{..}
846+ = object
847+ (catMaybes
848+ [("providerId" .=) <$> _arProviderId,
849+ ("audiences" .=) <$> _arAudiences])
850+
851+-- | Response message for \`ListServices\` method.
852+--
853+-- /See:/ 'listServicesResponse' smart constructor.
854+data ListServicesResponse = ListServicesResponse'
855+ { _lsrNextPageToken :: !(Maybe Text)
856+ , _lsrServices :: !(Maybe [ManagedService])
857+ } deriving (Eq,Show,Data,Typeable,Generic)
858+
859+-- | Creates a value of 'ListServicesResponse' with the minimum fields required to make a request.
860+--
861+-- Use one of the following lenses to modify other fields as desired:
862+--
863+-- * 'lsrNextPageToken'
864+--
865+-- * 'lsrServices'
866+listServicesResponse
867+ :: ListServicesResponse
868+listServicesResponse =
869+ ListServicesResponse'
870+ { _lsrNextPageToken = Nothing
871+ , _lsrServices = Nothing
872+ }
873+
874+-- | Token that can be passed to \`ListServices\` to resume a paginated
875+-- query.
876+lsrNextPageToken :: Lens' ListServicesResponse (Maybe Text)
877+lsrNextPageToken
878+ = lens _lsrNextPageToken
879+ (\ s a -> s{_lsrNextPageToken = a})
880+
881+-- | The results of the query.
882+lsrServices :: Lens' ListServicesResponse [ManagedService]
883+lsrServices
884+ = lens _lsrServices (\ s a -> s{_lsrServices = a}) .
885+ _Default
886+ . _Coerce
887+
888+instance FromJSON ListServicesResponse where
889+ parseJSON
890+ = withObject "ListServicesResponse"
891+ (\ o ->
892+ ListServicesResponse' <$>
893+ (o .:? "nextPageToken") <*>
894+ (o .:? "services" .!= mempty))
895+
896+instance ToJSON ListServicesResponse where
897+ toJSON ListServicesResponse'{..}
898+ = object
899+ (catMaybes
900+ [("nextPageToken" .=) <$> _lsrNextPageToken,
901+ ("services" .=) <$> _lsrServices])
902+
903+-- | \`Context\` defines which contexts an API requests. Example: context:
904+-- rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext
905+-- - google.rpc.context.OriginContext The above specifies that all methods
906+-- in the API request \`google.rpc.context.ProjectContext\` and
907+-- \`google.rpc.context.OriginContext\`. Available context types are
908+-- defined in package \`google.rpc.context\`.
909+--
910+-- /See:/ 'context' smart constructor.
911+newtype Context = Context'
912+ { _cRules :: Maybe [ContextRule]
913+ } deriving (Eq,Show,Data,Typeable,Generic)
914+
915+-- | Creates a value of 'Context' with the minimum fields required to make a request.
916+--
917+-- Use one of the following lenses to modify other fields as desired:
918+--
919+-- * 'cRules'
920+context
921+ :: Context
922+context =
923+ Context'
924+ { _cRules = Nothing
925+ }
926+
927+-- | A list of RPC context rules that apply to individual API methods.
928+-- **NOTE:** All service configuration rules follow \"last one wins\"
929+-- order.
930+cRules :: Lens' Context [ContextRule]
931+cRules
932+ = lens _cRules (\ s a -> s{_cRules = a}) . _Default .
933+ _Coerce
934+
935+instance FromJSON Context where
936+ parseJSON
937+ = withObject "Context"
938+ (\ o -> Context' <$> (o .:? "rules" .!= mempty))
939+
940+instance ToJSON Context where
941+ toJSON Context'{..}
942+ = object (catMaybes [("rules" .=) <$> _cRules])
943+
944+-- | Configuration of a specific logging destination (the producer project or
945+-- the consumer project).
946+--
947+-- /See:/ 'loggingDestination' smart constructor.
948+data LoggingDestination = LoggingDestination'
949+ { _ldMonitoredResource :: !(Maybe Text)
950+ , _ldLogs :: !(Maybe [Text])
951+ } deriving (Eq,Show,Data,Typeable,Generic)
952+
953+-- | Creates a value of 'LoggingDestination' with the minimum fields required to make a request.
954+--
955+-- Use one of the following lenses to modify other fields as desired:
956+--
957+-- * 'ldMonitoredResource'
958+--
959+-- * 'ldLogs'
960+loggingDestination
961+ :: LoggingDestination
962+loggingDestination =
963+ LoggingDestination'
964+ { _ldMonitoredResource = Nothing
965+ , _ldLogs = Nothing
966+ }
967+
968+-- | The monitored resource type. The type must be defined in the
969+-- Service.monitored_resources section.
970+ldMonitoredResource :: Lens' LoggingDestination (Maybe Text)
971+ldMonitoredResource
972+ = lens _ldMonitoredResource
973+ (\ s a -> s{_ldMonitoredResource = a})
974+
975+-- | Names of the logs to be sent to this destination. Each name must be
976+-- defined in the Service.logs section. If the log name is not a domain
977+-- scoped name, it will be automatically prefixed with the service name
978+-- followed by \"\/\".
979+ldLogs :: Lens' LoggingDestination [Text]
980+ldLogs
981+ = lens _ldLogs (\ s a -> s{_ldLogs = a}) . _Default .
982+ _Coerce
983+
984+instance FromJSON LoggingDestination where
985+ parseJSON
986+ = withObject "LoggingDestination"
987+ (\ o ->
988+ LoggingDestination' <$>
989+ (o .:? "monitoredResource") <*>
990+ (o .:? "logs" .!= mempty))
991+
992+instance ToJSON LoggingDestination where
993+ toJSON LoggingDestination'{..}
994+ = object
995+ (catMaybes
996+ [("monitoredResource" .=) <$> _ldMonitoredResource,
997+ ("logs" .=) <$> _ldLogs])
998+
999+-- | Defines a metric type and its schema.
1000+--
1001+-- /See:/ 'metricDescriptor' smart constructor.
1002+data MetricDescriptor = MetricDescriptor'
1003+ { _mdMetricKind :: !(Maybe MetricDescriptorMetricKind)
1004+ , _mdName :: !(Maybe Text)
1005+ , _mdDisplayName :: !(Maybe Text)
1006+ , _mdLabels :: !(Maybe [LabelDescriptor])
1007+ , _mdType :: !(Maybe Text)
1008+ , _mdValueType :: !(Maybe MetricDescriptorValueType)
1009+ , _mdDescription :: !(Maybe Text)
1010+ , _mdUnit :: !(Maybe Text)
1011+ } deriving (Eq,Show,Data,Typeable,Generic)
1012+
1013+-- | Creates a value of 'MetricDescriptor' with the minimum fields required to make a request.
1014+--
1015+-- Use one of the following lenses to modify other fields as desired:
1016+--
1017+-- * 'mdMetricKind'
1018+--
1019+-- * 'mdName'
1020+--
1021+-- * 'mdDisplayName'
1022+--
1023+-- * 'mdLabels'
1024+--
1025+-- * 'mdType'
1026+--
1027+-- * 'mdValueType'
1028+--
1029+-- * 'mdDescription'
1030+--
1031+-- * 'mdUnit'
1032+metricDescriptor
1033+ :: MetricDescriptor
1034+metricDescriptor =
1035+ MetricDescriptor'
1036+ { _mdMetricKind = Nothing
1037+ , _mdName = Nothing
1038+ , _mdDisplayName = Nothing
1039+ , _mdLabels = Nothing
1040+ , _mdType = Nothing
1041+ , _mdValueType = Nothing
1042+ , _mdDescription = Nothing
1043+ , _mdUnit = Nothing
1044+ }
1045+
1046+-- | Whether the metric records instantaneous values, changes to a value,
1047+-- etc. Some combinations of \`metric_kind\` and \`value_type\` might not
1048+-- be supported.
1049+mdMetricKind :: Lens' MetricDescriptor (Maybe MetricDescriptorMetricKind)
1050+mdMetricKind
1051+ = lens _mdMetricKind (\ s a -> s{_mdMetricKind = a})
1052+
1053+-- | Resource name. The format of the name may vary between different
1054+-- implementations. For examples:
1055+-- projects\/{project_id}\/metricDescriptors\/{type=**}
1056+-- metricDescriptors\/{type=**}
1057+mdName :: Lens' MetricDescriptor (Maybe Text)
1058+mdName = lens _mdName (\ s a -> s{_mdName = a})
1059+
1060+-- | A concise name for the metric, which can be displayed in user
1061+-- interfaces. Use sentence case without an ending period, for example
1062+-- \"Request count\".
1063+mdDisplayName :: Lens' MetricDescriptor (Maybe Text)
1064+mdDisplayName
1065+ = lens _mdDisplayName
1066+ (\ s a -> s{_mdDisplayName = a})
1067+
1068+-- | The set of labels that can be used to describe a specific instance of
1069+-- this metric type. For example, the
1070+-- \`compute.googleapis.com\/instance\/network\/received_bytes_count\`
1071+-- metric type has a label, \`loadbalanced\`, that specifies whether the
1072+-- traffic was received through a load balanced IP address.
1073+mdLabels :: Lens' MetricDescriptor [LabelDescriptor]
1074+mdLabels
1075+ = lens _mdLabels (\ s a -> s{_mdLabels = a}) .
1076+ _Default
1077+ . _Coerce
1078+
1079+-- | The metric type including a DNS name prefix, for example
1080+-- \`\"compute.googleapis.com\/instance\/cpu\/utilization\"\`. Metric types
1081+-- should use a natural hierarchical grouping such as the following:
1082+-- compute.googleapis.com\/instance\/cpu\/utilization
1083+-- compute.googleapis.com\/instance\/disk\/read_ops_count
1084+-- compute.googleapis.com\/instance\/network\/received_bytes_count Note
1085+-- that if the metric type changes, the monitoring data will be
1086+-- discontinued, and anything depends on it will break, such as monitoring
1087+-- dashboards, alerting rules and quota limits. Therefore, once a metric
1088+-- has been published, its type should be immutable.
1089+mdType :: Lens' MetricDescriptor (Maybe Text)
1090+mdType = lens _mdType (\ s a -> s{_mdType = a})
1091+
1092+-- | Whether the measurement is an integer, a floating-point number, etc.
1093+-- Some combinations of \`metric_kind\` and \`value_type\` might not be
1094+-- supported.
1095+mdValueType :: Lens' MetricDescriptor (Maybe MetricDescriptorValueType)
1096+mdValueType
1097+ = lens _mdValueType (\ s a -> s{_mdValueType = a})
1098+
1099+-- | A detailed description of the metric, which can be used in
1100+-- documentation.
1101+mdDescription :: Lens' MetricDescriptor (Maybe Text)
1102+mdDescription
1103+ = lens _mdDescription
1104+ (\ s a -> s{_mdDescription = a})
1105+
1106+-- | The unit in which the metric value is reported. It is only applicable if
1107+-- the \`value_type\` is \`INT64\`, \`DOUBLE\`, or \`DISTRIBUTION\`. The
1108+-- supported units are a subset of [The Unified Code for Units of
1109+-- Measure](http:\/\/unitsofmeasure.org\/ucum.html) standard: **Basic units
1110+-- (UNIT)** * \`bit\` bit * \`By\` byte * \`s\` second * \`min\` minute *
1111+-- \`h\` hour * \`d\` day **Prefixes (PREFIX)** * \`k\` kilo (10**3) *
1112+-- \`M\` mega (10**6) * \`G\` giga (10**9) * \`T\` tera (10**12) * \`P\`
1113+-- peta (10**15) * \`E\` exa (10**18) * \`Z\` zetta (10**21) * \`Y\` yotta
1114+-- (10**24) * \`m\` milli (10**-3) * \`u\` micro (10**-6) * \`n\` nano
1115+-- (10**-9) * \`p\` pico (10**-12) * \`f\` femto (10**-15) * \`a\` atto
1116+-- (10**-18) * \`z\` zepto (10**-21) * \`y\` yocto (10**-24) * \`Ki\` kibi
1117+-- (2**10) * \`Mi\` mebi (2**20) * \`Gi\` gibi (2**30) * \`Ti\` tebi
1118+-- (2**40) **Grammar** The grammar includes the dimensionless unit \`1\`,
1119+-- such as \`1\/s\`. The grammar also includes these connectors: * \`\/\`
1120+-- division (as an infix operator, e.g. \`1\/s\`). * \`.\` multiplication
1121+-- (as an infix operator, e.g. \`GBy.d\`) The grammar for a unit is as
1122+-- follows: Expression = Component { \".\" Component } { \"\/\" Component }
1123+-- ; Component = [ PREFIX ] UNIT [ Annotation ] | Annotation | \"1\" ;
1124+-- Annotation = \"{\" NAME \"}\" ; Notes: * \`Annotation\` is just a
1125+-- comment if it follows a \`UNIT\` and is equivalent to \`1\` if it is
1126+-- used alone. For examples, \`{requests}\/s == 1\/s\`,
1127+-- \`By{transmitted}\/s == By\/s\`. * \`NAME\` is a sequence of non-blank
1128+-- printable ASCII characters not containing \'{\' or \'}\'.
1129+mdUnit :: Lens' MetricDescriptor (Maybe Text)
1130+mdUnit = lens _mdUnit (\ s a -> s{_mdUnit = a})
1131+
1132+instance FromJSON MetricDescriptor where
1133+ parseJSON
1134+ = withObject "MetricDescriptor"
1135+ (\ o ->
1136+ MetricDescriptor' <$>
1137+ (o .:? "metricKind") <*> (o .:? "name") <*>
1138+ (o .:? "displayName")
1139+ <*> (o .:? "labels" .!= mempty)
1140+ <*> (o .:? "type")
1141+ <*> (o .:? "valueType")
1142+ <*> (o .:? "description")
1143+ <*> (o .:? "unit"))
1144+
1145+instance ToJSON MetricDescriptor where
1146+ toJSON MetricDescriptor'{..}
1147+ = object
1148+ (catMaybes
1149+ [("metricKind" .=) <$> _mdMetricKind,
1150+ ("name" .=) <$> _mdName,
1151+ ("displayName" .=) <$> _mdDisplayName,
1152+ ("labels" .=) <$> _mdLabels, ("type" .=) <$> _mdType,
1153+ ("valueType" .=) <$> _mdValueType,
1154+ ("description" .=) <$> _mdDescription,
1155+ ("unit" .=) <$> _mdUnit])
1156+
1157+-- | Request message for \`GetIamPolicy\` method.
1158+--
1159+-- /See:/ 'getIAMPolicyRequest' smart constructor.
1160+data GetIAMPolicyRequest =
1161+ GetIAMPolicyRequest'
1162+ deriving (Eq,Show,Data,Typeable,Generic)
1163+
1164+-- | Creates a value of 'GetIAMPolicyRequest' with the minimum fields required to make a request.
1165+--
1166+getIAMPolicyRequest
1167+ :: GetIAMPolicyRequest
1168+getIAMPolicyRequest = GetIAMPolicyRequest'
1169+
1170+instance FromJSON GetIAMPolicyRequest where
1171+ parseJSON
1172+ = withObject "GetIAMPolicyRequest"
1173+ (\ o -> pure GetIAMPolicyRequest')
1174+
1175+instance ToJSON GetIAMPolicyRequest where
1176+ toJSON = const emptyObject
1177+
1178+-- | A backend rule provides configuration for an individual API element.
1179+--
1180+-- /See:/ 'backendRule' smart constructor.
1181+data BackendRule = BackendRule'
1182+ { _brSelector :: !(Maybe Text)
1183+ , _brAddress :: !(Maybe Text)
1184+ , _brDeadline :: !(Maybe (Textual Double))
1185+ } deriving (Eq,Show,Data,Typeable,Generic)
1186+
1187+-- | Creates a value of 'BackendRule' with the minimum fields required to make a request.
1188+--
1189+-- Use one of the following lenses to modify other fields as desired:
1190+--
1191+-- * 'brSelector'
1192+--
1193+-- * 'brAddress'
1194+--
1195+-- * 'brDeadline'
1196+backendRule
1197+ :: BackendRule
1198+backendRule =
1199+ BackendRule'
1200+ { _brSelector = Nothing
1201+ , _brAddress = Nothing
1202+ , _brDeadline = Nothing
1203+ }
1204+
1205+-- | Selects the methods to which this rule applies. Refer to selector for
1206+-- syntax details.
1207+brSelector :: Lens' BackendRule (Maybe Text)
1208+brSelector
1209+ = lens _brSelector (\ s a -> s{_brSelector = a})
1210+
1211+-- | The address of the API backend.
1212+brAddress :: Lens' BackendRule (Maybe Text)
1213+brAddress
1214+ = lens _brAddress (\ s a -> s{_brAddress = a})
1215+
1216+-- | The number of seconds to wait for a response from a request. The default
1217+-- depends on the deployment context.
1218+brDeadline :: Lens' BackendRule (Maybe Double)
1219+brDeadline
1220+ = lens _brDeadline (\ s a -> s{_brDeadline = a}) .
1221+ mapping _Coerce
1222+
1223+instance FromJSON BackendRule where
1224+ parseJSON
1225+ = withObject "BackendRule"
1226+ (\ o ->
1227+ BackendRule' <$>
1228+ (o .:? "selector") <*> (o .:? "address") <*>
1229+ (o .:? "deadline"))
1230+
1231+instance ToJSON BackendRule where
1232+ toJSON BackendRule'{..}
1233+ = object
1234+ (catMaybes
1235+ [("selector" .=) <$> _brSelector,
1236+ ("address" .=) <$> _brAddress,
1237+ ("deadline" .=) <$> _brDeadline])
1238+
1239+-- | Request message for SubmitConfigSource method.
1240+--
1241+-- /See:/ 'submitConfigSourceRequest' smart constructor.
1242+data SubmitConfigSourceRequest = SubmitConfigSourceRequest'
1243+ { _scsrValidateOnly :: !(Maybe Bool)
1244+ , _scsrConfigSource :: !(Maybe ConfigSource)
1245+ } deriving (Eq,Show,Data,Typeable,Generic)
1246+
1247+-- | Creates a value of 'SubmitConfigSourceRequest' with the minimum fields required to make a request.
1248+--
1249+-- Use one of the following lenses to modify other fields as desired:
1250+--
1251+-- * 'scsrValidateOnly'
1252+--
1253+-- * 'scsrConfigSource'
1254+submitConfigSourceRequest
1255+ :: SubmitConfigSourceRequest
1256+submitConfigSourceRequest =
1257+ SubmitConfigSourceRequest'
1258+ { _scsrValidateOnly = Nothing
1259+ , _scsrConfigSource = Nothing
1260+ }
1261+
1262+-- | Optional. If set, this will result in the generation of a
1263+-- \`google.api.Service\` configuration based on the \`ConfigSource\`
1264+-- provided, but the generated config and the sources will NOT be
1265+-- persisted.
1266+scsrValidateOnly :: Lens' SubmitConfigSourceRequest (Maybe Bool)
1267+scsrValidateOnly
1268+ = lens _scsrValidateOnly
1269+ (\ s a -> s{_scsrValidateOnly = a})
1270+
1271+-- | The source configuration for the service.
1272+scsrConfigSource :: Lens' SubmitConfigSourceRequest (Maybe ConfigSource)
1273+scsrConfigSource
1274+ = lens _scsrConfigSource
1275+ (\ s a -> s{_scsrConfigSource = a})
1276+
1277+instance FromJSON SubmitConfigSourceRequest where
1278+ parseJSON
1279+ = withObject "SubmitConfigSourceRequest"
1280+ (\ o ->
1281+ SubmitConfigSourceRequest' <$>
1282+ (o .:? "validateOnly") <*> (o .:? "configSource"))
1283+
1284+instance ToJSON SubmitConfigSourceRequest where
1285+ toJSON SubmitConfigSourceRequest'{..}
1286+ = object
1287+ (catMaybes
1288+ [("validateOnly" .=) <$> _scsrValidateOnly,
1289+ ("configSource" .=) <$> _scsrConfigSource])
1290+
1291+-- | \`SourceContext\` represents information about the source of a protobuf
1292+-- element, like the file in which it is defined.
1293+--
1294+-- /See:/ 'sourceContext' smart constructor.
1295+newtype SourceContext = SourceContext'
1296+ { _scFileName :: Maybe Text
1297+ } deriving (Eq,Show,Data,Typeable,Generic)
1298+
1299+-- | Creates a value of 'SourceContext' with the minimum fields required to make a request.
1300+--
1301+-- Use one of the following lenses to modify other fields as desired:
1302+--
1303+-- * 'scFileName'
1304+sourceContext
1305+ :: SourceContext
1306+sourceContext =
1307+ SourceContext'
1308+ { _scFileName = Nothing
1309+ }
1310+
1311+-- | The path-qualified name of the .proto file that contained the associated
1312+-- protobuf element. For example:
1313+-- \`\"google\/protobuf\/source_context.proto\"\`.
1314+scFileName :: Lens' SourceContext (Maybe Text)
1315+scFileName
1316+ = lens _scFileName (\ s a -> s{_scFileName = a})
1317+
1318+instance FromJSON SourceContext where
1319+ parseJSON
1320+ = withObject "SourceContext"
1321+ (\ o -> SourceContext' <$> (o .:? "fileName"))
1322+
1323+instance ToJSON SourceContext where
1324+ toJSON SourceContext'{..}
1325+ = object
1326+ (catMaybes [("fileName" .=) <$> _scFileName])
1327+
1328+-- | A single field of a message type.
1329+--
1330+-- /See:/ 'field' smart constructor.
1331+data Field = Field'
1332+ { _fKind :: !(Maybe FieldKind)
1333+ , _fOneofIndex :: !(Maybe (Textual Int32))
1334+ , _fName :: !(Maybe Text)
1335+ , _fJSONName :: !(Maybe Text)
1336+ , _fCardinality :: !(Maybe FieldCardinality)
1337+ , _fOptions :: !(Maybe [Option])
1338+ , _fPacked :: !(Maybe Bool)
1339+ , _fDefaultValue :: !(Maybe Text)
1340+ , _fNumber :: !(Maybe (Textual Int32))
1341+ , _fTypeURL :: !(Maybe Text)
1342+ } deriving (Eq,Show,Data,Typeable,Generic)
1343+
1344+-- | Creates a value of 'Field' with the minimum fields required to make a request.
1345+--
1346+-- Use one of the following lenses to modify other fields as desired:
1347+--
1348+-- * 'fKind'
1349+--
1350+-- * 'fOneofIndex'
1351+--
1352+-- * 'fName'
1353+--
1354+-- * 'fJSONName'
1355+--
1356+-- * 'fCardinality'
1357+--
1358+-- * 'fOptions'
1359+--
1360+-- * 'fPacked'
1361+--
1362+-- * 'fDefaultValue'
1363+--
1364+-- * 'fNumber'
1365+--
1366+-- * 'fTypeURL'
1367+field
1368+ :: Field
1369+field =
1370+ Field'
1371+ { _fKind = Nothing
1372+ , _fOneofIndex = Nothing
1373+ , _fName = Nothing
1374+ , _fJSONName = Nothing
1375+ , _fCardinality = Nothing
1376+ , _fOptions = Nothing
1377+ , _fPacked = Nothing
1378+ , _fDefaultValue = Nothing
1379+ , _fNumber = Nothing
1380+ , _fTypeURL = Nothing
1381+ }
1382+
1383+-- | The field type.
1384+fKind :: Lens' Field (Maybe FieldKind)
1385+fKind = lens _fKind (\ s a -> s{_fKind = a})
1386+
1387+-- | The index of the field type in \`Type.oneofs\`, for message or
1388+-- enumeration types. The first type has index 1; zero means the type is
1389+-- not in the list.
1390+fOneofIndex :: Lens' Field (Maybe Int32)
1391+fOneofIndex
1392+ = lens _fOneofIndex (\ s a -> s{_fOneofIndex = a}) .
1393+ mapping _Coerce
1394+
1395+-- | The field name.
1396+fName :: Lens' Field (Maybe Text)
1397+fName = lens _fName (\ s a -> s{_fName = a})
1398+
1399+-- | The field JSON name.
1400+fJSONName :: Lens' Field (Maybe Text)
1401+fJSONName
1402+ = lens _fJSONName (\ s a -> s{_fJSONName = a})
1403+
1404+-- | The field cardinality.
1405+fCardinality :: Lens' Field (Maybe FieldCardinality)
1406+fCardinality
1407+ = lens _fCardinality (\ s a -> s{_fCardinality = a})
1408+
1409+-- | The protocol buffer options.
1410+fOptions :: Lens' Field [Option]
1411+fOptions
1412+ = lens _fOptions (\ s a -> s{_fOptions = a}) .
1413+ _Default
1414+ . _Coerce
1415+
1416+-- | Whether to use alternative packed wire representation.
1417+fPacked :: Lens' Field (Maybe Bool)
1418+fPacked = lens _fPacked (\ s a -> s{_fPacked = a})
1419+
1420+-- | The string value of the default value of this field. Proto2 syntax only.
1421+fDefaultValue :: Lens' Field (Maybe Text)
1422+fDefaultValue
1423+ = lens _fDefaultValue
1424+ (\ s a -> s{_fDefaultValue = a})
1425+
1426+-- | The field number.
1427+fNumber :: Lens' Field (Maybe Int32)
1428+fNumber
1429+ = lens _fNumber (\ s a -> s{_fNumber = a}) .
1430+ mapping _Coerce
1431+
1432+-- | The field type URL, without the scheme, for message or enumeration
1433+-- types. Example: \`\"type.googleapis.com\/google.protobuf.Timestamp\"\`.
1434+fTypeURL :: Lens' Field (Maybe Text)
1435+fTypeURL = lens _fTypeURL (\ s a -> s{_fTypeURL = a})
1436+
1437+instance FromJSON Field where
1438+ parseJSON
1439+ = withObject "Field"
1440+ (\ o ->
1441+ Field' <$>
1442+ (o .:? "kind") <*> (o .:? "oneofIndex") <*>
1443+ (o .:? "name")
1444+ <*> (o .:? "jsonName")
1445+ <*> (o .:? "cardinality")
1446+ <*> (o .:? "options" .!= mempty)
1447+ <*> (o .:? "packed")
1448+ <*> (o .:? "defaultValue")
1449+ <*> (o .:? "number")
1450+ <*> (o .:? "typeUrl"))
1451+
1452+instance ToJSON Field where
1453+ toJSON Field'{..}
1454+ = object
1455+ (catMaybes
1456+ [("kind" .=) <$> _fKind,
1457+ ("oneofIndex" .=) <$> _fOneofIndex,
1458+ ("name" .=) <$> _fName,
1459+ ("jsonName" .=) <$> _fJSONName,
1460+ ("cardinality" .=) <$> _fCardinality,
1461+ ("options" .=) <$> _fOptions,
1462+ ("packed" .=) <$> _fPacked,
1463+ ("defaultValue" .=) <$> _fDefaultValue,
1464+ ("number" .=) <$> _fNumber,
1465+ ("typeUrl" .=) <$> _fTypeURL])
1466+
1467+-- | Strategy that specifies how Google Service Control should select
1468+-- different versions of service configurations based on traffic
1469+-- percentage. One example of how to gradually rollout a new service
1470+-- configuration using this strategy: Day 1 Rollout { id:
1471+-- \"example.googleapis.com\/rollout_20160206\" traffic_percent_strategy {
1472+-- percentages: { \"example.googleapis.com\/20160201\": 70.00
1473+-- \"example.googleapis.com\/20160206\": 30.00 } } } Day 2 Rollout { id:
1474+-- \"example.googleapis.com\/rollout_20160207\" traffic_percent_strategy: {
1475+-- percentages: { \"example.googleapis.com\/20160206\": 100.00 } } }
1476+--
1477+-- /See:/ 'trafficPercentStrategy' smart constructor.
1478+newtype TrafficPercentStrategy = TrafficPercentStrategy'
1479+ { _tpsPercentages :: Maybe TrafficPercentStrategyPercentages
1480+ } deriving (Eq,Show,Data,Typeable,Generic)
1481+
1482+-- | Creates a value of 'TrafficPercentStrategy' with the minimum fields required to make a request.
1483+--
1484+-- Use one of the following lenses to modify other fields as desired:
1485+--
1486+-- * 'tpsPercentages'
1487+trafficPercentStrategy
1488+ :: TrafficPercentStrategy
1489+trafficPercentStrategy =
1490+ TrafficPercentStrategy'
1491+ { _tpsPercentages = Nothing
1492+ }
1493+
1494+-- | Maps service configuration IDs to their corresponding traffic
1495+-- percentage. Key is the service configuration ID, Value is the traffic
1496+-- percentage which must be greater than 0.0 and the sum must equal to
1497+-- 100.0.
1498+tpsPercentages :: Lens' TrafficPercentStrategy (Maybe TrafficPercentStrategyPercentages)
1499+tpsPercentages
1500+ = lens _tpsPercentages
1501+ (\ s a -> s{_tpsPercentages = a})
1502+
1503+instance FromJSON TrafficPercentStrategy where
1504+ parseJSON
1505+ = withObject "TrafficPercentStrategy"
1506+ (\ o ->
1507+ TrafficPercentStrategy' <$> (o .:? "percentages"))
1508+
1509+instance ToJSON TrafficPercentStrategy where
1510+ toJSON TrafficPercentStrategy'{..}
1511+ = object
1512+ (catMaybes [("percentages" .=) <$> _tpsPercentages])
1513+
1514+-- | \`Service\` is the root object of Google service configuration schema.
1515+-- It describes basic information about a service, such as the name and the
1516+-- title, and delegates other aspects to sub-sections. Each sub-section is
1517+-- either a proto message or a repeated proto message that configures a
1518+-- specific aspect, such as auth. See each proto message definition for
1519+-- details. Example: type: google.api.Service config_version: 3 name:
1520+-- calendar.googleapis.com title: Google Calendar API apis: - name:
1521+-- google.calendar.v3.Calendar backend: rules: - selector:
1522+-- \"google.calendar.v3.*\" address: calendar.example.com
1523+--
1524+-- /See:/ 'service' smart constructor.
1525+data Service = Service'
1526+ { _sControl :: !(Maybe Control)
1527+ , _sMetrics :: !(Maybe [MetricDescriptor])
1528+ , _sContext :: !(Maybe Context)
1529+ , _sAuthentication :: !(Maybe Authentication)
1530+ , _sAPIs :: !(Maybe [API])
1531+ , _sTypes :: !(Maybe [Type])
1532+ , _sAnalytics :: !(Maybe Analytics)
1533+ , _sVisibility :: !(Maybe Visibility)
1534+ , _sSystemTypes :: !(Maybe [Type])
1535+ , _sMonitoredResources :: !(Maybe [MonitoredResourceDescriptor])
1536+ , _sBackend :: !(Maybe Backend)
1537+ , _sMonitoring :: !(Maybe Monitoring)
1538+ , _sName :: !(Maybe Text)
1539+ , _sSystemParameters :: !(Maybe SystemParameters)
1540+ , _sLogs :: !(Maybe [LogDescriptor])
1541+ , _sDocumentation :: !(Maybe Documentation)
1542+ , _sId :: !(Maybe Text)
1543+ , _sUsage :: !(Maybe Usage)
1544+ , _sEndpoints :: !(Maybe [Endpoint])
1545+ , _sEnums :: !(Maybe [Enum])
1546+ , _sConfigVersion :: !(Maybe (Textual Word32))
1547+ , _sHTTP :: !(Maybe HTTP)
1548+ , _sTitle :: !(Maybe Text)
1549+ , _sProducerProjectId :: !(Maybe Text)
1550+ , _sCustomError :: !(Maybe CustomError)
1551+ , _sLogging :: !(Maybe Logging)
1552+ } deriving (Eq,Show,Data,Typeable,Generic)
1553+
1554+-- | Creates a value of 'Service' with the minimum fields required to make a request.
1555+--
1556+-- Use one of the following lenses to modify other fields as desired:
1557+--
1558+-- * 'sControl'
1559+--
1560+-- * 'sMetrics'
1561+--
1562+-- * 'sContext'
1563+--
1564+-- * 'sAuthentication'
1565+--
1566+-- * 'sAPIs'
1567+--
1568+-- * 'sTypes'
1569+--
1570+-- * 'sAnalytics'
1571+--
1572+-- * 'sVisibility'
1573+--
1574+-- * 'sSystemTypes'
1575+--
1576+-- * 'sMonitoredResources'
1577+--
1578+-- * 'sBackend'
1579+--
1580+-- * 'sMonitoring'
1581+--
1582+-- * 'sName'
1583+--
1584+-- * 'sSystemParameters'
1585+--
1586+-- * 'sLogs'
1587+--
1588+-- * 'sDocumentation'
1589+--
1590+-- * 'sId'
1591+--
1592+-- * 'sUsage'
1593+--
1594+-- * 'sEndpoints'
1595+--
1596+-- * 'sEnums'
1597+--
1598+-- * 'sConfigVersion'
1599+--
1600+-- * 'sHTTP'
1601+--
1602+-- * 'sTitle'
1603+--
1604+-- * 'sProducerProjectId'
1605+--
1606+-- * 'sCustomError'
1607+--
1608+-- * 'sLogging'
1609+service
1610+ :: Service
1611+service =
1612+ Service'
1613+ { _sControl = Nothing
1614+ , _sMetrics = Nothing
1615+ , _sContext = Nothing
1616+ , _sAuthentication = Nothing
1617+ , _sAPIs = Nothing
1618+ , _sTypes = Nothing
1619+ , _sAnalytics = Nothing
1620+ , _sVisibility = Nothing
1621+ , _sSystemTypes = Nothing
1622+ , _sMonitoredResources = Nothing
1623+ , _sBackend = Nothing
1624+ , _sMonitoring = Nothing
1625+ , _sName = Nothing
1626+ , _sSystemParameters = Nothing
1627+ , _sLogs = Nothing
1628+ , _sDocumentation = Nothing
1629+ , _sId = Nothing
1630+ , _sUsage = Nothing
1631+ , _sEndpoints = Nothing
1632+ , _sEnums = Nothing
1633+ , _sConfigVersion = Nothing
1634+ , _sHTTP = Nothing
1635+ , _sTitle = Nothing
1636+ , _sProducerProjectId = Nothing
1637+ , _sCustomError = Nothing
1638+ , _sLogging = Nothing
1639+ }
1640+
1641+-- | Configuration for the service control plane.
1642+sControl :: Lens' Service (Maybe Control)
1643+sControl = lens _sControl (\ s a -> s{_sControl = a})
1644+
1645+-- | Defines the metrics used by this service.
1646+sMetrics :: Lens' Service [MetricDescriptor]
1647+sMetrics
1648+ = lens _sMetrics (\ s a -> s{_sMetrics = a}) .
1649+ _Default
1650+ . _Coerce
1651+
1652+-- | Context configuration.
1653+sContext :: Lens' Service (Maybe Context)
1654+sContext = lens _sContext (\ s a -> s{_sContext = a})
1655+
1656+-- | Auth configuration.
1657+sAuthentication :: Lens' Service (Maybe Authentication)
1658+sAuthentication
1659+ = lens _sAuthentication
1660+ (\ s a -> s{_sAuthentication = a})
1661+
1662+-- | A list of API interfaces exported by this service. Only the \`name\`
1663+-- field of the google.protobuf.Api needs to be provided by the
1664+-- configuration author, as the remaining fields will be derived from the
1665+-- IDL during the normalization process. It is an error to specify an API
1666+-- interface here which cannot be resolved against the associated IDL
1667+-- files.
1668+sAPIs :: Lens' Service [API]
1669+sAPIs
1670+ = lens _sAPIs (\ s a -> s{_sAPIs = a}) . _Default .
1671+ _Coerce
1672+
1673+-- | A list of all proto message types included in this API service. Types
1674+-- referenced directly or indirectly by the \`apis\` are automatically
1675+-- included. Messages which are not referenced but shall be included, such
1676+-- as types used by the \`google.protobuf.Any\` type, should be listed here
1677+-- by name. Example: types: - name: google.protobuf.Int32
1678+sTypes :: Lens' Service [Type]
1679+sTypes
1680+ = lens _sTypes (\ s a -> s{_sTypes = a}) . _Default .
1681+ _Coerce
1682+
1683+-- | WARNING: DO NOT USE UNTIL THIS MESSAGE IS REMOVED. Analytics
1684+-- configuration.
1685+sAnalytics :: Lens' Service (Maybe Analytics)
1686+sAnalytics
1687+ = lens _sAnalytics (\ s a -> s{_sAnalytics = a})
1688+
1689+-- | API visibility configuration.
1690+sVisibility :: Lens' Service (Maybe Visibility)
1691+sVisibility
1692+ = lens _sVisibility (\ s a -> s{_sVisibility = a})
1693+
1694+-- | A list of all proto message types included in this API service. It
1695+-- serves similar purpose as [google.api.Service.types], except that these
1696+-- types are not needed by user-defined APIs. Therefore, they will not show
1697+-- up in the generated discovery doc. This field should only be used to
1698+-- define system APIs in ESF.
1699+sSystemTypes :: Lens' Service [Type]
1700+sSystemTypes
1701+ = lens _sSystemTypes (\ s a -> s{_sSystemTypes = a})
1702+ . _Default
1703+ . _Coerce
1704+
1705+-- | Defines the monitored resources used by this service. This is required
1706+-- by the Service.monitoring and Service.logging configurations.
1707+sMonitoredResources :: Lens' Service [MonitoredResourceDescriptor]
1708+sMonitoredResources
1709+ = lens _sMonitoredResources
1710+ (\ s a -> s{_sMonitoredResources = a})
1711+ . _Default
1712+ . _Coerce
1713+
1714+-- | API backend configuration.
1715+sBackend :: Lens' Service (Maybe Backend)
1716+sBackend = lens _sBackend (\ s a -> s{_sBackend = a})
1717+
1718+-- | Monitoring configuration.
1719+sMonitoring :: Lens' Service (Maybe Monitoring)
1720+sMonitoring
1721+ = lens _sMonitoring (\ s a -> s{_sMonitoring = a})
1722+
1723+-- | The DNS address at which this service is available, e.g.
1724+-- \`calendar.googleapis.com\`.
1725+sName :: Lens' Service (Maybe Text)
1726+sName = lens _sName (\ s a -> s{_sName = a})
1727+
1728+-- | System parameter configuration.
1729+sSystemParameters :: Lens' Service (Maybe SystemParameters)
1730+sSystemParameters
1731+ = lens _sSystemParameters
1732+ (\ s a -> s{_sSystemParameters = a})
1733+
1734+-- | Defines the logs used by this service.
1735+sLogs :: Lens' Service [LogDescriptor]
1736+sLogs
1737+ = lens _sLogs (\ s a -> s{_sLogs = a}) . _Default .
1738+ _Coerce
1739+
1740+-- | Additional API documentation.
1741+sDocumentation :: Lens' Service (Maybe Documentation)
1742+sDocumentation
1743+ = lens _sDocumentation
1744+ (\ s a -> s{_sDocumentation = a})
1745+
1746+-- | A unique ID for a specific instance of this message, typically assigned
1747+-- by the client for tracking purpose. If empty, the server may choose to
1748+-- generate one instead.
1749+sId :: Lens' Service (Maybe Text)
1750+sId = lens _sId (\ s a -> s{_sId = a})
1751+
1752+-- | Configuration controlling usage of this service.
1753+sUsage :: Lens' Service (Maybe Usage)
1754+sUsage = lens _sUsage (\ s a -> s{_sUsage = a})
1755+
1756+-- | Configuration for network endpoints. If this is empty, then an endpoint
1757+-- with the same name as the service is automatically generated to service
1758+-- all defined APIs.
1759+sEndpoints :: Lens' Service [Endpoint]
1760+sEndpoints
1761+ = lens _sEndpoints (\ s a -> s{_sEndpoints = a}) .
1762+ _Default
1763+ . _Coerce
1764+
1765+-- | A list of all enum types included in this API service. Enums referenced
1766+-- directly or indirectly by the \`apis\` are automatically included. Enums
1767+-- which are not referenced but shall be included should be listed here by
1768+-- name. Example: enums: - name: google.someapi.v1.SomeEnum
1769+sEnums :: Lens' Service [Enum]
1770+sEnums
1771+ = lens _sEnums (\ s a -> s{_sEnums = a}) . _Default .
1772+ _Coerce
1773+
1774+-- | The version of the service configuration. The config version may
1775+-- influence interpretation of the configuration, for example, to determine
1776+-- defaults. This is documented together with applicable options. The
1777+-- current default for the config version itself is \`3\`.
1778+sConfigVersion :: Lens' Service (Maybe Word32)
1779+sConfigVersion
1780+ = lens _sConfigVersion
1781+ (\ s a -> s{_sConfigVersion = a})
1782+ . mapping _Coerce
1783+
1784+-- | HTTP configuration.
1785+sHTTP :: Lens' Service (Maybe HTTP)
1786+sHTTP = lens _sHTTP (\ s a -> s{_sHTTP = a})
1787+
1788+-- | The product title associated with this service.
1789+sTitle :: Lens' Service (Maybe Text)
1790+sTitle = lens _sTitle (\ s a -> s{_sTitle = a})
1791+
1792+-- | The id of the Google developer project that owns the service. Members of
1793+-- this project can manage the service configuration, manage consumption of
1794+-- the service, etc.
1795+sProducerProjectId :: Lens' Service (Maybe Text)
1796+sProducerProjectId
1797+ = lens _sProducerProjectId
1798+ (\ s a -> s{_sProducerProjectId = a})
1799+
1800+-- | Custom error configuration.
1801+sCustomError :: Lens' Service (Maybe CustomError)
1802+sCustomError
1803+ = lens _sCustomError (\ s a -> s{_sCustomError = a})
1804+
1805+-- | Logging configuration.
1806+sLogging :: Lens' Service (Maybe Logging)
1807+sLogging = lens _sLogging (\ s a -> s{_sLogging = a})
1808+
1809+instance FromJSON Service where
1810+ parseJSON
1811+ = withObject "Service"
1812+ (\ o ->
1813+ Service' <$>
1814+ (o .:? "control") <*> (o .:? "metrics" .!= mempty)
1815+ <*> (o .:? "context")
1816+ <*> (o .:? "authentication")
1817+ <*> (o .:? "apis" .!= mempty)
1818+ <*> (o .:? "types" .!= mempty)
1819+ <*> (o .:? "analytics")
1820+ <*> (o .:? "visibility")
1821+ <*> (o .:? "systemTypes" .!= mempty)
1822+ <*> (o .:? "monitoredResources" .!= mempty)
1823+ <*> (o .:? "backend")
1824+ <*> (o .:? "monitoring")
1825+ <*> (o .:? "name")
1826+ <*> (o .:? "systemParameters")
1827+ <*> (o .:? "logs" .!= mempty)
1828+ <*> (o .:? "documentation")
1829+ <*> (o .:? "id")
1830+ <*> (o .:? "usage")
1831+ <*> (o .:? "endpoints" .!= mempty)
1832+ <*> (o .:? "enums" .!= mempty)
1833+ <*> (o .:? "configVersion")
1834+ <*> (o .:? "http")
1835+ <*> (o .:? "title")
1836+ <*> (o .:? "producerProjectId")
1837+ <*> (o .:? "customError")
1838+ <*> (o .:? "logging"))
1839+
1840+instance ToJSON Service where
1841+ toJSON Service'{..}
1842+ = object
1843+ (catMaybes
1844+ [("control" .=) <$> _sControl,
1845+ ("metrics" .=) <$> _sMetrics,
1846+ ("context" .=) <$> _sContext,
1847+ ("authentication" .=) <$> _sAuthentication,
1848+ ("apis" .=) <$> _sAPIs, ("types" .=) <$> _sTypes,
1849+ ("analytics" .=) <$> _sAnalytics,
1850+ ("visibility" .=) <$> _sVisibility,
1851+ ("systemTypes" .=) <$> _sSystemTypes,
1852+ ("monitoredResources" .=) <$> _sMonitoredResources,
1853+ ("backend" .=) <$> _sBackend,
1854+ ("monitoring" .=) <$> _sMonitoring,
1855+ ("name" .=) <$> _sName,
1856+ ("systemParameters" .=) <$> _sSystemParameters,
1857+ ("logs" .=) <$> _sLogs,
1858+ ("documentation" .=) <$> _sDocumentation,
1859+ ("id" .=) <$> _sId, ("usage" .=) <$> _sUsage,
1860+ ("endpoints" .=) <$> _sEndpoints,
1861+ ("enums" .=) <$> _sEnums,
1862+ ("configVersion" .=) <$> _sConfigVersion,
1863+ ("http" .=) <$> _sHTTP, ("title" .=) <$> _sTitle,
1864+ ("producerProjectId" .=) <$> _sProducerProjectId,
1865+ ("customError" .=) <$> _sCustomError,
1866+ ("logging" .=) <$> _sLogging])
1867+
1868+-- | This resource represents a long-running operation that is the result of
1869+-- a network API call.
1870+--
1871+-- /See:/ 'operation' smart constructor.
1872+data Operation = Operation'
1873+ { _oDone :: !(Maybe Bool)
1874+ , _oError :: !(Maybe Status)
1875+ , _oResponse :: !(Maybe OperationResponse)
1876+ , _oName :: !(Maybe Text)
1877+ , _oMetadata :: !(Maybe OperationSchema)
1878+ } deriving (Eq,Show,Data,Typeable,Generic)
1879+
1880+-- | Creates a value of 'Operation' with the minimum fields required to make a request.
1881+--
1882+-- Use one of the following lenses to modify other fields as desired:
1883+--
1884+-- * 'oDone'
1885+--
1886+-- * 'oError'
1887+--
1888+-- * 'oResponse'
1889+--
1890+-- * 'oName'
1891+--
1892+-- * 'oMetadata'
1893+operation
1894+ :: Operation
1895+operation =
1896+ Operation'
1897+ { _oDone = Nothing
1898+ , _oError = Nothing
1899+ , _oResponse = Nothing
1900+ , _oName = Nothing
1901+ , _oMetadata = Nothing
1902+ }
1903+
1904+-- | If the value is \`false\`, it means the operation is still in progress.
1905+-- If true, the operation is completed, and either \`error\` or
1906+-- \`response\` is available.
1907+oDone :: Lens' Operation (Maybe Bool)
1908+oDone = lens _oDone (\ s a -> s{_oDone = a})
1909+
1910+-- | The error result of the operation in case of failure or cancellation.
1911+oError :: Lens' Operation (Maybe Status)
1912+oError = lens _oError (\ s a -> s{_oError = a})
1913+
1914+-- | The normal response of the operation in case of success. If the original
1915+-- method returns no data on success, such as \`Delete\`, the response is
1916+-- \`google.protobuf.Empty\`. If the original method is standard
1917+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
1918+-- For other methods, the response should have the type \`XxxResponse\`,
1919+-- where \`Xxx\` is the original method name. For example, if the original
1920+-- method name is \`TakeSnapshot()\`, the inferred response type is
1921+-- \`TakeSnapshotResponse\`.
1922+oResponse :: Lens' Operation (Maybe OperationResponse)
1923+oResponse
1924+ = lens _oResponse (\ s a -> s{_oResponse = a})
1925+
1926+-- | The server-assigned name, which is only unique within the same service
1927+-- that originally returns it. If you use the default HTTP mapping, the
1928+-- \`name\` should have the format of \`operations\/some\/unique\/name\`.
1929+oName :: Lens' Operation (Maybe Text)
1930+oName = lens _oName (\ s a -> s{_oName = a})
1931+
1932+-- | Service-specific metadata associated with the operation. It typically
1933+-- contains progress information and common metadata such as create time.
1934+-- Some services might not provide such metadata. Any method that returns a
1935+-- long-running operation should document the metadata type, if any.
1936+oMetadata :: Lens' Operation (Maybe OperationSchema)
1937+oMetadata
1938+ = lens _oMetadata (\ s a -> s{_oMetadata = a})
1939+
1940+instance FromJSON Operation where
1941+ parseJSON
1942+ = withObject "Operation"
1943+ (\ o ->
1944+ Operation' <$>
1945+ (o .:? "done") <*> (o .:? "error") <*>
1946+ (o .:? "response")
1947+ <*> (o .:? "name")
1948+ <*> (o .:? "metadata"))
1949+
1950+instance ToJSON Operation where
1951+ toJSON Operation'{..}
1952+ = object
1953+ (catMaybes
1954+ [("done" .=) <$> _oDone, ("error" .=) <$> _oError,
1955+ ("response" .=) <$> _oResponse,
1956+ ("name" .=) <$> _oName,
1957+ ("metadata" .=) <$> _oMetadata])
1958+
1959+-- | Request message for EnableService method.
1960+--
1961+-- /See:/ 'enableServiceRequest' smart constructor.
1962+newtype EnableServiceRequest = EnableServiceRequest'
1963+ { _esrConsumerId :: Maybe Text
1964+ } deriving (Eq,Show,Data,Typeable,Generic)
1965+
1966+-- | Creates a value of 'EnableServiceRequest' with the minimum fields required to make a request.
1967+--
1968+-- Use one of the following lenses to modify other fields as desired:
1969+--
1970+-- * 'esrConsumerId'
1971+enableServiceRequest
1972+ :: EnableServiceRequest
1973+enableServiceRequest =
1974+ EnableServiceRequest'
1975+ { _esrConsumerId = Nothing
1976+ }
1977+
1978+-- | The identity of consumer resource which service enablement will be
1979+-- applied to. The Google Service Management implementation accepts the
1980+-- following forms: \"project:\", \"project_number:\". Note: this is made
1981+-- compatible with google.api.servicecontrol.v1.Operation.consumer_id.
1982+esrConsumerId :: Lens' EnableServiceRequest (Maybe Text)
1983+esrConsumerId
1984+ = lens _esrConsumerId
1985+ (\ s a -> s{_esrConsumerId = a})
1986+
1987+instance FromJSON EnableServiceRequest where
1988+ parseJSON
1989+ = withObject "EnableServiceRequest"
1990+ (\ o ->
1991+ EnableServiceRequest' <$> (o .:? "consumerId"))
1992+
1993+instance ToJSON EnableServiceRequest where
1994+ toJSON EnableServiceRequest'{..}
1995+ = object
1996+ (catMaybes [("consumerId" .=) <$> _esrConsumerId])
1997+
1998+-- | Response message for ListServiceConfigs method.
1999+--
2000+-- /See:/ 'listServiceConfigsResponse' smart constructor.
2001+data ListServiceConfigsResponse = ListServiceConfigsResponse'
2002+ { _lscrServiceConfigs :: !(Maybe [Service])
2003+ , _lscrNextPageToken :: !(Maybe Text)
2004+ } deriving (Eq,Show,Data,Typeable,Generic)
2005+
2006+-- | Creates a value of 'ListServiceConfigsResponse' with the minimum fields required to make a request.
2007+--
2008+-- Use one of the following lenses to modify other fields as desired:
2009+--
2010+-- * 'lscrServiceConfigs'
2011+--
2012+-- * 'lscrNextPageToken'
2013+listServiceConfigsResponse
2014+ :: ListServiceConfigsResponse
2015+listServiceConfigsResponse =
2016+ ListServiceConfigsResponse'
2017+ { _lscrServiceConfigs = Nothing
2018+ , _lscrNextPageToken = Nothing
2019+ }
2020+
2021+-- | The list of service configuration resources.
2022+lscrServiceConfigs :: Lens' ListServiceConfigsResponse [Service]
2023+lscrServiceConfigs
2024+ = lens _lscrServiceConfigs
2025+ (\ s a -> s{_lscrServiceConfigs = a})
2026+ . _Default
2027+ . _Coerce
2028+
2029+-- | The token of the next page of results.
2030+lscrNextPageToken :: Lens' ListServiceConfigsResponse (Maybe Text)
2031+lscrNextPageToken
2032+ = lens _lscrNextPageToken
2033+ (\ s a -> s{_lscrNextPageToken = a})
2034+
2035+instance FromJSON ListServiceConfigsResponse where
2036+ parseJSON
2037+ = withObject "ListServiceConfigsResponse"
2038+ (\ o ->
2039+ ListServiceConfigsResponse' <$>
2040+ (o .:? "serviceConfigs" .!= mempty) <*>
2041+ (o .:? "nextPageToken"))
2042+
2043+instance ToJSON ListServiceConfigsResponse where
2044+ toJSON ListServiceConfigsResponse'{..}
2045+ = object
2046+ (catMaybes
2047+ [("serviceConfigs" .=) <$> _lscrServiceConfigs,
2048+ ("nextPageToken" .=) <$> _lscrNextPageToken])
2049+
2050+-- | A custom error rule.
2051+--
2052+-- /See:/ 'customErrorRule' smart constructor.
2053+data CustomErrorRule = CustomErrorRule'
2054+ { _cerIsErrorType :: !(Maybe Bool)
2055+ , _cerSelector :: !(Maybe Text)
2056+ } deriving (Eq,Show,Data,Typeable,Generic)
2057+
2058+-- | Creates a value of 'CustomErrorRule' with the minimum fields required to make a request.
2059+--
2060+-- Use one of the following lenses to modify other fields as desired:
2061+--
2062+-- * 'cerIsErrorType'
2063+--
2064+-- * 'cerSelector'
2065+customErrorRule
2066+ :: CustomErrorRule
2067+customErrorRule =
2068+ CustomErrorRule'
2069+ { _cerIsErrorType = Nothing
2070+ , _cerSelector = Nothing
2071+ }
2072+
2073+-- | Mark this message as possible payload in error response. Otherwise,
2074+-- objects of this type will be filtered when they appear in error payload.
2075+cerIsErrorType :: Lens' CustomErrorRule (Maybe Bool)
2076+cerIsErrorType
2077+ = lens _cerIsErrorType
2078+ (\ s a -> s{_cerIsErrorType = a})
2079+
2080+-- | Selects messages to which this rule applies. Refer to selector for
2081+-- syntax details.
2082+cerSelector :: Lens' CustomErrorRule (Maybe Text)
2083+cerSelector
2084+ = lens _cerSelector (\ s a -> s{_cerSelector = a})
2085+
2086+instance FromJSON CustomErrorRule where
2087+ parseJSON
2088+ = withObject "CustomErrorRule"
2089+ (\ o ->
2090+ CustomErrorRule' <$>
2091+ (o .:? "isErrorType") <*> (o .:? "selector"))
2092+
2093+instance ToJSON CustomErrorRule where
2094+ toJSON CustomErrorRule'{..}
2095+ = object
2096+ (catMaybes
2097+ [("isErrorType" .=) <$> _cerIsErrorType,
2098+ ("selector" .=) <$> _cerSelector])
2099+
2100+-- | Response message for SubmitConfigSource method.
2101+--
2102+-- /See:/ 'submitConfigSourceResponse' smart constructor.
2103+newtype SubmitConfigSourceResponse = SubmitConfigSourceResponse'
2104+ { _scsrServiceConfig :: Maybe Service
2105+ } deriving (Eq,Show,Data,Typeable,Generic)
2106+
2107+-- | Creates a value of 'SubmitConfigSourceResponse' with the minimum fields required to make a request.
2108+--
2109+-- Use one of the following lenses to modify other fields as desired:
2110+--
2111+-- * 'scsrServiceConfig'
2112+submitConfigSourceResponse
2113+ :: SubmitConfigSourceResponse
2114+submitConfigSourceResponse =
2115+ SubmitConfigSourceResponse'
2116+ { _scsrServiceConfig = Nothing
2117+ }
2118+
2119+-- | The generated service configuration.
2120+scsrServiceConfig :: Lens' SubmitConfigSourceResponse (Maybe Service)
2121+scsrServiceConfig
2122+ = lens _scsrServiceConfig
2123+ (\ s a -> s{_scsrServiceConfig = a})
2124+
2125+instance FromJSON SubmitConfigSourceResponse where
2126+ parseJSON
2127+ = withObject "SubmitConfigSourceResponse"
2128+ (\ o ->
2129+ SubmitConfigSourceResponse' <$>
2130+ (o .:? "serviceConfig"))
2131+
2132+instance ToJSON SubmitConfigSourceResponse where
2133+ toJSON SubmitConfigSourceResponse'{..}
2134+ = object
2135+ (catMaybes
2136+ [("serviceConfig" .=) <$> _scsrServiceConfig])
2137+
2138+-- | A visibility rule provides visibility configuration for an individual
2139+-- API element.
2140+--
2141+-- /See:/ 'visibilityRule' smart constructor.
2142+data VisibilityRule = VisibilityRule'
2143+ { _vrRestriction :: !(Maybe Text)
2144+ , _vrSelector :: !(Maybe Text)
2145+ } deriving (Eq,Show,Data,Typeable,Generic)
2146+
2147+-- | Creates a value of 'VisibilityRule' with the minimum fields required to make a request.
2148+--
2149+-- Use one of the following lenses to modify other fields as desired:
2150+--
2151+-- * 'vrRestriction'
2152+--
2153+-- * 'vrSelector'
2154+visibilityRule
2155+ :: VisibilityRule
2156+visibilityRule =
2157+ VisibilityRule'
2158+ { _vrRestriction = Nothing
2159+ , _vrSelector = Nothing
2160+ }
2161+
2162+-- | A comma-separated list of visibility labels that apply to the
2163+-- \`selector\`. Any of the listed labels can be used to grant the
2164+-- visibility. If a rule has multiple labels, removing one of the labels
2165+-- but not all of them can break clients. Example: visibility: rules: -
2166+-- selector: google.calendar.Calendar.EnhancedSearch restriction:
2167+-- GOOGLE_INTERNAL, TRUSTED_TESTER Removing GOOGLE_INTERNAL from this
2168+-- restriction will break clients that rely on this method and only had
2169+-- access to it through GOOGLE_INTERNAL.
2170+vrRestriction :: Lens' VisibilityRule (Maybe Text)
2171+vrRestriction
2172+ = lens _vrRestriction
2173+ (\ s a -> s{_vrRestriction = a})
2174+
2175+-- | Selects methods, messages, fields, enums, etc. to which this rule
2176+-- applies. Refer to selector for syntax details.
2177+vrSelector :: Lens' VisibilityRule (Maybe Text)
2178+vrSelector
2179+ = lens _vrSelector (\ s a -> s{_vrSelector = a})
2180+
2181+instance FromJSON VisibilityRule where
2182+ parseJSON
2183+ = withObject "VisibilityRule"
2184+ (\ o ->
2185+ VisibilityRule' <$>
2186+ (o .:? "restriction") <*> (o .:? "selector"))
2187+
2188+instance ToJSON VisibilityRule where
2189+ toJSON VisibilityRule'{..}
2190+ = object
2191+ (catMaybes
2192+ [("restriction" .=) <$> _vrRestriction,
2193+ ("selector" .=) <$> _vrSelector])
2194+
2195+-- | Change report associated with a particular service configuration. It
2196+-- contains a list of ConfigChanges based on the comparison between two
2197+-- service configurations.
2198+--
2199+-- /See:/ 'changeReport' smart constructor.
2200+newtype ChangeReport = ChangeReport'
2201+ { _crConfigChanges :: Maybe [ConfigChange]
2202+ } deriving (Eq,Show,Data,Typeable,Generic)
2203+
2204+-- | Creates a value of 'ChangeReport' with the minimum fields required to make a request.
2205+--
2206+-- Use one of the following lenses to modify other fields as desired:
2207+--
2208+-- * 'crConfigChanges'
2209+changeReport
2210+ :: ChangeReport
2211+changeReport =
2212+ ChangeReport'
2213+ { _crConfigChanges = Nothing
2214+ }
2215+
2216+-- | List of changes between two service configurations. The changes will be
2217+-- alphabetically sorted based on the identifier of each change. A
2218+-- ConfigChange identifier is a dot separated path to the configuration.
2219+-- Example:
2220+-- visibility.rules[selector=\'LibraryService.CreateBook\'].restriction
2221+crConfigChanges :: Lens' ChangeReport [ConfigChange]
2222+crConfigChanges
2223+ = lens _crConfigChanges
2224+ (\ s a -> s{_crConfigChanges = a})
2225+ . _Default
2226+ . _Coerce
2227+
2228+instance FromJSON ChangeReport where
2229+ parseJSON
2230+ = withObject "ChangeReport"
2231+ (\ o ->
2232+ ChangeReport' <$> (o .:? "configChanges" .!= mempty))
2233+
2234+instance ToJSON ChangeReport where
2235+ toJSON ChangeReport'{..}
2236+ = object
2237+ (catMaybes
2238+ [("configChanges" .=) <$> _crConfigChanges])
2239+
2240+-- | Do not use this. For media support, add instead
2241+-- [][google.bytestream.RestByteStream] as an API to your configuration.
2242+--
2243+-- /See:/ 'mediaDownload' smart constructor.
2244+newtype MediaDownload' = MediaDownload''
2245+ { _mdEnabled :: Maybe Bool
2246+ } deriving (Eq,Show,Data,Typeable,Generic)
2247+
2248+-- | Creates a value of 'MediaDownload' with the minimum fields required to make a request.
2249+--
2250+-- Use one of the following lenses to modify other fields as desired:
2251+--
2252+-- * 'mdEnabled'
2253+mediaDownload
2254+ :: MediaDownload'
2255+mediaDownload =
2256+ MediaDownload''
2257+ { _mdEnabled = Nothing
2258+ }
2259+
2260+-- | Whether download is enabled.
2261+mdEnabled :: Lens' MediaDownload' (Maybe Bool)
2262+mdEnabled
2263+ = lens _mdEnabled (\ s a -> s{_mdEnabled = a})
2264+
2265+instance FromJSON MediaDownload' where
2266+ parseJSON
2267+ = withObject "MediaDownload"
2268+ (\ o -> MediaDownload'' <$> (o .:? "enabled"))
2269+
2270+instance ToJSON MediaDownload' where
2271+ toJSON MediaDownload''{..}
2272+ = object (catMaybes [("enabled" .=) <$> _mdEnabled])
2273+
2274+-- | The option\'s value. For example, \`\"com.google.protobuf\"\`.
2275+--
2276+-- /See:/ 'optionValue' smart constructor.
2277+newtype OptionValue = OptionValue'
2278+ { _ovAddtional :: HashMap Text JSONValue
2279+ } deriving (Eq,Show,Data,Typeable,Generic)
2280+
2281+-- | Creates a value of 'OptionValue' with the minimum fields required to make a request.
2282+--
2283+-- Use one of the following lenses to modify other fields as desired:
2284+--
2285+-- * 'ovAddtional'
2286+optionValue
2287+ :: HashMap Text JSONValue -- ^ 'ovAddtional'
2288+ -> OptionValue
2289+optionValue pOvAddtional_ =
2290+ OptionValue'
2291+ { _ovAddtional = _Coerce # pOvAddtional_
2292+ }
2293+
2294+-- | Properties of the object. Contains field \'type with type URL.
2295+ovAddtional :: Lens' OptionValue (HashMap Text JSONValue)
2296+ovAddtional
2297+ = lens _ovAddtional (\ s a -> s{_ovAddtional = a}) .
2298+ _Coerce
2299+
2300+instance FromJSON OptionValue where
2301+ parseJSON
2302+ = withObject "OptionValue"
2303+ (\ o -> OptionValue' <$> (parseJSONObject o))
2304+
2305+instance ToJSON OptionValue where
2306+ toJSON = toJSON . _ovAddtional
2307+
2308+-- | Enum value definition.
2309+--
2310+-- /See:/ 'enumValue' smart constructor.
2311+data EnumValue = EnumValue'
2312+ { _evName :: !(Maybe Text)
2313+ , _evOptions :: !(Maybe [Option])
2314+ , _evNumber :: !(Maybe (Textual Int32))
2315+ } deriving (Eq,Show,Data,Typeable,Generic)
2316+
2317+-- | Creates a value of 'EnumValue' with the minimum fields required to make a request.
2318+--
2319+-- Use one of the following lenses to modify other fields as desired:
2320+--
2321+-- * 'evName'
2322+--
2323+-- * 'evOptions'
2324+--
2325+-- * 'evNumber'
2326+enumValue
2327+ :: EnumValue
2328+enumValue =
2329+ EnumValue'
2330+ { _evName = Nothing
2331+ , _evOptions = Nothing
2332+ , _evNumber = Nothing
2333+ }
2334+
2335+-- | Enum value name.
2336+evName :: Lens' EnumValue (Maybe Text)
2337+evName = lens _evName (\ s a -> s{_evName = a})
2338+
2339+-- | Protocol buffer options.
2340+evOptions :: Lens' EnumValue [Option]
2341+evOptions
2342+ = lens _evOptions (\ s a -> s{_evOptions = a}) .
2343+ _Default
2344+ . _Coerce
2345+
2346+-- | Enum value number.
2347+evNumber :: Lens' EnumValue (Maybe Int32)
2348+evNumber
2349+ = lens _evNumber (\ s a -> s{_evNumber = a}) .
2350+ mapping _Coerce
2351+
2352+instance FromJSON EnumValue where
2353+ parseJSON
2354+ = withObject "EnumValue"
2355+ (\ o ->
2356+ EnumValue' <$>
2357+ (o .:? "name") <*> (o .:? "options" .!= mempty) <*>
2358+ (o .:? "number"))
2359+
2360+instance ToJSON EnumValue where
2361+ toJSON EnumValue'{..}
2362+ = object
2363+ (catMaybes
2364+ [("name" .=) <$> _evName,
2365+ ("options" .=) <$> _evOptions,
2366+ ("number" .=) <$> _evNumber])
2367+
2368+-- | \`Authentication\` defines the authentication configuration for an API.
2369+-- Example for an API targeted for external use: name:
2370+-- calendar.googleapis.com authentication: rules: - selector: \"*\" oauth:
2371+-- canonical_scopes: https:\/\/www.googleapis.com\/auth\/calendar -
2372+-- selector: google.calendar.Delegate oauth: canonical_scopes:
2373+-- https:\/\/www.googleapis.com\/auth\/calendar.read
2374+--
2375+-- /See:/ 'authentication' smart constructor.
2376+data Authentication = Authentication'
2377+ { _aRules :: !(Maybe [AuthenticationRule])
2378+ , _aProviders :: !(Maybe [AuthProvider])
2379+ } deriving (Eq,Show,Data,Typeable,Generic)
2380+
2381+-- | Creates a value of 'Authentication' with the minimum fields required to make a request.
2382+--
2383+-- Use one of the following lenses to modify other fields as desired:
2384+--
2385+-- * 'aRules'
2386+--
2387+-- * 'aProviders'
2388+authentication
2389+ :: Authentication
2390+authentication =
2391+ Authentication'
2392+ { _aRules = Nothing
2393+ , _aProviders = Nothing
2394+ }
2395+
2396+-- | A list of authentication rules that apply to individual API methods.
2397+-- **NOTE:** All service configuration rules follow \"last one wins\"
2398+-- order.
2399+aRules :: Lens' Authentication [AuthenticationRule]
2400+aRules
2401+ = lens _aRules (\ s a -> s{_aRules = a}) . _Default .
2402+ _Coerce
2403+
2404+-- | Defines a set of authentication providers that a service supports.
2405+aProviders :: Lens' Authentication [AuthProvider]
2406+aProviders
2407+ = lens _aProviders (\ s a -> s{_aProviders = a}) .
2408+ _Default
2409+ . _Coerce
2410+
2411+instance FromJSON Authentication where
2412+ parseJSON
2413+ = withObject "Authentication"
2414+ (\ o ->
2415+ Authentication' <$>
2416+ (o .:? "rules" .!= mempty) <*>
2417+ (o .:? "providers" .!= mempty))
2418+
2419+instance ToJSON Authentication where
2420+ toJSON Authentication'{..}
2421+ = object
2422+ (catMaybes
2423+ [("rules" .=) <$> _aRules,
2424+ ("providers" .=) <$> _aProviders])
2425+
2426+-- | Declares an API to be included in this API. The including API must
2427+-- redeclare all the methods from the included API, but documentation and
2428+-- options are inherited as follows: - If after comment and whitespace
2429+-- stripping, the documentation string of the redeclared method is empty,
2430+-- it will be inherited from the original method. - Each annotation
2431+-- belonging to the service config (http, visibility) which is not set in
2432+-- the redeclared method will be inherited. - If an http annotation is
2433+-- inherited, the path pattern will be modified as follows. Any version
2434+-- prefix will be replaced by the version of the including API plus the
2435+-- root path if specified. Example of a simple mixin: package
2436+-- google.acl.v1; service AccessControl { \/\/ Get the underlying ACL
2437+-- object. rpc GetAcl(GetAclRequest) returns (Acl) { option
2438+-- (google.api.http).get = \"\/v1\/{resource=**}:getAcl\"; } } package
2439+-- google.storage.v2; service Storage { \/\/ rpc GetAcl(GetAclRequest)
2440+-- returns (Acl); \/\/ Get a data record. rpc GetData(GetDataRequest)
2441+-- returns (Data) { option (google.api.http).get = \"\/v2\/{resource=**}\";
2442+-- } } Example of a mixin configuration: apis: - name:
2443+-- google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl
2444+-- The mixin construct implies that all methods in \`AccessControl\` are
2445+-- also declared with same name and request\/response types in \`Storage\`.
2446+-- A documentation generator or annotation processor will see the effective
2447+-- \`Storage.GetAcl\` method after inherting documentation and annotations
2448+-- as follows: service Storage { \/\/ Get the underlying ACL object. rpc
2449+-- GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get =
2450+-- \"\/v2\/{resource=**}:getAcl\"; } ... } Note how the version in the path
2451+-- pattern changed from \`v1\` to \`v2\`. If the \`root\` field in the
2452+-- mixin is specified, it should be a relative path under which inherited
2453+-- HTTP paths are placed. Example: apis: - name: google.storage.v2.Storage
2454+-- mixins: - name: google.acl.v1.AccessControl root: acls This implies the
2455+-- following inherited HTTP annotation: service Storage { \/\/ Get the
2456+-- underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option
2457+-- (google.api.http).get = \"\/v2\/acls\/{resource=**}:getAcl\"; } ... }
2458+--
2459+-- /See:/ 'mixin' smart constructor.
2460+data Mixin = Mixin'
2461+ { _mRoot :: !(Maybe Text)
2462+ , _mName :: !(Maybe Text)
2463+ } deriving (Eq,Show,Data,Typeable,Generic)
2464+
2465+-- | Creates a value of 'Mixin' with the minimum fields required to make a request.
2466+--
2467+-- Use one of the following lenses to modify other fields as desired:
2468+--
2469+-- * 'mRoot'
2470+--
2471+-- * 'mName'
2472+mixin
2473+ :: Mixin
2474+mixin =
2475+ Mixin'
2476+ { _mRoot = Nothing
2477+ , _mName = Nothing
2478+ }
2479+
2480+-- | If non-empty specifies a path under which inherited HTTP paths are
2481+-- rooted.
2482+mRoot :: Lens' Mixin (Maybe Text)
2483+mRoot = lens _mRoot (\ s a -> s{_mRoot = a})
2484+
2485+-- | The fully qualified name of the API which is included.
2486+mName :: Lens' Mixin (Maybe Text)
2487+mName = lens _mName (\ s a -> s{_mName = a})
2488+
2489+instance FromJSON Mixin where
2490+ parseJSON
2491+ = withObject "Mixin"
2492+ (\ o -> Mixin' <$> (o .:? "root") <*> (o .:? "name"))
2493+
2494+instance ToJSON Mixin where
2495+ toJSON Mixin'{..}
2496+ = object
2497+ (catMaybes
2498+ [("root" .=) <$> _mRoot, ("name" .=) <$> _mName])
2499+
2500+-- | A custom pattern is used for defining custom HTTP verb.
2501+--
2502+-- /See:/ 'customHTTPPattern' smart constructor.
2503+data CustomHTTPPattern = CustomHTTPPattern'
2504+ { _chttppPath :: !(Maybe Text)
2505+ , _chttppKind :: !(Maybe Text)
2506+ } deriving (Eq,Show,Data,Typeable,Generic)
2507+
2508+-- | Creates a value of 'CustomHTTPPattern' with the minimum fields required to make a request.
2509+--
2510+-- Use one of the following lenses to modify other fields as desired:
2511+--
2512+-- * 'chttppPath'
2513+--
2514+-- * 'chttppKind'
2515+customHTTPPattern
2516+ :: CustomHTTPPattern
2517+customHTTPPattern =
2518+ CustomHTTPPattern'
2519+ { _chttppPath = Nothing
2520+ , _chttppKind = Nothing
2521+ }
2522+
2523+-- | The path matched by this custom verb.
2524+chttppPath :: Lens' CustomHTTPPattern (Maybe Text)
2525+chttppPath
2526+ = lens _chttppPath (\ s a -> s{_chttppPath = a})
2527+
2528+-- | The name of this custom HTTP verb.
2529+chttppKind :: Lens' CustomHTTPPattern (Maybe Text)
2530+chttppKind
2531+ = lens _chttppKind (\ s a -> s{_chttppKind = a})
2532+
2533+instance FromJSON CustomHTTPPattern where
2534+ parseJSON
2535+ = withObject "CustomHTTPPattern"
2536+ (\ o ->
2537+ CustomHTTPPattern' <$>
2538+ (o .:? "path") <*> (o .:? "kind"))
2539+
2540+instance ToJSON CustomHTTPPattern where
2541+ toJSON CustomHTTPPattern'{..}
2542+ = object
2543+ (catMaybes
2544+ [("path" .=) <$> _chttppPath,
2545+ ("kind" .=) <$> _chttppKind])
2546+
2547+-- | Usage configuration rules for the service. NOTE: Under development. Use
2548+-- this rule to configure unregistered calls for the service. Unregistered
2549+-- calls are calls that do not contain consumer project identity. (Example:
2550+-- calls that do not contain an API key). By default, API methods do not
2551+-- allow unregistered calls, and each method call must be identified by a
2552+-- consumer project identity. Use this rule to allow\/disallow unregistered
2553+-- calls. Example of an API that wants to allow unregistered calls for
2554+-- entire service. usage: rules: - selector: \"*\"
2555+-- allow_unregistered_calls: true Example of a method that wants to allow
2556+-- unregistered calls. usage: rules: - selector:
2557+-- \"google.example.library.v1.LibraryService.CreateBook\"
2558+-- allow_unregistered_calls: true
2559+--
2560+-- /See:/ 'usageRule' smart constructor.
2561+data UsageRule = UsageRule'
2562+ { _urSelector :: !(Maybe Text)
2563+ , _urAllowUnregisteredCalls :: !(Maybe Bool)
2564+ } deriving (Eq,Show,Data,Typeable,Generic)
2565+
2566+-- | Creates a value of 'UsageRule' with the minimum fields required to make a request.
2567+--
2568+-- Use one of the following lenses to modify other fields as desired:
2569+--
2570+-- * 'urSelector'
2571+--
2572+-- * 'urAllowUnregisteredCalls'
2573+usageRule
2574+ :: UsageRule
2575+usageRule =
2576+ UsageRule'
2577+ { _urSelector = Nothing
2578+ , _urAllowUnregisteredCalls = Nothing
2579+ }
2580+
2581+-- | Selects the methods to which this rule applies. Use \'*\' to indicate
2582+-- all methods in all APIs. Refer to selector for syntax details.
2583+urSelector :: Lens' UsageRule (Maybe Text)
2584+urSelector
2585+ = lens _urSelector (\ s a -> s{_urSelector = a})
2586+
2587+-- | True, if the method allows unregistered calls; false otherwise.
2588+urAllowUnregisteredCalls :: Lens' UsageRule (Maybe Bool)
2589+urAllowUnregisteredCalls
2590+ = lens _urAllowUnregisteredCalls
2591+ (\ s a -> s{_urAllowUnregisteredCalls = a})
2592+
2593+instance FromJSON UsageRule where
2594+ parseJSON
2595+ = withObject "UsageRule"
2596+ (\ o ->
2597+ UsageRule' <$>
2598+ (o .:? "selector") <*>
2599+ (o .:? "allowUnregisteredCalls"))
2600+
2601+instance ToJSON UsageRule where
2602+ toJSON UsageRule'{..}
2603+ = object
2604+ (catMaybes
2605+ [("selector" .=) <$> _urSelector,
2606+ ("allowUnregisteredCalls" .=) <$>
2607+ _urAllowUnregisteredCalls])
2608+
2609+--
2610+-- /See:/ 'statusDetailsItem' smart constructor.
2611+newtype StatusDetailsItem = StatusDetailsItem'
2612+ { _sdiAddtional :: HashMap Text JSONValue
2613+ } deriving (Eq,Show,Data,Typeable,Generic)
2614+
2615+-- | Creates a value of 'StatusDetailsItem' with the minimum fields required to make a request.
2616+--
2617+-- Use one of the following lenses to modify other fields as desired:
2618+--
2619+-- * 'sdiAddtional'
2620+statusDetailsItem
2621+ :: HashMap Text JSONValue -- ^ 'sdiAddtional'
2622+ -> StatusDetailsItem
2623+statusDetailsItem pSdiAddtional_ =
2624+ StatusDetailsItem'
2625+ { _sdiAddtional = _Coerce # pSdiAddtional_
2626+ }
2627+
2628+-- | Properties of the object. Contains field \'type with type URL.
2629+sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
2630+sdiAddtional
2631+ = lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
2632+ . _Coerce
2633+
2634+instance FromJSON StatusDetailsItem where
2635+ parseJSON
2636+ = withObject "StatusDetailsItem"
2637+ (\ o -> StatusDetailsItem' <$> (parseJSONObject o))
2638+
2639+instance ToJSON StatusDetailsItem where
2640+ toJSON = toJSON . _sdiAddtional
2641+
2642+-- | Represents a documentation page. A page can contain subpages to
2643+-- represent nested documentation set structure.
2644+--
2645+-- /See:/ 'page' smart constructor.
2646+data Page = Page'
2647+ { _pSubpages :: !(Maybe [Page])
2648+ , _pContent :: !(Maybe Text)
2649+ , _pName :: !(Maybe Text)
2650+ } deriving (Eq,Show,Data,Typeable,Generic)
2651+
2652+-- | Creates a value of 'Page' with the minimum fields required to make a request.
2653+--
2654+-- Use one of the following lenses to modify other fields as desired:
2655+--
2656+-- * 'pSubpages'
2657+--
2658+-- * 'pContent'
2659+--
2660+-- * 'pName'
2661+page
2662+ :: Page
2663+page =
2664+ Page'
2665+ { _pSubpages = Nothing
2666+ , _pContent = Nothing
2667+ , _pName = Nothing
2668+ }
2669+
2670+-- | Subpages of this page. The order of subpages specified here will be
2671+-- honored in the generated docset.
2672+pSubpages :: Lens' Page [Page]
2673+pSubpages
2674+ = lens _pSubpages (\ s a -> s{_pSubpages = a}) .
2675+ _Default
2676+ . _Coerce
2677+
2678+-- | The Markdown content of the page. You can use '(== include {path} ==)'
2679+-- to include content from a Markdown file.
2680+pContent :: Lens' Page (Maybe Text)
2681+pContent = lens _pContent (\ s a -> s{_pContent = a})
2682+
2683+-- | The name of the page. It will be used as an identity of the page to
2684+-- generate URI of the page, text of the link to this page in navigation,
2685+-- etc. The full page name (start from the root page name to this page
2686+-- concatenated with \`.\`) can be used as reference to the page in your
2687+-- documentation. For example:
2688+--
2689+-- > pages:
2690+-- > - name: Tutorial
2691+-- > content: (== include tutorial.md ==)
2692+-- > subpages:
2693+-- > - name: Java
2694+-- > content: (== include tutorial_java.md ==)
2695+--
2696+-- You can reference \`Java\` page using Markdown reference link syntax:
2697+-- \`Java\`.
2698+pName :: Lens' Page (Maybe Text)
2699+pName = lens _pName (\ s a -> s{_pName = a})
2700+
2701+instance FromJSON Page where
2702+ parseJSON
2703+ = withObject "Page"
2704+ (\ o ->
2705+ Page' <$>
2706+ (o .:? "subpages" .!= mempty) <*> (o .:? "content")
2707+ <*> (o .:? "name"))
2708+
2709+instance ToJSON Page where
2710+ toJSON Page'{..}
2711+ = object
2712+ (catMaybes
2713+ [("subpages" .=) <$> _pSubpages,
2714+ ("content" .=) <$> _pContent,
2715+ ("name" .=) <$> _pName])
2716+
2717+-- | Service configuration against which the comparison will be done. For
2718+-- this version of API, the supported types are
2719+-- google.api.servicemanagement.v1.ConfigRef,
2720+-- google.api.servicemanagement.v1.ConfigSource, and google.api.Service
2721+--
2722+-- /See:/ 'generateConfigReportRequestOldConfig' smart constructor.
2723+newtype GenerateConfigReportRequestOldConfig = GenerateConfigReportRequestOldConfig'
2724+ { _gcrrocAddtional :: HashMap Text JSONValue
2725+ } deriving (Eq,Show,Data,Typeable,Generic)
2726+
2727+-- | Creates a value of 'GenerateConfigReportRequestOldConfig' with the minimum fields required to make a request.
2728+--
2729+-- Use one of the following lenses to modify other fields as desired:
2730+--
2731+-- * 'gcrrocAddtional'
2732+generateConfigReportRequestOldConfig
2733+ :: HashMap Text JSONValue -- ^ 'gcrrocAddtional'
2734+ -> GenerateConfigReportRequestOldConfig
2735+generateConfigReportRequestOldConfig pGcrrocAddtional_ =
2736+ GenerateConfigReportRequestOldConfig'
2737+ { _gcrrocAddtional = _Coerce # pGcrrocAddtional_
2738+ }
2739+
2740+-- | Properties of the object. Contains field \'type with type URL.
2741+gcrrocAddtional :: Lens' GenerateConfigReportRequestOldConfig (HashMap Text JSONValue)
2742+gcrrocAddtional
2743+ = lens _gcrrocAddtional
2744+ (\ s a -> s{_gcrrocAddtional = a})
2745+ . _Coerce
2746+
2747+instance FromJSON
2748+ GenerateConfigReportRequestOldConfig where
2749+ parseJSON
2750+ = withObject "GenerateConfigReportRequestOldConfig"
2751+ (\ o ->
2752+ GenerateConfigReportRequestOldConfig' <$>
2753+ (parseJSONObject o))
2754+
2755+instance ToJSON GenerateConfigReportRequestOldConfig
2756+ where
2757+ toJSON = toJSON . _gcrrocAddtional
2758+
2759+-- | Analytics configuration of the service. The example below shows how to
2760+-- configure monitored resources and metrics for analytics. In the example,
2761+-- a monitored resource and two metrics are defined. The
2762+-- \`library.googleapis.com\/book\/returned_count\` and
2763+-- \`library.googleapis.com\/book\/overdue_count\` metric are sent to the
2764+-- analytics. monitored_resources: - type: library.googleapis.com\/branch
2765+-- labels: - key: \/city description: The city where the library branch is
2766+-- located in. - key: \/name description: The name of the branch. metrics:
2767+-- - name: library.googleapis.com\/book\/returned_count metric_kind: DELTA
2768+-- value_type: INT64 labels: - key: \/customer_id - name:
2769+-- library.googleapis.com\/book\/overdue_count metric_kind: GAUGE
2770+-- value_type: INT64 labels: - key: \/customer_id analytics:
2771+-- producer_destinations: - monitored_resource:
2772+-- library.googleapis.com\/branch metrics: -
2773+-- library.googleapis.com\/book\/returned_count -
2774+-- library.googleapis.com\/book\/overdue_count
2775+--
2776+-- /See:/ 'analytics' smart constructor.
2777+newtype Analytics = Analytics'
2778+ { _aProducerDestinations :: Maybe [AnalyticsDestination]
2779+ } deriving (Eq,Show,Data,Typeable,Generic)
2780+
2781+-- | Creates a value of 'Analytics' with the minimum fields required to make a request.
2782+--
2783+-- Use one of the following lenses to modify other fields as desired:
2784+--
2785+-- * 'aProducerDestinations'
2786+analytics
2787+ :: Analytics
2788+analytics =
2789+ Analytics'
2790+ { _aProducerDestinations = Nothing
2791+ }
2792+
2793+-- | Analytics configurations for sending metrics to the analytics backend.
2794+-- There can be multiple producer destinations, each one must have a
2795+-- different monitored resource type. A metric can be used in at most one
2796+-- producer destination.
2797+aProducerDestinations :: Lens' Analytics [AnalyticsDestination]
2798+aProducerDestinations
2799+ = lens _aProducerDestinations
2800+ (\ s a -> s{_aProducerDestinations = a})
2801+ . _Default
2802+ . _Coerce
2803+
2804+instance FromJSON Analytics where
2805+ parseJSON
2806+ = withObject "Analytics"
2807+ (\ o ->
2808+ Analytics' <$>
2809+ (o .:? "producerDestinations" .!= mempty))
2810+
2811+instance ToJSON Analytics where
2812+ toJSON Analytics'{..}
2813+ = object
2814+ (catMaybes
2815+ [("producerDestinations" .=) <$>
2816+ _aProducerDestinations])
2817+
2818+-- | A rule to be applied in a Policy.
2819+--
2820+-- /See:/ 'rule' smart constructor.
2821+data Rule = Rule'
2822+ { _rAction :: !(Maybe RuleAction)
2823+ , _rIn :: !(Maybe [Text])
2824+ , _rNotIn :: !(Maybe [Text])
2825+ , _rConditions :: !(Maybe [Condition])
2826+ , _rPermissions :: !(Maybe [Text])
2827+ , _rLogConfig :: !(Maybe [LogConfig])
2828+ , _rDescription :: !(Maybe Text)
2829+ } deriving (Eq,Show,Data,Typeable,Generic)
2830+
2831+-- | Creates a value of 'Rule' with the minimum fields required to make a request.
2832+--
2833+-- Use one of the following lenses to modify other fields as desired:
2834+--
2835+-- * 'rAction'
2836+--
2837+-- * 'rIn'
2838+--
2839+-- * 'rNotIn'
2840+--
2841+-- * 'rConditions'
2842+--
2843+-- * 'rPermissions'
2844+--
2845+-- * 'rLogConfig'
2846+--
2847+-- * 'rDescription'
2848+rule
2849+ :: Rule
2850+rule =
2851+ Rule'
2852+ { _rAction = Nothing
2853+ , _rIn = Nothing
2854+ , _rNotIn = Nothing
2855+ , _rConditions = Nothing
2856+ , _rPermissions = Nothing
2857+ , _rLogConfig = Nothing
2858+ , _rDescription = Nothing
2859+ }
2860+
2861+-- | Required
2862+rAction :: Lens' Rule (Maybe RuleAction)
2863+rAction = lens _rAction (\ s a -> s{_rAction = a})
2864+
2865+-- | If one or more \'in\' clauses are specified, the rule matches if the
2866+-- PRINCIPAL\/AUTHORITY_SELECTOR is in at least one of these entries.
2867+rIn :: Lens' Rule [Text]
2868+rIn
2869+ = lens _rIn (\ s a -> s{_rIn = a}) . _Default .
2870+ _Coerce
2871+
2872+-- | If one or more \'not_in\' clauses are specified, the rule matches if the
2873+-- PRINCIPAL\/AUTHORITY_SELECTOR is in none of the entries. The format for
2874+-- in and not_in entries is the same as for members in a Binding (see
2875+-- google\/iam\/v1\/policy.proto).
2876+rNotIn :: Lens' Rule [Text]
2877+rNotIn
2878+ = lens _rNotIn (\ s a -> s{_rNotIn = a}) . _Default .
2879+ _Coerce
2880+
2881+-- | Additional restrictions that must be met
2882+rConditions :: Lens' Rule [Condition]
2883+rConditions
2884+ = lens _rConditions (\ s a -> s{_rConditions = a}) .
2885+ _Default
2886+ . _Coerce
2887+
2888+-- | A permission is a string of form \'..\' (e.g.,
2889+-- \'storage.buckets.list\'). A value of \'*\' matches all permissions, and
2890+-- a verb part of \'*\' (e.g., \'storage.buckets.*\') matches all verbs.
2891+rPermissions :: Lens' Rule [Text]
2892+rPermissions
2893+ = lens _rPermissions (\ s a -> s{_rPermissions = a})
2894+ . _Default
2895+ . _Coerce
2896+
2897+-- | The config returned to callers of tech.iam.IAM.CheckPolicy for any
2898+-- entries that match the LOG action.
2899+rLogConfig :: Lens' Rule [LogConfig]
2900+rLogConfig
2901+ = lens _rLogConfig (\ s a -> s{_rLogConfig = a}) .
2902+ _Default
2903+ . _Coerce
2904+
2905+-- | Human-readable description of the rule.
2906+rDescription :: Lens' Rule (Maybe Text)
2907+rDescription
2908+ = lens _rDescription (\ s a -> s{_rDescription = a})
2909+
2910+instance FromJSON Rule where
2911+ parseJSON
2912+ = withObject "Rule"
2913+ (\ o ->
2914+ Rule' <$>
2915+ (o .:? "action") <*> (o .:? "in" .!= mempty) <*>
2916+ (o .:? "notIn" .!= mempty)
2917+ <*> (o .:? "conditions" .!= mempty)
2918+ <*> (o .:? "permissions" .!= mempty)
2919+ <*> (o .:? "logConfig" .!= mempty)
2920+ <*> (o .:? "description"))
2921+
2922+instance ToJSON Rule where
2923+ toJSON Rule'{..}
2924+ = object
2925+ (catMaybes
2926+ [("action" .=) <$> _rAction, ("in" .=) <$> _rIn,
2927+ ("notIn" .=) <$> _rNotIn,
2928+ ("conditions" .=) <$> _rConditions,
2929+ ("permissions" .=) <$> _rPermissions,
2930+ ("logConfig" .=) <$> _rLogConfig,
2931+ ("description" .=) <$> _rDescription])
2932+
2933+-- | \`Visibility\` defines restrictions for the visibility of service
2934+-- elements. Restrictions are specified using visibility labels (e.g.,
2935+-- TRUSTED_TESTER) that are elsewhere linked to users and projects. Users
2936+-- and projects can have access to more than one visibility label. The
2937+-- effective visibility for multiple labels is the union of each label\'s
2938+-- elements, plus any unrestricted elements. If an element and its parents
2939+-- have no restrictions, visibility is unconditionally granted. Example:
2940+-- visibility: rules: - selector: google.calendar.Calendar.EnhancedSearch
2941+-- restriction: TRUSTED_TESTER - selector:
2942+-- google.calendar.Calendar.Delegate restriction: GOOGLE_INTERNAL Here, all
2943+-- methods are publicly visible except for the restricted methods
2944+-- EnhancedSearch and Delegate.
2945+--
2946+-- /See:/ 'visibility' smart constructor.
2947+newtype Visibility = Visibility'
2948+ { _vRules :: Maybe [VisibilityRule]
2949+ } deriving (Eq,Show,Data,Typeable,Generic)
2950+
2951+-- | Creates a value of 'Visibility' with the minimum fields required to make a request.
2952+--
2953+-- Use one of the following lenses to modify other fields as desired:
2954+--
2955+-- * 'vRules'
2956+visibility
2957+ :: Visibility
2958+visibility =
2959+ Visibility'
2960+ { _vRules = Nothing
2961+ }
2962+
2963+-- | A list of visibility rules that apply to individual API elements.
2964+-- **NOTE:** All service configuration rules follow \"last one wins\"
2965+-- order.
2966+vRules :: Lens' Visibility [VisibilityRule]
2967+vRules
2968+ = lens _vRules (\ s a -> s{_vRules = a}) . _Default .
2969+ _Coerce
2970+
2971+instance FromJSON Visibility where
2972+ parseJSON
2973+ = withObject "Visibility"
2974+ (\ o -> Visibility' <$> (o .:? "rules" .!= mempty))
2975+
2976+instance ToJSON Visibility where
2977+ toJSON Visibility'{..}
2978+ = object (catMaybes [("rules" .=) <$> _vRules])
2979+
2980+-- | Authentication rules for the service. By default, if a method has any
2981+-- authentication requirements, every request must include a valid
2982+-- credential matching one of the requirements. It\'s an error to include
2983+-- more than one kind of credential in a single request. If a method
2984+-- doesn\'t have any auth requirements, request credentials will be
2985+-- ignored.
2986+--
2987+-- /See:/ 'authenticationRule' smart constructor.
2988+data AuthenticationRule = AuthenticationRule'
2989+ { _arRequirements :: !(Maybe [AuthRequirement])
2990+ , _arSelector :: !(Maybe Text)
2991+ , _arAllowWithoutCredential :: !(Maybe Bool)
2992+ , _arOAuth :: !(Maybe OAuthRequirements)
2993+ } deriving (Eq,Show,Data,Typeable,Generic)
2994+
2995+-- | Creates a value of 'AuthenticationRule' with the minimum fields required to make a request.
2996+--
2997+-- Use one of the following lenses to modify other fields as desired:
2998+--
2999+-- * 'arRequirements'
3000+--
3001+-- * 'arSelector'
3002+--
3003+-- * 'arAllowWithoutCredential'
3004+--
3005+-- * 'arOAuth'
3006+authenticationRule
3007+ :: AuthenticationRule
3008+authenticationRule =
3009+ AuthenticationRule'
3010+ { _arRequirements = Nothing
3011+ , _arSelector = Nothing
3012+ , _arAllowWithoutCredential = Nothing
3013+ , _arOAuth = Nothing
3014+ }
3015+
3016+-- | Requirements for additional authentication providers.
3017+arRequirements :: Lens' AuthenticationRule [AuthRequirement]
3018+arRequirements
3019+ = lens _arRequirements
3020+ (\ s a -> s{_arRequirements = a})
3021+ . _Default
3022+ . _Coerce
3023+
3024+-- | Selects the methods to which this rule applies. Refer to selector for
3025+-- syntax details.
3026+arSelector :: Lens' AuthenticationRule (Maybe Text)
3027+arSelector
3028+ = lens _arSelector (\ s a -> s{_arSelector = a})
3029+
3030+-- | Whether to allow requests without a credential. The credential can be an
3031+-- OAuth token, Google cookies (first-party auth) or EndUserCreds. For
3032+-- requests without credentials, if the service control environment is
3033+-- specified, each incoming request **must** be associated with a service
3034+-- consumer. This can be done by passing an API key that belongs to a
3035+-- consumer project.
3036+arAllowWithoutCredential :: Lens' AuthenticationRule (Maybe Bool)
3037+arAllowWithoutCredential
3038+ = lens _arAllowWithoutCredential
3039+ (\ s a -> s{_arAllowWithoutCredential = a})
3040+
3041+-- | The requirements for OAuth credentials.
3042+arOAuth :: Lens' AuthenticationRule (Maybe OAuthRequirements)
3043+arOAuth = lens _arOAuth (\ s a -> s{_arOAuth = a})
3044+
3045+instance FromJSON AuthenticationRule where
3046+ parseJSON
3047+ = withObject "AuthenticationRule"
3048+ (\ o ->
3049+ AuthenticationRule' <$>
3050+ (o .:? "requirements" .!= mempty) <*>
3051+ (o .:? "selector")
3052+ <*> (o .:? "allowWithoutCredential")
3053+ <*> (o .:? "oauth"))
3054+
3055+instance ToJSON AuthenticationRule where
3056+ toJSON AuthenticationRule'{..}
3057+ = object
3058+ (catMaybes
3059+ [("requirements" .=) <$> _arRequirements,
3060+ ("selector" .=) <$> _arSelector,
3061+ ("allowWithoutCredential" .=) <$>
3062+ _arAllowWithoutCredential,
3063+ ("oauth" .=) <$> _arOAuth])
3064+
3065+-- | Request message for \`SetIamPolicy\` method.
3066+--
3067+-- /See:/ 'setIAMPolicyRequest' smart constructor.
3068+newtype SetIAMPolicyRequest = SetIAMPolicyRequest'
3069+ { _siprPolicy :: Maybe Policy
3070+ } deriving (Eq,Show,Data,Typeable,Generic)
3071+
3072+-- | Creates a value of 'SetIAMPolicyRequest' with the minimum fields required to make a request.
3073+--
3074+-- Use one of the following lenses to modify other fields as desired:
3075+--
3076+-- * 'siprPolicy'
3077+setIAMPolicyRequest
3078+ :: SetIAMPolicyRequest
3079+setIAMPolicyRequest =
3080+ SetIAMPolicyRequest'
3081+ { _siprPolicy = Nothing
3082+ }
3083+
3084+-- | REQUIRED: The complete policy to be applied to the \`resource\`. The
3085+-- size of the policy is limited to a few 10s of KB. An empty policy is a
3086+-- valid policy but certain Cloud Platform services (such as Projects)
3087+-- might reject them.
3088+siprPolicy :: Lens' SetIAMPolicyRequest (Maybe Policy)
3089+siprPolicy
3090+ = lens _siprPolicy (\ s a -> s{_siprPolicy = a})
3091+
3092+instance FromJSON SetIAMPolicyRequest where
3093+ parseJSON
3094+ = withObject "SetIAMPolicyRequest"
3095+ (\ o -> SetIAMPolicyRequest' <$> (o .:? "policy"))
3096+
3097+instance ToJSON SetIAMPolicyRequest where
3098+ toJSON SetIAMPolicyRequest'{..}
3099+ = object (catMaybes [("policy" .=) <$> _siprPolicy])
3100+
3101+-- | Maps service configuration IDs to their corresponding traffic
3102+-- percentage. Key is the service configuration ID, Value is the traffic
3103+-- percentage which must be greater than 0.0 and the sum must equal to
3104+-- 100.0.
3105+--
3106+-- /See:/ 'trafficPercentStrategyPercentages' smart constructor.
3107+newtype TrafficPercentStrategyPercentages = TrafficPercentStrategyPercentages'
3108+ { _tpspAddtional :: HashMap Text (Textual Double)
3109+ } deriving (Eq,Show,Data,Typeable,Generic)
3110+
3111+-- | Creates a value of 'TrafficPercentStrategyPercentages' with the minimum fields required to make a request.
3112+--
3113+-- Use one of the following lenses to modify other fields as desired:
3114+--
3115+-- * 'tpspAddtional'
3116+trafficPercentStrategyPercentages
3117+ :: HashMap Text Double -- ^ 'tpspAddtional'
3118+ -> TrafficPercentStrategyPercentages
3119+trafficPercentStrategyPercentages pTpspAddtional_ =
3120+ TrafficPercentStrategyPercentages'
3121+ { _tpspAddtional = _Coerce # pTpspAddtional_
3122+ }
3123+
3124+tpspAddtional :: Lens' TrafficPercentStrategyPercentages (HashMap Text Double)
3125+tpspAddtional
3126+ = lens _tpspAddtional
3127+ (\ s a -> s{_tpspAddtional = a})
3128+ . _Coerce
3129+
3130+instance FromJSON TrafficPercentStrategyPercentages
3131+ where
3132+ parseJSON
3133+ = withObject "TrafficPercentStrategyPercentages"
3134+ (\ o ->
3135+ TrafficPercentStrategyPercentages' <$>
3136+ (parseJSONObject o))
3137+
3138+instance ToJSON TrafficPercentStrategyPercentages
3139+ where
3140+ toJSON = toJSON . _tpspAddtional
3141+
3142+-- | Response message for ListServiceRollouts method.
3143+--
3144+-- /See:/ 'listServiceRolloutsResponse' smart constructor.
3145+data ListServiceRolloutsResponse = ListServiceRolloutsResponse'
3146+ { _lsrrNextPageToken :: !(Maybe Text)
3147+ , _lsrrRollouts :: !(Maybe [Rollout])
3148+ } deriving (Eq,Show,Data,Typeable,Generic)
3149+
3150+-- | Creates a value of 'ListServiceRolloutsResponse' with the minimum fields required to make a request.
3151+--
3152+-- Use one of the following lenses to modify other fields as desired:
3153+--
3154+-- * 'lsrrNextPageToken'
3155+--
3156+-- * 'lsrrRollouts'
3157+listServiceRolloutsResponse
3158+ :: ListServiceRolloutsResponse
3159+listServiceRolloutsResponse =
3160+ ListServiceRolloutsResponse'
3161+ { _lsrrNextPageToken = Nothing
3162+ , _lsrrRollouts = Nothing
3163+ }
3164+
3165+-- | The token of the next page of results.
3166+lsrrNextPageToken :: Lens' ListServiceRolloutsResponse (Maybe Text)
3167+lsrrNextPageToken
3168+ = lens _lsrrNextPageToken
3169+ (\ s a -> s{_lsrrNextPageToken = a})
3170+
3171+-- | The list of rollout resources.
3172+lsrrRollouts :: Lens' ListServiceRolloutsResponse [Rollout]
3173+lsrrRollouts
3174+ = lens _lsrrRollouts (\ s a -> s{_lsrrRollouts = a})
3175+ . _Default
3176+ . _Coerce
3177+
3178+instance FromJSON ListServiceRolloutsResponse where
3179+ parseJSON
3180+ = withObject "ListServiceRolloutsResponse"
3181+ (\ o ->
3182+ ListServiceRolloutsResponse' <$>
3183+ (o .:? "nextPageToken") <*>
3184+ (o .:? "rollouts" .!= mempty))
3185+
3186+instance ToJSON ListServiceRolloutsResponse where
3187+ toJSON ListServiceRolloutsResponse'{..}
3188+ = object
3189+ (catMaybes
3190+ [("nextPageToken" .=) <$> _lsrrNextPageToken,
3191+ ("rollouts" .=) <$> _lsrrRollouts])
3192+
3193+-- | Output generated from semantically comparing two versions of a service
3194+-- configuration. Includes detailed information about a field that have
3195+-- changed with applicable advice about potential consequences for the
3196+-- change, such as backwards-incompatibility.
3197+--
3198+-- /See:/ 'configChange' smart constructor.
3199+data ConfigChange = ConfigChange'
3200+ { _ccOldValue :: !(Maybe Text)
3201+ , _ccNewValue :: !(Maybe Text)
3202+ , _ccAdvices :: !(Maybe [Advice])
3203+ , _ccChangeType :: !(Maybe ConfigChangeChangeType)
3204+ , _ccElement :: !(Maybe Text)
3205+ } deriving (Eq,Show,Data,Typeable,Generic)
3206+
3207+-- | Creates a value of 'ConfigChange' with the minimum fields required to make a request.
3208+--
3209+-- Use one of the following lenses to modify other fields as desired:
3210+--
3211+-- * 'ccOldValue'
3212+--
3213+-- * 'ccNewValue'
3214+--
3215+-- * 'ccAdvices'
3216+--
3217+-- * 'ccChangeType'
3218+--
3219+-- * 'ccElement'
3220+configChange
3221+ :: ConfigChange
3222+configChange =
3223+ ConfigChange'
3224+ { _ccOldValue = Nothing
3225+ , _ccNewValue = Nothing
3226+ , _ccAdvices = Nothing
3227+ , _ccChangeType = Nothing
3228+ , _ccElement = Nothing
3229+ }
3230+
3231+-- | Value of the changed object in the old Service configuration, in JSON
3232+-- format. This field will not be populated if ChangeType == ADDED.
3233+ccOldValue :: Lens' ConfigChange (Maybe Text)
3234+ccOldValue
3235+ = lens _ccOldValue (\ s a -> s{_ccOldValue = a})
3236+
3237+-- | Value of the changed object in the new Service configuration, in JSON
3238+-- format. This field will not be populated if ChangeType == REMOVED.
3239+ccNewValue :: Lens' ConfigChange (Maybe Text)
3240+ccNewValue
3241+ = lens _ccNewValue (\ s a -> s{_ccNewValue = a})
3242+
3243+-- | Collection of advice provided for this change, useful for determining
3244+-- the possible impact of this change.
3245+ccAdvices :: Lens' ConfigChange [Advice]
3246+ccAdvices
3247+ = lens _ccAdvices (\ s a -> s{_ccAdvices = a}) .
3248+ _Default
3249+ . _Coerce
3250+
3251+-- | The type for this change, either ADDED, REMOVED, or MODIFIED.
3252+ccChangeType :: Lens' ConfigChange (Maybe ConfigChangeChangeType)
3253+ccChangeType
3254+ = lens _ccChangeType (\ s a -> s{_ccChangeType = a})
3255+
3256+-- | Object hierarchy path to the change, with levels separated by a \'.\'
3257+-- character. For repeated fields, an applicable unique identifier field is
3258+-- used for the index (usually selector, name, or id). For maps, the term
3259+-- \'key\' is used. If the field has no unique identifier, the numeric
3260+-- index is used. Examples: -
3261+-- visibility.rules[selector==\"google.LibraryService.CreateBook\"].restriction
3262+-- -
3263+-- quota.metric_rules[selector==\"google\"].metric_costs[key==\"reads\"].value
3264+-- - logging.producer_destinations[0]
3265+ccElement :: Lens' ConfigChange (Maybe Text)
3266+ccElement
3267+ = lens _ccElement (\ s a -> s{_ccElement = a})
3268+
3269+instance FromJSON ConfigChange where
3270+ parseJSON
3271+ = withObject "ConfigChange"
3272+ (\ o ->
3273+ ConfigChange' <$>
3274+ (o .:? "oldValue") <*> (o .:? "newValue") <*>
3275+ (o .:? "advices" .!= mempty)
3276+ <*> (o .:? "changeType")
3277+ <*> (o .:? "element"))
3278+
3279+instance ToJSON ConfigChange where
3280+ toJSON ConfigChange'{..}
3281+ = object
3282+ (catMaybes
3283+ [("oldValue" .=) <$> _ccOldValue,
3284+ ("newValue" .=) <$> _ccNewValue,
3285+ ("advices" .=) <$> _ccAdvices,
3286+ ("changeType" .=) <$> _ccChangeType,
3287+ ("element" .=) <$> _ccElement])
3288+
3289+-- | Write a Cloud Audit log
3290+--
3291+-- /See:/ 'cloudAuditOptions' smart constructor.
3292+data CloudAuditOptions =
3293+ CloudAuditOptions'
3294+ deriving (Eq,Show,Data,Typeable,Generic)
3295+
3296+-- | Creates a value of 'CloudAuditOptions' with the minimum fields required to make a request.
3297+--
3298+cloudAuditOptions
3299+ :: CloudAuditOptions
3300+cloudAuditOptions = CloudAuditOptions'
3301+
3302+instance FromJSON CloudAuditOptions where
3303+ parseJSON
3304+ = withObject "CloudAuditOptions"
3305+ (\ o -> pure CloudAuditOptions')
3306+
3307+instance ToJSON CloudAuditOptions where
3308+ toJSON = const emptyObject
3309+
3310+-- | \`Backend\` defines the backend configuration for a service.
3311+--
3312+-- /See:/ 'backend' smart constructor.
3313+newtype Backend = Backend'
3314+ { _bRules :: Maybe [BackendRule]
3315+ } deriving (Eq,Show,Data,Typeable,Generic)
3316+
3317+-- | Creates a value of 'Backend' with the minimum fields required to make a request.
3318+--
3319+-- Use one of the following lenses to modify other fields as desired:
3320+--
3321+-- * 'bRules'
3322+backend
3323+ :: Backend
3324+backend =
3325+ Backend'
3326+ { _bRules = Nothing
3327+ }
3328+
3329+-- | A list of API backend rules that apply to individual API methods.
3330+-- **NOTE:** All service configuration rules follow \"last one wins\"
3331+-- order.
3332+bRules :: Lens' Backend [BackendRule]
3333+bRules
3334+ = lens _bRules (\ s a -> s{_bRules = a}) . _Default .
3335+ _Coerce
3336+
3337+instance FromJSON Backend where
3338+ parseJSON
3339+ = withObject "Backend"
3340+ (\ o -> Backend' <$> (o .:? "rules" .!= mempty))
3341+
3342+instance ToJSON Backend where
3343+ toJSON Backend'{..}
3344+ = object (catMaybes [("rules" .=) <$> _bRules])
3345+
3346+-- | Write a Data Access (Gin) log
3347+--
3348+-- /See:/ 'dataAccessOptions' smart constructor.
3349+data DataAccessOptions =
3350+ DataAccessOptions'
3351+ deriving (Eq,Show,Data,Typeable,Generic)
3352+
3353+-- | Creates a value of 'DataAccessOptions' with the minimum fields required to make a request.
3354+--
3355+dataAccessOptions
3356+ :: DataAccessOptions
3357+dataAccessOptions = DataAccessOptions'
3358+
3359+instance FromJSON DataAccessOptions where
3360+ parseJSON
3361+ = withObject "DataAccessOptions"
3362+ (\ o -> pure DataAccessOptions')
3363+
3364+instance ToJSON DataAccessOptions where
3365+ toJSON = const emptyObject
3366+
3367+-- | Monitoring configuration of the service. The example below shows how to
3368+-- configure monitored resources and metrics for monitoring. In the
3369+-- example, a monitored resource and two metrics are defined. The
3370+-- \`library.googleapis.com\/book\/returned_count\` metric is sent to both
3371+-- producer and consumer projects, whereas the
3372+-- \`library.googleapis.com\/book\/overdue_count\` metric is only sent to
3373+-- the consumer project. monitored_resources: - type:
3374+-- library.googleapis.com\/branch labels: - key: \/city description: The
3375+-- city where the library branch is located in. - key: \/name description:
3376+-- The name of the branch. metrics: - name:
3377+-- library.googleapis.com\/book\/returned_count metric_kind: DELTA
3378+-- value_type: INT64 labels: - key: \/customer_id - name:
3379+-- library.googleapis.com\/book\/overdue_count metric_kind: GAUGE
3380+-- value_type: INT64 labels: - key: \/customer_id monitoring:
3381+-- producer_destinations: - monitored_resource:
3382+-- library.googleapis.com\/branch metrics: -
3383+-- library.googleapis.com\/book\/returned_count consumer_destinations: -
3384+-- monitored_resource: library.googleapis.com\/branch metrics: -
3385+-- library.googleapis.com\/book\/returned_count -
3386+-- library.googleapis.com\/book\/overdue_count
3387+--
3388+-- /See:/ 'monitoring' smart constructor.
3389+data Monitoring = Monitoring'
3390+ { _mProducerDestinations :: !(Maybe [MonitoringDestination])
3391+ , _mConsumerDestinations :: !(Maybe [MonitoringDestination])
3392+ } deriving (Eq,Show,Data,Typeable,Generic)
3393+
3394+-- | Creates a value of 'Monitoring' with the minimum fields required to make a request.
3395+--
3396+-- Use one of the following lenses to modify other fields as desired:
3397+--
3398+-- * 'mProducerDestinations'
3399+--
3400+-- * 'mConsumerDestinations'
3401+monitoring
3402+ :: Monitoring
3403+monitoring =
3404+ Monitoring'
3405+ { _mProducerDestinations = Nothing
3406+ , _mConsumerDestinations = Nothing
3407+ }
3408+
3409+-- | Monitoring configurations for sending metrics to the producer project.
3410+-- There can be multiple producer destinations, each one must have a
3411+-- different monitored resource type. A metric can be used in at most one
3412+-- producer destination.
3413+mProducerDestinations :: Lens' Monitoring [MonitoringDestination]
3414+mProducerDestinations
3415+ = lens _mProducerDestinations
3416+ (\ s a -> s{_mProducerDestinations = a})
3417+ . _Default
3418+ . _Coerce
3419+
3420+-- | Monitoring configurations for sending metrics to the consumer project.
3421+-- There can be multiple consumer destinations, each one must have a
3422+-- different monitored resource type. A metric can be used in at most one
3423+-- consumer destination.
3424+mConsumerDestinations :: Lens' Monitoring [MonitoringDestination]
3425+mConsumerDestinations
3426+ = lens _mConsumerDestinations
3427+ (\ s a -> s{_mConsumerDestinations = a})
3428+ . _Default
3429+ . _Coerce
3430+
3431+instance FromJSON Monitoring where
3432+ parseJSON
3433+ = withObject "Monitoring"
3434+ (\ o ->
3435+ Monitoring' <$>
3436+ (o .:? "producerDestinations" .!= mempty) <*>
3437+ (o .:? "consumerDestinations" .!= mempty))
3438+
3439+instance ToJSON Monitoring where
3440+ toJSON Monitoring'{..}
3441+ = object
3442+ (catMaybes
3443+ [("producerDestinations" .=) <$>
3444+ _mProducerDestinations,
3445+ ("consumerDestinations" .=) <$>
3446+ _mConsumerDestinations])
3447+
3448+-- | A description of a log type. Example in YAML format: - name:
3449+-- library.googleapis.com\/activity_history description: The history of
3450+-- borrowing and returning library items. display_name: Activity labels: -
3451+-- key: \/customer_id description: Identifier of a library customer
3452+--
3453+-- /See:/ 'logDescriptor' smart constructor.
3454+data LogDescriptor = LogDescriptor'
3455+ { _ldName :: !(Maybe Text)
3456+ , _ldDisplayName :: !(Maybe Text)
3457+ , _ldLabels :: !(Maybe [LabelDescriptor])
3458+ , _ldDescription :: !(Maybe Text)
3459+ } deriving (Eq,Show,Data,Typeable,Generic)
3460+
3461+-- | Creates a value of 'LogDescriptor' with the minimum fields required to make a request.
3462+--
3463+-- Use one of the following lenses to modify other fields as desired:
3464+--
3465+-- * 'ldName'
3466+--
3467+-- * 'ldDisplayName'
3468+--
3469+-- * 'ldLabels'
3470+--
3471+-- * 'ldDescription'
3472+logDescriptor
3473+ :: LogDescriptor
3474+logDescriptor =
3475+ LogDescriptor'
3476+ { _ldName = Nothing
3477+ , _ldDisplayName = Nothing
3478+ , _ldLabels = Nothing
3479+ , _ldDescription = Nothing
3480+ }
3481+
3482+-- | The name of the log. It must be less than 512 characters long and can
3483+-- include the following characters: upper- and lower-case alphanumeric
3484+-- characters [A-Za-z0-9], and punctuation characters including slash,
3485+-- underscore, hyphen, period [\/_-.].
3486+ldName :: Lens' LogDescriptor (Maybe Text)
3487+ldName = lens _ldName (\ s a -> s{_ldName = a})
3488+
3489+-- | The human-readable name for this log. This information appears on the
3490+-- user interface and should be concise.
3491+ldDisplayName :: Lens' LogDescriptor (Maybe Text)
3492+ldDisplayName
3493+ = lens _ldDisplayName
3494+ (\ s a -> s{_ldDisplayName = a})
3495+
3496+-- | The set of labels that are available to describe a specific log entry.
3497+-- Runtime requests that contain labels not specified here are considered
3498+-- invalid.
3499+ldLabels :: Lens' LogDescriptor [LabelDescriptor]
3500+ldLabels
3501+ = lens _ldLabels (\ s a -> s{_ldLabels = a}) .
3502+ _Default
3503+ . _Coerce
3504+
3505+-- | A human-readable description of this log. This information appears in
3506+-- the documentation and can contain details.
3507+ldDescription :: Lens' LogDescriptor (Maybe Text)
3508+ldDescription
3509+ = lens _ldDescription
3510+ (\ s a -> s{_ldDescription = a})
3511+
3512+instance FromJSON LogDescriptor where
3513+ parseJSON
3514+ = withObject "LogDescriptor"
3515+ (\ o ->
3516+ LogDescriptor' <$>
3517+ (o .:? "name") <*> (o .:? "displayName") <*>
3518+ (o .:? "labels" .!= mempty)
3519+ <*> (o .:? "description"))
3520+
3521+instance ToJSON LogDescriptor where
3522+ toJSON LogDescriptor'{..}
3523+ = object
3524+ (catMaybes
3525+ [("name" .=) <$> _ldName,
3526+ ("displayName" .=) <$> _ldDisplayName,
3527+ ("labels" .=) <$> _ldLabels,
3528+ ("description" .=) <$> _ldDescription])
3529+
3530+-- | Method represents a method of an api.
3531+--
3532+-- /See:/ 'method' smart constructor.
3533+data Method = Method'
3534+ { _metRequestStreaming :: !(Maybe Bool)
3535+ , _metResponseTypeURL :: !(Maybe Text)
3536+ , _metName :: !(Maybe Text)
3537+ , _metResponseStreaming :: !(Maybe Bool)
3538+ , _metRequestTypeURL :: !(Maybe Text)
3539+ , _metOptions :: !(Maybe [Option])
3540+ , _metSyntax :: !(Maybe MethodSyntax)
3541+ } deriving (Eq,Show,Data,Typeable,Generic)
3542+
3543+-- | Creates a value of 'Method' with the minimum fields required to make a request.
3544+--
3545+-- Use one of the following lenses to modify other fields as desired:
3546+--
3547+-- * 'metRequestStreaming'
3548+--
3549+-- * 'metResponseTypeURL'
3550+--
3551+-- * 'metName'
3552+--
3553+-- * 'metResponseStreaming'
3554+--
3555+-- * 'metRequestTypeURL'
3556+--
3557+-- * 'metOptions'
3558+--
3559+-- * 'metSyntax'
3560+method
3561+ :: Method
3562+method =
3563+ Method'
3564+ { _metRequestStreaming = Nothing
3565+ , _metResponseTypeURL = Nothing
3566+ , _metName = Nothing
3567+ , _metResponseStreaming = Nothing
3568+ , _metRequestTypeURL = Nothing
3569+ , _metOptions = Nothing
3570+ , _metSyntax = Nothing
3571+ }
3572+
3573+-- | If true, the request is streamed.
3574+metRequestStreaming :: Lens' Method (Maybe Bool)
3575+metRequestStreaming
3576+ = lens _metRequestStreaming
3577+ (\ s a -> s{_metRequestStreaming = a})
3578+
3579+-- | The URL of the output message type.
3580+metResponseTypeURL :: Lens' Method (Maybe Text)
3581+metResponseTypeURL
3582+ = lens _metResponseTypeURL
3583+ (\ s a -> s{_metResponseTypeURL = a})
3584+
3585+-- | The simple name of this method.
3586+metName :: Lens' Method (Maybe Text)
3587+metName = lens _metName (\ s a -> s{_metName = a})
3588+
3589+-- | If true, the response is streamed.
3590+metResponseStreaming :: Lens' Method (Maybe Bool)
3591+metResponseStreaming
3592+ = lens _metResponseStreaming
3593+ (\ s a -> s{_metResponseStreaming = a})
3594+
3595+-- | A URL of the input message type.
3596+metRequestTypeURL :: Lens' Method (Maybe Text)
3597+metRequestTypeURL
3598+ = lens _metRequestTypeURL
3599+ (\ s a -> s{_metRequestTypeURL = a})
3600+
3601+-- | Any metadata attached to the method.
3602+metOptions :: Lens' Method [Option]
3603+metOptions
3604+ = lens _metOptions (\ s a -> s{_metOptions = a}) .
3605+ _Default
3606+ . _Coerce
3607+
3608+-- | The source syntax of this method.
3609+metSyntax :: Lens' Method (Maybe MethodSyntax)
3610+metSyntax
3611+ = lens _metSyntax (\ s a -> s{_metSyntax = a})
3612+
3613+instance FromJSON Method where
3614+ parseJSON
3615+ = withObject "Method"
3616+ (\ o ->
3617+ Method' <$>
3618+ (o .:? "requestStreaming") <*>
3619+ (o .:? "responseTypeUrl")
3620+ <*> (o .:? "name")
3621+ <*> (o .:? "responseStreaming")
3622+ <*> (o .:? "requestTypeUrl")
3623+ <*> (o .:? "options" .!= mempty)
3624+ <*> (o .:? "syntax"))
3625+
3626+instance ToJSON Method where
3627+ toJSON Method'{..}
3628+ = object
3629+ (catMaybes
3630+ [("requestStreaming" .=) <$> _metRequestStreaming,
3631+ ("responseTypeUrl" .=) <$> _metResponseTypeURL,
3632+ ("name" .=) <$> _metName,
3633+ ("responseStreaming" .=) <$> _metResponseStreaming,
3634+ ("requestTypeUrl" .=) <$> _metRequestTypeURL,
3635+ ("options" .=) <$> _metOptions,
3636+ ("syntax" .=) <$> _metSyntax])
3637+
3638+-- | Represents a diagnostic message (error or warning)
3639+--
3640+-- /See:/ 'diagnostic' smart constructor.
3641+data Diagnostic = Diagnostic'
3642+ { _dLocation :: !(Maybe Text)
3643+ , _dKind :: !(Maybe DiagnosticKind)
3644+ , _dMessage :: !(Maybe Text)
3645+ } deriving (Eq,Show,Data,Typeable,Generic)
3646+
3647+-- | Creates a value of 'Diagnostic' with the minimum fields required to make a request.
3648+--
3649+-- Use one of the following lenses to modify other fields as desired:
3650+--
3651+-- * 'dLocation'
3652+--
3653+-- * 'dKind'
3654+--
3655+-- * 'dMessage'
3656+diagnostic
3657+ :: Diagnostic
3658+diagnostic =
3659+ Diagnostic'
3660+ { _dLocation = Nothing
3661+ , _dKind = Nothing
3662+ , _dMessage = Nothing
3663+ }
3664+
3665+-- | File name and line number of the error or warning.
3666+dLocation :: Lens' Diagnostic (Maybe Text)
3667+dLocation
3668+ = lens _dLocation (\ s a -> s{_dLocation = a})
3669+
3670+-- | The kind of diagnostic information provided.
3671+dKind :: Lens' Diagnostic (Maybe DiagnosticKind)
3672+dKind = lens _dKind (\ s a -> s{_dKind = a})
3673+
3674+-- | Message describing the error or warning.
3675+dMessage :: Lens' Diagnostic (Maybe Text)
3676+dMessage = lens _dMessage (\ s a -> s{_dMessage = a})
3677+
3678+instance FromJSON Diagnostic where
3679+ parseJSON
3680+ = withObject "Diagnostic"
3681+ (\ o ->
3682+ Diagnostic' <$>
3683+ (o .:? "location") <*> (o .:? "kind") <*>
3684+ (o .:? "message"))
3685+
3686+instance ToJSON Diagnostic where
3687+ toJSON Diagnostic'{..}
3688+ = object
3689+ (catMaybes
3690+ [("location" .=) <$> _dLocation,
3691+ ("kind" .=) <$> _dKind,
3692+ ("message" .=) <$> _dMessage])
3693+
3694+-- | ### System parameter configuration A system parameter is a special kind
3695+-- of parameter defined by the API system, not by an individual API. It is
3696+-- typically mapped to an HTTP header and\/or a URL query parameter. This
3697+-- configuration specifies which methods change the names of the system
3698+-- parameters.
3699+--
3700+-- /See:/ 'systemParameters' smart constructor.
3701+newtype SystemParameters = SystemParameters'
3702+ { _spRules :: Maybe [SystemParameterRule]
3703+ } deriving (Eq,Show,Data,Typeable,Generic)
3704+
3705+-- | Creates a value of 'SystemParameters' with the minimum fields required to make a request.
3706+--
3707+-- Use one of the following lenses to modify other fields as desired:
3708+--
3709+-- * 'spRules'
3710+systemParameters
3711+ :: SystemParameters
3712+systemParameters =
3713+ SystemParameters'
3714+ { _spRules = Nothing
3715+ }
3716+
3717+-- | Define system parameters. The parameters defined here will override the
3718+-- default parameters implemented by the system. If this field is missing
3719+-- from the service config, default system parameters will be used. Default
3720+-- system parameters and names is implementation-dependent. Example: define
3721+-- api key and alt name for all methods system_parameters rules: -
3722+-- selector: \"*\" parameters: - name: api_key url_query_parameter: api_key
3723+-- - name: alt http_header: Response-Content-Type Example: define 2 api key
3724+-- names for a specific method. system_parameters rules: - selector:
3725+-- \"\/ListShelves\" parameters: - name: api_key http_header: Api-Key1 -
3726+-- name: api_key http_header: Api-Key2 **NOTE:** All service configuration
3727+-- rules follow \"last one wins\" order.
3728+spRules :: Lens' SystemParameters [SystemParameterRule]
3729+spRules
3730+ = lens _spRules (\ s a -> s{_spRules = a}) . _Default
3731+ . _Coerce
3732+
3733+instance FromJSON SystemParameters where
3734+ parseJSON
3735+ = withObject "SystemParameters"
3736+ (\ o ->
3737+ SystemParameters' <$> (o .:? "rules" .!= mempty))
3738+
3739+instance ToJSON SystemParameters where
3740+ toJSON SystemParameters'{..}
3741+ = object (catMaybes [("rules" .=) <$> _spRules])
3742+
3743+-- | Represents a source file which is used to generate the service
3744+-- configuration defined by \`google.api.Service\`.
3745+--
3746+-- /See:/ 'configSource' smart constructor.
3747+data ConfigSource = ConfigSource'
3748+ { _csFiles :: !(Maybe [ConfigFile])
3749+ , _csId :: !(Maybe Text)
3750+ } deriving (Eq,Show,Data,Typeable,Generic)
3751+
3752+-- | Creates a value of 'ConfigSource' with the minimum fields required to make a request.
3753+--
3754+-- Use one of the following lenses to modify other fields as desired:
3755+--
3756+-- * 'csFiles'
3757+--
3758+-- * 'csId'
3759+configSource
3760+ :: ConfigSource
3761+configSource =
3762+ ConfigSource'
3763+ { _csFiles = Nothing
3764+ , _csId = Nothing
3765+ }
3766+
3767+-- | Set of source configuration files that are used to generate a service
3768+-- configuration (\`google.api.Service\`).
3769+csFiles :: Lens' ConfigSource [ConfigFile]
3770+csFiles
3771+ = lens _csFiles (\ s a -> s{_csFiles = a}) . _Default
3772+ . _Coerce
3773+
3774+-- | A unique ID for a specific instance of this message, typically assigned
3775+-- by the client for tracking purpose. If empty, the server may choose to
3776+-- generate one instead.
3777+csId :: Lens' ConfigSource (Maybe Text)
3778+csId = lens _csId (\ s a -> s{_csId = a})
3779+
3780+instance FromJSON ConfigSource where
3781+ parseJSON
3782+ = withObject "ConfigSource"
3783+ (\ o ->
3784+ ConfigSource' <$>
3785+ (o .:? "files" .!= mempty) <*> (o .:? "id"))
3786+
3787+instance ToJSON ConfigSource where
3788+ toJSON ConfigSource'{..}
3789+ = object
3790+ (catMaybes
3791+ [("files" .=) <$> _csFiles, ("id" .=) <$> _csId])
3792+
3793+-- | \`Documentation\` provides the information for describing a service.
3794+-- Example:
3795+--
3796+-- > documentation:
3797+-- > summary: >
3798+-- > The Google Calendar API gives access
3799+-- > to most calendar features.
3800+-- > pages:
3801+-- > - name: Overview
3802+-- > content: (== include google/foo/overview.md ==)
3803+-- > - name: Tutorial
3804+-- > content: (== include google/foo/tutorial.md ==)
3805+-- > subpages;
3806+-- > - name: Java
3807+-- > content: (== include google/foo/tutorial_java.md ==)
3808+-- > rules:
3809+-- > - selector: google.calendar.Calendar.Get
3810+-- > description: >
3811+-- > ...
3812+-- > - selector: google.calendar.Calendar.Put
3813+-- > description: >
3814+-- > ...
3815+--
3816+-- Documentation is provided in markdown syntax. In addition to standard
3817+-- markdown features, definition lists, tables and fenced code blocks are
3818+-- supported. Section headers can be provided and are interpreted relative
3819+-- to the section nesting of the context where a documentation fragment is
3820+-- embedded. Documentation from the IDL is merged with documentation
3821+-- defined via the config at normalization time, where documentation
3822+-- provided by config rules overrides IDL provided. A number of constructs
3823+-- specific to the API platform are supported in documentation text. In
3824+-- order to reference a proto element, the following notation can be used:
3825+--
3826+-- > [fully.qualified.proto.name][]
3827+--
3828+-- To override the display text used for the link, this can be used:
3829+--
3830+-- > [display text][fully.qualified.proto.name]
3831+--
3832+-- Text can be excluded from doc using the following notation:
3833+--
3834+-- > (-- internal comment --)
3835+--
3836+-- Comments can be made conditional using a visibility label. The below
3837+-- text will be only rendered if the \`BETA\` label is available:
3838+--
3839+-- > (--BETA: comment for BETA users --)
3840+--
3841+-- A few directives are available in documentation. Note that directives
3842+-- must appear on a single line to be properly identified. The \`include\`
3843+-- directive includes a markdown file from an external source:
3844+--
3845+-- > (== include path/to/file ==)
3846+--
3847+-- The \`resource_for\` directive marks a message to be the resource of a
3848+-- collection in REST view. If it is not specified, tools attempt to infer
3849+-- the resource from the operations in a collection:
3850+--
3851+-- > (== resource_for v1.shelves.books ==)
3852+--
3853+-- The directive \`suppress_warning\` does not directly affect
3854+-- documentation and is documented together with service config validation.
3855+--
3856+-- /See:/ 'documentation' smart constructor.
3857+data Documentation = Documentation'
3858+ { _dSummary :: !(Maybe Text)
3859+ , _dDocumentationRootURL :: !(Maybe Text)
3860+ , _dRules :: !(Maybe [DocumentationRule])
3861+ , _dPages :: !(Maybe [Page])
3862+ , _dOverview :: !(Maybe Text)
3863+ } deriving (Eq,Show,Data,Typeable,Generic)
3864+
3865+-- | Creates a value of 'Documentation' with the minimum fields required to make a request.
3866+--
3867+-- Use one of the following lenses to modify other fields as desired:
3868+--
3869+-- * 'dSummary'
3870+--
3871+-- * 'dDocumentationRootURL'
3872+--
3873+-- * 'dRules'
3874+--
3875+-- * 'dPages'
3876+--
3877+-- * 'dOverview'
3878+documentation
3879+ :: Documentation
3880+documentation =
3881+ Documentation'
3882+ { _dSummary = Nothing
3883+ , _dDocumentationRootURL = Nothing
3884+ , _dRules = Nothing
3885+ , _dPages = Nothing
3886+ , _dOverview = Nothing
3887+ }
3888+
3889+-- | A short summary of what the service does. Can only be provided by plain
3890+-- text.
3891+dSummary :: Lens' Documentation (Maybe Text)
3892+dSummary = lens _dSummary (\ s a -> s{_dSummary = a})
3893+
3894+-- | The URL to the root of documentation.
3895+dDocumentationRootURL :: Lens' Documentation (Maybe Text)
3896+dDocumentationRootURL
3897+ = lens _dDocumentationRootURL
3898+ (\ s a -> s{_dDocumentationRootURL = a})
3899+
3900+-- | A list of documentation rules that apply to individual API elements.
3901+-- **NOTE:** All service configuration rules follow \"last one wins\"
3902+-- order.
3903+dRules :: Lens' Documentation [DocumentationRule]
3904+dRules
3905+ = lens _dRules (\ s a -> s{_dRules = a}) . _Default .
3906+ _Coerce
3907+
3908+-- | The top level pages for the documentation set.
3909+dPages :: Lens' Documentation [Page]
3910+dPages
3911+ = lens _dPages (\ s a -> s{_dPages = a}) . _Default .
3912+ _Coerce
3913+
3914+-- | Declares a single overview page. For example:
3915+--
3916+-- > documentation:
3917+-- > summary: ...
3918+-- > overview: (== include overview.md ==)
3919+--
3920+-- This is a shortcut for the following declaration (using pages style):
3921+--
3922+-- > documentation:
3923+-- > summary: ...
3924+-- > pages:
3925+-- > - name: Overview
3926+-- > content: (== include overview.md ==)
3927+--
3928+-- Note: you cannot specify both \`overview\` field and \`pages\` field.
3929+dOverview :: Lens' Documentation (Maybe Text)
3930+dOverview
3931+ = lens _dOverview (\ s a -> s{_dOverview = a})
3932+
3933+instance FromJSON Documentation where
3934+ parseJSON
3935+ = withObject "Documentation"
3936+ (\ o ->
3937+ Documentation' <$>
3938+ (o .:? "summary") <*> (o .:? "documentationRootUrl")
3939+ <*> (o .:? "rules" .!= mempty)
3940+ <*> (o .:? "pages" .!= mempty)
3941+ <*> (o .:? "overview"))
3942+
3943+instance ToJSON Documentation where
3944+ toJSON Documentation'{..}
3945+ = object
3946+ (catMaybes
3947+ [("summary" .=) <$> _dSummary,
3948+ ("documentationRootUrl" .=) <$>
3949+ _dDocumentationRootURL,
3950+ ("rules" .=) <$> _dRules, ("pages" .=) <$> _dPages,
3951+ ("overview" .=) <$> _dOverview])
3952+
3953+-- | Represents the status of one operation step.
3954+--
3955+-- /See:/ 'step' smart constructor.
3956+data Step = Step'
3957+ { _sStatus :: !(Maybe StepStatus)
3958+ , _sDescription :: !(Maybe Text)
3959+ } deriving (Eq,Show,Data,Typeable,Generic)
3960+
3961+-- | Creates a value of 'Step' with the minimum fields required to make a request.
3962+--
3963+-- Use one of the following lenses to modify other fields as desired:
3964+--
3965+-- * 'sStatus'
3966+--
3967+-- * 'sDescription'
3968+step
3969+ :: Step
3970+step =
3971+ Step'
3972+ { _sStatus = Nothing
3973+ , _sDescription = Nothing
3974+ }
3975+
3976+-- | The status code.
3977+sStatus :: Lens' Step (Maybe StepStatus)
3978+sStatus = lens _sStatus (\ s a -> s{_sStatus = a})
3979+
3980+-- | The short description of the step.
3981+sDescription :: Lens' Step (Maybe Text)
3982+sDescription
3983+ = lens _sDescription (\ s a -> s{_sDescription = a})
3984+
3985+instance FromJSON Step where
3986+ parseJSON
3987+ = withObject "Step"
3988+ (\ o ->
3989+ Step' <$> (o .:? "status") <*> (o .:? "description"))
3990+
3991+instance ToJSON Step where
3992+ toJSON Step'{..}
3993+ = object
3994+ (catMaybes
3995+ [("status" .=) <$> _sStatus,
3996+ ("description" .=) <$> _sDescription])
3997+
3998+-- | Configuration of a specific analytics destination.
3999+--
4000+-- /See:/ 'analyticsDestination' smart constructor.
4001+data AnalyticsDestination = AnalyticsDestination'
4002+ { _adMetrics :: !(Maybe [Text])
4003+ , _adMonitoredResource :: !(Maybe Text)
4004+ } deriving (Eq,Show,Data,Typeable,Generic)
4005+
4006+-- | Creates a value of 'AnalyticsDestination' with the minimum fields required to make a request.
4007+--
4008+-- Use one of the following lenses to modify other fields as desired:
4009+--
4010+-- * 'adMetrics'
4011+--
4012+-- * 'adMonitoredResource'
4013+analyticsDestination
4014+ :: AnalyticsDestination
4015+analyticsDestination =
4016+ AnalyticsDestination'
4017+ { _adMetrics = Nothing
4018+ , _adMonitoredResource = Nothing
4019+ }
4020+
4021+-- | Names of the metrics to report to this analytics destination. Each name
4022+-- must be defined in Service.metrics section. Metrics with value type BOOL
4023+-- and STRING must be of GUAGE kind, metrics with value type INT64, DOUBLE
4024+-- and MONEY must be of DELTA kind.
4025+adMetrics :: Lens' AnalyticsDestination [Text]
4026+adMetrics
4027+ = lens _adMetrics (\ s a -> s{_adMetrics = a}) .
4028+ _Default
4029+ . _Coerce
4030+
4031+-- | The monitored resource type. The type must be defined in
4032+-- Service.monitored_resources section.
4033+adMonitoredResource :: Lens' AnalyticsDestination (Maybe Text)
4034+adMonitoredResource
4035+ = lens _adMonitoredResource
4036+ (\ s a -> s{_adMonitoredResource = a})
4037+
4038+instance FromJSON AnalyticsDestination where
4039+ parseJSON
4040+ = withObject "AnalyticsDestination"
4041+ (\ o ->
4042+ AnalyticsDestination' <$>
4043+ (o .:? "metrics" .!= mempty) <*>
4044+ (o .:? "monitoredResource"))
4045+
4046+instance ToJSON AnalyticsDestination where
4047+ toJSON AnalyticsDestination'{..}
4048+ = object
4049+ (catMaybes
4050+ [("metrics" .=) <$> _adMetrics,
4051+ ("monitoredResource" .=) <$> _adMonitoredResource])
4052+
4053+-- | Request message for \`TestIamPermissions\` method.
4054+--
4055+-- /See:/ 'testIAMPermissionsRequest' smart constructor.
4056+newtype TestIAMPermissionsRequest = TestIAMPermissionsRequest'
4057+ { _tiprPermissions :: Maybe [Text]
4058+ } deriving (Eq,Show,Data,Typeable,Generic)
4059+
4060+-- | Creates a value of 'TestIAMPermissionsRequest' with the minimum fields required to make a request.
4061+--
4062+-- Use one of the following lenses to modify other fields as desired:
4063+--
4064+-- * 'tiprPermissions'
4065+testIAMPermissionsRequest
4066+ :: TestIAMPermissionsRequest
4067+testIAMPermissionsRequest =
4068+ TestIAMPermissionsRequest'
4069+ { _tiprPermissions = Nothing
4070+ }
4071+
4072+-- | The set of permissions to check for the \`resource\`. Permissions with
4073+-- wildcards (such as \'*\' or \'storage.*\') are not allowed. For more
4074+-- information see [IAM
4075+-- Overview](https:\/\/cloud.google.com\/iam\/docs\/overview#permissions).
4076+tiprPermissions :: Lens' TestIAMPermissionsRequest [Text]
4077+tiprPermissions
4078+ = lens _tiprPermissions
4079+ (\ s a -> s{_tiprPermissions = a})
4080+ . _Default
4081+ . _Coerce
4082+
4083+instance FromJSON TestIAMPermissionsRequest where
4084+ parseJSON
4085+ = withObject "TestIAMPermissionsRequest"
4086+ (\ o ->
4087+ TestIAMPermissionsRequest' <$>
4088+ (o .:? "permissions" .!= mempty))
4089+
4090+instance ToJSON TestIAMPermissionsRequest where
4091+ toJSON TestIAMPermissionsRequest'{..}
4092+ = object
4093+ (catMaybes [("permissions" .=) <$> _tiprPermissions])
4094+
4095+-- | Define a system parameter rule mapping system parameter definitions to
4096+-- methods.
4097+--
4098+-- /See:/ 'systemParameterRule' smart constructor.
4099+data SystemParameterRule = SystemParameterRule'
4100+ { _sprSelector :: !(Maybe Text)
4101+ , _sprParameters :: !(Maybe [SystemParameter])
4102+ } deriving (Eq,Show,Data,Typeable,Generic)
4103+
4104+-- | Creates a value of 'SystemParameterRule' with the minimum fields required to make a request.
4105+--
4106+-- Use one of the following lenses to modify other fields as desired:
4107+--
4108+-- * 'sprSelector'
4109+--
4110+-- * 'sprParameters'
4111+systemParameterRule
4112+ :: SystemParameterRule
4113+systemParameterRule =
4114+ SystemParameterRule'
4115+ { _sprSelector = Nothing
4116+ , _sprParameters = Nothing
4117+ }
4118+
4119+-- | Selects the methods to which this rule applies. Use \'*\' to indicate
4120+-- all methods in all APIs. Refer to selector for syntax details.
4121+sprSelector :: Lens' SystemParameterRule (Maybe Text)
4122+sprSelector
4123+ = lens _sprSelector (\ s a -> s{_sprSelector = a})
4124+
4125+-- | Define parameters. Multiple names may be defined for a parameter. For a
4126+-- given method call, only one of them should be used. If multiple names
4127+-- are used the behavior is implementation-dependent. If none of the
4128+-- specified names are present the behavior is parameter-dependent.
4129+sprParameters :: Lens' SystemParameterRule [SystemParameter]
4130+sprParameters
4131+ = lens _sprParameters
4132+ (\ s a -> s{_sprParameters = a})
4133+ . _Default
4134+ . _Coerce
4135+
4136+instance FromJSON SystemParameterRule where
4137+ parseJSON
4138+ = withObject "SystemParameterRule"
4139+ (\ o ->
4140+ SystemParameterRule' <$>
4141+ (o .:? "selector") <*>
4142+ (o .:? "parameters" .!= mempty))
4143+
4144+instance ToJSON SystemParameterRule where
4145+ toJSON SystemParameterRule'{..}
4146+ = object
4147+ (catMaybes
4148+ [("selector" .=) <$> _sprSelector,
4149+ ("parameters" .=) <$> _sprParameters])
4150+
4151+-- | A description of a label.
4152+--
4153+-- /See:/ 'labelDescriptor' smart constructor.
4154+data LabelDescriptor = LabelDescriptor'
4155+ { _lKey :: !(Maybe Text)
4156+ , _lValueType :: !(Maybe LabelDescriptorValueType)
4157+ , _lDescription :: !(Maybe Text)
4158+ } deriving (Eq,Show,Data,Typeable,Generic)
4159+
4160+-- | Creates a value of 'LabelDescriptor' with the minimum fields required to make a request.
4161+--
4162+-- Use one of the following lenses to modify other fields as desired:
4163+--
4164+-- * 'lKey'
4165+--
4166+-- * 'lValueType'
4167+--
4168+-- * 'lDescription'
4169+labelDescriptor
4170+ :: LabelDescriptor
4171+labelDescriptor =
4172+ LabelDescriptor'
4173+ { _lKey = Nothing
4174+ , _lValueType = Nothing
4175+ , _lDescription = Nothing
4176+ }
4177+
4178+-- | The label key.
4179+lKey :: Lens' LabelDescriptor (Maybe Text)
4180+lKey = lens _lKey (\ s a -> s{_lKey = a})
4181+
4182+-- | The type of data that can be assigned to the label.
4183+lValueType :: Lens' LabelDescriptor (Maybe LabelDescriptorValueType)
4184+lValueType
4185+ = lens _lValueType (\ s a -> s{_lValueType = a})
4186+
4187+-- | A human-readable description for the label.
4188+lDescription :: Lens' LabelDescriptor (Maybe Text)
4189+lDescription
4190+ = lens _lDescription (\ s a -> s{_lDescription = a})
4191+
4192+instance FromJSON LabelDescriptor where
4193+ parseJSON
4194+ = withObject "LabelDescriptor"
4195+ (\ o ->
4196+ LabelDescriptor' <$>
4197+ (o .:? "key") <*> (o .:? "valueType") <*>
4198+ (o .:? "description"))
4199+
4200+instance ToJSON LabelDescriptor where
4201+ toJSON LabelDescriptor'{..}
4202+ = object
4203+ (catMaybes
4204+ [("key" .=) <$> _lKey,
4205+ ("valueType" .=) <$> _lValueType,
4206+ ("description" .=) <$> _lDescription])
4207+
4208+-- | Configuration controlling usage of a service.
4209+--
4210+-- /See:/ 'usage' smart constructor.
4211+data Usage = Usage'
4212+ { _uRequirements :: !(Maybe [Text])
4213+ , _uRules :: !(Maybe [UsageRule])
4214+ } deriving (Eq,Show,Data,Typeable,Generic)
4215+
4216+-- | Creates a value of 'Usage' with the minimum fields required to make a request.
4217+--
4218+-- Use one of the following lenses to modify other fields as desired:
4219+--
4220+-- * 'uRequirements'
4221+--
4222+-- * 'uRules'
4223+usage
4224+ :: Usage
4225+usage =
4226+ Usage'
4227+ { _uRequirements = Nothing
4228+ , _uRules = Nothing
4229+ }
4230+
4231+-- | Requirements that must be satisfied before a consumer project can use
4232+-- the service. Each requirement is of the form \/; for example
4233+-- \'serviceusage.googleapis.com\/billing-enabled\'.
4234+uRequirements :: Lens' Usage [Text]
4235+uRequirements
4236+ = lens _uRequirements
4237+ (\ s a -> s{_uRequirements = a})
4238+ . _Default
4239+ . _Coerce
4240+
4241+-- | A list of usage rules that apply to individual API methods. **NOTE:**
4242+-- All service configuration rules follow \"last one wins\" order.
4243+uRules :: Lens' Usage [UsageRule]
4244+uRules
4245+ = lens _uRules (\ s a -> s{_uRules = a}) . _Default .
4246+ _Coerce
4247+
4248+instance FromJSON Usage where
4249+ parseJSON
4250+ = withObject "Usage"
4251+ (\ o ->
4252+ Usage' <$>
4253+ (o .:? "requirements" .!= mempty) <*>
4254+ (o .:? "rules" .!= mempty))
4255+
4256+instance ToJSON Usage where
4257+ toJSON Usage'{..}
4258+ = object
4259+ (catMaybes
4260+ [("requirements" .=) <$> _uRequirements,
4261+ ("rules" .=) <$> _uRules])
4262+
4263+-- | Response message for \`TestIamPermissions\` method.
4264+--
4265+-- /See:/ 'testIAMPermissionsResponse' smart constructor.
4266+newtype TestIAMPermissionsResponse = TestIAMPermissionsResponse'
4267+ { _tiamprPermissions :: Maybe [Text]
4268+ } deriving (Eq,Show,Data,Typeable,Generic)
4269+
4270+-- | Creates a value of 'TestIAMPermissionsResponse' with the minimum fields required to make a request.
4271+--
4272+-- Use one of the following lenses to modify other fields as desired:
4273+--
4274+-- * 'tiamprPermissions'
4275+testIAMPermissionsResponse
4276+ :: TestIAMPermissionsResponse
4277+testIAMPermissionsResponse =
4278+ TestIAMPermissionsResponse'
4279+ { _tiamprPermissions = Nothing
4280+ }
4281+
4282+-- | A subset of \`TestPermissionsRequest.permissions\` that the caller is
4283+-- allowed.
4284+tiamprPermissions :: Lens' TestIAMPermissionsResponse [Text]
4285+tiamprPermissions
4286+ = lens _tiamprPermissions
4287+ (\ s a -> s{_tiamprPermissions = a})
4288+ . _Default
4289+ . _Coerce
4290+
4291+instance FromJSON TestIAMPermissionsResponse where
4292+ parseJSON
4293+ = withObject "TestIAMPermissionsResponse"
4294+ (\ o ->
4295+ TestIAMPermissionsResponse' <$>
4296+ (o .:? "permissions" .!= mempty))
4297+
4298+instance ToJSON TestIAMPermissionsResponse where
4299+ toJSON TestIAMPermissionsResponse'{..}
4300+ = object
4301+ (catMaybes
4302+ [("permissions" .=) <$> _tiamprPermissions])
4303+
4304+-- | Service configuration for which we want to generate the report. For this
4305+-- version of API, the supported types are
4306+-- google.api.servicemanagement.v1.ConfigRef,
4307+-- google.api.servicemanagement.v1.ConfigSource, and google.api.Service
4308+--
4309+-- /See:/ 'generateConfigReportRequestNewConfig' smart constructor.
4310+newtype GenerateConfigReportRequestNewConfig = GenerateConfigReportRequestNewConfig'
4311+ { _gcrrncAddtional :: HashMap Text JSONValue
4312+ } deriving (Eq,Show,Data,Typeable,Generic)
4313+
4314+-- | Creates a value of 'GenerateConfigReportRequestNewConfig' with the minimum fields required to make a request.
4315+--
4316+-- Use one of the following lenses to modify other fields as desired:
4317+--
4318+-- * 'gcrrncAddtional'
4319+generateConfigReportRequestNewConfig
4320+ :: HashMap Text JSONValue -- ^ 'gcrrncAddtional'
4321+ -> GenerateConfigReportRequestNewConfig
4322+generateConfigReportRequestNewConfig pGcrrncAddtional_ =
4323+ GenerateConfigReportRequestNewConfig'
4324+ { _gcrrncAddtional = _Coerce # pGcrrncAddtional_
4325+ }
4326+
4327+-- | Properties of the object. Contains field \'type with type URL.
4328+gcrrncAddtional :: Lens' GenerateConfigReportRequestNewConfig (HashMap Text JSONValue)
4329+gcrrncAddtional
4330+ = lens _gcrrncAddtional
4331+ (\ s a -> s{_gcrrncAddtional = a})
4332+ . _Coerce
4333+
4334+instance FromJSON
4335+ GenerateConfigReportRequestNewConfig where
4336+ parseJSON
4337+ = withObject "GenerateConfigReportRequestNewConfig"
4338+ (\ o ->
4339+ GenerateConfigReportRequestNewConfig' <$>
4340+ (parseJSONObject o))
4341+
4342+instance ToJSON GenerateConfigReportRequestNewConfig
4343+ where
4344+ toJSON = toJSON . _gcrrncAddtional
4345+
4346+-- | Defines the HTTP configuration for a service. It contains a list of
4347+-- HttpRule, each specifying the mapping of an RPC method to one or more
4348+-- HTTP REST API methods.
4349+--
4350+-- /See:/ 'hTTP' smart constructor.
4351+newtype HTTP = HTTP'
4352+ { _hRules :: Maybe [HTTPRule]
4353+ } deriving (Eq,Show,Data,Typeable,Generic)
4354+
4355+-- | Creates a value of 'HTTP' with the minimum fields required to make a request.
4356+--
4357+-- Use one of the following lenses to modify other fields as desired:
4358+--
4359+-- * 'hRules'
4360+hTTP
4361+ :: HTTP
4362+hTTP =
4363+ HTTP'
4364+ { _hRules = Nothing
4365+ }
4366+
4367+-- | A list of HTTP configuration rules that apply to individual API methods.
4368+-- **NOTE:** All service configuration rules follow \"last one wins\"
4369+-- order.
4370+hRules :: Lens' HTTP [HTTPRule]
4371+hRules
4372+ = lens _hRules (\ s a -> s{_hRules = a}) . _Default .
4373+ _Coerce
4374+
4375+instance FromJSON HTTP where
4376+ parseJSON
4377+ = withObject "HTTP"
4378+ (\ o -> HTTP' <$> (o .:? "rules" .!= mempty))
4379+
4380+instance ToJSON HTTP where
4381+ toJSON HTTP'{..}
4382+ = object (catMaybes [("rules" .=) <$> _hRules])
4383+
4384+-- | Request message for DisableService method.
4385+--
4386+-- /See:/ 'disableServiceRequest' smart constructor.
4387+newtype DisableServiceRequest = DisableServiceRequest'
4388+ { _dsrConsumerId :: Maybe Text
4389+ } deriving (Eq,Show,Data,Typeable,Generic)
4390+
4391+-- | Creates a value of 'DisableServiceRequest' with the minimum fields required to make a request.
4392+--
4393+-- Use one of the following lenses to modify other fields as desired:
4394+--
4395+-- * 'dsrConsumerId'
4396+disableServiceRequest
4397+ :: DisableServiceRequest
4398+disableServiceRequest =
4399+ DisableServiceRequest'
4400+ { _dsrConsumerId = Nothing
4401+ }
4402+
4403+-- | The identity of consumer resource which service disablement will be
4404+-- applied to. The Google Service Management implementation accepts the
4405+-- following forms: \"project:\", \"project_number:\". Note: this is made
4406+-- compatible with google.api.servicecontrol.v1.Operation.consumer_id.
4407+dsrConsumerId :: Lens' DisableServiceRequest (Maybe Text)
4408+dsrConsumerId
4409+ = lens _dsrConsumerId
4410+ (\ s a -> s{_dsrConsumerId = a})
4411+
4412+instance FromJSON DisableServiceRequest where
4413+ parseJSON
4414+ = withObject "DisableServiceRequest"
4415+ (\ o ->
4416+ DisableServiceRequest' <$> (o .:? "consumerId"))
4417+
4418+instance ToJSON DisableServiceRequest where
4419+ toJSON DisableServiceRequest'{..}
4420+ = object
4421+ (catMaybes [("consumerId" .=) <$> _dsrConsumerId])
4422+
4423+-- | Defines an Identity and Access Management (IAM) policy. It is used to
4424+-- specify access control policies for Cloud Platform resources. A
4425+-- \`Policy\` consists of a list of \`bindings\`. A \`Binding\` binds a
4426+-- list of \`members\` to a \`role\`, where the members can be user
4427+-- accounts, Google groups, Google domains, and service accounts. A
4428+-- \`role\` is a named list of permissions defined by IAM. **Example** {
4429+-- \"bindings\": [ { \"role\": \"roles\/owner\", \"members\": [
4430+-- \"user:mike\'example.com\", \"group:admins\'example.com\",
4431+-- \"domain:google.com\",
4432+-- \"serviceAccount:my-other-app\'appspot.gserviceaccount.com\", ] }, {
4433+-- \"role\": \"roles\/viewer\", \"members\": [\"user:sean\'example.com\"] }
4434+-- ] } For a description of IAM and its features, see the [IAM developer\'s
4435+-- guide](https:\/\/cloud.google.com\/iam).
4436+--
4437+-- /See:/ 'policy' smart constructor.
4438+data Policy = Policy'
4439+ { _pAuditConfigs :: !(Maybe [AuditConfig])
4440+ , _pEtag :: !(Maybe Base64)
4441+ , _pRules :: !(Maybe [Rule])
4442+ , _pVersion :: !(Maybe (Textual Int32))
4443+ , _pBindings :: !(Maybe [Binding])
4444+ , _pIAMOwned :: !(Maybe Bool)
4445+ } deriving (Eq,Show,Data,Typeable,Generic)
4446+
4447+-- | Creates a value of 'Policy' with the minimum fields required to make a request.
4448+--
4449+-- Use one of the following lenses to modify other fields as desired:
4450+--
4451+-- * 'pAuditConfigs'
4452+--
4453+-- * 'pEtag'
4454+--
4455+-- * 'pRules'
4456+--
4457+-- * 'pVersion'
4458+--
4459+-- * 'pBindings'
4460+--
4461+-- * 'pIAMOwned'
4462+policy
4463+ :: Policy
4464+policy =
4465+ Policy'
4466+ { _pAuditConfigs = Nothing
4467+ , _pEtag = Nothing
4468+ , _pRules = Nothing
4469+ , _pVersion = Nothing
4470+ , _pBindings = Nothing
4471+ , _pIAMOwned = Nothing
4472+ }
4473+
4474+-- | Specifies audit logging configs for \"data access\". \"data access\":
4475+-- generally refers to data reads\/writes and admin reads. \"admin
4476+-- activity\": generally refers to admin writes. Note: \`AuditConfig\`
4477+-- doesn\'t apply to \"admin activity\", which always enables audit
4478+-- logging.
4479+pAuditConfigs :: Lens' Policy [AuditConfig]
4480+pAuditConfigs
4481+ = lens _pAuditConfigs
4482+ (\ s a -> s{_pAuditConfigs = a})
4483+ . _Default
4484+ . _Coerce
4485+
4486+-- | \`etag\` is used for optimistic concurrency control as a way to help
4487+-- prevent simultaneous updates of a policy from overwriting each other. It
4488+-- is strongly suggested that systems make use of the \`etag\` in the
4489+-- read-modify-write cycle to perform policy updates in order to avoid race
4490+-- conditions: An \`etag\` is returned in the response to \`getIamPolicy\`,
4491+-- and systems are expected to put that etag in the request to
4492+-- \`setIamPolicy\` to ensure that their change will be applied to the same
4493+-- version of the policy. If no \`etag\` is provided in the call to
4494+-- \`setIamPolicy\`, then the existing policy is overwritten blindly.
4495+pEtag :: Lens' Policy (Maybe ByteString)
4496+pEtag
4497+ = lens _pEtag (\ s a -> s{_pEtag = a}) .
4498+ mapping _Base64
4499+
4500+-- | If more than one rule is specified, the rules are applied in the
4501+-- following manner: - All matching LOG rules are always applied. - If any
4502+-- DENY\/DENY_WITH_LOG rule matches, permission is denied. Logging will be
4503+-- applied if one or more matching rule requires logging. - Otherwise, if
4504+-- any ALLOW\/ALLOW_WITH_LOG rule matches, permission is granted. Logging
4505+-- will be applied if one or more matching rule requires logging. -
4506+-- Otherwise, if no rule applies, permission is denied.
4507+pRules :: Lens' Policy [Rule]
4508+pRules
4509+ = lens _pRules (\ s a -> s{_pRules = a}) . _Default .
4510+ _Coerce
4511+
4512+-- | Version of the \`Policy\`. The default version is 0.
4513+pVersion :: Lens' Policy (Maybe Int32)
4514+pVersion
4515+ = lens _pVersion (\ s a -> s{_pVersion = a}) .
4516+ mapping _Coerce
4517+
4518+-- | Associates a list of \`members\` to a \`role\`. Multiple \`bindings\`
4519+-- must not be specified for the same \`role\`. \`bindings\` with no
4520+-- members will result in an error.
4521+pBindings :: Lens' Policy [Binding]
4522+pBindings
4523+ = lens _pBindings (\ s a -> s{_pBindings = a}) .
4524+ _Default
4525+ . _Coerce
4526+
4527+pIAMOwned :: Lens' Policy (Maybe Bool)
4528+pIAMOwned
4529+ = lens _pIAMOwned (\ s a -> s{_pIAMOwned = a})
4530+
4531+instance FromJSON Policy where
4532+ parseJSON
4533+ = withObject "Policy"
4534+ (\ o ->
4535+ Policy' <$>
4536+ (o .:? "auditConfigs" .!= mempty) <*> (o .:? "etag")
4537+ <*> (o .:? "rules" .!= mempty)
4538+ <*> (o .:? "version")
4539+ <*> (o .:? "bindings" .!= mempty)
4540+ <*> (o .:? "iamOwned"))
4541+
4542+instance ToJSON Policy where
4543+ toJSON Policy'{..}
4544+ = object
4545+ (catMaybes
4546+ [("auditConfigs" .=) <$> _pAuditConfigs,
4547+ ("etag" .=) <$> _pEtag, ("rules" .=) <$> _pRules,
4548+ ("version" .=) <$> _pVersion,
4549+ ("bindings" .=) <$> _pBindings,
4550+ ("iamOwned" .=) <$> _pIAMOwned])
4551+
4552+-- | A protocol buffer message type.
4553+--
4554+-- /See:/ 'type'' smart constructor.
4555+data Type = Type'
4556+ { _tSourceContext :: !(Maybe SourceContext)
4557+ , _tOneofs :: !(Maybe [Text])
4558+ , _tName :: !(Maybe Text)
4559+ , _tOptions :: !(Maybe [Option])
4560+ , _tFields :: !(Maybe [Field])
4561+ , _tSyntax :: !(Maybe TypeSyntax)
4562+ } deriving (Eq,Show,Data,Typeable,Generic)
4563+
4564+-- | Creates a value of 'Type' with the minimum fields required to make a request.
4565+--
4566+-- Use one of the following lenses to modify other fields as desired:
4567+--
4568+-- * 'tSourceContext'
4569+--
4570+-- * 'tOneofs'
4571+--
4572+-- * 'tName'
4573+--
4574+-- * 'tOptions'
4575+--
4576+-- * 'tFields'
4577+--
4578+-- * 'tSyntax'
4579+type'
4580+ :: Type
4581+type' =
4582+ Type'
4583+ { _tSourceContext = Nothing
4584+ , _tOneofs = Nothing
4585+ , _tName = Nothing
4586+ , _tOptions = Nothing
4587+ , _tFields = Nothing
4588+ , _tSyntax = Nothing
4589+ }
4590+
4591+-- | The source context.
4592+tSourceContext :: Lens' Type (Maybe SourceContext)
4593+tSourceContext
4594+ = lens _tSourceContext
4595+ (\ s a -> s{_tSourceContext = a})
4596+
4597+-- | The list of types appearing in \`oneof\` definitions in this type.
4598+tOneofs :: Lens' Type [Text]
4599+tOneofs
4600+ = lens _tOneofs (\ s a -> s{_tOneofs = a}) . _Default
4601+ . _Coerce
4602+
4603+-- | The fully qualified message name.
4604+tName :: Lens' Type (Maybe Text)
4605+tName = lens _tName (\ s a -> s{_tName = a})
4606+
4607+-- | The protocol buffer options.
4608+tOptions :: Lens' Type [Option]
4609+tOptions
4610+ = lens _tOptions (\ s a -> s{_tOptions = a}) .
4611+ _Default
4612+ . _Coerce
4613+
4614+-- | The list of fields.
4615+tFields :: Lens' Type [Field]
4616+tFields
4617+ = lens _tFields (\ s a -> s{_tFields = a}) . _Default
4618+ . _Coerce
4619+
4620+-- | The source syntax.
4621+tSyntax :: Lens' Type (Maybe TypeSyntax)
4622+tSyntax = lens _tSyntax (\ s a -> s{_tSyntax = a})
4623+
4624+instance FromJSON Type where
4625+ parseJSON
4626+ = withObject "Type"
4627+ (\ o ->
4628+ Type' <$>
4629+ (o .:? "sourceContext") <*>
4630+ (o .:? "oneofs" .!= mempty)
4631+ <*> (o .:? "name")
4632+ <*> (o .:? "options" .!= mempty)
4633+ <*> (o .:? "fields" .!= mempty)
4634+ <*> (o .:? "syntax"))
4635+
4636+instance ToJSON Type where
4637+ toJSON Type'{..}
4638+ = object
4639+ (catMaybes
4640+ [("sourceContext" .=) <$> _tSourceContext,
4641+ ("oneofs" .=) <$> _tOneofs, ("name" .=) <$> _tName,
4642+ ("options" .=) <$> _tOptions,
4643+ ("fields" .=) <$> _tFields,
4644+ ("syntax" .=) <$> _tSyntax])
4645+
4646+-- | Api is a light-weight descriptor for a protocol buffer service.
4647+--
4648+-- /See:/ 'api' smart constructor.
4649+data API = API'
4650+ { _aSourceContext :: !(Maybe SourceContext)
4651+ , _aMixins :: !(Maybe [Mixin])
4652+ , _aMethods :: !(Maybe [Method])
4653+ , _aName :: !(Maybe Text)
4654+ , _aVersion :: !(Maybe Text)
4655+ , _aOptions :: !(Maybe [Option])
4656+ , _aSyntax :: !(Maybe APISyntax)
4657+ } deriving (Eq,Show,Data,Typeable,Generic)
4658+
4659+-- | Creates a value of 'API' with the minimum fields required to make a request.
4660+--
4661+-- Use one of the following lenses to modify other fields as desired:
4662+--
4663+-- * 'aSourceContext'
4664+--
4665+-- * 'aMixins'
4666+--
4667+-- * 'aMethods'
4668+--
4669+-- * 'aName'
4670+--
4671+-- * 'aVersion'
4672+--
4673+-- * 'aOptions'
4674+--
4675+-- * 'aSyntax'
4676+api
4677+ :: API
4678+api =
4679+ API'
4680+ { _aSourceContext = Nothing
4681+ , _aMixins = Nothing
4682+ , _aMethods = Nothing
4683+ , _aName = Nothing
4684+ , _aVersion = Nothing
4685+ , _aOptions = Nothing
4686+ , _aSyntax = Nothing
4687+ }
4688+
4689+-- | Source context for the protocol buffer service represented by this
4690+-- message.
4691+aSourceContext :: Lens' API (Maybe SourceContext)
4692+aSourceContext
4693+ = lens _aSourceContext
4694+ (\ s a -> s{_aSourceContext = a})
4695+
4696+-- | Included APIs. See Mixin.
4697+aMixins :: Lens' API [Mixin]
4698+aMixins
4699+ = lens _aMixins (\ s a -> s{_aMixins = a}) . _Default
4700+ . _Coerce
4701+
4702+-- | The methods of this api, in unspecified order.
4703+aMethods :: Lens' API [Method]
4704+aMethods
4705+ = lens _aMethods (\ s a -> s{_aMethods = a}) .
4706+ _Default
4707+ . _Coerce
4708+
4709+-- | The fully qualified name of this api, including package name followed by
4710+-- the api\'s simple name.
4711+aName :: Lens' API (Maybe Text)
4712+aName = lens _aName (\ s a -> s{_aName = a})
4713+
4714+-- | A version string for this api. If specified, must have the form
4715+-- \`major-version.minor-version\`, as in \`1.10\`. If the minor version is
4716+-- omitted, it defaults to zero. If the entire version field is empty, the
4717+-- major version is derived from the package name, as outlined below. If
4718+-- the field is not empty, the version in the package name will be verified
4719+-- to be consistent with what is provided here. The versioning schema uses
4720+-- [semantic versioning](http:\/\/semver.org) where the major version
4721+-- number indicates a breaking change and the minor version an additive,
4722+-- non-breaking change. Both version numbers are signals to users what to
4723+-- expect from different versions, and should be carefully chosen based on
4724+-- the product plan. The major version is also reflected in the package
4725+-- name of the API, which must end in \`v\`, as in \`google.feature.v1\`.
4726+-- For major versions 0 and 1, the suffix can be omitted. Zero major
4727+-- versions must only be used for experimental, none-GA apis.
4728+aVersion :: Lens' API (Maybe Text)
4729+aVersion = lens _aVersion (\ s a -> s{_aVersion = a})
4730+
4731+-- | Any metadata attached to the API.
4732+aOptions :: Lens' API [Option]
4733+aOptions
4734+ = lens _aOptions (\ s a -> s{_aOptions = a}) .
4735+ _Default
4736+ . _Coerce
4737+
4738+-- | The source syntax of the service.
4739+aSyntax :: Lens' API (Maybe APISyntax)
4740+aSyntax = lens _aSyntax (\ s a -> s{_aSyntax = a})
4741+
4742+instance FromJSON API where
4743+ parseJSON
4744+ = withObject "API"
4745+ (\ o ->
4746+ API' <$>
4747+ (o .:? "sourceContext") <*>
4748+ (o .:? "mixins" .!= mempty)
4749+ <*> (o .:? "methods" .!= mempty)
4750+ <*> (o .:? "name")
4751+ <*> (o .:? "version")
4752+ <*> (o .:? "options" .!= mempty)
4753+ <*> (o .:? "syntax"))
4754+
4755+instance ToJSON API where
4756+ toJSON API'{..}
4757+ = object
4758+ (catMaybes
4759+ [("sourceContext" .=) <$> _aSourceContext,
4760+ ("mixins" .=) <$> _aMixins,
4761+ ("methods" .=) <$> _aMethods, ("name" .=) <$> _aName,
4762+ ("version" .=) <$> _aVersion,
4763+ ("options" .=) <$> _aOptions,
4764+ ("syntax" .=) <$> _aSyntax])
4765+
4766+-- | Configuration of a specific monitoring destination (the producer project
4767+-- or the consumer project).
4768+--
4769+-- /See:/ 'monitoringDestination' smart constructor.
4770+data MonitoringDestination = MonitoringDestination'
4771+ { _mdMetrics :: !(Maybe [Text])
4772+ , _mdMonitoredResource :: !(Maybe Text)
4773+ } deriving (Eq,Show,Data,Typeable,Generic)
4774+
4775+-- | Creates a value of 'MonitoringDestination' with the minimum fields required to make a request.
4776+--
4777+-- Use one of the following lenses to modify other fields as desired:
4778+--
4779+-- * 'mdMetrics'
4780+--
4781+-- * 'mdMonitoredResource'
4782+monitoringDestination
4783+ :: MonitoringDestination
4784+monitoringDestination =
4785+ MonitoringDestination'
4786+ { _mdMetrics = Nothing
4787+ , _mdMonitoredResource = Nothing
4788+ }
4789+
4790+-- | Names of the metrics to report to this monitoring destination. Each name
4791+-- must be defined in Service.metrics section.
4792+mdMetrics :: Lens' MonitoringDestination [Text]
4793+mdMetrics
4794+ = lens _mdMetrics (\ s a -> s{_mdMetrics = a}) .
4795+ _Default
4796+ . _Coerce
4797+
4798+-- | The monitored resource type. The type must be defined in
4799+-- Service.monitored_resources section.
4800+mdMonitoredResource :: Lens' MonitoringDestination (Maybe Text)
4801+mdMonitoredResource
4802+ = lens _mdMonitoredResource
4803+ (\ s a -> s{_mdMonitoredResource = a})
4804+
4805+instance FromJSON MonitoringDestination where
4806+ parseJSON
4807+ = withObject "MonitoringDestination"
4808+ (\ o ->
4809+ MonitoringDestination' <$>
4810+ (o .:? "metrics" .!= mempty) <*>
4811+ (o .:? "monitoredResource"))
4812+
4813+instance ToJSON MonitoringDestination where
4814+ toJSON MonitoringDestination'{..}
4815+ = object
4816+ (catMaybes
4817+ [("metrics" .=) <$> _mdMetrics,
4818+ ("monitoredResource" .=) <$> _mdMonitoredResource])
4819+
4820+-- | The full representation of a Service that is managed by Google Service
4821+-- Management.
4822+--
4823+-- /See:/ 'managedService' smart constructor.
4824+data ManagedService = ManagedService'
4825+ { _msServiceName :: !(Maybe Text)
4826+ , _msProducerProjectId :: !(Maybe Text)
4827+ } deriving (Eq,Show,Data,Typeable,Generic)
4828+
4829+-- | Creates a value of 'ManagedService' with the minimum fields required to make a request.
4830+--
4831+-- Use one of the following lenses to modify other fields as desired:
4832+--
4833+-- * 'msServiceName'
4834+--
4835+-- * 'msProducerProjectId'
4836+managedService
4837+ :: ManagedService
4838+managedService =
4839+ ManagedService'
4840+ { _msServiceName = Nothing
4841+ , _msProducerProjectId = Nothing
4842+ }
4843+
4844+-- | The name of the service. See the
4845+-- [overview](\/service-management\/overview) for naming requirements.
4846+msServiceName :: Lens' ManagedService (Maybe Text)
4847+msServiceName
4848+ = lens _msServiceName
4849+ (\ s a -> s{_msServiceName = a})
4850+
4851+-- | ID of the project that produces and owns this service.
4852+msProducerProjectId :: Lens' ManagedService (Maybe Text)
4853+msProducerProjectId
4854+ = lens _msProducerProjectId
4855+ (\ s a -> s{_msProducerProjectId = a})
4856+
4857+instance FromJSON ManagedService where
4858+ parseJSON
4859+ = withObject "ManagedService"
4860+ (\ o ->
4861+ ManagedService' <$>
4862+ (o .:? "serviceName") <*>
4863+ (o .:? "producerProjectId"))
4864+
4865+instance ToJSON ManagedService where
4866+ toJSON ManagedService'{..}
4867+ = object
4868+ (catMaybes
4869+ [("serviceName" .=) <$> _msServiceName,
4870+ ("producerProjectId" .=) <$> _msProducerProjectId])
4871+
4872+-- | The metadata associated with a long running operation resource.
4873+--
4874+-- /See:/ 'operationMetadata' smart constructor.
4875+data OperationMetadata = OperationMetadata'
4876+ { _omStartTime :: !(Maybe DateTime')
4877+ , _omSteps :: !(Maybe [Step])
4878+ , _omProgressPercentage :: !(Maybe (Textual Int32))
4879+ , _omResourceNames :: !(Maybe [Text])
4880+ } deriving (Eq,Show,Data,Typeable,Generic)
4881+
4882+-- | Creates a value of 'OperationMetadata' with the minimum fields required to make a request.
4883+--
4884+-- Use one of the following lenses to modify other fields as desired:
4885+--
4886+-- * 'omStartTime'
4887+--
4888+-- * 'omSteps'
4889+--
4890+-- * 'omProgressPercentage'
4891+--
4892+-- * 'omResourceNames'
4893+operationMetadata
4894+ :: OperationMetadata
4895+operationMetadata =
4896+ OperationMetadata'
4897+ { _omStartTime = Nothing
4898+ , _omSteps = Nothing
4899+ , _omProgressPercentage = Nothing
4900+ , _omResourceNames = Nothing
4901+ }
4902+
4903+-- | The start time of the operation.
4904+omStartTime :: Lens' OperationMetadata (Maybe UTCTime)
4905+omStartTime
4906+ = lens _omStartTime (\ s a -> s{_omStartTime = a}) .
4907+ mapping _DateTime
4908+
4909+-- | Detailed status information for each step. The order is undetermined.
4910+omSteps :: Lens' OperationMetadata [Step]
4911+omSteps
4912+ = lens _omSteps (\ s a -> s{_omSteps = a}) . _Default
4913+ . _Coerce
4914+
4915+-- | Percentage of completion of this operation, ranging from 0 to 100.
4916+omProgressPercentage :: Lens' OperationMetadata (Maybe Int32)
4917+omProgressPercentage
4918+ = lens _omProgressPercentage
4919+ (\ s a -> s{_omProgressPercentage = a})
4920+ . mapping _Coerce
4921+
4922+-- | The full name of the resources that this operation is directly
4923+-- associated with.
4924+omResourceNames :: Lens' OperationMetadata [Text]
4925+omResourceNames
4926+ = lens _omResourceNames
4927+ (\ s a -> s{_omResourceNames = a})
4928+ . _Default
4929+ . _Coerce
4930+
4931+instance FromJSON OperationMetadata where
4932+ parseJSON
4933+ = withObject "OperationMetadata"
4934+ (\ o ->
4935+ OperationMetadata' <$>
4936+ (o .:? "startTime") <*> (o .:? "steps" .!= mempty)
4937+ <*> (o .:? "progressPercentage")
4938+ <*> (o .:? "resourceNames" .!= mempty))
4939+
4940+instance ToJSON OperationMetadata where
4941+ toJSON OperationMetadata'{..}
4942+ = object
4943+ (catMaybes
4944+ [("startTime" .=) <$> _omStartTime,
4945+ ("steps" .=) <$> _omSteps,
4946+ ("progressPercentage" .=) <$> _omProgressPercentage,
4947+ ("resourceNames" .=) <$> _omResourceNames])
4948+
4949+-- | \`Endpoint\` describes a network endpoint that serves a set of APIs. A
4950+-- service may expose any number of endpoints, and all endpoints share the
4951+-- same service configuration, such as quota configuration and monitoring
4952+-- configuration. Example service configuration: name:
4953+-- library-example.googleapis.com endpoints: # Below entry makes
4954+-- \'google.example.library.v1.Library\' # API be served from endpoint
4955+-- address library-example.googleapis.com. # It also allows HTTP OPTIONS
4956+-- calls to be passed to the backend, for # it to decide whether the
4957+-- subsequent cross-origin request is # allowed to proceed. - name:
4958+-- library-example.googleapis.com apis: google.example.library.v1.Library
4959+-- allow_cors: true # Below entry makes
4960+-- \'google.example.library.v1.Library\' # API be served from endpoint
4961+-- address # google.example.library-example.v1.LibraryManager. - name:
4962+-- library-manager.googleapis.com apis:
4963+-- google.example.library.v1.LibraryManager # BNS address for a borg job.
4964+-- Can specify a task by appending # \"\/taskId\" (e.g. \"\/0\") to the job
4965+-- spec. Example OpenAPI extension for endpoint with allow_cors set to
4966+-- true: { \"swagger\": \"2.0\", \"info\": { \"description\": \"A
4967+-- simple...\" }, \"host\": \"MY_PROJECT_ID.appspot.com\",
4968+-- \"x-google-endpoints\": [{ \"name\": \"MY_PROJECT_ID.appspot.com\",
4969+-- \"allow_cors\": \"true\" }] }
4970+--
4971+-- /See:/ 'endpoint' smart constructor.
4972+data Endpoint = Endpoint'
4973+ { _eAliases :: !(Maybe [Text])
4974+ , _eAPIs :: !(Maybe [Text])
4975+ , _eAllowCORS :: !(Maybe Bool)
4976+ , _eName :: !(Maybe Text)
4977+ , _eFeatures :: !(Maybe [Text])
4978+ } deriving (Eq,Show,Data,Typeable,Generic)
4979+
4980+-- | Creates a value of 'Endpoint' with the minimum fields required to make a request.
4981+--
4982+-- Use one of the following lenses to modify other fields as desired:
4983+--
4984+-- * 'eAliases'
4985+--
4986+-- * 'eAPIs'
4987+--
4988+-- * 'eAllowCORS'
4989+--
4990+-- * 'eName'
4991+--
4992+-- * 'eFeatures'
4993+endpoint
4994+ :: Endpoint
4995+endpoint =
4996+ Endpoint'
4997+ { _eAliases = Nothing
4998+ , _eAPIs = Nothing
4999+ , _eAllowCORS = Nothing
5000+ , _eName = Nothing
5001+ , _eFeatures = Nothing
5002+ }
5003+
5004+-- | DEPRECATED: This field is no longer supported. Instead of using aliases,
5005+-- please specify multiple google.api.Endpoint for each of the intented
5006+-- alias. Additional names that this endpoint will be hosted on.
5007+eAliases :: Lens' Endpoint [Text]
5008+eAliases
5009+ = lens _eAliases (\ s a -> s{_eAliases = a}) .
5010+ _Default
5011+ . _Coerce
5012+
5013+-- | The list of APIs served by this endpoint.
5014+eAPIs :: Lens' Endpoint [Text]
5015+eAPIs
5016+ = lens _eAPIs (\ s a -> s{_eAPIs = a}) . _Default .
5017+ _Coerce
5018+
5019+-- | Allowing
5020+-- [CORS](https:\/\/en.wikipedia.org\/wiki\/Cross-origin_resource_sharing),
5021+-- aka cross-domain traffic, would allow the backends served from this
5022+-- endpoint to receive and respond to HTTP OPTIONS requests. The response
5023+-- will be used by the browser to determine whether the subsequent
5024+-- cross-origin request is allowed to proceed.
5025+eAllowCORS :: Lens' Endpoint (Maybe Bool)
5026+eAllowCORS
5027+ = lens _eAllowCORS (\ s a -> s{_eAllowCORS = a})
5028+
5029+-- | The canonical name of this endpoint.
5030+eName :: Lens' Endpoint (Maybe Text)
5031+eName = lens _eName (\ s a -> s{_eName = a})
5032+
5033+-- | The list of features enabled on this endpoint.
5034+eFeatures :: Lens' Endpoint [Text]
5035+eFeatures
5036+ = lens _eFeatures (\ s a -> s{_eFeatures = a}) .
5037+ _Default
5038+ . _Coerce
5039+
5040+instance FromJSON Endpoint where
5041+ parseJSON
5042+ = withObject "Endpoint"
5043+ (\ o ->
5044+ Endpoint' <$>
5045+ (o .:? "aliases" .!= mempty) <*>
5046+ (o .:? "apis" .!= mempty)
5047+ <*> (o .:? "allowCors")
5048+ <*> (o .:? "name")
5049+ <*> (o .:? "features" .!= mempty))
5050+
5051+instance ToJSON Endpoint where
5052+ toJSON Endpoint'{..}
5053+ = object
5054+ (catMaybes
5055+ [("aliases" .=) <$> _eAliases,
5056+ ("apis" .=) <$> _eAPIs,
5057+ ("allowCors" .=) <$> _eAllowCORS,
5058+ ("name" .=) <$> _eName,
5059+ ("features" .=) <$> _eFeatures])
5060+
5061+-- | OAuth scopes are a way to define data and permissions on data. For
5062+-- example, there are scopes defined for \"Read-only access to Google
5063+-- Calendar\" and \"Access to Cloud Platform\". Users can consent to a
5064+-- scope for an application, giving it permission to access that data on
5065+-- their behalf. OAuth scope specifications should be fairly coarse
5066+-- grained; a user will need to see and understand the text description of
5067+-- what your scope means. In most cases: use one or at most two OAuth
5068+-- scopes for an entire family of products. If your product has multiple
5069+-- APIs, you should probably be sharing the OAuth scope across all of those
5070+-- APIs. When you need finer grained OAuth consent screens: talk with your
5071+-- product management about how developers will use them in practice.
5072+-- Please note that even though each of the canonical scopes is enough for
5073+-- a request to be accepted and passed to the backend, a request can still
5074+-- fail due to the backend requiring additional scopes or permissions.
5075+--
5076+-- /See:/ 'oAuthRequirements' smart constructor.
5077+newtype OAuthRequirements = OAuthRequirements'
5078+ { _oarCanonicalScopes :: Maybe Text
5079+ } deriving (Eq,Show,Data,Typeable,Generic)
5080+
5081+-- | Creates a value of 'OAuthRequirements' with the minimum fields required to make a request.
5082+--
5083+-- Use one of the following lenses to modify other fields as desired:
5084+--
5085+-- * 'oarCanonicalScopes'
5086+oAuthRequirements
5087+ :: OAuthRequirements
5088+oAuthRequirements =
5089+ OAuthRequirements'
5090+ { _oarCanonicalScopes = Nothing
5091+ }
5092+
5093+-- | The list of publicly documented OAuth scopes that are allowed access. An
5094+-- OAuth token containing any of these scopes will be accepted. Example:
5095+-- canonical_scopes: https:\/\/www.googleapis.com\/auth\/calendar,
5096+-- https:\/\/www.googleapis.com\/auth\/calendar.read
5097+oarCanonicalScopes :: Lens' OAuthRequirements (Maybe Text)
5098+oarCanonicalScopes
5099+ = lens _oarCanonicalScopes
5100+ (\ s a -> s{_oarCanonicalScopes = a})
5101+
5102+instance FromJSON OAuthRequirements where
5103+ parseJSON
5104+ = withObject "OAuthRequirements"
5105+ (\ o ->
5106+ OAuthRequirements' <$> (o .:? "canonicalScopes"))
5107+
5108+instance ToJSON OAuthRequirements where
5109+ toJSON OAuthRequirements'{..}
5110+ = object
5111+ (catMaybes
5112+ [("canonicalScopes" .=) <$> _oarCanonicalScopes])
5113+
5114+-- | Customize service error responses. For example, list any service
5115+-- specific protobuf types that can appear in error detail lists of error
5116+-- responses. Example: custom_error: types: - google.foo.v1.CustomError -
5117+-- google.foo.v1.AnotherError
5118+--
5119+-- /See:/ 'customError' smart constructor.
5120+data CustomError = CustomError'
5121+ { _ceRules :: !(Maybe [CustomErrorRule])
5122+ , _ceTypes :: !(Maybe [Text])
5123+ } deriving (Eq,Show,Data,Typeable,Generic)
5124+
5125+-- | Creates a value of 'CustomError' with the minimum fields required to make a request.
5126+--
5127+-- Use one of the following lenses to modify other fields as desired:
5128+--
5129+-- * 'ceRules'
5130+--
5131+-- * 'ceTypes'
5132+customError
5133+ :: CustomError
5134+customError =
5135+ CustomError'
5136+ { _ceRules = Nothing
5137+ , _ceTypes = Nothing
5138+ }
5139+
5140+-- | The list of custom error rules that apply to individual API messages.
5141+-- **NOTE:** All service configuration rules follow \"last one wins\"
5142+-- order.
5143+ceRules :: Lens' CustomError [CustomErrorRule]
5144+ceRules
5145+ = lens _ceRules (\ s a -> s{_ceRules = a}) . _Default
5146+ . _Coerce
5147+
5148+-- | The list of custom error detail types, e.g.
5149+-- \'google.foo.v1.CustomError\'.
5150+ceTypes :: Lens' CustomError [Text]
5151+ceTypes
5152+ = lens _ceTypes (\ s a -> s{_ceTypes = a}) . _Default
5153+ . _Coerce
5154+
5155+instance FromJSON CustomError where
5156+ parseJSON
5157+ = withObject "CustomError"
5158+ (\ o ->
5159+ CustomError' <$>
5160+ (o .:? "rules" .!= mempty) <*>
5161+ (o .:? "types" .!= mempty))
5162+
5163+instance ToJSON CustomError where
5164+ toJSON CustomError'{..}
5165+ = object
5166+ (catMaybes
5167+ [("rules" .=) <$> _ceRules,
5168+ ("types" .=) <$> _ceTypes])
5169+
5170+-- | A protocol buffer option, which can be attached to a message, field,
5171+-- enumeration, etc.
5172+--
5173+-- /See:/ 'option' smart constructor.
5174+data Option = Option'
5175+ { _optValue :: !(Maybe OptionValue)
5176+ , _optName :: !(Maybe Text)
5177+ } deriving (Eq,Show,Data,Typeable,Generic)
5178+
5179+-- | Creates a value of 'Option' with the minimum fields required to make a request.
5180+--
5181+-- Use one of the following lenses to modify other fields as desired:
5182+--
5183+-- * 'optValue'
5184+--
5185+-- * 'optName'
5186+option
5187+ :: Option
5188+option =
5189+ Option'
5190+ { _optValue = Nothing
5191+ , _optName = Nothing
5192+ }
5193+
5194+-- | The option\'s value. For example, \`\"com.google.protobuf\"\`.
5195+optValue :: Lens' Option (Maybe OptionValue)
5196+optValue = lens _optValue (\ s a -> s{_optValue = a})
5197+
5198+-- | The option\'s name. For example, \`\"java_package\"\`.
5199+optName :: Lens' Option (Maybe Text)
5200+optName = lens _optName (\ s a -> s{_optName = a})
5201+
5202+instance FromJSON Option where
5203+ parseJSON
5204+ = withObject "Option"
5205+ (\ o ->
5206+ Option' <$> (o .:? "value") <*> (o .:? "name"))
5207+
5208+instance ToJSON Option where
5209+ toJSON Option'{..}
5210+ = object
5211+ (catMaybes
5212+ [("value" .=) <$> _optValue,
5213+ ("name" .=) <$> _optName])
5214+
5215+-- | A rollout resource that defines how service configuration versions are
5216+-- pushed to control plane systems. Typically, you create a new version of
5217+-- the service config, and then create a Rollout to push the service
5218+-- config.
5219+--
5220+-- /See:/ 'rollout' smart constructor.
5221+data Rollout = Rollout'
5222+ { _rStatus :: !(Maybe RolloutStatus)
5223+ , _rDeleteServiceStrategy :: !(Maybe DeleteServiceStrategy)
5224+ , _rTrafficPercentStrategy :: !(Maybe TrafficPercentStrategy)
5225+ , _rCreatedBy :: !(Maybe Text)
5226+ , _rServiceName :: !(Maybe Text)
5227+ , _rRolloutId :: !(Maybe Text)
5228+ , _rCreateTime :: !(Maybe DateTime')
5229+ } deriving (Eq,Show,Data,Typeable,Generic)
5230+
5231+-- | Creates a value of 'Rollout' with the minimum fields required to make a request.
5232+--
5233+-- Use one of the following lenses to modify other fields as desired:
5234+--
5235+-- * 'rStatus'
5236+--
5237+-- * 'rDeleteServiceStrategy'
5238+--
5239+-- * 'rTrafficPercentStrategy'
5240+--
5241+-- * 'rCreatedBy'
5242+--
5243+-- * 'rServiceName'
5244+--
5245+-- * 'rRolloutId'
5246+--
5247+-- * 'rCreateTime'
5248+rollout
5249+ :: Rollout
5250+rollout =
5251+ Rollout'
5252+ { _rStatus = Nothing
5253+ , _rDeleteServiceStrategy = Nothing
5254+ , _rTrafficPercentStrategy = Nothing
5255+ , _rCreatedBy = Nothing
5256+ , _rServiceName = Nothing
5257+ , _rRolloutId = Nothing
5258+ , _rCreateTime = Nothing
5259+ }
5260+
5261+-- | The status of this rollout. Readonly. In case of a failed rollout, the
5262+-- system will automatically rollback to the current Rollout version.
5263+-- Readonly.
5264+rStatus :: Lens' Rollout (Maybe RolloutStatus)
5265+rStatus = lens _rStatus (\ s a -> s{_rStatus = a})
5266+
5267+-- | The strategy associated with a rollout to delete a \`ManagedService\`.
5268+-- Readonly.
5269+rDeleteServiceStrategy :: Lens' Rollout (Maybe DeleteServiceStrategy)
5270+rDeleteServiceStrategy
5271+ = lens _rDeleteServiceStrategy
5272+ (\ s a -> s{_rDeleteServiceStrategy = a})
5273+
5274+-- | Google Service Control selects service configurations based on traffic
5275+-- percentage.
5276+rTrafficPercentStrategy :: Lens' Rollout (Maybe TrafficPercentStrategy)
5277+rTrafficPercentStrategy
5278+ = lens _rTrafficPercentStrategy
5279+ (\ s a -> s{_rTrafficPercentStrategy = a})
5280+
5281+-- | The user who created the Rollout. Readonly.
5282+rCreatedBy :: Lens' Rollout (Maybe Text)
5283+rCreatedBy
5284+ = lens _rCreatedBy (\ s a -> s{_rCreatedBy = a})
5285+
5286+-- | The name of the service associated with this Rollout.
5287+rServiceName :: Lens' Rollout (Maybe Text)
5288+rServiceName
5289+ = lens _rServiceName (\ s a -> s{_rServiceName = a})
5290+
5291+-- | Optional unique identifier of this Rollout. Only lower case letters,
5292+-- digits and \'-\' are allowed. If not specified by client, the server
5293+-- will generate one. The generated id will have the form of , where
5294+-- \"date\" is the create date in ISO 8601 format. \"revision number\" is a
5295+-- monotonically increasing positive number that is reset every day for
5296+-- each service. An example of the generated rollout_id is \'2016-02-16r1\'
5297+rRolloutId :: Lens' Rollout (Maybe Text)
5298+rRolloutId
5299+ = lens _rRolloutId (\ s a -> s{_rRolloutId = a})
5300+
5301+-- | Creation time of the rollout. Readonly.
5302+rCreateTime :: Lens' Rollout (Maybe UTCTime)
5303+rCreateTime
5304+ = lens _rCreateTime (\ s a -> s{_rCreateTime = a}) .
5305+ mapping _DateTime
5306+
5307+instance FromJSON Rollout where
5308+ parseJSON
5309+ = withObject "Rollout"
5310+ (\ o ->
5311+ Rollout' <$>
5312+ (o .:? "status") <*> (o .:? "deleteServiceStrategy")
5313+ <*> (o .:? "trafficPercentStrategy")
5314+ <*> (o .:? "createdBy")
5315+ <*> (o .:? "serviceName")
5316+ <*> (o .:? "rolloutId")
5317+ <*> (o .:? "createTime"))
5318+
5319+instance ToJSON Rollout where
5320+ toJSON Rollout'{..}
5321+ = object
5322+ (catMaybes
5323+ [("status" .=) <$> _rStatus,
5324+ ("deleteServiceStrategy" .=) <$>
5325+ _rDeleteServiceStrategy,
5326+ ("trafficPercentStrategy" .=) <$>
5327+ _rTrafficPercentStrategy,
5328+ ("createdBy" .=) <$> _rCreatedBy,
5329+ ("serviceName" .=) <$> _rServiceName,
5330+ ("rolloutId" .=) <$> _rRolloutId,
5331+ ("createTime" .=) <$> _rCreateTime])
5332+
5333+-- | A condition to be met.
5334+--
5335+-- /See:/ 'condition' smart constructor.
5336+data Condition = Condition'
5337+ { _cOp :: !(Maybe ConditionOp)
5338+ , _cIAM :: !(Maybe ConditionIAM)
5339+ , _cValues :: !(Maybe [Text])
5340+ , _cValue :: !(Maybe Text)
5341+ , _cSys :: !(Maybe ConditionSys)
5342+ , _cSvc :: !(Maybe Text)
5343+ } deriving (Eq,Show,Data,Typeable,Generic)
5344+
5345+-- | Creates a value of 'Condition' with the minimum fields required to make a request.
5346+--
5347+-- Use one of the following lenses to modify other fields as desired:
5348+--
5349+-- * 'cOp'
5350+--
5351+-- * 'cIAM'
5352+--
5353+-- * 'cValues'
5354+--
5355+-- * 'cValue'
5356+--
5357+-- * 'cSys'
5358+--
5359+-- * 'cSvc'
5360+condition
5361+ :: Condition
5362+condition =
5363+ Condition'
5364+ { _cOp = Nothing
5365+ , _cIAM = Nothing
5366+ , _cValues = Nothing
5367+ , _cValue = Nothing
5368+ , _cSys = Nothing
5369+ , _cSvc = Nothing
5370+ }
5371+
5372+-- | An operator to apply the subject with.
5373+cOp :: Lens' Condition (Maybe ConditionOp)
5374+cOp = lens _cOp (\ s a -> s{_cOp = a})
5375+
5376+-- | Trusted attributes supplied by the IAM system.
5377+cIAM :: Lens' Condition (Maybe ConditionIAM)
5378+cIAM = lens _cIAM (\ s a -> s{_cIAM = a})
5379+
5380+-- | The objects of the condition. This is mutually exclusive with \'value\'.
5381+cValues :: Lens' Condition [Text]
5382+cValues
5383+ = lens _cValues (\ s a -> s{_cValues = a}) . _Default
5384+ . _Coerce
5385+
5386+-- | DEPRECATED. Use \'values\' instead.
5387+cValue :: Lens' Condition (Maybe Text)
5388+cValue = lens _cValue (\ s a -> s{_cValue = a})
5389+
5390+-- | Trusted attributes supplied by any service that owns resources and uses
5391+-- the IAM system for access control.
5392+cSys :: Lens' Condition (Maybe ConditionSys)
5393+cSys = lens _cSys (\ s a -> s{_cSys = a})
5394+
5395+-- | Trusted attributes discharged by the service.
5396+cSvc :: Lens' Condition (Maybe Text)
5397+cSvc = lens _cSvc (\ s a -> s{_cSvc = a})
5398+
5399+instance FromJSON Condition where
5400+ parseJSON
5401+ = withObject "Condition"
5402+ (\ o ->
5403+ Condition' <$>
5404+ (o .:? "op") <*> (o .:? "iam") <*>
5405+ (o .:? "values" .!= mempty)
5406+ <*> (o .:? "value")
5407+ <*> (o .:? "sys")
5408+ <*> (o .:? "svc"))
5409+
5410+instance ToJSON Condition where
5411+ toJSON Condition'{..}
5412+ = object
5413+ (catMaybes
5414+ [("op" .=) <$> _cOp, ("iam" .=) <$> _cIAM,
5415+ ("values" .=) <$> _cValues, ("value" .=) <$> _cValue,
5416+ ("sys" .=) <$> _cSys, ("svc" .=) <$> _cSvc])
5417+
5418+-- | Enum type definition.
5419+--
5420+-- /See:/ 'enum' smart constructor.
5421+data Enum = Enum'
5422+ { _enuSourceContext :: !(Maybe SourceContext)
5423+ , _enuEnumvalue :: !(Maybe [EnumValue])
5424+ , _enuName :: !(Maybe Text)
5425+ , _enuOptions :: !(Maybe [Option])
5426+ , _enuSyntax :: !(Maybe EnumSyntax)
5427+ } deriving (Eq,Show,Data,Typeable,Generic)
5428+
5429+-- | Creates a value of 'Enum' with the minimum fields required to make a request.
5430+--
5431+-- Use one of the following lenses to modify other fields as desired:
5432+--
5433+-- * 'enuSourceContext'
5434+--
5435+-- * 'enuEnumvalue'
5436+--
5437+-- * 'enuName'
5438+--
5439+-- * 'enuOptions'
5440+--
5441+-- * 'enuSyntax'
5442+enum
5443+ :: Enum
5444+enum =
5445+ Enum'
5446+ { _enuSourceContext = Nothing
5447+ , _enuEnumvalue = Nothing
5448+ , _enuName = Nothing
5449+ , _enuOptions = Nothing
5450+ , _enuSyntax = Nothing
5451+ }
5452+
5453+-- | The source context.
5454+enuSourceContext :: Lens' Enum (Maybe SourceContext)
5455+enuSourceContext
5456+ = lens _enuSourceContext
5457+ (\ s a -> s{_enuSourceContext = a})
5458+
5459+-- | Enum value definitions.
5460+enuEnumvalue :: Lens' Enum [EnumValue]
5461+enuEnumvalue
5462+ = lens _enuEnumvalue (\ s a -> s{_enuEnumvalue = a})
5463+ . _Default
5464+ . _Coerce
5465+
5466+-- | Enum type name.
5467+enuName :: Lens' Enum (Maybe Text)
5468+enuName = lens _enuName (\ s a -> s{_enuName = a})
5469+
5470+-- | Protocol buffer options.
5471+enuOptions :: Lens' Enum [Option]
5472+enuOptions
5473+ = lens _enuOptions (\ s a -> s{_enuOptions = a}) .
5474+ _Default
5475+ . _Coerce
5476+
5477+-- | The source syntax.
5478+enuSyntax :: Lens' Enum (Maybe EnumSyntax)
5479+enuSyntax
5480+ = lens _enuSyntax (\ s a -> s{_enuSyntax = a})
5481+
5482+instance FromJSON Enum where
5483+ parseJSON
5484+ = withObject "Enum"
5485+ (\ o ->
5486+ Enum' <$>
5487+ (o .:? "sourceContext") <*>
5488+ (o .:? "enumvalue" .!= mempty)
5489+ <*> (o .:? "name")
5490+ <*> (o .:? "options" .!= mempty)
5491+ <*> (o .:? "syntax"))
5492+
5493+instance ToJSON Enum where
5494+ toJSON Enum'{..}
5495+ = object
5496+ (catMaybes
5497+ [("sourceContext" .=) <$> _enuSourceContext,
5498+ ("enumvalue" .=) <$> _enuEnumvalue,
5499+ ("name" .=) <$> _enuName,
5500+ ("options" .=) <$> _enuOptions,
5501+ ("syntax" .=) <$> _enuSyntax])
5502+
5503+-- | Logging configuration of the service. The following example shows how to
5504+-- configure logs to be sent to the producer and consumer projects. In the
5505+-- example, the \`activity_history\` log is sent to both the producer and
5506+-- consumer projects, whereas the \`purchase_history\` log is only sent to
5507+-- the producer project. monitored_resources: - type:
5508+-- library.googleapis.com\/branch labels: - key: \/city description: The
5509+-- city where the library branch is located in. - key: \/name description:
5510+-- The name of the branch. logs: - name: activity_history labels: - key:
5511+-- \/customer_id - name: purchase_history logging: producer_destinations: -
5512+-- monitored_resource: library.googleapis.com\/branch logs: -
5513+-- activity_history - purchase_history consumer_destinations: -
5514+-- monitored_resource: library.googleapis.com\/branch logs: -
5515+-- activity_history
5516+--
5517+-- /See:/ 'logging' smart constructor.
5518+data Logging = Logging'
5519+ { _lProducerDestinations :: !(Maybe [LoggingDestination])
5520+ , _lConsumerDestinations :: !(Maybe [LoggingDestination])
5521+ } deriving (Eq,Show,Data,Typeable,Generic)
5522+
5523+-- | Creates a value of 'Logging' with the minimum fields required to make a request.
5524+--
5525+-- Use one of the following lenses to modify other fields as desired:
5526+--
5527+-- * 'lProducerDestinations'
5528+--
5529+-- * 'lConsumerDestinations'
5530+logging
5531+ :: Logging
5532+logging =
5533+ Logging'
5534+ { _lProducerDestinations = Nothing
5535+ , _lConsumerDestinations = Nothing
5536+ }
5537+
5538+-- | Logging configurations for sending logs to the producer project. There
5539+-- can be multiple producer destinations, each one must have a different
5540+-- monitored resource type. A log can be used in at most one producer
5541+-- destination.
5542+lProducerDestinations :: Lens' Logging [LoggingDestination]
5543+lProducerDestinations
5544+ = lens _lProducerDestinations
5545+ (\ s a -> s{_lProducerDestinations = a})
5546+ . _Default
5547+ . _Coerce
5548+
5549+-- | Logging configurations for sending logs to the consumer project. There
5550+-- can be multiple consumer destinations, each one must have a different
5551+-- monitored resource type. A log can be used in at most one consumer
5552+-- destination.
5553+lConsumerDestinations :: Lens' Logging [LoggingDestination]
5554+lConsumerDestinations
5555+ = lens _lConsumerDestinations
5556+ (\ s a -> s{_lConsumerDestinations = a})
5557+ . _Default
5558+ . _Coerce
5559+
5560+instance FromJSON Logging where
5561+ parseJSON
5562+ = withObject "Logging"
5563+ (\ o ->
5564+ Logging' <$>
5565+ (o .:? "producerDestinations" .!= mempty) <*>
5566+ (o .:? "consumerDestinations" .!= mempty))
5567+
5568+instance ToJSON Logging where
5569+ toJSON Logging'{..}
5570+ = object
5571+ (catMaybes
5572+ [("producerDestinations" .=) <$>
5573+ _lProducerDestinations,
5574+ ("consumerDestinations" .=) <$>
5575+ _lConsumerDestinations])
5576+
5577+-- | Represents a service configuration with its name and id.
5578+--
5579+-- /See:/ 'configRef' smart constructor.
5580+newtype ConfigRef = ConfigRef'
5581+ { _crName :: Maybe Text
5582+ } deriving (Eq,Show,Data,Typeable,Generic)
5583+
5584+-- | Creates a value of 'ConfigRef' with the minimum fields required to make a request.
5585+--
5586+-- Use one of the following lenses to modify other fields as desired:
5587+--
5588+-- * 'crName'
5589+configRef
5590+ :: ConfigRef
5591+configRef =
5592+ ConfigRef'
5593+ { _crName = Nothing
5594+ }
5595+
5596+-- | Resource name of a service config. It must have the following format:
5597+-- \"services\/{service name}\/configs\/{config id}\".
5598+crName :: Lens' ConfigRef (Maybe Text)
5599+crName = lens _crName (\ s a -> s{_crName = a})
5600+
5601+instance FromJSON ConfigRef where
5602+ parseJSON
5603+ = withObject "ConfigRef"
5604+ (\ o -> ConfigRef' <$> (o .:? "name"))
5605+
5606+instance ToJSON ConfigRef where
5607+ toJSON ConfigRef'{..}
5608+ = object (catMaybes [("name" .=) <$> _crName])
5609+
5610+-- | Request message for GenerateConfigReport method.
5611+--
5612+-- /See:/ 'generateConfigReportRequest' smart constructor.
5613+data GenerateConfigReportRequest = GenerateConfigReportRequest'
5614+ { _gcrrOldConfig :: !(Maybe GenerateConfigReportRequestOldConfig)
5615+ , _gcrrNewConfig :: !(Maybe GenerateConfigReportRequestNewConfig)
5616+ } deriving (Eq,Show,Data,Typeable,Generic)
5617+
5618+-- | Creates a value of 'GenerateConfigReportRequest' with the minimum fields required to make a request.
5619+--
5620+-- Use one of the following lenses to modify other fields as desired:
5621+--
5622+-- * 'gcrrOldConfig'
5623+--
5624+-- * 'gcrrNewConfig'
5625+generateConfigReportRequest
5626+ :: GenerateConfigReportRequest
5627+generateConfigReportRequest =
5628+ GenerateConfigReportRequest'
5629+ { _gcrrOldConfig = Nothing
5630+ , _gcrrNewConfig = Nothing
5631+ }
5632+
5633+-- | Service configuration against which the comparison will be done. For
5634+-- this version of API, the supported types are
5635+-- google.api.servicemanagement.v1.ConfigRef,
5636+-- google.api.servicemanagement.v1.ConfigSource, and google.api.Service
5637+gcrrOldConfig :: Lens' GenerateConfigReportRequest (Maybe GenerateConfigReportRequestOldConfig)
5638+gcrrOldConfig
5639+ = lens _gcrrOldConfig
5640+ (\ s a -> s{_gcrrOldConfig = a})
5641+
5642+-- | Service configuration for which we want to generate the report. For this
5643+-- version of API, the supported types are
5644+-- google.api.servicemanagement.v1.ConfigRef,
5645+-- google.api.servicemanagement.v1.ConfigSource, and google.api.Service
5646+gcrrNewConfig :: Lens' GenerateConfigReportRequest (Maybe GenerateConfigReportRequestNewConfig)
5647+gcrrNewConfig
5648+ = lens _gcrrNewConfig
5649+ (\ s a -> s{_gcrrNewConfig = a})
5650+
5651+instance FromJSON GenerateConfigReportRequest where
5652+ parseJSON
5653+ = withObject "GenerateConfigReportRequest"
5654+ (\ o ->
5655+ GenerateConfigReportRequest' <$>
5656+ (o .:? "oldConfig") <*> (o .:? "newConfig"))
5657+
5658+instance ToJSON GenerateConfigReportRequest where
5659+ toJSON GenerateConfigReportRequest'{..}
5660+ = object
5661+ (catMaybes
5662+ [("oldConfig" .=) <$> _gcrrOldConfig,
5663+ ("newConfig" .=) <$> _gcrrNewConfig])
5664+
5665+-- | \`HttpRule\` defines the mapping of an RPC method to one or more HTTP
5666+-- REST APIs. The mapping determines what portions of the request message
5667+-- are populated from the path, query parameters, or body of the HTTP
5668+-- request. The mapping is typically specified as an \`google.api.http\`
5669+-- annotation, see \"google\/api\/annotations.proto\" for details. The
5670+-- mapping consists of a field specifying the path template and method
5671+-- kind. The path template can refer to fields in the request message, as
5672+-- in the example below which describes a REST GET operation on a resource
5673+-- collection of messages: \`\`\`proto service Messaging { rpc
5674+-- GetMessage(GetMessageRequest) returns (Message) { option
5675+-- (google.api.http).get =
5676+-- \"\/v1\/messages\/{message_id}\/{sub.subfield}\"; } } message
5677+-- GetMessageRequest { message SubMessage { string subfield = 1; } string
5678+-- message_id = 1; \/\/ mapped to the URL SubMessage sub = 2; \/\/
5679+-- \`sub.subfield\` is url-mapped } message Message { string text = 1; \/\/
5680+-- content of the resource } \`\`\` This definition enables an automatic,
5681+-- bidrectional mapping of HTTP JSON to RPC. Example: HTTP | RPC
5682+-- -----|----- \`GET \/v1\/messages\/123456\/foo\` |
5683+-- \`GetMessage(message_id: \"123456\" sub: SubMessage(subfield:
5684+-- \"foo\"))\` In general, not only fields but also field paths can be
5685+-- referenced from a path pattern. Fields mapped to the path pattern cannot
5686+-- be repeated and must have a primitive (non-message) type. Any fields in
5687+-- the request message which are not bound by the path pattern
5688+-- automatically become (optional) HTTP query parameters. Assume the
5689+-- following definition of the request message: \`\`\`proto message
5690+-- GetMessageRequest { message SubMessage { string subfield = 1; } string
5691+-- message_id = 1; \/\/ mapped to the URL int64 revision = 2; \/\/ becomes
5692+-- a parameter SubMessage sub = 3; \/\/ \`sub.subfield\` becomes a
5693+-- parameter } \`\`\` This enables a HTTP JSON to RPC mapping as below:
5694+-- HTTP | RPC -----|----- \`GET
5695+-- \/v1\/messages\/123456?revision=2&sub.subfield=foo\` |
5696+-- \`GetMessage(message_id: \"123456\" revision: 2 sub:
5697+-- SubMessage(subfield: \"foo\"))\` Note that fields which are mapped to
5698+-- HTTP parameters must have a primitive type or a repeated primitive type.
5699+-- Message types are not allowed. In the case of a repeated type, the
5700+-- parameter can be repeated in the URL, as in \`...?param=A&param=B\`. For
5701+-- HTTP method kinds which allow a request body, the \`body\` field
5702+-- specifies the mapping. Consider a REST update method on the message
5703+-- resource collection: \`\`\`proto service Messaging { rpc
5704+-- UpdateMessage(UpdateMessageRequest) returns (Message) { option
5705+-- (google.api.http) = { put: \"\/v1\/messages\/{message_id}\" body:
5706+-- \"message\" }; } } message UpdateMessageRequest { string message_id = 1;
5707+-- \/\/ mapped to the URL Message message = 2; \/\/ mapped to the body }
5708+-- \`\`\` The following HTTP JSON to RPC mapping is enabled, where the
5709+-- representation of the JSON in the request body is determined by protos
5710+-- JSON encoding: HTTP | RPC -----|----- \`PUT \/v1\/messages\/123456 {
5711+-- \"text\": \"Hi!\" }\` | \`UpdateMessage(message_id: \"123456\" message {
5712+-- text: \"Hi!\" })\` The special name \`*\` can be used in the body
5713+-- mapping to define that every field not bound by the path template should
5714+-- be mapped to the request body. This enables the following alternative
5715+-- definition of the update method: \`\`\`proto service Messaging { rpc
5716+-- UpdateMessage(Message) returns (Message) { option (google.api.http) = {
5717+-- put: \"\/v1\/messages\/{message_id}\" body: \"*\" }; } } message Message
5718+-- { string message_id = 1; string text = 2; } \`\`\` The following HTTP
5719+-- JSON to RPC mapping is enabled: HTTP | RPC -----|----- \`PUT
5720+-- \/v1\/messages\/123456 { \"text\": \"Hi!\" }\` |
5721+-- \`UpdateMessage(message_id: \"123456\" text: \"Hi!\")\` Note that when
5722+-- using \`*\` in the body mapping, it is not possible to have HTTP
5723+-- parameters, as all fields not bound by the path end in the body. This
5724+-- makes this option more rarely used in practice of defining REST APIs.
5725+-- The common usage of \`*\` is in custom methods which don\'t use the URL
5726+-- at all for transferring data. It is possible to define multiple HTTP
5727+-- methods for one RPC by using the \`additional_bindings\` option.
5728+-- Example: \`\`\`proto service Messaging { rpc
5729+-- GetMessage(GetMessageRequest) returns (Message) { option
5730+-- (google.api.http) = { get: \"\/v1\/messages\/{message_id}\"
5731+-- additional_bindings { get:
5732+-- \"\/v1\/users\/{user_id}\/messages\/{message_id}\" } }; } } message
5733+-- GetMessageRequest { string message_id = 1; string user_id = 2; } \`\`\`
5734+-- This enables the following two alternative HTTP JSON to RPC mappings:
5735+-- HTTP | RPC -----|----- \`GET \/v1\/messages\/123456\` |
5736+-- \`GetMessage(message_id: \"123456\")\` \`GET
5737+-- \/v1\/users\/me\/messages\/123456\` | \`GetMessage(user_id: \"me\"
5738+-- message_id: \"123456\")\` # Rules for HTTP mapping The rules for mapping
5739+-- HTTP path, query parameters, and body fields to the request message are
5740+-- as follows: 1. The \`body\` field specifies either \`*\` or a field
5741+-- path, or is omitted. If omitted, it assumes there is no HTTP body. 2.
5742+-- Leaf fields (recursive expansion of nested messages in the request) can
5743+-- be classified into three types: (a) Matched in the URL template. (b)
5744+-- Covered by body (if body is \`*\`, everything except (a) fields; else
5745+-- everything under the body field) (c) All other fields. 3. URL query
5746+-- parameters found in the HTTP request are mapped to (c) fields. 4. Any
5747+-- body sent with an HTTP request can contain only (b) fields. The syntax
5748+-- of the path template is as follows: Template = \"\/\" Segments [ Verb ]
5749+-- ; Segments = Segment { \"\/\" Segment } ; Segment = \"*\" | \"**\" |
5750+-- LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\"
5751+-- ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax
5752+-- \`*\` matches a single path segment. It follows the semantics of [RFC
5753+-- 6570](https:\/\/tools.ietf.org\/html\/rfc6570) Section 3.2.2 Simple
5754+-- String Expansion. The syntax \`**\` matches zero or more path segments.
5755+-- It follows the semantics of [RFC
5756+-- 6570](https:\/\/tools.ietf.org\/html\/rfc6570) Section 3.2.3 Reserved
5757+-- Expansion. The syntax \`LITERAL\` matches literal text in the URL path.
5758+-- The syntax \`Variable\` matches the entire path as specified by its
5759+-- template; this nested template must not contain further variables. If a
5760+-- variable matches a single path segment, its template may be omitted,
5761+-- e.g. \`{var}\` is equivalent to \`{var=*}\`. NOTE: the field paths in
5762+-- variables and in the \`body\` must not refer to repeated fields or map
5763+-- fields. Use CustomHttpPattern to specify any HTTP method that is not
5764+-- included in the \`pattern\` field, such as HEAD, or \"*\" to leave the
5765+-- HTTP method unspecified for a given URL path rule. The wild-card rule is
5766+-- useful for services that provide content to Web (HTML) clients.
5767+--
5768+-- /See:/ 'hTTPRule' smart constructor.
5769+data HTTPRule = HTTPRule'
5770+ { _httprMediaUpload :: !(Maybe MediaUpload')
5771+ , _httprSelector :: !(Maybe Text)
5772+ , _httprPost :: !(Maybe Text)
5773+ , _httprMediaDownload :: !(Maybe MediaDownload')
5774+ , _httprBody :: !(Maybe Text)
5775+ , _httprCustom :: !(Maybe CustomHTTPPattern)
5776+ , _httprResponseBody :: !(Maybe Text)
5777+ , _httprPatch :: !(Maybe Text)
5778+ , _httprGet :: !(Maybe Text)
5779+ , _httprAdditionalBindings :: !(Maybe [HTTPRule])
5780+ , _httprDelete :: !(Maybe Text)
5781+ , _httprPut :: !(Maybe Text)
5782+ } deriving (Eq,Show,Data,Typeable,Generic)
5783+
5784+-- | Creates a value of 'HTTPRule' with the minimum fields required to make a request.
5785+--
5786+-- Use one of the following lenses to modify other fields as desired:
5787+--
5788+-- * 'httprMediaUpload'
5789+--
5790+-- * 'httprSelector'
5791+--
5792+-- * 'httprPost'
5793+--
5794+-- * 'httprMediaDownload'
5795+--
5796+-- * 'httprBody'
5797+--
5798+-- * 'httprCustom'
5799+--
5800+-- * 'httprResponseBody'
5801+--
5802+-- * 'httprPatch'
5803+--
5804+-- * 'httprGet'
5805+--
5806+-- * 'httprAdditionalBindings'
5807+--
5808+-- * 'httprDelete'
5809+--
5810+-- * 'httprPut'
5811+hTTPRule
5812+ :: HTTPRule
5813+hTTPRule =
5814+ HTTPRule'
5815+ { _httprMediaUpload = Nothing
5816+ , _httprSelector = Nothing
5817+ , _httprPost = Nothing
5818+ , _httprMediaDownload = Nothing
5819+ , _httprBody = Nothing
5820+ , _httprCustom = Nothing
5821+ , _httprResponseBody = Nothing
5822+ , _httprPatch = Nothing
5823+ , _httprGet = Nothing
5824+ , _httprAdditionalBindings = Nothing
5825+ , _httprDelete = Nothing
5826+ , _httprPut = Nothing
5827+ }
5828+
5829+-- | Do not use this. For media support, add instead
5830+-- [][google.bytestream.RestByteStream] as an API to your configuration.
5831+httprMediaUpload :: Lens' HTTPRule (Maybe MediaUpload')
5832+httprMediaUpload
5833+ = lens _httprMediaUpload
5834+ (\ s a -> s{_httprMediaUpload = a})
5835+
5836+-- | Selects methods to which this rule applies. Refer to selector for syntax
5837+-- details.
5838+httprSelector :: Lens' HTTPRule (Maybe Text)
5839+httprSelector
5840+ = lens _httprSelector
5841+ (\ s a -> s{_httprSelector = a})
5842+
5843+-- | Used for creating a resource.
5844+httprPost :: Lens' HTTPRule (Maybe Text)
5845+httprPost
5846+ = lens _httprPost (\ s a -> s{_httprPost = a})
5847+
5848+-- | Do not use this. For media support, add instead
5849+-- [][google.bytestream.RestByteStream] as an API to your configuration.
5850+httprMediaDownload :: Lens' HTTPRule (Maybe MediaDownload')
5851+httprMediaDownload
5852+ = lens _httprMediaDownload
5853+ (\ s a -> s{_httprMediaDownload = a})
5854+
5855+-- | The name of the request field whose value is mapped to the HTTP body, or
5856+-- \`*\` for mapping all fields not captured by the path pattern to the
5857+-- HTTP body. NOTE: the referred field must not be a repeated field and
5858+-- must be present at the top-level of response message type.
5859+httprBody :: Lens' HTTPRule (Maybe Text)
5860+httprBody
5861+ = lens _httprBody (\ s a -> s{_httprBody = a})
5862+
5863+-- | Custom pattern is used for defining custom verbs.
5864+httprCustom :: Lens' HTTPRule (Maybe CustomHTTPPattern)
5865+httprCustom
5866+ = lens _httprCustom (\ s a -> s{_httprCustom = a})
5867+
5868+-- | The name of the response field whose value is mapped to the HTTP body of
5869+-- response. Other response fields are ignored. This field is optional.
5870+-- When not set, the response message will be used as HTTP body of
5871+-- response. NOTE: the referred field must be not a repeated field and must
5872+-- be present at the top-level of response message type.
5873+httprResponseBody :: Lens' HTTPRule (Maybe Text)
5874+httprResponseBody
5875+ = lens _httprResponseBody
5876+ (\ s a -> s{_httprResponseBody = a})
5877+
5878+-- | Used for updating a resource.
5879+httprPatch :: Lens' HTTPRule (Maybe Text)
5880+httprPatch
5881+ = lens _httprPatch (\ s a -> s{_httprPatch = a})
5882+
5883+-- | Used for listing and getting information about resources.
5884+httprGet :: Lens' HTTPRule (Maybe Text)
5885+httprGet = lens _httprGet (\ s a -> s{_httprGet = a})
5886+
5887+-- | Additional HTTP bindings for the selector. Nested bindings must not
5888+-- contain an \`additional_bindings\` field themselves (that is, the
5889+-- nesting may only be one level deep).
5890+httprAdditionalBindings :: Lens' HTTPRule [HTTPRule]
5891+httprAdditionalBindings
5892+ = lens _httprAdditionalBindings
5893+ (\ s a -> s{_httprAdditionalBindings = a})
5894+ . _Default
5895+ . _Coerce
5896+
5897+-- | Used for deleting a resource.
5898+httprDelete :: Lens' HTTPRule (Maybe Text)
5899+httprDelete
5900+ = lens _httprDelete (\ s a -> s{_httprDelete = a})
5901+
5902+-- | Used for updating a resource.
5903+httprPut :: Lens' HTTPRule (Maybe Text)
5904+httprPut = lens _httprPut (\ s a -> s{_httprPut = a})
5905+
5906+instance FromJSON HTTPRule where
5907+ parseJSON
5908+ = withObject "HTTPRule"
5909+ (\ o ->
5910+ HTTPRule' <$>
5911+ (o .:? "mediaUpload") <*> (o .:? "selector") <*>
5912+ (o .:? "post")
5913+ <*> (o .:? "mediaDownload")
5914+ <*> (o .:? "body")
5915+ <*> (o .:? "custom")
5916+ <*> (o .:? "responseBody")
5917+ <*> (o .:? "patch")
5918+ <*> (o .:? "get")
5919+ <*> (o .:? "additionalBindings" .!= mempty)
5920+ <*> (o .:? "delete")
5921+ <*> (o .:? "put"))
5922+
5923+instance ToJSON HTTPRule where
5924+ toJSON HTTPRule'{..}
5925+ = object
5926+ (catMaybes
5927+ [("mediaUpload" .=) <$> _httprMediaUpload,
5928+ ("selector" .=) <$> _httprSelector,
5929+ ("post" .=) <$> _httprPost,
5930+ ("mediaDownload" .=) <$> _httprMediaDownload,
5931+ ("body" .=) <$> _httprBody,
5932+ ("custom" .=) <$> _httprCustom,
5933+ ("responseBody" .=) <$> _httprResponseBody,
5934+ ("patch" .=) <$> _httprPatch,
5935+ ("get" .=) <$> _httprGet,
5936+ ("additionalBindings" .=) <$>
5937+ _httprAdditionalBindings,
5938+ ("delete" .=) <$> _httprDelete,
5939+ ("put" .=) <$> _httprPut])
5940+
5941+-- | The normal response of the operation in case of success. If the original
5942+-- method returns no data on success, such as \`Delete\`, the response is
5943+-- \`google.protobuf.Empty\`. If the original method is standard
5944+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
5945+-- For other methods, the response should have the type \`XxxResponse\`,
5946+-- where \`Xxx\` is the original method name. For example, if the original
5947+-- method name is \`TakeSnapshot()\`, the inferred response type is
5948+-- \`TakeSnapshotResponse\`.
5949+--
5950+-- /See:/ 'operationResponse' smart constructor.
5951+newtype OperationResponse = OperationResponse'
5952+ { _orAddtional :: HashMap Text JSONValue
5953+ } deriving (Eq,Show,Data,Typeable,Generic)
5954+
5955+-- | Creates a value of 'OperationResponse' with the minimum fields required to make a request.
5956+--
5957+-- Use one of the following lenses to modify other fields as desired:
5958+--
5959+-- * 'orAddtional'
5960+operationResponse
5961+ :: HashMap Text JSONValue -- ^ 'orAddtional'
5962+ -> OperationResponse
5963+operationResponse pOrAddtional_ =
5964+ OperationResponse'
5965+ { _orAddtional = _Coerce # pOrAddtional_
5966+ }
5967+
5968+-- | Properties of the object. Contains field \'type with type URL.
5969+orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
5970+orAddtional
5971+ = lens _orAddtional (\ s a -> s{_orAddtional = a}) .
5972+ _Coerce
5973+
5974+instance FromJSON OperationResponse where
5975+ parseJSON
5976+ = withObject "OperationResponse"
5977+ (\ o -> OperationResponse' <$> (parseJSONObject o))
5978+
5979+instance ToJSON OperationResponse where
5980+ toJSON = toJSON . _orAddtional
5981+
5982+-- | Specifies what kind of log the caller must write Increment a streamz
5983+-- counter with the specified metric and field names. Metric names should
5984+-- start with a \'\/\', generally be lowercase-only, and end in \"_count\".
5985+-- Field names should not contain an initial slash. The actual exported
5986+-- metric names will have \"\/iam\/policy\" prepended. Field names
5987+-- correspond to IAM request parameters and field values are their
5988+-- respective values. At present the only supported field names are -
5989+-- \"iam_principal\", corresponding to IAMContext.principal; - \"\" (empty
5990+-- string), resulting in one aggretated counter with no field. Examples:
5991+-- counter { metric: \"\/debug_access_count\" field: \"iam_principal\" }
5992+-- ==> increment counter \/iam\/policy\/backend_debug_access_count
5993+-- {iam_principal=[value of IAMContext.principal]} At this time we do not
5994+-- support: * multiple field names (though this may be supported in the
5995+-- future) * decrementing the counter * incrementing it by anything other
5996+-- than 1
5997+--
5998+-- /See:/ 'logConfig' smart constructor.
5999+data LogConfig = LogConfig'
6000+ { _lcCloudAudit :: !(Maybe CloudAuditOptions)
6001+ , _lcDataAccess :: !(Maybe DataAccessOptions)
6002+ , _lcCounter :: !(Maybe CounterOptions)
6003+ } deriving (Eq,Show,Data,Typeable,Generic)
6004+
6005+-- | Creates a value of 'LogConfig' with the minimum fields required to make a request.
6006+--
6007+-- Use one of the following lenses to modify other fields as desired:
6008+--
6009+-- * 'lcCloudAudit'
6010+--
6011+-- * 'lcDataAccess'
6012+--
6013+-- * 'lcCounter'
6014+logConfig
6015+ :: LogConfig
6016+logConfig =
6017+ LogConfig'
6018+ { _lcCloudAudit = Nothing
6019+ , _lcDataAccess = Nothing
6020+ , _lcCounter = Nothing
6021+ }
6022+
6023+-- | Cloud audit options.
6024+lcCloudAudit :: Lens' LogConfig (Maybe CloudAuditOptions)
6025+lcCloudAudit
6026+ = lens _lcCloudAudit (\ s a -> s{_lcCloudAudit = a})
6027+
6028+-- | Data access options.
6029+lcDataAccess :: Lens' LogConfig (Maybe DataAccessOptions)
6030+lcDataAccess
6031+ = lens _lcDataAccess (\ s a -> s{_lcDataAccess = a})
6032+
6033+-- | Counter options.
6034+lcCounter :: Lens' LogConfig (Maybe CounterOptions)
6035+lcCounter
6036+ = lens _lcCounter (\ s a -> s{_lcCounter = a})
6037+
6038+instance FromJSON LogConfig where
6039+ parseJSON
6040+ = withObject "LogConfig"
6041+ (\ o ->
6042+ LogConfig' <$>
6043+ (o .:? "cloudAudit") <*> (o .:? "dataAccess") <*>
6044+ (o .:? "counter"))
6045+
6046+instance ToJSON LogConfig where
6047+ toJSON LogConfig'{..}
6048+ = object
6049+ (catMaybes
6050+ [("cloudAudit" .=) <$> _lcCloudAudit,
6051+ ("dataAccess" .=) <$> _lcDataAccess,
6052+ ("counter" .=) <$> _lcCounter])
6053+
6054+-- | Configuration for an anthentication provider, including support for
6055+-- [JSON Web Token
6056+-- (JWT)](https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-json-web-token-32).
6057+--
6058+-- /See:/ 'authProvider' smart constructor.
6059+data AuthProvider = AuthProvider'
6060+ { _apJWKsURI :: !(Maybe Text)
6061+ , _apId :: !(Maybe Text)
6062+ , _apIssuer :: !(Maybe Text)
6063+ } deriving (Eq,Show,Data,Typeable,Generic)
6064+
6065+-- | Creates a value of 'AuthProvider' with the minimum fields required to make a request.
6066+--
6067+-- Use one of the following lenses to modify other fields as desired:
6068+--
6069+-- * 'apJWKsURI'
6070+--
6071+-- * 'apId'
6072+--
6073+-- * 'apIssuer'
6074+authProvider
6075+ :: AuthProvider
6076+authProvider =
6077+ AuthProvider'
6078+ { _apJWKsURI = Nothing
6079+ , _apId = Nothing
6080+ , _apIssuer = Nothing
6081+ }
6082+
6083+-- | URL of the provider\'s public key set to validate signature of the JWT.
6084+-- See [OpenID
6085+-- Discovery](https:\/\/openid.net\/specs\/openid-connect-discovery-1_0.html#ProviderMetadata).
6086+-- Optional if the key set document: - can be retrieved from [OpenID
6087+-- Discovery](https:\/\/openid.net\/specs\/openid-connect-discovery-1_0.html
6088+-- of the issuer. - can be inferred from the email domain of the issuer
6089+-- (e.g. a Google service account). Example:
6090+-- https:\/\/www.googleapis.com\/oauth2\/v1\/certs
6091+apJWKsURI :: Lens' AuthProvider (Maybe Text)
6092+apJWKsURI
6093+ = lens _apJWKsURI (\ s a -> s{_apJWKsURI = a})
6094+
6095+-- | The unique identifier of the auth provider. It will be referred to by
6096+-- \`AuthRequirement.provider_id\`. Example: \"bookstore_auth\".
6097+apId :: Lens' AuthProvider (Maybe Text)
6098+apId = lens _apId (\ s a -> s{_apId = a})
6099+
6100+-- | Identifies the principal that issued the JWT. See
6101+-- https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-json-web-token-32#section-4.1.1
6102+-- Usually a URL or an email address. Example:
6103+-- https:\/\/securetoken.google.com Example:
6104+-- 1234567-compute\'developer.gserviceaccount.com
6105+apIssuer :: Lens' AuthProvider (Maybe Text)
6106+apIssuer = lens _apIssuer (\ s a -> s{_apIssuer = a})
6107+
6108+instance FromJSON AuthProvider where
6109+ parseJSON
6110+ = withObject "AuthProvider"
6111+ (\ o ->
6112+ AuthProvider' <$>
6113+ (o .:? "jwksUri") <*> (o .:? "id") <*>
6114+ (o .:? "issuer"))
6115+
6116+instance ToJSON AuthProvider where
6117+ toJSON AuthProvider'{..}
6118+ = object
6119+ (catMaybes
6120+ [("jwksUri" .=) <$> _apJWKsURI, ("id" .=) <$> _apId,
6121+ ("issuer" .=) <$> _apIssuer])
6122+
6123+-- | Associates \`members\` with a \`role\`.
6124+--
6125+-- /See:/ 'binding' smart constructor.
6126+data Binding = Binding'
6127+ { _bMembers :: !(Maybe [Text])
6128+ , _bRole :: !(Maybe Text)
6129+ } deriving (Eq,Show,Data,Typeable,Generic)
6130+
6131+-- | Creates a value of 'Binding' with the minimum fields required to make a request.
6132+--
6133+-- Use one of the following lenses to modify other fields as desired:
6134+--
6135+-- * 'bMembers'
6136+--
6137+-- * 'bRole'
6138+binding
6139+ :: Binding
6140+binding =
6141+ Binding'
6142+ { _bMembers = Nothing
6143+ , _bRole = Nothing
6144+ }
6145+
6146+-- | Specifies the identities requesting access for a Cloud Platform
6147+-- resource. \`members\` can have the following values: * \`allUsers\`: A
6148+-- special identifier that represents anyone who is on the internet; with
6149+-- or without a Google account. * \`allAuthenticatedUsers\`: A special
6150+-- identifier that represents anyone who is authenticated with a Google
6151+-- account or a service account. * \`user:{emailid}\`: An email address
6152+-- that represents a specific Google account. For example,
6153+-- \`alice\'gmail.com\` or \`joe\'example.com\`. *
6154+-- \`serviceAccount:{emailid}\`: An email address that represents a service
6155+-- account. For example, \`my-other-app\'appspot.gserviceaccount.com\`. *
6156+-- \`group:{emailid}\`: An email address that represents a Google group.
6157+-- For example, \`admins\'example.com\`. * \`domain:{domain}\`: A Google
6158+-- Apps domain name that represents all the users of that domain. For
6159+-- example, \`google.com\` or \`example.com\`.
6160+bMembers :: Lens' Binding [Text]
6161+bMembers
6162+ = lens _bMembers (\ s a -> s{_bMembers = a}) .
6163+ _Default
6164+ . _Coerce
6165+
6166+-- | Role that is assigned to \`members\`. For example, \`roles\/viewer\`,
6167+-- \`roles\/editor\`, or \`roles\/owner\`. Required
6168+bRole :: Lens' Binding (Maybe Text)
6169+bRole = lens _bRole (\ s a -> s{_bRole = a})
6170+
6171+instance FromJSON Binding where
6172+ parseJSON
6173+ = withObject "Binding"
6174+ (\ o ->
6175+ Binding' <$>
6176+ (o .:? "members" .!= mempty) <*> (o .:? "role"))
6177+
6178+instance ToJSON Binding where
6179+ toJSON Binding'{..}
6180+ = object
6181+ (catMaybes
6182+ [("members" .=) <$> _bMembers,
6183+ ("role" .=) <$> _bRole])
6184+
6185+-- | A context rule provides information about the context for an individual
6186+-- API element.
6187+--
6188+-- /See:/ 'contextRule' smart constructor.
6189+data ContextRule = ContextRule'
6190+ { _crSelector :: !(Maybe Text)
6191+ , _crRequested :: !(Maybe [Text])
6192+ , _crProvided :: !(Maybe [Text])
6193+ } deriving (Eq,Show,Data,Typeable,Generic)
6194+
6195+-- | Creates a value of 'ContextRule' with the minimum fields required to make a request.
6196+--
6197+-- Use one of the following lenses to modify other fields as desired:
6198+--
6199+-- * 'crSelector'
6200+--
6201+-- * 'crRequested'
6202+--
6203+-- * 'crProvided'
6204+contextRule
6205+ :: ContextRule
6206+contextRule =
6207+ ContextRule'
6208+ { _crSelector = Nothing
6209+ , _crRequested = Nothing
6210+ , _crProvided = Nothing
6211+ }
6212+
6213+-- | Selects the methods to which this rule applies. Refer to selector for
6214+-- syntax details.
6215+crSelector :: Lens' ContextRule (Maybe Text)
6216+crSelector
6217+ = lens _crSelector (\ s a -> s{_crSelector = a})
6218+
6219+-- | A list of full type names of requested contexts.
6220+crRequested :: Lens' ContextRule [Text]
6221+crRequested
6222+ = lens _crRequested (\ s a -> s{_crRequested = a}) .
6223+ _Default
6224+ . _Coerce
6225+
6226+-- | A list of full type names of provided contexts.
6227+crProvided :: Lens' ContextRule [Text]
6228+crProvided
6229+ = lens _crProvided (\ s a -> s{_crProvided = a}) .
6230+ _Default
6231+ . _Coerce
6232+
6233+instance FromJSON ContextRule where
6234+ parseJSON
6235+ = withObject "ContextRule"
6236+ (\ o ->
6237+ ContextRule' <$>
6238+ (o .:? "selector") <*> (o .:? "requested" .!= mempty)
6239+ <*> (o .:? "provided" .!= mempty))
6240+
6241+instance ToJSON ContextRule where
6242+ toJSON ContextRule'{..}
6243+ = object
6244+ (catMaybes
6245+ [("selector" .=) <$> _crSelector,
6246+ ("requested" .=) <$> _crRequested,
6247+ ("provided" .=) <$> _crProvided])
gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Sum.hsnew file+852
@@ -0,0 +1,852 @@
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.ServiceManagement.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.ServiceManagement.Types.Sum where
18+
19+import Network.Google.Prelude
20+
21+-- | Whether the measurement is an integer, a floating-point number, etc.
22+-- Some combinations of \`metric_kind\` and \`value_type\` might not be
23+-- supported.
24+data MetricDescriptorValueType
25+ = ValueTypeUnspecified
26+ -- ^ @VALUE_TYPE_UNSPECIFIED@
27+ -- Do not use this default value.
28+ | Bool
29+ -- ^ @BOOL@
30+ -- The value is a boolean. This value type can be used only if the metric
31+ -- kind is \`GAUGE\`.
32+ | INT64
33+ -- ^ @INT64@
34+ -- The value is a signed 64-bit integer.
35+ | Double
36+ -- ^ @DOUBLE@
37+ -- The value is a double precision floating point number.
38+ | String
39+ -- ^ @STRING@
40+ -- The value is a text string. This value type can be used only if the
41+ -- metric kind is \`GAUGE\`.
42+ | Distribution
43+ -- ^ @DISTRIBUTION@
44+ -- The value is a \`Distribution\`.
45+ | Money
46+ -- ^ @MONEY@
47+ -- The value is money.
48+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
49+
50+instance Hashable MetricDescriptorValueType
51+
52+instance FromHttpApiData MetricDescriptorValueType where
53+ parseQueryParam = \case
54+ "VALUE_TYPE_UNSPECIFIED" -> Right ValueTypeUnspecified
55+ "BOOL" -> Right Bool
56+ "INT64" -> Right INT64
57+ "DOUBLE" -> Right Double
58+ "STRING" -> Right String
59+ "DISTRIBUTION" -> Right Distribution
60+ "MONEY" -> Right Money
61+ x -> Left ("Unable to parse MetricDescriptorValueType from: " <> x)
62+
63+instance ToHttpApiData MetricDescriptorValueType where
64+ toQueryParam = \case
65+ ValueTypeUnspecified -> "VALUE_TYPE_UNSPECIFIED"
66+ Bool -> "BOOL"
67+ INT64 -> "INT64"
68+ Double -> "DOUBLE"
69+ String -> "STRING"
70+ Distribution -> "DISTRIBUTION"
71+ Money -> "MONEY"
72+
73+instance FromJSON MetricDescriptorValueType where
74+ parseJSON = parseJSONText "MetricDescriptorValueType"
75+
76+instance ToJSON MetricDescriptorValueType where
77+ toJSON = toJSONText
78+
79+-- | Trusted attributes supplied by any service that owns resources and uses
80+-- the IAM system for access control.
81+data ConditionSys
82+ = CSNoAttr
83+ -- ^ @NO_ATTR@
84+ -- Default non-attribute type
85+ | CSRegion
86+ -- ^ @REGION@
87+ -- Region of the resource
88+ | CSService
89+ -- ^ @SERVICE@
90+ -- Service name
91+ | CSName
92+ -- ^ @NAME@
93+ -- Resource name
94+ | CSIP
95+ -- ^ @IP@
96+ -- IP address of the caller
97+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
98+
99+instance Hashable ConditionSys
100+
101+instance FromHttpApiData ConditionSys where
102+ parseQueryParam = \case
103+ "NO_ATTR" -> Right CSNoAttr
104+ "REGION" -> Right CSRegion
105+ "SERVICE" -> Right CSService
106+ "NAME" -> Right CSName
107+ "IP" -> Right CSIP
108+ x -> Left ("Unable to parse ConditionSys from: " <> x)
109+
110+instance ToHttpApiData ConditionSys where
111+ toQueryParam = \case
112+ CSNoAttr -> "NO_ATTR"
113+ CSRegion -> "REGION"
114+ CSService -> "SERVICE"
115+ CSName -> "NAME"
116+ CSIP -> "IP"
117+
118+instance FromJSON ConditionSys where
119+ parseJSON = parseJSONText "ConditionSys"
120+
121+instance ToJSON ConditionSys where
122+ toJSON = toJSONText
123+
124+-- | The field type.
125+data FieldKind
126+ = TypeUnknown
127+ -- ^ @TYPE_UNKNOWN@
128+ -- Field type unknown.
129+ | TypeDouble
130+ -- ^ @TYPE_DOUBLE@
131+ -- Field type double.
132+ | TypeFloat
133+ -- ^ @TYPE_FLOAT@
134+ -- Field type float.
135+ | TypeINT64
136+ -- ^ @TYPE_INT64@
137+ -- Field type int64.
138+ | TypeUINT64
139+ -- ^ @TYPE_UINT64@
140+ -- Field type uint64.
141+ | TypeINT32
142+ -- ^ @TYPE_INT32@
143+ -- Field type int32.
144+ | TypeFIXED64
145+ -- ^ @TYPE_FIXED64@
146+ -- Field type fixed64.
147+ | TypeFIXED32
148+ -- ^ @TYPE_FIXED32@
149+ -- Field type fixed32.
150+ | TypeBool
151+ -- ^ @TYPE_BOOL@
152+ -- Field type bool.
153+ | TypeString
154+ -- ^ @TYPE_STRING@
155+ -- Field type string.
156+ | TypeGroup
157+ -- ^ @TYPE_GROUP@
158+ -- Field type group. Proto2 syntax only, and deprecated.
159+ | TypeMessage
160+ -- ^ @TYPE_MESSAGE@
161+ -- Field type message.
162+ | TypeBytes
163+ -- ^ @TYPE_BYTES@
164+ -- Field type bytes.
165+ | TypeUINT32
166+ -- ^ @TYPE_UINT32@
167+ -- Field type uint32.
168+ | TypeEnum
169+ -- ^ @TYPE_ENUM@
170+ -- Field type enum.
171+ | TypeSFIXED32
172+ -- ^ @TYPE_SFIXED32@
173+ -- Field type sfixed32.
174+ | TypeSFIXED64
175+ -- ^ @TYPE_SFIXED64@
176+ -- Field type sfixed64.
177+ | TypeSINT32
178+ -- ^ @TYPE_SINT32@
179+ -- Field type sint32.
180+ | TypeSINT64
181+ -- ^ @TYPE_SINT64@
182+ -- Field type sint64.
183+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
184+
185+instance Hashable FieldKind
186+
187+instance FromHttpApiData FieldKind where
188+ parseQueryParam = \case
189+ "TYPE_UNKNOWN" -> Right TypeUnknown
190+ "TYPE_DOUBLE" -> Right TypeDouble
191+ "TYPE_FLOAT" -> Right TypeFloat
192+ "TYPE_INT64" -> Right TypeINT64
193+ "TYPE_UINT64" -> Right TypeUINT64
194+ "TYPE_INT32" -> Right TypeINT32
195+ "TYPE_FIXED64" -> Right TypeFIXED64
196+ "TYPE_FIXED32" -> Right TypeFIXED32
197+ "TYPE_BOOL" -> Right TypeBool
198+ "TYPE_STRING" -> Right TypeString
199+ "TYPE_GROUP" -> Right TypeGroup
200+ "TYPE_MESSAGE" -> Right TypeMessage
201+ "TYPE_BYTES" -> Right TypeBytes
202+ "TYPE_UINT32" -> Right TypeUINT32
203+ "TYPE_ENUM" -> Right TypeEnum
204+ "TYPE_SFIXED32" -> Right TypeSFIXED32
205+ "TYPE_SFIXED64" -> Right TypeSFIXED64
206+ "TYPE_SINT32" -> Right TypeSINT32
207+ "TYPE_SINT64" -> Right TypeSINT64
208+ x -> Left ("Unable to parse FieldKind from: " <> x)
209+
210+instance ToHttpApiData FieldKind where
211+ toQueryParam = \case
212+ TypeUnknown -> "TYPE_UNKNOWN"
213+ TypeDouble -> "TYPE_DOUBLE"
214+ TypeFloat -> "TYPE_FLOAT"
215+ TypeINT64 -> "TYPE_INT64"
216+ TypeUINT64 -> "TYPE_UINT64"
217+ TypeINT32 -> "TYPE_INT32"
218+ TypeFIXED64 -> "TYPE_FIXED64"
219+ TypeFIXED32 -> "TYPE_FIXED32"
220+ TypeBool -> "TYPE_BOOL"
221+ TypeString -> "TYPE_STRING"
222+ TypeGroup -> "TYPE_GROUP"
223+ TypeMessage -> "TYPE_MESSAGE"
224+ TypeBytes -> "TYPE_BYTES"
225+ TypeUINT32 -> "TYPE_UINT32"
226+ TypeEnum -> "TYPE_ENUM"
227+ TypeSFIXED32 -> "TYPE_SFIXED32"
228+ TypeSFIXED64 -> "TYPE_SFIXED64"
229+ TypeSINT32 -> "TYPE_SINT32"
230+ TypeSINT64 -> "TYPE_SINT64"
231+
232+instance FromJSON FieldKind where
233+ parseJSON = parseJSONText "FieldKind"
234+
235+instance ToJSON FieldKind where
236+ toJSON = toJSONText
237+
238+-- | The source syntax.
239+data EnumSyntax
240+ = SyntaxPROTO2
241+ -- ^ @SYNTAX_PROTO2@
242+ -- Syntax \`proto2\`.
243+ | SyntaxPROTO3
244+ -- ^ @SYNTAX_PROTO3@
245+ -- Syntax \`proto3\`.
246+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
247+
248+instance Hashable EnumSyntax
249+
250+instance FromHttpApiData EnumSyntax where
251+ parseQueryParam = \case
252+ "SYNTAX_PROTO2" -> Right SyntaxPROTO2
253+ "SYNTAX_PROTO3" -> Right SyntaxPROTO3
254+ x -> Left ("Unable to parse EnumSyntax from: " <> x)
255+
256+instance ToHttpApiData EnumSyntax where
257+ toQueryParam = \case
258+ SyntaxPROTO2 -> "SYNTAX_PROTO2"
259+ SyntaxPROTO3 -> "SYNTAX_PROTO3"
260+
261+instance FromJSON EnumSyntax where
262+ parseJSON = parseJSONText "EnumSyntax"
263+
264+instance ToJSON EnumSyntax where
265+ toJSON = toJSONText
266+
267+-- | Required
268+data RuleAction
269+ = NoAction
270+ -- ^ @NO_ACTION@
271+ -- Default no action.
272+ | Allow
273+ -- ^ @ALLOW@
274+ -- Matching \'Entries\' grant access.
275+ | AllowWithLog
276+ -- ^ @ALLOW_WITH_LOG@
277+ -- Matching \'Entries\' grant access and the caller promises to log the
278+ -- request per the returned log_configs.
279+ | Deny
280+ -- ^ @DENY@
281+ -- Matching \'Entries\' deny access.
282+ | DenyWithLog
283+ -- ^ @DENY_WITH_LOG@
284+ -- Matching \'Entries\' deny access and the caller promises to log the
285+ -- request per the returned log_configs.
286+ | Log
287+ -- ^ @LOG@
288+ -- Matching \'Entries\' tell IAM.Check callers to generate logs.
289+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
290+
291+instance Hashable RuleAction
292+
293+instance FromHttpApiData RuleAction where
294+ parseQueryParam = \case
295+ "NO_ACTION" -> Right NoAction
296+ "ALLOW" -> Right Allow
297+ "ALLOW_WITH_LOG" -> Right AllowWithLog
298+ "DENY" -> Right Deny
299+ "DENY_WITH_LOG" -> Right DenyWithLog
300+ "LOG" -> Right Log
301+ x -> Left ("Unable to parse RuleAction from: " <> x)
302+
303+instance ToHttpApiData RuleAction where
304+ toQueryParam = \case
305+ NoAction -> "NO_ACTION"
306+ Allow -> "ALLOW"
307+ AllowWithLog -> "ALLOW_WITH_LOG"
308+ Deny -> "DENY"
309+ DenyWithLog -> "DENY_WITH_LOG"
310+ Log -> "LOG"
311+
312+instance FromJSON RuleAction where
313+ parseJSON = parseJSONText "RuleAction"
314+
315+instance ToJSON RuleAction where
316+ toJSON = toJSONText
317+
318+-- | The status code.
319+data StepStatus
320+ = StatusUnspecified
321+ -- ^ @STATUS_UNSPECIFIED@
322+ -- Unspecifed code.
323+ | Done
324+ -- ^ @DONE@
325+ -- The step has completed without errors.
326+ | NotStarted
327+ -- ^ @NOT_STARTED@
328+ -- The step has not started yet.
329+ | InProgress
330+ -- ^ @IN_PROGRESS@
331+ -- The step is in progress.
332+ | Failed
333+ -- ^ @FAILED@
334+ -- The step has completed with errors.
335+ | Cancelled
336+ -- ^ @CANCELLED@
337+ -- The step has completed with cancellation.
338+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
339+
340+instance Hashable StepStatus
341+
342+instance FromHttpApiData StepStatus where
343+ parseQueryParam = \case
344+ "STATUS_UNSPECIFIED" -> Right StatusUnspecified
345+ "DONE" -> Right Done
346+ "NOT_STARTED" -> Right NotStarted
347+ "IN_PROGRESS" -> Right InProgress
348+ "FAILED" -> Right Failed
349+ "CANCELLED" -> Right Cancelled
350+ x -> Left ("Unable to parse StepStatus from: " <> x)
351+
352+instance ToHttpApiData StepStatus where
353+ toQueryParam = \case
354+ StatusUnspecified -> "STATUS_UNSPECIFIED"
355+ Done -> "DONE"
356+ NotStarted -> "NOT_STARTED"
357+ InProgress -> "IN_PROGRESS"
358+ Failed -> "FAILED"
359+ Cancelled -> "CANCELLED"
360+
361+instance FromJSON StepStatus where
362+ parseJSON = parseJSONText "StepStatus"
363+
364+instance ToJSON StepStatus where
365+ toJSON = toJSONText
366+
367+-- | The type of data that can be assigned to the label.
368+data LabelDescriptorValueType
369+ = LDVTString
370+ -- ^ @STRING@
371+ -- A variable-length string. This is the default.
372+ | LDVTBool
373+ -- ^ @BOOL@
374+ -- Boolean; true or false.
375+ | LDVTINT64
376+ -- ^ @INT64@
377+ -- A 64-bit signed integer.
378+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
379+
380+instance Hashable LabelDescriptorValueType
381+
382+instance FromHttpApiData LabelDescriptorValueType where
383+ parseQueryParam = \case
384+ "STRING" -> Right LDVTString
385+ "BOOL" -> Right LDVTBool
386+ "INT64" -> Right LDVTINT64
387+ x -> Left ("Unable to parse LabelDescriptorValueType from: " <> x)
388+
389+instance ToHttpApiData LabelDescriptorValueType where
390+ toQueryParam = \case
391+ LDVTString -> "STRING"
392+ LDVTBool -> "BOOL"
393+ LDVTINT64 -> "INT64"
394+
395+instance FromJSON LabelDescriptorValueType where
396+ parseJSON = parseJSONText "LabelDescriptorValueType"
397+
398+instance ToJSON LabelDescriptorValueType where
399+ toJSON = toJSONText
400+
401+-- | The source syntax of the service.
402+data APISyntax
403+ = ASSyntaxPROTO2
404+ -- ^ @SYNTAX_PROTO2@
405+ -- Syntax \`proto2\`.
406+ | ASSyntaxPROTO3
407+ -- ^ @SYNTAX_PROTO3@
408+ -- Syntax \`proto3\`.
409+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
410+
411+instance Hashable APISyntax
412+
413+instance FromHttpApiData APISyntax where
414+ parseQueryParam = \case
415+ "SYNTAX_PROTO2" -> Right ASSyntaxPROTO2
416+ "SYNTAX_PROTO3" -> Right ASSyntaxPROTO3
417+ x -> Left ("Unable to parse APISyntax from: " <> x)
418+
419+instance ToHttpApiData APISyntax where
420+ toQueryParam = \case
421+ ASSyntaxPROTO2 -> "SYNTAX_PROTO2"
422+ ASSyntaxPROTO3 -> "SYNTAX_PROTO3"
423+
424+instance FromJSON APISyntax where
425+ parseJSON = parseJSONText "APISyntax"
426+
427+instance ToJSON APISyntax where
428+ toJSON = toJSONText
429+
430+-- | The source syntax.
431+data TypeSyntax
432+ = TSSyntaxPROTO2
433+ -- ^ @SYNTAX_PROTO2@
434+ -- Syntax \`proto2\`.
435+ | TSSyntaxPROTO3
436+ -- ^ @SYNTAX_PROTO3@
437+ -- Syntax \`proto3\`.
438+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
439+
440+instance Hashable TypeSyntax
441+
442+instance FromHttpApiData TypeSyntax where
443+ parseQueryParam = \case
444+ "SYNTAX_PROTO2" -> Right TSSyntaxPROTO2
445+ "SYNTAX_PROTO3" -> Right TSSyntaxPROTO3
446+ x -> Left ("Unable to parse TypeSyntax from: " <> x)
447+
448+instance ToHttpApiData TypeSyntax where
449+ toQueryParam = \case
450+ TSSyntaxPROTO2 -> "SYNTAX_PROTO2"
451+ TSSyntaxPROTO3 -> "SYNTAX_PROTO3"
452+
453+instance FromJSON TypeSyntax where
454+ parseJSON = parseJSONText "TypeSyntax"
455+
456+instance ToJSON TypeSyntax where
457+ toJSON = toJSONText
458+
459+-- | An operator to apply the subject with.
460+data ConditionOp
461+ = NoOp
462+ -- ^ @NO_OP@
463+ -- Default no-op.
464+ | Equals
465+ -- ^ @EQUALS@
466+ -- DEPRECATED. Use IN instead.
467+ | NotEquals
468+ -- ^ @NOT_EQUALS@
469+ -- DEPRECATED. Use NOT_IN instead.
470+ | IN
471+ -- ^ @IN@
472+ -- Set-inclusion check.
473+ | NotIn
474+ -- ^ @NOT_IN@
475+ -- Set-exclusion check.
476+ | Discharged
477+ -- ^ @DISCHARGED@
478+ -- Subject is discharged
479+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
480+
481+instance Hashable ConditionOp
482+
483+instance FromHttpApiData ConditionOp where
484+ parseQueryParam = \case
485+ "NO_OP" -> Right NoOp
486+ "EQUALS" -> Right Equals
487+ "NOT_EQUALS" -> Right NotEquals
488+ "IN" -> Right IN
489+ "NOT_IN" -> Right NotIn
490+ "DISCHARGED" -> Right Discharged
491+ x -> Left ("Unable to parse ConditionOp from: " <> x)
492+
493+instance ToHttpApiData ConditionOp where
494+ toQueryParam = \case
495+ NoOp -> "NO_OP"
496+ Equals -> "EQUALS"
497+ NotEquals -> "NOT_EQUALS"
498+ IN -> "IN"
499+ NotIn -> "NOT_IN"
500+ Discharged -> "DISCHARGED"
501+
502+instance FromJSON ConditionOp where
503+ parseJSON = parseJSONText "ConditionOp"
504+
505+instance ToJSON ConditionOp where
506+ toJSON = toJSONText
507+
508+-- | The status of this rollout. Readonly. In case of a failed rollout, the
509+-- system will automatically rollback to the current Rollout version.
510+-- Readonly.
511+data RolloutStatus
512+ = RSRolloutStatusUnspecified
513+ -- ^ @ROLLOUT_STATUS_UNSPECIFIED@
514+ -- No status specified.
515+ | RSInProgress
516+ -- ^ @IN_PROGRESS@
517+ -- The Rollout is in progress.
518+ | RSSuccess
519+ -- ^ @SUCCESS@
520+ -- The Rollout has completed successfully.
521+ | RSCancelled
522+ -- ^ @CANCELLED@
523+ -- The Rollout has been cancelled. This can happen if you have overlapping
524+ -- Rollout pushes, and the previous ones will be cancelled.
525+ | RSFailed
526+ -- ^ @FAILED@
527+ -- The Rollout has failed. It is typically caused by configuration errors.
528+ | RSPending
529+ -- ^ @PENDING@
530+ -- The Rollout has not started yet and is pending for execution.
531+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
532+
533+instance Hashable RolloutStatus
534+
535+instance FromHttpApiData RolloutStatus where
536+ parseQueryParam = \case
537+ "ROLLOUT_STATUS_UNSPECIFIED" -> Right RSRolloutStatusUnspecified
538+ "IN_PROGRESS" -> Right RSInProgress
539+ "SUCCESS" -> Right RSSuccess
540+ "CANCELLED" -> Right RSCancelled
541+ "FAILED" -> Right RSFailed
542+ "PENDING" -> Right RSPending
543+ x -> Left ("Unable to parse RolloutStatus from: " <> x)
544+
545+instance ToHttpApiData RolloutStatus where
546+ toQueryParam = \case
547+ RSRolloutStatusUnspecified -> "ROLLOUT_STATUS_UNSPECIFIED"
548+ RSInProgress -> "IN_PROGRESS"
549+ RSSuccess -> "SUCCESS"
550+ RSCancelled -> "CANCELLED"
551+ RSFailed -> "FAILED"
552+ RSPending -> "PENDING"
553+
554+instance FromJSON RolloutStatus where
555+ parseJSON = parseJSONText "RolloutStatus"
556+
557+instance ToJSON RolloutStatus where
558+ toJSON = toJSONText
559+
560+-- | The kind of diagnostic information provided.
561+data DiagnosticKind
562+ = Warning
563+ -- ^ @WARNING@
564+ -- Warnings and errors
565+ | Error'
566+ -- ^ @ERROR@
567+ -- Only errors
568+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
569+
570+instance Hashable DiagnosticKind
571+
572+instance FromHttpApiData DiagnosticKind where
573+ parseQueryParam = \case
574+ "WARNING" -> Right Warning
575+ "ERROR" -> Right Error'
576+ x -> Left ("Unable to parse DiagnosticKind from: " <> x)
577+
578+instance ToHttpApiData DiagnosticKind where
579+ toQueryParam = \case
580+ Warning -> "WARNING"
581+ Error' -> "ERROR"
582+
583+instance FromJSON DiagnosticKind where
584+ parseJSON = parseJSONText "DiagnosticKind"
585+
586+instance ToJSON DiagnosticKind where
587+ toJSON = toJSONText
588+
589+-- | V1 error format.
590+data Xgafv
591+ = X1
592+ -- ^ @1@
593+ -- v1 error format
594+ | X2
595+ -- ^ @2@
596+ -- v2 error format
597+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
598+
599+instance Hashable Xgafv
600+
601+instance FromHttpApiData Xgafv where
602+ parseQueryParam = \case
603+ "1" -> Right X1
604+ "2" -> Right X2
605+ x -> Left ("Unable to parse Xgafv from: " <> x)
606+
607+instance ToHttpApiData Xgafv where
608+ toQueryParam = \case
609+ X1 -> "1"
610+ X2 -> "2"
611+
612+instance FromJSON Xgafv where
613+ parseJSON = parseJSONText "Xgafv"
614+
615+instance ToJSON Xgafv where
616+ toJSON = toJSONText
617+
618+-- | The type of configuration file this represents.
619+data ConfigFileFileType
620+ = FileTypeUnspecified
621+ -- ^ @FILE_TYPE_UNSPECIFIED@
622+ -- Unknown file type.
623+ | ServiceConfigYaml
624+ -- ^ @SERVICE_CONFIG_YAML@
625+ -- YAML-specification of service.
626+ | OpenAPIJSON
627+ -- ^ @OPEN_API_JSON@
628+ -- OpenAPI specification, serialized in JSON.
629+ | OpenAPIYaml
630+ -- ^ @OPEN_API_YAML@
631+ -- OpenAPI specification, serialized in YAML.
632+ | FileDescriptorSetProto
633+ -- ^ @FILE_DESCRIPTOR_SET_PROTO@
634+ -- FileDescriptorSet, generated by protoc. To generate, use protoc with
635+ -- imports and source info included. For an example test.proto file, the
636+ -- following command would put the value in a new file named out.pb.
637+ -- $protoc --include_imports --include_source_info test.proto -o out.pb
638+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
639+
640+instance Hashable ConfigFileFileType
641+
642+instance FromHttpApiData ConfigFileFileType where
643+ parseQueryParam = \case
644+ "FILE_TYPE_UNSPECIFIED" -> Right FileTypeUnspecified
645+ "SERVICE_CONFIG_YAML" -> Right ServiceConfigYaml
646+ "OPEN_API_JSON" -> Right OpenAPIJSON
647+ "OPEN_API_YAML" -> Right OpenAPIYaml
648+ "FILE_DESCRIPTOR_SET_PROTO" -> Right FileDescriptorSetProto
649+ x -> Left ("Unable to parse ConfigFileFileType from: " <> x)
650+
651+instance ToHttpApiData ConfigFileFileType where
652+ toQueryParam = \case
653+ FileTypeUnspecified -> "FILE_TYPE_UNSPECIFIED"
654+ ServiceConfigYaml -> "SERVICE_CONFIG_YAML"
655+ OpenAPIJSON -> "OPEN_API_JSON"
656+ OpenAPIYaml -> "OPEN_API_YAML"
657+ FileDescriptorSetProto -> "FILE_DESCRIPTOR_SET_PROTO"
658+
659+instance FromJSON ConfigFileFileType where
660+ parseJSON = parseJSONText "ConfigFileFileType"
661+
662+instance ToJSON ConfigFileFileType where
663+ toJSON = toJSONText
664+
665+-- | The type for this change, either ADDED, REMOVED, or MODIFIED.
666+data ConfigChangeChangeType
667+ = ChangeTypeUnspecified
668+ -- ^ @CHANGE_TYPE_UNSPECIFIED@
669+ -- No value was provided.
670+ | Added
671+ -- ^ @ADDED@
672+ -- The changed object exists in the \'new\' service configuration, but not
673+ -- in the \'old\' service configuration.
674+ | Removed
675+ -- ^ @REMOVED@
676+ -- The changed object exists in the \'old\' service configuration, but not
677+ -- in the \'new\' service configuration.
678+ | Modified
679+ -- ^ @MODIFIED@
680+ -- The changed object exists in both service configurations, but its value
681+ -- is different.
682+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
683+
684+instance Hashable ConfigChangeChangeType
685+
686+instance FromHttpApiData ConfigChangeChangeType where
687+ parseQueryParam = \case
688+ "CHANGE_TYPE_UNSPECIFIED" -> Right ChangeTypeUnspecified
689+ "ADDED" -> Right Added
690+ "REMOVED" -> Right Removed
691+ "MODIFIED" -> Right Modified
692+ x -> Left ("Unable to parse ConfigChangeChangeType from: " <> x)
693+
694+instance ToHttpApiData ConfigChangeChangeType where
695+ toQueryParam = \case
696+ ChangeTypeUnspecified -> "CHANGE_TYPE_UNSPECIFIED"
697+ Added -> "ADDED"
698+ Removed -> "REMOVED"
699+ Modified -> "MODIFIED"
700+
701+instance FromJSON ConfigChangeChangeType where
702+ parseJSON = parseJSONText "ConfigChangeChangeType"
703+
704+instance ToJSON ConfigChangeChangeType where
705+ toJSON = toJSONText
706+
707+-- | The field cardinality.
708+data FieldCardinality
709+ = CardinalityUnknown
710+ -- ^ @CARDINALITY_UNKNOWN@
711+ -- For fields with unknown cardinality.
712+ | CardinalityOptional
713+ -- ^ @CARDINALITY_OPTIONAL@
714+ -- For optional fields.
715+ | CardinalityRequired
716+ -- ^ @CARDINALITY_REQUIRED@
717+ -- For required fields. Proto2 syntax only.
718+ | CardinalityRepeated
719+ -- ^ @CARDINALITY_REPEATED@
720+ -- For repeated fields.
721+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
722+
723+instance Hashable FieldCardinality
724+
725+instance FromHttpApiData FieldCardinality where
726+ parseQueryParam = \case
727+ "CARDINALITY_UNKNOWN" -> Right CardinalityUnknown
728+ "CARDINALITY_OPTIONAL" -> Right CardinalityOptional
729+ "CARDINALITY_REQUIRED" -> Right CardinalityRequired
730+ "CARDINALITY_REPEATED" -> Right CardinalityRepeated
731+ x -> Left ("Unable to parse FieldCardinality from: " <> x)
732+
733+instance ToHttpApiData FieldCardinality where
734+ toQueryParam = \case
735+ CardinalityUnknown -> "CARDINALITY_UNKNOWN"
736+ CardinalityOptional -> "CARDINALITY_OPTIONAL"
737+ CardinalityRequired -> "CARDINALITY_REQUIRED"
738+ CardinalityRepeated -> "CARDINALITY_REPEATED"
739+
740+instance FromJSON FieldCardinality where
741+ parseJSON = parseJSONText "FieldCardinality"
742+
743+instance ToJSON FieldCardinality where
744+ toJSON = toJSONText
745+
746+-- | Whether the metric records instantaneous values, changes to a value,
747+-- etc. Some combinations of \`metric_kind\` and \`value_type\` might not
748+-- be supported.
749+data MetricDescriptorMetricKind
750+ = MetricKindUnspecified
751+ -- ^ @METRIC_KIND_UNSPECIFIED@
752+ -- Do not use this default value.
753+ | Gauge
754+ -- ^ @GAUGE@
755+ -- An instantaneous measurement of a value.
756+ | Delta
757+ -- ^ @DELTA@
758+ -- The change in a value during a time interval.
759+ | Cumulative
760+ -- ^ @CUMULATIVE@
761+ -- A value accumulated over a time interval. Cumulative measurements in a
762+ -- time series should have the same start time and increasing end times,
763+ -- until an event resets the cumulative value to zero and sets a new start
764+ -- time for the following points.
765+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
766+
767+instance Hashable MetricDescriptorMetricKind
768+
769+instance FromHttpApiData MetricDescriptorMetricKind where
770+ parseQueryParam = \case
771+ "METRIC_KIND_UNSPECIFIED" -> Right MetricKindUnspecified
772+ "GAUGE" -> Right Gauge
773+ "DELTA" -> Right Delta
774+ "CUMULATIVE" -> Right Cumulative
775+ x -> Left ("Unable to parse MetricDescriptorMetricKind from: " <> x)
776+
777+instance ToHttpApiData MetricDescriptorMetricKind where
778+ toQueryParam = \case
779+ MetricKindUnspecified -> "METRIC_KIND_UNSPECIFIED"
780+ Gauge -> "GAUGE"
781+ Delta -> "DELTA"
782+ Cumulative -> "CUMULATIVE"
783+
784+instance FromJSON MetricDescriptorMetricKind where
785+ parseJSON = parseJSONText "MetricDescriptorMetricKind"
786+
787+instance ToJSON MetricDescriptorMetricKind where
788+ toJSON = toJSONText
789+
790+-- | The source syntax of this method.
791+data MethodSyntax
792+ = MSSyntaxPROTO2
793+ -- ^ @SYNTAX_PROTO2@
794+ -- Syntax \`proto2\`.
795+ | MSSyntaxPROTO3
796+ -- ^ @SYNTAX_PROTO3@
797+ -- Syntax \`proto3\`.
798+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
799+
800+instance Hashable MethodSyntax
801+
802+instance FromHttpApiData MethodSyntax where
803+ parseQueryParam = \case
804+ "SYNTAX_PROTO2" -> Right MSSyntaxPROTO2
805+ "SYNTAX_PROTO3" -> Right MSSyntaxPROTO3
806+ x -> Left ("Unable to parse MethodSyntax from: " <> x)
807+
808+instance ToHttpApiData MethodSyntax where
809+ toQueryParam = \case
810+ MSSyntaxPROTO2 -> "SYNTAX_PROTO2"
811+ MSSyntaxPROTO3 -> "SYNTAX_PROTO3"
812+
813+instance FromJSON MethodSyntax where
814+ parseJSON = parseJSONText "MethodSyntax"
815+
816+instance ToJSON MethodSyntax where
817+ toJSON = toJSONText
818+
819+-- | Trusted attributes supplied by the IAM system.
820+data ConditionIAM
821+ = NoAttr
822+ -- ^ @NO_ATTR@
823+ -- Default non-attribute.
824+ | Authority
825+ -- ^ @AUTHORITY@
826+ -- Either principal or (if present) authority selector.
827+ | Attribution
828+ -- ^ @ATTRIBUTION@
829+ -- The principal (even if an authority selector is present), which must
830+ -- only be used for attribution, not authorization.
831+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
832+
833+instance Hashable ConditionIAM
834+
835+instance FromHttpApiData ConditionIAM where
836+ parseQueryParam = \case
837+ "NO_ATTR" -> Right NoAttr
838+ "AUTHORITY" -> Right Authority
839+ "ATTRIBUTION" -> Right Attribution
840+ x -> Left ("Unable to parse ConditionIAM from: " <> x)
841+
842+instance ToHttpApiData ConditionIAM where
843+ toQueryParam = \case
844+ NoAttr -> "NO_ATTR"
845+ Authority -> "AUTHORITY"
846+ Attribution -> "ATTRIBUTION"
847+
848+instance FromJSON ConditionIAM where
849+ parseJSON = parseJSONText "ConditionIAM"
850+
851+instance ToJSON ConditionIAM where
852+ toJSON = toJSONText
gogol-servicemanagement/gogol-servicemanagement.cabalnew file+67
@@ -0,0 +1,67 @@
1+name: gogol-servicemanagement
2+version: 0.1.0
3+synopsis: Google Service Management 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+ Google Service Management allows service producers to publish their
18+ services on Google Cloud Platform so that they can be discovered and
19+ used by service consumers.
20+ .
21+ /Warning:/ This is an experimental prototype/preview release which is still
22+ under exploratory development and not intended for public use, caveat emptor!
23+ .
24+ This library is compatible with version @v1@
25+ of the API.
26+
27+source-repository head
28+ type: git
29+ location: git://github.com/brendanhay/gogol.git
30+
31+library
32+ default-language: Haskell2010
33+ hs-source-dirs: src gen
34+
35+ ghc-options: -Wall
36+
37+ exposed-modules:
38+ Network.Google.Resource.ServiceManagement.Operations.Get
39+ , Network.Google.Resource.ServiceManagement.Services.Configs.Create
40+ , Network.Google.Resource.ServiceManagement.Services.Configs.Get
41+ , Network.Google.Resource.ServiceManagement.Services.Configs.List
42+ , Network.Google.Resource.ServiceManagement.Services.Configs.Submit
43+ , Network.Google.Resource.ServiceManagement.Services.Create
44+ , Network.Google.Resource.ServiceManagement.Services.Delete
45+ , Network.Google.Resource.ServiceManagement.Services.Disable
46+ , Network.Google.Resource.ServiceManagement.Services.Enable
47+ , Network.Google.Resource.ServiceManagement.Services.GenerateConfigReport
48+ , Network.Google.Resource.ServiceManagement.Services.Get
49+ , Network.Google.Resource.ServiceManagement.Services.GetConfig
50+ , Network.Google.Resource.ServiceManagement.Services.GetIAMPolicy
51+ , Network.Google.Resource.ServiceManagement.Services.List
52+ , Network.Google.Resource.ServiceManagement.Services.Rollouts.Create
53+ , Network.Google.Resource.ServiceManagement.Services.Rollouts.Get
54+ , Network.Google.Resource.ServiceManagement.Services.Rollouts.List
55+ , Network.Google.Resource.ServiceManagement.Services.SetIAMPolicy
56+ , Network.Google.Resource.ServiceManagement.Services.TestIAMPermissions
57+ , Network.Google.Resource.ServiceManagement.Services.Undelete
58+ , Network.Google.ServiceManagement
59+ , Network.Google.ServiceManagement.Types
60+
61+ other-modules:
62+ Network.Google.ServiceManagement.Types.Product
63+ , Network.Google.ServiceManagement.Types.Sum
64+
65+ build-depends:
66+ gogol-core == 0.1.0.*
67+ , base >= 4.7 && < 5
gogol-servicemanagement/src/.gitkeepnew file

No changes to the content.