on develop help sign in
Generating dataproc library

Preliminary fix for #13

commite278c06d106e06bf85b47d198c29e4be4b828f53 authorBrendan Hay <brendan.g.hay@gmail.com> dateFri 18 Mar 2016, 15:46 (11 years ago) parent9465e35
27 files changed+8298
gogol-dataproc/LICENSE+367 gogol-dataproc/Makefile+1 gogol-dataproc/README.md+28 gogol-dataproc/Setup.hs+2 gogol-dataproc/gen/Network/Google/Dataproc.hs+499 gogol-dataproc/gen/Network/Google/Dataproc/Types.hs+420 gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs+3409 gogol-dataproc/gen/Network/Google/Dataproc/Types/Sum.hs+19 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Media/Download.hs+199 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Media/Upload.hs+218 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/Create.hs+202 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/Delete.hs+203 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/Diagnose.hs+209 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/Get.hs+201 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/List.hs+215 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/Patch.hs+235 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/Cancel.hs+221 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/Delete.hs+202 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/Get.hs+198 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/List.hs+241 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/Submit.hs+201 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Operations/Cancel.hs+181 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Operations/Delete.hs+175 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Operations/Get.hs+172 gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Operations/List.hs+217 gogol-dataproc/gogol-dataproc.cabal+63 gogol-dataproc/src/.gitkeep
gogol-dataproc/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-dataproc/Makefilenew file+1
@@ -0,0 +1 @@
1+include ../share/library.mk
gogol-dataproc/README.mdnew file+28
@@ -0,0 +1,28 @@
1+# gogol-dataproc
2+
3+* [Version](#version)
4+* [Description](#description)
5+* [Contribute](#contribute)
6+* [Licence](#licence)
7+
8+
9+## Version
10+
11+`0.0.1`
12+
13+
14+## Description
15+
16+A client library for the Google Cloud Dataproc.
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-dataproc` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
gogol-dataproc/Setup.hsnew file+2
@@ -0,0 +1,2 @@
1+import Distribution.Simple
2+main = defaultMain
gogol-dataproc/gen/Network/Google/Dataproc.hsnew file+499
@@ -0,0 +1,499 @@
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.Dataproc
10+-- Copyright : (c) 2015 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+-- An API for managing Hadoop-based clusters and jobs on Google Cloud
17+-- Platform.
18+--
19+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference>
20+module Network.Google.Dataproc
21+ (
22+ -- * Service Configuration
23+ dataprocService
24+
25+ -- * OAuth Scopes
26+ , loggingAdminScope
27+ , loggingReadScope
28+ , loggingWriteScope
29+ , cloudPlatformScope
30+
31+ -- * API Declaration
32+ , DataprocAPI
33+
34+ -- * Resources
35+
36+ -- ** dataproc.media.download
37+ , module Network.Google.Resource.Dataproc.Media.Download
38+
39+ -- ** dataproc.media.upload
40+ , module Network.Google.Resource.Dataproc.Media.Upload
41+
42+ -- ** dataproc.projects.regions.clusters.create
43+ , module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Create
44+
45+ -- ** dataproc.projects.regions.clusters.delete
46+ , module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Delete
47+
48+ -- ** dataproc.projects.regions.clusters.diagnose
49+ , module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Diagnose
50+
51+ -- ** dataproc.projects.regions.clusters.get
52+ , module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Get
53+
54+ -- ** dataproc.projects.regions.clusters.list
55+ , module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.List
56+
57+ -- ** dataproc.projects.regions.clusters.patch
58+ , module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Patch
59+
60+ -- ** dataproc.projects.regions.jobs.cancel
61+ , module Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Cancel
62+
63+ -- ** dataproc.projects.regions.jobs.delete
64+ , module Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Delete
65+
66+ -- ** dataproc.projects.regions.jobs.get
67+ , module Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Get
68+
69+ -- ** dataproc.projects.regions.jobs.list
70+ , module Network.Google.Resource.Dataproc.Projects.Regions.Jobs.List
71+
72+ -- ** dataproc.projects.regions.jobs.submit
73+ , module Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Submit
74+
75+ -- ** dataproc.projects.regions.operations.cancel
76+ , module Network.Google.Resource.Dataproc.Projects.Regions.Operations.Cancel
77+
78+ -- ** dataproc.projects.regions.operations.delete
79+ , module Network.Google.Resource.Dataproc.Projects.Regions.Operations.Delete
80+
81+ -- ** dataproc.projects.regions.operations.get
82+ , module Network.Google.Resource.Dataproc.Projects.Regions.Operations.Get
83+
84+ -- ** dataproc.projects.regions.operations.list
85+ , module Network.Google.Resource.Dataproc.Projects.Regions.Operations.List
86+
87+ -- * Types
88+
89+ -- ** JobReference
90+ , JobReference
91+ , jobReference
92+ , jrJobId
93+ , jrProjectId
94+
95+ -- ** Status
96+ , Status
97+ , status
98+ , sDetails
99+ , sCode
100+ , sMessage
101+
102+ -- ** OperationSchema
103+ , OperationSchema
104+ , operationSchema
105+ , osAddtional
106+
107+ -- ** PySparkJobProperties
108+ , PySparkJobProperties
109+ , pySparkJobProperties
110+ , psjpAddtional
111+
112+ -- ** DiagnoseClusterResults
113+ , DiagnoseClusterResults
114+ , diagnoseClusterResults
115+ , dcrOutputURI
116+
117+ -- ** InstanceGroupConfig
118+ , InstanceGroupConfig
119+ , instanceGroupConfig
120+ , igcNumInstances
121+ , igcDiskConfig
122+ , igcIsPreemptible
123+ , igcImageURI
124+ , igcInstanceNames
125+ , igcManagedGroupConfig
126+ , igcMachineTypeURI
127+
128+ -- ** SparkJob
129+ , SparkJob
130+ , sparkJob
131+ , sjArgs
132+ , sjMainJarFileURI
133+ , sjJarFileURIs
134+ , sjFileURIs
135+ , sjArchiveURIs
136+ , sjMainClass
137+ , sjLoggingConfig
138+ , sjProperties
139+
140+ -- ** SoftwareConfigProperties
141+ , SoftwareConfigProperties
142+ , softwareConfigProperties
143+ , scpAddtional
144+
145+ -- ** DiskConfig
146+ , DiskConfig
147+ , diskConfig
148+ , dcNumLocalSsds
149+ , dcBootDiskSizeGb
150+
151+ -- ** ListOperationsResponse
152+ , ListOperationsResponse
153+ , listOperationsResponse
154+ , lorNextPageToken
155+ , lorOperations
156+
157+ -- ** HiveJobScriptVariables
158+ , HiveJobScriptVariables
159+ , hiveJobScriptVariables
160+ , hjsvAddtional
161+
162+ -- ** Cluster
163+ , Cluster
164+ , cluster
165+ , cStatus
166+ , cClusterUuid
167+ , cConfig
168+ , cClusterName
169+ , cProjectId
170+ , cStatusHistory
171+
172+ -- ** SubmitJobRequest
173+ , SubmitJobRequest
174+ , submitJobRequest
175+ , sjrJob
176+
177+ -- ** Operation
178+ , Operation
179+ , operation
180+ , oDone
181+ , oError
182+ , oResponse
183+ , oName
184+ , oMetadata
185+
186+ -- ** Empty
187+ , Empty
188+ , empty
189+
190+ -- ** HiveJob
191+ , HiveJob
192+ , hiveJob
193+ , hjQueryFileURI
194+ , hjJarFileURIs
195+ , hjScriptVariables
196+ , hjQueryList
197+ , hjContinueOnFailure
198+ , hjProperties
199+
200+ -- ** SparkSQLJobScriptVariables
201+ , SparkSQLJobScriptVariables
202+ , sparkSQLJobScriptVariables
203+ , ssqljsvAddtional
204+
205+ -- ** PigJobProperties
206+ , PigJobProperties
207+ , pigJobProperties
208+ , pjpAddtional
209+
210+ -- ** ClusterConfig
211+ , ClusterConfig
212+ , clusterConfig
213+ , ccWorkerConfig
214+ , ccInitializationActions
215+ , ccMasterConfig
216+ , ccGceClusterConfig
217+ , ccConfigBucket
218+ , ccSoftwareConfig
219+ , ccSecondaryWorkerConfig
220+
221+ -- ** HadoopJobProperties
222+ , HadoopJobProperties
223+ , hadoopJobProperties
224+ , hjpAddtional
225+
226+ -- ** ClusterOperationStatus
227+ , ClusterOperationStatus
228+ , clusterOperationStatus
229+ , cosState
230+ , cosInnerState
231+ , cosStateStartTime
232+ , cosDetails
233+
234+ -- ** StatusDetailsItem
235+ , StatusDetailsItem
236+ , statusDetailsItem
237+ , sdiAddtional
238+
239+ -- ** SparkSQLJobProperties
240+ , SparkSQLJobProperties
241+ , sparkSQLJobProperties
242+ , ssqljpAddtional
243+
244+ -- ** NodeInitializationAction
245+ , NodeInitializationAction
246+ , nodeInitializationAction
247+ , niaExecutionTimeout
248+ , niaExecutableFile
249+
250+ -- ** JobPlacement
251+ , JobPlacement
252+ , jobPlacement
253+ , jpClusterUuid
254+ , jpClusterName
255+
256+ -- ** GceClusterConfig
257+ , GceClusterConfig
258+ , gceClusterConfig
259+ , gccSubnetworkURI
260+ , gccNetworkURI
261+ , gccZoneURI
262+ , gccMetadata
263+ , gccServiceAccountScopes
264+ , gccTags
265+
266+ -- ** OperationStatus
267+ , OperationStatus
268+ , operationStatus
269+ , osState
270+ , osInnerState
271+ , osStateStartTime
272+ , osDetails
273+
274+ -- ** GceClusterConfigMetadata
275+ , GceClusterConfigMetadata
276+ , gceClusterConfigMetadata
277+ , gccmAddtional
278+
279+ -- ** HiveJobProperties
280+ , HiveJobProperties
281+ , hiveJobProperties
282+ , hAddtional
283+
284+ -- ** Media
285+ , Media
286+ , media
287+ , mResourceName
288+
289+ -- ** DiagnoseClusterOutputLocation
290+ , DiagnoseClusterOutputLocation
291+ , diagnoseClusterOutputLocation
292+ , dcolOutputURI
293+
294+ -- ** Job
295+ , Job
296+ , job
297+ , jSparkJob
298+ , jStatus
299+ , jDriverControlFilesURI
300+ , jHiveJob
301+ , jReference
302+ , jSparkSQLJob
303+ , jHadoopJob
304+ , jPysparkJob
305+ , jDriverOutputResourceURI
306+ , jStatusHistory
307+ , jPlacement
308+ , jPigJob
309+
310+ -- ** DiagnoseClusterRequest
311+ , DiagnoseClusterRequest
312+ , diagnoseClusterRequest
313+
314+ -- ** HadoopJob
315+ , HadoopJob
316+ , hadoopJob
317+ , hArgs
318+ , hMainJarFileURI
319+ , hJarFileURIs
320+ , hFileURIs
321+ , hArchiveURIs
322+ , hMainClass
323+ , hLoggingConfig
324+ , hProperties
325+
326+ -- ** ClusterOperationMetadata
327+ , ClusterOperationMetadata
328+ , clusterOperationMetadata
329+ , comStatus
330+ , comClusterUuid
331+ , comClusterName
332+ , comOperationType
333+ , comStatusHistory
334+ , comDescription
335+
336+ -- ** SparkSQLJob
337+ , SparkSQLJob
338+ , sparkSQLJob
339+ , ssqljQueryFileURI
340+ , ssqljJarFileURIs
341+ , ssqljScriptVariables
342+ , ssqljQueryList
343+ , ssqljLoggingConfig
344+ , ssqljProperties
345+
346+ -- ** SoftwareConfig
347+ , SoftwareConfig
348+ , softwareConfig
349+ , scImageVersion
350+ , scProperties
351+
352+ -- ** ListJobsResponse
353+ , ListJobsResponse
354+ , listJobsResponse
355+ , ljrNextPageToken
356+ , ljrJobs
357+
358+ -- ** SparkJobProperties
359+ , SparkJobProperties
360+ , sparkJobProperties
361+ , sjpAddtional
362+
363+ -- ** PySparkJob
364+ , PySparkJob
365+ , pySparkJob
366+ , psjPythonFileURIs
367+ , psjMainPythonFileURI
368+ , psjArgs
369+ , psjJarFileURIs
370+ , psjFileURIs
371+ , psjArchiveURIs
372+ , psjLoggingConfig
373+ , psjProperties
374+
375+ -- ** ManagedGroupConfig
376+ , ManagedGroupConfig
377+ , managedGroupConfig
378+ , mgcInstanceTemplateName
379+ , mgcInstanceGroupManagerName
380+
381+ -- ** ListClustersResponse
382+ , ListClustersResponse
383+ , listClustersResponse
384+ , lcrNextPageToken
385+ , lcrClusters
386+
387+ -- ** CancelJobRequest
388+ , CancelJobRequest
389+ , cancelJobRequest
390+
391+ -- ** QueryList
392+ , QueryList
393+ , queryList
394+ , qlQueries
395+
396+ -- ** OperationMetadata
397+ , OperationMetadata
398+ , operationMetadata
399+ , omStatus
400+ , omState
401+ , omClusterUuid
402+ , omInsertTime
403+ , omStartTime
404+ , omInnerState
405+ , omEndTime
406+ , omDetails
407+ , omClusterName
408+ , omOperationType
409+ , omStatusHistory
410+ , omDescription
411+
412+ -- ** JobStatus
413+ , JobStatus
414+ , jobStatus
415+ , jsState
416+ , jsStateStartTime
417+ , jsDetails
418+
419+ -- ** PigJobScriptVariables
420+ , PigJobScriptVariables
421+ , pigJobScriptVariables
422+ , pjsvAddtional
423+
424+ -- ** OperationResponse
425+ , OperationResponse
426+ , operationResponse
427+ , orAddtional
428+
429+ -- ** LoggingConfigDriverLogLevels
430+ , LoggingConfigDriverLogLevels
431+ , loggingConfigDriverLogLevels
432+ , lcdllAddtional
433+
434+ -- ** ClusterStatus
435+ , ClusterStatus
436+ , clusterStatus
437+ , csState
438+ , csStateStartTime
439+ , csDetail
440+
441+ -- ** PigJob
442+ , PigJob
443+ , pigJob
444+ , pjQueryFileURI
445+ , pjJarFileURIs
446+ , pjScriptVariables
447+ , pjQueryList
448+ , pjContinueOnFailure
449+ , pjLoggingConfig
450+ , pjProperties
451+
452+ -- ** LoggingConfig
453+ , LoggingConfig
454+ , loggingConfig
455+ , lcDriverLogLevels
456+ ) where
457+
458+import Network.Google.Dataproc.Types
459+import Network.Google.Prelude
460+import Network.Google.Resource.Dataproc.Media.Download
461+import Network.Google.Resource.Dataproc.Media.Upload
462+import Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Create
463+import Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Delete
464+import Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Diagnose
465+import Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Get
466+import Network.Google.Resource.Dataproc.Projects.Regions.Clusters.List
467+import Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Patch
468+import Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Cancel
469+import Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Delete
470+import Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Get
471+import Network.Google.Resource.Dataproc.Projects.Regions.Jobs.List
472+import Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Submit
473+import Network.Google.Resource.Dataproc.Projects.Regions.Operations.Cancel
474+import Network.Google.Resource.Dataproc.Projects.Regions.Operations.Delete
475+import Network.Google.Resource.Dataproc.Projects.Regions.Operations.Get
476+import Network.Google.Resource.Dataproc.Projects.Regions.Operations.List
477+
478+{- $resources
479+TODO
480+-}
481+
482+-- | Represents the entirety of the methods and resources available for the Google Cloud Dataproc API service.
483+type DataprocAPI =
484+ MediaDownloadResource :<|> MediaUploadResource :<|>
485+ ProjectsRegionsJobsListResource
486+ :<|> ProjectsRegionsJobsGetResource
487+ :<|> ProjectsRegionsJobsSubmitResource
488+ :<|> ProjectsRegionsJobsCancelResource
489+ :<|> ProjectsRegionsJobsDeleteResource
490+ :<|> ProjectsRegionsOperationsListResource
491+ :<|> ProjectsRegionsOperationsGetResource
492+ :<|> ProjectsRegionsOperationsCancelResource
493+ :<|> ProjectsRegionsOperationsDeleteResource
494+ :<|> ProjectsRegionsClustersDiagnoseResource
495+ :<|> ProjectsRegionsClustersListResource
496+ :<|> ProjectsRegionsClustersPatchResource
497+ :<|> ProjectsRegionsClustersGetResource
498+ :<|> ProjectsRegionsClustersCreateResource
499+ :<|> ProjectsRegionsClustersDeleteResource
gogol-dataproc/gen/Network/Google/Dataproc/Types.hsnew file+420
@@ -0,0 +1,420 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE NoImplicitPrelude #-}
4+{-# LANGUAGE OverloadedStrings #-}
5+
6+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
7+
8+-- |
9+-- Module : Network.Google.Dataproc.Types
10+-- Copyright : (c) 2015 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+module Network.Google.Dataproc.Types
17+ (
18+ -- * Service Configuration
19+ dataprocService
20+
21+ -- * OAuth Scopes
22+ , loggingAdminScope
23+ , loggingReadScope
24+ , loggingWriteScope
25+ , cloudPlatformScope
26+
27+ -- * JobReference
28+ , JobReference
29+ , jobReference
30+ , jrJobId
31+ , jrProjectId
32+
33+ -- * Status
34+ , Status
35+ , status
36+ , sDetails
37+ , sCode
38+ , sMessage
39+
40+ -- * OperationSchema
41+ , OperationSchema
42+ , operationSchema
43+ , osAddtional
44+
45+ -- * PySparkJobProperties
46+ , PySparkJobProperties
47+ , pySparkJobProperties
48+ , psjpAddtional
49+
50+ -- * DiagnoseClusterResults
51+ , DiagnoseClusterResults
52+ , diagnoseClusterResults
53+ , dcrOutputURI
54+
55+ -- * InstanceGroupConfig
56+ , InstanceGroupConfig
57+ , instanceGroupConfig
58+ , igcNumInstances
59+ , igcDiskConfig
60+ , igcIsPreemptible
61+ , igcImageURI
62+ , igcInstanceNames
63+ , igcManagedGroupConfig
64+ , igcMachineTypeURI
65+
66+ -- * SparkJob
67+ , SparkJob
68+ , sparkJob
69+ , sjArgs
70+ , sjMainJarFileURI
71+ , sjJarFileURIs
72+ , sjFileURIs
73+ , sjArchiveURIs
74+ , sjMainClass
75+ , sjLoggingConfig
76+ , sjProperties
77+
78+ -- * SoftwareConfigProperties
79+ , SoftwareConfigProperties
80+ , softwareConfigProperties
81+ , scpAddtional
82+
83+ -- * DiskConfig
84+ , DiskConfig
85+ , diskConfig
86+ , dcNumLocalSsds
87+ , dcBootDiskSizeGb
88+
89+ -- * ListOperationsResponse
90+ , ListOperationsResponse
91+ , listOperationsResponse
92+ , lorNextPageToken
93+ , lorOperations
94+
95+ -- * HiveJobScriptVariables
96+ , HiveJobScriptVariables
97+ , hiveJobScriptVariables
98+ , hjsvAddtional
99+
100+ -- * Cluster
101+ , Cluster
102+ , cluster
103+ , cStatus
104+ , cClusterUuid
105+ , cConfig
106+ , cClusterName
107+ , cProjectId
108+ , cStatusHistory
109+
110+ -- * SubmitJobRequest
111+ , SubmitJobRequest
112+ , submitJobRequest
113+ , sjrJob
114+
115+ -- * Operation
116+ , Operation
117+ , operation
118+ , oDone
119+ , oError
120+ , oResponse
121+ , oName
122+ , oMetadata
123+
124+ -- * Empty
125+ , Empty
126+ , empty
127+
128+ -- * HiveJob
129+ , HiveJob
130+ , hiveJob
131+ , hjQueryFileURI
132+ , hjJarFileURIs
133+ , hjScriptVariables
134+ , hjQueryList
135+ , hjContinueOnFailure
136+ , hjProperties
137+
138+ -- * SparkSQLJobScriptVariables
139+ , SparkSQLJobScriptVariables
140+ , sparkSQLJobScriptVariables
141+ , ssqljsvAddtional
142+
143+ -- * PigJobProperties
144+ , PigJobProperties
145+ , pigJobProperties
146+ , pjpAddtional
147+
148+ -- * ClusterConfig
149+ , ClusterConfig
150+ , clusterConfig
151+ , ccWorkerConfig
152+ , ccInitializationActions
153+ , ccMasterConfig
154+ , ccGceClusterConfig
155+ , ccConfigBucket
156+ , ccSoftwareConfig
157+ , ccSecondaryWorkerConfig
158+
159+ -- * HadoopJobProperties
160+ , HadoopJobProperties
161+ , hadoopJobProperties
162+ , hjpAddtional
163+
164+ -- * ClusterOperationStatus
165+ , ClusterOperationStatus
166+ , clusterOperationStatus
167+ , cosState
168+ , cosInnerState
169+ , cosStateStartTime
170+ , cosDetails
171+
172+ -- * StatusDetailsItem
173+ , StatusDetailsItem
174+ , statusDetailsItem
175+ , sdiAddtional
176+
177+ -- * SparkSQLJobProperties
178+ , SparkSQLJobProperties
179+ , sparkSQLJobProperties
180+ , ssqljpAddtional
181+
182+ -- * NodeInitializationAction
183+ , NodeInitializationAction
184+ , nodeInitializationAction
185+ , niaExecutionTimeout
186+ , niaExecutableFile
187+
188+ -- * JobPlacement
189+ , JobPlacement
190+ , jobPlacement
191+ , jpClusterUuid
192+ , jpClusterName
193+
194+ -- * GceClusterConfig
195+ , GceClusterConfig
196+ , gceClusterConfig
197+ , gccSubnetworkURI
198+ , gccNetworkURI
199+ , gccZoneURI
200+ , gccMetadata
201+ , gccServiceAccountScopes
202+ , gccTags
203+
204+ -- * OperationStatus
205+ , OperationStatus
206+ , operationStatus
207+ , osState
208+ , osInnerState
209+ , osStateStartTime
210+ , osDetails
211+
212+ -- * GceClusterConfigMetadata
213+ , GceClusterConfigMetadata
214+ , gceClusterConfigMetadata
215+ , gccmAddtional
216+
217+ -- * HiveJobProperties
218+ , HiveJobProperties
219+ , hiveJobProperties
220+ , hAddtional
221+
222+ -- * Media
223+ , Media
224+ , media
225+ , mResourceName
226+
227+ -- * DiagnoseClusterOutputLocation
228+ , DiagnoseClusterOutputLocation
229+ , diagnoseClusterOutputLocation
230+ , dcolOutputURI
231+
232+ -- * Job
233+ , Job
234+ , job
235+ , jSparkJob
236+ , jStatus
237+ , jDriverControlFilesURI
238+ , jHiveJob
239+ , jReference
240+ , jSparkSQLJob
241+ , jHadoopJob
242+ , jPysparkJob
243+ , jDriverOutputResourceURI
244+ , jStatusHistory
245+ , jPlacement
246+ , jPigJob
247+
248+ -- * DiagnoseClusterRequest
249+ , DiagnoseClusterRequest
250+ , diagnoseClusterRequest
251+
252+ -- * HadoopJob
253+ , HadoopJob
254+ , hadoopJob
255+ , hArgs
256+ , hMainJarFileURI
257+ , hJarFileURIs
258+ , hFileURIs
259+ , hArchiveURIs
260+ , hMainClass
261+ , hLoggingConfig
262+ , hProperties
263+
264+ -- * ClusterOperationMetadata
265+ , ClusterOperationMetadata
266+ , clusterOperationMetadata
267+ , comStatus
268+ , comClusterUuid
269+ , comClusterName
270+ , comOperationType
271+ , comStatusHistory
272+ , comDescription
273+
274+ -- * SparkSQLJob
275+ , SparkSQLJob
276+ , sparkSQLJob
277+ , ssqljQueryFileURI
278+ , ssqljJarFileURIs
279+ , ssqljScriptVariables
280+ , ssqljQueryList
281+ , ssqljLoggingConfig
282+ , ssqljProperties
283+
284+ -- * SoftwareConfig
285+ , SoftwareConfig
286+ , softwareConfig
287+ , scImageVersion
288+ , scProperties
289+
290+ -- * ListJobsResponse
291+ , ListJobsResponse
292+ , listJobsResponse
293+ , ljrNextPageToken
294+ , ljrJobs
295+
296+ -- * SparkJobProperties
297+ , SparkJobProperties
298+ , sparkJobProperties
299+ , sjpAddtional
300+
301+ -- * PySparkJob
302+ , PySparkJob
303+ , pySparkJob
304+ , psjPythonFileURIs
305+ , psjMainPythonFileURI
306+ , psjArgs
307+ , psjJarFileURIs
308+ , psjFileURIs
309+ , psjArchiveURIs
310+ , psjLoggingConfig
311+ , psjProperties
312+
313+ -- * ManagedGroupConfig
314+ , ManagedGroupConfig
315+ , managedGroupConfig
316+ , mgcInstanceTemplateName
317+ , mgcInstanceGroupManagerName
318+
319+ -- * ListClustersResponse
320+ , ListClustersResponse
321+ , listClustersResponse
322+ , lcrNextPageToken
323+ , lcrClusters
324+
325+ -- * CancelJobRequest
326+ , CancelJobRequest
327+ , cancelJobRequest
328+
329+ -- * QueryList
330+ , QueryList
331+ , queryList
332+ , qlQueries
333+
334+ -- * OperationMetadata
335+ , OperationMetadata
336+ , operationMetadata
337+ , omStatus
338+ , omState
339+ , omClusterUuid
340+ , omInsertTime
341+ , omStartTime
342+ , omInnerState
343+ , omEndTime
344+ , omDetails
345+ , omClusterName
346+ , omOperationType
347+ , omStatusHistory
348+ , omDescription
349+
350+ -- * JobStatus
351+ , JobStatus
352+ , jobStatus
353+ , jsState
354+ , jsStateStartTime
355+ , jsDetails
356+
357+ -- * PigJobScriptVariables
358+ , PigJobScriptVariables
359+ , pigJobScriptVariables
360+ , pjsvAddtional
361+
362+ -- * OperationResponse
363+ , OperationResponse
364+ , operationResponse
365+ , orAddtional
366+
367+ -- * LoggingConfigDriverLogLevels
368+ , LoggingConfigDriverLogLevels
369+ , loggingConfigDriverLogLevels
370+ , lcdllAddtional
371+
372+ -- * ClusterStatus
373+ , ClusterStatus
374+ , clusterStatus
375+ , csState
376+ , csStateStartTime
377+ , csDetail
378+
379+ -- * PigJob
380+ , PigJob
381+ , pigJob
382+ , pjQueryFileURI
383+ , pjJarFileURIs
384+ , pjScriptVariables
385+ , pjQueryList
386+ , pjContinueOnFailure
387+ , pjLoggingConfig
388+ , pjProperties
389+
390+ -- * LoggingConfig
391+ , LoggingConfig
392+ , loggingConfig
393+ , lcDriverLogLevels
394+ ) where
395+
396+import Network.Google.Dataproc.Types.Product
397+import Network.Google.Dataproc.Types.Sum
398+import Network.Google.Prelude
399+
400+-- | Default request referring to version 'v1' of the Google Cloud Dataproc API. This contains the host and root path used as a starting point for constructing service requests.
401+dataprocService :: ServiceConfig
402+dataprocService
403+ = defaultService (ServiceId "dataproc:v1")
404+ "dataproc.googleapis.com"
405+
406+-- | Administrate log data for your projects
407+loggingAdminScope :: OAuthScope
408+loggingAdminScope = "https://www.googleapis.com/auth/logging.admin";
409+
410+-- | View log data for your projects
411+loggingReadScope :: OAuthScope
412+loggingReadScope = "https://www.googleapis.com/auth/logging.read";
413+
414+-- | Submit log data for your projects
415+loggingWriteScope :: OAuthScope
416+loggingWriteScope = "https://www.googleapis.com/auth/logging.write";
417+
418+-- | View and manage your data across Google Cloud Platform services
419+cloudPlatformScope :: OAuthScope
420+cloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform";
gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hsnew file+3409
@@ -0,0 +1,3409 @@
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.Dataproc.Types.Product
12+-- Copyright : (c) 2015 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.Dataproc.Types.Product where
19+
20+import Network.Google.Dataproc.Types.Sum
21+import Network.Google.Prelude
22+
23+-- | Encapsulates the full scoping used to reference a job.
24+--
25+-- /See:/ 'jobReference' smart constructor.
26+data JobReference = JobReference
27+ { _jrJobId :: !(Maybe Text)
28+ , _jrProjectId :: !(Maybe Text)
29+ } deriving (Eq,Show,Data,Typeable,Generic)
30+
31+-- | Creates a value of 'JobReference' with the minimum fields required to make a request.
32+--
33+-- Use one of the following lenses to modify other fields as desired:
34+--
35+-- * 'jrJobId'
36+--
37+-- * 'jrProjectId'
38+jobReference
39+ :: JobReference
40+jobReference =
41+ JobReference
42+ { _jrJobId = Nothing
43+ , _jrProjectId = Nothing
44+ }
45+
46+-- | [Required] The job ID, which must be unique within the project. The job
47+-- ID is generated by the server upon job submission or provided by the
48+-- user as a means to perform retries without creating duplicate jobs. The
49+-- ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
50+-- or hyphens (-). The maximum length is 512 characters.
51+jrJobId :: Lens' JobReference (Maybe Text)
52+jrJobId = lens _jrJobId (\ s a -> s{_jrJobId = a})
53+
54+-- | [Required] The ID of the Google Cloud Platform project that the job
55+-- belongs to.
56+jrProjectId :: Lens' JobReference (Maybe Text)
57+jrProjectId
58+ = lens _jrProjectId (\ s a -> s{_jrProjectId = a})
59+
60+instance FromJSON JobReference where
61+ parseJSON
62+ = withObject "JobReference"
63+ (\ o ->
64+ JobReference <$>
65+ (o .:? "jobId") <*> (o .:? "projectId"))
66+
67+instance ToJSON JobReference where
68+ toJSON JobReference{..}
69+ = object
70+ (catMaybes
71+ [("jobId" .=) <$> _jrJobId,
72+ ("projectId" .=) <$> _jrProjectId])
73+
74+-- | The \`Status\` type defines a logical error model that is suitable for
75+-- different programming environments, including REST APIs and RPC APIs. It
76+-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is
77+-- designed to be: - Simple to use and understand for most users - Flexible
78+-- enough to meet unexpected needs # Overview The \`Status\` message
79+-- contains three pieces of data: error code, error message, and error
80+-- details. The error code should be an enum value of google.rpc.Code, but
81+-- it may accept additional error codes if needed. The error message should
82+-- be a developer-facing English message that helps developers *understand*
83+-- and *resolve* the error. If a localized user-facing error message is
84+-- needed, put the localized message in the error details or localize it in
85+-- the client. The optional error details may contain arbitrary information
86+-- about the error. There is a predefined set of error detail types in the
87+-- package \`google.rpc\` which can be used for common error conditions. #
88+-- Language mapping The \`Status\` message is the logical representation of
89+-- the error model, but it is not necessarily the actual wire format. When
90+-- the \`Status\` message is exposed in different client libraries and
91+-- different wire protocols, it can be mapped differently. For example, it
92+-- will likely be mapped to some exceptions in Java, but more likely mapped
93+-- to some error codes in C. # Other uses The error model and the
94+-- \`Status\` message can be used in a variety of environments, either with
95+-- or without APIs, to provide a consistent developer experience across
96+-- different environments. Example uses of this error model include: -
97+-- Partial errors. If a service needs to return partial errors to the
98+-- client, it may embed the \`Status\` in the normal response to indicate
99+-- the partial errors. - Workflow errors. A typical workflow has multiple
100+-- steps. Each step may have a \`Status\` message for error reporting
101+-- purpose. - Batch operations. If a client uses batch request and batch
102+-- response, the \`Status\` message should be used directly inside batch
103+-- response, one for each error sub-response. - Asynchronous operations. If
104+-- an API call embeds asynchronous operation results in its response, the
105+-- status of those operations should be represented directly using the
106+-- \`Status\` message. - Logging. If some API errors are stored in logs,
107+-- the message \`Status\` could be used directly after any stripping needed
108+-- for security\/privacy reasons.
109+--
110+-- /See:/ 'status' smart constructor.
111+data Status = Status
112+ { _sDetails :: !(Maybe [StatusDetailsItem])
113+ , _sCode :: !(Maybe (Textual Int32))
114+ , _sMessage :: !(Maybe Text)
115+ } deriving (Eq,Show,Data,Typeable,Generic)
116+
117+-- | Creates a value of 'Status' with the minimum fields required to make a request.
118+--
119+-- Use one of the following lenses to modify other fields as desired:
120+--
121+-- * 'sDetails'
122+--
123+-- * 'sCode'
124+--
125+-- * 'sMessage'
126+status
127+ :: Status
128+status =
129+ Status
130+ { _sDetails = Nothing
131+ , _sCode = Nothing
132+ , _sMessage = Nothing
133+ }
134+
135+-- | A list of messages that carry the error details. There will be a common
136+-- set of message types for APIs to use.
137+sDetails :: Lens' Status [StatusDetailsItem]
138+sDetails
139+ = lens _sDetails (\ s a -> s{_sDetails = a}) .
140+ _Default
141+ . _Coerce
142+
143+-- | The status code, which should be an enum value of google.rpc.Code.
144+sCode :: Lens' Status (Maybe Int32)
145+sCode
146+ = lens _sCode (\ s a -> s{_sCode = a}) .
147+ mapping _Coerce
148+
149+-- | A developer-facing error message, which should be in English. Any
150+-- user-facing error message should be localized and sent in the
151+-- google.rpc.Status.details field, or localized by the client.
152+sMessage :: Lens' Status (Maybe Text)
153+sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
154+
155+instance FromJSON Status where
156+ parseJSON
157+ = withObject "Status"
158+ (\ o ->
159+ Status <$>
160+ (o .:? "details" .!= mempty) <*> (o .:? "code") <*>
161+ (o .:? "message"))
162+
163+instance ToJSON Status where
164+ toJSON Status{..}
165+ = object
166+ (catMaybes
167+ [("details" .=) <$> _sDetails,
168+ ("code" .=) <$> _sCode,
169+ ("message" .=) <$> _sMessage])
170+
171+-- | Service-specific metadata associated with the operation. It typically
172+-- contains progress information and common metadata such as create time.
173+-- Some services might not provide such metadata. Any method that returns a
174+-- long-running operation should document the metadata type, if any.
175+--
176+-- /See:/ 'operationSchema' smart constructor.
177+newtype OperationSchema = OperationSchema
178+ { _osAddtional :: HashMap Text JSONValue
179+ } deriving (Eq,Show,Data,Typeable,Generic)
180+
181+-- | Creates a value of 'OperationSchema' with the minimum fields required to make a request.
182+--
183+-- Use one of the following lenses to modify other fields as desired:
184+--
185+-- * 'osAddtional'
186+operationSchema
187+ :: HashMap Text JSONValue -- ^ 'osAddtional'
188+ -> OperationSchema
189+operationSchema pOsAddtional_ =
190+ OperationSchema
191+ { _osAddtional = _Coerce # pOsAddtional_
192+ }
193+
194+-- | Properties of the object. Contains field \'ype with type URL.
195+osAddtional :: Lens' OperationSchema (HashMap Text JSONValue)
196+osAddtional
197+ = lens _osAddtional (\ s a -> s{_osAddtional = a}) .
198+ _Coerce
199+
200+instance FromJSON OperationSchema where
201+ parseJSON
202+ = withObject "OperationSchema"
203+ (\ o -> OperationSchema <$> (parseJSONObject o))
204+
205+instance ToJSON OperationSchema where
206+ toJSON = toJSON . _osAddtional
207+
208+-- | [Optional] A mapping of property names to values, used to configure
209+-- PySpark. Properties that conflict with values set by the Cloud Dataproc
210+-- API may be overwritten. Can include properties set in
211+-- \/etc\/spark\/conf\/spark-defaults.conf and classes in user code.
212+--
213+-- /See:/ 'pySparkJobProperties' smart constructor.
214+newtype PySparkJobProperties = PySparkJobProperties
215+ { _psjpAddtional :: HashMap Text Text
216+ } deriving (Eq,Show,Data,Typeable,Generic)
217+
218+-- | Creates a value of 'PySparkJobProperties' with the minimum fields required to make a request.
219+--
220+-- Use one of the following lenses to modify other fields as desired:
221+--
222+-- * 'psjpAddtional'
223+pySparkJobProperties
224+ :: HashMap Text Text -- ^ 'psjpAddtional'
225+ -> PySparkJobProperties
226+pySparkJobProperties pPsjpAddtional_ =
227+ PySparkJobProperties
228+ { _psjpAddtional = _Coerce # pPsjpAddtional_
229+ }
230+
231+psjpAddtional :: Lens' PySparkJobProperties (HashMap Text Text)
232+psjpAddtional
233+ = lens _psjpAddtional
234+ (\ s a -> s{_psjpAddtional = a})
235+ . _Coerce
236+
237+instance FromJSON PySparkJobProperties where
238+ parseJSON
239+ = withObject "PySparkJobProperties"
240+ (\ o -> PySparkJobProperties <$> (parseJSONObject o))
241+
242+instance ToJSON PySparkJobProperties where
243+ toJSON = toJSON . _psjpAddtional
244+
245+-- | The location of diagnostic output.
246+--
247+-- /See:/ 'diagnoseClusterResults' smart constructor.
248+newtype DiagnoseClusterResults = DiagnoseClusterResults
249+ { _dcrOutputURI :: Maybe Text
250+ } deriving (Eq,Show,Data,Typeable,Generic)
251+
252+-- | Creates a value of 'DiagnoseClusterResults' with the minimum fields required to make a request.
253+--
254+-- Use one of the following lenses to modify other fields as desired:
255+--
256+-- * 'dcrOutputURI'
257+diagnoseClusterResults
258+ :: DiagnoseClusterResults
259+diagnoseClusterResults =
260+ DiagnoseClusterResults
261+ { _dcrOutputURI = Nothing
262+ }
263+
264+-- | [Output-only] The Google Cloud Storage URI of the diagnostic output.
265+-- This is a plain text file with a summary of collected diagnostics.
266+dcrOutputURI :: Lens' DiagnoseClusterResults (Maybe Text)
267+dcrOutputURI
268+ = lens _dcrOutputURI (\ s a -> s{_dcrOutputURI = a})
269+
270+instance FromJSON DiagnoseClusterResults where
271+ parseJSON
272+ = withObject "DiagnoseClusterResults"
273+ (\ o ->
274+ DiagnoseClusterResults <$> (o .:? "outputUri"))
275+
276+instance ToJSON DiagnoseClusterResults where
277+ toJSON DiagnoseClusterResults{..}
278+ = object
279+ (catMaybes [("outputUri" .=) <$> _dcrOutputURI])
280+
281+-- | The config settings for Google Compute Engine resources in an instance
282+-- group, such as a master or worker group.
283+--
284+-- /See:/ 'instanceGroupConfig' smart constructor.
285+data InstanceGroupConfig = InstanceGroupConfig
286+ { _igcNumInstances :: !(Maybe (Textual Int32))
287+ , _igcDiskConfig :: !(Maybe DiskConfig)
288+ , _igcIsPreemptible :: !(Maybe Bool)
289+ , _igcImageURI :: !(Maybe Text)
290+ , _igcInstanceNames :: !(Maybe [Text])
291+ , _igcManagedGroupConfig :: !(Maybe ManagedGroupConfig)
292+ , _igcMachineTypeURI :: !(Maybe Text)
293+ } deriving (Eq,Show,Data,Typeable,Generic)
294+
295+-- | Creates a value of 'InstanceGroupConfig' with the minimum fields required to make a request.
296+--
297+-- Use one of the following lenses to modify other fields as desired:
298+--
299+-- * 'igcNumInstances'
300+--
301+-- * 'igcDiskConfig'
302+--
303+-- * 'igcIsPreemptible'
304+--
305+-- * 'igcImageURI'
306+--
307+-- * 'igcInstanceNames'
308+--
309+-- * 'igcManagedGroupConfig'
310+--
311+-- * 'igcMachineTypeURI'
312+instanceGroupConfig
313+ :: InstanceGroupConfig
314+instanceGroupConfig =
315+ InstanceGroupConfig
316+ { _igcNumInstances = Nothing
317+ , _igcDiskConfig = Nothing
318+ , _igcIsPreemptible = Nothing
319+ , _igcImageURI = Nothing
320+ , _igcInstanceNames = Nothing
321+ , _igcManagedGroupConfig = Nothing
322+ , _igcMachineTypeURI = Nothing
323+ }
324+
325+-- | The number of VM instances in the instance group. For master instance
326+-- groups, must be set to 1.
327+igcNumInstances :: Lens' InstanceGroupConfig (Maybe Int32)
328+igcNumInstances
329+ = lens _igcNumInstances
330+ (\ s a -> s{_igcNumInstances = a})
331+ . mapping _Coerce
332+
333+-- | Disk option config settings.
334+igcDiskConfig :: Lens' InstanceGroupConfig (Maybe DiskConfig)
335+igcDiskConfig
336+ = lens _igcDiskConfig
337+ (\ s a -> s{_igcDiskConfig = a})
338+
339+-- | Specifies that this instance group contains Preemptible Instances.
340+igcIsPreemptible :: Lens' InstanceGroupConfig (Maybe Bool)
341+igcIsPreemptible
342+ = lens _igcIsPreemptible
343+ (\ s a -> s{_igcIsPreemptible = a})
344+
345+-- | [Output-only] The Google Compute Engine image resource used for cluster
346+-- instances. Inferred from \`SoftwareConfig.image_version\`.
347+igcImageURI :: Lens' InstanceGroupConfig (Maybe Text)
348+igcImageURI
349+ = lens _igcImageURI (\ s a -> s{_igcImageURI = a})
350+
351+-- | The list of instance names. Cloud Dataproc derives the names from
352+-- \`cluster_name\`, \`num_instances\`, and the instance group if not set
353+-- by user (recommended practice is to let Cloud Dataproc derive the name).
354+igcInstanceNames :: Lens' InstanceGroupConfig [Text]
355+igcInstanceNames
356+ = lens _igcInstanceNames
357+ (\ s a -> s{_igcInstanceNames = a})
358+ . _Default
359+ . _Coerce
360+
361+-- | [Output-only] The config for Google Compute Engine Instance Group
362+-- Manager that manages this group. This is only used for preemptible
363+-- instance groups.
364+igcManagedGroupConfig :: Lens' InstanceGroupConfig (Maybe ManagedGroupConfig)
365+igcManagedGroupConfig
366+ = lens _igcManagedGroupConfig
367+ (\ s a -> s{_igcManagedGroupConfig = a})
368+
369+-- | The Google Compute Engine machine type used for cluster instances.
370+-- Example:
371+-- \`https:\/\/www.googleapis.com\/compute\/v1\/projects\/[project_id]\/zones\/us-east1-a\/machineTypes\/n1-standard-2\`.
372+igcMachineTypeURI :: Lens' InstanceGroupConfig (Maybe Text)
373+igcMachineTypeURI
374+ = lens _igcMachineTypeURI
375+ (\ s a -> s{_igcMachineTypeURI = a})
376+
377+instance FromJSON InstanceGroupConfig where
378+ parseJSON
379+ = withObject "InstanceGroupConfig"
380+ (\ o ->
381+ InstanceGroupConfig <$>
382+ (o .:? "numInstances") <*> (o .:? "diskConfig") <*>
383+ (o .:? "isPreemptible")
384+ <*> (o .:? "imageUri")
385+ <*> (o .:? "instanceNames" .!= mempty)
386+ <*> (o .:? "managedGroupConfig")
387+ <*> (o .:? "machineTypeUri"))
388+
389+instance ToJSON InstanceGroupConfig where
390+ toJSON InstanceGroupConfig{..}
391+ = object
392+ (catMaybes
393+ [("numInstances" .=) <$> _igcNumInstances,
394+ ("diskConfig" .=) <$> _igcDiskConfig,
395+ ("isPreemptible" .=) <$> _igcIsPreemptible,
396+ ("imageUri" .=) <$> _igcImageURI,
397+ ("instanceNames" .=) <$> _igcInstanceNames,
398+ ("managedGroupConfig" .=) <$> _igcManagedGroupConfig,
399+ ("machineTypeUri" .=) <$> _igcMachineTypeURI])
400+
401+-- | A Cloud Dataproc job for running Spark applications on YARN.
402+--
403+-- /See:/ 'sparkJob' smart constructor.
404+data SparkJob = SparkJob
405+ { _sjArgs :: !(Maybe [Text])
406+ , _sjMainJarFileURI :: !(Maybe Text)
407+ , _sjJarFileURIs :: !(Maybe [Text])
408+ , _sjFileURIs :: !(Maybe [Text])
409+ , _sjArchiveURIs :: !(Maybe [Text])
410+ , _sjMainClass :: !(Maybe Text)
411+ , _sjLoggingConfig :: !(Maybe LoggingConfig)
412+ , _sjProperties :: !(Maybe SparkJobProperties)
413+ } deriving (Eq,Show,Data,Typeable,Generic)
414+
415+-- | Creates a value of 'SparkJob' with the minimum fields required to make a request.
416+--
417+-- Use one of the following lenses to modify other fields as desired:
418+--
419+-- * 'sjArgs'
420+--
421+-- * 'sjMainJarFileURI'
422+--
423+-- * 'sjJarFileURIs'
424+--
425+-- * 'sjFileURIs'
426+--
427+-- * 'sjArchiveURIs'
428+--
429+-- * 'sjMainClass'
430+--
431+-- * 'sjLoggingConfig'
432+--
433+-- * 'sjProperties'
434+sparkJob
435+ :: SparkJob
436+sparkJob =
437+ SparkJob
438+ { _sjArgs = Nothing
439+ , _sjMainJarFileURI = Nothing
440+ , _sjJarFileURIs = Nothing
441+ , _sjFileURIs = Nothing
442+ , _sjArchiveURIs = Nothing
443+ , _sjMainClass = Nothing
444+ , _sjLoggingConfig = Nothing
445+ , _sjProperties = Nothing
446+ }
447+
448+-- | [Optional] The arguments to pass to the driver. Do not include
449+-- arguments, such as \`--conf\`, that can be set as job properties, since
450+-- a collision may occur that causes an incorrect job submission.
451+sjArgs :: Lens' SparkJob [Text]
452+sjArgs
453+ = lens _sjArgs (\ s a -> s{_sjArgs = a}) . _Default .
454+ _Coerce
455+
456+-- | The HCFS URI of the jar file that contains the main class.
457+sjMainJarFileURI :: Lens' SparkJob (Maybe Text)
458+sjMainJarFileURI
459+ = lens _sjMainJarFileURI
460+ (\ s a -> s{_sjMainJarFileURI = a})
461+
462+-- | [Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Spark
463+-- driver and tasks.
464+sjJarFileURIs :: Lens' SparkJob [Text]
465+sjJarFileURIs
466+ = lens _sjJarFileURIs
467+ (\ s a -> s{_sjJarFileURIs = a})
468+ . _Default
469+ . _Coerce
470+
471+-- | [Optional] HCFS URIs of files to be copied to the working directory of
472+-- Spark drivers and distributed tasks. Useful for naively parallel tasks.
473+sjFileURIs :: Lens' SparkJob [Text]
474+sjFileURIs
475+ = lens _sjFileURIs (\ s a -> s{_sjFileURIs = a}) .
476+ _Default
477+ . _Coerce
478+
479+-- | [Optional] HCFS URIs of archives to be extracted in the working
480+-- directory of Spark drivers and tasks. Supported file types: .jar, .tar,
481+-- .tar.gz, .tgz, and .zip.
482+sjArchiveURIs :: Lens' SparkJob [Text]
483+sjArchiveURIs
484+ = lens _sjArchiveURIs
485+ (\ s a -> s{_sjArchiveURIs = a})
486+ . _Default
487+ . _Coerce
488+
489+-- | The name of the driver\'s main class. The jar file that contains the
490+-- class must be in the default CLASSPATH or specified in
491+-- \`jar_file_uris\`.
492+sjMainClass :: Lens' SparkJob (Maybe Text)
493+sjMainClass
494+ = lens _sjMainClass (\ s a -> s{_sjMainClass = a})
495+
496+-- | [Optional] The runtime log config for job execution.
497+sjLoggingConfig :: Lens' SparkJob (Maybe LoggingConfig)
498+sjLoggingConfig
499+ = lens _sjLoggingConfig
500+ (\ s a -> s{_sjLoggingConfig = a})
501+
502+-- | [Optional] A mapping of property names to values, used to configure
503+-- Spark. Properties that conflict with values set by the Cloud Dataproc
504+-- API may be overwritten. Can include properties set in
505+-- \/etc\/spark\/conf\/spark-defaults.conf and classes in user code.
506+sjProperties :: Lens' SparkJob (Maybe SparkJobProperties)
507+sjProperties
508+ = lens _sjProperties (\ s a -> s{_sjProperties = a})
509+
510+instance FromJSON SparkJob where
511+ parseJSON
512+ = withObject "SparkJob"
513+ (\ o ->
514+ SparkJob <$>
515+ (o .:? "args" .!= mempty) <*>
516+ (o .:? "mainJarFileUri")
517+ <*> (o .:? "jarFileUris" .!= mempty)
518+ <*> (o .:? "fileUris" .!= mempty)
519+ <*> (o .:? "archiveUris" .!= mempty)
520+ <*> (o .:? "mainClass")
521+ <*> (o .:? "loggingConfig")
522+ <*> (o .:? "properties"))
523+
524+instance ToJSON SparkJob where
525+ toJSON SparkJob{..}
526+ = object
527+ (catMaybes
528+ [("args" .=) <$> _sjArgs,
529+ ("mainJarFileUri" .=) <$> _sjMainJarFileURI,
530+ ("jarFileUris" .=) <$> _sjJarFileURIs,
531+ ("fileUris" .=) <$> _sjFileURIs,
532+ ("archiveUris" .=) <$> _sjArchiveURIs,
533+ ("mainClass" .=) <$> _sjMainClass,
534+ ("loggingConfig" .=) <$> _sjLoggingConfig,
535+ ("properties" .=) <$> _sjProperties])
536+
537+-- | [Optional] The properties to set on daemon config files. Property keys
538+-- are specified in \`prefix:property\` format, such as
539+-- \`core:fs.defaultFS\`. The following are supported prefixes and their
540+-- mappings: * core: \`core-site.xml\` * hdfs: \`hdfs-site.xml\` * mapred:
541+-- \`mapred-site.xml\` * yarn: \`yarn-site.xml\` * hive: \`hive-site.xml\`
542+-- * pig: \`pig.properties\` * spark: \`spark-defaults.conf\`
543+--
544+-- /See:/ 'softwareConfigProperties' smart constructor.
545+newtype SoftwareConfigProperties = SoftwareConfigProperties
546+ { _scpAddtional :: HashMap Text Text
547+ } deriving (Eq,Show,Data,Typeable,Generic)
548+
549+-- | Creates a value of 'SoftwareConfigProperties' with the minimum fields required to make a request.
550+--
551+-- Use one of the following lenses to modify other fields as desired:
552+--
553+-- * 'scpAddtional'
554+softwareConfigProperties
555+ :: HashMap Text Text -- ^ 'scpAddtional'
556+ -> SoftwareConfigProperties
557+softwareConfigProperties pScpAddtional_ =
558+ SoftwareConfigProperties
559+ { _scpAddtional = _Coerce # pScpAddtional_
560+ }
561+
562+scpAddtional :: Lens' SoftwareConfigProperties (HashMap Text Text)
563+scpAddtional
564+ = lens _scpAddtional (\ s a -> s{_scpAddtional = a})
565+ . _Coerce
566+
567+instance FromJSON SoftwareConfigProperties where
568+ parseJSON
569+ = withObject "SoftwareConfigProperties"
570+ (\ o ->
571+ SoftwareConfigProperties <$> (parseJSONObject o))
572+
573+instance ToJSON SoftwareConfigProperties where
574+ toJSON = toJSON . _scpAddtional
575+
576+-- | Specifies the config of disk options for a group of VM instances.
577+--
578+-- /See:/ 'diskConfig' smart constructor.
579+data DiskConfig = DiskConfig
580+ { _dcNumLocalSsds :: !(Maybe (Textual Int32))
581+ , _dcBootDiskSizeGb :: !(Maybe (Textual Int32))
582+ } deriving (Eq,Show,Data,Typeable,Generic)
583+
584+-- | Creates a value of 'DiskConfig' with the minimum fields required to make a request.
585+--
586+-- Use one of the following lenses to modify other fields as desired:
587+--
588+-- * 'dcNumLocalSsds'
589+--
590+-- * 'dcBootDiskSizeGb'
591+diskConfig
592+ :: DiskConfig
593+diskConfig =
594+ DiskConfig
595+ { _dcNumLocalSsds = Nothing
596+ , _dcBootDiskSizeGb = Nothing
597+ }
598+
599+-- | [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs
600+-- are not attached, the boot disk is used to store runtime logs and HDFS
601+-- data. If one or more SSDs are attached, this runtime bulk data is spread
602+-- across them, and the boot disk contains only basic config and installed
603+-- binaries.
604+dcNumLocalSsds :: Lens' DiskConfig (Maybe Int32)
605+dcNumLocalSsds
606+ = lens _dcNumLocalSsds
607+ (\ s a -> s{_dcNumLocalSsds = a})
608+ . mapping _Coerce
609+
610+-- | [Optional] Size in GB of the boot disk (default is 500GB).
611+dcBootDiskSizeGb :: Lens' DiskConfig (Maybe Int32)
612+dcBootDiskSizeGb
613+ = lens _dcBootDiskSizeGb
614+ (\ s a -> s{_dcBootDiskSizeGb = a})
615+ . mapping _Coerce
616+
617+instance FromJSON DiskConfig where
618+ parseJSON
619+ = withObject "DiskConfig"
620+ (\ o ->
621+ DiskConfig <$>
622+ (o .:? "numLocalSsds") <*> (o .:? "bootDiskSizeGb"))
623+
624+instance ToJSON DiskConfig where
625+ toJSON DiskConfig{..}
626+ = object
627+ (catMaybes
628+ [("numLocalSsds" .=) <$> _dcNumLocalSsds,
629+ ("bootDiskSizeGb" .=) <$> _dcBootDiskSizeGb])
630+
631+-- | The response message for Operations.ListOperations.
632+--
633+-- /See:/ 'listOperationsResponse' smart constructor.
634+data ListOperationsResponse = ListOperationsResponse
635+ { _lorNextPageToken :: !(Maybe Text)
636+ , _lorOperations :: !(Maybe [Operation])
637+ } deriving (Eq,Show,Data,Typeable,Generic)
638+
639+-- | Creates a value of 'ListOperationsResponse' with the minimum fields required to make a request.
640+--
641+-- Use one of the following lenses to modify other fields as desired:
642+--
643+-- * 'lorNextPageToken'
644+--
645+-- * 'lorOperations'
646+listOperationsResponse
647+ :: ListOperationsResponse
648+listOperationsResponse =
649+ ListOperationsResponse
650+ { _lorNextPageToken = Nothing
651+ , _lorOperations = Nothing
652+ }
653+
654+-- | The standard List next-page token.
655+lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text)
656+lorNextPageToken
657+ = lens _lorNextPageToken
658+ (\ s a -> s{_lorNextPageToken = a})
659+
660+-- | A list of operations that matches the specified filter in the request.
661+lorOperations :: Lens' ListOperationsResponse [Operation]
662+lorOperations
663+ = lens _lorOperations
664+ (\ s a -> s{_lorOperations = a})
665+ . _Default
666+ . _Coerce
667+
668+instance FromJSON ListOperationsResponse where
669+ parseJSON
670+ = withObject "ListOperationsResponse"
671+ (\ o ->
672+ ListOperationsResponse <$>
673+ (o .:? "nextPageToken") <*>
674+ (o .:? "operations" .!= mempty))
675+
676+instance ToJSON ListOperationsResponse where
677+ toJSON ListOperationsResponse{..}
678+ = object
679+ (catMaybes
680+ [("nextPageToken" .=) <$> _lorNextPageToken,
681+ ("operations" .=) <$> _lorOperations])
682+
683+-- | [Optional] Mapping of query variable names to values (equivalent to the
684+-- Hive command: \`SET name=\"value\";\`).
685+--
686+-- /See:/ 'hiveJobScriptVariables' smart constructor.
687+newtype HiveJobScriptVariables = HiveJobScriptVariables
688+ { _hjsvAddtional :: HashMap Text Text
689+ } deriving (Eq,Show,Data,Typeable,Generic)
690+
691+-- | Creates a value of 'HiveJobScriptVariables' with the minimum fields required to make a request.
692+--
693+-- Use one of the following lenses to modify other fields as desired:
694+--
695+-- * 'hjsvAddtional'
696+hiveJobScriptVariables
697+ :: HashMap Text Text -- ^ 'hjsvAddtional'
698+ -> HiveJobScriptVariables
699+hiveJobScriptVariables pHjsvAddtional_ =
700+ HiveJobScriptVariables
701+ { _hjsvAddtional = _Coerce # pHjsvAddtional_
702+ }
703+
704+hjsvAddtional :: Lens' HiveJobScriptVariables (HashMap Text Text)
705+hjsvAddtional
706+ = lens _hjsvAddtional
707+ (\ s a -> s{_hjsvAddtional = a})
708+ . _Coerce
709+
710+instance FromJSON HiveJobScriptVariables where
711+ parseJSON
712+ = withObject "HiveJobScriptVariables"
713+ (\ o ->
714+ HiveJobScriptVariables <$> (parseJSONObject o))
715+
716+instance ToJSON HiveJobScriptVariables where
717+ toJSON = toJSON . _hjsvAddtional
718+
719+-- | Describes the identifying information, config, and status of a cluster
720+-- of Google Compute Engine instances.
721+--
722+-- /See:/ 'cluster' smart constructor.
723+data Cluster = Cluster
724+ { _cStatus :: !(Maybe ClusterStatus)
725+ , _cClusterUuid :: !(Maybe Text)
726+ , _cConfig :: !(Maybe ClusterConfig)
727+ , _cClusterName :: !(Maybe Text)
728+ , _cProjectId :: !(Maybe Text)
729+ , _cStatusHistory :: !(Maybe [ClusterStatus])
730+ } deriving (Eq,Show,Data,Typeable,Generic)
731+
732+-- | Creates a value of 'Cluster' with the minimum fields required to make a request.
733+--
734+-- Use one of the following lenses to modify other fields as desired:
735+--
736+-- * 'cStatus'
737+--
738+-- * 'cClusterUuid'
739+--
740+-- * 'cConfig'
741+--
742+-- * 'cClusterName'
743+--
744+-- * 'cProjectId'
745+--
746+-- * 'cStatusHistory'
747+cluster
748+ :: Cluster
749+cluster =
750+ Cluster
751+ { _cStatus = Nothing
752+ , _cClusterUuid = Nothing
753+ , _cConfig = Nothing
754+ , _cClusterName = Nothing
755+ , _cProjectId = Nothing
756+ , _cStatusHistory = Nothing
757+ }
758+
759+-- | [Output-only] Cluster status.
760+cStatus :: Lens' Cluster (Maybe ClusterStatus)
761+cStatus = lens _cStatus (\ s a -> s{_cStatus = a})
762+
763+-- | [Output-only] A cluster UUID (Unique Universal Identifier). Cloud
764+-- Dataproc generates this value when it creates the cluster.
765+cClusterUuid :: Lens' Cluster (Maybe Text)
766+cClusterUuid
767+ = lens _cClusterUuid (\ s a -> s{_cClusterUuid = a})
768+
769+-- | [Required] The cluster config. Note that Cloud Dataproc may set default
770+-- values, and values may change when clusters are updated.
771+cConfig :: Lens' Cluster (Maybe ClusterConfig)
772+cConfig = lens _cConfig (\ s a -> s{_cConfig = a})
773+
774+-- | [Required] The cluster name. Cluster names within a project must be
775+-- unique. Names of deleted clusters can be reused.
776+cClusterName :: Lens' Cluster (Maybe Text)
777+cClusterName
778+ = lens _cClusterName (\ s a -> s{_cClusterName = a})
779+
780+-- | [Required] The Google Cloud Platform project ID that the cluster belongs
781+-- to.
782+cProjectId :: Lens' Cluster (Maybe Text)
783+cProjectId
784+ = lens _cProjectId (\ s a -> s{_cProjectId = a})
785+
786+-- | [Output-only] The previous cluster status.
787+cStatusHistory :: Lens' Cluster [ClusterStatus]
788+cStatusHistory
789+ = lens _cStatusHistory
790+ (\ s a -> s{_cStatusHistory = a})
791+ . _Default
792+ . _Coerce
793+
794+instance FromJSON Cluster where
795+ parseJSON
796+ = withObject "Cluster"
797+ (\ o ->
798+ Cluster <$>
799+ (o .:? "status") <*> (o .:? "clusterUuid") <*>
800+ (o .:? "config")
801+ <*> (o .:? "clusterName")
802+ <*> (o .:? "projectId")
803+ <*> (o .:? "statusHistory" .!= mempty))
804+
805+instance ToJSON Cluster where
806+ toJSON Cluster{..}
807+ = object
808+ (catMaybes
809+ [("status" .=) <$> _cStatus,
810+ ("clusterUuid" .=) <$> _cClusterUuid,
811+ ("config" .=) <$> _cConfig,
812+ ("clusterName" .=) <$> _cClusterName,
813+ ("projectId" .=) <$> _cProjectId,
814+ ("statusHistory" .=) <$> _cStatusHistory])
815+
816+-- | A request to submit a job.
817+--
818+-- /See:/ 'submitJobRequest' smart constructor.
819+newtype SubmitJobRequest = SubmitJobRequest
820+ { _sjrJob :: Maybe Job
821+ } deriving (Eq,Show,Data,Typeable,Generic)
822+
823+-- | Creates a value of 'SubmitJobRequest' with the minimum fields required to make a request.
824+--
825+-- Use one of the following lenses to modify other fields as desired:
826+--
827+-- * 'sjrJob'
828+submitJobRequest
829+ :: SubmitJobRequest
830+submitJobRequest =
831+ SubmitJobRequest
832+ { _sjrJob = Nothing
833+ }
834+
835+-- | [Required] The job resource.
836+sjrJob :: Lens' SubmitJobRequest (Maybe Job)
837+sjrJob = lens _sjrJob (\ s a -> s{_sjrJob = a})
838+
839+instance FromJSON SubmitJobRequest where
840+ parseJSON
841+ = withObject "SubmitJobRequest"
842+ (\ o -> SubmitJobRequest <$> (o .:? "job"))
843+
844+instance ToJSON SubmitJobRequest where
845+ toJSON SubmitJobRequest{..}
846+ = object (catMaybes [("job" .=) <$> _sjrJob])
847+
848+-- | This resource represents a long-running operation that is the result of
849+-- a network API call.
850+--
851+-- /See:/ 'operation' smart constructor.
852+data Operation = Operation
853+ { _oDone :: !(Maybe Bool)
854+ , _oError :: !(Maybe Status)
855+ , _oResponse :: !(Maybe OperationResponse)
856+ , _oName :: !(Maybe Text)
857+ , _oMetadata :: !(Maybe OperationSchema)
858+ } deriving (Eq,Show,Data,Typeable,Generic)
859+
860+-- | Creates a value of 'Operation' with the minimum fields required to make a request.
861+--
862+-- Use one of the following lenses to modify other fields as desired:
863+--
864+-- * 'oDone'
865+--
866+-- * 'oError'
867+--
868+-- * 'oResponse'
869+--
870+-- * 'oName'
871+--
872+-- * 'oMetadata'
873+operation
874+ :: Operation
875+operation =
876+ Operation
877+ { _oDone = Nothing
878+ , _oError = Nothing
879+ , _oResponse = Nothing
880+ , _oName = Nothing
881+ , _oMetadata = Nothing
882+ }
883+
884+-- | If the value is \`false\`, it means the operation is still in progress.
885+-- If true, the operation is completed, and either \`error\` or
886+-- \`response\` is available.
887+oDone :: Lens' Operation (Maybe Bool)
888+oDone = lens _oDone (\ s a -> s{_oDone = a})
889+
890+-- | The error result of the operation in case of failure.
891+oError :: Lens' Operation (Maybe Status)
892+oError = lens _oError (\ s a -> s{_oError = a})
893+
894+-- | The normal response of the operation in case of success. If the original
895+-- method returns no data on success, such as \`Delete\`, the response is
896+-- \`google.protobuf.Empty\`. If the original method is standard
897+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
898+-- For other methods, the response should have the type \`XxxResponse\`,
899+-- where \`Xxx\` is the original method name. For example, if the original
900+-- method name is \`TakeSnapshot()\`, the inferred response type is
901+-- \`TakeSnapshotResponse\`.
902+oResponse :: Lens' Operation (Maybe OperationResponse)
903+oResponse
904+ = lens _oResponse (\ s a -> s{_oResponse = a})
905+
906+-- | The server-assigned name, which is only unique within the same service
907+-- that originally returns it. If you use the default HTTP mapping, the
908+-- \`name\` should have the format of \`operations\/some\/unique\/name\`.
909+oName :: Lens' Operation (Maybe Text)
910+oName = lens _oName (\ s a -> s{_oName = a})
911+
912+-- | Service-specific metadata associated with the operation. It typically
913+-- contains progress information and common metadata such as create time.
914+-- Some services might not provide such metadata. Any method that returns a
915+-- long-running operation should document the metadata type, if any.
916+oMetadata :: Lens' Operation (Maybe OperationSchema)
917+oMetadata
918+ = lens _oMetadata (\ s a -> s{_oMetadata = a})
919+
920+instance FromJSON Operation where
921+ parseJSON
922+ = withObject "Operation"
923+ (\ o ->
924+ Operation <$>
925+ (o .:? "done") <*> (o .:? "error") <*>
926+ (o .:? "response")
927+ <*> (o .:? "name")
928+ <*> (o .:? "metadata"))
929+
930+instance ToJSON Operation where
931+ toJSON Operation{..}
932+ = object
933+ (catMaybes
934+ [("done" .=) <$> _oDone, ("error" .=) <$> _oError,
935+ ("response" .=) <$> _oResponse,
936+ ("name" .=) <$> _oName,
937+ ("metadata" .=) <$> _oMetadata])
938+
939+-- | A generic empty message that you can re-use to avoid defining duplicated
940+-- empty messages in your APIs. A typical example is to use it as the
941+-- request or the response type of an API method. For instance: service Foo
942+-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The
943+-- JSON representation for \`Empty\` is empty JSON object \`{}\`.
944+--
945+-- /See:/ 'empty' smart constructor.
946+data Empty =
947+ Empty
948+ deriving (Eq,Show,Data,Typeable,Generic)
949+
950+-- | Creates a value of 'Empty' with the minimum fields required to make a request.
951+--
952+empty
953+ :: Empty
954+empty = Empty
955+
956+instance FromJSON Empty where
957+ parseJSON = withObject "Empty" (\ o -> pure Empty)
958+
959+instance ToJSON Empty where
960+ toJSON = const emptyObject
961+
962+-- | A Cloud Dataproc job for running Hive queries on YARN.
963+--
964+-- /See:/ 'hiveJob' smart constructor.
965+data HiveJob = HiveJob
966+ { _hjQueryFileURI :: !(Maybe Text)
967+ , _hjJarFileURIs :: !(Maybe [Text])
968+ , _hjScriptVariables :: !(Maybe HiveJobScriptVariables)
969+ , _hjQueryList :: !(Maybe QueryList)
970+ , _hjContinueOnFailure :: !(Maybe Bool)
971+ , _hjProperties :: !(Maybe HiveJobProperties)
972+ } deriving (Eq,Show,Data,Typeable,Generic)
973+
974+-- | Creates a value of 'HiveJob' with the minimum fields required to make a request.
975+--
976+-- Use one of the following lenses to modify other fields as desired:
977+--
978+-- * 'hjQueryFileURI'
979+--
980+-- * 'hjJarFileURIs'
981+--
982+-- * 'hjScriptVariables'
983+--
984+-- * 'hjQueryList'
985+--
986+-- * 'hjContinueOnFailure'
987+--
988+-- * 'hjProperties'
989+hiveJob
990+ :: HiveJob
991+hiveJob =
992+ HiveJob
993+ { _hjQueryFileURI = Nothing
994+ , _hjJarFileURIs = Nothing
995+ , _hjScriptVariables = Nothing
996+ , _hjQueryList = Nothing
997+ , _hjContinueOnFailure = Nothing
998+ , _hjProperties = Nothing
999+ }
1000+
1001+-- | The HCFS URI of the script that contains Hive queries.
1002+hjQueryFileURI :: Lens' HiveJob (Maybe Text)
1003+hjQueryFileURI
1004+ = lens _hjQueryFileURI
1005+ (\ s a -> s{_hjQueryFileURI = a})
1006+
1007+-- | [Optional] HCFS URIs of jar files to add to the CLASSPATH of the Hive
1008+-- server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and
1009+-- UDFs.
1010+hjJarFileURIs :: Lens' HiveJob [Text]
1011+hjJarFileURIs
1012+ = lens _hjJarFileURIs
1013+ (\ s a -> s{_hjJarFileURIs = a})
1014+ . _Default
1015+ . _Coerce
1016+
1017+-- | [Optional] Mapping of query variable names to values (equivalent to the
1018+-- Hive command: \`SET name=\"value\";\`).
1019+hjScriptVariables :: Lens' HiveJob (Maybe HiveJobScriptVariables)
1020+hjScriptVariables
1021+ = lens _hjScriptVariables
1022+ (\ s a -> s{_hjScriptVariables = a})
1023+
1024+-- | A list of queries.
1025+hjQueryList :: Lens' HiveJob (Maybe QueryList)
1026+hjQueryList
1027+ = lens _hjQueryList (\ s a -> s{_hjQueryList = a})
1028+
1029+-- | [Optional] Whether to continue executing queries if a query fails. The
1030+-- default value is \`false\`. Setting to \`true\` can be useful when
1031+-- executing independent parallel queries.
1032+hjContinueOnFailure :: Lens' HiveJob (Maybe Bool)
1033+hjContinueOnFailure
1034+ = lens _hjContinueOnFailure
1035+ (\ s a -> s{_hjContinueOnFailure = a})
1036+
1037+-- | [Optional] A mapping of property names and values, used to configure
1038+-- Hive. Properties that conflict with values set by the Cloud Dataproc API
1039+-- may be overwritten. Can include properties set in
1040+-- \/etc\/hadoop\/conf\/*-site.xml, \/etc\/hive\/conf\/hive-site.xml, and
1041+-- classes in user code.
1042+hjProperties :: Lens' HiveJob (Maybe HiveJobProperties)
1043+hjProperties
1044+ = lens _hjProperties (\ s a -> s{_hjProperties = a})
1045+
1046+instance FromJSON HiveJob where
1047+ parseJSON
1048+ = withObject "HiveJob"
1049+ (\ o ->
1050+ HiveJob <$>
1051+ (o .:? "queryFileUri") <*>
1052+ (o .:? "jarFileUris" .!= mempty)
1053+ <*> (o .:? "scriptVariables")
1054+ <*> (o .:? "queryList")
1055+ <*> (o .:? "continueOnFailure")
1056+ <*> (o .:? "properties"))
1057+
1058+instance ToJSON HiveJob where
1059+ toJSON HiveJob{..}
1060+ = object
1061+ (catMaybes
1062+ [("queryFileUri" .=) <$> _hjQueryFileURI,
1063+ ("jarFileUris" .=) <$> _hjJarFileURIs,
1064+ ("scriptVariables" .=) <$> _hjScriptVariables,
1065+ ("queryList" .=) <$> _hjQueryList,
1066+ ("continueOnFailure" .=) <$> _hjContinueOnFailure,
1067+ ("properties" .=) <$> _hjProperties])
1068+
1069+-- | [Optional] Mapping of query variable names to values (equivalent to the
1070+-- Spark SQL command: SET \`name=\"value\";\`).
1071+--
1072+-- /See:/ 'sparkSQLJobScriptVariables' smart constructor.
1073+newtype SparkSQLJobScriptVariables = SparkSQLJobScriptVariables
1074+ { _ssqljsvAddtional :: HashMap Text Text
1075+ } deriving (Eq,Show,Data,Typeable,Generic)
1076+
1077+-- | Creates a value of 'SparkSQLJobScriptVariables' with the minimum fields required to make a request.
1078+--
1079+-- Use one of the following lenses to modify other fields as desired:
1080+--
1081+-- * 'ssqljsvAddtional'
1082+sparkSQLJobScriptVariables
1083+ :: HashMap Text Text -- ^ 'ssqljsvAddtional'
1084+ -> SparkSQLJobScriptVariables
1085+sparkSQLJobScriptVariables pSsqljsvAddtional_ =
1086+ SparkSQLJobScriptVariables
1087+ { _ssqljsvAddtional = _Coerce # pSsqljsvAddtional_
1088+ }
1089+
1090+ssqljsvAddtional :: Lens' SparkSQLJobScriptVariables (HashMap Text Text)
1091+ssqljsvAddtional
1092+ = lens _ssqljsvAddtional
1093+ (\ s a -> s{_ssqljsvAddtional = a})
1094+ . _Coerce
1095+
1096+instance FromJSON SparkSQLJobScriptVariables where
1097+ parseJSON
1098+ = withObject "SparkSQLJobScriptVariables"
1099+ (\ o ->
1100+ SparkSQLJobScriptVariables <$> (parseJSONObject o))
1101+
1102+instance ToJSON SparkSQLJobScriptVariables where
1103+ toJSON = toJSON . _ssqljsvAddtional
1104+
1105+-- | [Optional] A mapping of property names to values, used to configure Pig.
1106+-- Properties that conflict with values set by the Cloud Dataproc API may
1107+-- be overwritten. Can include properties set in
1108+-- \/etc\/hadoop\/conf\/*-site.xml, \/etc\/pig\/conf\/pig.properties, and
1109+-- classes in user code.
1110+--
1111+-- /See:/ 'pigJobProperties' smart constructor.
1112+newtype PigJobProperties = PigJobProperties
1113+ { _pjpAddtional :: HashMap Text Text
1114+ } deriving (Eq,Show,Data,Typeable,Generic)
1115+
1116+-- | Creates a value of 'PigJobProperties' with the minimum fields required to make a request.
1117+--
1118+-- Use one of the following lenses to modify other fields as desired:
1119+--
1120+-- * 'pjpAddtional'
1121+pigJobProperties
1122+ :: HashMap Text Text -- ^ 'pjpAddtional'
1123+ -> PigJobProperties
1124+pigJobProperties pPjpAddtional_ =
1125+ PigJobProperties
1126+ { _pjpAddtional = _Coerce # pPjpAddtional_
1127+ }
1128+
1129+pjpAddtional :: Lens' PigJobProperties (HashMap Text Text)
1130+pjpAddtional
1131+ = lens _pjpAddtional (\ s a -> s{_pjpAddtional = a})
1132+ . _Coerce
1133+
1134+instance FromJSON PigJobProperties where
1135+ parseJSON
1136+ = withObject "PigJobProperties"
1137+ (\ o -> PigJobProperties <$> (parseJSONObject o))
1138+
1139+instance ToJSON PigJobProperties where
1140+ toJSON = toJSON . _pjpAddtional
1141+
1142+-- | The cluster config.
1143+--
1144+-- /See:/ 'clusterConfig' smart constructor.
1145+data ClusterConfig = ClusterConfig
1146+ { _ccWorkerConfig :: !(Maybe InstanceGroupConfig)
1147+ , _ccInitializationActions :: !(Maybe [NodeInitializationAction])
1148+ , _ccMasterConfig :: !(Maybe InstanceGroupConfig)
1149+ , _ccGceClusterConfig :: !(Maybe GceClusterConfig)
1150+ , _ccConfigBucket :: !(Maybe Text)
1151+ , _ccSoftwareConfig :: !(Maybe SoftwareConfig)
1152+ , _ccSecondaryWorkerConfig :: !(Maybe InstanceGroupConfig)
1153+ } deriving (Eq,Show,Data,Typeable,Generic)
1154+
1155+-- | Creates a value of 'ClusterConfig' with the minimum fields required to make a request.
1156+--
1157+-- Use one of the following lenses to modify other fields as desired:
1158+--
1159+-- * 'ccWorkerConfig'
1160+--
1161+-- * 'ccInitializationActions'
1162+--
1163+-- * 'ccMasterConfig'
1164+--
1165+-- * 'ccGceClusterConfig'
1166+--
1167+-- * 'ccConfigBucket'
1168+--
1169+-- * 'ccSoftwareConfig'
1170+--
1171+-- * 'ccSecondaryWorkerConfig'
1172+clusterConfig
1173+ :: ClusterConfig
1174+clusterConfig =
1175+ ClusterConfig
1176+ { _ccWorkerConfig = Nothing
1177+ , _ccInitializationActions = Nothing
1178+ , _ccMasterConfig = Nothing
1179+ , _ccGceClusterConfig = Nothing
1180+ , _ccConfigBucket = Nothing
1181+ , _ccSoftwareConfig = Nothing
1182+ , _ccSecondaryWorkerConfig = Nothing
1183+ }
1184+
1185+-- | [Optional] The Google Compute Engine config settings for worker
1186+-- instances in a cluster.
1187+ccWorkerConfig :: Lens' ClusterConfig (Maybe InstanceGroupConfig)
1188+ccWorkerConfig
1189+ = lens _ccWorkerConfig
1190+ (\ s a -> s{_ccWorkerConfig = a})
1191+
1192+-- | [Optional] Commands to execute on each node after config is completed.
1193+-- By default, executables are run on master and all worker nodes. You can
1194+-- test a node\'s role metadata to run an executable on a master or worker
1195+-- node, as shown below:
1196+-- ROLE=$(\/usr\/share\/google\/get_metadata_value attributes\/role) if [[ \"${ROLE}\"
1197+-- == \'Master\' ]]; then ... master specific actions ... else ... worker
1198+-- specific actions ... fi
1199+ccInitializationActions :: Lens' ClusterConfig [NodeInitializationAction]
1200+ccInitializationActions
1201+ = lens _ccInitializationActions
1202+ (\ s a -> s{_ccInitializationActions = a})
1203+ . _Default
1204+ . _Coerce
1205+
1206+-- | [Optional] The Google Compute Engine config settings for the master
1207+-- instance in a cluster.
1208+ccMasterConfig :: Lens' ClusterConfig (Maybe InstanceGroupConfig)
1209+ccMasterConfig
1210+ = lens _ccMasterConfig
1211+ (\ s a -> s{_ccMasterConfig = a})
1212+
1213+-- | [Optional] The shared Google Compute Engine config settings for all
1214+-- instances in a cluster.
1215+ccGceClusterConfig :: Lens' ClusterConfig (Maybe GceClusterConfig)
1216+ccGceClusterConfig
1217+ = lens _ccGceClusterConfig
1218+ (\ s a -> s{_ccGceClusterConfig = a})
1219+
1220+-- | [Optional] A Google Cloud Storage staging bucket used for sharing
1221+-- generated SSH keys and config. If you do not specify a staging bucket,
1222+-- Cloud Dataproc will determine an appropriate Cloud Storage location (US,
1223+-- ASIA, or EU) for your cluster\'s staging bucket according to the Google
1224+-- Compute Engine zone where your cluster is deployed, and then it will
1225+-- create and manage this project-level, per-location bucket for you.
1226+ccConfigBucket :: Lens' ClusterConfig (Maybe Text)
1227+ccConfigBucket
1228+ = lens _ccConfigBucket
1229+ (\ s a -> s{_ccConfigBucket = a})
1230+
1231+-- | [Optional] The config settings for software inside the cluster.
1232+ccSoftwareConfig :: Lens' ClusterConfig (Maybe SoftwareConfig)
1233+ccSoftwareConfig
1234+ = lens _ccSoftwareConfig
1235+ (\ s a -> s{_ccSoftwareConfig = a})
1236+
1237+-- | [Optional] The Google Compute Engine config settings for additional
1238+-- worker instances in a cluster.
1239+ccSecondaryWorkerConfig :: Lens' ClusterConfig (Maybe InstanceGroupConfig)
1240+ccSecondaryWorkerConfig
1241+ = lens _ccSecondaryWorkerConfig
1242+ (\ s a -> s{_ccSecondaryWorkerConfig = a})
1243+
1244+instance FromJSON ClusterConfig where
1245+ parseJSON
1246+ = withObject "ClusterConfig"
1247+ (\ o ->
1248+ ClusterConfig <$>
1249+ (o .:? "workerConfig") <*>
1250+ (o .:? "initializationActions" .!= mempty)
1251+ <*> (o .:? "masterConfig")
1252+ <*> (o .:? "gceClusterConfig")
1253+ <*> (o .:? "configBucket")
1254+ <*> (o .:? "softwareConfig")
1255+ <*> (o .:? "secondaryWorkerConfig"))
1256+
1257+instance ToJSON ClusterConfig where
1258+ toJSON ClusterConfig{..}
1259+ = object
1260+ (catMaybes
1261+ [("workerConfig" .=) <$> _ccWorkerConfig,
1262+ ("initializationActions" .=) <$>
1263+ _ccInitializationActions,
1264+ ("masterConfig" .=) <$> _ccMasterConfig,
1265+ ("gceClusterConfig" .=) <$> _ccGceClusterConfig,
1266+ ("configBucket" .=) <$> _ccConfigBucket,
1267+ ("softwareConfig" .=) <$> _ccSoftwareConfig,
1268+ ("secondaryWorkerConfig" .=) <$>
1269+ _ccSecondaryWorkerConfig])
1270+
1271+-- | [Optional] A mapping of property names to values, used to configure
1272+-- Hadoop. Properties that conflict with values set by the Cloud Dataproc
1273+-- API may be overwritten. Can include properties set in
1274+-- \/etc\/hadoop\/conf\/*-site and classes in user code.
1275+--
1276+-- /See:/ 'hadoopJobProperties' smart constructor.
1277+newtype HadoopJobProperties = HadoopJobProperties
1278+ { _hjpAddtional :: HashMap Text Text
1279+ } deriving (Eq,Show,Data,Typeable,Generic)
1280+
1281+-- | Creates a value of 'HadoopJobProperties' with the minimum fields required to make a request.
1282+--
1283+-- Use one of the following lenses to modify other fields as desired:
1284+--
1285+-- * 'hjpAddtional'
1286+hadoopJobProperties
1287+ :: HashMap Text Text -- ^ 'hjpAddtional'
1288+ -> HadoopJobProperties
1289+hadoopJobProperties pHjpAddtional_ =
1290+ HadoopJobProperties
1291+ { _hjpAddtional = _Coerce # pHjpAddtional_
1292+ }
1293+
1294+hjpAddtional :: Lens' HadoopJobProperties (HashMap Text Text)
1295+hjpAddtional
1296+ = lens _hjpAddtional (\ s a -> s{_hjpAddtional = a})
1297+ . _Coerce
1298+
1299+instance FromJSON HadoopJobProperties where
1300+ parseJSON
1301+ = withObject "HadoopJobProperties"
1302+ (\ o -> HadoopJobProperties <$> (parseJSONObject o))
1303+
1304+instance ToJSON HadoopJobProperties where
1305+ toJSON = toJSON . _hjpAddtional
1306+
1307+-- | The status of the operation.
1308+--
1309+-- /See:/ 'clusterOperationStatus' smart constructor.
1310+data ClusterOperationStatus = ClusterOperationStatus
1311+ { _cosState :: !(Maybe Text)
1312+ , _cosInnerState :: !(Maybe Text)
1313+ , _cosStateStartTime :: !(Maybe Text)
1314+ , _cosDetails :: !(Maybe Text)
1315+ } deriving (Eq,Show,Data,Typeable,Generic)
1316+
1317+-- | Creates a value of 'ClusterOperationStatus' with the minimum fields required to make a request.
1318+--
1319+-- Use one of the following lenses to modify other fields as desired:
1320+--
1321+-- * 'cosState'
1322+--
1323+-- * 'cosInnerState'
1324+--
1325+-- * 'cosStateStartTime'
1326+--
1327+-- * 'cosDetails'
1328+clusterOperationStatus
1329+ :: ClusterOperationStatus
1330+clusterOperationStatus =
1331+ ClusterOperationStatus
1332+ { _cosState = Nothing
1333+ , _cosInnerState = Nothing
1334+ , _cosStateStartTime = Nothing
1335+ , _cosDetails = Nothing
1336+ }
1337+
1338+-- | A message containing the operation state.
1339+cosState :: Lens' ClusterOperationStatus (Maybe Text)
1340+cosState = lens _cosState (\ s a -> s{_cosState = a})
1341+
1342+-- | A message containing the detailed operation state.
1343+cosInnerState :: Lens' ClusterOperationStatus (Maybe Text)
1344+cosInnerState
1345+ = lens _cosInnerState
1346+ (\ s a -> s{_cosInnerState = a})
1347+
1348+-- | The time this state was entered.
1349+cosStateStartTime :: Lens' ClusterOperationStatus (Maybe Text)
1350+cosStateStartTime
1351+ = lens _cosStateStartTime
1352+ (\ s a -> s{_cosStateStartTime = a})
1353+
1354+-- | A message containing any operation metadata details.
1355+cosDetails :: Lens' ClusterOperationStatus (Maybe Text)
1356+cosDetails
1357+ = lens _cosDetails (\ s a -> s{_cosDetails = a})
1358+
1359+instance FromJSON ClusterOperationStatus where
1360+ parseJSON
1361+ = withObject "ClusterOperationStatus"
1362+ (\ o ->
1363+ ClusterOperationStatus <$>
1364+ (o .:? "state") <*> (o .:? "innerState") <*>
1365+ (o .:? "stateStartTime")
1366+ <*> (o .:? "details"))
1367+
1368+instance ToJSON ClusterOperationStatus where
1369+ toJSON ClusterOperationStatus{..}
1370+ = object
1371+ (catMaybes
1372+ [("state" .=) <$> _cosState,
1373+ ("innerState" .=) <$> _cosInnerState,
1374+ ("stateStartTime" .=) <$> _cosStateStartTime,
1375+ ("details" .=) <$> _cosDetails])
1376+
1377+--
1378+-- /See:/ 'statusDetailsItem' smart constructor.
1379+newtype StatusDetailsItem = StatusDetailsItem
1380+ { _sdiAddtional :: HashMap Text JSONValue
1381+ } deriving (Eq,Show,Data,Typeable,Generic)
1382+
1383+-- | Creates a value of 'StatusDetailsItem' with the minimum fields required to make a request.
1384+--
1385+-- Use one of the following lenses to modify other fields as desired:
1386+--
1387+-- * 'sdiAddtional'
1388+statusDetailsItem
1389+ :: HashMap Text JSONValue -- ^ 'sdiAddtional'
1390+ -> StatusDetailsItem
1391+statusDetailsItem pSdiAddtional_ =
1392+ StatusDetailsItem
1393+ { _sdiAddtional = _Coerce # pSdiAddtional_
1394+ }
1395+
1396+-- | Properties of the object. Contains field \'ype with type URL.
1397+sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
1398+sdiAddtional
1399+ = lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
1400+ . _Coerce
1401+
1402+instance FromJSON StatusDetailsItem where
1403+ parseJSON
1404+ = withObject "StatusDetailsItem"
1405+ (\ o -> StatusDetailsItem <$> (parseJSONObject o))
1406+
1407+instance ToJSON StatusDetailsItem where
1408+ toJSON = toJSON . _sdiAddtional
1409+
1410+-- | [Optional] A mapping of property names to values, used to configure
1411+-- Spark SQL\'s SparkConf. Properties that conflict with values set by the
1412+-- Cloud Dataproc API may be overwritten.
1413+--
1414+-- /See:/ 'sparkSQLJobProperties' smart constructor.
1415+newtype SparkSQLJobProperties = SparkSQLJobProperties
1416+ { _ssqljpAddtional :: HashMap Text Text
1417+ } deriving (Eq,Show,Data,Typeable,Generic)
1418+
1419+-- | Creates a value of 'SparkSQLJobProperties' with the minimum fields required to make a request.
1420+--
1421+-- Use one of the following lenses to modify other fields as desired:
1422+--
1423+-- * 'ssqljpAddtional'
1424+sparkSQLJobProperties
1425+ :: HashMap Text Text -- ^ 'ssqljpAddtional'
1426+ -> SparkSQLJobProperties
1427+sparkSQLJobProperties pSsqljpAddtional_ =
1428+ SparkSQLJobProperties
1429+ { _ssqljpAddtional = _Coerce # pSsqljpAddtional_
1430+ }
1431+
1432+ssqljpAddtional :: Lens' SparkSQLJobProperties (HashMap Text Text)
1433+ssqljpAddtional
1434+ = lens _ssqljpAddtional
1435+ (\ s a -> s{_ssqljpAddtional = a})
1436+ . _Coerce
1437+
1438+instance FromJSON SparkSQLJobProperties where
1439+ parseJSON
1440+ = withObject "SparkSQLJobProperties"
1441+ (\ o ->
1442+ SparkSQLJobProperties <$> (parseJSONObject o))
1443+
1444+instance ToJSON SparkSQLJobProperties where
1445+ toJSON = toJSON . _ssqljpAddtional
1446+
1447+-- | Specifies an executable to run on a fully configured node and a timeout
1448+-- period for executable completion.
1449+--
1450+-- /See:/ 'nodeInitializationAction' smart constructor.
1451+data NodeInitializationAction = NodeInitializationAction
1452+ { _niaExecutionTimeout :: !(Maybe Text)
1453+ , _niaExecutableFile :: !(Maybe Text)
1454+ } deriving (Eq,Show,Data,Typeable,Generic)
1455+
1456+-- | Creates a value of 'NodeInitializationAction' with the minimum fields required to make a request.
1457+--
1458+-- Use one of the following lenses to modify other fields as desired:
1459+--
1460+-- * 'niaExecutionTimeout'
1461+--
1462+-- * 'niaExecutableFile'
1463+nodeInitializationAction
1464+ :: NodeInitializationAction
1465+nodeInitializationAction =
1466+ NodeInitializationAction
1467+ { _niaExecutionTimeout = Nothing
1468+ , _niaExecutableFile = Nothing
1469+ }
1470+
1471+-- | [Optional] Amount of time executable has to complete. Default is 10
1472+-- minutes. Cluster creation fails with an explanatory error message (the
1473+-- name of the executable that caused the error and the exceeded timeout
1474+-- period) if the executable is not completed at end of the timeout period.
1475+niaExecutionTimeout :: Lens' NodeInitializationAction (Maybe Text)
1476+niaExecutionTimeout
1477+ = lens _niaExecutionTimeout
1478+ (\ s a -> s{_niaExecutionTimeout = a})
1479+
1480+-- | [Required] Google Cloud Storage URI of executable file.
1481+niaExecutableFile :: Lens' NodeInitializationAction (Maybe Text)
1482+niaExecutableFile
1483+ = lens _niaExecutableFile
1484+ (\ s a -> s{_niaExecutableFile = a})
1485+
1486+instance FromJSON NodeInitializationAction where
1487+ parseJSON
1488+ = withObject "NodeInitializationAction"
1489+ (\ o ->
1490+ NodeInitializationAction <$>
1491+ (o .:? "executionTimeout") <*>
1492+ (o .:? "executableFile"))
1493+
1494+instance ToJSON NodeInitializationAction where
1495+ toJSON NodeInitializationAction{..}
1496+ = object
1497+ (catMaybes
1498+ [("executionTimeout" .=) <$> _niaExecutionTimeout,
1499+ ("executableFile" .=) <$> _niaExecutableFile])
1500+
1501+-- | Cloud Dataproc job config.
1502+--
1503+-- /See:/ 'jobPlacement' smart constructor.
1504+data JobPlacement = JobPlacement
1505+ { _jpClusterUuid :: !(Maybe Text)
1506+ , _jpClusterName :: !(Maybe Text)
1507+ } deriving (Eq,Show,Data,Typeable,Generic)
1508+
1509+-- | Creates a value of 'JobPlacement' with the minimum fields required to make a request.
1510+--
1511+-- Use one of the following lenses to modify other fields as desired:
1512+--
1513+-- * 'jpClusterUuid'
1514+--
1515+-- * 'jpClusterName'
1516+jobPlacement
1517+ :: JobPlacement
1518+jobPlacement =
1519+ JobPlacement
1520+ { _jpClusterUuid = Nothing
1521+ , _jpClusterName = Nothing
1522+ }
1523+
1524+-- | [Output-only] A cluster UUID generated by the Cloud Dataproc service
1525+-- when the job is submitted.
1526+jpClusterUuid :: Lens' JobPlacement (Maybe Text)
1527+jpClusterUuid
1528+ = lens _jpClusterUuid
1529+ (\ s a -> s{_jpClusterUuid = a})
1530+
1531+-- | [Required] The name of the cluster where the job will be submitted.
1532+jpClusterName :: Lens' JobPlacement (Maybe Text)
1533+jpClusterName
1534+ = lens _jpClusterName
1535+ (\ s a -> s{_jpClusterName = a})
1536+
1537+instance FromJSON JobPlacement where
1538+ parseJSON
1539+ = withObject "JobPlacement"
1540+ (\ o ->
1541+ JobPlacement <$>
1542+ (o .:? "clusterUuid") <*> (o .:? "clusterName"))
1543+
1544+instance ToJSON JobPlacement where
1545+ toJSON JobPlacement{..}
1546+ = object
1547+ (catMaybes
1548+ [("clusterUuid" .=) <$> _jpClusterUuid,
1549+ ("clusterName" .=) <$> _jpClusterName])
1550+
1551+-- | Common config settings for resources of Google Compute Engine cluster
1552+-- instances, applicable to all instances in the cluster.
1553+--
1554+-- /See:/ 'gceClusterConfig' smart constructor.
1555+data GceClusterConfig = GceClusterConfig
1556+ { _gccSubnetworkURI :: !(Maybe Text)
1557+ , _gccNetworkURI :: !(Maybe Text)
1558+ , _gccZoneURI :: !(Maybe Text)
1559+ , _gccMetadata :: !(Maybe GceClusterConfigMetadata)
1560+ , _gccServiceAccountScopes :: !(Maybe [Text])
1561+ , _gccTags :: !(Maybe [Text])
1562+ } deriving (Eq,Show,Data,Typeable,Generic)
1563+
1564+-- | Creates a value of 'GceClusterConfig' with the minimum fields required to make a request.
1565+--
1566+-- Use one of the following lenses to modify other fields as desired:
1567+--
1568+-- * 'gccSubnetworkURI'
1569+--
1570+-- * 'gccNetworkURI'
1571+--
1572+-- * 'gccZoneURI'
1573+--
1574+-- * 'gccMetadata'
1575+--
1576+-- * 'gccServiceAccountScopes'
1577+--
1578+-- * 'gccTags'
1579+gceClusterConfig
1580+ :: GceClusterConfig
1581+gceClusterConfig =
1582+ GceClusterConfig
1583+ { _gccSubnetworkURI = Nothing
1584+ , _gccNetworkURI = Nothing
1585+ , _gccZoneURI = Nothing
1586+ , _gccMetadata = Nothing
1587+ , _gccServiceAccountScopes = Nothing
1588+ , _gccTags = Nothing
1589+ }
1590+
1591+-- | The Google Compute Engine subnetwork to be used for machine
1592+-- communications. Cannot be specified with network_uri. Example:
1593+-- \`https:\/\/www.googleapis.com\/compute\/v1\/projects\/[project_id]\/regions\/us-east1\/sub0\`.
1594+gccSubnetworkURI :: Lens' GceClusterConfig (Maybe Text)
1595+gccSubnetworkURI
1596+ = lens _gccSubnetworkURI
1597+ (\ s a -> s{_gccSubnetworkURI = a})
1598+
1599+-- | The Google Compute Engine network to be used for machine communications.
1600+-- Cannot be specified with subnetwork_uri. If neither network_uri nor
1601+-- subnetwork_uri is specified, the \"default\" network of the project is
1602+-- used, if it exists. Cannot be a \"Custom Subnet Network\" (see
1603+-- https:\/\/cloud.google.com\/compute\/docs\/subnetworks for more
1604+-- information). Example:
1605+-- \`https:\/\/www.googleapis.com\/compute\/v1\/projects\/[project_id]\/regions\/global\/default\`.
1606+gccNetworkURI :: Lens' GceClusterConfig (Maybe Text)
1607+gccNetworkURI
1608+ = lens _gccNetworkURI
1609+ (\ s a -> s{_gccNetworkURI = a})
1610+
1611+-- | [Required] The zone where the Google Compute Engine cluster will be
1612+-- located. Example:
1613+-- \`https:\/\/www.googleapis.com\/compute\/v1\/projects\/[project_id]\/zones\/[zone]\`.
1614+gccZoneURI :: Lens' GceClusterConfig (Maybe Text)
1615+gccZoneURI
1616+ = lens _gccZoneURI (\ s a -> s{_gccZoneURI = a})
1617+
1618+-- | The Google Compute Engine metadata entries to add to all instances.
1619+gccMetadata :: Lens' GceClusterConfig (Maybe GceClusterConfigMetadata)
1620+gccMetadata
1621+ = lens _gccMetadata (\ s a -> s{_gccMetadata = a})
1622+
1623+-- | The URIs of service account scopes to be included in Google Compute
1624+-- Engine instances. The following base set of scopes is always included: *
1625+-- https:\/\/www.googleapis.com\/auth\/cloud.useraccounts.readonly *
1626+-- https:\/\/www.googleapis.com\/auth\/devstorage.read_write *
1627+-- https:\/\/www.googleapis.com\/auth\/logging.write If no scopes are
1628+-- specfied, the following defaults are also provided: *
1629+-- https:\/\/www.googleapis.com\/auth\/bigquery *
1630+-- https:\/\/www.googleapis.com\/auth\/bigtable.admin.table *
1631+-- https:\/\/www.googleapis.com\/auth\/bigtable.data *
1632+-- https:\/\/www.googleapis.com\/auth\/devstorage.full_control
1633+gccServiceAccountScopes :: Lens' GceClusterConfig [Text]
1634+gccServiceAccountScopes
1635+ = lens _gccServiceAccountScopes
1636+ (\ s a -> s{_gccServiceAccountScopes = a})
1637+ . _Default
1638+ . _Coerce
1639+
1640+-- | The Google Compute Engine tags to add to all instances.
1641+gccTags :: Lens' GceClusterConfig [Text]
1642+gccTags
1643+ = lens _gccTags (\ s a -> s{_gccTags = a}) . _Default
1644+ . _Coerce
1645+
1646+instance FromJSON GceClusterConfig where
1647+ parseJSON
1648+ = withObject "GceClusterConfig"
1649+ (\ o ->
1650+ GceClusterConfig <$>
1651+ (o .:? "subnetworkUri") <*> (o .:? "networkUri") <*>
1652+ (o .:? "zoneUri")
1653+ <*> (o .:? "metadata")
1654+ <*> (o .:? "serviceAccountScopes" .!= mempty)
1655+ <*> (o .:? "tags" .!= mempty))
1656+
1657+instance ToJSON GceClusterConfig where
1658+ toJSON GceClusterConfig{..}
1659+ = object
1660+ (catMaybes
1661+ [("subnetworkUri" .=) <$> _gccSubnetworkURI,
1662+ ("networkUri" .=) <$> _gccNetworkURI,
1663+ ("zoneUri" .=) <$> _gccZoneURI,
1664+ ("metadata" .=) <$> _gccMetadata,
1665+ ("serviceAccountScopes" .=) <$>
1666+ _gccServiceAccountScopes,
1667+ ("tags" .=) <$> _gccTags])
1668+
1669+-- | The status of the operation.
1670+--
1671+-- /See:/ 'operationStatus' smart constructor.
1672+data OperationStatus = OperationStatus
1673+ { _osState :: !(Maybe Text)
1674+ , _osInnerState :: !(Maybe Text)
1675+ , _osStateStartTime :: !(Maybe Text)
1676+ , _osDetails :: !(Maybe Text)
1677+ } deriving (Eq,Show,Data,Typeable,Generic)
1678+
1679+-- | Creates a value of 'OperationStatus' with the minimum fields required to make a request.
1680+--
1681+-- Use one of the following lenses to modify other fields as desired:
1682+--
1683+-- * 'osState'
1684+--
1685+-- * 'osInnerState'
1686+--
1687+-- * 'osStateStartTime'
1688+--
1689+-- * 'osDetails'
1690+operationStatus
1691+ :: OperationStatus
1692+operationStatus =
1693+ OperationStatus
1694+ { _osState = Nothing
1695+ , _osInnerState = Nothing
1696+ , _osStateStartTime = Nothing
1697+ , _osDetails = Nothing
1698+ }
1699+
1700+-- | A message containing the operation state.
1701+osState :: Lens' OperationStatus (Maybe Text)
1702+osState = lens _osState (\ s a -> s{_osState = a})
1703+
1704+-- | A message containing the detailed operation state.
1705+osInnerState :: Lens' OperationStatus (Maybe Text)
1706+osInnerState
1707+ = lens _osInnerState (\ s a -> s{_osInnerState = a})
1708+
1709+-- | The time this state was entered.
1710+osStateStartTime :: Lens' OperationStatus (Maybe Text)
1711+osStateStartTime
1712+ = lens _osStateStartTime
1713+ (\ s a -> s{_osStateStartTime = a})
1714+
1715+-- | A message containing any operation metadata details.
1716+osDetails :: Lens' OperationStatus (Maybe Text)
1717+osDetails
1718+ = lens _osDetails (\ s a -> s{_osDetails = a})
1719+
1720+instance FromJSON OperationStatus where
1721+ parseJSON
1722+ = withObject "OperationStatus"
1723+ (\ o ->
1724+ OperationStatus <$>
1725+ (o .:? "state") <*> (o .:? "innerState") <*>
1726+ (o .:? "stateStartTime")
1727+ <*> (o .:? "details"))
1728+
1729+instance ToJSON OperationStatus where
1730+ toJSON OperationStatus{..}
1731+ = object
1732+ (catMaybes
1733+ [("state" .=) <$> _osState,
1734+ ("innerState" .=) <$> _osInnerState,
1735+ ("stateStartTime" .=) <$> _osStateStartTime,
1736+ ("details" .=) <$> _osDetails])
1737+
1738+-- | The Google Compute Engine metadata entries to add to all instances.
1739+--
1740+-- /See:/ 'gceClusterConfigMetadata' smart constructor.
1741+newtype GceClusterConfigMetadata = GceClusterConfigMetadata
1742+ { _gccmAddtional :: HashMap Text Text
1743+ } deriving (Eq,Show,Data,Typeable,Generic)
1744+
1745+-- | Creates a value of 'GceClusterConfigMetadata' with the minimum fields required to make a request.
1746+--
1747+-- Use one of the following lenses to modify other fields as desired:
1748+--
1749+-- * 'gccmAddtional'
1750+gceClusterConfigMetadata
1751+ :: HashMap Text Text -- ^ 'gccmAddtional'
1752+ -> GceClusterConfigMetadata
1753+gceClusterConfigMetadata pGccmAddtional_ =
1754+ GceClusterConfigMetadata
1755+ { _gccmAddtional = _Coerce # pGccmAddtional_
1756+ }
1757+
1758+gccmAddtional :: Lens' GceClusterConfigMetadata (HashMap Text Text)
1759+gccmAddtional
1760+ = lens _gccmAddtional
1761+ (\ s a -> s{_gccmAddtional = a})
1762+ . _Coerce
1763+
1764+instance FromJSON GceClusterConfigMetadata where
1765+ parseJSON
1766+ = withObject "GceClusterConfigMetadata"
1767+ (\ o ->
1768+ GceClusterConfigMetadata <$> (parseJSONObject o))
1769+
1770+instance ToJSON GceClusterConfigMetadata where
1771+ toJSON = toJSON . _gccmAddtional
1772+
1773+-- | [Optional] A mapping of property names and values, used to configure
1774+-- Hive. Properties that conflict with values set by the Cloud Dataproc API
1775+-- may be overwritten. Can include properties set in
1776+-- \/etc\/hadoop\/conf\/*-site.xml, \/etc\/hive\/conf\/hive-site.xml, and
1777+-- classes in user code.
1778+--
1779+-- /See:/ 'hiveJobProperties' smart constructor.
1780+newtype HiveJobProperties = HiveJobProperties
1781+ { _hAddtional :: HashMap Text Text
1782+ } deriving (Eq,Show,Data,Typeable,Generic)
1783+
1784+-- | Creates a value of 'HiveJobProperties' with the minimum fields required to make a request.
1785+--
1786+-- Use one of the following lenses to modify other fields as desired:
1787+--
1788+-- * 'hAddtional'
1789+hiveJobProperties
1790+ :: HashMap Text Text -- ^ 'hAddtional'
1791+ -> HiveJobProperties
1792+hiveJobProperties pHAddtional_ =
1793+ HiveJobProperties
1794+ { _hAddtional = _Coerce # pHAddtional_
1795+ }
1796+
1797+hAddtional :: Lens' HiveJobProperties (HashMap Text Text)
1798+hAddtional
1799+ = lens _hAddtional (\ s a -> s{_hAddtional = a}) .
1800+ _Coerce
1801+
1802+instance FromJSON HiveJobProperties where
1803+ parseJSON
1804+ = withObject "HiveJobProperties"
1805+ (\ o -> HiveJobProperties <$> (parseJSONObject o))
1806+
1807+instance ToJSON HiveJobProperties where
1808+ toJSON = toJSON . _hAddtional
1809+
1810+-- | Media resource.
1811+--
1812+-- /See:/ 'media' smart constructor.
1813+newtype Media = Media
1814+ { _mResourceName :: Maybe Text
1815+ } deriving (Eq,Show,Data,Typeable,Generic)
1816+
1817+-- | Creates a value of 'Media' with the minimum fields required to make a request.
1818+--
1819+-- Use one of the following lenses to modify other fields as desired:
1820+--
1821+-- * 'mResourceName'
1822+media
1823+ :: Media
1824+media =
1825+ Media
1826+ { _mResourceName = Nothing
1827+ }
1828+
1829+-- | Name of the media resource.
1830+mResourceName :: Lens' Media (Maybe Text)
1831+mResourceName
1832+ = lens _mResourceName
1833+ (\ s a -> s{_mResourceName = a})
1834+
1835+instance FromJSON Media where
1836+ parseJSON
1837+ = withObject "Media"
1838+ (\ o -> Media <$> (o .:? "resourceName"))
1839+
1840+instance ToJSON Media where
1841+ toJSON Media{..}
1842+ = object
1843+ (catMaybes [("resourceName" .=) <$> _mResourceName])
1844+
1845+-- | The location where output from diagnostic command can be found.
1846+--
1847+-- /See:/ 'diagnoseClusterOutputLocation' smart constructor.
1848+newtype DiagnoseClusterOutputLocation = DiagnoseClusterOutputLocation
1849+ { _dcolOutputURI :: Maybe Text
1850+ } deriving (Eq,Show,Data,Typeable,Generic)
1851+
1852+-- | Creates a value of 'DiagnoseClusterOutputLocation' with the minimum fields required to make a request.
1853+--
1854+-- Use one of the following lenses to modify other fields as desired:
1855+--
1856+-- * 'dcolOutputURI'
1857+diagnoseClusterOutputLocation
1858+ :: DiagnoseClusterOutputLocation
1859+diagnoseClusterOutputLocation =
1860+ DiagnoseClusterOutputLocation
1861+ { _dcolOutputURI = Nothing
1862+ }
1863+
1864+-- | [Output-only] The Google Cloud Storage URI of the diagnostic output.
1865+-- This will be a plain text file with summary of collected diagnostics.
1866+dcolOutputURI :: Lens' DiagnoseClusterOutputLocation (Maybe Text)
1867+dcolOutputURI
1868+ = lens _dcolOutputURI
1869+ (\ s a -> s{_dcolOutputURI = a})
1870+
1871+instance FromJSON DiagnoseClusterOutputLocation where
1872+ parseJSON
1873+ = withObject "DiagnoseClusterOutputLocation"
1874+ (\ o ->
1875+ DiagnoseClusterOutputLocation <$>
1876+ (o .:? "outputUri"))
1877+
1878+instance ToJSON DiagnoseClusterOutputLocation where
1879+ toJSON DiagnoseClusterOutputLocation{..}
1880+ = object
1881+ (catMaybes [("outputUri" .=) <$> _dcolOutputURI])
1882+
1883+-- | A Cloud Dataproc job resource.
1884+--
1885+-- /See:/ 'job' smart constructor.
1886+data Job = Job
1887+ { _jSparkJob :: !(Maybe SparkJob)
1888+ , _jStatus :: !(Maybe JobStatus)
1889+ , _jDriverControlFilesURI :: !(Maybe Text)
1890+ , _jHiveJob :: !(Maybe HiveJob)
1891+ , _jReference :: !(Maybe JobReference)
1892+ , _jSparkSQLJob :: !(Maybe SparkSQLJob)
1893+ , _jHadoopJob :: !(Maybe HadoopJob)
1894+ , _jPysparkJob :: !(Maybe PySparkJob)
1895+ , _jDriverOutputResourceURI :: !(Maybe Text)
1896+ , _jStatusHistory :: !(Maybe [JobStatus])
1897+ , _jPlacement :: !(Maybe JobPlacement)
1898+ , _jPigJob :: !(Maybe PigJob)
1899+ } deriving (Eq,Show,Data,Typeable,Generic)
1900+
1901+-- | Creates a value of 'Job' with the minimum fields required to make a request.
1902+--
1903+-- Use one of the following lenses to modify other fields as desired:
1904+--
1905+-- * 'jSparkJob'
1906+--
1907+-- * 'jStatus'
1908+--
1909+-- * 'jDriverControlFilesURI'
1910+--
1911+-- * 'jHiveJob'
1912+--
1913+-- * 'jReference'
1914+--
1915+-- * 'jSparkSQLJob'
1916+--
1917+-- * 'jHadoopJob'
1918+--
1919+-- * 'jPysparkJob'
1920+--
1921+-- * 'jDriverOutputResourceURI'
1922+--
1923+-- * 'jStatusHistory'
1924+--
1925+-- * 'jPlacement'
1926+--
1927+-- * 'jPigJob'
1928+job
1929+ :: Job
1930+job =
1931+ Job
1932+ { _jSparkJob = Nothing
1933+ , _jStatus = Nothing
1934+ , _jDriverControlFilesURI = Nothing
1935+ , _jHiveJob = Nothing
1936+ , _jReference = Nothing
1937+ , _jSparkSQLJob = Nothing
1938+ , _jHadoopJob = Nothing
1939+ , _jPysparkJob = Nothing
1940+ , _jDriverOutputResourceURI = Nothing
1941+ , _jStatusHistory = Nothing
1942+ , _jPlacement = Nothing
1943+ , _jPigJob = Nothing
1944+ }
1945+
1946+-- | Job is a Spark job.
1947+jSparkJob :: Lens' Job (Maybe SparkJob)
1948+jSparkJob
1949+ = lens _jSparkJob (\ s a -> s{_jSparkJob = a})
1950+
1951+-- | [Output-only] The job status. Additional application-specific status
1952+-- information may be contained in the type_job and yarn_applications
1953+-- fields.
1954+jStatus :: Lens' Job (Maybe JobStatus)
1955+jStatus = lens _jStatus (\ s a -> s{_jStatus = a})
1956+
1957+-- | [Output-only] If present, the location of miscellaneous control files
1958+-- which may be used as part of job setup and handling. If not present,
1959+-- control files may be placed in the same location as
1960+-- \`driver_output_uri\`.
1961+jDriverControlFilesURI :: Lens' Job (Maybe Text)
1962+jDriverControlFilesURI
1963+ = lens _jDriverControlFilesURI
1964+ (\ s a -> s{_jDriverControlFilesURI = a})
1965+
1966+-- | Job is a Hive job.
1967+jHiveJob :: Lens' Job (Maybe HiveJob)
1968+jHiveJob = lens _jHiveJob (\ s a -> s{_jHiveJob = a})
1969+
1970+-- | [Optional] The fully qualified reference to the job, which can be used
1971+-- to obtain the equivalent REST path of the job resource. If this property
1972+-- is not specified when a job is created, the server generates a job_id.
1973+jReference :: Lens' Job (Maybe JobReference)
1974+jReference
1975+ = lens _jReference (\ s a -> s{_jReference = a})
1976+
1977+-- | Job is a SparkSql job.
1978+jSparkSQLJob :: Lens' Job (Maybe SparkSQLJob)
1979+jSparkSQLJob
1980+ = lens _jSparkSQLJob (\ s a -> s{_jSparkSQLJob = a})
1981+
1982+-- | Job is a Hadoop job.
1983+jHadoopJob :: Lens' Job (Maybe HadoopJob)
1984+jHadoopJob
1985+ = lens _jHadoopJob (\ s a -> s{_jHadoopJob = a})
1986+
1987+-- | Job is a Pyspark job.
1988+jPysparkJob :: Lens' Job (Maybe PySparkJob)
1989+jPysparkJob
1990+ = lens _jPysparkJob (\ s a -> s{_jPysparkJob = a})
1991+
1992+-- | [Output-only] A URI pointing to the location of the stdout of the job\'s
1993+-- driver program.
1994+jDriverOutputResourceURI :: Lens' Job (Maybe Text)
1995+jDriverOutputResourceURI
1996+ = lens _jDriverOutputResourceURI
1997+ (\ s a -> s{_jDriverOutputResourceURI = a})
1998+
1999+-- | [Output-only] The previous job status.
2000+jStatusHistory :: Lens' Job [JobStatus]
2001+jStatusHistory
2002+ = lens _jStatusHistory
2003+ (\ s a -> s{_jStatusHistory = a})
2004+ . _Default
2005+ . _Coerce
2006+
2007+-- | [Required] Job information, including how, when, and where to run the
2008+-- job.
2009+jPlacement :: Lens' Job (Maybe JobPlacement)
2010+jPlacement
2011+ = lens _jPlacement (\ s a -> s{_jPlacement = a})
2012+
2013+-- | Job is a Pig job.
2014+jPigJob :: Lens' Job (Maybe PigJob)
2015+jPigJob = lens _jPigJob (\ s a -> s{_jPigJob = a})
2016+
2017+instance FromJSON Job where
2018+ parseJSON
2019+ = withObject "Job"
2020+ (\ o ->
2021+ Job <$>
2022+ (o .:? "sparkJob") <*> (o .:? "status") <*>
2023+ (o .:? "driverControlFilesUri")
2024+ <*> (o .:? "hiveJob")
2025+ <*> (o .:? "reference")
2026+ <*> (o .:? "sparkSqlJob")
2027+ <*> (o .:? "hadoopJob")
2028+ <*> (o .:? "pysparkJob")
2029+ <*> (o .:? "driverOutputResourceUri")
2030+ <*> (o .:? "statusHistory" .!= mempty)
2031+ <*> (o .:? "placement")
2032+ <*> (o .:? "pigJob"))
2033+
2034+instance ToJSON Job where
2035+ toJSON Job{..}
2036+ = object
2037+ (catMaybes
2038+ [("sparkJob" .=) <$> _jSparkJob,
2039+ ("status" .=) <$> _jStatus,
2040+ ("driverControlFilesUri" .=) <$>
2041+ _jDriverControlFilesURI,
2042+ ("hiveJob" .=) <$> _jHiveJob,
2043+ ("reference" .=) <$> _jReference,
2044+ ("sparkSqlJob" .=) <$> _jSparkSQLJob,
2045+ ("hadoopJob" .=) <$> _jHadoopJob,
2046+ ("pysparkJob" .=) <$> _jPysparkJob,
2047+ ("driverOutputResourceUri" .=) <$>
2048+ _jDriverOutputResourceURI,
2049+ ("statusHistory" .=) <$> _jStatusHistory,
2050+ ("placement" .=) <$> _jPlacement,
2051+ ("pigJob" .=) <$> _jPigJob])
2052+
2053+-- | A request to collect cluster diagnostic information.
2054+--
2055+-- /See:/ 'diagnoseClusterRequest' smart constructor.
2056+data DiagnoseClusterRequest =
2057+ DiagnoseClusterRequest
2058+ deriving (Eq,Show,Data,Typeable,Generic)
2059+
2060+-- | Creates a value of 'DiagnoseClusterRequest' with the minimum fields required to make a request.
2061+--
2062+diagnoseClusterRequest
2063+ :: DiagnoseClusterRequest
2064+diagnoseClusterRequest = DiagnoseClusterRequest
2065+
2066+instance FromJSON DiagnoseClusterRequest where
2067+ parseJSON
2068+ = withObject "DiagnoseClusterRequest"
2069+ (\ o -> pure DiagnoseClusterRequest)
2070+
2071+instance ToJSON DiagnoseClusterRequest where
2072+ toJSON = const emptyObject
2073+
2074+-- | A Cloud Dataproc job for running Hadoop MapReduce jobs on YARN.
2075+--
2076+-- /See:/ 'hadoopJob' smart constructor.
2077+data HadoopJob = HadoopJob
2078+ { _hArgs :: !(Maybe [Text])
2079+ , _hMainJarFileURI :: !(Maybe Text)
2080+ , _hJarFileURIs :: !(Maybe [Text])
2081+ , _hFileURIs :: !(Maybe [Text])
2082+ , _hArchiveURIs :: !(Maybe [Text])
2083+ , _hMainClass :: !(Maybe Text)
2084+ , _hLoggingConfig :: !(Maybe LoggingConfig)
2085+ , _hProperties :: !(Maybe HadoopJobProperties)
2086+ } deriving (Eq,Show,Data,Typeable,Generic)
2087+
2088+-- | Creates a value of 'HadoopJob' with the minimum fields required to make a request.
2089+--
2090+-- Use one of the following lenses to modify other fields as desired:
2091+--
2092+-- * 'hArgs'
2093+--
2094+-- * 'hMainJarFileURI'
2095+--
2096+-- * 'hJarFileURIs'
2097+--
2098+-- * 'hFileURIs'
2099+--
2100+-- * 'hArchiveURIs'
2101+--
2102+-- * 'hMainClass'
2103+--
2104+-- * 'hLoggingConfig'
2105+--
2106+-- * 'hProperties'
2107+hadoopJob
2108+ :: HadoopJob
2109+hadoopJob =
2110+ HadoopJob
2111+ { _hArgs = Nothing
2112+ , _hMainJarFileURI = Nothing
2113+ , _hJarFileURIs = Nothing
2114+ , _hFileURIs = Nothing
2115+ , _hArchiveURIs = Nothing
2116+ , _hMainClass = Nothing
2117+ , _hLoggingConfig = Nothing
2118+ , _hProperties = Nothing
2119+ }
2120+
2121+-- | [Optional] The arguments to pass to the driver. Do not include
2122+-- arguments, such as \`-libjars\` or \`-Dfoo=bar\`, that can be set as job
2123+-- properties, since a collision may occur that causes an incorrect job
2124+-- submission.
2125+hArgs :: Lens' HadoopJob [Text]
2126+hArgs
2127+ = lens _hArgs (\ s a -> s{_hArgs = a}) . _Default .
2128+ _Coerce
2129+
2130+-- | The HCFS URI of the jar file containing the main class. Examples:
2131+-- \'gs:\/\/foo-bucket\/analytics-binaries\/extract-useful-metrics-mr.jar\'
2132+-- \'hdfs:\/tmp\/test-samples\/custom-wordcount.jar\'
2133+-- \'file:\/\/\/home\/usr\/lib\/hadoop-mapreduce\/hadoop-mapreduce-examples.jar\'
2134+hMainJarFileURI :: Lens' HadoopJob (Maybe Text)
2135+hMainJarFileURI
2136+ = lens _hMainJarFileURI
2137+ (\ s a -> s{_hMainJarFileURI = a})
2138+
2139+-- | [Optional] Jar file URIs to add to the CLASSPATHs of the Hadoop driver
2140+-- and tasks.
2141+hJarFileURIs :: Lens' HadoopJob [Text]
2142+hJarFileURIs
2143+ = lens _hJarFileURIs (\ s a -> s{_hJarFileURIs = a})
2144+ . _Default
2145+ . _Coerce
2146+
2147+-- | [Optional] HCFS (Hadoop Compatible Filesystem) URIs of files to be
2148+-- copied to the working directory of Hadoop drivers and distributed tasks.
2149+-- Useful for naively parallel tasks.
2150+hFileURIs :: Lens' HadoopJob [Text]
2151+hFileURIs
2152+ = lens _hFileURIs (\ s a -> s{_hFileURIs = a}) .
2153+ _Default
2154+ . _Coerce
2155+
2156+-- | [Optional] HCFS URIs of archives to be extracted in the working
2157+-- directory of Hadoop drivers and tasks. Supported file types: .jar, .tar,
2158+-- .tar.gz, .tgz, or .zip.
2159+hArchiveURIs :: Lens' HadoopJob [Text]
2160+hArchiveURIs
2161+ = lens _hArchiveURIs (\ s a -> s{_hArchiveURIs = a})
2162+ . _Default
2163+ . _Coerce
2164+
2165+-- | The name of the driver\'s main class. The jar file containing the class
2166+-- must be in the default CLASSPATH or specified in \`jar_file_uris\`.
2167+hMainClass :: Lens' HadoopJob (Maybe Text)
2168+hMainClass
2169+ = lens _hMainClass (\ s a -> s{_hMainClass = a})
2170+
2171+-- | [Optional] The runtime log config for job execution.
2172+hLoggingConfig :: Lens' HadoopJob (Maybe LoggingConfig)
2173+hLoggingConfig
2174+ = lens _hLoggingConfig
2175+ (\ s a -> s{_hLoggingConfig = a})
2176+
2177+-- | [Optional] A mapping of property names to values, used to configure
2178+-- Hadoop. Properties that conflict with values set by the Cloud Dataproc
2179+-- API may be overwritten. Can include properties set in
2180+-- \/etc\/hadoop\/conf\/*-site and classes in user code.
2181+hProperties :: Lens' HadoopJob (Maybe HadoopJobProperties)
2182+hProperties
2183+ = lens _hProperties (\ s a -> s{_hProperties = a})
2184+
2185+instance FromJSON HadoopJob where
2186+ parseJSON
2187+ = withObject "HadoopJob"
2188+ (\ o ->
2189+ HadoopJob <$>
2190+ (o .:? "args" .!= mempty) <*>
2191+ (o .:? "mainJarFileUri")
2192+ <*> (o .:? "jarFileUris" .!= mempty)
2193+ <*> (o .:? "fileUris" .!= mempty)
2194+ <*> (o .:? "archiveUris" .!= mempty)
2195+ <*> (o .:? "mainClass")
2196+ <*> (o .:? "loggingConfig")
2197+ <*> (o .:? "properties"))
2198+
2199+instance ToJSON HadoopJob where
2200+ toJSON HadoopJob{..}
2201+ = object
2202+ (catMaybes
2203+ [("args" .=) <$> _hArgs,
2204+ ("mainJarFileUri" .=) <$> _hMainJarFileURI,
2205+ ("jarFileUris" .=) <$> _hJarFileURIs,
2206+ ("fileUris" .=) <$> _hFileURIs,
2207+ ("archiveUris" .=) <$> _hArchiveURIs,
2208+ ("mainClass" .=) <$> _hMainClass,
2209+ ("loggingConfig" .=) <$> _hLoggingConfig,
2210+ ("properties" .=) <$> _hProperties])
2211+
2212+-- | Metadata describing the operation.
2213+--
2214+-- /See:/ 'clusterOperationMetadata' smart constructor.
2215+data ClusterOperationMetadata = ClusterOperationMetadata
2216+ { _comStatus :: !(Maybe ClusterOperationStatus)
2217+ , _comClusterUuid :: !(Maybe Text)
2218+ , _comClusterName :: !(Maybe Text)
2219+ , _comOperationType :: !(Maybe Text)
2220+ , _comStatusHistory :: !(Maybe [ClusterOperationStatus])
2221+ , _comDescription :: !(Maybe Text)
2222+ } deriving (Eq,Show,Data,Typeable,Generic)
2223+
2224+-- | Creates a value of 'ClusterOperationMetadata' with the minimum fields required to make a request.
2225+--
2226+-- Use one of the following lenses to modify other fields as desired:
2227+--
2228+-- * 'comStatus'
2229+--
2230+-- * 'comClusterUuid'
2231+--
2232+-- * 'comClusterName'
2233+--
2234+-- * 'comOperationType'
2235+--
2236+-- * 'comStatusHistory'
2237+--
2238+-- * 'comDescription'
2239+clusterOperationMetadata
2240+ :: ClusterOperationMetadata
2241+clusterOperationMetadata =
2242+ ClusterOperationMetadata
2243+ { _comStatus = Nothing
2244+ , _comClusterUuid = Nothing
2245+ , _comClusterName = Nothing
2246+ , _comOperationType = Nothing
2247+ , _comStatusHistory = Nothing
2248+ , _comDescription = Nothing
2249+ }
2250+
2251+-- | [Output-only] Current operation status.
2252+comStatus :: Lens' ClusterOperationMetadata (Maybe ClusterOperationStatus)
2253+comStatus
2254+ = lens _comStatus (\ s a -> s{_comStatus = a})
2255+
2256+-- | Cluster UUId for the operation.
2257+comClusterUuid :: Lens' ClusterOperationMetadata (Maybe Text)
2258+comClusterUuid
2259+ = lens _comClusterUuid
2260+ (\ s a -> s{_comClusterUuid = a})
2261+
2262+-- | Name of the cluster for the operation.
2263+comClusterName :: Lens' ClusterOperationMetadata (Maybe Text)
2264+comClusterName
2265+ = lens _comClusterName
2266+ (\ s a -> s{_comClusterName = a})
2267+
2268+-- | [Output-only] The operation type.
2269+comOperationType :: Lens' ClusterOperationMetadata (Maybe Text)
2270+comOperationType
2271+ = lens _comOperationType
2272+ (\ s a -> s{_comOperationType = a})
2273+
2274+-- | [Output-only] The previous operation status.
2275+comStatusHistory :: Lens' ClusterOperationMetadata [ClusterOperationStatus]
2276+comStatusHistory
2277+ = lens _comStatusHistory
2278+ (\ s a -> s{_comStatusHistory = a})
2279+ . _Default
2280+ . _Coerce
2281+
2282+-- | [Output-only] Short description of operation.
2283+comDescription :: Lens' ClusterOperationMetadata (Maybe Text)
2284+comDescription
2285+ = lens _comDescription
2286+ (\ s a -> s{_comDescription = a})
2287+
2288+instance FromJSON ClusterOperationMetadata where
2289+ parseJSON
2290+ = withObject "ClusterOperationMetadata"
2291+ (\ o ->
2292+ ClusterOperationMetadata <$>
2293+ (o .:? "status") <*> (o .:? "clusterUuid") <*>
2294+ (o .:? "clusterName")
2295+ <*> (o .:? "operationType")
2296+ <*> (o .:? "statusHistory" .!= mempty)
2297+ <*> (o .:? "description"))
2298+
2299+instance ToJSON ClusterOperationMetadata where
2300+ toJSON ClusterOperationMetadata{..}
2301+ = object
2302+ (catMaybes
2303+ [("status" .=) <$> _comStatus,
2304+ ("clusterUuid" .=) <$> _comClusterUuid,
2305+ ("clusterName" .=) <$> _comClusterName,
2306+ ("operationType" .=) <$> _comOperationType,
2307+ ("statusHistory" .=) <$> _comStatusHistory,
2308+ ("description" .=) <$> _comDescription])
2309+
2310+-- | A Cloud Dataproc job for running Spark SQL queries.
2311+--
2312+-- /See:/ 'sparkSQLJob' smart constructor.
2313+data SparkSQLJob = SparkSQLJob
2314+ { _ssqljQueryFileURI :: !(Maybe Text)
2315+ , _ssqljJarFileURIs :: !(Maybe [Text])
2316+ , _ssqljScriptVariables :: !(Maybe SparkSQLJobScriptVariables)
2317+ , _ssqljQueryList :: !(Maybe QueryList)
2318+ , _ssqljLoggingConfig :: !(Maybe LoggingConfig)
2319+ , _ssqljProperties :: !(Maybe SparkSQLJobProperties)
2320+ } deriving (Eq,Show,Data,Typeable,Generic)
2321+
2322+-- | Creates a value of 'SparkSQLJob' with the minimum fields required to make a request.
2323+--
2324+-- Use one of the following lenses to modify other fields as desired:
2325+--
2326+-- * 'ssqljQueryFileURI'
2327+--
2328+-- * 'ssqljJarFileURIs'
2329+--
2330+-- * 'ssqljScriptVariables'
2331+--
2332+-- * 'ssqljQueryList'
2333+--
2334+-- * 'ssqljLoggingConfig'
2335+--
2336+-- * 'ssqljProperties'
2337+sparkSQLJob
2338+ :: SparkSQLJob
2339+sparkSQLJob =
2340+ SparkSQLJob
2341+ { _ssqljQueryFileURI = Nothing
2342+ , _ssqljJarFileURIs = Nothing
2343+ , _ssqljScriptVariables = Nothing
2344+ , _ssqljQueryList = Nothing
2345+ , _ssqljLoggingConfig = Nothing
2346+ , _ssqljProperties = Nothing
2347+ }
2348+
2349+-- | The HCFS URI of the script that contains SQL queries.
2350+ssqljQueryFileURI :: Lens' SparkSQLJob (Maybe Text)
2351+ssqljQueryFileURI
2352+ = lens _ssqljQueryFileURI
2353+ (\ s a -> s{_ssqljQueryFileURI = a})
2354+
2355+-- | [Optional] HCFS URIs of jar files to be added to the Spark CLASSPATH.
2356+ssqljJarFileURIs :: Lens' SparkSQLJob [Text]
2357+ssqljJarFileURIs
2358+ = lens _ssqljJarFileURIs
2359+ (\ s a -> s{_ssqljJarFileURIs = a})
2360+ . _Default
2361+ . _Coerce
2362+
2363+-- | [Optional] Mapping of query variable names to values (equivalent to the
2364+-- Spark SQL command: SET \`name=\"value\";\`).
2365+ssqljScriptVariables :: Lens' SparkSQLJob (Maybe SparkSQLJobScriptVariables)
2366+ssqljScriptVariables
2367+ = lens _ssqljScriptVariables
2368+ (\ s a -> s{_ssqljScriptVariables = a})
2369+
2370+-- | A list of queries.
2371+ssqljQueryList :: Lens' SparkSQLJob (Maybe QueryList)
2372+ssqljQueryList
2373+ = lens _ssqljQueryList
2374+ (\ s a -> s{_ssqljQueryList = a})
2375+
2376+-- | [Optional] The runtime log config for job execution.
2377+ssqljLoggingConfig :: Lens' SparkSQLJob (Maybe LoggingConfig)
2378+ssqljLoggingConfig
2379+ = lens _ssqljLoggingConfig
2380+ (\ s a -> s{_ssqljLoggingConfig = a})
2381+
2382+-- | [Optional] A mapping of property names to values, used to configure
2383+-- Spark SQL\'s SparkConf. Properties that conflict with values set by the
2384+-- Cloud Dataproc API may be overwritten.
2385+ssqljProperties :: Lens' SparkSQLJob (Maybe SparkSQLJobProperties)
2386+ssqljProperties
2387+ = lens _ssqljProperties
2388+ (\ s a -> s{_ssqljProperties = a})
2389+
2390+instance FromJSON SparkSQLJob where
2391+ parseJSON
2392+ = withObject "SparkSQLJob"
2393+ (\ o ->
2394+ SparkSQLJob <$>
2395+ (o .:? "queryFileUri") <*>
2396+ (o .:? "jarFileUris" .!= mempty)
2397+ <*> (o .:? "scriptVariables")
2398+ <*> (o .:? "queryList")
2399+ <*> (o .:? "loggingConfig")
2400+ <*> (o .:? "properties"))
2401+
2402+instance ToJSON SparkSQLJob where
2403+ toJSON SparkSQLJob{..}
2404+ = object
2405+ (catMaybes
2406+ [("queryFileUri" .=) <$> _ssqljQueryFileURI,
2407+ ("jarFileUris" .=) <$> _ssqljJarFileURIs,
2408+ ("scriptVariables" .=) <$> _ssqljScriptVariables,
2409+ ("queryList" .=) <$> _ssqljQueryList,
2410+ ("loggingConfig" .=) <$> _ssqljLoggingConfig,
2411+ ("properties" .=) <$> _ssqljProperties])
2412+
2413+-- | Specifies the selection and config of software inside the cluster.
2414+--
2415+-- /See:/ 'softwareConfig' smart constructor.
2416+data SoftwareConfig = SoftwareConfig
2417+ { _scImageVersion :: !(Maybe Text)
2418+ , _scProperties :: !(Maybe SoftwareConfigProperties)
2419+ } deriving (Eq,Show,Data,Typeable,Generic)
2420+
2421+-- | Creates a value of 'SoftwareConfig' with the minimum fields required to make a request.
2422+--
2423+-- Use one of the following lenses to modify other fields as desired:
2424+--
2425+-- * 'scImageVersion'
2426+--
2427+-- * 'scProperties'
2428+softwareConfig
2429+ :: SoftwareConfig
2430+softwareConfig =
2431+ SoftwareConfig
2432+ { _scImageVersion = Nothing
2433+ , _scProperties = Nothing
2434+ }
2435+
2436+-- | [Optional] The version of software inside the cluster. It must match the
2437+-- regular expression \`[0-9]+\\.[0-9]+\`. If unspecified, it defaults to
2438+-- the latest version (see [Cloud Dataproc
2439+-- Versioning](\/dataproc\/versioning)).
2440+scImageVersion :: Lens' SoftwareConfig (Maybe Text)
2441+scImageVersion
2442+ = lens _scImageVersion
2443+ (\ s a -> s{_scImageVersion = a})
2444+
2445+-- | [Optional] The properties to set on daemon config files. Property keys
2446+-- are specified in \`prefix:property\` format, such as
2447+-- \`core:fs.defaultFS\`. The following are supported prefixes and their
2448+-- mappings: * core: \`core-site.xml\` * hdfs: \`hdfs-site.xml\` * mapred:
2449+-- \`mapred-site.xml\` * yarn: \`yarn-site.xml\` * hive: \`hive-site.xml\`
2450+-- * pig: \`pig.properties\` * spark: \`spark-defaults.conf\`
2451+scProperties :: Lens' SoftwareConfig (Maybe SoftwareConfigProperties)
2452+scProperties
2453+ = lens _scProperties (\ s a -> s{_scProperties = a})
2454+
2455+instance FromJSON SoftwareConfig where
2456+ parseJSON
2457+ = withObject "SoftwareConfig"
2458+ (\ o ->
2459+ SoftwareConfig <$>
2460+ (o .:? "imageVersion") <*> (o .:? "properties"))
2461+
2462+instance ToJSON SoftwareConfig where
2463+ toJSON SoftwareConfig{..}
2464+ = object
2465+ (catMaybes
2466+ [("imageVersion" .=) <$> _scImageVersion,
2467+ ("properties" .=) <$> _scProperties])
2468+
2469+-- | A list of jobs in a project.
2470+--
2471+-- /See:/ 'listJobsResponse' smart constructor.
2472+data ListJobsResponse = ListJobsResponse
2473+ { _ljrNextPageToken :: !(Maybe Text)
2474+ , _ljrJobs :: !(Maybe [Job])
2475+ } deriving (Eq,Show,Data,Typeable,Generic)
2476+
2477+-- | Creates a value of 'ListJobsResponse' with the minimum fields required to make a request.
2478+--
2479+-- Use one of the following lenses to modify other fields as desired:
2480+--
2481+-- * 'ljrNextPageToken'
2482+--
2483+-- * 'ljrJobs'
2484+listJobsResponse
2485+ :: ListJobsResponse
2486+listJobsResponse =
2487+ ListJobsResponse
2488+ { _ljrNextPageToken = Nothing
2489+ , _ljrJobs = Nothing
2490+ }
2491+
2492+-- | [Optional] This token is included in the response if there are more
2493+-- results to fetch. To fetch additional results, provide this value as the
2494+-- \`page_token\` in a subsequent ListJobsRequest.
2495+ljrNextPageToken :: Lens' ListJobsResponse (Maybe Text)
2496+ljrNextPageToken
2497+ = lens _ljrNextPageToken
2498+ (\ s a -> s{_ljrNextPageToken = a})
2499+
2500+-- | [Output-only] Jobs list.
2501+ljrJobs :: Lens' ListJobsResponse [Job]
2502+ljrJobs
2503+ = lens _ljrJobs (\ s a -> s{_ljrJobs = a}) . _Default
2504+ . _Coerce
2505+
2506+instance FromJSON ListJobsResponse where
2507+ parseJSON
2508+ = withObject "ListJobsResponse"
2509+ (\ o ->
2510+ ListJobsResponse <$>
2511+ (o .:? "nextPageToken") <*>
2512+ (o .:? "jobs" .!= mempty))
2513+
2514+instance ToJSON ListJobsResponse where
2515+ toJSON ListJobsResponse{..}
2516+ = object
2517+ (catMaybes
2518+ [("nextPageToken" .=) <$> _ljrNextPageToken,
2519+ ("jobs" .=) <$> _ljrJobs])
2520+
2521+-- | [Optional] A mapping of property names to values, used to configure
2522+-- Spark. Properties that conflict with values set by the Cloud Dataproc
2523+-- API may be overwritten. Can include properties set in
2524+-- \/etc\/spark\/conf\/spark-defaults.conf and classes in user code.
2525+--
2526+-- /See:/ 'sparkJobProperties' smart constructor.
2527+newtype SparkJobProperties = SparkJobProperties
2528+ { _sjpAddtional :: HashMap Text Text
2529+ } deriving (Eq,Show,Data,Typeable,Generic)
2530+
2531+-- | Creates a value of 'SparkJobProperties' with the minimum fields required to make a request.
2532+--
2533+-- Use one of the following lenses to modify other fields as desired:
2534+--
2535+-- * 'sjpAddtional'
2536+sparkJobProperties
2537+ :: HashMap Text Text -- ^ 'sjpAddtional'
2538+ -> SparkJobProperties
2539+sparkJobProperties pSjpAddtional_ =
2540+ SparkJobProperties
2541+ { _sjpAddtional = _Coerce # pSjpAddtional_
2542+ }
2543+
2544+sjpAddtional :: Lens' SparkJobProperties (HashMap Text Text)
2545+sjpAddtional
2546+ = lens _sjpAddtional (\ s a -> s{_sjpAddtional = a})
2547+ . _Coerce
2548+
2549+instance FromJSON SparkJobProperties where
2550+ parseJSON
2551+ = withObject "SparkJobProperties"
2552+ (\ o -> SparkJobProperties <$> (parseJSONObject o))
2553+
2554+instance ToJSON SparkJobProperties where
2555+ toJSON = toJSON . _sjpAddtional
2556+
2557+-- | A Cloud Dataproc job for running PySpark applications on YARN.
2558+--
2559+-- /See:/ 'pySparkJob' smart constructor.
2560+data PySparkJob = PySparkJob
2561+ { _psjPythonFileURIs :: !(Maybe [Text])
2562+ , _psjMainPythonFileURI :: !(Maybe Text)
2563+ , _psjArgs :: !(Maybe [Text])
2564+ , _psjJarFileURIs :: !(Maybe [Text])
2565+ , _psjFileURIs :: !(Maybe [Text])
2566+ , _psjArchiveURIs :: !(Maybe [Text])
2567+ , _psjLoggingConfig :: !(Maybe LoggingConfig)
2568+ , _psjProperties :: !(Maybe PySparkJobProperties)
2569+ } deriving (Eq,Show,Data,Typeable,Generic)
2570+
2571+-- | Creates a value of 'PySparkJob' with the minimum fields required to make a request.
2572+--
2573+-- Use one of the following lenses to modify other fields as desired:
2574+--
2575+-- * 'psjPythonFileURIs'
2576+--
2577+-- * 'psjMainPythonFileURI'
2578+--
2579+-- * 'psjArgs'
2580+--
2581+-- * 'psjJarFileURIs'
2582+--
2583+-- * 'psjFileURIs'
2584+--
2585+-- * 'psjArchiveURIs'
2586+--
2587+-- * 'psjLoggingConfig'
2588+--
2589+-- * 'psjProperties'
2590+pySparkJob
2591+ :: PySparkJob
2592+pySparkJob =
2593+ PySparkJob
2594+ { _psjPythonFileURIs = Nothing
2595+ , _psjMainPythonFileURI = Nothing
2596+ , _psjArgs = Nothing
2597+ , _psjJarFileURIs = Nothing
2598+ , _psjFileURIs = Nothing
2599+ , _psjArchiveURIs = Nothing
2600+ , _psjLoggingConfig = Nothing
2601+ , _psjProperties = Nothing
2602+ }
2603+
2604+-- | [Optional] HCFS file URIs of Python files to pass to the PySpark
2605+-- framework. Supported file types: .py, .egg, and .zip.
2606+psjPythonFileURIs :: Lens' PySparkJob [Text]
2607+psjPythonFileURIs
2608+ = lens _psjPythonFileURIs
2609+ (\ s a -> s{_psjPythonFileURIs = a})
2610+ . _Default
2611+ . _Coerce
2612+
2613+-- | [Required] The HCFS URI of the main Python file to use as the driver.
2614+-- Must be a .py file.
2615+psjMainPythonFileURI :: Lens' PySparkJob (Maybe Text)
2616+psjMainPythonFileURI
2617+ = lens _psjMainPythonFileURI
2618+ (\ s a -> s{_psjMainPythonFileURI = a})
2619+
2620+-- | [Optional] The arguments to pass to the driver. Do not include
2621+-- arguments, such as \`--conf\`, that can be set as job properties, since
2622+-- a collision may occur that causes an incorrect job submission.
2623+psjArgs :: Lens' PySparkJob [Text]
2624+psjArgs
2625+ = lens _psjArgs (\ s a -> s{_psjArgs = a}) . _Default
2626+ . _Coerce
2627+
2628+-- | [Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Python
2629+-- driver and tasks.
2630+psjJarFileURIs :: Lens' PySparkJob [Text]
2631+psjJarFileURIs
2632+ = lens _psjJarFileURIs
2633+ (\ s a -> s{_psjJarFileURIs = a})
2634+ . _Default
2635+ . _Coerce
2636+
2637+-- | [Optional] HCFS URIs of files to be copied to the working directory of
2638+-- Python drivers and distributed tasks. Useful for naively parallel tasks.
2639+psjFileURIs :: Lens' PySparkJob [Text]
2640+psjFileURIs
2641+ = lens _psjFileURIs (\ s a -> s{_psjFileURIs = a}) .
2642+ _Default
2643+ . _Coerce
2644+
2645+-- | [Optional] HCFS URIs of archives to be extracted in the working
2646+-- directory of .jar, .tar, .tar.gz, .tgz, and .zip.
2647+psjArchiveURIs :: Lens' PySparkJob [Text]
2648+psjArchiveURIs
2649+ = lens _psjArchiveURIs
2650+ (\ s a -> s{_psjArchiveURIs = a})
2651+ . _Default
2652+ . _Coerce
2653+
2654+-- | [Optional] The runtime log config for job execution.
2655+psjLoggingConfig :: Lens' PySparkJob (Maybe LoggingConfig)
2656+psjLoggingConfig
2657+ = lens _psjLoggingConfig
2658+ (\ s a -> s{_psjLoggingConfig = a})
2659+
2660+-- | [Optional] A mapping of property names to values, used to configure
2661+-- PySpark. Properties that conflict with values set by the Cloud Dataproc
2662+-- API may be overwritten. Can include properties set in
2663+-- \/etc\/spark\/conf\/spark-defaults.conf and classes in user code.
2664+psjProperties :: Lens' PySparkJob (Maybe PySparkJobProperties)
2665+psjProperties
2666+ = lens _psjProperties
2667+ (\ s a -> s{_psjProperties = a})
2668+
2669+instance FromJSON PySparkJob where
2670+ parseJSON
2671+ = withObject "PySparkJob"
2672+ (\ o ->
2673+ PySparkJob <$>
2674+ (o .:? "pythonFileUris" .!= mempty) <*>
2675+ (o .:? "mainPythonFileUri")
2676+ <*> (o .:? "args" .!= mempty)
2677+ <*> (o .:? "jarFileUris" .!= mempty)
2678+ <*> (o .:? "fileUris" .!= mempty)
2679+ <*> (o .:? "archiveUris" .!= mempty)
2680+ <*> (o .:? "loggingConfig")
2681+ <*> (o .:? "properties"))
2682+
2683+instance ToJSON PySparkJob where
2684+ toJSON PySparkJob{..}
2685+ = object
2686+ (catMaybes
2687+ [("pythonFileUris" .=) <$> _psjPythonFileURIs,
2688+ ("mainPythonFileUri" .=) <$> _psjMainPythonFileURI,
2689+ ("args" .=) <$> _psjArgs,
2690+ ("jarFileUris" .=) <$> _psjJarFileURIs,
2691+ ("fileUris" .=) <$> _psjFileURIs,
2692+ ("archiveUris" .=) <$> _psjArchiveURIs,
2693+ ("loggingConfig" .=) <$> _psjLoggingConfig,
2694+ ("properties" .=) <$> _psjProperties])
2695+
2696+-- | Specifies the resources used to actively manage an instance group.
2697+--
2698+-- /See:/ 'managedGroupConfig' smart constructor.
2699+data ManagedGroupConfig = ManagedGroupConfig
2700+ { _mgcInstanceTemplateName :: !(Maybe Text)
2701+ , _mgcInstanceGroupManagerName :: !(Maybe Text)
2702+ } deriving (Eq,Show,Data,Typeable,Generic)
2703+
2704+-- | Creates a value of 'ManagedGroupConfig' with the minimum fields required to make a request.
2705+--
2706+-- Use one of the following lenses to modify other fields as desired:
2707+--
2708+-- * 'mgcInstanceTemplateName'
2709+--
2710+-- * 'mgcInstanceGroupManagerName'
2711+managedGroupConfig
2712+ :: ManagedGroupConfig
2713+managedGroupConfig =
2714+ ManagedGroupConfig
2715+ { _mgcInstanceTemplateName = Nothing
2716+ , _mgcInstanceGroupManagerName = Nothing
2717+ }
2718+
2719+-- | [Output-only] The name of the Instance Template used for the Managed
2720+-- Instance Group.
2721+mgcInstanceTemplateName :: Lens' ManagedGroupConfig (Maybe Text)
2722+mgcInstanceTemplateName
2723+ = lens _mgcInstanceTemplateName
2724+ (\ s a -> s{_mgcInstanceTemplateName = a})
2725+
2726+-- | [Output-only] The name of the Instance Group Manager for this group.
2727+mgcInstanceGroupManagerName :: Lens' ManagedGroupConfig (Maybe Text)
2728+mgcInstanceGroupManagerName
2729+ = lens _mgcInstanceGroupManagerName
2730+ (\ s a -> s{_mgcInstanceGroupManagerName = a})
2731+
2732+instance FromJSON ManagedGroupConfig where
2733+ parseJSON
2734+ = withObject "ManagedGroupConfig"
2735+ (\ o ->
2736+ ManagedGroupConfig <$>
2737+ (o .:? "instanceTemplateName") <*>
2738+ (o .:? "instanceGroupManagerName"))
2739+
2740+instance ToJSON ManagedGroupConfig where
2741+ toJSON ManagedGroupConfig{..}
2742+ = object
2743+ (catMaybes
2744+ [("instanceTemplateName" .=) <$>
2745+ _mgcInstanceTemplateName,
2746+ ("instanceGroupManagerName" .=) <$>
2747+ _mgcInstanceGroupManagerName])
2748+
2749+-- | The list of all clusters in a project.
2750+--
2751+-- /See:/ 'listClustersResponse' smart constructor.
2752+data ListClustersResponse = ListClustersResponse
2753+ { _lcrNextPageToken :: !(Maybe Text)
2754+ , _lcrClusters :: !(Maybe [Cluster])
2755+ } deriving (Eq,Show,Data,Typeable,Generic)
2756+
2757+-- | Creates a value of 'ListClustersResponse' with the minimum fields required to make a request.
2758+--
2759+-- Use one of the following lenses to modify other fields as desired:
2760+--
2761+-- * 'lcrNextPageToken'
2762+--
2763+-- * 'lcrClusters'
2764+listClustersResponse
2765+ :: ListClustersResponse
2766+listClustersResponse =
2767+ ListClustersResponse
2768+ { _lcrNextPageToken = Nothing
2769+ , _lcrClusters = Nothing
2770+ }
2771+
2772+-- | [Optional] This token is included in the response if there are more
2773+-- results to fetch. To fetch additional results, provide this value as the
2774+-- \`page_token\` in a subsequent ListClustersRequest.
2775+lcrNextPageToken :: Lens' ListClustersResponse (Maybe Text)
2776+lcrNextPageToken
2777+ = lens _lcrNextPageToken
2778+ (\ s a -> s{_lcrNextPageToken = a})
2779+
2780+-- | [Output-only] The clusters in the project.
2781+lcrClusters :: Lens' ListClustersResponse [Cluster]
2782+lcrClusters
2783+ = lens _lcrClusters (\ s a -> s{_lcrClusters = a}) .
2784+ _Default
2785+ . _Coerce
2786+
2787+instance FromJSON ListClustersResponse where
2788+ parseJSON
2789+ = withObject "ListClustersResponse"
2790+ (\ o ->
2791+ ListClustersResponse <$>
2792+ (o .:? "nextPageToken") <*>
2793+ (o .:? "clusters" .!= mempty))
2794+
2795+instance ToJSON ListClustersResponse where
2796+ toJSON ListClustersResponse{..}
2797+ = object
2798+ (catMaybes
2799+ [("nextPageToken" .=) <$> _lcrNextPageToken,
2800+ ("clusters" .=) <$> _lcrClusters])
2801+
2802+-- | A request to cancel a job.
2803+--
2804+-- /See:/ 'cancelJobRequest' smart constructor.
2805+data CancelJobRequest =
2806+ CancelJobRequest
2807+ deriving (Eq,Show,Data,Typeable,Generic)
2808+
2809+-- | Creates a value of 'CancelJobRequest' with the minimum fields required to make a request.
2810+--
2811+cancelJobRequest
2812+ :: CancelJobRequest
2813+cancelJobRequest = CancelJobRequest
2814+
2815+instance FromJSON CancelJobRequest where
2816+ parseJSON
2817+ = withObject "CancelJobRequest"
2818+ (\ o -> pure CancelJobRequest)
2819+
2820+instance ToJSON CancelJobRequest where
2821+ toJSON = const emptyObject
2822+
2823+-- | A list of queries to run on a cluster.
2824+--
2825+-- /See:/ 'queryList' smart constructor.
2826+newtype QueryList = QueryList
2827+ { _qlQueries :: Maybe [Text]
2828+ } deriving (Eq,Show,Data,Typeable,Generic)
2829+
2830+-- | Creates a value of 'QueryList' with the minimum fields required to make a request.
2831+--
2832+-- Use one of the following lenses to modify other fields as desired:
2833+--
2834+-- * 'qlQueries'
2835+queryList
2836+ :: QueryList
2837+queryList =
2838+ QueryList
2839+ { _qlQueries = Nothing
2840+ }
2841+
2842+-- | [Required] The queries to execute. You do not need to terminate a query
2843+-- with a semicolon. Multiple queries can be specified in one string by
2844+-- separating each with a semicolon. Here is an example of an Cloud
2845+-- Dataproc API snippet that uses a QueryList to specify a HiveJob:
2846+-- \"hiveJob\": { \"queryList\": { \"queries\": [ \"query1\", \"query2\",
2847+-- \"query3;query4\", ] } }
2848+qlQueries :: Lens' QueryList [Text]
2849+qlQueries
2850+ = lens _qlQueries (\ s a -> s{_qlQueries = a}) .
2851+ _Default
2852+ . _Coerce
2853+
2854+instance FromJSON QueryList where
2855+ parseJSON
2856+ = withObject "QueryList"
2857+ (\ o -> QueryList <$> (o .:? "queries" .!= mempty))
2858+
2859+instance ToJSON QueryList where
2860+ toJSON QueryList{..}
2861+ = object (catMaybes [("queries" .=) <$> _qlQueries])
2862+
2863+-- | Metadata describing the operation.
2864+--
2865+-- /See:/ 'operationMetadata' smart constructor.
2866+data OperationMetadata = OperationMetadata
2867+ { _omStatus :: !(Maybe OperationStatus)
2868+ , _omState :: !(Maybe Text)
2869+ , _omClusterUuid :: !(Maybe Text)
2870+ , _omInsertTime :: !(Maybe Text)
2871+ , _omStartTime :: !(Maybe Text)
2872+ , _omInnerState :: !(Maybe Text)
2873+ , _omEndTime :: !(Maybe Text)
2874+ , _omDetails :: !(Maybe Text)
2875+ , _omClusterName :: !(Maybe Text)
2876+ , _omOperationType :: !(Maybe Text)
2877+ , _omStatusHistory :: !(Maybe [OperationStatus])
2878+ , _omDescription :: !(Maybe Text)
2879+ } deriving (Eq,Show,Data,Typeable,Generic)
2880+
2881+-- | Creates a value of 'OperationMetadata' with the minimum fields required to make a request.
2882+--
2883+-- Use one of the following lenses to modify other fields as desired:
2884+--
2885+-- * 'omStatus'
2886+--
2887+-- * 'omState'
2888+--
2889+-- * 'omClusterUuid'
2890+--
2891+-- * 'omInsertTime'
2892+--
2893+-- * 'omStartTime'
2894+--
2895+-- * 'omInnerState'
2896+--
2897+-- * 'omEndTime'
2898+--
2899+-- * 'omDetails'
2900+--
2901+-- * 'omClusterName'
2902+--
2903+-- * 'omOperationType'
2904+--
2905+-- * 'omStatusHistory'
2906+--
2907+-- * 'omDescription'
2908+operationMetadata
2909+ :: OperationMetadata
2910+operationMetadata =
2911+ OperationMetadata
2912+ { _omStatus = Nothing
2913+ , _omState = Nothing
2914+ , _omClusterUuid = Nothing
2915+ , _omInsertTime = Nothing
2916+ , _omStartTime = Nothing
2917+ , _omInnerState = Nothing
2918+ , _omEndTime = Nothing
2919+ , _omDetails = Nothing
2920+ , _omClusterName = Nothing
2921+ , _omOperationType = Nothing
2922+ , _omStatusHistory = Nothing
2923+ , _omDescription = Nothing
2924+ }
2925+
2926+-- | [Output-only] Current operation status.
2927+omStatus :: Lens' OperationMetadata (Maybe OperationStatus)
2928+omStatus = lens _omStatus (\ s a -> s{_omStatus = a})
2929+
2930+-- | A message containing the operation state.
2931+omState :: Lens' OperationMetadata (Maybe Text)
2932+omState = lens _omState (\ s a -> s{_omState = a})
2933+
2934+-- | Cluster UUId for the operation.
2935+omClusterUuid :: Lens' OperationMetadata (Maybe Text)
2936+omClusterUuid
2937+ = lens _omClusterUuid
2938+ (\ s a -> s{_omClusterUuid = a})
2939+
2940+-- | The time that the operation was requested.
2941+omInsertTime :: Lens' OperationMetadata (Maybe Text)
2942+omInsertTime
2943+ = lens _omInsertTime (\ s a -> s{_omInsertTime = a})
2944+
2945+-- | The time that the operation was started by the server.
2946+omStartTime :: Lens' OperationMetadata (Maybe Text)
2947+omStartTime
2948+ = lens _omStartTime (\ s a -> s{_omStartTime = a})
2949+
2950+-- | A message containing the detailed operation state.
2951+omInnerState :: Lens' OperationMetadata (Maybe Text)
2952+omInnerState
2953+ = lens _omInnerState (\ s a -> s{_omInnerState = a})
2954+
2955+-- | The time that the operation completed.
2956+omEndTime :: Lens' OperationMetadata (Maybe Text)
2957+omEndTime
2958+ = lens _omEndTime (\ s a -> s{_omEndTime = a})
2959+
2960+-- | A message containing any operation metadata details.
2961+omDetails :: Lens' OperationMetadata (Maybe Text)
2962+omDetails
2963+ = lens _omDetails (\ s a -> s{_omDetails = a})
2964+
2965+-- | Name of the cluster for the operation.
2966+omClusterName :: Lens' OperationMetadata (Maybe Text)
2967+omClusterName
2968+ = lens _omClusterName
2969+ (\ s a -> s{_omClusterName = a})
2970+
2971+-- | [Output-only] The operation type.
2972+omOperationType :: Lens' OperationMetadata (Maybe Text)
2973+omOperationType
2974+ = lens _omOperationType
2975+ (\ s a -> s{_omOperationType = a})
2976+
2977+-- | [Output-only] Previous operation status.
2978+omStatusHistory :: Lens' OperationMetadata [OperationStatus]
2979+omStatusHistory
2980+ = lens _omStatusHistory
2981+ (\ s a -> s{_omStatusHistory = a})
2982+ . _Default
2983+ . _Coerce
2984+
2985+-- | [Output-only] Short description of operation.
2986+omDescription :: Lens' OperationMetadata (Maybe Text)
2987+omDescription
2988+ = lens _omDescription
2989+ (\ s a -> s{_omDescription = a})
2990+
2991+instance FromJSON OperationMetadata where
2992+ parseJSON
2993+ = withObject "OperationMetadata"
2994+ (\ o ->
2995+ OperationMetadata <$>
2996+ (o .:? "status") <*> (o .:? "state") <*>
2997+ (o .:? "clusterUuid")
2998+ <*> (o .:? "insertTime")
2999+ <*> (o .:? "startTime")
3000+ <*> (o .:? "innerState")
3001+ <*> (o .:? "endTime")
3002+ <*> (o .:? "details")
3003+ <*> (o .:? "clusterName")
3004+ <*> (o .:? "operationType")
3005+ <*> (o .:? "statusHistory" .!= mempty)
3006+ <*> (o .:? "description"))
3007+
3008+instance ToJSON OperationMetadata where
3009+ toJSON OperationMetadata{..}
3010+ = object
3011+ (catMaybes
3012+ [("status" .=) <$> _omStatus,
3013+ ("state" .=) <$> _omState,
3014+ ("clusterUuid" .=) <$> _omClusterUuid,
3015+ ("insertTime" .=) <$> _omInsertTime,
3016+ ("startTime" .=) <$> _omStartTime,
3017+ ("innerState" .=) <$> _omInnerState,
3018+ ("endTime" .=) <$> _omEndTime,
3019+ ("details" .=) <$> _omDetails,
3020+ ("clusterName" .=) <$> _omClusterName,
3021+ ("operationType" .=) <$> _omOperationType,
3022+ ("statusHistory" .=) <$> _omStatusHistory,
3023+ ("description" .=) <$> _omDescription])
3024+
3025+-- | Cloud Dataproc job status.
3026+--
3027+-- /See:/ 'jobStatus' smart constructor.
3028+data JobStatus = JobStatus
3029+ { _jsState :: !(Maybe Text)
3030+ , _jsStateStartTime :: !(Maybe Text)
3031+ , _jsDetails :: !(Maybe Text)
3032+ } deriving (Eq,Show,Data,Typeable,Generic)
3033+
3034+-- | Creates a value of 'JobStatus' with the minimum fields required to make a request.
3035+--
3036+-- Use one of the following lenses to modify other fields as desired:
3037+--
3038+-- * 'jsState'
3039+--
3040+-- * 'jsStateStartTime'
3041+--
3042+-- * 'jsDetails'
3043+jobStatus
3044+ :: JobStatus
3045+jobStatus =
3046+ JobStatus
3047+ { _jsState = Nothing
3048+ , _jsStateStartTime = Nothing
3049+ , _jsDetails = Nothing
3050+ }
3051+
3052+-- | [Required] A state message specifying the overall job state.
3053+jsState :: Lens' JobStatus (Maybe Text)
3054+jsState = lens _jsState (\ s a -> s{_jsState = a})
3055+
3056+-- | [Output-only] The time when this state was entered.
3057+jsStateStartTime :: Lens' JobStatus (Maybe Text)
3058+jsStateStartTime
3059+ = lens _jsStateStartTime
3060+ (\ s a -> s{_jsStateStartTime = a})
3061+
3062+-- | [Optional] Job state details, such as an error description if the state
3063+-- is ERROR.
3064+jsDetails :: Lens' JobStatus (Maybe Text)
3065+jsDetails
3066+ = lens _jsDetails (\ s a -> s{_jsDetails = a})
3067+
3068+instance FromJSON JobStatus where
3069+ parseJSON
3070+ = withObject "JobStatus"
3071+ (\ o ->
3072+ JobStatus <$>
3073+ (o .:? "state") <*> (o .:? "stateStartTime") <*>
3074+ (o .:? "details"))
3075+
3076+instance ToJSON JobStatus where
3077+ toJSON JobStatus{..}
3078+ = object
3079+ (catMaybes
3080+ [("state" .=) <$> _jsState,
3081+ ("stateStartTime" .=) <$> _jsStateStartTime,
3082+ ("details" .=) <$> _jsDetails])
3083+
3084+-- | [Optional] Mapping of query variable names to values (equivalent to the
3085+-- Pig command: \`name=[value]\`).
3086+--
3087+-- /See:/ 'pigJobScriptVariables' smart constructor.
3088+newtype PigJobScriptVariables = PigJobScriptVariables
3089+ { _pjsvAddtional :: HashMap Text Text
3090+ } deriving (Eq,Show,Data,Typeable,Generic)
3091+
3092+-- | Creates a value of 'PigJobScriptVariables' with the minimum fields required to make a request.
3093+--
3094+-- Use one of the following lenses to modify other fields as desired:
3095+--
3096+-- * 'pjsvAddtional'
3097+pigJobScriptVariables
3098+ :: HashMap Text Text -- ^ 'pjsvAddtional'
3099+ -> PigJobScriptVariables
3100+pigJobScriptVariables pPjsvAddtional_ =
3101+ PigJobScriptVariables
3102+ { _pjsvAddtional = _Coerce # pPjsvAddtional_
3103+ }
3104+
3105+pjsvAddtional :: Lens' PigJobScriptVariables (HashMap Text Text)
3106+pjsvAddtional
3107+ = lens _pjsvAddtional
3108+ (\ s a -> s{_pjsvAddtional = a})
3109+ . _Coerce
3110+
3111+instance FromJSON PigJobScriptVariables where
3112+ parseJSON
3113+ = withObject "PigJobScriptVariables"
3114+ (\ o ->
3115+ PigJobScriptVariables <$> (parseJSONObject o))
3116+
3117+instance ToJSON PigJobScriptVariables where
3118+ toJSON = toJSON . _pjsvAddtional
3119+
3120+-- | The normal response of the operation in case of success. If the original
3121+-- method returns no data on success, such as \`Delete\`, the response is
3122+-- \`google.protobuf.Empty\`. If the original method is standard
3123+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
3124+-- For other methods, the response should have the type \`XxxResponse\`,
3125+-- where \`Xxx\` is the original method name. For example, if the original
3126+-- method name is \`TakeSnapshot()\`, the inferred response type is
3127+-- \`TakeSnapshotResponse\`.
3128+--
3129+-- /See:/ 'operationResponse' smart constructor.
3130+newtype OperationResponse = OperationResponse
3131+ { _orAddtional :: HashMap Text JSONValue
3132+ } deriving (Eq,Show,Data,Typeable,Generic)
3133+
3134+-- | Creates a value of 'OperationResponse' with the minimum fields required to make a request.
3135+--
3136+-- Use one of the following lenses to modify other fields as desired:
3137+--
3138+-- * 'orAddtional'
3139+operationResponse
3140+ :: HashMap Text JSONValue -- ^ 'orAddtional'
3141+ -> OperationResponse
3142+operationResponse pOrAddtional_ =
3143+ OperationResponse
3144+ { _orAddtional = _Coerce # pOrAddtional_
3145+ }
3146+
3147+-- | Properties of the object. Contains field \'ype with type URL.
3148+orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
3149+orAddtional
3150+ = lens _orAddtional (\ s a -> s{_orAddtional = a}) .
3151+ _Coerce
3152+
3153+instance FromJSON OperationResponse where
3154+ parseJSON
3155+ = withObject "OperationResponse"
3156+ (\ o -> OperationResponse <$> (parseJSONObject o))
3157+
3158+instance ToJSON OperationResponse where
3159+ toJSON = toJSON . _orAddtional
3160+
3161+-- | The per-package log levels for the driver. This may include \"root\"
3162+-- package name to configure rootLogger. Examples: \'com.google = FATAL\',
3163+-- \'root = INFO\', \'org.apache = DEBUG\'
3164+--
3165+-- /See:/ 'loggingConfigDriverLogLevels' smart constructor.
3166+newtype LoggingConfigDriverLogLevels = LoggingConfigDriverLogLevels
3167+ { _lcdllAddtional :: HashMap Text Text
3168+ } deriving (Eq,Show,Data,Typeable,Generic)
3169+
3170+-- | Creates a value of 'LoggingConfigDriverLogLevels' with the minimum fields required to make a request.
3171+--
3172+-- Use one of the following lenses to modify other fields as desired:
3173+--
3174+-- * 'lcdllAddtional'
3175+loggingConfigDriverLogLevels
3176+ :: HashMap Text Text -- ^ 'lcdllAddtional'
3177+ -> LoggingConfigDriverLogLevels
3178+loggingConfigDriverLogLevels pLcdllAddtional_ =
3179+ LoggingConfigDriverLogLevels
3180+ { _lcdllAddtional = _Coerce # pLcdllAddtional_
3181+ }
3182+
3183+lcdllAddtional :: Lens' LoggingConfigDriverLogLevels (HashMap Text Text)
3184+lcdllAddtional
3185+ = lens _lcdllAddtional
3186+ (\ s a -> s{_lcdllAddtional = a})
3187+ . _Coerce
3188+
3189+instance FromJSON LoggingConfigDriverLogLevels where
3190+ parseJSON
3191+ = withObject "LoggingConfigDriverLogLevels"
3192+ (\ o ->
3193+ LoggingConfigDriverLogLevels <$> (parseJSONObject o))
3194+
3195+instance ToJSON LoggingConfigDriverLogLevels where
3196+ toJSON = toJSON . _lcdllAddtional
3197+
3198+-- | The status of a cluster and its instances.
3199+--
3200+-- /See:/ 'clusterStatus' smart constructor.
3201+data ClusterStatus = ClusterStatus
3202+ { _csState :: !(Maybe Text)
3203+ , _csStateStartTime :: !(Maybe Text)
3204+ , _csDetail :: !(Maybe Text)
3205+ } deriving (Eq,Show,Data,Typeable,Generic)
3206+
3207+-- | Creates a value of 'ClusterStatus' 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+-- * 'csState'
3212+--
3213+-- * 'csStateStartTime'
3214+--
3215+-- * 'csDetail'
3216+clusterStatus
3217+ :: ClusterStatus
3218+clusterStatus =
3219+ ClusterStatus
3220+ { _csState = Nothing
3221+ , _csStateStartTime = Nothing
3222+ , _csDetail = Nothing
3223+ }
3224+
3225+-- | The cluster\'s state.
3226+csState :: Lens' ClusterStatus (Maybe Text)
3227+csState = lens _csState (\ s a -> s{_csState = a})
3228+
3229+-- | Time when this state was entered.
3230+csStateStartTime :: Lens' ClusterStatus (Maybe Text)
3231+csStateStartTime
3232+ = lens _csStateStartTime
3233+ (\ s a -> s{_csStateStartTime = a})
3234+
3235+-- | Optional details of cluster\'s state.
3236+csDetail :: Lens' ClusterStatus (Maybe Text)
3237+csDetail = lens _csDetail (\ s a -> s{_csDetail = a})
3238+
3239+instance FromJSON ClusterStatus where
3240+ parseJSON
3241+ = withObject "ClusterStatus"
3242+ (\ o ->
3243+ ClusterStatus <$>
3244+ (o .:? "state") <*> (o .:? "stateStartTime") <*>
3245+ (o .:? "detail"))
3246+
3247+instance ToJSON ClusterStatus where
3248+ toJSON ClusterStatus{..}
3249+ = object
3250+ (catMaybes
3251+ [("state" .=) <$> _csState,
3252+ ("stateStartTime" .=) <$> _csStateStartTime,
3253+ ("detail" .=) <$> _csDetail])
3254+
3255+-- | A Cloud Dataproc job for running Pig queries on YARN.
3256+--
3257+-- /See:/ 'pigJob' smart constructor.
3258+data PigJob = PigJob
3259+ { _pjQueryFileURI :: !(Maybe Text)
3260+ , _pjJarFileURIs :: !(Maybe [Text])
3261+ , _pjScriptVariables :: !(Maybe PigJobScriptVariables)
3262+ , _pjQueryList :: !(Maybe QueryList)
3263+ , _pjContinueOnFailure :: !(Maybe Bool)
3264+ , _pjLoggingConfig :: !(Maybe LoggingConfig)
3265+ , _pjProperties :: !(Maybe PigJobProperties)
3266+ } deriving (Eq,Show,Data,Typeable,Generic)
3267+
3268+-- | Creates a value of 'PigJob' with the minimum fields required to make a request.
3269+--
3270+-- Use one of the following lenses to modify other fields as desired:
3271+--
3272+-- * 'pjQueryFileURI'
3273+--
3274+-- * 'pjJarFileURIs'
3275+--
3276+-- * 'pjScriptVariables'
3277+--
3278+-- * 'pjQueryList'
3279+--
3280+-- * 'pjContinueOnFailure'
3281+--
3282+-- * 'pjLoggingConfig'
3283+--
3284+-- * 'pjProperties'
3285+pigJob
3286+ :: PigJob
3287+pigJob =
3288+ PigJob
3289+ { _pjQueryFileURI = Nothing
3290+ , _pjJarFileURIs = Nothing
3291+ , _pjScriptVariables = Nothing
3292+ , _pjQueryList = Nothing
3293+ , _pjContinueOnFailure = Nothing
3294+ , _pjLoggingConfig = Nothing
3295+ , _pjProperties = Nothing
3296+ }
3297+
3298+-- | The HCFS URI of the script that contains the Pig queries.
3299+pjQueryFileURI :: Lens' PigJob (Maybe Text)
3300+pjQueryFileURI
3301+ = lens _pjQueryFileURI
3302+ (\ s a -> s{_pjQueryFileURI = a})
3303+
3304+-- | [Optional] HCFS URIs of jar files to add to the CLASSPATH of the Pig
3305+-- Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
3306+pjJarFileURIs :: Lens' PigJob [Text]
3307+pjJarFileURIs
3308+ = lens _pjJarFileURIs
3309+ (\ s a -> s{_pjJarFileURIs = a})
3310+ . _Default
3311+ . _Coerce
3312+
3313+-- | [Optional] Mapping of query variable names to values (equivalent to the
3314+-- Pig command: \`name=[value]\`).
3315+pjScriptVariables :: Lens' PigJob (Maybe PigJobScriptVariables)
3316+pjScriptVariables
3317+ = lens _pjScriptVariables
3318+ (\ s a -> s{_pjScriptVariables = a})
3319+
3320+-- | A list of queries.
3321+pjQueryList :: Lens' PigJob (Maybe QueryList)
3322+pjQueryList
3323+ = lens _pjQueryList (\ s a -> s{_pjQueryList = a})
3324+
3325+-- | [Optional] Whether to continue executing queries if a query fails. The
3326+-- default value is \`false\`. Setting to \`true\` can be useful when
3327+-- executing independent parallel queries.
3328+pjContinueOnFailure :: Lens' PigJob (Maybe Bool)
3329+pjContinueOnFailure
3330+ = lens _pjContinueOnFailure
3331+ (\ s a -> s{_pjContinueOnFailure = a})
3332+
3333+-- | [Optional] The runtime log config for job execution.
3334+pjLoggingConfig :: Lens' PigJob (Maybe LoggingConfig)
3335+pjLoggingConfig
3336+ = lens _pjLoggingConfig
3337+ (\ s a -> s{_pjLoggingConfig = a})
3338+
3339+-- | [Optional] A mapping of property names to values, used to configure Pig.
3340+-- Properties that conflict with values set by the Cloud Dataproc API may
3341+-- be overwritten. Can include properties set in
3342+-- \/etc\/hadoop\/conf\/*-site.xml, \/etc\/pig\/conf\/pig.properties, and
3343+-- classes in user code.
3344+pjProperties :: Lens' PigJob (Maybe PigJobProperties)
3345+pjProperties
3346+ = lens _pjProperties (\ s a -> s{_pjProperties = a})
3347+
3348+instance FromJSON PigJob where
3349+ parseJSON
3350+ = withObject "PigJob"
3351+ (\ o ->
3352+ PigJob <$>
3353+ (o .:? "queryFileUri") <*>
3354+ (o .:? "jarFileUris" .!= mempty)
3355+ <*> (o .:? "scriptVariables")
3356+ <*> (o .:? "queryList")
3357+ <*> (o .:? "continueOnFailure")
3358+ <*> (o .:? "loggingConfig")
3359+ <*> (o .:? "properties"))
3360+
3361+instance ToJSON PigJob where
3362+ toJSON PigJob{..}
3363+ = object
3364+ (catMaybes
3365+ [("queryFileUri" .=) <$> _pjQueryFileURI,
3366+ ("jarFileUris" .=) <$> _pjJarFileURIs,
3367+ ("scriptVariables" .=) <$> _pjScriptVariables,
3368+ ("queryList" .=) <$> _pjQueryList,
3369+ ("continueOnFailure" .=) <$> _pjContinueOnFailure,
3370+ ("loggingConfig" .=) <$> _pjLoggingConfig,
3371+ ("properties" .=) <$> _pjProperties])
3372+
3373+-- | The runtime logging config of the job.
3374+--
3375+-- /See:/ 'loggingConfig' smart constructor.
3376+newtype LoggingConfig = LoggingConfig
3377+ { _lcDriverLogLevels :: Maybe LoggingConfigDriverLogLevels
3378+ } deriving (Eq,Show,Data,Typeable,Generic)
3379+
3380+-- | Creates a value of 'LoggingConfig' with the minimum fields required to make a request.
3381+--
3382+-- Use one of the following lenses to modify other fields as desired:
3383+--
3384+-- * 'lcDriverLogLevels'
3385+loggingConfig
3386+ :: LoggingConfig
3387+loggingConfig =
3388+ LoggingConfig
3389+ { _lcDriverLogLevels = Nothing
3390+ }
3391+
3392+-- | The per-package log levels for the driver. This may include \"root\"
3393+-- package name to configure rootLogger. Examples: \'com.google = FATAL\',
3394+-- \'root = INFO\', \'org.apache = DEBUG\'
3395+lcDriverLogLevels :: Lens' LoggingConfig (Maybe LoggingConfigDriverLogLevels)
3396+lcDriverLogLevels
3397+ = lens _lcDriverLogLevels
3398+ (\ s a -> s{_lcDriverLogLevels = a})
3399+
3400+instance FromJSON LoggingConfig where
3401+ parseJSON
3402+ = withObject "LoggingConfig"
3403+ (\ o -> LoggingConfig <$> (o .:? "driverLogLevels"))
3404+
3405+instance ToJSON LoggingConfig where
3406+ toJSON LoggingConfig{..}
3407+ = object
3408+ (catMaybes
3409+ [("driverLogLevels" .=) <$> _lcDriverLogLevels])
gogol-dataproc/gen/Network/Google/Dataproc/Types/Sum.hsnew file+19
@@ -0,0 +1,19 @@
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.Dataproc.Types.Sum
11+-- Copyright : (c) 2015 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.Dataproc.Types.Sum where
18+
19+import Network.Google.Prelude
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Media/Download.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.Dataproc.Media.Download
17+-- Copyright : (c) 2015 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+-- Method for media download. Download is supported on the URI
24+-- \`\/v1\/media\/{+name}?alt=media\`.
25+--
26+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.media.download@.
27+module Network.Google.Resource.Dataproc.Media.Download
28+ (
29+ -- * REST Resource
30+ MediaDownloadResource
31+
32+ -- * Creating a Request
33+ , mediaDownload
34+ , MediaDownload'
35+
36+ -- * Request Lenses
37+ , mdXgafv
38+ , mdUploadProtocol
39+ , mdResourceName
40+ , mdPp
41+ , mdAccessToken
42+ , mdUploadType
43+ , mdBearerToken
44+ , mdCallback
45+ ) where
46+
47+import Network.Google.Dataproc.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @dataproc.media.download@ method which the
51+-- 'MediaDownload'' request conforms to.
52+type MediaDownloadResource =
53+ "v1" :>
54+ "media" :>
55+ Capture "resourceName" Text :>
56+ QueryParam "$.xgafv" Text :>
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] Media
64+ :<|>
65+ "v1" :>
66+ "media" :>
67+ Capture "resourceName" Text :>
68+ QueryParam "$.xgafv" Text :>
69+ QueryParam "upload_protocol" Text :>
70+ QueryParam "pp" Bool :>
71+ QueryParam "access_token" Text :>
72+ QueryParam "uploadType" Text :>
73+ QueryParam "bearer_token" Text :>
74+ QueryParam "callback" Text :>
75+ QueryParam "alt" AltMedia :>
76+ Get '[OctetStream] Stream
77+
78+-- | Method for media download. Download is supported on the URI
79+-- \`\/v1\/media\/{+name}?alt=media\`.
80+--
81+-- /See:/ 'mediaDownload' smart constructor.
82+data MediaDownload' = MediaDownload'
83+ { _mdXgafv :: !(Maybe Text)
84+ , _mdUploadProtocol :: !(Maybe Text)
85+ , _mdResourceName :: !Text
86+ , _mdPp :: !Bool
87+ , _mdAccessToken :: !(Maybe Text)
88+ , _mdUploadType :: !(Maybe Text)
89+ , _mdBearerToken :: !(Maybe Text)
90+ , _mdCallback :: !(Maybe Text)
91+ } deriving (Eq,Show,Data,Typeable,Generic)
92+
93+-- | Creates a value of 'MediaDownload' 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+-- * 'mdXgafv'
98+--
99+-- * 'mdUploadProtocol'
100+--
101+-- * 'mdResourceName'
102+--
103+-- * 'mdPp'
104+--
105+-- * 'mdAccessToken'
106+--
107+-- * 'mdUploadType'
108+--
109+-- * 'mdBearerToken'
110+--
111+-- * 'mdCallback'
112+mediaDownload
113+ :: Text -- ^ 'mdResourceName'
114+ -> MediaDownload'
115+mediaDownload pMdResourceName_ =
116+ MediaDownload'
117+ { _mdXgafv = Nothing
118+ , _mdUploadProtocol = Nothing
119+ , _mdResourceName = pMdResourceName_
120+ , _mdPp = True
121+ , _mdAccessToken = Nothing
122+ , _mdUploadType = Nothing
123+ , _mdBearerToken = Nothing
124+ , _mdCallback = Nothing
125+ }
126+
127+-- | V1 error format.
128+mdXgafv :: Lens' MediaDownload' (Maybe Text)
129+mdXgafv = lens _mdXgafv (\ s a -> s{_mdXgafv = a})
130+
131+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
132+mdUploadProtocol :: Lens' MediaDownload' (Maybe Text)
133+mdUploadProtocol
134+ = lens _mdUploadProtocol
135+ (\ s a -> s{_mdUploadProtocol = a})
136+
137+-- | Name of the media that is being downloaded. See
138+-- ByteStream.ReadRequest.resource_name.
139+mdResourceName :: Lens' MediaDownload' Text
140+mdResourceName
141+ = lens _mdResourceName
142+ (\ s a -> s{_mdResourceName = a})
143+
144+-- | Pretty-print response.
145+mdPp :: Lens' MediaDownload' Bool
146+mdPp = lens _mdPp (\ s a -> s{_mdPp = a})
147+
148+-- | OAuth access token.
149+mdAccessToken :: Lens' MediaDownload' (Maybe Text)
150+mdAccessToken
151+ = lens _mdAccessToken
152+ (\ s a -> s{_mdAccessToken = a})
153+
154+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
155+mdUploadType :: Lens' MediaDownload' (Maybe Text)
156+mdUploadType
157+ = lens _mdUploadType (\ s a -> s{_mdUploadType = a})
158+
159+-- | OAuth bearer token.
160+mdBearerToken :: Lens' MediaDownload' (Maybe Text)
161+mdBearerToken
162+ = lens _mdBearerToken
163+ (\ s a -> s{_mdBearerToken = a})
164+
165+-- | JSONP
166+mdCallback :: Lens' MediaDownload' (Maybe Text)
167+mdCallback
168+ = lens _mdCallback (\ s a -> s{_mdCallback = a})
169+
170+instance GoogleRequest MediaDownload' where
171+ type Rs MediaDownload' = Media
172+ requestClient MediaDownload'{..}
173+ = go _mdResourceName _mdXgafv _mdUploadProtocol
174+ (Just _mdPp)
175+ _mdAccessToken
176+ _mdUploadType
177+ _mdBearerToken
178+ _mdCallback
179+ (Just AltJSON)
180+ dataprocService
181+ where go :<|> _
182+ = buildClient (Proxy :: Proxy MediaDownloadResource)
183+ mempty
184+
185+instance GoogleRequest (MediaDownload MediaDownload')
186+ where
187+ type Rs (MediaDownload MediaDownload') = Stream
188+ requestClient (MediaDownload MediaDownload'{..})
189+ = go _mdResourceName _mdXgafv _mdUploadProtocol
190+ (Just _mdPp)
191+ _mdAccessToken
192+ _mdUploadType
193+ _mdBearerToken
194+ _mdCallback
195+ (Just AltMedia)
196+ dataprocService
197+ where _ :<|> go
198+ = buildClient (Proxy :: Proxy MediaDownloadResource)
199+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Media/Upload.hsnew file+218
@@ -0,0 +1,218 @@
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.Dataproc.Media.Upload
17+-- Copyright : (c) 2015 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+-- Method for media upload. Upload is supported on the URI
24+-- \`\/upload\/v1\/media\/{+name}\`.
25+--
26+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.media.upload@.
27+module Network.Google.Resource.Dataproc.Media.Upload
28+ (
29+ -- * REST Resource
30+ MediaUploadResource
31+
32+ -- * Creating a Request
33+ , mediaUpload
34+ , MediaUpload'
35+
36+ -- * Request Lenses
37+ , muXgafv
38+ , muUploadProtocol
39+ , muResourceName
40+ , muPp
41+ , muAccessToken
42+ , muUploadType
43+ , muPayload
44+ , muBearerToken
45+ , muCallback
46+ ) where
47+
48+import Network.Google.Dataproc.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @dataproc.media.upload@ method which the
52+-- 'MediaUpload'' request conforms to.
53+type MediaUploadResource =
54+ "v1" :>
55+ "media" :>
56+ Capture "resourceName" Text :>
57+ QueryParam "$.xgafv" Text :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :>
65+ ReqBody '[JSON] Media :> Post '[JSON] Media
66+ :<|>
67+ "upload" :>
68+ "v1" :>
69+ "media" :>
70+ Capture "resourceName" Text :>
71+ QueryParam "$.xgafv" Text :>
72+ QueryParam "upload_protocol" Text :>
73+ QueryParam "pp" Bool :>
74+ QueryParam "access_token" Text :>
75+ QueryParam "uploadType" Text :>
76+ QueryParam "bearer_token" Text :>
77+ QueryParam "callback" Text :>
78+ QueryParam "alt" AltJSON :>
79+ QueryParam "uploadType" AltMedia :>
80+ MultipartRelated '[JSON] Media RequestBody :>
81+ Post '[JSON] Media
82+
83+-- | Method for media upload. Upload is supported on the URI
84+-- \`\/upload\/v1\/media\/{+name}\`.
85+--
86+-- /See:/ 'mediaUpload' smart constructor.
87+data MediaUpload' = MediaUpload'
88+ { _muXgafv :: !(Maybe Text)
89+ , _muUploadProtocol :: !(Maybe Text)
90+ , _muResourceName :: !Text
91+ , _muPp :: !Bool
92+ , _muAccessToken :: !(Maybe Text)
93+ , _muUploadType :: !(Maybe Text)
94+ , _muPayload :: !Media
95+ , _muBearerToken :: !(Maybe Text)
96+ , _muCallback :: !(Maybe Text)
97+ } deriving (Eq,Show,Data,Typeable,Generic)
98+
99+-- | Creates a value of 'MediaUpload' with the minimum fields required to make a request.
100+--
101+-- Use one of the following lenses to modify other fields as desired:
102+--
103+-- * 'muXgafv'
104+--
105+-- * 'muUploadProtocol'
106+--
107+-- * 'muResourceName'
108+--
109+-- * 'muPp'
110+--
111+-- * 'muAccessToken'
112+--
113+-- * 'muUploadType'
114+--
115+-- * 'muPayload'
116+--
117+-- * 'muBearerToken'
118+--
119+-- * 'muCallback'
120+mediaUpload
121+ :: Text -- ^ 'muResourceName'
122+ -> Media -- ^ 'muPayload'
123+ -> MediaUpload'
124+mediaUpload pMuResourceName_ pMuPayload_ =
125+ MediaUpload'
126+ { _muXgafv = Nothing
127+ , _muUploadProtocol = Nothing
128+ , _muResourceName = pMuResourceName_
129+ , _muPp = True
130+ , _muAccessToken = Nothing
131+ , _muUploadType = Nothing
132+ , _muPayload = pMuPayload_
133+ , _muBearerToken = Nothing
134+ , _muCallback = Nothing
135+ }
136+
137+-- | V1 error format.
138+muXgafv :: Lens' MediaUpload' (Maybe Text)
139+muXgafv = lens _muXgafv (\ s a -> s{_muXgafv = a})
140+
141+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
142+muUploadProtocol :: Lens' MediaUpload' (Maybe Text)
143+muUploadProtocol
144+ = lens _muUploadProtocol
145+ (\ s a -> s{_muUploadProtocol = a})
146+
147+-- | Name of the media that is being downloaded. See
148+-- ByteStream.ReadRequest.resource_name.
149+muResourceName :: Lens' MediaUpload' Text
150+muResourceName
151+ = lens _muResourceName
152+ (\ s a -> s{_muResourceName = a})
153+
154+-- | Pretty-print response.
155+muPp :: Lens' MediaUpload' Bool
156+muPp = lens _muPp (\ s a -> s{_muPp = a})
157+
158+-- | OAuth access token.
159+muAccessToken :: Lens' MediaUpload' (Maybe Text)
160+muAccessToken
161+ = lens _muAccessToken
162+ (\ s a -> s{_muAccessToken = a})
163+
164+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
165+muUploadType :: Lens' MediaUpload' (Maybe Text)
166+muUploadType
167+ = lens _muUploadType (\ s a -> s{_muUploadType = a})
168+
169+-- | Multipart request metadata.
170+muPayload :: Lens' MediaUpload' Media
171+muPayload
172+ = lens _muPayload (\ s a -> s{_muPayload = a})
173+
174+-- | OAuth bearer token.
175+muBearerToken :: Lens' MediaUpload' (Maybe Text)
176+muBearerToken
177+ = lens _muBearerToken
178+ (\ s a -> s{_muBearerToken = a})
179+
180+-- | JSONP
181+muCallback :: Lens' MediaUpload' (Maybe Text)
182+muCallback
183+ = lens _muCallback (\ s a -> s{_muCallback = a})
184+
185+instance GoogleRequest MediaUpload' where
186+ type Rs MediaUpload' = Media
187+ requestClient MediaUpload'{..}
188+ = go _muResourceName _muXgafv _muUploadProtocol
189+ (Just _muPp)
190+ _muAccessToken
191+ _muUploadType
192+ _muBearerToken
193+ _muCallback
194+ (Just AltJSON)
195+ _muPayload
196+ dataprocService
197+ where go :<|> _
198+ = buildClient (Proxy :: Proxy MediaUploadResource)
199+ mempty
200+
201+instance GoogleRequest (MediaUpload MediaUpload')
202+ where
203+ type Rs (MediaUpload MediaUpload') = Media
204+ requestClient (MediaUpload MediaUpload'{..} body)
205+ = go _muResourceName _muXgafv _muUploadProtocol
206+ (Just _muPp)
207+ _muAccessToken
208+ _muUploadType
209+ _muBearerToken
210+ _muCallback
211+ (Just AltJSON)
212+ (Just AltMedia)
213+ _muPayload
214+ body
215+ dataprocService
216+ where _ :<|> go
217+ = buildClient (Proxy :: Proxy MediaUploadResource)
218+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/Create.hsnew file+202
@@ -0,0 +1,202 @@
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.Dataproc.Projects.Regions.Clusters.Create
17+-- Copyright : (c) 2015 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 cluster in a project.
24+--
25+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.clusters.create@.
26+module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Create
27+ (
28+ -- * REST Resource
29+ ProjectsRegionsClustersCreateResource
30+
31+ -- * Creating a Request
32+ , projectsRegionsClustersCreate
33+ , ProjectsRegionsClustersCreate
34+
35+ -- * Request Lenses
36+ , prccXgafv
37+ , prccUploadProtocol
38+ , prccPp
39+ , prccAccessToken
40+ , prccUploadType
41+ , prccPayload
42+ , prccBearerToken
43+ , prccRegion
44+ , prccProjectId
45+ , prccCallback
46+ ) where
47+
48+import Network.Google.Dataproc.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @dataproc.projects.regions.clusters.create@ method which the
52+-- 'ProjectsRegionsClustersCreate' request conforms to.
53+type ProjectsRegionsClustersCreateResource =
54+ "v1" :>
55+ "projects" :>
56+ Capture "projectId" Text :>
57+ "regions" :>
58+ Capture "region" Text :>
59+ "clusters" :>
60+ QueryParam "$.xgafv" Text :>
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] Cluster :>
69+ Post '[JSON] Operation
70+
71+-- | Creates a cluster in a project.
72+--
73+-- /See:/ 'projectsRegionsClustersCreate' smart constructor.
74+data ProjectsRegionsClustersCreate = ProjectsRegionsClustersCreate
75+ { _prccXgafv :: !(Maybe Text)
76+ , _prccUploadProtocol :: !(Maybe Text)
77+ , _prccPp :: !Bool
78+ , _prccAccessToken :: !(Maybe Text)
79+ , _prccUploadType :: !(Maybe Text)
80+ , _prccPayload :: !Cluster
81+ , _prccBearerToken :: !(Maybe Text)
82+ , _prccRegion :: !Text
83+ , _prccProjectId :: !Text
84+ , _prccCallback :: !(Maybe Text)
85+ } deriving (Eq,Show,Data,Typeable,Generic)
86+
87+-- | Creates a value of 'ProjectsRegionsClustersCreate' with the minimum fields required to make a request.
88+--
89+-- Use one of the following lenses to modify other fields as desired:
90+--
91+-- * 'prccXgafv'
92+--
93+-- * 'prccUploadProtocol'
94+--
95+-- * 'prccPp'
96+--
97+-- * 'prccAccessToken'
98+--
99+-- * 'prccUploadType'
100+--
101+-- * 'prccPayload'
102+--
103+-- * 'prccBearerToken'
104+--
105+-- * 'prccRegion'
106+--
107+-- * 'prccProjectId'
108+--
109+-- * 'prccCallback'
110+projectsRegionsClustersCreate
111+ :: Cluster -- ^ 'prccPayload'
112+ -> Text -- ^ 'prccRegion'
113+ -> Text -- ^ 'prccProjectId'
114+ -> ProjectsRegionsClustersCreate
115+projectsRegionsClustersCreate pPrccPayload_ pPrccRegion_ pPrccProjectId_ =
116+ ProjectsRegionsClustersCreate
117+ { _prccXgafv = Nothing
118+ , _prccUploadProtocol = Nothing
119+ , _prccPp = True
120+ , _prccAccessToken = Nothing
121+ , _prccUploadType = Nothing
122+ , _prccPayload = pPrccPayload_
123+ , _prccBearerToken = Nothing
124+ , _prccRegion = pPrccRegion_
125+ , _prccProjectId = pPrccProjectId_
126+ , _prccCallback = Nothing
127+ }
128+
129+-- | V1 error format.
130+prccXgafv :: Lens' ProjectsRegionsClustersCreate (Maybe Text)
131+prccXgafv
132+ = lens _prccXgafv (\ s a -> s{_prccXgafv = a})
133+
134+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
135+prccUploadProtocol :: Lens' ProjectsRegionsClustersCreate (Maybe Text)
136+prccUploadProtocol
137+ = lens _prccUploadProtocol
138+ (\ s a -> s{_prccUploadProtocol = a})
139+
140+-- | Pretty-print response.
141+prccPp :: Lens' ProjectsRegionsClustersCreate Bool
142+prccPp = lens _prccPp (\ s a -> s{_prccPp = a})
143+
144+-- | OAuth access token.
145+prccAccessToken :: Lens' ProjectsRegionsClustersCreate (Maybe Text)
146+prccAccessToken
147+ = lens _prccAccessToken
148+ (\ s a -> s{_prccAccessToken = a})
149+
150+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
151+prccUploadType :: Lens' ProjectsRegionsClustersCreate (Maybe Text)
152+prccUploadType
153+ = lens _prccUploadType
154+ (\ s a -> s{_prccUploadType = a})
155+
156+-- | Multipart request metadata.
157+prccPayload :: Lens' ProjectsRegionsClustersCreate Cluster
158+prccPayload
159+ = lens _prccPayload (\ s a -> s{_prccPayload = a})
160+
161+-- | OAuth bearer token.
162+prccBearerToken :: Lens' ProjectsRegionsClustersCreate (Maybe Text)
163+prccBearerToken
164+ = lens _prccBearerToken
165+ (\ s a -> s{_prccBearerToken = a})
166+
167+-- | [Required] The Cloud Dataproc region in which to handle the request.
168+prccRegion :: Lens' ProjectsRegionsClustersCreate Text
169+prccRegion
170+ = lens _prccRegion (\ s a -> s{_prccRegion = a})
171+
172+-- | [Required] The ID of the Google Cloud Platform project that the cluster
173+-- belongs to.
174+prccProjectId :: Lens' ProjectsRegionsClustersCreate Text
175+prccProjectId
176+ = lens _prccProjectId
177+ (\ s a -> s{_prccProjectId = a})
178+
179+-- | JSONP
180+prccCallback :: Lens' ProjectsRegionsClustersCreate (Maybe Text)
181+prccCallback
182+ = lens _prccCallback (\ s a -> s{_prccCallback = a})
183+
184+instance GoogleRequest ProjectsRegionsClustersCreate
185+ where
186+ type Rs ProjectsRegionsClustersCreate = Operation
187+ requestClient ProjectsRegionsClustersCreate{..}
188+ = go _prccProjectId _prccRegion _prccXgafv
189+ _prccUploadProtocol
190+ (Just _prccPp)
191+ _prccAccessToken
192+ _prccUploadType
193+ _prccBearerToken
194+ _prccCallback
195+ (Just AltJSON)
196+ _prccPayload
197+ dataprocService
198+ where go
199+ = buildClient
200+ (Proxy ::
201+ Proxy ProjectsRegionsClustersCreateResource)
202+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/Delete.hsnew file+203
@@ -0,0 +1,203 @@
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.Dataproc.Projects.Regions.Clusters.Delete
17+-- Copyright : (c) 2015 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 cluster in a project.
24+--
25+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.clusters.delete@.
26+module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Delete
27+ (
28+ -- * REST Resource
29+ ProjectsRegionsClustersDeleteResource
30+
31+ -- * Creating a Request
32+ , projectsRegionsClustersDelete
33+ , ProjectsRegionsClustersDelete
34+
35+ -- * Request Lenses
36+ , prcdXgafv
37+ , prcdUploadProtocol
38+ , prcdPp
39+ , prcdAccessToken
40+ , prcdUploadType
41+ , prcdBearerToken
42+ , prcdClusterName
43+ , prcdRegion
44+ , prcdProjectId
45+ , prcdCallback
46+ ) where
47+
48+import Network.Google.Dataproc.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @dataproc.projects.regions.clusters.delete@ method which the
52+-- 'ProjectsRegionsClustersDelete' request conforms to.
53+type ProjectsRegionsClustersDeleteResource =
54+ "v1" :>
55+ "projects" :>
56+ Capture "projectId" Text :>
57+ "regions" :>
58+ Capture "region" Text :>
59+ "clusters" :>
60+ Capture "clusterName" Text :>
61+ QueryParam "$.xgafv" Text :>
62+ QueryParam "upload_protocol" Text :>
63+ QueryParam "pp" Bool :>
64+ QueryParam "access_token" Text :>
65+ QueryParam "uploadType" Text :>
66+ QueryParam "bearer_token" Text :>
67+ QueryParam "callback" Text :>
68+ QueryParam "alt" AltJSON :>
69+ Delete '[JSON] Operation
70+
71+-- | Deletes a cluster in a project.
72+--
73+-- /See:/ 'projectsRegionsClustersDelete' smart constructor.
74+data ProjectsRegionsClustersDelete = ProjectsRegionsClustersDelete
75+ { _prcdXgafv :: !(Maybe Text)
76+ , _prcdUploadProtocol :: !(Maybe Text)
77+ , _prcdPp :: !Bool
78+ , _prcdAccessToken :: !(Maybe Text)
79+ , _prcdUploadType :: !(Maybe Text)
80+ , _prcdBearerToken :: !(Maybe Text)
81+ , _prcdClusterName :: !Text
82+ , _prcdRegion :: !Text
83+ , _prcdProjectId :: !Text
84+ , _prcdCallback :: !(Maybe Text)
85+ } deriving (Eq,Show,Data,Typeable,Generic)
86+
87+-- | Creates a value of 'ProjectsRegionsClustersDelete' with the minimum fields required to make a request.
88+--
89+-- Use one of the following lenses to modify other fields as desired:
90+--
91+-- * 'prcdXgafv'
92+--
93+-- * 'prcdUploadProtocol'
94+--
95+-- * 'prcdPp'
96+--
97+-- * 'prcdAccessToken'
98+--
99+-- * 'prcdUploadType'
100+--
101+-- * 'prcdBearerToken'
102+--
103+-- * 'prcdClusterName'
104+--
105+-- * 'prcdRegion'
106+--
107+-- * 'prcdProjectId'
108+--
109+-- * 'prcdCallback'
110+projectsRegionsClustersDelete
111+ :: Text -- ^ 'prcdClusterName'
112+ -> Text -- ^ 'prcdRegion'
113+ -> Text -- ^ 'prcdProjectId'
114+ -> ProjectsRegionsClustersDelete
115+projectsRegionsClustersDelete pPrcdClusterName_ pPrcdRegion_ pPrcdProjectId_ =
116+ ProjectsRegionsClustersDelete
117+ { _prcdXgafv = Nothing
118+ , _prcdUploadProtocol = Nothing
119+ , _prcdPp = True
120+ , _prcdAccessToken = Nothing
121+ , _prcdUploadType = Nothing
122+ , _prcdBearerToken = Nothing
123+ , _prcdClusterName = pPrcdClusterName_
124+ , _prcdRegion = pPrcdRegion_
125+ , _prcdProjectId = pPrcdProjectId_
126+ , _prcdCallback = Nothing
127+ }
128+
129+-- | V1 error format.
130+prcdXgafv :: Lens' ProjectsRegionsClustersDelete (Maybe Text)
131+prcdXgafv
132+ = lens _prcdXgafv (\ s a -> s{_prcdXgafv = a})
133+
134+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
135+prcdUploadProtocol :: Lens' ProjectsRegionsClustersDelete (Maybe Text)
136+prcdUploadProtocol
137+ = lens _prcdUploadProtocol
138+ (\ s a -> s{_prcdUploadProtocol = a})
139+
140+-- | Pretty-print response.
141+prcdPp :: Lens' ProjectsRegionsClustersDelete Bool
142+prcdPp = lens _prcdPp (\ s a -> s{_prcdPp = a})
143+
144+-- | OAuth access token.
145+prcdAccessToken :: Lens' ProjectsRegionsClustersDelete (Maybe Text)
146+prcdAccessToken
147+ = lens _prcdAccessToken
148+ (\ s a -> s{_prcdAccessToken = a})
149+
150+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
151+prcdUploadType :: Lens' ProjectsRegionsClustersDelete (Maybe Text)
152+prcdUploadType
153+ = lens _prcdUploadType
154+ (\ s a -> s{_prcdUploadType = a})
155+
156+-- | OAuth bearer token.
157+prcdBearerToken :: Lens' ProjectsRegionsClustersDelete (Maybe Text)
158+prcdBearerToken
159+ = lens _prcdBearerToken
160+ (\ s a -> s{_prcdBearerToken = a})
161+
162+-- | [Required] The cluster name.
163+prcdClusterName :: Lens' ProjectsRegionsClustersDelete Text
164+prcdClusterName
165+ = lens _prcdClusterName
166+ (\ s a -> s{_prcdClusterName = a})
167+
168+-- | [Required] The Cloud Dataproc region in which to handle the request.
169+prcdRegion :: Lens' ProjectsRegionsClustersDelete Text
170+prcdRegion
171+ = lens _prcdRegion (\ s a -> s{_prcdRegion = a})
172+
173+-- | [Required] The ID of the Google Cloud Platform project that the cluster
174+-- belongs to.
175+prcdProjectId :: Lens' ProjectsRegionsClustersDelete Text
176+prcdProjectId
177+ = lens _prcdProjectId
178+ (\ s a -> s{_prcdProjectId = a})
179+
180+-- | JSONP
181+prcdCallback :: Lens' ProjectsRegionsClustersDelete (Maybe Text)
182+prcdCallback
183+ = lens _prcdCallback (\ s a -> s{_prcdCallback = a})
184+
185+instance GoogleRequest ProjectsRegionsClustersDelete
186+ where
187+ type Rs ProjectsRegionsClustersDelete = Operation
188+ requestClient ProjectsRegionsClustersDelete{..}
189+ = go _prcdProjectId _prcdRegion _prcdClusterName
190+ _prcdXgafv
191+ _prcdUploadProtocol
192+ (Just _prcdPp)
193+ _prcdAccessToken
194+ _prcdUploadType
195+ _prcdBearerToken
196+ _prcdCallback
197+ (Just AltJSON)
198+ dataprocService
199+ where go
200+ = buildClient
201+ (Proxy ::
202+ Proxy ProjectsRegionsClustersDeleteResource)
203+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/Diagnose.hsnew file+209
@@ -0,0 +1,209 @@
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.Dataproc.Projects.Regions.Clusters.Diagnose
17+-- Copyright : (c) 2015 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 cluster diagnostic information. After the operation completes, the
24+-- Operation.response field contains \`DiagnoseClusterOutputLocation\`.
25+--
26+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.clusters.diagnose@.
27+module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Diagnose
28+ (
29+ -- * REST Resource
30+ ProjectsRegionsClustersDiagnoseResource
31+
32+ -- * Creating a Request
33+ , projectsRegionsClustersDiagnose
34+ , ProjectsRegionsClustersDiagnose
35+
36+ -- * Request Lenses
37+ , pXgafv
38+ , pUploadProtocol
39+ , pPp
40+ , pAccessToken
41+ , pUploadType
42+ , pPayload
43+ , pBearerToken
44+ , pClusterName
45+ , pRegion
46+ , pProjectId
47+ , pCallback
48+ ) where
49+
50+import Network.Google.Dataproc.Types
51+import Network.Google.Prelude
52+
53+-- | A resource alias for @dataproc.projects.regions.clusters.diagnose@ method which the
54+-- 'ProjectsRegionsClustersDiagnose' request conforms to.
55+type ProjectsRegionsClustersDiagnoseResource =
56+ "v1" :>
57+ "projects" :>
58+ Capture "projectId" Text :>
59+ "regions" :>
60+ Capture "region" Text :>
61+ "clusters" :>
62+ CaptureMode "clusterName" "diagnose" Text :>
63+ QueryParam "$.xgafv" Text :>
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] DiagnoseClusterRequest :>
72+ Post '[JSON] Operation
73+
74+-- | Gets cluster diagnostic information. After the operation completes, the
75+-- Operation.response field contains \`DiagnoseClusterOutputLocation\`.
76+--
77+-- /See:/ 'projectsRegionsClustersDiagnose' smart constructor.
78+data ProjectsRegionsClustersDiagnose = ProjectsRegionsClustersDiagnose
79+ { _pXgafv :: !(Maybe Text)
80+ , _pUploadProtocol :: !(Maybe Text)
81+ , _pPp :: !Bool
82+ , _pAccessToken :: !(Maybe Text)
83+ , _pUploadType :: !(Maybe Text)
84+ , _pPayload :: !DiagnoseClusterRequest
85+ , _pBearerToken :: !(Maybe Text)
86+ , _pClusterName :: !Text
87+ , _pRegion :: !Text
88+ , _pProjectId :: !Text
89+ , _pCallback :: !(Maybe Text)
90+ } deriving (Eq,Show,Data,Typeable,Generic)
91+
92+-- | Creates a value of 'ProjectsRegionsClustersDiagnose' with the minimum fields required to make a request.
93+--
94+-- Use one of the following lenses to modify other fields as desired:
95+--
96+-- * 'pXgafv'
97+--
98+-- * 'pUploadProtocol'
99+--
100+-- * 'pPp'
101+--
102+-- * 'pAccessToken'
103+--
104+-- * 'pUploadType'
105+--
106+-- * 'pPayload'
107+--
108+-- * 'pBearerToken'
109+--
110+-- * 'pClusterName'
111+--
112+-- * 'pRegion'
113+--
114+-- * 'pProjectId'
115+--
116+-- * 'pCallback'
117+projectsRegionsClustersDiagnose
118+ :: DiagnoseClusterRequest -- ^ 'pPayload'
119+ -> Text -- ^ 'pClusterName'
120+ -> Text -- ^ 'pRegion'
121+ -> Text -- ^ 'pProjectId'
122+ -> ProjectsRegionsClustersDiagnose
123+projectsRegionsClustersDiagnose pPPayload_ pPClusterName_ pPRegion_ pPProjectId_ =
124+ ProjectsRegionsClustersDiagnose
125+ { _pXgafv = Nothing
126+ , _pUploadProtocol = Nothing
127+ , _pPp = True
128+ , _pAccessToken = Nothing
129+ , _pUploadType = Nothing
130+ , _pPayload = pPPayload_
131+ , _pBearerToken = Nothing
132+ , _pClusterName = pPClusterName_
133+ , _pRegion = pPRegion_
134+ , _pProjectId = pPProjectId_
135+ , _pCallback = Nothing
136+ }
137+
138+-- | V1 error format.
139+pXgafv :: Lens' ProjectsRegionsClustersDiagnose (Maybe Text)
140+pXgafv = lens _pXgafv (\ s a -> s{_pXgafv = a})
141+
142+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
143+pUploadProtocol :: Lens' ProjectsRegionsClustersDiagnose (Maybe Text)
144+pUploadProtocol
145+ = lens _pUploadProtocol
146+ (\ s a -> s{_pUploadProtocol = a})
147+
148+-- | Pretty-print response.
149+pPp :: Lens' ProjectsRegionsClustersDiagnose Bool
150+pPp = lens _pPp (\ s a -> s{_pPp = a})
151+
152+-- | OAuth access token.
153+pAccessToken :: Lens' ProjectsRegionsClustersDiagnose (Maybe Text)
154+pAccessToken
155+ = lens _pAccessToken (\ s a -> s{_pAccessToken = a})
156+
157+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
158+pUploadType :: Lens' ProjectsRegionsClustersDiagnose (Maybe Text)
159+pUploadType
160+ = lens _pUploadType (\ s a -> s{_pUploadType = a})
161+
162+-- | Multipart request metadata.
163+pPayload :: Lens' ProjectsRegionsClustersDiagnose DiagnoseClusterRequest
164+pPayload = lens _pPayload (\ s a -> s{_pPayload = a})
165+
166+-- | OAuth bearer token.
167+pBearerToken :: Lens' ProjectsRegionsClustersDiagnose (Maybe Text)
168+pBearerToken
169+ = lens _pBearerToken (\ s a -> s{_pBearerToken = a})
170+
171+-- | [Required] The cluster name.
172+pClusterName :: Lens' ProjectsRegionsClustersDiagnose Text
173+pClusterName
174+ = lens _pClusterName (\ s a -> s{_pClusterName = a})
175+
176+-- | [Required] The Cloud Dataproc region in which to handle the request.
177+pRegion :: Lens' ProjectsRegionsClustersDiagnose Text
178+pRegion = lens _pRegion (\ s a -> s{_pRegion = a})
179+
180+-- | [Required] The ID of the Google Cloud Platform project that the cluster
181+-- belongs to.
182+pProjectId :: Lens' ProjectsRegionsClustersDiagnose Text
183+pProjectId
184+ = lens _pProjectId (\ s a -> s{_pProjectId = a})
185+
186+-- | JSONP
187+pCallback :: Lens' ProjectsRegionsClustersDiagnose (Maybe Text)
188+pCallback
189+ = lens _pCallback (\ s a -> s{_pCallback = a})
190+
191+instance GoogleRequest
192+ ProjectsRegionsClustersDiagnose where
193+ type Rs ProjectsRegionsClustersDiagnose = Operation
194+ requestClient ProjectsRegionsClustersDiagnose{..}
195+ = go _pProjectId _pRegion _pClusterName _pXgafv
196+ _pUploadProtocol
197+ (Just _pPp)
198+ _pAccessToken
199+ _pUploadType
200+ _pBearerToken
201+ _pCallback
202+ (Just AltJSON)
203+ _pPayload
204+ dataprocService
205+ where go
206+ = buildClient
207+ (Proxy ::
208+ Proxy ProjectsRegionsClustersDiagnoseResource)
209+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/Get.hsnew file+201
@@ -0,0 +1,201 @@
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.Dataproc.Projects.Regions.Clusters.Get
17+-- Copyright : (c) 2015 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 resource representation for a cluster in a project.
24+--
25+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.clusters.get@.
26+module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Get
27+ (
28+ -- * REST Resource
29+ ProjectsRegionsClustersGetResource
30+
31+ -- * Creating a Request
32+ , projectsRegionsClustersGet
33+ , ProjectsRegionsClustersGet
34+
35+ -- * Request Lenses
36+ , prcgXgafv
37+ , prcgUploadProtocol
38+ , prcgPp
39+ , prcgAccessToken
40+ , prcgUploadType
41+ , prcgBearerToken
42+ , prcgClusterName
43+ , prcgRegion
44+ , prcgProjectId
45+ , prcgCallback
46+ ) where
47+
48+import Network.Google.Dataproc.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @dataproc.projects.regions.clusters.get@ method which the
52+-- 'ProjectsRegionsClustersGet' request conforms to.
53+type ProjectsRegionsClustersGetResource =
54+ "v1" :>
55+ "projects" :>
56+ Capture "projectId" Text :>
57+ "regions" :>
58+ Capture "region" Text :>
59+ "clusters" :>
60+ Capture "clusterName" Text :>
61+ QueryParam "$.xgafv" Text :>
62+ QueryParam "upload_protocol" Text :>
63+ QueryParam "pp" Bool :>
64+ QueryParam "access_token" Text :>
65+ QueryParam "uploadType" Text :>
66+ QueryParam "bearer_token" Text :>
67+ QueryParam "callback" Text :>
68+ QueryParam "alt" AltJSON :> Get '[JSON] Cluster
69+
70+-- | Gets the resource representation for a cluster in a project.
71+--
72+-- /See:/ 'projectsRegionsClustersGet' smart constructor.
73+data ProjectsRegionsClustersGet = ProjectsRegionsClustersGet
74+ { _prcgXgafv :: !(Maybe Text)
75+ , _prcgUploadProtocol :: !(Maybe Text)
76+ , _prcgPp :: !Bool
77+ , _prcgAccessToken :: !(Maybe Text)
78+ , _prcgUploadType :: !(Maybe Text)
79+ , _prcgBearerToken :: !(Maybe Text)
80+ , _prcgClusterName :: !Text
81+ , _prcgRegion :: !Text
82+ , _prcgProjectId :: !Text
83+ , _prcgCallback :: !(Maybe Text)
84+ } deriving (Eq,Show,Data,Typeable,Generic)
85+
86+-- | Creates a value of 'ProjectsRegionsClustersGet' 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+-- * 'prcgXgafv'
91+--
92+-- * 'prcgUploadProtocol'
93+--
94+-- * 'prcgPp'
95+--
96+-- * 'prcgAccessToken'
97+--
98+-- * 'prcgUploadType'
99+--
100+-- * 'prcgBearerToken'
101+--
102+-- * 'prcgClusterName'
103+--
104+-- * 'prcgRegion'
105+--
106+-- * 'prcgProjectId'
107+--
108+-- * 'prcgCallback'
109+projectsRegionsClustersGet
110+ :: Text -- ^ 'prcgClusterName'
111+ -> Text -- ^ 'prcgRegion'
112+ -> Text -- ^ 'prcgProjectId'
113+ -> ProjectsRegionsClustersGet
114+projectsRegionsClustersGet pPrcgClusterName_ pPrcgRegion_ pPrcgProjectId_ =
115+ ProjectsRegionsClustersGet
116+ { _prcgXgafv = Nothing
117+ , _prcgUploadProtocol = Nothing
118+ , _prcgPp = True
119+ , _prcgAccessToken = Nothing
120+ , _prcgUploadType = Nothing
121+ , _prcgBearerToken = Nothing
122+ , _prcgClusterName = pPrcgClusterName_
123+ , _prcgRegion = pPrcgRegion_
124+ , _prcgProjectId = pPrcgProjectId_
125+ , _prcgCallback = Nothing
126+ }
127+
128+-- | V1 error format.
129+prcgXgafv :: Lens' ProjectsRegionsClustersGet (Maybe Text)
130+prcgXgafv
131+ = lens _prcgXgafv (\ s a -> s{_prcgXgafv = a})
132+
133+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
134+prcgUploadProtocol :: Lens' ProjectsRegionsClustersGet (Maybe Text)
135+prcgUploadProtocol
136+ = lens _prcgUploadProtocol
137+ (\ s a -> s{_prcgUploadProtocol = a})
138+
139+-- | Pretty-print response.
140+prcgPp :: Lens' ProjectsRegionsClustersGet Bool
141+prcgPp = lens _prcgPp (\ s a -> s{_prcgPp = a})
142+
143+-- | OAuth access token.
144+prcgAccessToken :: Lens' ProjectsRegionsClustersGet (Maybe Text)
145+prcgAccessToken
146+ = lens _prcgAccessToken
147+ (\ s a -> s{_prcgAccessToken = a})
148+
149+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
150+prcgUploadType :: Lens' ProjectsRegionsClustersGet (Maybe Text)
151+prcgUploadType
152+ = lens _prcgUploadType
153+ (\ s a -> s{_prcgUploadType = a})
154+
155+-- | OAuth bearer token.
156+prcgBearerToken :: Lens' ProjectsRegionsClustersGet (Maybe Text)
157+prcgBearerToken
158+ = lens _prcgBearerToken
159+ (\ s a -> s{_prcgBearerToken = a})
160+
161+-- | [Required] The cluster name.
162+prcgClusterName :: Lens' ProjectsRegionsClustersGet Text
163+prcgClusterName
164+ = lens _prcgClusterName
165+ (\ s a -> s{_prcgClusterName = a})
166+
167+-- | [Required] The Cloud Dataproc region in which to handle the request.
168+prcgRegion :: Lens' ProjectsRegionsClustersGet Text
169+prcgRegion
170+ = lens _prcgRegion (\ s a -> s{_prcgRegion = a})
171+
172+-- | [Required] The ID of the Google Cloud Platform project that the cluster
173+-- belongs to.
174+prcgProjectId :: Lens' ProjectsRegionsClustersGet Text
175+prcgProjectId
176+ = lens _prcgProjectId
177+ (\ s a -> s{_prcgProjectId = a})
178+
179+-- | JSONP
180+prcgCallback :: Lens' ProjectsRegionsClustersGet (Maybe Text)
181+prcgCallback
182+ = lens _prcgCallback (\ s a -> s{_prcgCallback = a})
183+
184+instance GoogleRequest ProjectsRegionsClustersGet
185+ where
186+ type Rs ProjectsRegionsClustersGet = Cluster
187+ requestClient ProjectsRegionsClustersGet{..}
188+ = go _prcgProjectId _prcgRegion _prcgClusterName
189+ _prcgXgafv
190+ _prcgUploadProtocol
191+ (Just _prcgPp)
192+ _prcgAccessToken
193+ _prcgUploadType
194+ _prcgBearerToken
195+ _prcgCallback
196+ (Just AltJSON)
197+ dataprocService
198+ where go
199+ = buildClient
200+ (Proxy :: Proxy ProjectsRegionsClustersGetResource)
201+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/List.hsnew file+215
@@ -0,0 +1,215 @@
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.Dataproc.Projects.Regions.Clusters.List
17+-- Copyright : (c) 2015 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 regions\/{region}\/clusters in a project.
24+--
25+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.clusters.list@.
26+module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.List
27+ (
28+ -- * REST Resource
29+ ProjectsRegionsClustersListResource
30+
31+ -- * Creating a Request
32+ , projectsRegionsClustersList
33+ , ProjectsRegionsClustersList
34+
35+ -- * Request Lenses
36+ , prclXgafv
37+ , prclUploadProtocol
38+ , prclPp
39+ , prclAccessToken
40+ , prclUploadType
41+ , prclBearerToken
42+ , prclRegion
43+ , prclPageToken
44+ , prclProjectId
45+ , prclPageSize
46+ , prclCallback
47+ ) where
48+
49+import Network.Google.Dataproc.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @dataproc.projects.regions.clusters.list@ method which the
53+-- 'ProjectsRegionsClustersList' request conforms to.
54+type ProjectsRegionsClustersListResource =
55+ "v1" :>
56+ "projects" :>
57+ Capture "projectId" Text :>
58+ "regions" :>
59+ Capture "region" Text :>
60+ "clusters" :>
61+ QueryParam "$.xgafv" Text :>
62+ QueryParam "upload_protocol" Text :>
63+ QueryParam "pp" Bool :>
64+ QueryParam "access_token" Text :>
65+ QueryParam "uploadType" Text :>
66+ QueryParam "bearer_token" Text :>
67+ QueryParam "pageToken" Text :>
68+ QueryParam "pageSize" (Textual Int32) :>
69+ QueryParam "callback" Text :>
70+ QueryParam "alt" AltJSON :>
71+ Get '[JSON] ListClustersResponse
72+
73+-- | Lists all regions\/{region}\/clusters in a project.
74+--
75+-- /See:/ 'projectsRegionsClustersList' smart constructor.
76+data ProjectsRegionsClustersList = ProjectsRegionsClustersList
77+ { _prclXgafv :: !(Maybe Text)
78+ , _prclUploadProtocol :: !(Maybe Text)
79+ , _prclPp :: !Bool
80+ , _prclAccessToken :: !(Maybe Text)
81+ , _prclUploadType :: !(Maybe Text)
82+ , _prclBearerToken :: !(Maybe Text)
83+ , _prclRegion :: !Text
84+ , _prclPageToken :: !(Maybe Text)
85+ , _prclProjectId :: !Text
86+ , _prclPageSize :: !(Maybe (Textual Int32))
87+ , _prclCallback :: !(Maybe Text)
88+ } deriving (Eq,Show,Data,Typeable,Generic)
89+
90+-- | Creates a value of 'ProjectsRegionsClustersList' with the minimum fields required to make a request.
91+--
92+-- Use one of the following lenses to modify other fields as desired:
93+--
94+-- * 'prclXgafv'
95+--
96+-- * 'prclUploadProtocol'
97+--
98+-- * 'prclPp'
99+--
100+-- * 'prclAccessToken'
101+--
102+-- * 'prclUploadType'
103+--
104+-- * 'prclBearerToken'
105+--
106+-- * 'prclRegion'
107+--
108+-- * 'prclPageToken'
109+--
110+-- * 'prclProjectId'
111+--
112+-- * 'prclPageSize'
113+--
114+-- * 'prclCallback'
115+projectsRegionsClustersList
116+ :: Text -- ^ 'prclRegion'
117+ -> Text -- ^ 'prclProjectId'
118+ -> ProjectsRegionsClustersList
119+projectsRegionsClustersList pPrclRegion_ pPrclProjectId_ =
120+ ProjectsRegionsClustersList
121+ { _prclXgafv = Nothing
122+ , _prclUploadProtocol = Nothing
123+ , _prclPp = True
124+ , _prclAccessToken = Nothing
125+ , _prclUploadType = Nothing
126+ , _prclBearerToken = Nothing
127+ , _prclRegion = pPrclRegion_
128+ , _prclPageToken = Nothing
129+ , _prclProjectId = pPrclProjectId_
130+ , _prclPageSize = Nothing
131+ , _prclCallback = Nothing
132+ }
133+
134+-- | V1 error format.
135+prclXgafv :: Lens' ProjectsRegionsClustersList (Maybe Text)
136+prclXgafv
137+ = lens _prclXgafv (\ s a -> s{_prclXgafv = a})
138+
139+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
140+prclUploadProtocol :: Lens' ProjectsRegionsClustersList (Maybe Text)
141+prclUploadProtocol
142+ = lens _prclUploadProtocol
143+ (\ s a -> s{_prclUploadProtocol = a})
144+
145+-- | Pretty-print response.
146+prclPp :: Lens' ProjectsRegionsClustersList Bool
147+prclPp = lens _prclPp (\ s a -> s{_prclPp = a})
148+
149+-- | OAuth access token.
150+prclAccessToken :: Lens' ProjectsRegionsClustersList (Maybe Text)
151+prclAccessToken
152+ = lens _prclAccessToken
153+ (\ s a -> s{_prclAccessToken = a})
154+
155+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
156+prclUploadType :: Lens' ProjectsRegionsClustersList (Maybe Text)
157+prclUploadType
158+ = lens _prclUploadType
159+ (\ s a -> s{_prclUploadType = a})
160+
161+-- | OAuth bearer token.
162+prclBearerToken :: Lens' ProjectsRegionsClustersList (Maybe Text)
163+prclBearerToken
164+ = lens _prclBearerToken
165+ (\ s a -> s{_prclBearerToken = a})
166+
167+-- | [Required] The Cloud Dataproc region in which to handle the request.
168+prclRegion :: Lens' ProjectsRegionsClustersList Text
169+prclRegion
170+ = lens _prclRegion (\ s a -> s{_prclRegion = a})
171+
172+-- | The standard List page token.
173+prclPageToken :: Lens' ProjectsRegionsClustersList (Maybe Text)
174+prclPageToken
175+ = lens _prclPageToken
176+ (\ s a -> s{_prclPageToken = a})
177+
178+-- | [Required] The ID of the Google Cloud Platform project that the cluster
179+-- belongs to.
180+prclProjectId :: Lens' ProjectsRegionsClustersList Text
181+prclProjectId
182+ = lens _prclProjectId
183+ (\ s a -> s{_prclProjectId = a})
184+
185+-- | The standard List page size.
186+prclPageSize :: Lens' ProjectsRegionsClustersList (Maybe Int32)
187+prclPageSize
188+ = lens _prclPageSize (\ s a -> s{_prclPageSize = a})
189+ . mapping _Coerce
190+
191+-- | JSONP
192+prclCallback :: Lens' ProjectsRegionsClustersList (Maybe Text)
193+prclCallback
194+ = lens _prclCallback (\ s a -> s{_prclCallback = a})
195+
196+instance GoogleRequest ProjectsRegionsClustersList
197+ where
198+ type Rs ProjectsRegionsClustersList =
199+ ListClustersResponse
200+ requestClient ProjectsRegionsClustersList{..}
201+ = go _prclProjectId _prclRegion _prclXgafv
202+ _prclUploadProtocol
203+ (Just _prclPp)
204+ _prclAccessToken
205+ _prclUploadType
206+ _prclBearerToken
207+ _prclPageToken
208+ _prclPageSize
209+ _prclCallback
210+ (Just AltJSON)
211+ dataprocService
212+ where go
213+ = buildClient
214+ (Proxy :: Proxy ProjectsRegionsClustersListResource)
215+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/Patch.hsnew file+235
@@ -0,0 +1,235 @@
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.Dataproc.Projects.Regions.Clusters.Patch
17+-- Copyright : (c) 2015 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+-- Updates a cluster in a project.
24+--
25+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.clusters.patch@.
26+module Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Patch
27+ (
28+ -- * REST Resource
29+ ProjectsRegionsClustersPatchResource
30+
31+ -- * Creating a Request
32+ , projectsRegionsClustersPatch
33+ , ProjectsRegionsClustersPatch
34+
35+ -- * Request Lenses
36+ , prcpXgafv
37+ , prcpUploadProtocol
38+ , prcpUpdateMask
39+ , prcpPp
40+ , prcpAccessToken
41+ , prcpUploadType
42+ , prcpPayload
43+ , prcpBearerToken
44+ , prcpClusterName
45+ , prcpRegion
46+ , prcpProjectId
47+ , prcpCallback
48+ ) where
49+
50+import Network.Google.Dataproc.Types
51+import Network.Google.Prelude
52+
53+-- | A resource alias for @dataproc.projects.regions.clusters.patch@ method which the
54+-- 'ProjectsRegionsClustersPatch' request conforms to.
55+type ProjectsRegionsClustersPatchResource =
56+ "v1" :>
57+ "projects" :>
58+ Capture "projectId" Text :>
59+ "regions" :>
60+ Capture "region" Text :>
61+ "clusters" :>
62+ Capture "clusterName" Text :>
63+ QueryParam "$.xgafv" Text :>
64+ QueryParam "upload_protocol" Text :>
65+ QueryParam "updateMask" Text :>
66+ QueryParam "pp" Bool :>
67+ QueryParam "access_token" Text :>
68+ QueryParam "uploadType" Text :>
69+ QueryParam "bearer_token" Text :>
70+ QueryParam "callback" Text :>
71+ QueryParam "alt" AltJSON :>
72+ ReqBody '[JSON] Cluster :>
73+ Patch '[JSON] Operation
74+
75+-- | Updates a cluster in a project.
76+--
77+-- /See:/ 'projectsRegionsClustersPatch' smart constructor.
78+data ProjectsRegionsClustersPatch = ProjectsRegionsClustersPatch
79+ { _prcpXgafv :: !(Maybe Text)
80+ , _prcpUploadProtocol :: !(Maybe Text)
81+ , _prcpUpdateMask :: !(Maybe Text)
82+ , _prcpPp :: !Bool
83+ , _prcpAccessToken :: !(Maybe Text)
84+ , _prcpUploadType :: !(Maybe Text)
85+ , _prcpPayload :: !Cluster
86+ , _prcpBearerToken :: !(Maybe Text)
87+ , _prcpClusterName :: !Text
88+ , _prcpRegion :: !Text
89+ , _prcpProjectId :: !Text
90+ , _prcpCallback :: !(Maybe Text)
91+ } deriving (Eq,Show,Data,Typeable,Generic)
92+
93+-- | Creates a value of 'ProjectsRegionsClustersPatch' 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+-- * 'prcpXgafv'
98+--
99+-- * 'prcpUploadProtocol'
100+--
101+-- * 'prcpUpdateMask'
102+--
103+-- * 'prcpPp'
104+--
105+-- * 'prcpAccessToken'
106+--
107+-- * 'prcpUploadType'
108+--
109+-- * 'prcpPayload'
110+--
111+-- * 'prcpBearerToken'
112+--
113+-- * 'prcpClusterName'
114+--
115+-- * 'prcpRegion'
116+--
117+-- * 'prcpProjectId'
118+--
119+-- * 'prcpCallback'
120+projectsRegionsClustersPatch
121+ :: Cluster -- ^ 'prcpPayload'
122+ -> Text -- ^ 'prcpClusterName'
123+ -> Text -- ^ 'prcpRegion'
124+ -> Text -- ^ 'prcpProjectId'
125+ -> ProjectsRegionsClustersPatch
126+projectsRegionsClustersPatch pPrcpPayload_ pPrcpClusterName_ pPrcpRegion_ pPrcpProjectId_ =
127+ ProjectsRegionsClustersPatch
128+ { _prcpXgafv = Nothing
129+ , _prcpUploadProtocol = Nothing
130+ , _prcpUpdateMask = Nothing
131+ , _prcpPp = True
132+ , _prcpAccessToken = Nothing
133+ , _prcpUploadType = Nothing
134+ , _prcpPayload = pPrcpPayload_
135+ , _prcpBearerToken = Nothing
136+ , _prcpClusterName = pPrcpClusterName_
137+ , _prcpRegion = pPrcpRegion_
138+ , _prcpProjectId = pPrcpProjectId_
139+ , _prcpCallback = Nothing
140+ }
141+
142+-- | V1 error format.
143+prcpXgafv :: Lens' ProjectsRegionsClustersPatch (Maybe Text)
144+prcpXgafv
145+ = lens _prcpXgafv (\ s a -> s{_prcpXgafv = a})
146+
147+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
148+prcpUploadProtocol :: Lens' ProjectsRegionsClustersPatch (Maybe Text)
149+prcpUploadProtocol
150+ = lens _prcpUploadProtocol
151+ (\ s a -> s{_prcpUploadProtocol = a})
152+
153+-- | [Required] Specifies the path, relative to Cluster, of the field to
154+-- update. For example, to change the number of workers in a cluster to 5,
155+-- the update_mask parameter would be specified as
156+-- config.worker_config.num_instances, and the \`PATCH\` request body would
157+-- specify the new value, as follows: { \"config\":{ \"workerConfig\":{
158+-- \"numInstances\":\"5\" } } } Note: Currently,
159+-- config.worker_config.num_instances is the only field that can be
160+-- updated.
161+prcpUpdateMask :: Lens' ProjectsRegionsClustersPatch (Maybe Text)
162+prcpUpdateMask
163+ = lens _prcpUpdateMask
164+ (\ s a -> s{_prcpUpdateMask = a})
165+
166+-- | Pretty-print response.
167+prcpPp :: Lens' ProjectsRegionsClustersPatch Bool
168+prcpPp = lens _prcpPp (\ s a -> s{_prcpPp = a})
169+
170+-- | OAuth access token.
171+prcpAccessToken :: Lens' ProjectsRegionsClustersPatch (Maybe Text)
172+prcpAccessToken
173+ = lens _prcpAccessToken
174+ (\ s a -> s{_prcpAccessToken = a})
175+
176+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
177+prcpUploadType :: Lens' ProjectsRegionsClustersPatch (Maybe Text)
178+prcpUploadType
179+ = lens _prcpUploadType
180+ (\ s a -> s{_prcpUploadType = a})
181+
182+-- | Multipart request metadata.
183+prcpPayload :: Lens' ProjectsRegionsClustersPatch Cluster
184+prcpPayload
185+ = lens _prcpPayload (\ s a -> s{_prcpPayload = a})
186+
187+-- | OAuth bearer token.
188+prcpBearerToken :: Lens' ProjectsRegionsClustersPatch (Maybe Text)
189+prcpBearerToken
190+ = lens _prcpBearerToken
191+ (\ s a -> s{_prcpBearerToken = a})
192+
193+-- | [Required] The cluster name.
194+prcpClusterName :: Lens' ProjectsRegionsClustersPatch Text
195+prcpClusterName
196+ = lens _prcpClusterName
197+ (\ s a -> s{_prcpClusterName = a})
198+
199+-- | [Required] The Cloud Dataproc region in which to handle the request.
200+prcpRegion :: Lens' ProjectsRegionsClustersPatch Text
201+prcpRegion
202+ = lens _prcpRegion (\ s a -> s{_prcpRegion = a})
203+
204+-- | [Required] The ID of the Google Cloud Platform project the cluster
205+-- belongs to.
206+prcpProjectId :: Lens' ProjectsRegionsClustersPatch Text
207+prcpProjectId
208+ = lens _prcpProjectId
209+ (\ s a -> s{_prcpProjectId = a})
210+
211+-- | JSONP
212+prcpCallback :: Lens' ProjectsRegionsClustersPatch (Maybe Text)
213+prcpCallback
214+ = lens _prcpCallback (\ s a -> s{_prcpCallback = a})
215+
216+instance GoogleRequest ProjectsRegionsClustersPatch
217+ where
218+ type Rs ProjectsRegionsClustersPatch = Operation
219+ requestClient ProjectsRegionsClustersPatch{..}
220+ = go _prcpProjectId _prcpRegion _prcpClusterName
221+ _prcpXgafv
222+ _prcpUploadProtocol
223+ _prcpUpdateMask
224+ (Just _prcpPp)
225+ _prcpAccessToken
226+ _prcpUploadType
227+ _prcpBearerToken
228+ _prcpCallback
229+ (Just AltJSON)
230+ _prcpPayload
231+ dataprocService
232+ where go
233+ = buildClient
234+ (Proxy :: Proxy ProjectsRegionsClustersPatchResource)
235+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/Cancel.hsnew file+221
@@ -0,0 +1,221 @@
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.Dataproc.Projects.Regions.Jobs.Cancel
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Starts a job cancellation request. To access the job resource after
24+-- cancellation, call
25+-- [regions\/{region}\/jobs.list](\/dataproc\/reference\/rest\/v1\/projects.regions.jobs\/list)
26+-- or
27+-- [regions\/{region}\/jobs.get](\/dataproc\/reference\/rest\/v1\/projects.regions.jobs\/get).
28+--
29+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.jobs.cancel@.
30+module Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Cancel
31+ (
32+ -- * REST Resource
33+ ProjectsRegionsJobsCancelResource
34+
35+ -- * Creating a Request
36+ , projectsRegionsJobsCancel
37+ , ProjectsRegionsJobsCancel
38+
39+ -- * Request Lenses
40+ , prjcXgafv
41+ , prjcJobId
42+ , prjcUploadProtocol
43+ , prjcPp
44+ , prjcAccessToken
45+ , prjcUploadType
46+ , prjcPayload
47+ , prjcBearerToken
48+ , prjcRegion
49+ , prjcProjectId
50+ , prjcCallback
51+ ) where
52+
53+import Network.Google.Dataproc.Types
54+import Network.Google.Prelude
55+
56+-- | A resource alias for @dataproc.projects.regions.jobs.cancel@ method which the
57+-- 'ProjectsRegionsJobsCancel' request conforms to.
58+type ProjectsRegionsJobsCancelResource =
59+ "v1" :>
60+ "projects" :>
61+ Capture "projectId" Text :>
62+ "regions" :>
63+ Capture "region" Text :>
64+ "jobs" :>
65+ CaptureMode "jobId" "cancel" Text :>
66+ QueryParam "$.xgafv" Text :>
67+ QueryParam "upload_protocol" Text :>
68+ QueryParam "pp" Bool :>
69+ QueryParam "access_token" Text :>
70+ QueryParam "uploadType" Text :>
71+ QueryParam "bearer_token" Text :>
72+ QueryParam "callback" Text :>
73+ QueryParam "alt" AltJSON :>
74+ ReqBody '[JSON] CancelJobRequest :>
75+ Post '[JSON] Job
76+
77+-- | Starts a job cancellation request. To access the job resource after
78+-- cancellation, call
79+-- [regions\/{region}\/jobs.list](\/dataproc\/reference\/rest\/v1\/projects.regions.jobs\/list)
80+-- or
81+-- [regions\/{region}\/jobs.get](\/dataproc\/reference\/rest\/v1\/projects.regions.jobs\/get).
82+--
83+-- /See:/ 'projectsRegionsJobsCancel' smart constructor.
84+data ProjectsRegionsJobsCancel = ProjectsRegionsJobsCancel
85+ { _prjcXgafv :: !(Maybe Text)
86+ , _prjcJobId :: !Text
87+ , _prjcUploadProtocol :: !(Maybe Text)
88+ , _prjcPp :: !Bool
89+ , _prjcAccessToken :: !(Maybe Text)
90+ , _prjcUploadType :: !(Maybe Text)
91+ , _prjcPayload :: !CancelJobRequest
92+ , _prjcBearerToken :: !(Maybe Text)
93+ , _prjcRegion :: !Text
94+ , _prjcProjectId :: !Text
95+ , _prjcCallback :: !(Maybe Text)
96+ } deriving (Eq,Show,Data,Typeable,Generic)
97+
98+-- | Creates a value of 'ProjectsRegionsJobsCancel' with the minimum fields required to make a request.
99+--
100+-- Use one of the following lenses to modify other fields as desired:
101+--
102+-- * 'prjcXgafv'
103+--
104+-- * 'prjcJobId'
105+--
106+-- * 'prjcUploadProtocol'
107+--
108+-- * 'prjcPp'
109+--
110+-- * 'prjcAccessToken'
111+--
112+-- * 'prjcUploadType'
113+--
114+-- * 'prjcPayload'
115+--
116+-- * 'prjcBearerToken'
117+--
118+-- * 'prjcRegion'
119+--
120+-- * 'prjcProjectId'
121+--
122+-- * 'prjcCallback'
123+projectsRegionsJobsCancel
124+ :: Text -- ^ 'prjcJobId'
125+ -> CancelJobRequest -- ^ 'prjcPayload'
126+ -> Text -- ^ 'prjcRegion'
127+ -> Text -- ^ 'prjcProjectId'
128+ -> ProjectsRegionsJobsCancel
129+projectsRegionsJobsCancel pPrjcJobId_ pPrjcPayload_ pPrjcRegion_ pPrjcProjectId_ =
130+ ProjectsRegionsJobsCancel
131+ { _prjcXgafv = Nothing
132+ , _prjcJobId = pPrjcJobId_
133+ , _prjcUploadProtocol = Nothing
134+ , _prjcPp = True
135+ , _prjcAccessToken = Nothing
136+ , _prjcUploadType = Nothing
137+ , _prjcPayload = pPrjcPayload_
138+ , _prjcBearerToken = Nothing
139+ , _prjcRegion = pPrjcRegion_
140+ , _prjcProjectId = pPrjcProjectId_
141+ , _prjcCallback = Nothing
142+ }
143+
144+-- | V1 error format.
145+prjcXgafv :: Lens' ProjectsRegionsJobsCancel (Maybe Text)
146+prjcXgafv
147+ = lens _prjcXgafv (\ s a -> s{_prjcXgafv = a})
148+
149+-- | [Required] The job ID.
150+prjcJobId :: Lens' ProjectsRegionsJobsCancel Text
151+prjcJobId
152+ = lens _prjcJobId (\ s a -> s{_prjcJobId = a})
153+
154+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
155+prjcUploadProtocol :: Lens' ProjectsRegionsJobsCancel (Maybe Text)
156+prjcUploadProtocol
157+ = lens _prjcUploadProtocol
158+ (\ s a -> s{_prjcUploadProtocol = a})
159+
160+-- | Pretty-print response.
161+prjcPp :: Lens' ProjectsRegionsJobsCancel Bool
162+prjcPp = lens _prjcPp (\ s a -> s{_prjcPp = a})
163+
164+-- | OAuth access token.
165+prjcAccessToken :: Lens' ProjectsRegionsJobsCancel (Maybe Text)
166+prjcAccessToken
167+ = lens _prjcAccessToken
168+ (\ s a -> s{_prjcAccessToken = a})
169+
170+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
171+prjcUploadType :: Lens' ProjectsRegionsJobsCancel (Maybe Text)
172+prjcUploadType
173+ = lens _prjcUploadType
174+ (\ s a -> s{_prjcUploadType = a})
175+
176+-- | Multipart request metadata.
177+prjcPayload :: Lens' ProjectsRegionsJobsCancel CancelJobRequest
178+prjcPayload
179+ = lens _prjcPayload (\ s a -> s{_prjcPayload = a})
180+
181+-- | OAuth bearer token.
182+prjcBearerToken :: Lens' ProjectsRegionsJobsCancel (Maybe Text)
183+prjcBearerToken
184+ = lens _prjcBearerToken
185+ (\ s a -> s{_prjcBearerToken = a})
186+
187+-- | [Required] The Cloud Dataproc region in which to handle the request.
188+prjcRegion :: Lens' ProjectsRegionsJobsCancel Text
189+prjcRegion
190+ = lens _prjcRegion (\ s a -> s{_prjcRegion = a})
191+
192+-- | [Required] The ID of the Google Cloud Platform project that the job
193+-- belongs to.
194+prjcProjectId :: Lens' ProjectsRegionsJobsCancel Text
195+prjcProjectId
196+ = lens _prjcProjectId
197+ (\ s a -> s{_prjcProjectId = a})
198+
199+-- | JSONP
200+prjcCallback :: Lens' ProjectsRegionsJobsCancel (Maybe Text)
201+prjcCallback
202+ = lens _prjcCallback (\ s a -> s{_prjcCallback = a})
203+
204+instance GoogleRequest ProjectsRegionsJobsCancel
205+ where
206+ type Rs ProjectsRegionsJobsCancel = Job
207+ requestClient ProjectsRegionsJobsCancel{..}
208+ = go _prjcProjectId _prjcRegion _prjcJobId _prjcXgafv
209+ _prjcUploadProtocol
210+ (Just _prjcPp)
211+ _prjcAccessToken
212+ _prjcUploadType
213+ _prjcBearerToken
214+ _prjcCallback
215+ (Just AltJSON)
216+ _prjcPayload
217+ dataprocService
218+ where go
219+ = buildClient
220+ (Proxy :: Proxy ProjectsRegionsJobsCancelResource)
221+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/Delete.hsnew file+202
@@ -0,0 +1,202 @@
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.Dataproc.Projects.Regions.Jobs.Delete
17+-- Copyright : (c) 2015 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 the job from the project. If the job is active, the delete
24+-- fails, and the response returns \`FAILED_PRECONDITION\`.
25+--
26+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.jobs.delete@.
27+module Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Delete
28+ (
29+ -- * REST Resource
30+ ProjectsRegionsJobsDeleteResource
31+
32+ -- * Creating a Request
33+ , projectsRegionsJobsDelete
34+ , ProjectsRegionsJobsDelete
35+
36+ -- * Request Lenses
37+ , prjdXgafv
38+ , prjdJobId
39+ , prjdUploadProtocol
40+ , prjdPp
41+ , prjdAccessToken
42+ , prjdUploadType
43+ , prjdBearerToken
44+ , prjdRegion
45+ , prjdProjectId
46+ , prjdCallback
47+ ) where
48+
49+import Network.Google.Dataproc.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @dataproc.projects.regions.jobs.delete@ method which the
53+-- 'ProjectsRegionsJobsDelete' request conforms to.
54+type ProjectsRegionsJobsDeleteResource =
55+ "v1" :>
56+ "projects" :>
57+ Capture "projectId" Text :>
58+ "regions" :>
59+ Capture "region" Text :>
60+ "jobs" :>
61+ Capture "jobId" Text :>
62+ QueryParam "$.xgafv" Text :>
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+ Delete '[JSON] Empty
71+
72+-- | Deletes the job from the project. If the job is active, the delete
73+-- fails, and the response returns \`FAILED_PRECONDITION\`.
74+--
75+-- /See:/ 'projectsRegionsJobsDelete' smart constructor.
76+data ProjectsRegionsJobsDelete = ProjectsRegionsJobsDelete
77+ { _prjdXgafv :: !(Maybe Text)
78+ , _prjdJobId :: !Text
79+ , _prjdUploadProtocol :: !(Maybe Text)
80+ , _prjdPp :: !Bool
81+ , _prjdAccessToken :: !(Maybe Text)
82+ , _prjdUploadType :: !(Maybe Text)
83+ , _prjdBearerToken :: !(Maybe Text)
84+ , _prjdRegion :: !Text
85+ , _prjdProjectId :: !Text
86+ , _prjdCallback :: !(Maybe Text)
87+ } deriving (Eq,Show,Data,Typeable,Generic)
88+
89+-- | Creates a value of 'ProjectsRegionsJobsDelete' with the minimum fields required to make a request.
90+--
91+-- Use one of the following lenses to modify other fields as desired:
92+--
93+-- * 'prjdXgafv'
94+--
95+-- * 'prjdJobId'
96+--
97+-- * 'prjdUploadProtocol'
98+--
99+-- * 'prjdPp'
100+--
101+-- * 'prjdAccessToken'
102+--
103+-- * 'prjdUploadType'
104+--
105+-- * 'prjdBearerToken'
106+--
107+-- * 'prjdRegion'
108+--
109+-- * 'prjdProjectId'
110+--
111+-- * 'prjdCallback'
112+projectsRegionsJobsDelete
113+ :: Text -- ^ 'prjdJobId'
114+ -> Text -- ^ 'prjdRegion'
115+ -> Text -- ^ 'prjdProjectId'
116+ -> ProjectsRegionsJobsDelete
117+projectsRegionsJobsDelete pPrjdJobId_ pPrjdRegion_ pPrjdProjectId_ =
118+ ProjectsRegionsJobsDelete
119+ { _prjdXgafv = Nothing
120+ , _prjdJobId = pPrjdJobId_
121+ , _prjdUploadProtocol = Nothing
122+ , _prjdPp = True
123+ , _prjdAccessToken = Nothing
124+ , _prjdUploadType = Nothing
125+ , _prjdBearerToken = Nothing
126+ , _prjdRegion = pPrjdRegion_
127+ , _prjdProjectId = pPrjdProjectId_
128+ , _prjdCallback = Nothing
129+ }
130+
131+-- | V1 error format.
132+prjdXgafv :: Lens' ProjectsRegionsJobsDelete (Maybe Text)
133+prjdXgafv
134+ = lens _prjdXgafv (\ s a -> s{_prjdXgafv = a})
135+
136+-- | [Required] The job ID.
137+prjdJobId :: Lens' ProjectsRegionsJobsDelete Text
138+prjdJobId
139+ = lens _prjdJobId (\ s a -> s{_prjdJobId = a})
140+
141+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
142+prjdUploadProtocol :: Lens' ProjectsRegionsJobsDelete (Maybe Text)
143+prjdUploadProtocol
144+ = lens _prjdUploadProtocol
145+ (\ s a -> s{_prjdUploadProtocol = a})
146+
147+-- | Pretty-print response.
148+prjdPp :: Lens' ProjectsRegionsJobsDelete Bool
149+prjdPp = lens _prjdPp (\ s a -> s{_prjdPp = a})
150+
151+-- | OAuth access token.
152+prjdAccessToken :: Lens' ProjectsRegionsJobsDelete (Maybe Text)
153+prjdAccessToken
154+ = lens _prjdAccessToken
155+ (\ s a -> s{_prjdAccessToken = a})
156+
157+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
158+prjdUploadType :: Lens' ProjectsRegionsJobsDelete (Maybe Text)
159+prjdUploadType
160+ = lens _prjdUploadType
161+ (\ s a -> s{_prjdUploadType = a})
162+
163+-- | OAuth bearer token.
164+prjdBearerToken :: Lens' ProjectsRegionsJobsDelete (Maybe Text)
165+prjdBearerToken
166+ = lens _prjdBearerToken
167+ (\ s a -> s{_prjdBearerToken = a})
168+
169+-- | [Required] The Cloud Dataproc region in which to handle the request.
170+prjdRegion :: Lens' ProjectsRegionsJobsDelete Text
171+prjdRegion
172+ = lens _prjdRegion (\ s a -> s{_prjdRegion = a})
173+
174+-- | [Required] The ID of the Google Cloud Platform project that the job
175+-- belongs to.
176+prjdProjectId :: Lens' ProjectsRegionsJobsDelete Text
177+prjdProjectId
178+ = lens _prjdProjectId
179+ (\ s a -> s{_prjdProjectId = a})
180+
181+-- | JSONP
182+prjdCallback :: Lens' ProjectsRegionsJobsDelete (Maybe Text)
183+prjdCallback
184+ = lens _prjdCallback (\ s a -> s{_prjdCallback = a})
185+
186+instance GoogleRequest ProjectsRegionsJobsDelete
187+ where
188+ type Rs ProjectsRegionsJobsDelete = Empty
189+ requestClient ProjectsRegionsJobsDelete{..}
190+ = go _prjdProjectId _prjdRegion _prjdJobId _prjdXgafv
191+ _prjdUploadProtocol
192+ (Just _prjdPp)
193+ _prjdAccessToken
194+ _prjdUploadType
195+ _prjdBearerToken
196+ _prjdCallback
197+ (Just AltJSON)
198+ dataprocService
199+ where go
200+ = buildClient
201+ (Proxy :: Proxy ProjectsRegionsJobsDeleteResource)
202+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/Get.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.Dataproc.Projects.Regions.Jobs.Get
17+-- Copyright : (c) 2015 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 resource representation for a job in a project.
24+--
25+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.jobs.get@.
26+module Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Get
27+ (
28+ -- * REST Resource
29+ ProjectsRegionsJobsGetResource
30+
31+ -- * Creating a Request
32+ , projectsRegionsJobsGet
33+ , ProjectsRegionsJobsGet
34+
35+ -- * Request Lenses
36+ , prjgXgafv
37+ , prjgJobId
38+ , prjgUploadProtocol
39+ , prjgPp
40+ , prjgAccessToken
41+ , prjgUploadType
42+ , prjgBearerToken
43+ , prjgRegion
44+ , prjgProjectId
45+ , prjgCallback
46+ ) where
47+
48+import Network.Google.Dataproc.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @dataproc.projects.regions.jobs.get@ method which the
52+-- 'ProjectsRegionsJobsGet' request conforms to.
53+type ProjectsRegionsJobsGetResource =
54+ "v1" :>
55+ "projects" :>
56+ Capture "projectId" Text :>
57+ "regions" :>
58+ Capture "region" Text :>
59+ "jobs" :>
60+ Capture "jobId" Text :>
61+ QueryParam "$.xgafv" Text :>
62+ QueryParam "upload_protocol" Text :>
63+ QueryParam "pp" Bool :>
64+ QueryParam "access_token" Text :>
65+ QueryParam "uploadType" Text :>
66+ QueryParam "bearer_token" Text :>
67+ QueryParam "callback" Text :>
68+ QueryParam "alt" AltJSON :> Get '[JSON] Job
69+
70+-- | Gets the resource representation for a job in a project.
71+--
72+-- /See:/ 'projectsRegionsJobsGet' smart constructor.
73+data ProjectsRegionsJobsGet = ProjectsRegionsJobsGet
74+ { _prjgXgafv :: !(Maybe Text)
75+ , _prjgJobId :: !Text
76+ , _prjgUploadProtocol :: !(Maybe Text)
77+ , _prjgPp :: !Bool
78+ , _prjgAccessToken :: !(Maybe Text)
79+ , _prjgUploadType :: !(Maybe Text)
80+ , _prjgBearerToken :: !(Maybe Text)
81+ , _prjgRegion :: !Text
82+ , _prjgProjectId :: !Text
83+ , _prjgCallback :: !(Maybe Text)
84+ } deriving (Eq,Show,Data,Typeable,Generic)
85+
86+-- | Creates a value of 'ProjectsRegionsJobsGet' 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+-- * 'prjgXgafv'
91+--
92+-- * 'prjgJobId'
93+--
94+-- * 'prjgUploadProtocol'
95+--
96+-- * 'prjgPp'
97+--
98+-- * 'prjgAccessToken'
99+--
100+-- * 'prjgUploadType'
101+--
102+-- * 'prjgBearerToken'
103+--
104+-- * 'prjgRegion'
105+--
106+-- * 'prjgProjectId'
107+--
108+-- * 'prjgCallback'
109+projectsRegionsJobsGet
110+ :: Text -- ^ 'prjgJobId'
111+ -> Text -- ^ 'prjgRegion'
112+ -> Text -- ^ 'prjgProjectId'
113+ -> ProjectsRegionsJobsGet
114+projectsRegionsJobsGet pPrjgJobId_ pPrjgRegion_ pPrjgProjectId_ =
115+ ProjectsRegionsJobsGet
116+ { _prjgXgafv = Nothing
117+ , _prjgJobId = pPrjgJobId_
118+ , _prjgUploadProtocol = Nothing
119+ , _prjgPp = True
120+ , _prjgAccessToken = Nothing
121+ , _prjgUploadType = Nothing
122+ , _prjgBearerToken = Nothing
123+ , _prjgRegion = pPrjgRegion_
124+ , _prjgProjectId = pPrjgProjectId_
125+ , _prjgCallback = Nothing
126+ }
127+
128+-- | V1 error format.
129+prjgXgafv :: Lens' ProjectsRegionsJobsGet (Maybe Text)
130+prjgXgafv
131+ = lens _prjgXgafv (\ s a -> s{_prjgXgafv = a})
132+
133+-- | [Required] The job ID.
134+prjgJobId :: Lens' ProjectsRegionsJobsGet Text
135+prjgJobId
136+ = lens _prjgJobId (\ s a -> s{_prjgJobId = a})
137+
138+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
139+prjgUploadProtocol :: Lens' ProjectsRegionsJobsGet (Maybe Text)
140+prjgUploadProtocol
141+ = lens _prjgUploadProtocol
142+ (\ s a -> s{_prjgUploadProtocol = a})
143+
144+-- | Pretty-print response.
145+prjgPp :: Lens' ProjectsRegionsJobsGet Bool
146+prjgPp = lens _prjgPp (\ s a -> s{_prjgPp = a})
147+
148+-- | OAuth access token.
149+prjgAccessToken :: Lens' ProjectsRegionsJobsGet (Maybe Text)
150+prjgAccessToken
151+ = lens _prjgAccessToken
152+ (\ s a -> s{_prjgAccessToken = a})
153+
154+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
155+prjgUploadType :: Lens' ProjectsRegionsJobsGet (Maybe Text)
156+prjgUploadType
157+ = lens _prjgUploadType
158+ (\ s a -> s{_prjgUploadType = a})
159+
160+-- | OAuth bearer token.
161+prjgBearerToken :: Lens' ProjectsRegionsJobsGet (Maybe Text)
162+prjgBearerToken
163+ = lens _prjgBearerToken
164+ (\ s a -> s{_prjgBearerToken = a})
165+
166+-- | [Required] The Cloud Dataproc region in which to handle the request.
167+prjgRegion :: Lens' ProjectsRegionsJobsGet Text
168+prjgRegion
169+ = lens _prjgRegion (\ s a -> s{_prjgRegion = a})
170+
171+-- | [Required] The ID of the Google Cloud Platform project that the job
172+-- belongs to.
173+prjgProjectId :: Lens' ProjectsRegionsJobsGet Text
174+prjgProjectId
175+ = lens _prjgProjectId
176+ (\ s a -> s{_prjgProjectId = a})
177+
178+-- | JSONP
179+prjgCallback :: Lens' ProjectsRegionsJobsGet (Maybe Text)
180+prjgCallback
181+ = lens _prjgCallback (\ s a -> s{_prjgCallback = a})
182+
183+instance GoogleRequest ProjectsRegionsJobsGet where
184+ type Rs ProjectsRegionsJobsGet = Job
185+ requestClient ProjectsRegionsJobsGet{..}
186+ = go _prjgProjectId _prjgRegion _prjgJobId _prjgXgafv
187+ _prjgUploadProtocol
188+ (Just _prjgPp)
189+ _prjgAccessToken
190+ _prjgUploadType
191+ _prjgBearerToken
192+ _prjgCallback
193+ (Just AltJSON)
194+ dataprocService
195+ where go
196+ = buildClient
197+ (Proxy :: Proxy ProjectsRegionsJobsGetResource)
198+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/List.hsnew file+241
@@ -0,0 +1,241 @@
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.Dataproc.Projects.Regions.Jobs.List
17+-- Copyright : (c) 2015 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 regions\/{region}\/jobs in a project.
24+--
25+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.jobs.list@.
26+module Network.Google.Resource.Dataproc.Projects.Regions.Jobs.List
27+ (
28+ -- * REST Resource
29+ ProjectsRegionsJobsListResource
30+
31+ -- * Creating a Request
32+ , projectsRegionsJobsList
33+ , ProjectsRegionsJobsList
34+
35+ -- * Request Lenses
36+ , prjlJobStateMatcher
37+ , prjlXgafv
38+ , prjlUploadProtocol
39+ , prjlPp
40+ , prjlAccessToken
41+ , prjlUploadType
42+ , prjlBearerToken
43+ , prjlClusterName
44+ , prjlRegion
45+ , prjlPageToken
46+ , prjlProjectId
47+ , prjlPageSize
48+ , prjlCallback
49+ ) where
50+
51+import Network.Google.Dataproc.Types
52+import Network.Google.Prelude
53+
54+-- | A resource alias for @dataproc.projects.regions.jobs.list@ method which the
55+-- 'ProjectsRegionsJobsList' request conforms to.
56+type ProjectsRegionsJobsListResource =
57+ "v1" :>
58+ "projects" :>
59+ Capture "projectId" Text :>
60+ "regions" :>
61+ Capture "region" Text :>
62+ "jobs" :>
63+ QueryParam "jobStateMatcher" Text :>
64+ QueryParam "$.xgafv" Text :>
65+ QueryParam "upload_protocol" Text :>
66+ QueryParam "pp" Bool :>
67+ QueryParam "access_token" Text :>
68+ QueryParam "uploadType" Text :>
69+ QueryParam "bearer_token" Text :>
70+ QueryParam "clusterName" Text :>
71+ QueryParam "pageToken" Text :>
72+ QueryParam "pageSize" (Textual Int32) :>
73+ QueryParam "callback" Text :>
74+ QueryParam "alt" AltJSON :>
75+ Get '[JSON] ListJobsResponse
76+
77+-- | Lists regions\/{region}\/jobs in a project.
78+--
79+-- /See:/ 'projectsRegionsJobsList' smart constructor.
80+data ProjectsRegionsJobsList = ProjectsRegionsJobsList
81+ { _prjlJobStateMatcher :: !(Maybe Text)
82+ , _prjlXgafv :: !(Maybe Text)
83+ , _prjlUploadProtocol :: !(Maybe Text)
84+ , _prjlPp :: !Bool
85+ , _prjlAccessToken :: !(Maybe Text)
86+ , _prjlUploadType :: !(Maybe Text)
87+ , _prjlBearerToken :: !(Maybe Text)
88+ , _prjlClusterName :: !(Maybe Text)
89+ , _prjlRegion :: !Text
90+ , _prjlPageToken :: !(Maybe Text)
91+ , _prjlProjectId :: !Text
92+ , _prjlPageSize :: !(Maybe (Textual Int32))
93+ , _prjlCallback :: !(Maybe Text)
94+ } deriving (Eq,Show,Data,Typeable,Generic)
95+
96+-- | Creates a value of 'ProjectsRegionsJobsList' with the minimum fields required to make a request.
97+--
98+-- Use one of the following lenses to modify other fields as desired:
99+--
100+-- * 'prjlJobStateMatcher'
101+--
102+-- * 'prjlXgafv'
103+--
104+-- * 'prjlUploadProtocol'
105+--
106+-- * 'prjlPp'
107+--
108+-- * 'prjlAccessToken'
109+--
110+-- * 'prjlUploadType'
111+--
112+-- * 'prjlBearerToken'
113+--
114+-- * 'prjlClusterName'
115+--
116+-- * 'prjlRegion'
117+--
118+-- * 'prjlPageToken'
119+--
120+-- * 'prjlProjectId'
121+--
122+-- * 'prjlPageSize'
123+--
124+-- * 'prjlCallback'
125+projectsRegionsJobsList
126+ :: Text -- ^ 'prjlRegion'
127+ -> Text -- ^ 'prjlProjectId'
128+ -> ProjectsRegionsJobsList
129+projectsRegionsJobsList pPrjlRegion_ pPrjlProjectId_ =
130+ ProjectsRegionsJobsList
131+ { _prjlJobStateMatcher = Nothing
132+ , _prjlXgafv = Nothing
133+ , _prjlUploadProtocol = Nothing
134+ , _prjlPp = True
135+ , _prjlAccessToken = Nothing
136+ , _prjlUploadType = Nothing
137+ , _prjlBearerToken = Nothing
138+ , _prjlClusterName = Nothing
139+ , _prjlRegion = pPrjlRegion_
140+ , _prjlPageToken = Nothing
141+ , _prjlProjectId = pPrjlProjectId_
142+ , _prjlPageSize = Nothing
143+ , _prjlCallback = Nothing
144+ }
145+
146+-- | [Optional] Specifies enumerated categories of jobs to list.
147+prjlJobStateMatcher :: Lens' ProjectsRegionsJobsList (Maybe Text)
148+prjlJobStateMatcher
149+ = lens _prjlJobStateMatcher
150+ (\ s a -> s{_prjlJobStateMatcher = a})
151+
152+-- | V1 error format.
153+prjlXgafv :: Lens' ProjectsRegionsJobsList (Maybe Text)
154+prjlXgafv
155+ = lens _prjlXgafv (\ s a -> s{_prjlXgafv = a})
156+
157+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
158+prjlUploadProtocol :: Lens' ProjectsRegionsJobsList (Maybe Text)
159+prjlUploadProtocol
160+ = lens _prjlUploadProtocol
161+ (\ s a -> s{_prjlUploadProtocol = a})
162+
163+-- | Pretty-print response.
164+prjlPp :: Lens' ProjectsRegionsJobsList Bool
165+prjlPp = lens _prjlPp (\ s a -> s{_prjlPp = a})
166+
167+-- | OAuth access token.
168+prjlAccessToken :: Lens' ProjectsRegionsJobsList (Maybe Text)
169+prjlAccessToken
170+ = lens _prjlAccessToken
171+ (\ s a -> s{_prjlAccessToken = a})
172+
173+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
174+prjlUploadType :: Lens' ProjectsRegionsJobsList (Maybe Text)
175+prjlUploadType
176+ = lens _prjlUploadType
177+ (\ s a -> s{_prjlUploadType = a})
178+
179+-- | OAuth bearer token.
180+prjlBearerToken :: Lens' ProjectsRegionsJobsList (Maybe Text)
181+prjlBearerToken
182+ = lens _prjlBearerToken
183+ (\ s a -> s{_prjlBearerToken = a})
184+
185+-- | [Optional] If set, the returned jobs list includes only jobs that were
186+-- submitted to the named cluster.
187+prjlClusterName :: Lens' ProjectsRegionsJobsList (Maybe Text)
188+prjlClusterName
189+ = lens _prjlClusterName
190+ (\ s a -> s{_prjlClusterName = a})
191+
192+-- | [Required] The Cloud Dataproc region in which to handle the request.
193+prjlRegion :: Lens' ProjectsRegionsJobsList Text
194+prjlRegion
195+ = lens _prjlRegion (\ s a -> s{_prjlRegion = a})
196+
197+-- | [Optional] The page token, returned by a previous call, to request the
198+-- next page of results.
199+prjlPageToken :: Lens' ProjectsRegionsJobsList (Maybe Text)
200+prjlPageToken
201+ = lens _prjlPageToken
202+ (\ s a -> s{_prjlPageToken = a})
203+
204+-- | [Required] The ID of the Google Cloud Platform project that the job
205+-- belongs to.
206+prjlProjectId :: Lens' ProjectsRegionsJobsList Text
207+prjlProjectId
208+ = lens _prjlProjectId
209+ (\ s a -> s{_prjlProjectId = a})
210+
211+-- | [Optional] The number of results to return in each response.
212+prjlPageSize :: Lens' ProjectsRegionsJobsList (Maybe Int32)
213+prjlPageSize
214+ = lens _prjlPageSize (\ s a -> s{_prjlPageSize = a})
215+ . mapping _Coerce
216+
217+-- | JSONP
218+prjlCallback :: Lens' ProjectsRegionsJobsList (Maybe Text)
219+prjlCallback
220+ = lens _prjlCallback (\ s a -> s{_prjlCallback = a})
221+
222+instance GoogleRequest ProjectsRegionsJobsList where
223+ type Rs ProjectsRegionsJobsList = ListJobsResponse
224+ requestClient ProjectsRegionsJobsList{..}
225+ = go _prjlProjectId _prjlRegion _prjlJobStateMatcher
226+ _prjlXgafv
227+ _prjlUploadProtocol
228+ (Just _prjlPp)
229+ _prjlAccessToken
230+ _prjlUploadType
231+ _prjlBearerToken
232+ _prjlClusterName
233+ _prjlPageToken
234+ _prjlPageSize
235+ _prjlCallback
236+ (Just AltJSON)
237+ dataprocService
238+ where go
239+ = buildClient
240+ (Proxy :: Proxy ProjectsRegionsJobsListResource)
241+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/Submit.hsnew file+201
@@ -0,0 +1,201 @@
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.Dataproc.Projects.Regions.Jobs.Submit
17+-- Copyright : (c) 2015 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+-- Submits a job to a cluster.
24+--
25+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.jobs.submit@.
26+module Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Submit
27+ (
28+ -- * REST Resource
29+ ProjectsRegionsJobsSubmitResource
30+
31+ -- * Creating a Request
32+ , projectsRegionsJobsSubmit
33+ , ProjectsRegionsJobsSubmit
34+
35+ -- * Request Lenses
36+ , prjsXgafv
37+ , prjsUploadProtocol
38+ , prjsPp
39+ , prjsAccessToken
40+ , prjsUploadType
41+ , prjsPayload
42+ , prjsBearerToken
43+ , prjsRegion
44+ , prjsProjectId
45+ , prjsCallback
46+ ) where
47+
48+import Network.Google.Dataproc.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @dataproc.projects.regions.jobs.submit@ method which the
52+-- 'ProjectsRegionsJobsSubmit' request conforms to.
53+type ProjectsRegionsJobsSubmitResource =
54+ "v1" :>
55+ "projects" :>
56+ Capture "projectId" Text :>
57+ "regions" :>
58+ Capture "region" Text :>
59+ "jobs:submit" :>
60+ QueryParam "$.xgafv" Text :>
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] SubmitJobRequest :>
69+ Post '[JSON] Job
70+
71+-- | Submits a job to a cluster.
72+--
73+-- /See:/ 'projectsRegionsJobsSubmit' smart constructor.
74+data ProjectsRegionsJobsSubmit = ProjectsRegionsJobsSubmit
75+ { _prjsXgafv :: !(Maybe Text)
76+ , _prjsUploadProtocol :: !(Maybe Text)
77+ , _prjsPp :: !Bool
78+ , _prjsAccessToken :: !(Maybe Text)
79+ , _prjsUploadType :: !(Maybe Text)
80+ , _prjsPayload :: !SubmitJobRequest
81+ , _prjsBearerToken :: !(Maybe Text)
82+ , _prjsRegion :: !Text
83+ , _prjsProjectId :: !Text
84+ , _prjsCallback :: !(Maybe Text)
85+ } deriving (Eq,Show,Data,Typeable,Generic)
86+
87+-- | Creates a value of 'ProjectsRegionsJobsSubmit' with the minimum fields required to make a request.
88+--
89+-- Use one of the following lenses to modify other fields as desired:
90+--
91+-- * 'prjsXgafv'
92+--
93+-- * 'prjsUploadProtocol'
94+--
95+-- * 'prjsPp'
96+--
97+-- * 'prjsAccessToken'
98+--
99+-- * 'prjsUploadType'
100+--
101+-- * 'prjsPayload'
102+--
103+-- * 'prjsBearerToken'
104+--
105+-- * 'prjsRegion'
106+--
107+-- * 'prjsProjectId'
108+--
109+-- * 'prjsCallback'
110+projectsRegionsJobsSubmit
111+ :: SubmitJobRequest -- ^ 'prjsPayload'
112+ -> Text -- ^ 'prjsRegion'
113+ -> Text -- ^ 'prjsProjectId'
114+ -> ProjectsRegionsJobsSubmit
115+projectsRegionsJobsSubmit pPrjsPayload_ pPrjsRegion_ pPrjsProjectId_ =
116+ ProjectsRegionsJobsSubmit
117+ { _prjsXgafv = Nothing
118+ , _prjsUploadProtocol = Nothing
119+ , _prjsPp = True
120+ , _prjsAccessToken = Nothing
121+ , _prjsUploadType = Nothing
122+ , _prjsPayload = pPrjsPayload_
123+ , _prjsBearerToken = Nothing
124+ , _prjsRegion = pPrjsRegion_
125+ , _prjsProjectId = pPrjsProjectId_
126+ , _prjsCallback = Nothing
127+ }
128+
129+-- | V1 error format.
130+prjsXgafv :: Lens' ProjectsRegionsJobsSubmit (Maybe Text)
131+prjsXgafv
132+ = lens _prjsXgafv (\ s a -> s{_prjsXgafv = a})
133+
134+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
135+prjsUploadProtocol :: Lens' ProjectsRegionsJobsSubmit (Maybe Text)
136+prjsUploadProtocol
137+ = lens _prjsUploadProtocol
138+ (\ s a -> s{_prjsUploadProtocol = a})
139+
140+-- | Pretty-print response.
141+prjsPp :: Lens' ProjectsRegionsJobsSubmit Bool
142+prjsPp = lens _prjsPp (\ s a -> s{_prjsPp = a})
143+
144+-- | OAuth access token.
145+prjsAccessToken :: Lens' ProjectsRegionsJobsSubmit (Maybe Text)
146+prjsAccessToken
147+ = lens _prjsAccessToken
148+ (\ s a -> s{_prjsAccessToken = a})
149+
150+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
151+prjsUploadType :: Lens' ProjectsRegionsJobsSubmit (Maybe Text)
152+prjsUploadType
153+ = lens _prjsUploadType
154+ (\ s a -> s{_prjsUploadType = a})
155+
156+-- | Multipart request metadata.
157+prjsPayload :: Lens' ProjectsRegionsJobsSubmit SubmitJobRequest
158+prjsPayload
159+ = lens _prjsPayload (\ s a -> s{_prjsPayload = a})
160+
161+-- | OAuth bearer token.
162+prjsBearerToken :: Lens' ProjectsRegionsJobsSubmit (Maybe Text)
163+prjsBearerToken
164+ = lens _prjsBearerToken
165+ (\ s a -> s{_prjsBearerToken = a})
166+
167+-- | [Required] The Cloud Dataproc region in which to handle the request.
168+prjsRegion :: Lens' ProjectsRegionsJobsSubmit Text
169+prjsRegion
170+ = lens _prjsRegion (\ s a -> s{_prjsRegion = a})
171+
172+-- | [Required] The ID of the Google Cloud Platform project that the job
173+-- belongs to.
174+prjsProjectId :: Lens' ProjectsRegionsJobsSubmit Text
175+prjsProjectId
176+ = lens _prjsProjectId
177+ (\ s a -> s{_prjsProjectId = a})
178+
179+-- | JSONP
180+prjsCallback :: Lens' ProjectsRegionsJobsSubmit (Maybe Text)
181+prjsCallback
182+ = lens _prjsCallback (\ s a -> s{_prjsCallback = a})
183+
184+instance GoogleRequest ProjectsRegionsJobsSubmit
185+ where
186+ type Rs ProjectsRegionsJobsSubmit = Job
187+ requestClient ProjectsRegionsJobsSubmit{..}
188+ = go _prjsProjectId _prjsRegion _prjsXgafv
189+ _prjsUploadProtocol
190+ (Just _prjsPp)
191+ _prjsAccessToken
192+ _prjsUploadType
193+ _prjsBearerToken
194+ _prjsCallback
195+ (Just AltJSON)
196+ _prjsPayload
197+ dataprocService
198+ where go
199+ = buildClient
200+ (Proxy :: Proxy ProjectsRegionsJobsSubmitResource)
201+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Operations/Cancel.hsnew file+181
@@ -0,0 +1,181 @@
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.Dataproc.Projects.Regions.Operations.Cancel
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Starts asynchronous cancellation on a long-running operation. The server
24+-- makes a best effort to cancel the operation, but success is not
25+-- guaranteed. If the server doesn\'t support this method, it returns
26+-- \`google.rpc.Code.UNIMPLEMENTED\`. Clients can use
27+-- Operations.GetOperation or other methods to check whether the
28+-- cancellation succeeded or whether the operation completed despite
29+-- cancellation.
30+--
31+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.operations.cancel@.
32+module Network.Google.Resource.Dataproc.Projects.Regions.Operations.Cancel
33+ (
34+ -- * REST Resource
35+ ProjectsRegionsOperationsCancelResource
36+
37+ -- * Creating a Request
38+ , projectsRegionsOperationsCancel
39+ , ProjectsRegionsOperationsCancel
40+
41+ -- * Request Lenses
42+ , procXgafv
43+ , procUploadProtocol
44+ , procPp
45+ , procAccessToken
46+ , procUploadType
47+ , procBearerToken
48+ , procName
49+ , procCallback
50+ ) where
51+
52+import Network.Google.Dataproc.Types
53+import Network.Google.Prelude
54+
55+-- | A resource alias for @dataproc.projects.regions.operations.cancel@ method which the
56+-- 'ProjectsRegionsOperationsCancel' request conforms to.
57+type ProjectsRegionsOperationsCancelResource =
58+ "v1" :>
59+ CaptureMode "name" "cancel" Text :>
60+ QueryParam "$.xgafv" Text :>
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 :> Post '[JSON] Empty
68+
69+-- | Starts asynchronous cancellation on a long-running operation. The server
70+-- makes a best effort to cancel the operation, but success is not
71+-- guaranteed. If the server doesn\'t support this method, it returns
72+-- \`google.rpc.Code.UNIMPLEMENTED\`. Clients can use
73+-- Operations.GetOperation or other methods to check whether the
74+-- cancellation succeeded or whether the operation completed despite
75+-- cancellation.
76+--
77+-- /See:/ 'projectsRegionsOperationsCancel' smart constructor.
78+data ProjectsRegionsOperationsCancel = ProjectsRegionsOperationsCancel
79+ { _procXgafv :: !(Maybe Text)
80+ , _procUploadProtocol :: !(Maybe Text)
81+ , _procPp :: !Bool
82+ , _procAccessToken :: !(Maybe Text)
83+ , _procUploadType :: !(Maybe Text)
84+ , _procBearerToken :: !(Maybe Text)
85+ , _procName :: !Text
86+ , _procCallback :: !(Maybe Text)
87+ } deriving (Eq,Show,Data,Typeable,Generic)
88+
89+-- | Creates a value of 'ProjectsRegionsOperationsCancel' with the minimum fields required to make a request.
90+--
91+-- Use one of the following lenses to modify other fields as desired:
92+--
93+-- * 'procXgafv'
94+--
95+-- * 'procUploadProtocol'
96+--
97+-- * 'procPp'
98+--
99+-- * 'procAccessToken'
100+--
101+-- * 'procUploadType'
102+--
103+-- * 'procBearerToken'
104+--
105+-- * 'procName'
106+--
107+-- * 'procCallback'
108+projectsRegionsOperationsCancel
109+ :: Text -- ^ 'procName'
110+ -> ProjectsRegionsOperationsCancel
111+projectsRegionsOperationsCancel pProcName_ =
112+ ProjectsRegionsOperationsCancel
113+ { _procXgafv = Nothing
114+ , _procUploadProtocol = Nothing
115+ , _procPp = True
116+ , _procAccessToken = Nothing
117+ , _procUploadType = Nothing
118+ , _procBearerToken = Nothing
119+ , _procName = pProcName_
120+ , _procCallback = Nothing
121+ }
122+
123+-- | V1 error format.
124+procXgafv :: Lens' ProjectsRegionsOperationsCancel (Maybe Text)
125+procXgafv
126+ = lens _procXgafv (\ s a -> s{_procXgafv = a})
127+
128+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
129+procUploadProtocol :: Lens' ProjectsRegionsOperationsCancel (Maybe Text)
130+procUploadProtocol
131+ = lens _procUploadProtocol
132+ (\ s a -> s{_procUploadProtocol = a})
133+
134+-- | Pretty-print response.
135+procPp :: Lens' ProjectsRegionsOperationsCancel Bool
136+procPp = lens _procPp (\ s a -> s{_procPp = a})
137+
138+-- | OAuth access token.
139+procAccessToken :: Lens' ProjectsRegionsOperationsCancel (Maybe Text)
140+procAccessToken
141+ = lens _procAccessToken
142+ (\ s a -> s{_procAccessToken = a})
143+
144+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
145+procUploadType :: Lens' ProjectsRegionsOperationsCancel (Maybe Text)
146+procUploadType
147+ = lens _procUploadType
148+ (\ s a -> s{_procUploadType = a})
149+
150+-- | OAuth bearer token.
151+procBearerToken :: Lens' ProjectsRegionsOperationsCancel (Maybe Text)
152+procBearerToken
153+ = lens _procBearerToken
154+ (\ s a -> s{_procBearerToken = a})
155+
156+-- | The name of the operation resource to be cancelled.
157+procName :: Lens' ProjectsRegionsOperationsCancel Text
158+procName = lens _procName (\ s a -> s{_procName = a})
159+
160+-- | JSONP
161+procCallback :: Lens' ProjectsRegionsOperationsCancel (Maybe Text)
162+procCallback
163+ = lens _procCallback (\ s a -> s{_procCallback = a})
164+
165+instance GoogleRequest
166+ ProjectsRegionsOperationsCancel where
167+ type Rs ProjectsRegionsOperationsCancel = Empty
168+ requestClient ProjectsRegionsOperationsCancel{..}
169+ = go _procName _procXgafv _procUploadProtocol
170+ (Just _procPp)
171+ _procAccessToken
172+ _procUploadType
173+ _procBearerToken
174+ _procCallback
175+ (Just AltJSON)
176+ dataprocService
177+ where go
178+ = buildClient
179+ (Proxy ::
180+ Proxy ProjectsRegionsOperationsCancelResource)
181+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Operations/Delete.hsnew file+175
@@ -0,0 +1,175 @@
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.Dataproc.Projects.Regions.Operations.Delete
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Deletes a long-running operation. This method indicates that the client
24+-- is no longer interested in the operation result. It does not cancel the
25+-- operation. If the server doesn\'t support this method, it returns
26+-- \`google.rpc.Code.UNIMPLEMENTED\`.
27+--
28+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.operations.delete@.
29+module Network.Google.Resource.Dataproc.Projects.Regions.Operations.Delete
30+ (
31+ -- * REST Resource
32+ ProjectsRegionsOperationsDeleteResource
33+
34+ -- * Creating a Request
35+ , projectsRegionsOperationsDelete
36+ , ProjectsRegionsOperationsDelete
37+
38+ -- * Request Lenses
39+ , prodXgafv
40+ , prodUploadProtocol
41+ , prodPp
42+ , prodAccessToken
43+ , prodUploadType
44+ , prodBearerToken
45+ , prodName
46+ , prodCallback
47+ ) where
48+
49+import Network.Google.Dataproc.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @dataproc.projects.regions.operations.delete@ method which the
53+-- 'ProjectsRegionsOperationsDelete' request conforms to.
54+type ProjectsRegionsOperationsDeleteResource =
55+ "v1" :>
56+ Capture "name" Text :>
57+ QueryParam "$.xgafv" Text :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :> Delete '[JSON] Empty
65+
66+-- | Deletes a long-running operation. This method indicates that the client
67+-- is no longer interested in the operation result. It does not cancel the
68+-- operation. If the server doesn\'t support this method, it returns
69+-- \`google.rpc.Code.UNIMPLEMENTED\`.
70+--
71+-- /See:/ 'projectsRegionsOperationsDelete' smart constructor.
72+data ProjectsRegionsOperationsDelete = ProjectsRegionsOperationsDelete
73+ { _prodXgafv :: !(Maybe Text)
74+ , _prodUploadProtocol :: !(Maybe Text)
75+ , _prodPp :: !Bool
76+ , _prodAccessToken :: !(Maybe Text)
77+ , _prodUploadType :: !(Maybe Text)
78+ , _prodBearerToken :: !(Maybe Text)
79+ , _prodName :: !Text
80+ , _prodCallback :: !(Maybe Text)
81+ } deriving (Eq,Show,Data,Typeable,Generic)
82+
83+-- | Creates a value of 'ProjectsRegionsOperationsDelete' 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+-- * 'prodXgafv'
88+--
89+-- * 'prodUploadProtocol'
90+--
91+-- * 'prodPp'
92+--
93+-- * 'prodAccessToken'
94+--
95+-- * 'prodUploadType'
96+--
97+-- * 'prodBearerToken'
98+--
99+-- * 'prodName'
100+--
101+-- * 'prodCallback'
102+projectsRegionsOperationsDelete
103+ :: Text -- ^ 'prodName'
104+ -> ProjectsRegionsOperationsDelete
105+projectsRegionsOperationsDelete pProdName_ =
106+ ProjectsRegionsOperationsDelete
107+ { _prodXgafv = Nothing
108+ , _prodUploadProtocol = Nothing
109+ , _prodPp = True
110+ , _prodAccessToken = Nothing
111+ , _prodUploadType = Nothing
112+ , _prodBearerToken = Nothing
113+ , _prodName = pProdName_
114+ , _prodCallback = Nothing
115+ }
116+
117+-- | V1 error format.
118+prodXgafv :: Lens' ProjectsRegionsOperationsDelete (Maybe Text)
119+prodXgafv
120+ = lens _prodXgafv (\ s a -> s{_prodXgafv = a})
121+
122+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
123+prodUploadProtocol :: Lens' ProjectsRegionsOperationsDelete (Maybe Text)
124+prodUploadProtocol
125+ = lens _prodUploadProtocol
126+ (\ s a -> s{_prodUploadProtocol = a})
127+
128+-- | Pretty-print response.
129+prodPp :: Lens' ProjectsRegionsOperationsDelete Bool
130+prodPp = lens _prodPp (\ s a -> s{_prodPp = a})
131+
132+-- | OAuth access token.
133+prodAccessToken :: Lens' ProjectsRegionsOperationsDelete (Maybe Text)
134+prodAccessToken
135+ = lens _prodAccessToken
136+ (\ s a -> s{_prodAccessToken = a})
137+
138+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
139+prodUploadType :: Lens' ProjectsRegionsOperationsDelete (Maybe Text)
140+prodUploadType
141+ = lens _prodUploadType
142+ (\ s a -> s{_prodUploadType = a})
143+
144+-- | OAuth bearer token.
145+prodBearerToken :: Lens' ProjectsRegionsOperationsDelete (Maybe Text)
146+prodBearerToken
147+ = lens _prodBearerToken
148+ (\ s a -> s{_prodBearerToken = a})
149+
150+-- | The name of the operation resource to be deleted.
151+prodName :: Lens' ProjectsRegionsOperationsDelete Text
152+prodName = lens _prodName (\ s a -> s{_prodName = a})
153+
154+-- | JSONP
155+prodCallback :: Lens' ProjectsRegionsOperationsDelete (Maybe Text)
156+prodCallback
157+ = lens _prodCallback (\ s a -> s{_prodCallback = a})
158+
159+instance GoogleRequest
160+ ProjectsRegionsOperationsDelete where
161+ type Rs ProjectsRegionsOperationsDelete = Empty
162+ requestClient ProjectsRegionsOperationsDelete{..}
163+ = go _prodName _prodXgafv _prodUploadProtocol
164+ (Just _prodPp)
165+ _prodAccessToken
166+ _prodUploadType
167+ _prodBearerToken
168+ _prodCallback
169+ (Just AltJSON)
170+ dataprocService
171+ where go
172+ = buildClient
173+ (Proxy ::
174+ Proxy ProjectsRegionsOperationsDeleteResource)
175+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Operations/Get.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.Dataproc.Projects.Regions.Operations.Get
17+-- Copyright : (c) 2015 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/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.operations.get@.
28+module Network.Google.Resource.Dataproc.Projects.Regions.Operations.Get
29+ (
30+ -- * REST Resource
31+ ProjectsRegionsOperationsGetResource
32+
33+ -- * Creating a Request
34+ , projectsRegionsOperationsGet
35+ , ProjectsRegionsOperationsGet
36+
37+ -- * Request Lenses
38+ , progXgafv
39+ , progUploadProtocol
40+ , progPp
41+ , progAccessToken
42+ , progUploadType
43+ , progBearerToken
44+ , progName
45+ , progCallback
46+ ) where
47+
48+import Network.Google.Dataproc.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @dataproc.projects.regions.operations.get@ method which the
52+-- 'ProjectsRegionsOperationsGet' request conforms to.
53+type ProjectsRegionsOperationsGetResource =
54+ "v1" :>
55+ Capture "name" Text :>
56+ QueryParam "$.xgafv" Text :>
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:/ 'projectsRegionsOperationsGet' smart constructor.
70+data ProjectsRegionsOperationsGet = ProjectsRegionsOperationsGet
71+ { _progXgafv :: !(Maybe Text)
72+ , _progUploadProtocol :: !(Maybe Text)
73+ , _progPp :: !Bool
74+ , _progAccessToken :: !(Maybe Text)
75+ , _progUploadType :: !(Maybe Text)
76+ , _progBearerToken :: !(Maybe Text)
77+ , _progName :: !Text
78+ , _progCallback :: !(Maybe Text)
79+ } deriving (Eq,Show,Data,Typeable,Generic)
80+
81+-- | Creates a value of 'ProjectsRegionsOperationsGet' 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+-- * 'progXgafv'
86+--
87+-- * 'progUploadProtocol'
88+--
89+-- * 'progPp'
90+--
91+-- * 'progAccessToken'
92+--
93+-- * 'progUploadType'
94+--
95+-- * 'progBearerToken'
96+--
97+-- * 'progName'
98+--
99+-- * 'progCallback'
100+projectsRegionsOperationsGet
101+ :: Text -- ^ 'progName'
102+ -> ProjectsRegionsOperationsGet
103+projectsRegionsOperationsGet pProgName_ =
104+ ProjectsRegionsOperationsGet
105+ { _progXgafv = Nothing
106+ , _progUploadProtocol = Nothing
107+ , _progPp = True
108+ , _progAccessToken = Nothing
109+ , _progUploadType = Nothing
110+ , _progBearerToken = Nothing
111+ , _progName = pProgName_
112+ , _progCallback = Nothing
113+ }
114+
115+-- | V1 error format.
116+progXgafv :: Lens' ProjectsRegionsOperationsGet (Maybe Text)
117+progXgafv
118+ = lens _progXgafv (\ s a -> s{_progXgafv = a})
119+
120+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
121+progUploadProtocol :: Lens' ProjectsRegionsOperationsGet (Maybe Text)
122+progUploadProtocol
123+ = lens _progUploadProtocol
124+ (\ s a -> s{_progUploadProtocol = a})
125+
126+-- | Pretty-print response.
127+progPp :: Lens' ProjectsRegionsOperationsGet Bool
128+progPp = lens _progPp (\ s a -> s{_progPp = a})
129+
130+-- | OAuth access token.
131+progAccessToken :: Lens' ProjectsRegionsOperationsGet (Maybe Text)
132+progAccessToken
133+ = lens _progAccessToken
134+ (\ s a -> s{_progAccessToken = a})
135+
136+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
137+progUploadType :: Lens' ProjectsRegionsOperationsGet (Maybe Text)
138+progUploadType
139+ = lens _progUploadType
140+ (\ s a -> s{_progUploadType = a})
141+
142+-- | OAuth bearer token.
143+progBearerToken :: Lens' ProjectsRegionsOperationsGet (Maybe Text)
144+progBearerToken
145+ = lens _progBearerToken
146+ (\ s a -> s{_progBearerToken = a})
147+
148+-- | The name of the operation resource.
149+progName :: Lens' ProjectsRegionsOperationsGet Text
150+progName = lens _progName (\ s a -> s{_progName = a})
151+
152+-- | JSONP
153+progCallback :: Lens' ProjectsRegionsOperationsGet (Maybe Text)
154+progCallback
155+ = lens _progCallback (\ s a -> s{_progCallback = a})
156+
157+instance GoogleRequest ProjectsRegionsOperationsGet
158+ where
159+ type Rs ProjectsRegionsOperationsGet = Operation
160+ requestClient ProjectsRegionsOperationsGet{..}
161+ = go _progName _progXgafv _progUploadProtocol
162+ (Just _progPp)
163+ _progAccessToken
164+ _progUploadType
165+ _progBearerToken
166+ _progCallback
167+ (Just AltJSON)
168+ dataprocService
169+ where go
170+ = buildClient
171+ (Proxy :: Proxy ProjectsRegionsOperationsGetResource)
172+ mempty
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Operations/List.hsnew file+217
@@ -0,0 +1,217 @@
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.Dataproc.Projects.Regions.Operations.List
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Lists operations that match the specified filter in the request. If the
24+-- server doesn\'t support this method, it returns \`UNIMPLEMENTED\`. NOTE:
25+-- the \`name\` binding below allows API services to override the binding
26+-- to use different resource name schemes, such as
27+-- \`users\/*\/operations\`.
28+--
29+-- /See:/ <https://cloud.google.com/dataproc/ Google Cloud Dataproc API Reference> for @dataproc.projects.regions.operations.list@.
30+module Network.Google.Resource.Dataproc.Projects.Regions.Operations.List
31+ (
32+ -- * REST Resource
33+ ProjectsRegionsOperationsListResource
34+
35+ -- * Creating a Request
36+ , projectsRegionsOperationsList
37+ , ProjectsRegionsOperationsList
38+
39+ -- * Request Lenses
40+ , prolXgafv
41+ , prolUploadProtocol
42+ , prolPp
43+ , prolAccessToken
44+ , prolUploadType
45+ , prolBearerToken
46+ , prolName
47+ , prolFilter
48+ , prolPageToken
49+ , prolPageSize
50+ , prolCallback
51+ ) where
52+
53+import Network.Google.Dataproc.Types
54+import Network.Google.Prelude
55+
56+-- | A resource alias for @dataproc.projects.regions.operations.list@ method which the
57+-- 'ProjectsRegionsOperationsList' request conforms to.
58+type ProjectsRegionsOperationsListResource =
59+ "v1" :>
60+ Capture "name" Text :>
61+ QueryParam "$.xgafv" Text :>
62+ QueryParam "upload_protocol" Text :>
63+ QueryParam "pp" Bool :>
64+ QueryParam "access_token" Text :>
65+ QueryParam "uploadType" Text :>
66+ QueryParam "bearer_token" Text :>
67+ QueryParam "filter" Text :>
68+ QueryParam "pageToken" Text :>
69+ QueryParam "pageSize" (Textual Int32) :>
70+ QueryParam "callback" Text :>
71+ QueryParam "alt" AltJSON :>
72+ Get '[JSON] ListOperationsResponse
73+
74+-- | Lists operations that match the specified filter in the request. If the
75+-- server doesn\'t support this method, it returns \`UNIMPLEMENTED\`. NOTE:
76+-- the \`name\` binding below allows API services to override the binding
77+-- to use different resource name schemes, such as
78+-- \`users\/*\/operations\`.
79+--
80+-- /See:/ 'projectsRegionsOperationsList' smart constructor.
81+data ProjectsRegionsOperationsList = ProjectsRegionsOperationsList
82+ { _prolXgafv :: !(Maybe Text)
83+ , _prolUploadProtocol :: !(Maybe Text)
84+ , _prolPp :: !Bool
85+ , _prolAccessToken :: !(Maybe Text)
86+ , _prolUploadType :: !(Maybe Text)
87+ , _prolBearerToken :: !(Maybe Text)
88+ , _prolName :: !Text
89+ , _prolFilter :: !(Maybe Text)
90+ , _prolPageToken :: !(Maybe Text)
91+ , _prolPageSize :: !(Maybe (Textual Int32))
92+ , _prolCallback :: !(Maybe Text)
93+ } deriving (Eq,Show,Data,Typeable,Generic)
94+
95+-- | Creates a value of 'ProjectsRegionsOperationsList' with the minimum fields required to make a request.
96+--
97+-- Use one of the following lenses to modify other fields as desired:
98+--
99+-- * 'prolXgafv'
100+--
101+-- * 'prolUploadProtocol'
102+--
103+-- * 'prolPp'
104+--
105+-- * 'prolAccessToken'
106+--
107+-- * 'prolUploadType'
108+--
109+-- * 'prolBearerToken'
110+--
111+-- * 'prolName'
112+--
113+-- * 'prolFilter'
114+--
115+-- * 'prolPageToken'
116+--
117+-- * 'prolPageSize'
118+--
119+-- * 'prolCallback'
120+projectsRegionsOperationsList
121+ :: Text -- ^ 'prolName'
122+ -> ProjectsRegionsOperationsList
123+projectsRegionsOperationsList pProlName_ =
124+ ProjectsRegionsOperationsList
125+ { _prolXgafv = Nothing
126+ , _prolUploadProtocol = Nothing
127+ , _prolPp = True
128+ , _prolAccessToken = Nothing
129+ , _prolUploadType = Nothing
130+ , _prolBearerToken = Nothing
131+ , _prolName = pProlName_
132+ , _prolFilter = Nothing
133+ , _prolPageToken = Nothing
134+ , _prolPageSize = Nothing
135+ , _prolCallback = Nothing
136+ }
137+
138+-- | V1 error format.
139+prolXgafv :: Lens' ProjectsRegionsOperationsList (Maybe Text)
140+prolXgafv
141+ = lens _prolXgafv (\ s a -> s{_prolXgafv = a})
142+
143+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
144+prolUploadProtocol :: Lens' ProjectsRegionsOperationsList (Maybe Text)
145+prolUploadProtocol
146+ = lens _prolUploadProtocol
147+ (\ s a -> s{_prolUploadProtocol = a})
148+
149+-- | Pretty-print response.
150+prolPp :: Lens' ProjectsRegionsOperationsList Bool
151+prolPp = lens _prolPp (\ s a -> s{_prolPp = a})
152+
153+-- | OAuth access token.
154+prolAccessToken :: Lens' ProjectsRegionsOperationsList (Maybe Text)
155+prolAccessToken
156+ = lens _prolAccessToken
157+ (\ s a -> s{_prolAccessToken = a})
158+
159+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
160+prolUploadType :: Lens' ProjectsRegionsOperationsList (Maybe Text)
161+prolUploadType
162+ = lens _prolUploadType
163+ (\ s a -> s{_prolUploadType = a})
164+
165+-- | OAuth bearer token.
166+prolBearerToken :: Lens' ProjectsRegionsOperationsList (Maybe Text)
167+prolBearerToken
168+ = lens _prolBearerToken
169+ (\ s a -> s{_prolBearerToken = a})
170+
171+-- | The name of the operation collection.
172+prolName :: Lens' ProjectsRegionsOperationsList Text
173+prolName = lens _prolName (\ s a -> s{_prolName = a})
174+
175+-- | The standard list filter.
176+prolFilter :: Lens' ProjectsRegionsOperationsList (Maybe Text)
177+prolFilter
178+ = lens _prolFilter (\ s a -> s{_prolFilter = a})
179+
180+-- | The standard list page token.
181+prolPageToken :: Lens' ProjectsRegionsOperationsList (Maybe Text)
182+prolPageToken
183+ = lens _prolPageToken
184+ (\ s a -> s{_prolPageToken = a})
185+
186+-- | The standard list page size.
187+prolPageSize :: Lens' ProjectsRegionsOperationsList (Maybe Int32)
188+prolPageSize
189+ = lens _prolPageSize (\ s a -> s{_prolPageSize = a})
190+ . mapping _Coerce
191+
192+-- | JSONP
193+prolCallback :: Lens' ProjectsRegionsOperationsList (Maybe Text)
194+prolCallback
195+ = lens _prolCallback (\ s a -> s{_prolCallback = a})
196+
197+instance GoogleRequest ProjectsRegionsOperationsList
198+ where
199+ type Rs ProjectsRegionsOperationsList =
200+ ListOperationsResponse
201+ requestClient ProjectsRegionsOperationsList{..}
202+ = go _prolName _prolXgafv _prolUploadProtocol
203+ (Just _prolPp)
204+ _prolAccessToken
205+ _prolUploadType
206+ _prolBearerToken
207+ _prolFilter
208+ _prolPageToken
209+ _prolPageSize
210+ _prolCallback
211+ (Just AltJSON)
212+ dataprocService
213+ where go
214+ = buildClient
215+ (Proxy ::
216+ Proxy ProjectsRegionsOperationsListResource)
217+ mempty
gogol-dataproc/gogol-dataproc.cabalnew file+63
@@ -0,0 +1,63 @@
1+name: gogol-dataproc
2+version: 0.0.1
3+synopsis: Google Cloud Dataproc 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 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+ An API for managing Hadoop-based clusters and jobs on Google Cloud
18+ Platform.
19+ .
20+ /Warning:/ This is an experimental prototype/preview release which is still
21+ under exploratory development and not intended for public use, caveat emptor!
22+ .
23+ This library is compatible with version @v1@
24+ of the API.
25+
26+source-repository head
27+ type: git
28+ location: git://github.com/brendanhay/gogol.git
29+
30+library
31+ default-language: Haskell2010
32+ hs-source-dirs: src gen
33+
34+ ghc-options: -Wall
35+
36+ exposed-modules:
37+ Network.Google.Dataproc
38+ , Network.Google.Dataproc.Types
39+ , Network.Google.Resource.Dataproc.Media.Download
40+ , Network.Google.Resource.Dataproc.Media.Upload
41+ , Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Create
42+ , Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Delete
43+ , Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Diagnose
44+ , Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Get
45+ , Network.Google.Resource.Dataproc.Projects.Regions.Clusters.List
46+ , Network.Google.Resource.Dataproc.Projects.Regions.Clusters.Patch
47+ , Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Cancel
48+ , Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Delete
49+ , Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Get
50+ , Network.Google.Resource.Dataproc.Projects.Regions.Jobs.List
51+ , Network.Google.Resource.Dataproc.Projects.Regions.Jobs.Submit
52+ , Network.Google.Resource.Dataproc.Projects.Regions.Operations.Cancel
53+ , Network.Google.Resource.Dataproc.Projects.Regions.Operations.Delete
54+ , Network.Google.Resource.Dataproc.Projects.Regions.Operations.Get
55+ , Network.Google.Resource.Dataproc.Projects.Regions.Operations.List
56+
57+ other-modules:
58+ Network.Google.Dataproc.Types.Product
59+ , Network.Google.Dataproc.Types.Sum
60+
61+ build-depends:
62+ gogol-core == 0.0.1.*
63+ , base >= 4.7 && < 5
gogol-dataproc/src/.gitkeepnew file

No changes to the content.