on develop help sign in
Regenerating gogol-ml
commitc495d821dfd3afef94640d6f61085dc8a2e97bab authorBrendan Hay <brendan.g.hay@gmail.com> dateFri 28 Oct 2016, 08:23 (10 years ago) parente23a911
29 files changed+7281
gogol-ml/LICENSE+367 gogol-ml/Makefile+1 gogol-ml/README.md+28 gogol-ml/Setup.hs+2 gogol-ml/gen/Network/Google/MachineLearning.hs+365 gogol-ml/gen/Network/Google/MachineLearning/Types.hs+265 gogol-ml/gen/Network/Google/MachineLearning/Types/Product.hs+2154 gogol-ml/gen/Network/Google/MachineLearning/Types/Sum.hs+375 gogol-ml/gen/Network/Google/Resource/Ml/Projects/GetConfig.hs+177 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/Cancel.hs+184 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/Create.hs+180 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/Get.hs+170 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/List.hs+216 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Create.hs+192 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Delete.hs+175 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Get.hs+175 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/List.hs+206 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/Create.hs+200 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/Delete.hs+181 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/Get.hs+181 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/List.hs+213 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/SetDefault.hs+200 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Operations/Cancel.hs+186 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Operations/Delete.hs+176 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Operations/Get.hs+174 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Operations/List.hs+217 gogol-ml/gen/Network/Google/Resource/Ml/Projects/Predict.hs+257 gogol-ml/gogol-ml.cabal+64 gogol-ml/src/.gitkeep
gogol-ml/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-ml/Makefilenew file+1
@@ -0,0 +1 @@
1+include ../share/library.mk
gogol-ml/README.mdnew file+28
@@ -0,0 +1,28 @@
1+# gogol-ml
2+
3+* [Version](#version)
4+* [Description](#description)
5+* [Contribute](#contribute)
6+* [Licence](#licence)
7+
8+
9+## Version
10+
11+`0.1.0`
12+
13+
14+## Description
15+
16+A client library for the Google Cloud Machine Learning.
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-ml` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
gogol-ml/Setup.hsnew file+2
@@ -0,0 +1,2 @@
1+import Distribution.Simple
2+main = defaultMain
gogol-ml/gen/Network/Google/MachineLearning.hsnew file+365
@@ -0,0 +1,365 @@
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.MachineLearning
10+-- Copyright : (c) 2015-2016 Brendan Hay
11+-- License : Mozilla Public License, v. 2.0.
12+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
13+-- Stability : auto-generated
14+-- Portability : non-portable (GHC extensions)
15+--
16+-- An API to enable creating and using machine learning models.
17+--
18+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference>
19+module Network.Google.MachineLearning
20+ (
21+ -- * Service Configuration
22+ machineLearningService
23+
24+ -- * OAuth Scopes
25+ , cloudPlatformScope
26+
27+ -- * API Declaration
28+ , MachineLearningAPI
29+
30+ -- * Resources
31+
32+ -- ** ml.projects.getConfig
33+ , module Network.Google.Resource.Ml.Projects.GetConfig
34+
35+ -- ** ml.projects.jobs.cancel
36+ , module Network.Google.Resource.Ml.Projects.Jobs.Cancel
37+
38+ -- ** ml.projects.jobs.create
39+ , module Network.Google.Resource.Ml.Projects.Jobs.Create
40+
41+ -- ** ml.projects.jobs.get
42+ , module Network.Google.Resource.Ml.Projects.Jobs.Get
43+
44+ -- ** ml.projects.jobs.list
45+ , module Network.Google.Resource.Ml.Projects.Jobs.List
46+
47+ -- ** ml.projects.models.create
48+ , module Network.Google.Resource.Ml.Projects.Models.Create
49+
50+ -- ** ml.projects.models.delete
51+ , module Network.Google.Resource.Ml.Projects.Models.Delete
52+
53+ -- ** ml.projects.models.get
54+ , module Network.Google.Resource.Ml.Projects.Models.Get
55+
56+ -- ** ml.projects.models.list
57+ , module Network.Google.Resource.Ml.Projects.Models.List
58+
59+ -- ** ml.projects.models.versions.create
60+ , module Network.Google.Resource.Ml.Projects.Models.Versions.Create
61+
62+ -- ** ml.projects.models.versions.delete
63+ , module Network.Google.Resource.Ml.Projects.Models.Versions.Delete
64+
65+ -- ** ml.projects.models.versions.get
66+ , module Network.Google.Resource.Ml.Projects.Models.Versions.Get
67+
68+ -- ** ml.projects.models.versions.list
69+ , module Network.Google.Resource.Ml.Projects.Models.Versions.List
70+
71+ -- ** ml.projects.models.versions.setDefault
72+ , module Network.Google.Resource.Ml.Projects.Models.Versions.SetDefault
73+
74+ -- ** ml.projects.operations.cancel
75+ , module Network.Google.Resource.Ml.Projects.Operations.Cancel
76+
77+ -- ** ml.projects.operations.delete
78+ , module Network.Google.Resource.Ml.Projects.Operations.Delete
79+
80+ -- ** ml.projects.operations.get
81+ , module Network.Google.Resource.Ml.Projects.Operations.Get
82+
83+ -- ** ml.projects.operations.list
84+ , module Network.Google.Resource.Ml.Projects.Operations.List
85+
86+ -- ** ml.projects.predict
87+ , module Network.Google.Resource.Ml.Projects.Predict
88+
89+ -- * Types
90+
91+ -- ** GoogleCloudMlV1beta1__SetDefaultVersionRequest
92+ , GoogleCloudMlV1beta1__SetDefaultVersionRequest
93+ , googleCloudMlV1beta1__SetDefaultVersionRequest
94+
95+ -- ** GoogleCloudMlV1beta1__Version
96+ , GoogleCloudMlV1beta1__Version
97+ , googleCloudMlV1beta1__Version
98+ , gcmvvLastUseTime
99+ , gcmvvName
100+ , gcmvvDeploymentURI
101+ , gcmvvDescription
102+ , gcmvvCreateTime
103+ , gcmvvIsDefault
104+
105+ -- ** GoogleCloudMlV1beta1__HyperparameterSpec
106+ , GoogleCloudMlV1beta1__HyperparameterSpec
107+ , googleCloudMlV1beta1__HyperparameterSpec
108+ , gcmvhsParams
109+ , gcmvhsGoal
110+ , gcmvhsMaxTrials
111+ , gcmvhsMaxParallelTrials
112+
113+ -- ** GoogleCloudMlV1beta1__GetConfigResponse
114+ , GoogleCloudMlV1beta1__GetConfigResponse
115+ , googleCloudMlV1beta1__GetConfigResponse
116+ , gcmvgcrServiceAccount
117+ , gcmvgcrServiceAccountProject
118+
119+ -- ** GoogleCloudMlV1beta1__Job
120+ , GoogleCloudMlV1beta1__Job
121+ , googleCloudMlV1beta1__Job
122+ , gcmvjState
123+ , gcmvjTrainingOutput
124+ , gcmvjJobId
125+ , gcmvjStartTime
126+ , gcmvjPredictionInput
127+ , gcmvjEndTime
128+ , gcmvjPredictionOutput
129+ , gcmvjErrorMessage
130+ , gcmvjTrainingInput
131+ , gcmvjCreateTime
132+
133+ -- ** GoogleCloudMlV1beta1__TrainingOutput
134+ , GoogleCloudMlV1beta1__TrainingOutput
135+ , googleCloudMlV1beta1__TrainingOutput
136+ , gcmvtoCompletedTrialCount
137+ , gcmvtoTrials
138+
139+ -- ** GoogleCloudMlV1beta1__Model
140+ , GoogleCloudMlV1beta1__Model
141+ , googleCloudMlV1beta1__Model
142+ , gcmvmDefaultVersion
143+ , gcmvmName
144+ , gcmvmDescription
145+
146+ -- ** GoogleLongrunning__OperationResponse
147+ , GoogleLongrunning__OperationResponse
148+ , googleLongrunning__OperationResponse
149+ , glorAddtional
150+
151+ -- ** GoogleCloudMlV1beta1__JobState
152+ , GoogleCloudMlV1beta1__JobState (..)
153+
154+ -- ** GoogleCloudMlV1beta1__OperationMetadata
155+ , GoogleCloudMlV1beta1__OperationMetadata
156+ , googleCloudMlV1beta1__OperationMetadata
157+ , gcmvomStartTime
158+ , gcmvomModelName
159+ , gcmvomVersion
160+ , gcmvomEndTime
161+ , gcmvomIsCancellationRequested
162+ , gcmvomOperationType
163+ , gcmvomCreateTime
164+
165+ -- ** GoogleCloudMlV1beta1__HyperparameterOutput
166+ , GoogleCloudMlV1beta1__HyperparameterOutput
167+ , googleCloudMlV1beta1__HyperparameterOutput
168+ , gcmvhoAllMetrics
169+ , gcmvhoHyperparameters
170+ , gcmvhoTrialId
171+ , gcmvhoFinalMetric
172+
173+ -- ** GoogleCloudMlV1beta1__ListVersionsResponse
174+ , GoogleCloudMlV1beta1__ListVersionsResponse
175+ , googleCloudMlV1beta1__ListVersionsResponse
176+ , gcmvlvrNextPageToken
177+ , gcmvlvrVersions
178+
179+ -- ** GoogleCloudMlV1beta1__OperationMetadataOperationType
180+ , GoogleCloudMlV1beta1__OperationMetadataOperationType (..)
181+
182+ -- ** GoogleLongrunning__ListOperationsResponse
183+ , GoogleLongrunning__ListOperationsResponse
184+ , googleLongrunning__ListOperationsResponse
185+ , gllorNextPageToken
186+ , gllorOperations
187+
188+ -- ** GoogleCloudMlV1beta1__PredictionInput
189+ , GoogleCloudMlV1beta1__PredictionInput
190+ , googleCloudMlV1beta1__PredictionInput
191+ , gcmvpiVersionName
192+ , gcmvpiModelName
193+ , gcmvpiDataFormat
194+ , gcmvpiMaxWorkerCount
195+ , gcmvpiOutputPath
196+ , gcmvpiRegion
197+ , gcmvpiInputPaths
198+
199+ -- ** GoogleLongrunning__Operation
200+ , GoogleLongrunning__Operation
201+ , googleLongrunning__Operation
202+ , gloDone
203+ , gloError
204+ , gloResponse
205+ , gloName
206+ , gloMetadata
207+
208+ -- ** GoogleCloudMlV1beta1__ParameterSpecType
209+ , GoogleCloudMlV1beta1__ParameterSpecType (..)
210+
211+ -- ** GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters
212+ , GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters
213+ , googleCloudMlV1beta1__HyperparameterOutputHyperparameters
214+ , gcmvhohAddtional
215+
216+ -- ** GoogleRpc__Status
217+ , GoogleRpc__Status
218+ , googleRpc__Status
219+ , grsDetails
220+ , grsCode
221+ , grsMessage
222+
223+ -- ** GoogleLongrunning__OperationMetadata
224+ , GoogleLongrunning__OperationMetadata
225+ , googleLongrunning__OperationMetadata
226+ , glomAddtional
227+
228+ -- ** GoogleCloudMlV1beta1__PredictionOutput
229+ , GoogleCloudMlV1beta1__PredictionOutput
230+ , googleCloudMlV1beta1__PredictionOutput
231+ , gcmvpoErrorCount
232+ , gcmvpoPredictionCount
233+ , gcmvpoOutputPath
234+
235+ -- ** Xgafv
236+ , Xgafv (..)
237+
238+ -- ** GoogleCloudMlV1beta1__HyperparameterSpecGoal
239+ , GoogleCloudMlV1beta1__HyperparameterSpecGoal (..)
240+
241+ -- ** GoogleCloudMlV1beta1__PredictionInputDataFormat
242+ , GoogleCloudMlV1beta1__PredictionInputDataFormat (..)
243+
244+ -- ** GoogleCloudMlV1beta1__CancelJobRequest
245+ , GoogleCloudMlV1beta1__CancelJobRequest
246+ , googleCloudMlV1beta1__CancelJobRequest
247+
248+ -- ** GoogleCloudMlV1beta1__ListModelsResponse
249+ , GoogleCloudMlV1beta1__ListModelsResponse
250+ , googleCloudMlV1beta1__ListModelsResponse
251+ , gcmvlmrNextPageToken
252+ , gcmvlmrModels
253+
254+ -- ** GoogleCloudMlV1beta1__ListJobsResponse
255+ , GoogleCloudMlV1beta1__ListJobsResponse
256+ , googleCloudMlV1beta1__ListJobsResponse
257+ , gcmvljrNextPageToken
258+ , gcmvljrJobs
259+
260+ -- ** GoogleCloudMlV1beta1__TrainingInput
261+ , GoogleCloudMlV1beta1__TrainingInput
262+ , googleCloudMlV1beta1__TrainingInput
263+ , gcmvtiMasterType
264+ , gcmvtiParameterServerCount
265+ , gcmvtiArgs
266+ , gcmvtiWorkerCount
267+ , gcmvtiWorkerType
268+ , gcmvtiPythonModule
269+ , gcmvtiParameterServerType
270+ , gcmvtiHyperparameters
271+ , gcmvtiPackageURIs
272+ , gcmvtiScaleTier
273+ , gcmvtiRegion
274+
275+ -- ** GoogleRpc__StatusDetailsItem
276+ , GoogleRpc__StatusDetailsItem
277+ , googleRpc__StatusDetailsItem
278+ , grsdiAddtional
279+
280+ -- ** GoogleProtobuf__Empty
281+ , GoogleProtobuf__Empty
282+ , googleProtobuf__Empty
283+
284+ -- ** GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
285+ , GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
286+ , googleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
287+ , gcmvhohmTrainingStep
288+ , gcmvhohmObjectiveValue
289+
290+ -- ** GoogleCloudMlV1beta1__ParameterSpecScaleType
291+ , GoogleCloudMlV1beta1__ParameterSpecScaleType (..)
292+
293+ -- ** GoogleAPI__HTTPBody
294+ , GoogleAPI__HTTPBody
295+ , googleAPI__HTTPBody
296+ , gahttpbData
297+ , gahttpbContentType
298+
299+ -- ** GoogleCloudMlV1beta1__PredictRequest
300+ , GoogleCloudMlV1beta1__PredictRequest
301+ , googleCloudMlV1beta1__PredictRequest
302+ , gcmvprHTTPBody
303+
304+ -- ** GoogleCloudMlV1beta1__ParameterSpec
305+ , GoogleCloudMlV1beta1__ParameterSpec
306+ , googleCloudMlV1beta1__ParameterSpec
307+ , gcmvpsMaxValue
308+ , gcmvpsScaleType
309+ , gcmvpsType
310+ , gcmvpsDiscreteValues
311+ , gcmvpsParameterName
312+ , gcmvpsCategoricalValues
313+ , gcmvpsMinValue
314+
315+ -- ** GoogleCloudMlV1beta1__TrainingInputScaleTier
316+ , GoogleCloudMlV1beta1__TrainingInputScaleTier (..)
317+ ) where
318+
319+import Network.Google.MachineLearning.Types
320+import Network.Google.Prelude
321+import Network.Google.Resource.Ml.Projects.GetConfig
322+import Network.Google.Resource.Ml.Projects.Jobs.Cancel
323+import Network.Google.Resource.Ml.Projects.Jobs.Create
324+import Network.Google.Resource.Ml.Projects.Jobs.Get
325+import Network.Google.Resource.Ml.Projects.Jobs.List
326+import Network.Google.Resource.Ml.Projects.Models.Create
327+import Network.Google.Resource.Ml.Projects.Models.Delete
328+import Network.Google.Resource.Ml.Projects.Models.Get
329+import Network.Google.Resource.Ml.Projects.Models.List
330+import Network.Google.Resource.Ml.Projects.Models.Versions.Create
331+import Network.Google.Resource.Ml.Projects.Models.Versions.Delete
332+import Network.Google.Resource.Ml.Projects.Models.Versions.Get
333+import Network.Google.Resource.Ml.Projects.Models.Versions.List
334+import Network.Google.Resource.Ml.Projects.Models.Versions.SetDefault
335+import Network.Google.Resource.Ml.Projects.Operations.Cancel
336+import Network.Google.Resource.Ml.Projects.Operations.Delete
337+import Network.Google.Resource.Ml.Projects.Operations.Get
338+import Network.Google.Resource.Ml.Projects.Operations.List
339+import Network.Google.Resource.Ml.Projects.Predict
340+
341+{- $resources
342+TODO
343+-}
344+
345+-- | Represents the entirety of the methods and resources available for the Google Cloud Machine Learning service.
346+type MachineLearningAPI =
347+ ProjectsModelsVersionsListResource :<|>
348+ ProjectsModelsVersionsGetResource
349+ :<|> ProjectsModelsVersionsSetDefaultResource
350+ :<|> ProjectsModelsVersionsCreateResource
351+ :<|> ProjectsModelsVersionsDeleteResource
352+ :<|> ProjectsModelsListResource
353+ :<|> ProjectsModelsGetResource
354+ :<|> ProjectsModelsCreateResource
355+ :<|> ProjectsModelsDeleteResource
356+ :<|> ProjectsJobsListResource
357+ :<|> ProjectsJobsGetResource
358+ :<|> ProjectsJobsCreateResource
359+ :<|> ProjectsJobsCancelResource
360+ :<|> ProjectsOperationsListResource
361+ :<|> ProjectsOperationsGetResource
362+ :<|> ProjectsOperationsCancelResource
363+ :<|> ProjectsOperationsDeleteResource
364+ :<|> ProjectsGetConfigResource
365+ :<|> ProjectsPredictResource
gogol-ml/gen/Network/Google/MachineLearning/Types.hsnew file+265
@@ -0,0 +1,265 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE NoImplicitPrelude #-}
5+{-# LANGUAGE OverloadedStrings #-}
6+
7+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
8+
9+-- |
10+-- Module : Network.Google.MachineLearning.Types
11+-- Copyright : (c) 2015-2016 Brendan Hay
12+-- License : Mozilla Public License, v. 2.0.
13+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
14+-- Stability : auto-generated
15+-- Portability : non-portable (GHC extensions)
16+--
17+module Network.Google.MachineLearning.Types
18+ (
19+ -- * Service Configuration
20+ machineLearningService
21+
22+ -- * OAuth Scopes
23+ , cloudPlatformScope
24+
25+ -- * GoogleCloudMlV1beta1__SetDefaultVersionRequest
26+ , GoogleCloudMlV1beta1__SetDefaultVersionRequest
27+ , googleCloudMlV1beta1__SetDefaultVersionRequest
28+
29+ -- * GoogleCloudMlV1beta1__Version
30+ , GoogleCloudMlV1beta1__Version
31+ , googleCloudMlV1beta1__Version
32+ , gcmvvLastUseTime
33+ , gcmvvName
34+ , gcmvvDeploymentURI
35+ , gcmvvDescription
36+ , gcmvvCreateTime
37+ , gcmvvIsDefault
38+
39+ -- * GoogleCloudMlV1beta1__HyperparameterSpec
40+ , GoogleCloudMlV1beta1__HyperparameterSpec
41+ , googleCloudMlV1beta1__HyperparameterSpec
42+ , gcmvhsParams
43+ , gcmvhsGoal
44+ , gcmvhsMaxTrials
45+ , gcmvhsMaxParallelTrials
46+
47+ -- * GoogleCloudMlV1beta1__GetConfigResponse
48+ , GoogleCloudMlV1beta1__GetConfigResponse
49+ , googleCloudMlV1beta1__GetConfigResponse
50+ , gcmvgcrServiceAccount
51+ , gcmvgcrServiceAccountProject
52+
53+ -- * GoogleCloudMlV1beta1__Job
54+ , GoogleCloudMlV1beta1__Job
55+ , googleCloudMlV1beta1__Job
56+ , gcmvjState
57+ , gcmvjTrainingOutput
58+ , gcmvjJobId
59+ , gcmvjStartTime
60+ , gcmvjPredictionInput
61+ , gcmvjEndTime
62+ , gcmvjPredictionOutput
63+ , gcmvjErrorMessage
64+ , gcmvjTrainingInput
65+ , gcmvjCreateTime
66+
67+ -- * GoogleCloudMlV1beta1__TrainingOutput
68+ , GoogleCloudMlV1beta1__TrainingOutput
69+ , googleCloudMlV1beta1__TrainingOutput
70+ , gcmvtoCompletedTrialCount
71+ , gcmvtoTrials
72+
73+ -- * GoogleCloudMlV1beta1__Model
74+ , GoogleCloudMlV1beta1__Model
75+ , googleCloudMlV1beta1__Model
76+ , gcmvmDefaultVersion
77+ , gcmvmName
78+ , gcmvmDescription
79+
80+ -- * GoogleLongrunning__OperationResponse
81+ , GoogleLongrunning__OperationResponse
82+ , googleLongrunning__OperationResponse
83+ , glorAddtional
84+
85+ -- * GoogleCloudMlV1beta1__JobState
86+ , GoogleCloudMlV1beta1__JobState (..)
87+
88+ -- * GoogleCloudMlV1beta1__OperationMetadata
89+ , GoogleCloudMlV1beta1__OperationMetadata
90+ , googleCloudMlV1beta1__OperationMetadata
91+ , gcmvomStartTime
92+ , gcmvomModelName
93+ , gcmvomVersion
94+ , gcmvomEndTime
95+ , gcmvomIsCancellationRequested
96+ , gcmvomOperationType
97+ , gcmvomCreateTime
98+
99+ -- * GoogleCloudMlV1beta1__HyperparameterOutput
100+ , GoogleCloudMlV1beta1__HyperparameterOutput
101+ , googleCloudMlV1beta1__HyperparameterOutput
102+ , gcmvhoAllMetrics
103+ , gcmvhoHyperparameters
104+ , gcmvhoTrialId
105+ , gcmvhoFinalMetric
106+
107+ -- * GoogleCloudMlV1beta1__ListVersionsResponse
108+ , GoogleCloudMlV1beta1__ListVersionsResponse
109+ , googleCloudMlV1beta1__ListVersionsResponse
110+ , gcmvlvrNextPageToken
111+ , gcmvlvrVersions
112+
113+ -- * GoogleCloudMlV1beta1__OperationMetadataOperationType
114+ , GoogleCloudMlV1beta1__OperationMetadataOperationType (..)
115+
116+ -- * GoogleLongrunning__ListOperationsResponse
117+ , GoogleLongrunning__ListOperationsResponse
118+ , googleLongrunning__ListOperationsResponse
119+ , gllorNextPageToken
120+ , gllorOperations
121+
122+ -- * GoogleCloudMlV1beta1__PredictionInput
123+ , GoogleCloudMlV1beta1__PredictionInput
124+ , googleCloudMlV1beta1__PredictionInput
125+ , gcmvpiVersionName
126+ , gcmvpiModelName
127+ , gcmvpiDataFormat
128+ , gcmvpiMaxWorkerCount
129+ , gcmvpiOutputPath
130+ , gcmvpiRegion
131+ , gcmvpiInputPaths
132+
133+ -- * GoogleLongrunning__Operation
134+ , GoogleLongrunning__Operation
135+ , googleLongrunning__Operation
136+ , gloDone
137+ , gloError
138+ , gloResponse
139+ , gloName
140+ , gloMetadata
141+
142+ -- * GoogleCloudMlV1beta1__ParameterSpecType
143+ , GoogleCloudMlV1beta1__ParameterSpecType (..)
144+
145+ -- * GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters
146+ , GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters
147+ , googleCloudMlV1beta1__HyperparameterOutputHyperparameters
148+ , gcmvhohAddtional
149+
150+ -- * GoogleRpc__Status
151+ , GoogleRpc__Status
152+ , googleRpc__Status
153+ , grsDetails
154+ , grsCode
155+ , grsMessage
156+
157+ -- * GoogleLongrunning__OperationMetadata
158+ , GoogleLongrunning__OperationMetadata
159+ , googleLongrunning__OperationMetadata
160+ , glomAddtional
161+
162+ -- * GoogleCloudMlV1beta1__PredictionOutput
163+ , GoogleCloudMlV1beta1__PredictionOutput
164+ , googleCloudMlV1beta1__PredictionOutput
165+ , gcmvpoErrorCount
166+ , gcmvpoPredictionCount
167+ , gcmvpoOutputPath
168+
169+ -- * Xgafv
170+ , Xgafv (..)
171+
172+ -- * GoogleCloudMlV1beta1__HyperparameterSpecGoal
173+ , GoogleCloudMlV1beta1__HyperparameterSpecGoal (..)
174+
175+ -- * GoogleCloudMlV1beta1__PredictionInputDataFormat
176+ , GoogleCloudMlV1beta1__PredictionInputDataFormat (..)
177+
178+ -- * GoogleCloudMlV1beta1__CancelJobRequest
179+ , GoogleCloudMlV1beta1__CancelJobRequest
180+ , googleCloudMlV1beta1__CancelJobRequest
181+
182+ -- * GoogleCloudMlV1beta1__ListModelsResponse
183+ , GoogleCloudMlV1beta1__ListModelsResponse
184+ , googleCloudMlV1beta1__ListModelsResponse
185+ , gcmvlmrNextPageToken
186+ , gcmvlmrModels
187+
188+ -- * GoogleCloudMlV1beta1__ListJobsResponse
189+ , GoogleCloudMlV1beta1__ListJobsResponse
190+ , googleCloudMlV1beta1__ListJobsResponse
191+ , gcmvljrNextPageToken
192+ , gcmvljrJobs
193+
194+ -- * GoogleCloudMlV1beta1__TrainingInput
195+ , GoogleCloudMlV1beta1__TrainingInput
196+ , googleCloudMlV1beta1__TrainingInput
197+ , gcmvtiMasterType
198+ , gcmvtiParameterServerCount
199+ , gcmvtiArgs
200+ , gcmvtiWorkerCount
201+ , gcmvtiWorkerType
202+ , gcmvtiPythonModule
203+ , gcmvtiParameterServerType
204+ , gcmvtiHyperparameters
205+ , gcmvtiPackageURIs
206+ , gcmvtiScaleTier
207+ , gcmvtiRegion
208+
209+ -- * GoogleRpc__StatusDetailsItem
210+ , GoogleRpc__StatusDetailsItem
211+ , googleRpc__StatusDetailsItem
212+ , grsdiAddtional
213+
214+ -- * GoogleProtobuf__Empty
215+ , GoogleProtobuf__Empty
216+ , googleProtobuf__Empty
217+
218+ -- * GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
219+ , GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
220+ , googleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
221+ , gcmvhohmTrainingStep
222+ , gcmvhohmObjectiveValue
223+
224+ -- * GoogleCloudMlV1beta1__ParameterSpecScaleType
225+ , GoogleCloudMlV1beta1__ParameterSpecScaleType (..)
226+
227+ -- * GoogleAPI__HTTPBody
228+ , GoogleAPI__HTTPBody
229+ , googleAPI__HTTPBody
230+ , gahttpbData
231+ , gahttpbContentType
232+
233+ -- * GoogleCloudMlV1beta1__PredictRequest
234+ , GoogleCloudMlV1beta1__PredictRequest
235+ , googleCloudMlV1beta1__PredictRequest
236+ , gcmvprHTTPBody
237+
238+ -- * GoogleCloudMlV1beta1__ParameterSpec
239+ , GoogleCloudMlV1beta1__ParameterSpec
240+ , googleCloudMlV1beta1__ParameterSpec
241+ , gcmvpsMaxValue
242+ , gcmvpsScaleType
243+ , gcmvpsType
244+ , gcmvpsDiscreteValues
245+ , gcmvpsParameterName
246+ , gcmvpsCategoricalValues
247+ , gcmvpsMinValue
248+
249+ -- * GoogleCloudMlV1beta1__TrainingInputScaleTier
250+ , GoogleCloudMlV1beta1__TrainingInputScaleTier (..)
251+ ) where
252+
253+import Network.Google.MachineLearning.Types.Product
254+import Network.Google.MachineLearning.Types.Sum
255+import Network.Google.Prelude
256+
257+-- | Default request referring to version 'v1beta1' of the Google Cloud Machine Learning. This contains the host and root path used as a starting point for constructing service requests.
258+machineLearningService :: ServiceConfig
259+machineLearningService
260+ = defaultService (ServiceId "ml:v1beta1")
261+ "ml.googleapis.com"
262+
263+-- | View and manage your data across Google Cloud Platform services
264+cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]
265+cloudPlatformScope = Proxy;
gogol-ml/gen/Network/Google/MachineLearning/Types/Product.hsnew file+2154
@@ -0,0 +1,2154 @@
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.MachineLearning.Types.Product
12+-- Copyright : (c) 2015-2016 Brendan Hay
13+-- License : Mozilla Public License, v. 2.0.
14+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
15+-- Stability : auto-generated
16+-- Portability : non-portable (GHC extensions)
17+--
18+module Network.Google.MachineLearning.Types.Product where
19+
20+import Network.Google.MachineLearning.Types.Sum
21+import Network.Google.Prelude
22+
23+-- | Request message for the SetDefaultVersion request.
24+--
25+-- /See:/ 'googleCloudMlV1beta1__SetDefaultVersionRequest' smart constructor.
26+data GoogleCloudMlV1beta1__SetDefaultVersionRequest =
27+ GoogleCloudMlV1beta1__SetDefaultVersionRequest'
28+ deriving (Eq,Show,Data,Typeable,Generic)
29+
30+-- | Creates a value of 'GoogleCloudMlV1beta1__SetDefaultVersionRequest' with the minimum fields required to make a request.
31+--
32+googleCloudMlV1beta1__SetDefaultVersionRequest
33+ :: GoogleCloudMlV1beta1__SetDefaultVersionRequest
34+googleCloudMlV1beta1__SetDefaultVersionRequest =
35+ GoogleCloudMlV1beta1__SetDefaultVersionRequest'
36+
37+instance FromJSON
38+ GoogleCloudMlV1beta1__SetDefaultVersionRequest where
39+ parseJSON
40+ = withObject
41+ "GoogleCloudMlV1beta1SetDefaultVersionRequest"
42+ (\ o ->
43+ pure GoogleCloudMlV1beta1__SetDefaultVersionRequest')
44+
45+instance ToJSON
46+ GoogleCloudMlV1beta1__SetDefaultVersionRequest where
47+ toJSON = const emptyObject
48+
49+-- | Represents a version of the model. Each version is a trained model
50+-- deployed in the cloud, ready to handle prediction requests. A model can
51+-- have multiple versions. You can get information about all of the
52+-- versions of a given model by calling
53+-- [projects.models.versions.list](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/list).
54+--
55+-- /See:/ 'googleCloudMlV1beta1__Version' smart constructor.
56+data GoogleCloudMlV1beta1__Version = GoogleCloudMlV1beta1__Version'
57+ { _gcmvvLastUseTime :: !(Maybe DateTime')
58+ , _gcmvvName :: !(Maybe Text)
59+ , _gcmvvDeploymentURI :: !(Maybe Text)
60+ , _gcmvvDescription :: !(Maybe Text)
61+ , _gcmvvCreateTime :: !(Maybe DateTime')
62+ , _gcmvvIsDefault :: !(Maybe Bool)
63+ } deriving (Eq,Show,Data,Typeable,Generic)
64+
65+-- | Creates a value of 'GoogleCloudMlV1beta1__Version' with the minimum fields required to make a request.
66+--
67+-- Use one of the following lenses to modify other fields as desired:
68+--
69+-- * 'gcmvvLastUseTime'
70+--
71+-- * 'gcmvvName'
72+--
73+-- * 'gcmvvDeploymentURI'
74+--
75+-- * 'gcmvvDescription'
76+--
77+-- * 'gcmvvCreateTime'
78+--
79+-- * 'gcmvvIsDefault'
80+googleCloudMlV1beta1__Version
81+ :: GoogleCloudMlV1beta1__Version
82+googleCloudMlV1beta1__Version =
83+ GoogleCloudMlV1beta1__Version'
84+ { _gcmvvLastUseTime = Nothing
85+ , _gcmvvName = Nothing
86+ , _gcmvvDeploymentURI = Nothing
87+ , _gcmvvDescription = Nothing
88+ , _gcmvvCreateTime = Nothing
89+ , _gcmvvIsDefault = Nothing
90+ }
91+
92+-- | Output only. The time the version was last used for prediction.
93+gcmvvLastUseTime :: Lens' GoogleCloudMlV1beta1__Version (Maybe UTCTime)
94+gcmvvLastUseTime
95+ = lens _gcmvvLastUseTime
96+ (\ s a -> s{_gcmvvLastUseTime = a})
97+ . mapping _DateTime
98+
99+-- | Required.The name specified for the version when it was created. The
100+-- version name must be unique within the model it is created in.
101+gcmvvName :: Lens' GoogleCloudMlV1beta1__Version (Maybe Text)
102+gcmvvName
103+ = lens _gcmvvName (\ s a -> s{_gcmvvName = a})
104+
105+-- | Required. The Google Cloud Storage location of the trained model used to
106+-- create the version. See the [overview of model
107+-- deployment](\/ml\/docs\/concepts\/deployment-overview) for more
108+-- informaiton. When passing Version to
109+-- [projects.models.versions.create](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/create)
110+-- the model service uses the specified location as the source of the
111+-- model. Once deployed, the model version is hosted by the prediction
112+-- service, so this location is useful only as a historical record.
113+gcmvvDeploymentURI :: Lens' GoogleCloudMlV1beta1__Version (Maybe Text)
114+gcmvvDeploymentURI
115+ = lens _gcmvvDeploymentURI
116+ (\ s a -> s{_gcmvvDeploymentURI = a})
117+
118+-- | Optional. The description specified for the version when it was created.
119+gcmvvDescription :: Lens' GoogleCloudMlV1beta1__Version (Maybe Text)
120+gcmvvDescription
121+ = lens _gcmvvDescription
122+ (\ s a -> s{_gcmvvDescription = a})
123+
124+-- | Output only. The time the version was created.
125+gcmvvCreateTime :: Lens' GoogleCloudMlV1beta1__Version (Maybe UTCTime)
126+gcmvvCreateTime
127+ = lens _gcmvvCreateTime
128+ (\ s a -> s{_gcmvvCreateTime = a})
129+ . mapping _DateTime
130+
131+-- | Output only. If true, this version will be used to handle prediction
132+-- requests that do not specify a version. You can change the default
133+-- version by calling
134+-- [projects.methods.versions.setDefault](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/setDefault).
135+gcmvvIsDefault :: Lens' GoogleCloudMlV1beta1__Version (Maybe Bool)
136+gcmvvIsDefault
137+ = lens _gcmvvIsDefault
138+ (\ s a -> s{_gcmvvIsDefault = a})
139+
140+instance FromJSON GoogleCloudMlV1beta1__Version where
141+ parseJSON
142+ = withObject "GoogleCloudMlV1beta1Version"
143+ (\ o ->
144+ GoogleCloudMlV1beta1__Version' <$>
145+ (o .:? "lastUseTime") <*> (o .:? "name") <*>
146+ (o .:? "deploymentUri")
147+ <*> (o .:? "description")
148+ <*> (o .:? "createTime")
149+ <*> (o .:? "isDefault"))
150+
151+instance ToJSON GoogleCloudMlV1beta1__Version where
152+ toJSON GoogleCloudMlV1beta1__Version'{..}
153+ = object
154+ (catMaybes
155+ [("lastUseTime" .=) <$> _gcmvvLastUseTime,
156+ ("name" .=) <$> _gcmvvName,
157+ ("deploymentUri" .=) <$> _gcmvvDeploymentURI,
158+ ("description" .=) <$> _gcmvvDescription,
159+ ("createTime" .=) <$> _gcmvvCreateTime,
160+ ("isDefault" .=) <$> _gcmvvIsDefault])
161+
162+-- | Represents a set of hyperparameters to optimize.
163+--
164+-- /See:/ 'googleCloudMlV1beta1__HyperparameterSpec' smart constructor.
165+data GoogleCloudMlV1beta1__HyperparameterSpec = GoogleCloudMlV1beta1__HyperparameterSpec'
166+ { _gcmvhsParams :: !(Maybe [GoogleCloudMlV1beta1__ParameterSpec])
167+ , _gcmvhsGoal :: !(Maybe GoogleCloudMlV1beta1__HyperparameterSpecGoal)
168+ , _gcmvhsMaxTrials :: !(Maybe (Textual Int32))
169+ , _gcmvhsMaxParallelTrials :: !(Maybe (Textual Int32))
170+ } deriving (Eq,Show,Data,Typeable,Generic)
171+
172+-- | Creates a value of 'GoogleCloudMlV1beta1__HyperparameterSpec' with the minimum fields required to make a request.
173+--
174+-- Use one of the following lenses to modify other fields as desired:
175+--
176+-- * 'gcmvhsParams'
177+--
178+-- * 'gcmvhsGoal'
179+--
180+-- * 'gcmvhsMaxTrials'
181+--
182+-- * 'gcmvhsMaxParallelTrials'
183+googleCloudMlV1beta1__HyperparameterSpec
184+ :: GoogleCloudMlV1beta1__HyperparameterSpec
185+googleCloudMlV1beta1__HyperparameterSpec =
186+ GoogleCloudMlV1beta1__HyperparameterSpec'
187+ { _gcmvhsParams = Nothing
188+ , _gcmvhsGoal = Nothing
189+ , _gcmvhsMaxTrials = Nothing
190+ , _gcmvhsMaxParallelTrials = Nothing
191+ }
192+
193+-- | Required. The set of parameters to tune.
194+gcmvhsParams :: Lens' GoogleCloudMlV1beta1__HyperparameterSpec [GoogleCloudMlV1beta1__ParameterSpec]
195+gcmvhsParams
196+ = lens _gcmvhsParams (\ s a -> s{_gcmvhsParams = a})
197+ . _Default
198+ . _Coerce
199+
200+-- | Required. The type of goal to use for tuning. Available types are
201+-- \`MAXIMIZE\` and \`MINIMIZE\`. Defaults to \`MAXIMIZE\`.
202+gcmvhsGoal :: Lens' GoogleCloudMlV1beta1__HyperparameterSpec (Maybe GoogleCloudMlV1beta1__HyperparameterSpecGoal)
203+gcmvhsGoal
204+ = lens _gcmvhsGoal (\ s a -> s{_gcmvhsGoal = a})
205+
206+-- | Optional. How many training trials should be attempted to optimize the
207+-- specified hyperparameters. Defaults to one.
208+gcmvhsMaxTrials :: Lens' GoogleCloudMlV1beta1__HyperparameterSpec (Maybe Int32)
209+gcmvhsMaxTrials
210+ = lens _gcmvhsMaxTrials
211+ (\ s a -> s{_gcmvhsMaxTrials = a})
212+ . mapping _Coerce
213+
214+-- | Optional. The number of training trials to run concurrently. You can
215+-- reduce the time it takes to perform hyperparameter tuning by adding
216+-- trials in parallel. However, each trail only benefits from the
217+-- information gained in completed trials. That means that a trial does not
218+-- get access to the results of trials running at the same time, which
219+-- could reduce the quality of the overall optimization. Each trial will
220+-- use the same scale tier and machine types. Defaults to one.
221+gcmvhsMaxParallelTrials :: Lens' GoogleCloudMlV1beta1__HyperparameterSpec (Maybe Int32)
222+gcmvhsMaxParallelTrials
223+ = lens _gcmvhsMaxParallelTrials
224+ (\ s a -> s{_gcmvhsMaxParallelTrials = a})
225+ . mapping _Coerce
226+
227+instance FromJSON
228+ GoogleCloudMlV1beta1__HyperparameterSpec where
229+ parseJSON
230+ = withObject "GoogleCloudMlV1beta1HyperparameterSpec"
231+ (\ o ->
232+ GoogleCloudMlV1beta1__HyperparameterSpec' <$>
233+ (o .:? "params" .!= mempty) <*> (o .:? "goal") <*>
234+ (o .:? "maxTrials")
235+ <*> (o .:? "maxParallelTrials"))
236+
237+instance ToJSON
238+ GoogleCloudMlV1beta1__HyperparameterSpec where
239+ toJSON GoogleCloudMlV1beta1__HyperparameterSpec'{..}
240+ = object
241+ (catMaybes
242+ [("params" .=) <$> _gcmvhsParams,
243+ ("goal" .=) <$> _gcmvhsGoal,
244+ ("maxTrials" .=) <$> _gcmvhsMaxTrials,
245+ ("maxParallelTrials" .=) <$>
246+ _gcmvhsMaxParallelTrials])
247+
248+-- | Returns service account information associated with a project.
249+--
250+-- /See:/ 'googleCloudMlV1beta1__GetConfigResponse' smart constructor.
251+data GoogleCloudMlV1beta1__GetConfigResponse = GoogleCloudMlV1beta1__GetConfigResponse'
252+ { _gcmvgcrServiceAccount :: !(Maybe Text)
253+ , _gcmvgcrServiceAccountProject :: !(Maybe (Textual Int64))
254+ } deriving (Eq,Show,Data,Typeable,Generic)
255+
256+-- | Creates a value of 'GoogleCloudMlV1beta1__GetConfigResponse' with the minimum fields required to make a request.
257+--
258+-- Use one of the following lenses to modify other fields as desired:
259+--
260+-- * 'gcmvgcrServiceAccount'
261+--
262+-- * 'gcmvgcrServiceAccountProject'
263+googleCloudMlV1beta1__GetConfigResponse
264+ :: GoogleCloudMlV1beta1__GetConfigResponse
265+googleCloudMlV1beta1__GetConfigResponse =
266+ GoogleCloudMlV1beta1__GetConfigResponse'
267+ { _gcmvgcrServiceAccount = Nothing
268+ , _gcmvgcrServiceAccountProject = Nothing
269+ }
270+
271+-- | The service account Cloud ML uses to access resources in the project.
272+gcmvgcrServiceAccount :: Lens' GoogleCloudMlV1beta1__GetConfigResponse (Maybe Text)
273+gcmvgcrServiceAccount
274+ = lens _gcmvgcrServiceAccount
275+ (\ s a -> s{_gcmvgcrServiceAccount = a})
276+
277+-- | The project number for \`service_account\`.
278+gcmvgcrServiceAccountProject :: Lens' GoogleCloudMlV1beta1__GetConfigResponse (Maybe Int64)
279+gcmvgcrServiceAccountProject
280+ = lens _gcmvgcrServiceAccountProject
281+ (\ s a -> s{_gcmvgcrServiceAccountProject = a})
282+ . mapping _Coerce
283+
284+instance FromJSON
285+ GoogleCloudMlV1beta1__GetConfigResponse where
286+ parseJSON
287+ = withObject "GoogleCloudMlV1beta1GetConfigResponse"
288+ (\ o ->
289+ GoogleCloudMlV1beta1__GetConfigResponse' <$>
290+ (o .:? "serviceAccount") <*>
291+ (o .:? "serviceAccountProject"))
292+
293+instance ToJSON
294+ GoogleCloudMlV1beta1__GetConfigResponse where
295+ toJSON GoogleCloudMlV1beta1__GetConfigResponse'{..}
296+ = object
297+ (catMaybes
298+ [("serviceAccount" .=) <$> _gcmvgcrServiceAccount,
299+ ("serviceAccountProject" .=) <$>
300+ _gcmvgcrServiceAccountProject])
301+
302+-- | Represents a training or prediction job.
303+--
304+-- /See:/ 'googleCloudMlV1beta1__Job' smart constructor.
305+data GoogleCloudMlV1beta1__Job = GoogleCloudMlV1beta1__Job'
306+ { _gcmvjState :: !(Maybe GoogleCloudMlV1beta1__JobState)
307+ , _gcmvjTrainingOutput :: !(Maybe GoogleCloudMlV1beta1__TrainingOutput)
308+ , _gcmvjJobId :: !(Maybe Text)
309+ , _gcmvjStartTime :: !(Maybe DateTime')
310+ , _gcmvjPredictionInput :: !(Maybe GoogleCloudMlV1beta1__PredictionInput)
311+ , _gcmvjEndTime :: !(Maybe DateTime')
312+ , _gcmvjPredictionOutput :: !(Maybe GoogleCloudMlV1beta1__PredictionOutput)
313+ , _gcmvjErrorMessage :: !(Maybe Text)
314+ , _gcmvjTrainingInput :: !(Maybe GoogleCloudMlV1beta1__TrainingInput)
315+ , _gcmvjCreateTime :: !(Maybe DateTime')
316+ } deriving (Eq,Show,Data,Typeable,Generic)
317+
318+-- | Creates a value of 'GoogleCloudMlV1beta1__Job' with the minimum fields required to make a request.
319+--
320+-- Use one of the following lenses to modify other fields as desired:
321+--
322+-- * 'gcmvjState'
323+--
324+-- * 'gcmvjTrainingOutput'
325+--
326+-- * 'gcmvjJobId'
327+--
328+-- * 'gcmvjStartTime'
329+--
330+-- * 'gcmvjPredictionInput'
331+--
332+-- * 'gcmvjEndTime'
333+--
334+-- * 'gcmvjPredictionOutput'
335+--
336+-- * 'gcmvjErrorMessage'
337+--
338+-- * 'gcmvjTrainingInput'
339+--
340+-- * 'gcmvjCreateTime'
341+googleCloudMlV1beta1__Job
342+ :: GoogleCloudMlV1beta1__Job
343+googleCloudMlV1beta1__Job =
344+ GoogleCloudMlV1beta1__Job'
345+ { _gcmvjState = Nothing
346+ , _gcmvjTrainingOutput = Nothing
347+ , _gcmvjJobId = Nothing
348+ , _gcmvjStartTime = Nothing
349+ , _gcmvjPredictionInput = Nothing
350+ , _gcmvjEndTime = Nothing
351+ , _gcmvjPredictionOutput = Nothing
352+ , _gcmvjErrorMessage = Nothing
353+ , _gcmvjTrainingInput = Nothing
354+ , _gcmvjCreateTime = Nothing
355+ }
356+
357+-- | Output only. The detailed state of a job.
358+gcmvjState :: Lens' GoogleCloudMlV1beta1__Job (Maybe GoogleCloudMlV1beta1__JobState)
359+gcmvjState
360+ = lens _gcmvjState (\ s a -> s{_gcmvjState = a})
361+
362+-- | The current training job result.
363+gcmvjTrainingOutput :: Lens' GoogleCloudMlV1beta1__Job (Maybe GoogleCloudMlV1beta1__TrainingOutput)
364+gcmvjTrainingOutput
365+ = lens _gcmvjTrainingOutput
366+ (\ s a -> s{_gcmvjTrainingOutput = a})
367+
368+-- | Required. The user-specified id of the job.
369+gcmvjJobId :: Lens' GoogleCloudMlV1beta1__Job (Maybe Text)
370+gcmvjJobId
371+ = lens _gcmvjJobId (\ s a -> s{_gcmvjJobId = a})
372+
373+-- | Output only. When the job processing was started.
374+gcmvjStartTime :: Lens' GoogleCloudMlV1beta1__Job (Maybe UTCTime)
375+gcmvjStartTime
376+ = lens _gcmvjStartTime
377+ (\ s a -> s{_gcmvjStartTime = a})
378+ . mapping _DateTime
379+
380+-- | Input parameters to create a prediction job.
381+gcmvjPredictionInput :: Lens' GoogleCloudMlV1beta1__Job (Maybe GoogleCloudMlV1beta1__PredictionInput)
382+gcmvjPredictionInput
383+ = lens _gcmvjPredictionInput
384+ (\ s a -> s{_gcmvjPredictionInput = a})
385+
386+-- | Output only. When the job processing was completed.
387+gcmvjEndTime :: Lens' GoogleCloudMlV1beta1__Job (Maybe UTCTime)
388+gcmvjEndTime
389+ = lens _gcmvjEndTime (\ s a -> s{_gcmvjEndTime = a})
390+ . mapping _DateTime
391+
392+-- | The current prediction job result.
393+gcmvjPredictionOutput :: Lens' GoogleCloudMlV1beta1__Job (Maybe GoogleCloudMlV1beta1__PredictionOutput)
394+gcmvjPredictionOutput
395+ = lens _gcmvjPredictionOutput
396+ (\ s a -> s{_gcmvjPredictionOutput = a})
397+
398+-- | Output only. The details of a failure or a cancellation.
399+gcmvjErrorMessage :: Lens' GoogleCloudMlV1beta1__Job (Maybe Text)
400+gcmvjErrorMessage
401+ = lens _gcmvjErrorMessage
402+ (\ s a -> s{_gcmvjErrorMessage = a})
403+
404+-- | Input parameters to create a training job.
405+gcmvjTrainingInput :: Lens' GoogleCloudMlV1beta1__Job (Maybe GoogleCloudMlV1beta1__TrainingInput)
406+gcmvjTrainingInput
407+ = lens _gcmvjTrainingInput
408+ (\ s a -> s{_gcmvjTrainingInput = a})
409+
410+-- | Output only. When the job was created.
411+gcmvjCreateTime :: Lens' GoogleCloudMlV1beta1__Job (Maybe UTCTime)
412+gcmvjCreateTime
413+ = lens _gcmvjCreateTime
414+ (\ s a -> s{_gcmvjCreateTime = a})
415+ . mapping _DateTime
416+
417+instance FromJSON GoogleCloudMlV1beta1__Job where
418+ parseJSON
419+ = withObject "GoogleCloudMlV1beta1Job"
420+ (\ o ->
421+ GoogleCloudMlV1beta1__Job' <$>
422+ (o .:? "state") <*> (o .:? "trainingOutput") <*>
423+ (o .:? "jobId")
424+ <*> (o .:? "startTime")
425+ <*> (o .:? "predictionInput")
426+ <*> (o .:? "endTime")
427+ <*> (o .:? "predictionOutput")
428+ <*> (o .:? "errorMessage")
429+ <*> (o .:? "trainingInput")
430+ <*> (o .:? "createTime"))
431+
432+instance ToJSON GoogleCloudMlV1beta1__Job where
433+ toJSON GoogleCloudMlV1beta1__Job'{..}
434+ = object
435+ (catMaybes
436+ [("state" .=) <$> _gcmvjState,
437+ ("trainingOutput" .=) <$> _gcmvjTrainingOutput,
438+ ("jobId" .=) <$> _gcmvjJobId,
439+ ("startTime" .=) <$> _gcmvjStartTime,
440+ ("predictionInput" .=) <$> _gcmvjPredictionInput,
441+ ("endTime" .=) <$> _gcmvjEndTime,
442+ ("predictionOutput" .=) <$> _gcmvjPredictionOutput,
443+ ("errorMessage" .=) <$> _gcmvjErrorMessage,
444+ ("trainingInput" .=) <$> _gcmvjTrainingInput,
445+ ("createTime" .=) <$> _gcmvjCreateTime])
446+
447+-- | Represents results of a training job.
448+--
449+-- /See:/ 'googleCloudMlV1beta1__TrainingOutput' smart constructor.
450+data GoogleCloudMlV1beta1__TrainingOutput = GoogleCloudMlV1beta1__TrainingOutput'
451+ { _gcmvtoCompletedTrialCount :: !(Maybe (Textual Int64))
452+ , _gcmvtoTrials :: !(Maybe [GoogleCloudMlV1beta1__HyperparameterOutput])
453+ } deriving (Eq,Show,Data,Typeable,Generic)
454+
455+-- | Creates a value of 'GoogleCloudMlV1beta1__TrainingOutput' with the minimum fields required to make a request.
456+--
457+-- Use one of the following lenses to modify other fields as desired:
458+--
459+-- * 'gcmvtoCompletedTrialCount'
460+--
461+-- * 'gcmvtoTrials'
462+googleCloudMlV1beta1__TrainingOutput
463+ :: GoogleCloudMlV1beta1__TrainingOutput
464+googleCloudMlV1beta1__TrainingOutput =
465+ GoogleCloudMlV1beta1__TrainingOutput'
466+ { _gcmvtoCompletedTrialCount = Nothing
467+ , _gcmvtoTrials = Nothing
468+ }
469+
470+-- | The number of hyperparameter tuning trials that completed successfully.
471+gcmvtoCompletedTrialCount :: Lens' GoogleCloudMlV1beta1__TrainingOutput (Maybe Int64)
472+gcmvtoCompletedTrialCount
473+ = lens _gcmvtoCompletedTrialCount
474+ (\ s a -> s{_gcmvtoCompletedTrialCount = a})
475+ . mapping _Coerce
476+
477+-- | Results for individual Hyperparameter trials.
478+gcmvtoTrials :: Lens' GoogleCloudMlV1beta1__TrainingOutput [GoogleCloudMlV1beta1__HyperparameterOutput]
479+gcmvtoTrials
480+ = lens _gcmvtoTrials (\ s a -> s{_gcmvtoTrials = a})
481+ . _Default
482+ . _Coerce
483+
484+instance FromJSON
485+ GoogleCloudMlV1beta1__TrainingOutput where
486+ parseJSON
487+ = withObject "GoogleCloudMlV1beta1TrainingOutput"
488+ (\ o ->
489+ GoogleCloudMlV1beta1__TrainingOutput' <$>
490+ (o .:? "completedTrialCount") <*>
491+ (o .:? "trials" .!= mempty))
492+
493+instance ToJSON GoogleCloudMlV1beta1__TrainingOutput
494+ where
495+ toJSON GoogleCloudMlV1beta1__TrainingOutput'{..}
496+ = object
497+ (catMaybes
498+ [("completedTrialCount" .=) <$>
499+ _gcmvtoCompletedTrialCount,
500+ ("trials" .=) <$> _gcmvtoTrials])
501+
502+-- | Represents a machine learning solution. A model can have multiple
503+-- versions, each of which is a deployed, trained model ready to receive
504+-- prediction requests. The model itself is just a container.
505+--
506+-- /See:/ 'googleCloudMlV1beta1__Model' smart constructor.
507+data GoogleCloudMlV1beta1__Model = GoogleCloudMlV1beta1__Model'
508+ { _gcmvmDefaultVersion :: !(Maybe GoogleCloudMlV1beta1__Version)
509+ , _gcmvmName :: !(Maybe Text)
510+ , _gcmvmDescription :: !(Maybe Text)
511+ } deriving (Eq,Show,Data,Typeable,Generic)
512+
513+-- | Creates a value of 'GoogleCloudMlV1beta1__Model' with the minimum fields required to make a request.
514+--
515+-- Use one of the following lenses to modify other fields as desired:
516+--
517+-- * 'gcmvmDefaultVersion'
518+--
519+-- * 'gcmvmName'
520+--
521+-- * 'gcmvmDescription'
522+googleCloudMlV1beta1__Model
523+ :: GoogleCloudMlV1beta1__Model
524+googleCloudMlV1beta1__Model =
525+ GoogleCloudMlV1beta1__Model'
526+ { _gcmvmDefaultVersion = Nothing
527+ , _gcmvmName = Nothing
528+ , _gcmvmDescription = Nothing
529+ }
530+
531+-- | Output only. The default version of the model. This version will be used
532+-- to handle prediction requests that do not specify a version. You can
533+-- change the default version by calling
534+-- [projects.methods.versions.setDefault](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/setDefault).
535+gcmvmDefaultVersion :: Lens' GoogleCloudMlV1beta1__Model (Maybe GoogleCloudMlV1beta1__Version)
536+gcmvmDefaultVersion
537+ = lens _gcmvmDefaultVersion
538+ (\ s a -> s{_gcmvmDefaultVersion = a})
539+
540+-- | Required. The name specified for the model when it was created. The
541+-- model name must be unique within the project it is created in.
542+gcmvmName :: Lens' GoogleCloudMlV1beta1__Model (Maybe Text)
543+gcmvmName
544+ = lens _gcmvmName (\ s a -> s{_gcmvmName = a})
545+
546+-- | Optional. The description specified for the model when it was created.
547+gcmvmDescription :: Lens' GoogleCloudMlV1beta1__Model (Maybe Text)
548+gcmvmDescription
549+ = lens _gcmvmDescription
550+ (\ s a -> s{_gcmvmDescription = a})
551+
552+instance FromJSON GoogleCloudMlV1beta1__Model where
553+ parseJSON
554+ = withObject "GoogleCloudMlV1beta1Model"
555+ (\ o ->
556+ GoogleCloudMlV1beta1__Model' <$>
557+ (o .:? "defaultVersion") <*> (o .:? "name") <*>
558+ (o .:? "description"))
559+
560+instance ToJSON GoogleCloudMlV1beta1__Model where
561+ toJSON GoogleCloudMlV1beta1__Model'{..}
562+ = object
563+ (catMaybes
564+ [("defaultVersion" .=) <$> _gcmvmDefaultVersion,
565+ ("name" .=) <$> _gcmvmName,
566+ ("description" .=) <$> _gcmvmDescription])
567+
568+-- | The normal response of the operation in case of success. If the original
569+-- method returns no data on success, such as \`Delete\`, the response is
570+-- \`google.protobuf.Empty\`. If the original method is standard
571+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
572+-- For other methods, the response should have the type \`XxxResponse\`,
573+-- where \`Xxx\` is the original method name. For example, if the original
574+-- method name is \`TakeSnapshot()\`, the inferred response type is
575+-- \`TakeSnapshotResponse\`.
576+--
577+-- /See:/ 'googleLongrunning__OperationResponse' smart constructor.
578+newtype GoogleLongrunning__OperationResponse = GoogleLongrunning__OperationResponse'
579+ { _glorAddtional :: HashMap Text JSONValue
580+ } deriving (Eq,Show,Data,Typeable,Generic)
581+
582+-- | Creates a value of 'GoogleLongrunning__OperationResponse' with the minimum fields required to make a request.
583+--
584+-- Use one of the following lenses to modify other fields as desired:
585+--
586+-- * 'glorAddtional'
587+googleLongrunning__OperationResponse
588+ :: HashMap Text JSONValue -- ^ 'glorAddtional'
589+ -> GoogleLongrunning__OperationResponse
590+googleLongrunning__OperationResponse pGlorAddtional_ =
591+ GoogleLongrunning__OperationResponse'
592+ { _glorAddtional = _Coerce # pGlorAddtional_
593+ }
594+
595+-- | Properties of the object. Contains field \'type with type URL.
596+glorAddtional :: Lens' GoogleLongrunning__OperationResponse (HashMap Text JSONValue)
597+glorAddtional
598+ = lens _glorAddtional
599+ (\ s a -> s{_glorAddtional = a})
600+ . _Coerce
601+
602+instance FromJSON
603+ GoogleLongrunning__OperationResponse where
604+ parseJSON
605+ = withObject "GoogleLongrunningOperationResponse"
606+ (\ o ->
607+ GoogleLongrunning__OperationResponse' <$>
608+ (parseJSONObject o))
609+
610+instance ToJSON GoogleLongrunning__OperationResponse
611+ where
612+ toJSON = toJSON . _glorAddtional
613+
614+-- | Represents the metadata of the long-running operation.
615+--
616+-- /See:/ 'googleCloudMlV1beta1__OperationMetadata' smart constructor.
617+data GoogleCloudMlV1beta1__OperationMetadata = GoogleCloudMlV1beta1__OperationMetadata'
618+ { _gcmvomStartTime :: !(Maybe DateTime')
619+ , _gcmvomModelName :: !(Maybe Text)
620+ , _gcmvomVersion :: !(Maybe GoogleCloudMlV1beta1__Version)
621+ , _gcmvomEndTime :: !(Maybe DateTime')
622+ , _gcmvomIsCancellationRequested :: !(Maybe Bool)
623+ , _gcmvomOperationType :: !(Maybe GoogleCloudMlV1beta1__OperationMetadataOperationType)
624+ , _gcmvomCreateTime :: !(Maybe DateTime')
625+ } deriving (Eq,Show,Data,Typeable,Generic)
626+
627+-- | Creates a value of 'GoogleCloudMlV1beta1__OperationMetadata' with the minimum fields required to make a request.
628+--
629+-- Use one of the following lenses to modify other fields as desired:
630+--
631+-- * 'gcmvomStartTime'
632+--
633+-- * 'gcmvomModelName'
634+--
635+-- * 'gcmvomVersion'
636+--
637+-- * 'gcmvomEndTime'
638+--
639+-- * 'gcmvomIsCancellationRequested'
640+--
641+-- * 'gcmvomOperationType'
642+--
643+-- * 'gcmvomCreateTime'
644+googleCloudMlV1beta1__OperationMetadata
645+ :: GoogleCloudMlV1beta1__OperationMetadata
646+googleCloudMlV1beta1__OperationMetadata =
647+ GoogleCloudMlV1beta1__OperationMetadata'
648+ { _gcmvomStartTime = Nothing
649+ , _gcmvomModelName = Nothing
650+ , _gcmvomVersion = Nothing
651+ , _gcmvomEndTime = Nothing
652+ , _gcmvomIsCancellationRequested = Nothing
653+ , _gcmvomOperationType = Nothing
654+ , _gcmvomCreateTime = Nothing
655+ }
656+
657+-- | The time operation processing started.
658+gcmvomStartTime :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe UTCTime)
659+gcmvomStartTime
660+ = lens _gcmvomStartTime
661+ (\ s a -> s{_gcmvomStartTime = a})
662+ . mapping _DateTime
663+
664+-- | Contains the name of the model associated with the operation.
665+gcmvomModelName :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe Text)
666+gcmvomModelName
667+ = lens _gcmvomModelName
668+ (\ s a -> s{_gcmvomModelName = a})
669+
670+-- | Contains the version associated with the operation.
671+gcmvomVersion :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe GoogleCloudMlV1beta1__Version)
672+gcmvomVersion
673+ = lens _gcmvomVersion
674+ (\ s a -> s{_gcmvomVersion = a})
675+
676+-- | The time operation processing completed.
677+gcmvomEndTime :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe UTCTime)
678+gcmvomEndTime
679+ = lens _gcmvomEndTime
680+ (\ s a -> s{_gcmvomEndTime = a})
681+ . mapping _DateTime
682+
683+-- | Indicates whether a request to cancel this operation has been made.
684+gcmvomIsCancellationRequested :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe Bool)
685+gcmvomIsCancellationRequested
686+ = lens _gcmvomIsCancellationRequested
687+ (\ s a -> s{_gcmvomIsCancellationRequested = a})
688+
689+-- | The operation type.
690+gcmvomOperationType :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe GoogleCloudMlV1beta1__OperationMetadataOperationType)
691+gcmvomOperationType
692+ = lens _gcmvomOperationType
693+ (\ s a -> s{_gcmvomOperationType = a})
694+
695+-- | The time the operation was submitted.
696+gcmvomCreateTime :: Lens' GoogleCloudMlV1beta1__OperationMetadata (Maybe UTCTime)
697+gcmvomCreateTime
698+ = lens _gcmvomCreateTime
699+ (\ s a -> s{_gcmvomCreateTime = a})
700+ . mapping _DateTime
701+
702+instance FromJSON
703+ GoogleCloudMlV1beta1__OperationMetadata where
704+ parseJSON
705+ = withObject "GoogleCloudMlV1beta1OperationMetadata"
706+ (\ o ->
707+ GoogleCloudMlV1beta1__OperationMetadata' <$>
708+ (o .:? "startTime") <*> (o .:? "modelName") <*>
709+ (o .:? "version")
710+ <*> (o .:? "endTime")
711+ <*> (o .:? "isCancellationRequested")
712+ <*> (o .:? "operationType")
713+ <*> (o .:? "createTime"))
714+
715+instance ToJSON
716+ GoogleCloudMlV1beta1__OperationMetadata where
717+ toJSON GoogleCloudMlV1beta1__OperationMetadata'{..}
718+ = object
719+ (catMaybes
720+ [("startTime" .=) <$> _gcmvomStartTime,
721+ ("modelName" .=) <$> _gcmvomModelName,
722+ ("version" .=) <$> _gcmvomVersion,
723+ ("endTime" .=) <$> _gcmvomEndTime,
724+ ("isCancellationRequested" .=) <$>
725+ _gcmvomIsCancellationRequested,
726+ ("operationType" .=) <$> _gcmvomOperationType,
727+ ("createTime" .=) <$> _gcmvomCreateTime])
728+
729+-- | Represents the result of a single hyperparameter tuning trial from a
730+-- training job. The TrainingOutput object that is returned on successful
731+-- completion of a training job with hyperparameter tuning includes a list
732+-- of HyperparameterOutput objects, one for each successful trial.
733+--
734+-- /See:/ 'googleCloudMlV1beta1__HyperparameterOutput' smart constructor.
735+data GoogleCloudMlV1beta1__HyperparameterOutput = GoogleCloudMlV1beta1__HyperparameterOutput'
736+ { _gcmvhoAllMetrics :: !(Maybe [GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric])
737+ , _gcmvhoHyperparameters :: !(Maybe GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters)
738+ , _gcmvhoTrialId :: !(Maybe Text)
739+ , _gcmvhoFinalMetric :: !(Maybe GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric)
740+ } deriving (Eq,Show,Data,Typeable,Generic)
741+
742+-- | Creates a value of 'GoogleCloudMlV1beta1__HyperparameterOutput' with the minimum fields required to make a request.
743+--
744+-- Use one of the following lenses to modify other fields as desired:
745+--
746+-- * 'gcmvhoAllMetrics'
747+--
748+-- * 'gcmvhoHyperparameters'
749+--
750+-- * 'gcmvhoTrialId'
751+--
752+-- * 'gcmvhoFinalMetric'
753+googleCloudMlV1beta1__HyperparameterOutput
754+ :: GoogleCloudMlV1beta1__HyperparameterOutput
755+googleCloudMlV1beta1__HyperparameterOutput =
756+ GoogleCloudMlV1beta1__HyperparameterOutput'
757+ { _gcmvhoAllMetrics = Nothing
758+ , _gcmvhoHyperparameters = Nothing
759+ , _gcmvhoTrialId = Nothing
760+ , _gcmvhoFinalMetric = Nothing
761+ }
762+
763+-- | All recorded object metrics for this trial.
764+gcmvhoAllMetrics :: Lens' GoogleCloudMlV1beta1__HyperparameterOutput [GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric]
765+gcmvhoAllMetrics
766+ = lens _gcmvhoAllMetrics
767+ (\ s a -> s{_gcmvhoAllMetrics = a})
768+ . _Default
769+ . _Coerce
770+
771+-- | The hyperparameters given to this trial.
772+gcmvhoHyperparameters :: Lens' GoogleCloudMlV1beta1__HyperparameterOutput (Maybe GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters)
773+gcmvhoHyperparameters
774+ = lens _gcmvhoHyperparameters
775+ (\ s a -> s{_gcmvhoHyperparameters = a})
776+
777+-- | The trial id for these results.
778+gcmvhoTrialId :: Lens' GoogleCloudMlV1beta1__HyperparameterOutput (Maybe Text)
779+gcmvhoTrialId
780+ = lens _gcmvhoTrialId
781+ (\ s a -> s{_gcmvhoTrialId = a})
782+
783+-- | The final objective metric seen for this trial.
784+gcmvhoFinalMetric :: Lens' GoogleCloudMlV1beta1__HyperparameterOutput (Maybe GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric)
785+gcmvhoFinalMetric
786+ = lens _gcmvhoFinalMetric
787+ (\ s a -> s{_gcmvhoFinalMetric = a})
788+
789+instance FromJSON
790+ GoogleCloudMlV1beta1__HyperparameterOutput where
791+ parseJSON
792+ = withObject
793+ "GoogleCloudMlV1beta1HyperparameterOutput"
794+ (\ o ->
795+ GoogleCloudMlV1beta1__HyperparameterOutput' <$>
796+ (o .:? "allMetrics" .!= mempty) <*>
797+ (o .:? "hyperparameters")
798+ <*> (o .:? "trialId")
799+ <*> (o .:? "finalMetric"))
800+
801+instance ToJSON
802+ GoogleCloudMlV1beta1__HyperparameterOutput where
803+ toJSON
804+ GoogleCloudMlV1beta1__HyperparameterOutput'{..}
805+ = object
806+ (catMaybes
807+ [("allMetrics" .=) <$> _gcmvhoAllMetrics,
808+ ("hyperparameters" .=) <$> _gcmvhoHyperparameters,
809+ ("trialId" .=) <$> _gcmvhoTrialId,
810+ ("finalMetric" .=) <$> _gcmvhoFinalMetric])
811+
812+-- | Response message for the ListVersions method.
813+--
814+-- /See:/ 'googleCloudMlV1beta1__ListVersionsResponse' smart constructor.
815+data GoogleCloudMlV1beta1__ListVersionsResponse = GoogleCloudMlV1beta1__ListVersionsResponse'
816+ { _gcmvlvrNextPageToken :: !(Maybe Text)
817+ , _gcmvlvrVersions :: !(Maybe [GoogleCloudMlV1beta1__Version])
818+ } deriving (Eq,Show,Data,Typeable,Generic)
819+
820+-- | Creates a value of 'GoogleCloudMlV1beta1__ListVersionsResponse' with the minimum fields required to make a request.
821+--
822+-- Use one of the following lenses to modify other fields as desired:
823+--
824+-- * 'gcmvlvrNextPageToken'
825+--
826+-- * 'gcmvlvrVersions'
827+googleCloudMlV1beta1__ListVersionsResponse
828+ :: GoogleCloudMlV1beta1__ListVersionsResponse
829+googleCloudMlV1beta1__ListVersionsResponse =
830+ GoogleCloudMlV1beta1__ListVersionsResponse'
831+ { _gcmvlvrNextPageToken = Nothing
832+ , _gcmvlvrVersions = Nothing
833+ }
834+
835+-- | Optional. Pass this token as the \`page_token\` field of the request for
836+-- a subsequent call.
837+gcmvlvrNextPageToken :: Lens' GoogleCloudMlV1beta1__ListVersionsResponse (Maybe Text)
838+gcmvlvrNextPageToken
839+ = lens _gcmvlvrNextPageToken
840+ (\ s a -> s{_gcmvlvrNextPageToken = a})
841+
842+-- | The list of versions.
843+gcmvlvrVersions :: Lens' GoogleCloudMlV1beta1__ListVersionsResponse [GoogleCloudMlV1beta1__Version]
844+gcmvlvrVersions
845+ = lens _gcmvlvrVersions
846+ (\ s a -> s{_gcmvlvrVersions = a})
847+ . _Default
848+ . _Coerce
849+
850+instance FromJSON
851+ GoogleCloudMlV1beta1__ListVersionsResponse where
852+ parseJSON
853+ = withObject
854+ "GoogleCloudMlV1beta1ListVersionsResponse"
855+ (\ o ->
856+ GoogleCloudMlV1beta1__ListVersionsResponse' <$>
857+ (o .:? "nextPageToken") <*>
858+ (o .:? "versions" .!= mempty))
859+
860+instance ToJSON
861+ GoogleCloudMlV1beta1__ListVersionsResponse where
862+ toJSON
863+ GoogleCloudMlV1beta1__ListVersionsResponse'{..}
864+ = object
865+ (catMaybes
866+ [("nextPageToken" .=) <$> _gcmvlvrNextPageToken,
867+ ("versions" .=) <$> _gcmvlvrVersions])
868+
869+-- | The response message for Operations.ListOperations.
870+--
871+-- /See:/ 'googleLongrunning__ListOperationsResponse' smart constructor.
872+data GoogleLongrunning__ListOperationsResponse = GoogleLongrunning__ListOperationsResponse'
873+ { _gllorNextPageToken :: !(Maybe Text)
874+ , _gllorOperations :: !(Maybe [GoogleLongrunning__Operation])
875+ } deriving (Eq,Show,Data,Typeable,Generic)
876+
877+-- | Creates a value of 'GoogleLongrunning__ListOperationsResponse' with the minimum fields required to make a request.
878+--
879+-- Use one of the following lenses to modify other fields as desired:
880+--
881+-- * 'gllorNextPageToken'
882+--
883+-- * 'gllorOperations'
884+googleLongrunning__ListOperationsResponse
885+ :: GoogleLongrunning__ListOperationsResponse
886+googleLongrunning__ListOperationsResponse =
887+ GoogleLongrunning__ListOperationsResponse'
888+ { _gllorNextPageToken = Nothing
889+ , _gllorOperations = Nothing
890+ }
891+
892+-- | The standard List next-page token.
893+gllorNextPageToken :: Lens' GoogleLongrunning__ListOperationsResponse (Maybe Text)
894+gllorNextPageToken
895+ = lens _gllorNextPageToken
896+ (\ s a -> s{_gllorNextPageToken = a})
897+
898+-- | A list of operations that matches the specified filter in the request.
899+gllorOperations :: Lens' GoogleLongrunning__ListOperationsResponse [GoogleLongrunning__Operation]
900+gllorOperations
901+ = lens _gllorOperations
902+ (\ s a -> s{_gllorOperations = a})
903+ . _Default
904+ . _Coerce
905+
906+instance FromJSON
907+ GoogleLongrunning__ListOperationsResponse where
908+ parseJSON
909+ = withObject
910+ "GoogleLongrunningListOperationsResponse"
911+ (\ o ->
912+ GoogleLongrunning__ListOperationsResponse' <$>
913+ (o .:? "nextPageToken") <*>
914+ (o .:? "operations" .!= mempty))
915+
916+instance ToJSON
917+ GoogleLongrunning__ListOperationsResponse where
918+ toJSON GoogleLongrunning__ListOperationsResponse'{..}
919+ = object
920+ (catMaybes
921+ [("nextPageToken" .=) <$> _gllorNextPageToken,
922+ ("operations" .=) <$> _gllorOperations])
923+
924+-- | Represents input parameters for a prediction job.
925+--
926+-- /See:/ 'googleCloudMlV1beta1__PredictionInput' smart constructor.
927+data GoogleCloudMlV1beta1__PredictionInput = GoogleCloudMlV1beta1__PredictionInput'
928+ { _gcmvpiVersionName :: !(Maybe Text)
929+ , _gcmvpiModelName :: !(Maybe Text)
930+ , _gcmvpiDataFormat :: !(Maybe GoogleCloudMlV1beta1__PredictionInputDataFormat)
931+ , _gcmvpiMaxWorkerCount :: !(Maybe (Textual Int64))
932+ , _gcmvpiOutputPath :: !(Maybe Text)
933+ , _gcmvpiRegion :: !(Maybe Text)
934+ , _gcmvpiInputPaths :: !(Maybe [Text])
935+ } deriving (Eq,Show,Data,Typeable,Generic)
936+
937+-- | Creates a value of 'GoogleCloudMlV1beta1__PredictionInput' with the minimum fields required to make a request.
938+--
939+-- Use one of the following lenses to modify other fields as desired:
940+--
941+-- * 'gcmvpiVersionName'
942+--
943+-- * 'gcmvpiModelName'
944+--
945+-- * 'gcmvpiDataFormat'
946+--
947+-- * 'gcmvpiMaxWorkerCount'
948+--
949+-- * 'gcmvpiOutputPath'
950+--
951+-- * 'gcmvpiRegion'
952+--
953+-- * 'gcmvpiInputPaths'
954+googleCloudMlV1beta1__PredictionInput
955+ :: GoogleCloudMlV1beta1__PredictionInput
956+googleCloudMlV1beta1__PredictionInput =
957+ GoogleCloudMlV1beta1__PredictionInput'
958+ { _gcmvpiVersionName = Nothing
959+ , _gcmvpiModelName = Nothing
960+ , _gcmvpiDataFormat = Nothing
961+ , _gcmvpiMaxWorkerCount = Nothing
962+ , _gcmvpiOutputPath = Nothing
963+ , _gcmvpiRegion = Nothing
964+ , _gcmvpiInputPaths = Nothing
965+ }
966+
967+-- | Use this field if you want to specify a version of the model to use. The
968+-- string is formatted the same way as \`model_version\`, with the addition
969+-- of the version information:
970+-- \`\"projects\/[YOUR_PROJECT]\/models\/YOUR_MODEL\/versions\/[YOUR_VERSION]\"\`
971+gcmvpiVersionName :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe Text)
972+gcmvpiVersionName
973+ = lens _gcmvpiVersionName
974+ (\ s a -> s{_gcmvpiVersionName = a})
975+
976+-- | Use this field if you want to use the default version for the specified
977+-- model. The string must use the following format:
978+-- \`\"projects\/[YOUR_PROJECT]\/models\/[YOUR_MODEL]\"\`
979+gcmvpiModelName :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe Text)
980+gcmvpiModelName
981+ = lens _gcmvpiModelName
982+ (\ s a -> s{_gcmvpiModelName = a})
983+
984+-- | Required. The format of the input data files.
985+gcmvpiDataFormat :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe GoogleCloudMlV1beta1__PredictionInputDataFormat)
986+gcmvpiDataFormat
987+ = lens _gcmvpiDataFormat
988+ (\ s a -> s{_gcmvpiDataFormat = a})
989+
990+-- | Optional. The maximum number of workers to be used for parallel
991+-- processing. Defaults to 10 if not specified.
992+gcmvpiMaxWorkerCount :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe Int64)
993+gcmvpiMaxWorkerCount
994+ = lens _gcmvpiMaxWorkerCount
995+ (\ s a -> s{_gcmvpiMaxWorkerCount = a})
996+ . mapping _Coerce
997+
998+-- | Required. The output Google Cloud Storage location.
999+gcmvpiOutputPath :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe Text)
1000+gcmvpiOutputPath
1001+ = lens _gcmvpiOutputPath
1002+ (\ s a -> s{_gcmvpiOutputPath = a})
1003+
1004+-- | Required. The Google Compute Engine region to run the prediction job in.
1005+gcmvpiRegion :: Lens' GoogleCloudMlV1beta1__PredictionInput (Maybe Text)
1006+gcmvpiRegion
1007+ = lens _gcmvpiRegion (\ s a -> s{_gcmvpiRegion = a})
1008+
1009+-- | Required. The Google Cloud Storage location of the input data files. May
1010+-- contain wildcards.
1011+gcmvpiInputPaths :: Lens' GoogleCloudMlV1beta1__PredictionInput [Text]
1012+gcmvpiInputPaths
1013+ = lens _gcmvpiInputPaths
1014+ (\ s a -> s{_gcmvpiInputPaths = a})
1015+ . _Default
1016+ . _Coerce
1017+
1018+instance FromJSON
1019+ GoogleCloudMlV1beta1__PredictionInput where
1020+ parseJSON
1021+ = withObject "GoogleCloudMlV1beta1PredictionInput"
1022+ (\ o ->
1023+ GoogleCloudMlV1beta1__PredictionInput' <$>
1024+ (o .:? "versionName") <*> (o .:? "modelName") <*>
1025+ (o .:? "dataFormat")
1026+ <*> (o .:? "maxWorkerCount")
1027+ <*> (o .:? "outputPath")
1028+ <*> (o .:? "region")
1029+ <*> (o .:? "inputPaths" .!= mempty))
1030+
1031+instance ToJSON GoogleCloudMlV1beta1__PredictionInput
1032+ where
1033+ toJSON GoogleCloudMlV1beta1__PredictionInput'{..}
1034+ = object
1035+ (catMaybes
1036+ [("versionName" .=) <$> _gcmvpiVersionName,
1037+ ("modelName" .=) <$> _gcmvpiModelName,
1038+ ("dataFormat" .=) <$> _gcmvpiDataFormat,
1039+ ("maxWorkerCount" .=) <$> _gcmvpiMaxWorkerCount,
1040+ ("outputPath" .=) <$> _gcmvpiOutputPath,
1041+ ("region" .=) <$> _gcmvpiRegion,
1042+ ("inputPaths" .=) <$> _gcmvpiInputPaths])
1043+
1044+-- | This resource represents a long-running operation that is the result of
1045+-- a network API call.
1046+--
1047+-- /See:/ 'googleLongrunning__Operation' smart constructor.
1048+data GoogleLongrunning__Operation = GoogleLongrunning__Operation'
1049+ { _gloDone :: !(Maybe Bool)
1050+ , _gloError :: !(Maybe GoogleRpc__Status)
1051+ , _gloResponse :: !(Maybe GoogleLongrunning__OperationResponse)
1052+ , _gloName :: !(Maybe Text)
1053+ , _gloMetadata :: !(Maybe GoogleLongrunning__OperationMetadata)
1054+ } deriving (Eq,Show,Data,Typeable,Generic)
1055+
1056+-- | Creates a value of 'GoogleLongrunning__Operation' with the minimum fields required to make a request.
1057+--
1058+-- Use one of the following lenses to modify other fields as desired:
1059+--
1060+-- * 'gloDone'
1061+--
1062+-- * 'gloError'
1063+--
1064+-- * 'gloResponse'
1065+--
1066+-- * 'gloName'
1067+--
1068+-- * 'gloMetadata'
1069+googleLongrunning__Operation
1070+ :: GoogleLongrunning__Operation
1071+googleLongrunning__Operation =
1072+ GoogleLongrunning__Operation'
1073+ { _gloDone = Nothing
1074+ , _gloError = Nothing
1075+ , _gloResponse = Nothing
1076+ , _gloName = Nothing
1077+ , _gloMetadata = Nothing
1078+ }
1079+
1080+-- | If the value is \`false\`, it means the operation is still in progress.
1081+-- If true, the operation is completed, and either \`error\` or
1082+-- \`response\` is available.
1083+gloDone :: Lens' GoogleLongrunning__Operation (Maybe Bool)
1084+gloDone = lens _gloDone (\ s a -> s{_gloDone = a})
1085+
1086+-- | The error result of the operation in case of failure or cancellation.
1087+gloError :: Lens' GoogleLongrunning__Operation (Maybe GoogleRpc__Status)
1088+gloError = lens _gloError (\ s a -> s{_gloError = a})
1089+
1090+-- | The normal response of the operation in case of success. If the original
1091+-- method returns no data on success, such as \`Delete\`, the response is
1092+-- \`google.protobuf.Empty\`. If the original method is standard
1093+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
1094+-- For other methods, the response should have the type \`XxxResponse\`,
1095+-- where \`Xxx\` is the original method name. For example, if the original
1096+-- method name is \`TakeSnapshot()\`, the inferred response type is
1097+-- \`TakeSnapshotResponse\`.
1098+gloResponse :: Lens' GoogleLongrunning__Operation (Maybe GoogleLongrunning__OperationResponse)
1099+gloResponse
1100+ = lens _gloResponse (\ s a -> s{_gloResponse = a})
1101+
1102+-- | The server-assigned name, which is only unique within the same service
1103+-- that originally returns it. If you use the default HTTP mapping, the
1104+-- \`name\` should have the format of \`operations\/some\/unique\/name\`.
1105+gloName :: Lens' GoogleLongrunning__Operation (Maybe Text)
1106+gloName = lens _gloName (\ s a -> s{_gloName = a})
1107+
1108+-- | Service-specific metadata associated with the operation. It typically
1109+-- contains progress information and common metadata such as create time.
1110+-- Some services might not provide such metadata. Any method that returns a
1111+-- long-running operation should document the metadata type, if any.
1112+gloMetadata :: Lens' GoogleLongrunning__Operation (Maybe GoogleLongrunning__OperationMetadata)
1113+gloMetadata
1114+ = lens _gloMetadata (\ s a -> s{_gloMetadata = a})
1115+
1116+instance FromJSON GoogleLongrunning__Operation where
1117+ parseJSON
1118+ = withObject "GoogleLongrunningOperation"
1119+ (\ o ->
1120+ GoogleLongrunning__Operation' <$>
1121+ (o .:? "done") <*> (o .:? "error") <*>
1122+ (o .:? "response")
1123+ <*> (o .:? "name")
1124+ <*> (o .:? "metadata"))
1125+
1126+instance ToJSON GoogleLongrunning__Operation where
1127+ toJSON GoogleLongrunning__Operation'{..}
1128+ = object
1129+ (catMaybes
1130+ [("done" .=) <$> _gloDone,
1131+ ("error" .=) <$> _gloError,
1132+ ("response" .=) <$> _gloResponse,
1133+ ("name" .=) <$> _gloName,
1134+ ("metadata" .=) <$> _gloMetadata])
1135+
1136+-- | The hyperparameters given to this trial.
1137+--
1138+-- /See:/ 'googleCloudMlV1beta1__HyperparameterOutputHyperparameters' smart constructor.
1139+newtype GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters = GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters'
1140+ { _gcmvhohAddtional :: HashMap Text Text
1141+ } deriving (Eq,Show,Data,Typeable,Generic)
1142+
1143+-- | Creates a value of 'GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters' with the minimum fields required to make a request.
1144+--
1145+-- Use one of the following lenses to modify other fields as desired:
1146+--
1147+-- * 'gcmvhohAddtional'
1148+googleCloudMlV1beta1__HyperparameterOutputHyperparameters
1149+ :: HashMap Text Text -- ^ 'gcmvhohAddtional'
1150+ -> GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters
1151+googleCloudMlV1beta1__HyperparameterOutputHyperparameters pGcmvhohAddtional_ =
1152+ GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters'
1153+ { _gcmvhohAddtional = _Coerce # pGcmvhohAddtional_
1154+ }
1155+
1156+gcmvhohAddtional :: Lens' GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters (HashMap Text Text)
1157+gcmvhohAddtional
1158+ = lens _gcmvhohAddtional
1159+ (\ s a -> s{_gcmvhohAddtional = a})
1160+ . _Coerce
1161+
1162+instance FromJSON
1163+ GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters
1164+ where
1165+ parseJSON
1166+ = withObject
1167+ "GoogleCloudMlV1beta1HyperparameterOutputHyperparameters"
1168+ (\ o ->
1169+ GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters'
1170+ <$> (parseJSONObject o))
1171+
1172+instance ToJSON
1173+ GoogleCloudMlV1beta1__HyperparameterOutputHyperparameters
1174+ where
1175+ toJSON = toJSON . _gcmvhohAddtional
1176+
1177+-- | The \`Status\` type defines a logical error model that is suitable for
1178+-- different programming environments, including REST APIs and RPC APIs. It
1179+-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is
1180+-- designed to be: - Simple to use and understand for most users - Flexible
1181+-- enough to meet unexpected needs # Overview The \`Status\` message
1182+-- contains three pieces of data: error code, error message, and error
1183+-- details. The error code should be an enum value of google.rpc.Code, but
1184+-- it may accept additional error codes if needed. The error message should
1185+-- be a developer-facing English message that helps developers *understand*
1186+-- and *resolve* the error. If a localized user-facing error message is
1187+-- needed, put the localized message in the error details or localize it in
1188+-- the client. The optional error details may contain arbitrary information
1189+-- about the error. There is a predefined set of error detail types in the
1190+-- package \`google.rpc\` which can be used for common error conditions. #
1191+-- Language mapping The \`Status\` message is the logical representation of
1192+-- the error model, but it is not necessarily the actual wire format. When
1193+-- the \`Status\` message is exposed in different client libraries and
1194+-- different wire protocols, it can be mapped differently. For example, it
1195+-- will likely be mapped to some exceptions in Java, but more likely mapped
1196+-- to some error codes in C. # Other uses The error model and the
1197+-- \`Status\` message can be used in a variety of environments, either with
1198+-- or without APIs, to provide a consistent developer experience across
1199+-- different environments. Example uses of this error model include: -
1200+-- Partial errors. If a service needs to return partial errors to the
1201+-- client, it may embed the \`Status\` in the normal response to indicate
1202+-- the partial errors. - Workflow errors. A typical workflow has multiple
1203+-- steps. Each step may have a \`Status\` message for error reporting
1204+-- purpose. - Batch operations. If a client uses batch request and batch
1205+-- response, the \`Status\` message should be used directly inside batch
1206+-- response, one for each error sub-response. - Asynchronous operations. If
1207+-- an API call embeds asynchronous operation results in its response, the
1208+-- status of those operations should be represented directly using the
1209+-- \`Status\` message. - Logging. If some API errors are stored in logs,
1210+-- the message \`Status\` could be used directly after any stripping needed
1211+-- for security\/privacy reasons.
1212+--
1213+-- /See:/ 'googleRpc__Status' smart constructor.
1214+data GoogleRpc__Status = GoogleRpc__Status'
1215+ { _grsDetails :: !(Maybe [GoogleRpc__StatusDetailsItem])
1216+ , _grsCode :: !(Maybe (Textual Int32))
1217+ , _grsMessage :: !(Maybe Text)
1218+ } deriving (Eq,Show,Data,Typeable,Generic)
1219+
1220+-- | Creates a value of 'GoogleRpc__Status' with the minimum fields required to make a request.
1221+--
1222+-- Use one of the following lenses to modify other fields as desired:
1223+--
1224+-- * 'grsDetails'
1225+--
1226+-- * 'grsCode'
1227+--
1228+-- * 'grsMessage'
1229+googleRpc__Status
1230+ :: GoogleRpc__Status
1231+googleRpc__Status =
1232+ GoogleRpc__Status'
1233+ { _grsDetails = Nothing
1234+ , _grsCode = Nothing
1235+ , _grsMessage = Nothing
1236+ }
1237+
1238+-- | A list of messages that carry the error details. There will be a common
1239+-- set of message types for APIs to use.
1240+grsDetails :: Lens' GoogleRpc__Status [GoogleRpc__StatusDetailsItem]
1241+grsDetails
1242+ = lens _grsDetails (\ s a -> s{_grsDetails = a}) .
1243+ _Default
1244+ . _Coerce
1245+
1246+-- | The status code, which should be an enum value of google.rpc.Code.
1247+grsCode :: Lens' GoogleRpc__Status (Maybe Int32)
1248+grsCode
1249+ = lens _grsCode (\ s a -> s{_grsCode = a}) .
1250+ mapping _Coerce
1251+
1252+-- | A developer-facing error message, which should be in English. Any
1253+-- user-facing error message should be localized and sent in the
1254+-- google.rpc.Status.details field, or localized by the client.
1255+grsMessage :: Lens' GoogleRpc__Status (Maybe Text)
1256+grsMessage
1257+ = lens _grsMessage (\ s a -> s{_grsMessage = a})
1258+
1259+instance FromJSON GoogleRpc__Status where
1260+ parseJSON
1261+ = withObject "GoogleRpcStatus"
1262+ (\ o ->
1263+ GoogleRpc__Status' <$>
1264+ (o .:? "details" .!= mempty) <*> (o .:? "code") <*>
1265+ (o .:? "message"))
1266+
1267+instance ToJSON GoogleRpc__Status where
1268+ toJSON GoogleRpc__Status'{..}
1269+ = object
1270+ (catMaybes
1271+ [("details" .=) <$> _grsDetails,
1272+ ("code" .=) <$> _grsCode,
1273+ ("message" .=) <$> _grsMessage])
1274+
1275+-- | Service-specific metadata associated with the operation. It typically
1276+-- contains progress information and common metadata such as create time.
1277+-- Some services might not provide such metadata. Any method that returns a
1278+-- long-running operation should document the metadata type, if any.
1279+--
1280+-- /See:/ 'googleLongrunning__OperationMetadata' smart constructor.
1281+newtype GoogleLongrunning__OperationMetadata = GoogleLongrunning__OperationMetadata'
1282+ { _glomAddtional :: HashMap Text JSONValue
1283+ } deriving (Eq,Show,Data,Typeable,Generic)
1284+
1285+-- | Creates a value of 'GoogleLongrunning__OperationMetadata' with the minimum fields required to make a request.
1286+--
1287+-- Use one of the following lenses to modify other fields as desired:
1288+--
1289+-- * 'glomAddtional'
1290+googleLongrunning__OperationMetadata
1291+ :: HashMap Text JSONValue -- ^ 'glomAddtional'
1292+ -> GoogleLongrunning__OperationMetadata
1293+googleLongrunning__OperationMetadata pGlomAddtional_ =
1294+ GoogleLongrunning__OperationMetadata'
1295+ { _glomAddtional = _Coerce # pGlomAddtional_
1296+ }
1297+
1298+-- | Properties of the object. Contains field \'type with type URL.
1299+glomAddtional :: Lens' GoogleLongrunning__OperationMetadata (HashMap Text JSONValue)
1300+glomAddtional
1301+ = lens _glomAddtional
1302+ (\ s a -> s{_glomAddtional = a})
1303+ . _Coerce
1304+
1305+instance FromJSON
1306+ GoogleLongrunning__OperationMetadata where
1307+ parseJSON
1308+ = withObject "GoogleLongrunningOperationMetadata"
1309+ (\ o ->
1310+ GoogleLongrunning__OperationMetadata' <$>
1311+ (parseJSONObject o))
1312+
1313+instance ToJSON GoogleLongrunning__OperationMetadata
1314+ where
1315+ toJSON = toJSON . _glomAddtional
1316+
1317+-- | Represents results of a prediction job.
1318+--
1319+-- /See:/ 'googleCloudMlV1beta1__PredictionOutput' smart constructor.
1320+data GoogleCloudMlV1beta1__PredictionOutput = GoogleCloudMlV1beta1__PredictionOutput'
1321+ { _gcmvpoErrorCount :: !(Maybe (Textual Int64))
1322+ , _gcmvpoPredictionCount :: !(Maybe (Textual Int64))
1323+ , _gcmvpoOutputPath :: !(Maybe Text)
1324+ } deriving (Eq,Show,Data,Typeable,Generic)
1325+
1326+-- | Creates a value of 'GoogleCloudMlV1beta1__PredictionOutput' with the minimum fields required to make a request.
1327+--
1328+-- Use one of the following lenses to modify other fields as desired:
1329+--
1330+-- * 'gcmvpoErrorCount'
1331+--
1332+-- * 'gcmvpoPredictionCount'
1333+--
1334+-- * 'gcmvpoOutputPath'
1335+googleCloudMlV1beta1__PredictionOutput
1336+ :: GoogleCloudMlV1beta1__PredictionOutput
1337+googleCloudMlV1beta1__PredictionOutput =
1338+ GoogleCloudMlV1beta1__PredictionOutput'
1339+ { _gcmvpoErrorCount = Nothing
1340+ , _gcmvpoPredictionCount = Nothing
1341+ , _gcmvpoOutputPath = Nothing
1342+ }
1343+
1344+-- | The number of data instances which resulted in errors.
1345+gcmvpoErrorCount :: Lens' GoogleCloudMlV1beta1__PredictionOutput (Maybe Int64)
1346+gcmvpoErrorCount
1347+ = lens _gcmvpoErrorCount
1348+ (\ s a -> s{_gcmvpoErrorCount = a})
1349+ . mapping _Coerce
1350+
1351+-- | The number of generated predictions.
1352+gcmvpoPredictionCount :: Lens' GoogleCloudMlV1beta1__PredictionOutput (Maybe Int64)
1353+gcmvpoPredictionCount
1354+ = lens _gcmvpoPredictionCount
1355+ (\ s a -> s{_gcmvpoPredictionCount = a})
1356+ . mapping _Coerce
1357+
1358+-- | The output Google Cloud Storage location provided at the job creation
1359+-- time.
1360+gcmvpoOutputPath :: Lens' GoogleCloudMlV1beta1__PredictionOutput (Maybe Text)
1361+gcmvpoOutputPath
1362+ = lens _gcmvpoOutputPath
1363+ (\ s a -> s{_gcmvpoOutputPath = a})
1364+
1365+instance FromJSON
1366+ GoogleCloudMlV1beta1__PredictionOutput where
1367+ parseJSON
1368+ = withObject "GoogleCloudMlV1beta1PredictionOutput"
1369+ (\ o ->
1370+ GoogleCloudMlV1beta1__PredictionOutput' <$>
1371+ (o .:? "errorCount") <*> (o .:? "predictionCount")
1372+ <*> (o .:? "outputPath"))
1373+
1374+instance ToJSON
1375+ GoogleCloudMlV1beta1__PredictionOutput where
1376+ toJSON GoogleCloudMlV1beta1__PredictionOutput'{..}
1377+ = object
1378+ (catMaybes
1379+ [("errorCount" .=) <$> _gcmvpoErrorCount,
1380+ ("predictionCount" .=) <$> _gcmvpoPredictionCount,
1381+ ("outputPath" .=) <$> _gcmvpoOutputPath])
1382+
1383+-- | Request message for the CancelJob method.
1384+--
1385+-- /See:/ 'googleCloudMlV1beta1__CancelJobRequest' smart constructor.
1386+data GoogleCloudMlV1beta1__CancelJobRequest =
1387+ GoogleCloudMlV1beta1__CancelJobRequest'
1388+ deriving (Eq,Show,Data,Typeable,Generic)
1389+
1390+-- | Creates a value of 'GoogleCloudMlV1beta1__CancelJobRequest' with the minimum fields required to make a request.
1391+--
1392+googleCloudMlV1beta1__CancelJobRequest
1393+ :: GoogleCloudMlV1beta1__CancelJobRequest
1394+googleCloudMlV1beta1__CancelJobRequest =
1395+ GoogleCloudMlV1beta1__CancelJobRequest'
1396+
1397+instance FromJSON
1398+ GoogleCloudMlV1beta1__CancelJobRequest where
1399+ parseJSON
1400+ = withObject "GoogleCloudMlV1beta1CancelJobRequest"
1401+ (\ o -> pure GoogleCloudMlV1beta1__CancelJobRequest')
1402+
1403+instance ToJSON
1404+ GoogleCloudMlV1beta1__CancelJobRequest where
1405+ toJSON = const emptyObject
1406+
1407+-- | Response message for the ListModels method.
1408+--
1409+-- /See:/ 'googleCloudMlV1beta1__ListModelsResponse' smart constructor.
1410+data GoogleCloudMlV1beta1__ListModelsResponse = GoogleCloudMlV1beta1__ListModelsResponse'
1411+ { _gcmvlmrNextPageToken :: !(Maybe Text)
1412+ , _gcmvlmrModels :: !(Maybe [GoogleCloudMlV1beta1__Model])
1413+ } deriving (Eq,Show,Data,Typeable,Generic)
1414+
1415+-- | Creates a value of 'GoogleCloudMlV1beta1__ListModelsResponse' with the minimum fields required to make a request.
1416+--
1417+-- Use one of the following lenses to modify other fields as desired:
1418+--
1419+-- * 'gcmvlmrNextPageToken'
1420+--
1421+-- * 'gcmvlmrModels'
1422+googleCloudMlV1beta1__ListModelsResponse
1423+ :: GoogleCloudMlV1beta1__ListModelsResponse
1424+googleCloudMlV1beta1__ListModelsResponse =
1425+ GoogleCloudMlV1beta1__ListModelsResponse'
1426+ { _gcmvlmrNextPageToken = Nothing
1427+ , _gcmvlmrModels = Nothing
1428+ }
1429+
1430+-- | Optional. Pass this token as the \`page_token\` field of the request for
1431+-- a subsequent call.
1432+gcmvlmrNextPageToken :: Lens' GoogleCloudMlV1beta1__ListModelsResponse (Maybe Text)
1433+gcmvlmrNextPageToken
1434+ = lens _gcmvlmrNextPageToken
1435+ (\ s a -> s{_gcmvlmrNextPageToken = a})
1436+
1437+-- | The list of models.
1438+gcmvlmrModels :: Lens' GoogleCloudMlV1beta1__ListModelsResponse [GoogleCloudMlV1beta1__Model]
1439+gcmvlmrModels
1440+ = lens _gcmvlmrModels
1441+ (\ s a -> s{_gcmvlmrModels = a})
1442+ . _Default
1443+ . _Coerce
1444+
1445+instance FromJSON
1446+ GoogleCloudMlV1beta1__ListModelsResponse where
1447+ parseJSON
1448+ = withObject "GoogleCloudMlV1beta1ListModelsResponse"
1449+ (\ o ->
1450+ GoogleCloudMlV1beta1__ListModelsResponse' <$>
1451+ (o .:? "nextPageToken") <*>
1452+ (o .:? "models" .!= mempty))
1453+
1454+instance ToJSON
1455+ GoogleCloudMlV1beta1__ListModelsResponse where
1456+ toJSON GoogleCloudMlV1beta1__ListModelsResponse'{..}
1457+ = object
1458+ (catMaybes
1459+ [("nextPageToken" .=) <$> _gcmvlmrNextPageToken,
1460+ ("models" .=) <$> _gcmvlmrModels])
1461+
1462+-- | Response message for the ListJobs method.
1463+--
1464+-- /See:/ 'googleCloudMlV1beta1__ListJobsResponse' smart constructor.
1465+data GoogleCloudMlV1beta1__ListJobsResponse = GoogleCloudMlV1beta1__ListJobsResponse'
1466+ { _gcmvljrNextPageToken :: !(Maybe Text)
1467+ , _gcmvljrJobs :: !(Maybe [GoogleCloudMlV1beta1__Job])
1468+ } deriving (Eq,Show,Data,Typeable,Generic)
1469+
1470+-- | Creates a value of 'GoogleCloudMlV1beta1__ListJobsResponse' with the minimum fields required to make a request.
1471+--
1472+-- Use one of the following lenses to modify other fields as desired:
1473+--
1474+-- * 'gcmvljrNextPageToken'
1475+--
1476+-- * 'gcmvljrJobs'
1477+googleCloudMlV1beta1__ListJobsResponse
1478+ :: GoogleCloudMlV1beta1__ListJobsResponse
1479+googleCloudMlV1beta1__ListJobsResponse =
1480+ GoogleCloudMlV1beta1__ListJobsResponse'
1481+ { _gcmvljrNextPageToken = Nothing
1482+ , _gcmvljrJobs = Nothing
1483+ }
1484+
1485+-- | Optional. Pass this token as the \`page_token\` field of the request for
1486+-- a subsequent call.
1487+gcmvljrNextPageToken :: Lens' GoogleCloudMlV1beta1__ListJobsResponse (Maybe Text)
1488+gcmvljrNextPageToken
1489+ = lens _gcmvljrNextPageToken
1490+ (\ s a -> s{_gcmvljrNextPageToken = a})
1491+
1492+-- | The list of jobs.
1493+gcmvljrJobs :: Lens' GoogleCloudMlV1beta1__ListJobsResponse [GoogleCloudMlV1beta1__Job]
1494+gcmvljrJobs
1495+ = lens _gcmvljrJobs (\ s a -> s{_gcmvljrJobs = a}) .
1496+ _Default
1497+ . _Coerce
1498+
1499+instance FromJSON
1500+ GoogleCloudMlV1beta1__ListJobsResponse where
1501+ parseJSON
1502+ = withObject "GoogleCloudMlV1beta1ListJobsResponse"
1503+ (\ o ->
1504+ GoogleCloudMlV1beta1__ListJobsResponse' <$>
1505+ (o .:? "nextPageToken") <*>
1506+ (o .:? "jobs" .!= mempty))
1507+
1508+instance ToJSON
1509+ GoogleCloudMlV1beta1__ListJobsResponse where
1510+ toJSON GoogleCloudMlV1beta1__ListJobsResponse'{..}
1511+ = object
1512+ (catMaybes
1513+ [("nextPageToken" .=) <$> _gcmvljrNextPageToken,
1514+ ("jobs" .=) <$> _gcmvljrJobs])
1515+
1516+-- | Represents input parameters for a training job.
1517+--
1518+-- /See:/ 'googleCloudMlV1beta1__TrainingInput' smart constructor.
1519+data GoogleCloudMlV1beta1__TrainingInput = GoogleCloudMlV1beta1__TrainingInput'
1520+ { _gcmvtiMasterType :: !(Maybe Text)
1521+ , _gcmvtiParameterServerCount :: !(Maybe (Textual Int64))
1522+ , _gcmvtiArgs :: !(Maybe [Text])
1523+ , _gcmvtiWorkerCount :: !(Maybe (Textual Int64))
1524+ , _gcmvtiWorkerType :: !(Maybe Text)
1525+ , _gcmvtiPythonModule :: !(Maybe Text)
1526+ , _gcmvtiParameterServerType :: !(Maybe Text)
1527+ , _gcmvtiHyperparameters :: !(Maybe GoogleCloudMlV1beta1__HyperparameterSpec)
1528+ , _gcmvtiPackageURIs :: !(Maybe [Text])
1529+ , _gcmvtiScaleTier :: !(Maybe GoogleCloudMlV1beta1__TrainingInputScaleTier)
1530+ , _gcmvtiRegion :: !(Maybe Text)
1531+ } deriving (Eq,Show,Data,Typeable,Generic)
1532+
1533+-- | Creates a value of 'GoogleCloudMlV1beta1__TrainingInput' with the minimum fields required to make a request.
1534+--
1535+-- Use one of the following lenses to modify other fields as desired:
1536+--
1537+-- * 'gcmvtiMasterType'
1538+--
1539+-- * 'gcmvtiParameterServerCount'
1540+--
1541+-- * 'gcmvtiArgs'
1542+--
1543+-- * 'gcmvtiWorkerCount'
1544+--
1545+-- * 'gcmvtiWorkerType'
1546+--
1547+-- * 'gcmvtiPythonModule'
1548+--
1549+-- * 'gcmvtiParameterServerType'
1550+--
1551+-- * 'gcmvtiHyperparameters'
1552+--
1553+-- * 'gcmvtiPackageURIs'
1554+--
1555+-- * 'gcmvtiScaleTier'
1556+--
1557+-- * 'gcmvtiRegion'
1558+googleCloudMlV1beta1__TrainingInput
1559+ :: GoogleCloudMlV1beta1__TrainingInput
1560+googleCloudMlV1beta1__TrainingInput =
1561+ GoogleCloudMlV1beta1__TrainingInput'
1562+ { _gcmvtiMasterType = Nothing
1563+ , _gcmvtiParameterServerCount = Nothing
1564+ , _gcmvtiArgs = Nothing
1565+ , _gcmvtiWorkerCount = Nothing
1566+ , _gcmvtiWorkerType = Nothing
1567+ , _gcmvtiPythonModule = Nothing
1568+ , _gcmvtiParameterServerType = Nothing
1569+ , _gcmvtiHyperparameters = Nothing
1570+ , _gcmvtiPackageURIs = Nothing
1571+ , _gcmvtiScaleTier = Nothing
1572+ , _gcmvtiRegion = Nothing
1573+ }
1574+
1575+-- | Optional. Specifies the type of virtual machine to use for your training
1576+-- job\'s master worker. The following types are supported:
1577+--
1578+-- [standard]
1579+-- A basic machine configuration suitable for training simple models
1580+-- with small to moderate datasets.
1581+-- [large_model]
1582+-- A machine with a lot of memory, specially suited for parameter
1583+-- servers when your model is large (having many hidden layers or
1584+-- layers with very large numbers of nodes).
1585+-- [complex_model_s]
1586+-- A machine suitable for the master and workers of the cluster when
1587+-- your model requires more computation than the standard machine can
1588+-- handle satisfactorily.
1589+-- [complex_model_m]
1590+-- A machine with roughly twice the number of cores and roughly double
1591+-- the memory of 'complex_model_s'.
1592+-- [complex_model_l]
1593+-- A machine with roughly twice the number of cores and roughly double
1594+-- the memory of 'complex_model_m'.
1595+--
1596+-- You must set this value when \`scaleTier\` is set to \`CUSTOM\`.
1597+gcmvtiMasterType :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Text)
1598+gcmvtiMasterType
1599+ = lens _gcmvtiMasterType
1600+ (\ s a -> s{_gcmvtiMasterType = a})
1601+
1602+-- | Optional. The number of parameter server replicas to use for the
1603+-- training job. Each replica in the cluster will be of the type specified
1604+-- in \`parameter_server_type\`. This value can only be used when
1605+-- \`scale_tier\` is set to \`CUSTOM\`.If you set this value, you must also
1606+-- set \`parameter_server_type\`.
1607+gcmvtiParameterServerCount :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Int64)
1608+gcmvtiParameterServerCount
1609+ = lens _gcmvtiParameterServerCount
1610+ (\ s a -> s{_gcmvtiParameterServerCount = a})
1611+ . mapping _Coerce
1612+
1613+-- | Optional. Command line arguments to pass to the program.
1614+gcmvtiArgs :: Lens' GoogleCloudMlV1beta1__TrainingInput [Text]
1615+gcmvtiArgs
1616+ = lens _gcmvtiArgs (\ s a -> s{_gcmvtiArgs = a}) .
1617+ _Default
1618+ . _Coerce
1619+
1620+-- | Optional. The number of worker replicas to use for the training job.
1621+-- Each replica in the cluster will be of the type specified in
1622+-- \`worker_type\`. This value can only be used when \`scale_tier\` is set
1623+-- to \`CUSTOM\`. If you set this value, you must also set \`worker_type\`.
1624+gcmvtiWorkerCount :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Int64)
1625+gcmvtiWorkerCount
1626+ = lens _gcmvtiWorkerCount
1627+ (\ s a -> s{_gcmvtiWorkerCount = a})
1628+ . mapping _Coerce
1629+
1630+-- | Optional. Specifies the type of virtual machine to use for your training
1631+-- job\'s worker nodes. The supported values are the same as those
1632+-- described in the entry for \`masterType\`. This value must be present
1633+-- when \`scaleTier\` is set to \`CUSTOM\` and \`workerCount\` is greater
1634+-- than zero.
1635+gcmvtiWorkerType :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Text)
1636+gcmvtiWorkerType
1637+ = lens _gcmvtiWorkerType
1638+ (\ s a -> s{_gcmvtiWorkerType = a})
1639+
1640+-- | Required. The Python module name to run after installing the packages.
1641+gcmvtiPythonModule :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Text)
1642+gcmvtiPythonModule
1643+ = lens _gcmvtiPythonModule
1644+ (\ s a -> s{_gcmvtiPythonModule = a})
1645+
1646+-- | Optional. Specifies the type of virtual machine to use for your training
1647+-- job\'s parameter server. The supported values are the same as those
1648+-- described in the entry for \`master_type\`. This value must be present
1649+-- when \`scaleTier\` is set to \`CUSTOM\` and \`parameter_server_count\`
1650+-- is greater than zero.
1651+gcmvtiParameterServerType :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Text)
1652+gcmvtiParameterServerType
1653+ = lens _gcmvtiParameterServerType
1654+ (\ s a -> s{_gcmvtiParameterServerType = a})
1655+
1656+-- | Optional. The set of Hyperparameters to tune.
1657+gcmvtiHyperparameters :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe GoogleCloudMlV1beta1__HyperparameterSpec)
1658+gcmvtiHyperparameters
1659+ = lens _gcmvtiHyperparameters
1660+ (\ s a -> s{_gcmvtiHyperparameters = a})
1661+
1662+-- | Required. The Google Cloud Storage location of the packages with the
1663+-- training program and any additional dependencies.
1664+gcmvtiPackageURIs :: Lens' GoogleCloudMlV1beta1__TrainingInput [Text]
1665+gcmvtiPackageURIs
1666+ = lens _gcmvtiPackageURIs
1667+ (\ s a -> s{_gcmvtiPackageURIs = a})
1668+ . _Default
1669+ . _Coerce
1670+
1671+-- | Required. Specifies the machine types, the number of replicas for
1672+-- workers and parameter servers.
1673+gcmvtiScaleTier :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe GoogleCloudMlV1beta1__TrainingInputScaleTier)
1674+gcmvtiScaleTier
1675+ = lens _gcmvtiScaleTier
1676+ (\ s a -> s{_gcmvtiScaleTier = a})
1677+
1678+-- | Required. The Google Compute Engine region to run the training job in.
1679+gcmvtiRegion :: Lens' GoogleCloudMlV1beta1__TrainingInput (Maybe Text)
1680+gcmvtiRegion
1681+ = lens _gcmvtiRegion (\ s a -> s{_gcmvtiRegion = a})
1682+
1683+instance FromJSON GoogleCloudMlV1beta1__TrainingInput
1684+ where
1685+ parseJSON
1686+ = withObject "GoogleCloudMlV1beta1TrainingInput"
1687+ (\ o ->
1688+ GoogleCloudMlV1beta1__TrainingInput' <$>
1689+ (o .:? "masterType") <*>
1690+ (o .:? "parameterServerCount")
1691+ <*> (o .:? "args" .!= mempty)
1692+ <*> (o .:? "workerCount")
1693+ <*> (o .:? "workerType")
1694+ <*> (o .:? "pythonModule")
1695+ <*> (o .:? "parameterServerType")
1696+ <*> (o .:? "hyperparameters")
1697+ <*> (o .:? "packageUris" .!= mempty)
1698+ <*> (o .:? "scaleTier")
1699+ <*> (o .:? "region"))
1700+
1701+instance ToJSON GoogleCloudMlV1beta1__TrainingInput
1702+ where
1703+ toJSON GoogleCloudMlV1beta1__TrainingInput'{..}
1704+ = object
1705+ (catMaybes
1706+ [("masterType" .=) <$> _gcmvtiMasterType,
1707+ ("parameterServerCount" .=) <$>
1708+ _gcmvtiParameterServerCount,
1709+ ("args" .=) <$> _gcmvtiArgs,
1710+ ("workerCount" .=) <$> _gcmvtiWorkerCount,
1711+ ("workerType" .=) <$> _gcmvtiWorkerType,
1712+ ("pythonModule" .=) <$> _gcmvtiPythonModule,
1713+ ("parameterServerType" .=) <$>
1714+ _gcmvtiParameterServerType,
1715+ ("hyperparameters" .=) <$> _gcmvtiHyperparameters,
1716+ ("packageUris" .=) <$> _gcmvtiPackageURIs,
1717+ ("scaleTier" .=) <$> _gcmvtiScaleTier,
1718+ ("region" .=) <$> _gcmvtiRegion])
1719+
1720+--
1721+-- /See:/ 'googleRpc__StatusDetailsItem' smart constructor.
1722+newtype GoogleRpc__StatusDetailsItem = GoogleRpc__StatusDetailsItem'
1723+ { _grsdiAddtional :: HashMap Text JSONValue
1724+ } deriving (Eq,Show,Data,Typeable,Generic)
1725+
1726+-- | Creates a value of 'GoogleRpc__StatusDetailsItem' with the minimum fields required to make a request.
1727+--
1728+-- Use one of the following lenses to modify other fields as desired:
1729+--
1730+-- * 'grsdiAddtional'
1731+googleRpc__StatusDetailsItem
1732+ :: HashMap Text JSONValue -- ^ 'grsdiAddtional'
1733+ -> GoogleRpc__StatusDetailsItem
1734+googleRpc__StatusDetailsItem pGrsdiAddtional_ =
1735+ GoogleRpc__StatusDetailsItem'
1736+ { _grsdiAddtional = _Coerce # pGrsdiAddtional_
1737+ }
1738+
1739+-- | Properties of the object. Contains field \'type with type URL.
1740+grsdiAddtional :: Lens' GoogleRpc__StatusDetailsItem (HashMap Text JSONValue)
1741+grsdiAddtional
1742+ = lens _grsdiAddtional
1743+ (\ s a -> s{_grsdiAddtional = a})
1744+ . _Coerce
1745+
1746+instance FromJSON GoogleRpc__StatusDetailsItem where
1747+ parseJSON
1748+ = withObject "GoogleRpcStatusDetailsItem"
1749+ (\ o ->
1750+ GoogleRpc__StatusDetailsItem' <$>
1751+ (parseJSONObject o))
1752+
1753+instance ToJSON GoogleRpc__StatusDetailsItem where
1754+ toJSON = toJSON . _grsdiAddtional
1755+
1756+-- | A generic empty message that you can re-use to avoid defining duplicated
1757+-- empty messages in your APIs. A typical example is to use it as the
1758+-- request or the response type of an API method. For instance: service Foo
1759+-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The
1760+-- JSON representation for \`Empty\` is empty JSON object \`{}\`.
1761+--
1762+-- /See:/ 'googleProtobuf__Empty' smart constructor.
1763+data GoogleProtobuf__Empty =
1764+ GoogleProtobuf__Empty'
1765+ deriving (Eq,Show,Data,Typeable,Generic)
1766+
1767+-- | Creates a value of 'GoogleProtobuf__Empty' with the minimum fields required to make a request.
1768+--
1769+googleProtobuf__Empty
1770+ :: GoogleProtobuf__Empty
1771+googleProtobuf__Empty = GoogleProtobuf__Empty'
1772+
1773+instance FromJSON GoogleProtobuf__Empty where
1774+ parseJSON
1775+ = withObject "GoogleProtobufEmpty"
1776+ (\ o -> pure GoogleProtobuf__Empty')
1777+
1778+instance ToJSON GoogleProtobuf__Empty where
1779+ toJSON = const emptyObject
1780+
1781+-- | An observed value of a metric.
1782+--
1783+-- /See:/ 'googleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric' smart constructor.
1784+data GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric = GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric'
1785+ { _gcmvhohmTrainingStep :: !(Maybe (Textual Int64))
1786+ , _gcmvhohmObjectiveValue :: !(Maybe (Textual Double))
1787+ } deriving (Eq,Show,Data,Typeable,Generic)
1788+
1789+-- | Creates a value of 'GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric' with the minimum fields required to make a request.
1790+--
1791+-- Use one of the following lenses to modify other fields as desired:
1792+--
1793+-- * 'gcmvhohmTrainingStep'
1794+--
1795+-- * 'gcmvhohmObjectiveValue'
1796+googleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
1797+ :: GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
1798+googleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric =
1799+ GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric'
1800+ { _gcmvhohmTrainingStep = Nothing
1801+ , _gcmvhohmObjectiveValue = Nothing
1802+ }
1803+
1804+-- | The global training step for this metric.
1805+gcmvhohmTrainingStep :: Lens' GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric (Maybe Int64)
1806+gcmvhohmTrainingStep
1807+ = lens _gcmvhohmTrainingStep
1808+ (\ s a -> s{_gcmvhohmTrainingStep = a})
1809+ . mapping _Coerce
1810+
1811+-- | The objective value at this training step.
1812+gcmvhohmObjectiveValue :: Lens' GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric (Maybe Double)
1813+gcmvhohmObjectiveValue
1814+ = lens _gcmvhohmObjectiveValue
1815+ (\ s a -> s{_gcmvhohmObjectiveValue = a})
1816+ . mapping _Coerce
1817+
1818+instance FromJSON
1819+ GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
1820+ where
1821+ parseJSON
1822+ = withObject
1823+ "GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric"
1824+ (\ o ->
1825+ GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric'
1826+ <$>
1827+ (o .:? "trainingStep") <*> (o .:? "objectiveValue"))
1828+
1829+instance ToJSON
1830+ GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric
1831+ where
1832+ toJSON
1833+ GoogleCloudMlV1beta1_HyperparameterOutput_HyperparameterMetric'{..}
1834+ = object
1835+ (catMaybes
1836+ [("trainingStep" .=) <$> _gcmvhohmTrainingStep,
1837+ ("objectiveValue" .=) <$> _gcmvhohmObjectiveValue])
1838+
1839+-- | Message that represents an arbitrary HTTP body. It should only be used
1840+-- for payload formats that can\'t be represented as JSON, such as raw
1841+-- binary or an HTML page. This message can be used both in streaming and
1842+-- non-streaming API methods in the request as well as the response. It can
1843+-- be used as a top-level request field, which is convenient if one wants
1844+-- to extract parameters from either the URL or HTTP template into the
1845+-- request fields and also want access to the raw HTTP body. Example:
1846+-- message GetResourceRequest { \/\/ A unique request id. string request_id
1847+-- = 1; \/\/ The raw HTTP body is bound to this field. google.api.HttpBody
1848+-- http_body = 2; } service ResourceService { rpc
1849+-- GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
1850+-- UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); }
1851+-- Example with streaming methods: service CaldavService { rpc
1852+-- GetCalendar(stream google.api.HttpBody) returns (stream
1853+-- google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody)
1854+-- returns (stream google.api.HttpBody); } Use of this type only changes
1855+-- how the request and response bodies are handled, all other features will
1856+-- continue to work unchanged.
1857+--
1858+-- /See:/ 'googleAPI__HTTPBody' smart constructor.
1859+data GoogleAPI__HTTPBody = GoogleAPI__HTTPBody'
1860+ { _gahttpbData :: !(Maybe Base64)
1861+ , _gahttpbContentType :: !(Maybe Text)
1862+ } deriving (Eq,Show,Data,Typeable,Generic)
1863+
1864+-- | Creates a value of 'GoogleAPI__HTTPBody' with the minimum fields required to make a request.
1865+--
1866+-- Use one of the following lenses to modify other fields as desired:
1867+--
1868+-- * 'gahttpbData'
1869+--
1870+-- * 'gahttpbContentType'
1871+googleAPI__HTTPBody
1872+ :: GoogleAPI__HTTPBody
1873+googleAPI__HTTPBody =
1874+ GoogleAPI__HTTPBody'
1875+ { _gahttpbData = Nothing
1876+ , _gahttpbContentType = Nothing
1877+ }
1878+
1879+-- | HTTP body binary data.
1880+gahttpbData :: Lens' GoogleAPI__HTTPBody (Maybe ByteString)
1881+gahttpbData
1882+ = lens _gahttpbData (\ s a -> s{_gahttpbData = a}) .
1883+ mapping _Base64
1884+
1885+-- | The HTTP Content-Type string representing the content type of the body.
1886+gahttpbContentType :: Lens' GoogleAPI__HTTPBody (Maybe Text)
1887+gahttpbContentType
1888+ = lens _gahttpbContentType
1889+ (\ s a -> s{_gahttpbContentType = a})
1890+
1891+instance FromJSON GoogleAPI__HTTPBody where
1892+ parseJSON
1893+ = withObject "GoogleAPIHTTPBody"
1894+ (\ o ->
1895+ GoogleAPI__HTTPBody' <$>
1896+ (o .:? "data") <*> (o .:? "contentType"))
1897+
1898+instance ToJSON GoogleAPI__HTTPBody where
1899+ toJSON GoogleAPI__HTTPBody'{..}
1900+ = object
1901+ (catMaybes
1902+ [("data" .=) <$> _gahttpbData,
1903+ ("contentType" .=) <$> _gahttpbContentType])
1904+
1905+-- | Request for predictions to be issued against a trained model. The body
1906+-- of the request is a single JSON object with a single top-level field:
1907+--
1908+-- [instances]
1909+-- A JSON array containing values representing the instances to use for
1910+-- prediction.
1911+--
1912+-- The structure of each element of the instances list is determined by
1913+-- your model\'s input definition. Instances can include named inputs or
1914+-- can contain only unlabeled values. Most data does not include named
1915+-- inputs. Some instances will be simple JSON values (boolean, number, or
1916+-- string). However, instances are often lists of simple values, or complex
1917+-- nested lists. Here are some examples of request bodies: CSV data with
1918+-- each row encoded as a string value:
1919+--
1920+-- > {"instances": ["1.0,true,\\"x\\"", "-2.0,false,\\"y\\""]}
1921+--
1922+-- Plain text:
1923+--
1924+-- > {"instances": ["the quick brown fox", "la bruja le dio"]}
1925+--
1926+-- Sentences encoded as lists of words (vectors of strings):
1927+--
1928+-- > {"instances": [["the","quick","brown"], ["la","bruja","le"]]}
1929+--
1930+-- Floating point scalar values:
1931+--
1932+-- > {"instances": [0.0, 1.1, 2.2]}
1933+--
1934+-- Vectors of integers:
1935+--
1936+-- > {"instances": [[0, 1, 2], [3, 4, 5],...]}
1937+--
1938+-- Tensors (in this case, two-dimensional tensors):
1939+--
1940+-- > {"instances": [[[0, 1, 2], [3, 4, 5]], ...]}
1941+--
1942+-- Images represented as a three-dimensional list. In this encoding scheme
1943+-- the first two dimensions represent the rows and columns of the image,
1944+-- and the third contains the R, G, and B values for each pixel.
1945+--
1946+-- > {"instances": [[[[138, 30, 66], [130, 20, 56], ...]]]]}
1947+--
1948+-- Data must be encoded as UTF-8. If your data uses another character
1949+-- encoding, you must base64 encode the data and mark it as binary. To mark
1950+-- a JSON string as binary, replace it with an object with a single
1951+-- attribute named \`b\`:
1952+--
1953+-- > {"b": "..."}
1954+--
1955+-- For example: Two Serialized tf.Examples (fake data, for illustrative
1956+-- purposes only):
1957+--
1958+-- > {"instances": [{"b64": "X5ad6u"}, {"b64": "IA9j4nx"}]}
1959+--
1960+-- Two JPEG image byte strings (fake data, for illustrative purposes only):
1961+--
1962+-- > {"instances": [{"b64": "ASa8asdf"}, {"b64": "JLK7ljk3"}]}
1963+--
1964+-- If your data includes named references, format each instance as a JSON
1965+-- object with the named references as the keys: JSON input data to be
1966+-- preprocessed:
1967+--
1968+-- > {"instances": [{"a": 1.0, "b": true, "c": "x"},
1969+-- > {"a": -2.0, "b": false, "c": "y"}]}
1970+--
1971+-- Some models have an underlying TensorFlow graph that accepts multiple
1972+-- input tensors. In this case, you should use the names of JSON
1973+-- name\/value pairs to identify the input tensors, as shown in the
1974+-- following exmaples: For a graph with input tensor aliases \"tag\"
1975+-- (string) and \"image\" (base64-encoded string):
1976+--
1977+-- > {"instances": [{"tag": "beach", "image": {"b64": "ASa8asdf"}},
1978+-- > {"tag": "car", "image": {"b64": "JLK7ljk3"}}]}
1979+--
1980+-- For a graph with input tensor aliases \"tag\" (string) and \"image\"
1981+-- (3-dimensional array of 8-bit ints):
1982+--
1983+-- > {"instances": [{"tag": "beach", "image": [[[263, 1, 10], [262, 2, 11], ...]]},
1984+-- > {"tag": "car", "image": [[[10, 11, 24], [23, 10, 15], ...]]}]}
1985+--
1986+-- If the call is successful, the response body will contain one prediction
1987+-- entry per instance in the request body. If prediction fails for any
1988+-- instance, the response body will contain no predictions and will contian
1989+-- a single error entry instead.
1990+--
1991+-- /See:/ 'googleCloudMlV1beta1__PredictRequest' smart constructor.
1992+newtype GoogleCloudMlV1beta1__PredictRequest = GoogleCloudMlV1beta1__PredictRequest'
1993+ { _gcmvprHTTPBody :: Maybe GoogleAPI__HTTPBody
1994+ } deriving (Eq,Show,Data,Typeable,Generic)
1995+
1996+-- | Creates a value of 'GoogleCloudMlV1beta1__PredictRequest' with the minimum fields required to make a request.
1997+--
1998+-- Use one of the following lenses to modify other fields as desired:
1999+--
2000+-- * 'gcmvprHTTPBody'
2001+googleCloudMlV1beta1__PredictRequest
2002+ :: GoogleCloudMlV1beta1__PredictRequest
2003+googleCloudMlV1beta1__PredictRequest =
2004+ GoogleCloudMlV1beta1__PredictRequest'
2005+ { _gcmvprHTTPBody = Nothing
2006+ }
2007+
2008+-- | Required. The prediction request body.
2009+gcmvprHTTPBody :: Lens' GoogleCloudMlV1beta1__PredictRequest (Maybe GoogleAPI__HTTPBody)
2010+gcmvprHTTPBody
2011+ = lens _gcmvprHTTPBody
2012+ (\ s a -> s{_gcmvprHTTPBody = a})
2013+
2014+instance FromJSON
2015+ GoogleCloudMlV1beta1__PredictRequest where
2016+ parseJSON
2017+ = withObject "GoogleCloudMlV1beta1PredictRequest"
2018+ (\ o ->
2019+ GoogleCloudMlV1beta1__PredictRequest' <$>
2020+ (o .:? "httpBody"))
2021+
2022+instance ToJSON GoogleCloudMlV1beta1__PredictRequest
2023+ where
2024+ toJSON GoogleCloudMlV1beta1__PredictRequest'{..}
2025+ = object
2026+ (catMaybes [("httpBody" .=) <$> _gcmvprHTTPBody])
2027+
2028+-- | Represents a single hyperparameter to optimize.
2029+--
2030+-- /See:/ 'googleCloudMlV1beta1__ParameterSpec' smart constructor.
2031+data GoogleCloudMlV1beta1__ParameterSpec = GoogleCloudMlV1beta1__ParameterSpec'
2032+ { _gcmvpsMaxValue :: !(Maybe (Textual Double))
2033+ , _gcmvpsScaleType :: !(Maybe GoogleCloudMlV1beta1__ParameterSpecScaleType)
2034+ , _gcmvpsType :: !(Maybe GoogleCloudMlV1beta1__ParameterSpecType)
2035+ , _gcmvpsDiscreteValues :: !(Maybe [Textual Double])
2036+ , _gcmvpsParameterName :: !(Maybe Text)
2037+ , _gcmvpsCategoricalValues :: !(Maybe [Text])
2038+ , _gcmvpsMinValue :: !(Maybe (Textual Double))
2039+ } deriving (Eq,Show,Data,Typeable,Generic)
2040+
2041+-- | Creates a value of 'GoogleCloudMlV1beta1__ParameterSpec' with the minimum fields required to make a request.
2042+--
2043+-- Use one of the following lenses to modify other fields as desired:
2044+--
2045+-- * 'gcmvpsMaxValue'
2046+--
2047+-- * 'gcmvpsScaleType'
2048+--
2049+-- * 'gcmvpsType'
2050+--
2051+-- * 'gcmvpsDiscreteValues'
2052+--
2053+-- * 'gcmvpsParameterName'
2054+--
2055+-- * 'gcmvpsCategoricalValues'
2056+--
2057+-- * 'gcmvpsMinValue'
2058+googleCloudMlV1beta1__ParameterSpec
2059+ :: GoogleCloudMlV1beta1__ParameterSpec
2060+googleCloudMlV1beta1__ParameterSpec =
2061+ GoogleCloudMlV1beta1__ParameterSpec'
2062+ { _gcmvpsMaxValue = Nothing
2063+ , _gcmvpsScaleType = Nothing
2064+ , _gcmvpsType = Nothing
2065+ , _gcmvpsDiscreteValues = Nothing
2066+ , _gcmvpsParameterName = Nothing
2067+ , _gcmvpsCategoricalValues = Nothing
2068+ , _gcmvpsMinValue = Nothing
2069+ }
2070+
2071+-- | Required if typeis \`DOUBLE\` or \`INTEGER\`. This field should be unset
2072+-- if type is \`CATEGORICAL\`. This value should be integers if type is
2073+-- \`INTEGER\`.
2074+gcmvpsMaxValue :: Lens' GoogleCloudMlV1beta1__ParameterSpec (Maybe Double)
2075+gcmvpsMaxValue
2076+ = lens _gcmvpsMaxValue
2077+ (\ s a -> s{_gcmvpsMaxValue = a})
2078+ . mapping _Coerce
2079+
2080+-- | Optional. How the parameter should be scaled to the hypercube. Leave
2081+-- unset for categorical parameters. Some kind of scaling is strongly
2082+-- recommended for real or integral parameters (e.g.,
2083+-- \`UNIT_LINEAR_SCALE\`).
2084+gcmvpsScaleType :: Lens' GoogleCloudMlV1beta1__ParameterSpec (Maybe GoogleCloudMlV1beta1__ParameterSpecScaleType)
2085+gcmvpsScaleType
2086+ = lens _gcmvpsScaleType
2087+ (\ s a -> s{_gcmvpsScaleType = a})
2088+
2089+-- | Required. The type of the parameter.
2090+gcmvpsType :: Lens' GoogleCloudMlV1beta1__ParameterSpec (Maybe GoogleCloudMlV1beta1__ParameterSpecType)
2091+gcmvpsType
2092+ = lens _gcmvpsType (\ s a -> s{_gcmvpsType = a})
2093+
2094+-- | Required if type is \`DISCRETE\`. A list of feasible points. The list
2095+-- should be in strictly increasing order. For instance, this parameter
2096+-- might have possible settings of 1.5, 2.5, and 4.0. This list should not
2097+-- contain more than 1,000 values.
2098+gcmvpsDiscreteValues :: Lens' GoogleCloudMlV1beta1__ParameterSpec [Double]
2099+gcmvpsDiscreteValues
2100+ = lens _gcmvpsDiscreteValues
2101+ (\ s a -> s{_gcmvpsDiscreteValues = a})
2102+ . _Default
2103+ . _Coerce
2104+
2105+-- | Required. The parameter name must be unique amongst all ParameterConfigs
2106+-- in a HyperparameterSpec message. E.g., \"learning_rate\".
2107+gcmvpsParameterName :: Lens' GoogleCloudMlV1beta1__ParameterSpec (Maybe Text)
2108+gcmvpsParameterName
2109+ = lens _gcmvpsParameterName
2110+ (\ s a -> s{_gcmvpsParameterName = a})
2111+
2112+-- | Required if type is \`CATEGORICAL\`. The list of possible categories.
2113+gcmvpsCategoricalValues :: Lens' GoogleCloudMlV1beta1__ParameterSpec [Text]
2114+gcmvpsCategoricalValues
2115+ = lens _gcmvpsCategoricalValues
2116+ (\ s a -> s{_gcmvpsCategoricalValues = a})
2117+ . _Default
2118+ . _Coerce
2119+
2120+-- | Required if type is \`DOUBLE\` or \`INTEGER\`. This field should be
2121+-- unset if type is \`CATEGORICAL\`. This value should be integers if type
2122+-- is INTEGER.
2123+gcmvpsMinValue :: Lens' GoogleCloudMlV1beta1__ParameterSpec (Maybe Double)
2124+gcmvpsMinValue
2125+ = lens _gcmvpsMinValue
2126+ (\ s a -> s{_gcmvpsMinValue = a})
2127+ . mapping _Coerce
2128+
2129+instance FromJSON GoogleCloudMlV1beta1__ParameterSpec
2130+ where
2131+ parseJSON
2132+ = withObject "GoogleCloudMlV1beta1ParameterSpec"
2133+ (\ o ->
2134+ GoogleCloudMlV1beta1__ParameterSpec' <$>
2135+ (o .:? "maxValue") <*> (o .:? "scaleType") <*>
2136+ (o .:? "type")
2137+ <*> (o .:? "discreteValues" .!= mempty)
2138+ <*> (o .:? "parameterName")
2139+ <*> (o .:? "categoricalValues" .!= mempty)
2140+ <*> (o .:? "minValue"))
2141+
2142+instance ToJSON GoogleCloudMlV1beta1__ParameterSpec
2143+ where
2144+ toJSON GoogleCloudMlV1beta1__ParameterSpec'{..}
2145+ = object
2146+ (catMaybes
2147+ [("maxValue" .=) <$> _gcmvpsMaxValue,
2148+ ("scaleType" .=) <$> _gcmvpsScaleType,
2149+ ("type" .=) <$> _gcmvpsType,
2150+ ("discreteValues" .=) <$> _gcmvpsDiscreteValues,
2151+ ("parameterName" .=) <$> _gcmvpsParameterName,
2152+ ("categoricalValues" .=) <$>
2153+ _gcmvpsCategoricalValues,
2154+ ("minValue" .=) <$> _gcmvpsMinValue])
gogol-ml/gen/Network/Google/MachineLearning/Types/Sum.hsnew file+375
@@ -0,0 +1,375 @@
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.MachineLearning.Types.Sum
11+-- Copyright : (c) 2015-2016 Brendan Hay
12+-- License : Mozilla Public License, v. 2.0.
13+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
14+-- Stability : auto-generated
15+-- Portability : non-portable (GHC extensions)
16+--
17+module Network.Google.MachineLearning.Types.Sum where
18+
19+import Network.Google.Prelude
20+
21+-- | Output only. The detailed state of a job.
22+data GoogleCloudMlV1beta1__JobState
23+ = StateUnspecified
24+ -- ^ @STATE_UNSPECIFIED@
25+ -- The job state is unspecified.
26+ | Queued
27+ -- ^ @QUEUED@
28+ -- The job has been just created and processing has not yet begun.
29+ | Preparing
30+ -- ^ @PREPARING@
31+ -- The service is preparing to run the job.
32+ | Running
33+ -- ^ @RUNNING@
34+ -- The job is in progress.
35+ | Succeeded
36+ -- ^ @SUCCEEDED@
37+ -- The job completed successfully.
38+ | Failed
39+ -- ^ @FAILED@
40+ -- The job failed. \`error_message\` should contain the details of the
41+ -- failure.
42+ | Cancelling
43+ -- ^ @CANCELLING@
44+ -- The job is being cancelled. \`error_message\` should describe the reason
45+ -- for the cancellation.
46+ | Cancelled
47+ -- ^ @CANCELLED@
48+ -- The job has been cancelled. \`error_message\` should describe the reason
49+ -- for the cancellation.
50+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
51+
52+instance Hashable GoogleCloudMlV1beta1__JobState
53+
54+instance FromHttpApiData GoogleCloudMlV1beta1__JobState where
55+ parseQueryParam = \case
56+ "STATE_UNSPECIFIED" -> Right StateUnspecified
57+ "QUEUED" -> Right Queued
58+ "PREPARING" -> Right Preparing
59+ "RUNNING" -> Right Running
60+ "SUCCEEDED" -> Right Succeeded
61+ "FAILED" -> Right Failed
62+ "CANCELLING" -> Right Cancelling
63+ "CANCELLED" -> Right Cancelled
64+ x -> Left ("Unable to parse GoogleCloudMlV1beta1__JobState from: " <> x)
65+
66+instance ToHttpApiData GoogleCloudMlV1beta1__JobState where
67+ toQueryParam = \case
68+ StateUnspecified -> "STATE_UNSPECIFIED"
69+ Queued -> "QUEUED"
70+ Preparing -> "PREPARING"
71+ Running -> "RUNNING"
72+ Succeeded -> "SUCCEEDED"
73+ Failed -> "FAILED"
74+ Cancelling -> "CANCELLING"
75+ Cancelled -> "CANCELLED"
76+
77+instance FromJSON GoogleCloudMlV1beta1__JobState where
78+ parseJSON = parseJSONText "GoogleCloudMlV1beta1__JobState"
79+
80+instance ToJSON GoogleCloudMlV1beta1__JobState where
81+ toJSON = toJSONText
82+
83+-- | The operation type.
84+data GoogleCloudMlV1beta1__OperationMetadataOperationType
85+ = OperationTypeUnspecified
86+ -- ^ @OPERATION_TYPE_UNSPECIFIED@
87+ -- Unspecified operation type.
88+ | CreateVersion
89+ -- ^ @CREATE_VERSION@
90+ -- An operation to create a new version.
91+ | DeleteVersion
92+ -- ^ @DELETE_VERSION@
93+ -- An operation to delete an existing version.
94+ | DeleteModel
95+ -- ^ @DELETE_MODEL@
96+ -- An operation to delete an existing model.
97+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
98+
99+instance Hashable GoogleCloudMlV1beta1__OperationMetadataOperationType
100+
101+instance FromHttpApiData GoogleCloudMlV1beta1__OperationMetadataOperationType where
102+ parseQueryParam = \case
103+ "OPERATION_TYPE_UNSPECIFIED" -> Right OperationTypeUnspecified
104+ "CREATE_VERSION" -> Right CreateVersion
105+ "DELETE_VERSION" -> Right DeleteVersion
106+ "DELETE_MODEL" -> Right DeleteModel
107+ x -> Left ("Unable to parse GoogleCloudMlV1beta1__OperationMetadataOperationType from: " <> x)
108+
109+instance ToHttpApiData GoogleCloudMlV1beta1__OperationMetadataOperationType where
110+ toQueryParam = \case
111+ OperationTypeUnspecified -> "OPERATION_TYPE_UNSPECIFIED"
112+ CreateVersion -> "CREATE_VERSION"
113+ DeleteVersion -> "DELETE_VERSION"
114+ DeleteModel -> "DELETE_MODEL"
115+
116+instance FromJSON GoogleCloudMlV1beta1__OperationMetadataOperationType where
117+ parseJSON = parseJSONText "GoogleCloudMlV1beta1__OperationMetadataOperationType"
118+
119+instance ToJSON GoogleCloudMlV1beta1__OperationMetadataOperationType where
120+ toJSON = toJSONText
121+
122+-- | Required. The type of the parameter.
123+data GoogleCloudMlV1beta1__ParameterSpecType
124+ = ParameterTypeUnspecified
125+ -- ^ @PARAMETER_TYPE_UNSPECIFIED@
126+ -- You must specify a valid type. Using this unspecified type will result
127+ -- in an error.
128+ | Double
129+ -- ^ @DOUBLE@
130+ -- Type for real-valued parameters.
131+ | Integer
132+ -- ^ @INTEGER@
133+ -- Type for integral parameters.
134+ | Categorical
135+ -- ^ @CATEGORICAL@
136+ -- The parameter is categorical, with a value chosen from the categories
137+ -- field.
138+ | Discrete
139+ -- ^ @DISCRETE@
140+ -- The parameter is real valued, with a fixed set of feasible points. If
141+ -- \`type==DISCRETE\`, feasible_points must be provided, and
142+ -- {\`min_value\`, \`max_value\`} will be ignored.
143+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
144+
145+instance Hashable GoogleCloudMlV1beta1__ParameterSpecType
146+
147+instance FromHttpApiData GoogleCloudMlV1beta1__ParameterSpecType where
148+ parseQueryParam = \case
149+ "PARAMETER_TYPE_UNSPECIFIED" -> Right ParameterTypeUnspecified
150+ "DOUBLE" -> Right Double
151+ "INTEGER" -> Right Integer
152+ "CATEGORICAL" -> Right Categorical
153+ "DISCRETE" -> Right Discrete
154+ x -> Left ("Unable to parse GoogleCloudMlV1beta1__ParameterSpecType from: " <> x)
155+
156+instance ToHttpApiData GoogleCloudMlV1beta1__ParameterSpecType where
157+ toQueryParam = \case
158+ ParameterTypeUnspecified -> "PARAMETER_TYPE_UNSPECIFIED"
159+ Double -> "DOUBLE"
160+ Integer -> "INTEGER"
161+ Categorical -> "CATEGORICAL"
162+ Discrete -> "DISCRETE"
163+
164+instance FromJSON GoogleCloudMlV1beta1__ParameterSpecType where
165+ parseJSON = parseJSONText "GoogleCloudMlV1beta1__ParameterSpecType"
166+
167+instance ToJSON GoogleCloudMlV1beta1__ParameterSpecType where
168+ toJSON = toJSONText
169+
170+-- | V1 error format.
171+data Xgafv
172+ = X1
173+ -- ^ @1@
174+ -- v1 error format
175+ | X2
176+ -- ^ @2@
177+ -- v2 error format
178+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
179+
180+instance Hashable Xgafv
181+
182+instance FromHttpApiData Xgafv where
183+ parseQueryParam = \case
184+ "1" -> Right X1
185+ "2" -> Right X2
186+ x -> Left ("Unable to parse Xgafv from: " <> x)
187+
188+instance ToHttpApiData Xgafv where
189+ toQueryParam = \case
190+ X1 -> "1"
191+ X2 -> "2"
192+
193+instance FromJSON Xgafv where
194+ parseJSON = parseJSONText "Xgafv"
195+
196+instance ToJSON Xgafv where
197+ toJSON = toJSONText
198+
199+-- | Required. The type of goal to use for tuning. Available types are
200+-- \`MAXIMIZE\` and \`MINIMIZE\`. Defaults to \`MAXIMIZE\`.
201+data GoogleCloudMlV1beta1__HyperparameterSpecGoal
202+ = GoalTypeUnspecified
203+ -- ^ @GOAL_TYPE_UNSPECIFIED@
204+ -- Goal Type will default to maximize.
205+ | Maximize
206+ -- ^ @MAXIMIZE@
207+ -- Maximize the goal metric.
208+ | Minimize
209+ -- ^ @MINIMIZE@
210+ -- Minimize the goal metric.
211+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
212+
213+instance Hashable GoogleCloudMlV1beta1__HyperparameterSpecGoal
214+
215+instance FromHttpApiData GoogleCloudMlV1beta1__HyperparameterSpecGoal where
216+ parseQueryParam = \case
217+ "GOAL_TYPE_UNSPECIFIED" -> Right GoalTypeUnspecified
218+ "MAXIMIZE" -> Right Maximize
219+ "MINIMIZE" -> Right Minimize
220+ x -> Left ("Unable to parse GoogleCloudMlV1beta1__HyperparameterSpecGoal from: " <> x)
221+
222+instance ToHttpApiData GoogleCloudMlV1beta1__HyperparameterSpecGoal where
223+ toQueryParam = \case
224+ GoalTypeUnspecified -> "GOAL_TYPE_UNSPECIFIED"
225+ Maximize -> "MAXIMIZE"
226+ Minimize -> "MINIMIZE"
227+
228+instance FromJSON GoogleCloudMlV1beta1__HyperparameterSpecGoal where
229+ parseJSON = parseJSONText "GoogleCloudMlV1beta1__HyperparameterSpecGoal"
230+
231+instance ToJSON GoogleCloudMlV1beta1__HyperparameterSpecGoal where
232+ toJSON = toJSONText
233+
234+-- | Required. The format of the input data files.
235+data GoogleCloudMlV1beta1__PredictionInputDataFormat
236+ = DataFormatUnspecified
237+ -- ^ @DATA_FORMAT_UNSPECIFIED@
238+ -- Unspecified format.
239+ | Text
240+ -- ^ @TEXT@
241+ -- The source file is a text file with instances separated by the new-line
242+ -- character.
243+ | TfRecord
244+ -- ^ @TF_RECORD@
245+ -- The source file is a TFRecord file.
246+ | TfRecordGzip
247+ -- ^ @TF_RECORD_GZIP@
248+ -- The source file is a GZIP-compressed TFRecord file.
249+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
250+
251+instance Hashable GoogleCloudMlV1beta1__PredictionInputDataFormat
252+
253+instance FromHttpApiData GoogleCloudMlV1beta1__PredictionInputDataFormat where
254+ parseQueryParam = \case
255+ "DATA_FORMAT_UNSPECIFIED" -> Right DataFormatUnspecified
256+ "TEXT" -> Right Text
257+ "TF_RECORD" -> Right TfRecord
258+ "TF_RECORD_GZIP" -> Right TfRecordGzip
259+ x -> Left ("Unable to parse GoogleCloudMlV1beta1__PredictionInputDataFormat from: " <> x)
260+
261+instance ToHttpApiData GoogleCloudMlV1beta1__PredictionInputDataFormat where
262+ toQueryParam = \case
263+ DataFormatUnspecified -> "DATA_FORMAT_UNSPECIFIED"
264+ Text -> "TEXT"
265+ TfRecord -> "TF_RECORD"
266+ TfRecordGzip -> "TF_RECORD_GZIP"
267+
268+instance FromJSON GoogleCloudMlV1beta1__PredictionInputDataFormat where
269+ parseJSON = parseJSONText "GoogleCloudMlV1beta1__PredictionInputDataFormat"
270+
271+instance ToJSON GoogleCloudMlV1beta1__PredictionInputDataFormat where
272+ toJSON = toJSONText
273+
274+-- | Optional. How the parameter should be scaled to the hypercube. Leave
275+-- unset for categorical parameters. Some kind of scaling is strongly
276+-- recommended for real or integral parameters (e.g.,
277+-- \`UNIT_LINEAR_SCALE\`).
278+data GoogleCloudMlV1beta1__ParameterSpecScaleType
279+ = None
280+ -- ^ @NONE@
281+ -- By default, no scaling is applied.
282+ | UnitLinearScale
283+ -- ^ @UNIT_LINEAR_SCALE@
284+ -- Scales the feasible space to (0, 1) linearly.
285+ | UnitLogScale
286+ -- ^ @UNIT_LOG_SCALE@
287+ -- Scales the feasible space logarithmically to (0, 1). The entire feasible
288+ -- space must be strictly positive.
289+ | UnitReverseLogScale
290+ -- ^ @UNIT_REVERSE_LOG_SCALE@
291+ -- Scales the feasible space \"reverse\" logarithmically to (0, 1). The
292+ -- result is that values close to the top of the feasible space are spread
293+ -- out more than points near the bottom. The entire feasible space must be
294+ -- strictly positive.
295+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
296+
297+instance Hashable GoogleCloudMlV1beta1__ParameterSpecScaleType
298+
299+instance FromHttpApiData GoogleCloudMlV1beta1__ParameterSpecScaleType where
300+ parseQueryParam = \case
301+ "NONE" -> Right None
302+ "UNIT_LINEAR_SCALE" -> Right UnitLinearScale
303+ "UNIT_LOG_SCALE" -> Right UnitLogScale
304+ "UNIT_REVERSE_LOG_SCALE" -> Right UnitReverseLogScale
305+ x -> Left ("Unable to parse GoogleCloudMlV1beta1__ParameterSpecScaleType from: " <> x)
306+
307+instance ToHttpApiData GoogleCloudMlV1beta1__ParameterSpecScaleType where
308+ toQueryParam = \case
309+ None -> "NONE"
310+ UnitLinearScale -> "UNIT_LINEAR_SCALE"
311+ UnitLogScale -> "UNIT_LOG_SCALE"
312+ UnitReverseLogScale -> "UNIT_REVERSE_LOG_SCALE"
313+
314+instance FromJSON GoogleCloudMlV1beta1__ParameterSpecScaleType where
315+ parseJSON = parseJSONText "GoogleCloudMlV1beta1__ParameterSpecScaleType"
316+
317+instance ToJSON GoogleCloudMlV1beta1__ParameterSpecScaleType where
318+ toJSON = toJSONText
319+
320+-- | Required. Specifies the machine types, the number of replicas for
321+-- workers and parameter servers.
322+data GoogleCloudMlV1beta1__TrainingInputScaleTier
323+ = Basic
324+ -- ^ @BASIC@
325+ -- A single worker instance. This tier is suitable for learning how to use
326+ -- Cloud ML, and for experimenting with new models using small datasets.
327+ | Standard1
328+ -- ^ @STANDARD_1@
329+ -- Many workers and a few parameter servers.
330+ | Premium1
331+ -- ^ @PREMIUM_1@
332+ -- A large number of workers with many parameter servers.
333+ | Custom
334+ -- ^ @CUSTOM@
335+ -- The CUSTOM tier is not a set tier, but rather enables you to use your
336+ -- own cluster specification. When you use this tier, set values to
337+ -- configure your processing cluster according to these guidelines: * You
338+ -- _must_ set \`TrainingInput.masterType\` to specify the type of machine
339+ -- to use for your master node. This is the only required setting. * You
340+ -- _may_ set \`TrainingInput.workerCount\` to specify the number of workers
341+ -- to use. If you specify one or more workers, you _must_ also set
342+ -- \`TrainingInput.workerType\` to specify the type of machine to use for
343+ -- your worker nodes. * You _may_ set
344+ -- \`TrainingInput.parameterServerCount\` to specify the number of
345+ -- parameter servers to use. If you specify one or more parameter servers,
346+ -- you _must_ also set \`TrainingInput.parameterServerType\` to specify the
347+ -- type of machine to use for your parameter servers. Note that all of your
348+ -- workers must use the same machine type, which can be different from your
349+ -- parameter server type and master type. Your parameter servers must
350+ -- likewise use the same machine type, which can be different from your
351+ -- worker type and master type.
352+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
353+
354+instance Hashable GoogleCloudMlV1beta1__TrainingInputScaleTier
355+
356+instance FromHttpApiData GoogleCloudMlV1beta1__TrainingInputScaleTier where
357+ parseQueryParam = \case
358+ "BASIC" -> Right Basic
359+ "STANDARD_1" -> Right Standard1
360+ "PREMIUM_1" -> Right Premium1
361+ "CUSTOM" -> Right Custom
362+ x -> Left ("Unable to parse GoogleCloudMlV1beta1__TrainingInputScaleTier from: " <> x)
363+
364+instance ToHttpApiData GoogleCloudMlV1beta1__TrainingInputScaleTier where
365+ toQueryParam = \case
366+ Basic -> "BASIC"
367+ Standard1 -> "STANDARD_1"
368+ Premium1 -> "PREMIUM_1"
369+ Custom -> "CUSTOM"
370+
371+instance FromJSON GoogleCloudMlV1beta1__TrainingInputScaleTier where
372+ parseJSON = parseJSONText "GoogleCloudMlV1beta1__TrainingInputScaleTier"
373+
374+instance ToJSON GoogleCloudMlV1beta1__TrainingInputScaleTier where
375+ toJSON = toJSONText
gogol-ml/gen/Network/Google/Resource/Ml/Projects/GetConfig.hsnew file+177
@@ -0,0 +1,177 @@
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.Ml.Projects.GetConfig
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Get the service account information associated with your project. You
24+-- need this information in order to grant the service account persmissions
25+-- for the Google Cloud Storage location where you put your model training
26+-- code for training the model with Google Cloud Machine Learning.
27+--
28+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.getConfig@.
29+module Network.Google.Resource.Ml.Projects.GetConfig
30+ (
31+ -- * REST Resource
32+ ProjectsGetConfigResource
33+
34+ -- * Creating a Request
35+ , projectsGetConfig
36+ , ProjectsGetConfig
37+
38+ -- * Request Lenses
39+ , pgcXgafv
40+ , pgcUploadProtocol
41+ , pgcPp
42+ , pgcAccessToken
43+ , pgcUploadType
44+ , pgcBearerToken
45+ , pgcName
46+ , pgcCallback
47+ ) where
48+
49+import Network.Google.MachineLearning.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @ml.projects.getConfig@ method which the
53+-- 'ProjectsGetConfig' request conforms to.
54+type ProjectsGetConfigResource =
55+ "v1beta1" :>
56+ CaptureMode "name" "getConfig" Text :>
57+ QueryParam "$.xgafv" Xgafv :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :>
65+ Get '[JSON] GoogleCloudMlV1beta1__GetConfigResponse
66+
67+-- | Get the service account information associated with your project. You
68+-- need this information in order to grant the service account persmissions
69+-- for the Google Cloud Storage location where you put your model training
70+-- code for training the model with Google Cloud Machine Learning.
71+--
72+-- /See:/ 'projectsGetConfig' smart constructor.
73+data ProjectsGetConfig = ProjectsGetConfig'
74+ { _pgcXgafv :: !(Maybe Xgafv)
75+ , _pgcUploadProtocol :: !(Maybe Text)
76+ , _pgcPp :: !Bool
77+ , _pgcAccessToken :: !(Maybe Text)
78+ , _pgcUploadType :: !(Maybe Text)
79+ , _pgcBearerToken :: !(Maybe Text)
80+ , _pgcName :: !Text
81+ , _pgcCallback :: !(Maybe Text)
82+ } deriving (Eq,Show,Data,Typeable,Generic)
83+
84+-- | Creates a value of 'ProjectsGetConfig' with the minimum fields required to make a request.
85+--
86+-- Use one of the following lenses to modify other fields as desired:
87+--
88+-- * 'pgcXgafv'
89+--
90+-- * 'pgcUploadProtocol'
91+--
92+-- * 'pgcPp'
93+--
94+-- * 'pgcAccessToken'
95+--
96+-- * 'pgcUploadType'
97+--
98+-- * 'pgcBearerToken'
99+--
100+-- * 'pgcName'
101+--
102+-- * 'pgcCallback'
103+projectsGetConfig
104+ :: Text -- ^ 'pgcName'
105+ -> ProjectsGetConfig
106+projectsGetConfig pPgcName_ =
107+ ProjectsGetConfig'
108+ { _pgcXgafv = Nothing
109+ , _pgcUploadProtocol = Nothing
110+ , _pgcPp = True
111+ , _pgcAccessToken = Nothing
112+ , _pgcUploadType = Nothing
113+ , _pgcBearerToken = Nothing
114+ , _pgcName = pPgcName_
115+ , _pgcCallback = Nothing
116+ }
117+
118+-- | V1 error format.
119+pgcXgafv :: Lens' ProjectsGetConfig (Maybe Xgafv)
120+pgcXgafv = lens _pgcXgafv (\ s a -> s{_pgcXgafv = a})
121+
122+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
123+pgcUploadProtocol :: Lens' ProjectsGetConfig (Maybe Text)
124+pgcUploadProtocol
125+ = lens _pgcUploadProtocol
126+ (\ s a -> s{_pgcUploadProtocol = a})
127+
128+-- | Pretty-print response.
129+pgcPp :: Lens' ProjectsGetConfig Bool
130+pgcPp = lens _pgcPp (\ s a -> s{_pgcPp = a})
131+
132+-- | OAuth access token.
133+pgcAccessToken :: Lens' ProjectsGetConfig (Maybe Text)
134+pgcAccessToken
135+ = lens _pgcAccessToken
136+ (\ s a -> s{_pgcAccessToken = a})
137+
138+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
139+pgcUploadType :: Lens' ProjectsGetConfig (Maybe Text)
140+pgcUploadType
141+ = lens _pgcUploadType
142+ (\ s a -> s{_pgcUploadType = a})
143+
144+-- | OAuth bearer token.
145+pgcBearerToken :: Lens' ProjectsGetConfig (Maybe Text)
146+pgcBearerToken
147+ = lens _pgcBearerToken
148+ (\ s a -> s{_pgcBearerToken = a})
149+
150+-- | Required. The project name. Authorization: requires \`Viewer\` role on
151+-- the specified project.
152+pgcName :: Lens' ProjectsGetConfig Text
153+pgcName = lens _pgcName (\ s a -> s{_pgcName = a})
154+
155+-- | JSONP
156+pgcCallback :: Lens' ProjectsGetConfig (Maybe Text)
157+pgcCallback
158+ = lens _pgcCallback (\ s a -> s{_pgcCallback = a})
159+
160+instance GoogleRequest ProjectsGetConfig where
161+ type Rs ProjectsGetConfig =
162+ GoogleCloudMlV1beta1__GetConfigResponse
163+ type Scopes ProjectsGetConfig =
164+ '["https://www.googleapis.com/auth/cloud-platform"]
165+ requestClient ProjectsGetConfig'{..}
166+ = go _pgcName _pgcXgafv _pgcUploadProtocol
167+ (Just _pgcPp)
168+ _pgcAccessToken
169+ _pgcUploadType
170+ _pgcBearerToken
171+ _pgcCallback
172+ (Just AltJSON)
173+ machineLearningService
174+ where go
175+ = buildClient
176+ (Proxy :: Proxy ProjectsGetConfigResource)
177+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/Cancel.hsnew file+184
@@ -0,0 +1,184 @@
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.Ml.Projects.Jobs.Cancel
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Cancels a running job.
24+--
25+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.jobs.cancel@.
26+module Network.Google.Resource.Ml.Projects.Jobs.Cancel
27+ (
28+ -- * REST Resource
29+ ProjectsJobsCancelResource
30+
31+ -- * Creating a Request
32+ , projectsJobsCancel
33+ , ProjectsJobsCancel
34+
35+ -- * Request Lenses
36+ , pjcXgafv
37+ , pjcUploadProtocol
38+ , pjcPp
39+ , pjcAccessToken
40+ , pjcUploadType
41+ , pjcPayload
42+ , pjcBearerToken
43+ , pjcName
44+ , pjcCallback
45+ ) where
46+
47+import Network.Google.MachineLearning.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @ml.projects.jobs.cancel@ method which the
51+-- 'ProjectsJobsCancel' request conforms to.
52+type ProjectsJobsCancelResource =
53+ "v1beta1" :>
54+ CaptureMode "name" "cancel" Text :>
55+ QueryParam "$.xgafv" Xgafv :>
56+ QueryParam "upload_protocol" Text :>
57+ QueryParam "pp" Bool :>
58+ QueryParam "access_token" Text :>
59+ QueryParam "uploadType" Text :>
60+ QueryParam "bearer_token" Text :>
61+ QueryParam "callback" Text :>
62+ QueryParam "alt" AltJSON :>
63+ ReqBody '[JSON]
64+ GoogleCloudMlV1beta1__CancelJobRequest
65+ :> Post '[JSON] GoogleProtobuf__Empty
66+
67+-- | Cancels a running job.
68+--
69+-- /See:/ 'projectsJobsCancel' smart constructor.
70+data ProjectsJobsCancel = ProjectsJobsCancel'
71+ { _pjcXgafv :: !(Maybe Xgafv)
72+ , _pjcUploadProtocol :: !(Maybe Text)
73+ , _pjcPp :: !Bool
74+ , _pjcAccessToken :: !(Maybe Text)
75+ , _pjcUploadType :: !(Maybe Text)
76+ , _pjcPayload :: !GoogleCloudMlV1beta1__CancelJobRequest
77+ , _pjcBearerToken :: !(Maybe Text)
78+ , _pjcName :: !Text
79+ , _pjcCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ProjectsJobsCancel' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'pjcXgafv'
87+--
88+-- * 'pjcUploadProtocol'
89+--
90+-- * 'pjcPp'
91+--
92+-- * 'pjcAccessToken'
93+--
94+-- * 'pjcUploadType'
95+--
96+-- * 'pjcPayload'
97+--
98+-- * 'pjcBearerToken'
99+--
100+-- * 'pjcName'
101+--
102+-- * 'pjcCallback'
103+projectsJobsCancel
104+ :: GoogleCloudMlV1beta1__CancelJobRequest -- ^ 'pjcPayload'
105+ -> Text -- ^ 'pjcName'
106+ -> ProjectsJobsCancel
107+projectsJobsCancel pPjcPayload_ pPjcName_ =
108+ ProjectsJobsCancel'
109+ { _pjcXgafv = Nothing
110+ , _pjcUploadProtocol = Nothing
111+ , _pjcPp = True
112+ , _pjcAccessToken = Nothing
113+ , _pjcUploadType = Nothing
114+ , _pjcPayload = pPjcPayload_
115+ , _pjcBearerToken = Nothing
116+ , _pjcName = pPjcName_
117+ , _pjcCallback = Nothing
118+ }
119+
120+-- | V1 error format.
121+pjcXgafv :: Lens' ProjectsJobsCancel (Maybe Xgafv)
122+pjcXgafv = lens _pjcXgafv (\ s a -> s{_pjcXgafv = a})
123+
124+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
125+pjcUploadProtocol :: Lens' ProjectsJobsCancel (Maybe Text)
126+pjcUploadProtocol
127+ = lens _pjcUploadProtocol
128+ (\ s a -> s{_pjcUploadProtocol = a})
129+
130+-- | Pretty-print response.
131+pjcPp :: Lens' ProjectsJobsCancel Bool
132+pjcPp = lens _pjcPp (\ s a -> s{_pjcPp = a})
133+
134+-- | OAuth access token.
135+pjcAccessToken :: Lens' ProjectsJobsCancel (Maybe Text)
136+pjcAccessToken
137+ = lens _pjcAccessToken
138+ (\ s a -> s{_pjcAccessToken = a})
139+
140+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
141+pjcUploadType :: Lens' ProjectsJobsCancel (Maybe Text)
142+pjcUploadType
143+ = lens _pjcUploadType
144+ (\ s a -> s{_pjcUploadType = a})
145+
146+-- | Multipart request metadata.
147+pjcPayload :: Lens' ProjectsJobsCancel GoogleCloudMlV1beta1__CancelJobRequest
148+pjcPayload
149+ = lens _pjcPayload (\ s a -> s{_pjcPayload = a})
150+
151+-- | OAuth bearer token.
152+pjcBearerToken :: Lens' ProjectsJobsCancel (Maybe Text)
153+pjcBearerToken
154+ = lens _pjcBearerToken
155+ (\ s a -> s{_pjcBearerToken = a})
156+
157+-- | Required. The name of the job to cancel. Authorization: requires
158+-- \`Editor\` role on the parent project.
159+pjcName :: Lens' ProjectsJobsCancel Text
160+pjcName = lens _pjcName (\ s a -> s{_pjcName = a})
161+
162+-- | JSONP
163+pjcCallback :: Lens' ProjectsJobsCancel (Maybe Text)
164+pjcCallback
165+ = lens _pjcCallback (\ s a -> s{_pjcCallback = a})
166+
167+instance GoogleRequest ProjectsJobsCancel where
168+ type Rs ProjectsJobsCancel = GoogleProtobuf__Empty
169+ type Scopes ProjectsJobsCancel =
170+ '["https://www.googleapis.com/auth/cloud-platform"]
171+ requestClient ProjectsJobsCancel'{..}
172+ = go _pjcName _pjcXgafv _pjcUploadProtocol
173+ (Just _pjcPp)
174+ _pjcAccessToken
175+ _pjcUploadType
176+ _pjcBearerToken
177+ _pjcCallback
178+ (Just AltJSON)
179+ _pjcPayload
180+ machineLearningService
181+ where go
182+ = buildClient
183+ (Proxy :: Proxy ProjectsJobsCancelResource)
184+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/Create.hsnew file+180
@@ -0,0 +1,180 @@
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.Ml.Projects.Jobs.Create
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Creates a training or a batch prediction job.
24+--
25+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.jobs.create@.
26+module Network.Google.Resource.Ml.Projects.Jobs.Create
27+ (
28+ -- * REST Resource
29+ ProjectsJobsCreateResource
30+
31+ -- * Creating a Request
32+ , projectsJobsCreate
33+ , ProjectsJobsCreate
34+
35+ -- * Request Lenses
36+ , pParent
37+ , pXgafv
38+ , pUploadProtocol
39+ , pPp
40+ , pAccessToken
41+ , pUploadType
42+ , pPayload
43+ , pBearerToken
44+ , pCallback
45+ ) where
46+
47+import Network.Google.MachineLearning.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @ml.projects.jobs.create@ method which the
51+-- 'ProjectsJobsCreate' request conforms to.
52+type ProjectsJobsCreateResource =
53+ "v1beta1" :>
54+ Capture "parent" Text :>
55+ "jobs" :>
56+ QueryParam "$.xgafv" Xgafv :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :>
64+ ReqBody '[JSON] GoogleCloudMlV1beta1__Job :>
65+ Post '[JSON] GoogleCloudMlV1beta1__Job
66+
67+-- | Creates a training or a batch prediction job.
68+--
69+-- /See:/ 'projectsJobsCreate' smart constructor.
70+data ProjectsJobsCreate = ProjectsJobsCreate'
71+ { _pParent :: !Text
72+ , _pXgafv :: !(Maybe Xgafv)
73+ , _pUploadProtocol :: !(Maybe Text)
74+ , _pPp :: !Bool
75+ , _pAccessToken :: !(Maybe Text)
76+ , _pUploadType :: !(Maybe Text)
77+ , _pPayload :: !GoogleCloudMlV1beta1__Job
78+ , _pBearerToken :: !(Maybe Text)
79+ , _pCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ProjectsJobsCreate' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'pParent'
87+--
88+-- * 'pXgafv'
89+--
90+-- * 'pUploadProtocol'
91+--
92+-- * 'pPp'
93+--
94+-- * 'pAccessToken'
95+--
96+-- * 'pUploadType'
97+--
98+-- * 'pPayload'
99+--
100+-- * 'pBearerToken'
101+--
102+-- * 'pCallback'
103+projectsJobsCreate
104+ :: Text -- ^ 'pParent'
105+ -> GoogleCloudMlV1beta1__Job -- ^ 'pPayload'
106+ -> ProjectsJobsCreate
107+projectsJobsCreate pPParent_ pPPayload_ =
108+ ProjectsJobsCreate'
109+ { _pParent = pPParent_
110+ , _pXgafv = Nothing
111+ , _pUploadProtocol = Nothing
112+ , _pPp = True
113+ , _pAccessToken = Nothing
114+ , _pUploadType = Nothing
115+ , _pPayload = pPPayload_
116+ , _pBearerToken = Nothing
117+ , _pCallback = Nothing
118+ }
119+
120+-- | Required. The project name. Authorization: requires \`Editor\` role on
121+-- the specified project.
122+pParent :: Lens' ProjectsJobsCreate Text
123+pParent = lens _pParent (\ s a -> s{_pParent = a})
124+
125+-- | V1 error format.
126+pXgafv :: Lens' ProjectsJobsCreate (Maybe Xgafv)
127+pXgafv = lens _pXgafv (\ s a -> s{_pXgafv = a})
128+
129+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
130+pUploadProtocol :: Lens' ProjectsJobsCreate (Maybe Text)
131+pUploadProtocol
132+ = lens _pUploadProtocol
133+ (\ s a -> s{_pUploadProtocol = a})
134+
135+-- | Pretty-print response.
136+pPp :: Lens' ProjectsJobsCreate Bool
137+pPp = lens _pPp (\ s a -> s{_pPp = a})
138+
139+-- | OAuth access token.
140+pAccessToken :: Lens' ProjectsJobsCreate (Maybe Text)
141+pAccessToken
142+ = lens _pAccessToken (\ s a -> s{_pAccessToken = a})
143+
144+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
145+pUploadType :: Lens' ProjectsJobsCreate (Maybe Text)
146+pUploadType
147+ = lens _pUploadType (\ s a -> s{_pUploadType = a})
148+
149+-- | Multipart request metadata.
150+pPayload :: Lens' ProjectsJobsCreate GoogleCloudMlV1beta1__Job
151+pPayload = lens _pPayload (\ s a -> s{_pPayload = a})
152+
153+-- | OAuth bearer token.
154+pBearerToken :: Lens' ProjectsJobsCreate (Maybe Text)
155+pBearerToken
156+ = lens _pBearerToken (\ s a -> s{_pBearerToken = a})
157+
158+-- | JSONP
159+pCallback :: Lens' ProjectsJobsCreate (Maybe Text)
160+pCallback
161+ = lens _pCallback (\ s a -> s{_pCallback = a})
162+
163+instance GoogleRequest ProjectsJobsCreate where
164+ type Rs ProjectsJobsCreate =
165+ GoogleCloudMlV1beta1__Job
166+ type Scopes ProjectsJobsCreate =
167+ '["https://www.googleapis.com/auth/cloud-platform"]
168+ requestClient ProjectsJobsCreate'{..}
169+ = go _pParent _pXgafv _pUploadProtocol (Just _pPp)
170+ _pAccessToken
171+ _pUploadType
172+ _pBearerToken
173+ _pCallback
174+ (Just AltJSON)
175+ _pPayload
176+ machineLearningService
177+ where go
178+ = buildClient
179+ (Proxy :: Proxy ProjectsJobsCreateResource)
180+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/Get.hsnew file+170
@@ -0,0 +1,170 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Ml.Projects.Jobs.Get
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Describes a job.
24+--
25+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.jobs.get@.
26+module Network.Google.Resource.Ml.Projects.Jobs.Get
27+ (
28+ -- * REST Resource
29+ ProjectsJobsGetResource
30+
31+ -- * Creating a Request
32+ , projectsJobsGet
33+ , ProjectsJobsGet
34+
35+ -- * Request Lenses
36+ , pjgXgafv
37+ , pjgUploadProtocol
38+ , pjgPp
39+ , pjgAccessToken
40+ , pjgUploadType
41+ , pjgBearerToken
42+ , pjgName
43+ , pjgCallback
44+ ) where
45+
46+import Network.Google.MachineLearning.Types
47+import Network.Google.Prelude
48+
49+-- | A resource alias for @ml.projects.jobs.get@ method which the
50+-- 'ProjectsJobsGet' request conforms to.
51+type ProjectsJobsGetResource =
52+ "v1beta1" :>
53+ Capture "name" Text :>
54+ QueryParam "$.xgafv" Xgafv :>
55+ QueryParam "upload_protocol" Text :>
56+ QueryParam "pp" Bool :>
57+ QueryParam "access_token" Text :>
58+ QueryParam "uploadType" Text :>
59+ QueryParam "bearer_token" Text :>
60+ QueryParam "callback" Text :>
61+ QueryParam "alt" AltJSON :>
62+ Get '[JSON] GoogleCloudMlV1beta1__Job
63+
64+-- | Describes a job.
65+--
66+-- /See:/ 'projectsJobsGet' smart constructor.
67+data ProjectsJobsGet = ProjectsJobsGet'
68+ { _pjgXgafv :: !(Maybe Xgafv)
69+ , _pjgUploadProtocol :: !(Maybe Text)
70+ , _pjgPp :: !Bool
71+ , _pjgAccessToken :: !(Maybe Text)
72+ , _pjgUploadType :: !(Maybe Text)
73+ , _pjgBearerToken :: !(Maybe Text)
74+ , _pjgName :: !Text
75+ , _pjgCallback :: !(Maybe Text)
76+ } deriving (Eq,Show,Data,Typeable,Generic)
77+
78+-- | Creates a value of 'ProjectsJobsGet' with the minimum fields required to make a request.
79+--
80+-- Use one of the following lenses to modify other fields as desired:
81+--
82+-- * 'pjgXgafv'
83+--
84+-- * 'pjgUploadProtocol'
85+--
86+-- * 'pjgPp'
87+--
88+-- * 'pjgAccessToken'
89+--
90+-- * 'pjgUploadType'
91+--
92+-- * 'pjgBearerToken'
93+--
94+-- * 'pjgName'
95+--
96+-- * 'pjgCallback'
97+projectsJobsGet
98+ :: Text -- ^ 'pjgName'
99+ -> ProjectsJobsGet
100+projectsJobsGet pPjgName_ =
101+ ProjectsJobsGet'
102+ { _pjgXgafv = Nothing
103+ , _pjgUploadProtocol = Nothing
104+ , _pjgPp = True
105+ , _pjgAccessToken = Nothing
106+ , _pjgUploadType = Nothing
107+ , _pjgBearerToken = Nothing
108+ , _pjgName = pPjgName_
109+ , _pjgCallback = Nothing
110+ }
111+
112+-- | V1 error format.
113+pjgXgafv :: Lens' ProjectsJobsGet (Maybe Xgafv)
114+pjgXgafv = lens _pjgXgafv (\ s a -> s{_pjgXgafv = a})
115+
116+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
117+pjgUploadProtocol :: Lens' ProjectsJobsGet (Maybe Text)
118+pjgUploadProtocol
119+ = lens _pjgUploadProtocol
120+ (\ s a -> s{_pjgUploadProtocol = a})
121+
122+-- | Pretty-print response.
123+pjgPp :: Lens' ProjectsJobsGet Bool
124+pjgPp = lens _pjgPp (\ s a -> s{_pjgPp = a})
125+
126+-- | OAuth access token.
127+pjgAccessToken :: Lens' ProjectsJobsGet (Maybe Text)
128+pjgAccessToken
129+ = lens _pjgAccessToken
130+ (\ s a -> s{_pjgAccessToken = a})
131+
132+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
133+pjgUploadType :: Lens' ProjectsJobsGet (Maybe Text)
134+pjgUploadType
135+ = lens _pjgUploadType
136+ (\ s a -> s{_pjgUploadType = a})
137+
138+-- | OAuth bearer token.
139+pjgBearerToken :: Lens' ProjectsJobsGet (Maybe Text)
140+pjgBearerToken
141+ = lens _pjgBearerToken
142+ (\ s a -> s{_pjgBearerToken = a})
143+
144+-- | Required. The name of the job to get the description of. Authorization:
145+-- requires \`Viewer\` role on the parent project.
146+pjgName :: Lens' ProjectsJobsGet Text
147+pjgName = lens _pjgName (\ s a -> s{_pjgName = a})
148+
149+-- | JSONP
150+pjgCallback :: Lens' ProjectsJobsGet (Maybe Text)
151+pjgCallback
152+ = lens _pjgCallback (\ s a -> s{_pjgCallback = a})
153+
154+instance GoogleRequest ProjectsJobsGet where
155+ type Rs ProjectsJobsGet = GoogleCloudMlV1beta1__Job
156+ type Scopes ProjectsJobsGet =
157+ '["https://www.googleapis.com/auth/cloud-platform"]
158+ requestClient ProjectsJobsGet'{..}
159+ = go _pjgName _pjgXgafv _pjgUploadProtocol
160+ (Just _pjgPp)
161+ _pjgAccessToken
162+ _pjgUploadType
163+ _pjgBearerToken
164+ _pjgCallback
165+ (Just AltJSON)
166+ machineLearningService
167+ where go
168+ = buildClient
169+ (Proxy :: Proxy ProjectsJobsGetResource)
170+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/List.hsnew file+216
@@ -0,0 +1,216 @@
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.Ml.Projects.Jobs.List
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Lists the jobs in the project.
24+--
25+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.jobs.list@.
26+module Network.Google.Resource.Ml.Projects.Jobs.List
27+ (
28+ -- * REST Resource
29+ ProjectsJobsListResource
30+
31+ -- * Creating a Request
32+ , projectsJobsList
33+ , ProjectsJobsList
34+
35+ -- * Request Lenses
36+ , pjlParent
37+ , pjlXgafv
38+ , pjlUploadProtocol
39+ , pjlPp
40+ , pjlAccessToken
41+ , pjlUploadType
42+ , pjlBearerToken
43+ , pjlFilter
44+ , pjlPageToken
45+ , pjlPageSize
46+ , pjlCallback
47+ ) where
48+
49+import Network.Google.MachineLearning.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @ml.projects.jobs.list@ method which the
53+-- 'ProjectsJobsList' request conforms to.
54+type ProjectsJobsListResource =
55+ "v1beta1" :>
56+ Capture "parent" Text :>
57+ "jobs" :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "filter" Text :>
65+ QueryParam "pageToken" Text :>
66+ QueryParam "pageSize" (Textual Int32) :>
67+ QueryParam "callback" Text :>
68+ QueryParam "alt" AltJSON :>
69+ Get '[JSON]
70+ GoogleCloudMlV1beta1__ListJobsResponse
71+
72+-- | Lists the jobs in the project.
73+--
74+-- /See:/ 'projectsJobsList' smart constructor.
75+data ProjectsJobsList = ProjectsJobsList'
76+ { _pjlParent :: !Text
77+ , _pjlXgafv :: !(Maybe Xgafv)
78+ , _pjlUploadProtocol :: !(Maybe Text)
79+ , _pjlPp :: !Bool
80+ , _pjlAccessToken :: !(Maybe Text)
81+ , _pjlUploadType :: !(Maybe Text)
82+ , _pjlBearerToken :: !(Maybe Text)
83+ , _pjlFilter :: !(Maybe Text)
84+ , _pjlPageToken :: !(Maybe Text)
85+ , _pjlPageSize :: !(Maybe (Textual Int32))
86+ , _pjlCallback :: !(Maybe Text)
87+ } deriving (Eq,Show,Data,Typeable,Generic)
88+
89+-- | Creates a value of 'ProjectsJobsList' 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+-- * 'pjlParent'
94+--
95+-- * 'pjlXgafv'
96+--
97+-- * 'pjlUploadProtocol'
98+--
99+-- * 'pjlPp'
100+--
101+-- * 'pjlAccessToken'
102+--
103+-- * 'pjlUploadType'
104+--
105+-- * 'pjlBearerToken'
106+--
107+-- * 'pjlFilter'
108+--
109+-- * 'pjlPageToken'
110+--
111+-- * 'pjlPageSize'
112+--
113+-- * 'pjlCallback'
114+projectsJobsList
115+ :: Text -- ^ 'pjlParent'
116+ -> ProjectsJobsList
117+projectsJobsList pPjlParent_ =
118+ ProjectsJobsList'
119+ { _pjlParent = pPjlParent_
120+ , _pjlXgafv = Nothing
121+ , _pjlUploadProtocol = Nothing
122+ , _pjlPp = True
123+ , _pjlAccessToken = Nothing
124+ , _pjlUploadType = Nothing
125+ , _pjlBearerToken = Nothing
126+ , _pjlFilter = Nothing
127+ , _pjlPageToken = Nothing
128+ , _pjlPageSize = Nothing
129+ , _pjlCallback = Nothing
130+ }
131+
132+-- | Required. The name of the project for which to list jobs. Authorization:
133+-- requires \`Viewer\` role on the specified project.
134+pjlParent :: Lens' ProjectsJobsList Text
135+pjlParent
136+ = lens _pjlParent (\ s a -> s{_pjlParent = a})
137+
138+-- | V1 error format.
139+pjlXgafv :: Lens' ProjectsJobsList (Maybe Xgafv)
140+pjlXgafv = lens _pjlXgafv (\ s a -> s{_pjlXgafv = a})
141+
142+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
143+pjlUploadProtocol :: Lens' ProjectsJobsList (Maybe Text)
144+pjlUploadProtocol
145+ = lens _pjlUploadProtocol
146+ (\ s a -> s{_pjlUploadProtocol = a})
147+
148+-- | Pretty-print response.
149+pjlPp :: Lens' ProjectsJobsList Bool
150+pjlPp = lens _pjlPp (\ s a -> s{_pjlPp = a})
151+
152+-- | OAuth access token.
153+pjlAccessToken :: Lens' ProjectsJobsList (Maybe Text)
154+pjlAccessToken
155+ = lens _pjlAccessToken
156+ (\ s a -> s{_pjlAccessToken = a})
157+
158+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
159+pjlUploadType :: Lens' ProjectsJobsList (Maybe Text)
160+pjlUploadType
161+ = lens _pjlUploadType
162+ (\ s a -> s{_pjlUploadType = a})
163+
164+-- | OAuth bearer token.
165+pjlBearerToken :: Lens' ProjectsJobsList (Maybe Text)
166+pjlBearerToken
167+ = lens _pjlBearerToken
168+ (\ s a -> s{_pjlBearerToken = a})
169+
170+-- | Optional. Specifies the subset of jobs to retrieve.
171+pjlFilter :: Lens' ProjectsJobsList (Maybe Text)
172+pjlFilter
173+ = lens _pjlFilter (\ s a -> s{_pjlFilter = a})
174+
175+-- | Optional. A page token to request the next page of results. You get the
176+-- token from the \`next_page_token\` field of the response from the
177+-- previous call.
178+pjlPageToken :: Lens' ProjectsJobsList (Maybe Text)
179+pjlPageToken
180+ = lens _pjlPageToken (\ s a -> s{_pjlPageToken = a})
181+
182+-- | Optional. The number of jobs to retrieve per \"page\" of results. If
183+-- there are more remaining results than this number, the response message
184+-- will contain a valid value in the \`next_page_token\` field. The default
185+-- value is 20, and the maximum page size is 100.
186+pjlPageSize :: Lens' ProjectsJobsList (Maybe Int32)
187+pjlPageSize
188+ = lens _pjlPageSize (\ s a -> s{_pjlPageSize = a}) .
189+ mapping _Coerce
190+
191+-- | JSONP
192+pjlCallback :: Lens' ProjectsJobsList (Maybe Text)
193+pjlCallback
194+ = lens _pjlCallback (\ s a -> s{_pjlCallback = a})
195+
196+instance GoogleRequest ProjectsJobsList where
197+ type Rs ProjectsJobsList =
198+ GoogleCloudMlV1beta1__ListJobsResponse
199+ type Scopes ProjectsJobsList =
200+ '["https://www.googleapis.com/auth/cloud-platform"]
201+ requestClient ProjectsJobsList'{..}
202+ = go _pjlParent _pjlXgafv _pjlUploadProtocol
203+ (Just _pjlPp)
204+ _pjlAccessToken
205+ _pjlUploadType
206+ _pjlBearerToken
207+ _pjlFilter
208+ _pjlPageToken
209+ _pjlPageSize
210+ _pjlCallback
211+ (Just AltJSON)
212+ machineLearningService
213+ where go
214+ = buildClient
215+ (Proxy :: Proxy ProjectsJobsListResource)
216+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Create.hsnew file+192
@@ -0,0 +1,192 @@
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.Ml.Projects.Models.Create
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Creates a model which will later contain one or more versions. You must
24+-- add at least one version before you can request predictions from the
25+-- model. Add versions by calling
26+-- [projects.models.versions.create](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/create).
27+--
28+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.models.create@.
29+module Network.Google.Resource.Ml.Projects.Models.Create
30+ (
31+ -- * REST Resource
32+ ProjectsModelsCreateResource
33+
34+ -- * Creating a Request
35+ , projectsModelsCreate
36+ , ProjectsModelsCreate
37+
38+ -- * Request Lenses
39+ , pmcParent
40+ , pmcXgafv
41+ , pmcUploadProtocol
42+ , pmcPp
43+ , pmcAccessToken
44+ , pmcUploadType
45+ , pmcPayload
46+ , pmcBearerToken
47+ , pmcCallback
48+ ) where
49+
50+import Network.Google.MachineLearning.Types
51+import Network.Google.Prelude
52+
53+-- | A resource alias for @ml.projects.models.create@ method which the
54+-- 'ProjectsModelsCreate' request conforms to.
55+type ProjectsModelsCreateResource =
56+ "v1beta1" :>
57+ Capture "parent" Text :>
58+ "models" :>
59+ QueryParam "$.xgafv" Xgafv :>
60+ QueryParam "upload_protocol" Text :>
61+ QueryParam "pp" Bool :>
62+ QueryParam "access_token" Text :>
63+ QueryParam "uploadType" Text :>
64+ QueryParam "bearer_token" Text :>
65+ QueryParam "callback" Text :>
66+ QueryParam "alt" AltJSON :>
67+ ReqBody '[JSON] GoogleCloudMlV1beta1__Model :>
68+ Post '[JSON] GoogleCloudMlV1beta1__Model
69+
70+-- | Creates a model which will later contain one or more versions. You must
71+-- add at least one version before you can request predictions from the
72+-- model. Add versions by calling
73+-- [projects.models.versions.create](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/create).
74+--
75+-- /See:/ 'projectsModelsCreate' smart constructor.
76+data ProjectsModelsCreate = ProjectsModelsCreate'
77+ { _pmcParent :: !Text
78+ , _pmcXgafv :: !(Maybe Xgafv)
79+ , _pmcUploadProtocol :: !(Maybe Text)
80+ , _pmcPp :: !Bool
81+ , _pmcAccessToken :: !(Maybe Text)
82+ , _pmcUploadType :: !(Maybe Text)
83+ , _pmcPayload :: !GoogleCloudMlV1beta1__Model
84+ , _pmcBearerToken :: !(Maybe Text)
85+ , _pmcCallback :: !(Maybe Text)
86+ } deriving (Eq,Show,Data,Typeable,Generic)
87+
88+-- | Creates a value of 'ProjectsModelsCreate' with the minimum fields required to make a request.
89+--
90+-- Use one of the following lenses to modify other fields as desired:
91+--
92+-- * 'pmcParent'
93+--
94+-- * 'pmcXgafv'
95+--
96+-- * 'pmcUploadProtocol'
97+--
98+-- * 'pmcPp'
99+--
100+-- * 'pmcAccessToken'
101+--
102+-- * 'pmcUploadType'
103+--
104+-- * 'pmcPayload'
105+--
106+-- * 'pmcBearerToken'
107+--
108+-- * 'pmcCallback'
109+projectsModelsCreate
110+ :: Text -- ^ 'pmcParent'
111+ -> GoogleCloudMlV1beta1__Model -- ^ 'pmcPayload'
112+ -> ProjectsModelsCreate
113+projectsModelsCreate pPmcParent_ pPmcPayload_ =
114+ ProjectsModelsCreate'
115+ { _pmcParent = pPmcParent_
116+ , _pmcXgafv = Nothing
117+ , _pmcUploadProtocol = Nothing
118+ , _pmcPp = True
119+ , _pmcAccessToken = Nothing
120+ , _pmcUploadType = Nothing
121+ , _pmcPayload = pPmcPayload_
122+ , _pmcBearerToken = Nothing
123+ , _pmcCallback = Nothing
124+ }
125+
126+-- | Required. The project name. Authorization: requires \`Editor\` role on
127+-- the specified project.
128+pmcParent :: Lens' ProjectsModelsCreate Text
129+pmcParent
130+ = lens _pmcParent (\ s a -> s{_pmcParent = a})
131+
132+-- | V1 error format.
133+pmcXgafv :: Lens' ProjectsModelsCreate (Maybe Xgafv)
134+pmcXgafv = lens _pmcXgafv (\ s a -> s{_pmcXgafv = a})
135+
136+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
137+pmcUploadProtocol :: Lens' ProjectsModelsCreate (Maybe Text)
138+pmcUploadProtocol
139+ = lens _pmcUploadProtocol
140+ (\ s a -> s{_pmcUploadProtocol = a})
141+
142+-- | Pretty-print response.
143+pmcPp :: Lens' ProjectsModelsCreate Bool
144+pmcPp = lens _pmcPp (\ s a -> s{_pmcPp = a})
145+
146+-- | OAuth access token.
147+pmcAccessToken :: Lens' ProjectsModelsCreate (Maybe Text)
148+pmcAccessToken
149+ = lens _pmcAccessToken
150+ (\ s a -> s{_pmcAccessToken = a})
151+
152+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
153+pmcUploadType :: Lens' ProjectsModelsCreate (Maybe Text)
154+pmcUploadType
155+ = lens _pmcUploadType
156+ (\ s a -> s{_pmcUploadType = a})
157+
158+-- | Multipart request metadata.
159+pmcPayload :: Lens' ProjectsModelsCreate GoogleCloudMlV1beta1__Model
160+pmcPayload
161+ = lens _pmcPayload (\ s a -> s{_pmcPayload = a})
162+
163+-- | OAuth bearer token.
164+pmcBearerToken :: Lens' ProjectsModelsCreate (Maybe Text)
165+pmcBearerToken
166+ = lens _pmcBearerToken
167+ (\ s a -> s{_pmcBearerToken = a})
168+
169+-- | JSONP
170+pmcCallback :: Lens' ProjectsModelsCreate (Maybe Text)
171+pmcCallback
172+ = lens _pmcCallback (\ s a -> s{_pmcCallback = a})
173+
174+instance GoogleRequest ProjectsModelsCreate where
175+ type Rs ProjectsModelsCreate =
176+ GoogleCloudMlV1beta1__Model
177+ type Scopes ProjectsModelsCreate =
178+ '["https://www.googleapis.com/auth/cloud-platform"]
179+ requestClient ProjectsModelsCreate'{..}
180+ = go _pmcParent _pmcXgafv _pmcUploadProtocol
181+ (Just _pmcPp)
182+ _pmcAccessToken
183+ _pmcUploadType
184+ _pmcBearerToken
185+ _pmcCallback
186+ (Just AltJSON)
187+ _pmcPayload
188+ machineLearningService
189+ where go
190+ = buildClient
191+ (Proxy :: Proxy ProjectsModelsCreateResource)
192+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/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.Ml.Projects.Models.Delete
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Deletes a model. You can only delete a model if there are no versions in
24+-- it. You can delete versions by calling
25+-- [projects.models.versions.delete](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/delete).
26+--
27+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.models.delete@.
28+module Network.Google.Resource.Ml.Projects.Models.Delete
29+ (
30+ -- * REST Resource
31+ ProjectsModelsDeleteResource
32+
33+ -- * Creating a Request
34+ , projectsModelsDelete
35+ , ProjectsModelsDelete
36+
37+ -- * Request Lenses
38+ , pmdXgafv
39+ , pmdUploadProtocol
40+ , pmdPp
41+ , pmdAccessToken
42+ , pmdUploadType
43+ , pmdBearerToken
44+ , pmdName
45+ , pmdCallback
46+ ) where
47+
48+import Network.Google.MachineLearning.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @ml.projects.models.delete@ method which the
52+-- 'ProjectsModelsDelete' request conforms to.
53+type ProjectsModelsDeleteResource =
54+ "v1beta1" :>
55+ Capture "name" Text :>
56+ QueryParam "$.xgafv" Xgafv :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :>
64+ Delete '[JSON] GoogleLongrunning__Operation
65+
66+-- | Deletes a model. You can only delete a model if there are no versions in
67+-- it. You can delete versions by calling
68+-- [projects.models.versions.delete](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/delete).
69+--
70+-- /See:/ 'projectsModelsDelete' smart constructor.
71+data ProjectsModelsDelete = ProjectsModelsDelete'
72+ { _pmdXgafv :: !(Maybe Xgafv)
73+ , _pmdUploadProtocol :: !(Maybe Text)
74+ , _pmdPp :: !Bool
75+ , _pmdAccessToken :: !(Maybe Text)
76+ , _pmdUploadType :: !(Maybe Text)
77+ , _pmdBearerToken :: !(Maybe Text)
78+ , _pmdName :: !Text
79+ , _pmdCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ProjectsModelsDelete' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'pmdXgafv'
87+--
88+-- * 'pmdUploadProtocol'
89+--
90+-- * 'pmdPp'
91+--
92+-- * 'pmdAccessToken'
93+--
94+-- * 'pmdUploadType'
95+--
96+-- * 'pmdBearerToken'
97+--
98+-- * 'pmdName'
99+--
100+-- * 'pmdCallback'
101+projectsModelsDelete
102+ :: Text -- ^ 'pmdName'
103+ -> ProjectsModelsDelete
104+projectsModelsDelete pPmdName_ =
105+ ProjectsModelsDelete'
106+ { _pmdXgafv = Nothing
107+ , _pmdUploadProtocol = Nothing
108+ , _pmdPp = True
109+ , _pmdAccessToken = Nothing
110+ , _pmdUploadType = Nothing
111+ , _pmdBearerToken = Nothing
112+ , _pmdName = pPmdName_
113+ , _pmdCallback = Nothing
114+ }
115+
116+-- | V1 error format.
117+pmdXgafv :: Lens' ProjectsModelsDelete (Maybe Xgafv)
118+pmdXgafv = lens _pmdXgafv (\ s a -> s{_pmdXgafv = a})
119+
120+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
121+pmdUploadProtocol :: Lens' ProjectsModelsDelete (Maybe Text)
122+pmdUploadProtocol
123+ = lens _pmdUploadProtocol
124+ (\ s a -> s{_pmdUploadProtocol = a})
125+
126+-- | Pretty-print response.
127+pmdPp :: Lens' ProjectsModelsDelete Bool
128+pmdPp = lens _pmdPp (\ s a -> s{_pmdPp = a})
129+
130+-- | OAuth access token.
131+pmdAccessToken :: Lens' ProjectsModelsDelete (Maybe Text)
132+pmdAccessToken
133+ = lens _pmdAccessToken
134+ (\ s a -> s{_pmdAccessToken = a})
135+
136+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
137+pmdUploadType :: Lens' ProjectsModelsDelete (Maybe Text)
138+pmdUploadType
139+ = lens _pmdUploadType
140+ (\ s a -> s{_pmdUploadType = a})
141+
142+-- | OAuth bearer token.
143+pmdBearerToken :: Lens' ProjectsModelsDelete (Maybe Text)
144+pmdBearerToken
145+ = lens _pmdBearerToken
146+ (\ s a -> s{_pmdBearerToken = a})
147+
148+-- | Required. The name of the model. Authorization: requires \`Editor\` role
149+-- on the parent project.
150+pmdName :: Lens' ProjectsModelsDelete Text
151+pmdName = lens _pmdName (\ s a -> s{_pmdName = a})
152+
153+-- | JSONP
154+pmdCallback :: Lens' ProjectsModelsDelete (Maybe Text)
155+pmdCallback
156+ = lens _pmdCallback (\ s a -> s{_pmdCallback = a})
157+
158+instance GoogleRequest ProjectsModelsDelete where
159+ type Rs ProjectsModelsDelete =
160+ GoogleLongrunning__Operation
161+ type Scopes ProjectsModelsDelete =
162+ '["https://www.googleapis.com/auth/cloud-platform"]
163+ requestClient ProjectsModelsDelete'{..}
164+ = go _pmdName _pmdXgafv _pmdUploadProtocol
165+ (Just _pmdPp)
166+ _pmdAccessToken
167+ _pmdUploadType
168+ _pmdBearerToken
169+ _pmdCallback
170+ (Just AltJSON)
171+ machineLearningService
172+ where go
173+ = buildClient
174+ (Proxy :: Proxy ProjectsModelsDeleteResource)
175+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Get.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.Ml.Projects.Models.Get
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Gets information about a model, including its name, the description (if
24+-- set), and the default version (if at least one version of the model has
25+-- been deployed).
26+--
27+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.models.get@.
28+module Network.Google.Resource.Ml.Projects.Models.Get
29+ (
30+ -- * REST Resource
31+ ProjectsModelsGetResource
32+
33+ -- * Creating a Request
34+ , projectsModelsGet
35+ , ProjectsModelsGet
36+
37+ -- * Request Lenses
38+ , pmgXgafv
39+ , pmgUploadProtocol
40+ , pmgPp
41+ , pmgAccessToken
42+ , pmgUploadType
43+ , pmgBearerToken
44+ , pmgName
45+ , pmgCallback
46+ ) where
47+
48+import Network.Google.MachineLearning.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @ml.projects.models.get@ method which the
52+-- 'ProjectsModelsGet' request conforms to.
53+type ProjectsModelsGetResource =
54+ "v1beta1" :>
55+ Capture "name" Text :>
56+ QueryParam "$.xgafv" Xgafv :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :>
64+ Get '[JSON] GoogleCloudMlV1beta1__Model
65+
66+-- | Gets information about a model, including its name, the description (if
67+-- set), and the default version (if at least one version of the model has
68+-- been deployed).
69+--
70+-- /See:/ 'projectsModelsGet' smart constructor.
71+data ProjectsModelsGet = ProjectsModelsGet'
72+ { _pmgXgafv :: !(Maybe Xgafv)
73+ , _pmgUploadProtocol :: !(Maybe Text)
74+ , _pmgPp :: !Bool
75+ , _pmgAccessToken :: !(Maybe Text)
76+ , _pmgUploadType :: !(Maybe Text)
77+ , _pmgBearerToken :: !(Maybe Text)
78+ , _pmgName :: !Text
79+ , _pmgCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ProjectsModelsGet' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'pmgXgafv'
87+--
88+-- * 'pmgUploadProtocol'
89+--
90+-- * 'pmgPp'
91+--
92+-- * 'pmgAccessToken'
93+--
94+-- * 'pmgUploadType'
95+--
96+-- * 'pmgBearerToken'
97+--
98+-- * 'pmgName'
99+--
100+-- * 'pmgCallback'
101+projectsModelsGet
102+ :: Text -- ^ 'pmgName'
103+ -> ProjectsModelsGet
104+projectsModelsGet pPmgName_ =
105+ ProjectsModelsGet'
106+ { _pmgXgafv = Nothing
107+ , _pmgUploadProtocol = Nothing
108+ , _pmgPp = True
109+ , _pmgAccessToken = Nothing
110+ , _pmgUploadType = Nothing
111+ , _pmgBearerToken = Nothing
112+ , _pmgName = pPmgName_
113+ , _pmgCallback = Nothing
114+ }
115+
116+-- | V1 error format.
117+pmgXgafv :: Lens' ProjectsModelsGet (Maybe Xgafv)
118+pmgXgafv = lens _pmgXgafv (\ s a -> s{_pmgXgafv = a})
119+
120+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
121+pmgUploadProtocol :: Lens' ProjectsModelsGet (Maybe Text)
122+pmgUploadProtocol
123+ = lens _pmgUploadProtocol
124+ (\ s a -> s{_pmgUploadProtocol = a})
125+
126+-- | Pretty-print response.
127+pmgPp :: Lens' ProjectsModelsGet Bool
128+pmgPp = lens _pmgPp (\ s a -> s{_pmgPp = a})
129+
130+-- | OAuth access token.
131+pmgAccessToken :: Lens' ProjectsModelsGet (Maybe Text)
132+pmgAccessToken
133+ = lens _pmgAccessToken
134+ (\ s a -> s{_pmgAccessToken = a})
135+
136+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
137+pmgUploadType :: Lens' ProjectsModelsGet (Maybe Text)
138+pmgUploadType
139+ = lens _pmgUploadType
140+ (\ s a -> s{_pmgUploadType = a})
141+
142+-- | OAuth bearer token.
143+pmgBearerToken :: Lens' ProjectsModelsGet (Maybe Text)
144+pmgBearerToken
145+ = lens _pmgBearerToken
146+ (\ s a -> s{_pmgBearerToken = a})
147+
148+-- | Required. The name of the model. Authorization: requires \`Viewer\` role
149+-- on the parent project.
150+pmgName :: Lens' ProjectsModelsGet Text
151+pmgName = lens _pmgName (\ s a -> s{_pmgName = a})
152+
153+-- | JSONP
154+pmgCallback :: Lens' ProjectsModelsGet (Maybe Text)
155+pmgCallback
156+ = lens _pmgCallback (\ s a -> s{_pmgCallback = a})
157+
158+instance GoogleRequest ProjectsModelsGet where
159+ type Rs ProjectsModelsGet =
160+ GoogleCloudMlV1beta1__Model
161+ type Scopes ProjectsModelsGet =
162+ '["https://www.googleapis.com/auth/cloud-platform"]
163+ requestClient ProjectsModelsGet'{..}
164+ = go _pmgName _pmgXgafv _pmgUploadProtocol
165+ (Just _pmgPp)
166+ _pmgAccessToken
167+ _pmgUploadType
168+ _pmgBearerToken
169+ _pmgCallback
170+ (Just AltJSON)
171+ machineLearningService
172+ where go
173+ = buildClient
174+ (Proxy :: Proxy ProjectsModelsGetResource)
175+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/List.hsnew file+206
@@ -0,0 +1,206 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Ml.Projects.Models.List
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Lists the models in a project. Each project can contain multiple models,
24+-- and each model can have multiple versions.
25+--
26+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.models.list@.
27+module Network.Google.Resource.Ml.Projects.Models.List
28+ (
29+ -- * REST Resource
30+ ProjectsModelsListResource
31+
32+ -- * Creating a Request
33+ , projectsModelsList
34+ , ProjectsModelsList
35+
36+ -- * Request Lenses
37+ , pmlParent
38+ , pmlXgafv
39+ , pmlUploadProtocol
40+ , pmlPp
41+ , pmlAccessToken
42+ , pmlUploadType
43+ , pmlBearerToken
44+ , pmlPageToken
45+ , pmlPageSize
46+ , pmlCallback
47+ ) where
48+
49+import Network.Google.MachineLearning.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @ml.projects.models.list@ method which the
53+-- 'ProjectsModelsList' request conforms to.
54+type ProjectsModelsListResource =
55+ "v1beta1" :>
56+ Capture "parent" Text :>
57+ "models" :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "pageToken" Text :>
65+ QueryParam "pageSize" (Textual Int32) :>
66+ QueryParam "callback" Text :>
67+ QueryParam "alt" AltJSON :>
68+ Get '[JSON]
69+ GoogleCloudMlV1beta1__ListModelsResponse
70+
71+-- | Lists the models in a project. Each project can contain multiple models,
72+-- and each model can have multiple versions.
73+--
74+-- /See:/ 'projectsModelsList' smart constructor.
75+data ProjectsModelsList = ProjectsModelsList'
76+ { _pmlParent :: !Text
77+ , _pmlXgafv :: !(Maybe Xgafv)
78+ , _pmlUploadProtocol :: !(Maybe Text)
79+ , _pmlPp :: !Bool
80+ , _pmlAccessToken :: !(Maybe Text)
81+ , _pmlUploadType :: !(Maybe Text)
82+ , _pmlBearerToken :: !(Maybe Text)
83+ , _pmlPageToken :: !(Maybe Text)
84+ , _pmlPageSize :: !(Maybe (Textual Int32))
85+ , _pmlCallback :: !(Maybe Text)
86+ } deriving (Eq,Show,Data,Typeable,Generic)
87+
88+-- | Creates a value of 'ProjectsModelsList' with the minimum fields required to make a request.
89+--
90+-- Use one of the following lenses to modify other fields as desired:
91+--
92+-- * 'pmlParent'
93+--
94+-- * 'pmlXgafv'
95+--
96+-- * 'pmlUploadProtocol'
97+--
98+-- * 'pmlPp'
99+--
100+-- * 'pmlAccessToken'
101+--
102+-- * 'pmlUploadType'
103+--
104+-- * 'pmlBearerToken'
105+--
106+-- * 'pmlPageToken'
107+--
108+-- * 'pmlPageSize'
109+--
110+-- * 'pmlCallback'
111+projectsModelsList
112+ :: Text -- ^ 'pmlParent'
113+ -> ProjectsModelsList
114+projectsModelsList pPmlParent_ =
115+ ProjectsModelsList'
116+ { _pmlParent = pPmlParent_
117+ , _pmlXgafv = Nothing
118+ , _pmlUploadProtocol = Nothing
119+ , _pmlPp = True
120+ , _pmlAccessToken = Nothing
121+ , _pmlUploadType = Nothing
122+ , _pmlBearerToken = Nothing
123+ , _pmlPageToken = Nothing
124+ , _pmlPageSize = Nothing
125+ , _pmlCallback = Nothing
126+ }
127+
128+-- | Required. The name of the project whose models are to be listed.
129+-- Authorization: requires \`Viewer\` role on the specified project.
130+pmlParent :: Lens' ProjectsModelsList Text
131+pmlParent
132+ = lens _pmlParent (\ s a -> s{_pmlParent = a})
133+
134+-- | V1 error format.
135+pmlXgafv :: Lens' ProjectsModelsList (Maybe Xgafv)
136+pmlXgafv = lens _pmlXgafv (\ s a -> s{_pmlXgafv = a})
137+
138+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
139+pmlUploadProtocol :: Lens' ProjectsModelsList (Maybe Text)
140+pmlUploadProtocol
141+ = lens _pmlUploadProtocol
142+ (\ s a -> s{_pmlUploadProtocol = a})
143+
144+-- | Pretty-print response.
145+pmlPp :: Lens' ProjectsModelsList Bool
146+pmlPp = lens _pmlPp (\ s a -> s{_pmlPp = a})
147+
148+-- | OAuth access token.
149+pmlAccessToken :: Lens' ProjectsModelsList (Maybe Text)
150+pmlAccessToken
151+ = lens _pmlAccessToken
152+ (\ s a -> s{_pmlAccessToken = a})
153+
154+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
155+pmlUploadType :: Lens' ProjectsModelsList (Maybe Text)
156+pmlUploadType
157+ = lens _pmlUploadType
158+ (\ s a -> s{_pmlUploadType = a})
159+
160+-- | OAuth bearer token.
161+pmlBearerToken :: Lens' ProjectsModelsList (Maybe Text)
162+pmlBearerToken
163+ = lens _pmlBearerToken
164+ (\ s a -> s{_pmlBearerToken = a})
165+
166+-- | Optional. A page token to request the next page of results. You get the
167+-- token from the \`next_page_token\` field of the response from the
168+-- previous call.
169+pmlPageToken :: Lens' ProjectsModelsList (Maybe Text)
170+pmlPageToken
171+ = lens _pmlPageToken (\ s a -> s{_pmlPageToken = a})
172+
173+-- | Optional. The number of models to retrieve per \"page\" of results. If
174+-- there are more remaining results than this number, the response message
175+-- will contain a valid value in the \`next_page_token\` field. The default
176+-- value is 20, and the maximum page size is 100.
177+pmlPageSize :: Lens' ProjectsModelsList (Maybe Int32)
178+pmlPageSize
179+ = lens _pmlPageSize (\ s a -> s{_pmlPageSize = a}) .
180+ mapping _Coerce
181+
182+-- | JSONP
183+pmlCallback :: Lens' ProjectsModelsList (Maybe Text)
184+pmlCallback
185+ = lens _pmlCallback (\ s a -> s{_pmlCallback = a})
186+
187+instance GoogleRequest ProjectsModelsList where
188+ type Rs ProjectsModelsList =
189+ GoogleCloudMlV1beta1__ListModelsResponse
190+ type Scopes ProjectsModelsList =
191+ '["https://www.googleapis.com/auth/cloud-platform"]
192+ requestClient ProjectsModelsList'{..}
193+ = go _pmlParent _pmlXgafv _pmlUploadProtocol
194+ (Just _pmlPp)
195+ _pmlAccessToken
196+ _pmlUploadType
197+ _pmlBearerToken
198+ _pmlPageToken
199+ _pmlPageSize
200+ _pmlCallback
201+ (Just AltJSON)
202+ machineLearningService
203+ where go
204+ = buildClient
205+ (Proxy :: Proxy ProjectsModelsListResource)
206+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/Create.hsnew file+200
@@ -0,0 +1,200 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Ml.Projects.Models.Versions.Create
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Creates a new version of a model from a trained TensorFlow model. If the
24+-- version created in the cloud by this call is the first deployed version
25+-- of the specified model, it will be made the default version of the
26+-- model. When you add a version to a model that already has one or more
27+-- versions, the default version does not automatically change. If you want
28+-- a new version to be the default, you must call
29+-- [projects.models.versions.setDefault](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/setDefault).
30+--
31+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.models.versions.create@.
32+module Network.Google.Resource.Ml.Projects.Models.Versions.Create
33+ (
34+ -- * REST Resource
35+ ProjectsModelsVersionsCreateResource
36+
37+ -- * Creating a Request
38+ , projectsModelsVersionsCreate
39+ , ProjectsModelsVersionsCreate
40+
41+ -- * Request Lenses
42+ , pmvcParent
43+ , pmvcXgafv
44+ , pmvcUploadProtocol
45+ , pmvcPp
46+ , pmvcAccessToken
47+ , pmvcUploadType
48+ , pmvcPayload
49+ , pmvcBearerToken
50+ , pmvcCallback
51+ ) where
52+
53+import Network.Google.MachineLearning.Types
54+import Network.Google.Prelude
55+
56+-- | A resource alias for @ml.projects.models.versions.create@ method which the
57+-- 'ProjectsModelsVersionsCreate' request conforms to.
58+type ProjectsModelsVersionsCreateResource =
59+ "v1beta1" :>
60+ Capture "parent" Text :>
61+ "versions" :>
62+ QueryParam "$.xgafv" Xgafv :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] GoogleCloudMlV1beta1__Version :>
71+ Post '[JSON] GoogleLongrunning__Operation
72+
73+-- | Creates a new version of a model from a trained TensorFlow model. If the
74+-- version created in the cloud by this call is the first deployed version
75+-- of the specified model, it will be made the default version of the
76+-- model. When you add a version to a model that already has one or more
77+-- versions, the default version does not automatically change. If you want
78+-- a new version to be the default, you must call
79+-- [projects.models.versions.setDefault](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/setDefault).
80+--
81+-- /See:/ 'projectsModelsVersionsCreate' smart constructor.
82+data ProjectsModelsVersionsCreate = ProjectsModelsVersionsCreate'
83+ { _pmvcParent :: !Text
84+ , _pmvcXgafv :: !(Maybe Xgafv)
85+ , _pmvcUploadProtocol :: !(Maybe Text)
86+ , _pmvcPp :: !Bool
87+ , _pmvcAccessToken :: !(Maybe Text)
88+ , _pmvcUploadType :: !(Maybe Text)
89+ , _pmvcPayload :: !GoogleCloudMlV1beta1__Version
90+ , _pmvcBearerToken :: !(Maybe Text)
91+ , _pmvcCallback :: !(Maybe Text)
92+ } deriving (Eq,Show,Data,Typeable,Generic)
93+
94+-- | Creates a value of 'ProjectsModelsVersionsCreate' with the minimum fields required to make a request.
95+--
96+-- Use one of the following lenses to modify other fields as desired:
97+--
98+-- * 'pmvcParent'
99+--
100+-- * 'pmvcXgafv'
101+--
102+-- * 'pmvcUploadProtocol'
103+--
104+-- * 'pmvcPp'
105+--
106+-- * 'pmvcAccessToken'
107+--
108+-- * 'pmvcUploadType'
109+--
110+-- * 'pmvcPayload'
111+--
112+-- * 'pmvcBearerToken'
113+--
114+-- * 'pmvcCallback'
115+projectsModelsVersionsCreate
116+ :: Text -- ^ 'pmvcParent'
117+ -> GoogleCloudMlV1beta1__Version -- ^ 'pmvcPayload'
118+ -> ProjectsModelsVersionsCreate
119+projectsModelsVersionsCreate pPmvcParent_ pPmvcPayload_ =
120+ ProjectsModelsVersionsCreate'
121+ { _pmvcParent = pPmvcParent_
122+ , _pmvcXgafv = Nothing
123+ , _pmvcUploadProtocol = Nothing
124+ , _pmvcPp = True
125+ , _pmvcAccessToken = Nothing
126+ , _pmvcUploadType = Nothing
127+ , _pmvcPayload = pPmvcPayload_
128+ , _pmvcBearerToken = Nothing
129+ , _pmvcCallback = Nothing
130+ }
131+
132+-- | Required. The name of the model. Authorization: requires \`Editor\` role
133+-- on the parent project.
134+pmvcParent :: Lens' ProjectsModelsVersionsCreate Text
135+pmvcParent
136+ = lens _pmvcParent (\ s a -> s{_pmvcParent = a})
137+
138+-- | V1 error format.
139+pmvcXgafv :: Lens' ProjectsModelsVersionsCreate (Maybe Xgafv)
140+pmvcXgafv
141+ = lens _pmvcXgafv (\ s a -> s{_pmvcXgafv = a})
142+
143+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
144+pmvcUploadProtocol :: Lens' ProjectsModelsVersionsCreate (Maybe Text)
145+pmvcUploadProtocol
146+ = lens _pmvcUploadProtocol
147+ (\ s a -> s{_pmvcUploadProtocol = a})
148+
149+-- | Pretty-print response.
150+pmvcPp :: Lens' ProjectsModelsVersionsCreate Bool
151+pmvcPp = lens _pmvcPp (\ s a -> s{_pmvcPp = a})
152+
153+-- | OAuth access token.
154+pmvcAccessToken :: Lens' ProjectsModelsVersionsCreate (Maybe Text)
155+pmvcAccessToken
156+ = lens _pmvcAccessToken
157+ (\ s a -> s{_pmvcAccessToken = a})
158+
159+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
160+pmvcUploadType :: Lens' ProjectsModelsVersionsCreate (Maybe Text)
161+pmvcUploadType
162+ = lens _pmvcUploadType
163+ (\ s a -> s{_pmvcUploadType = a})
164+
165+-- | Multipart request metadata.
166+pmvcPayload :: Lens' ProjectsModelsVersionsCreate GoogleCloudMlV1beta1__Version
167+pmvcPayload
168+ = lens _pmvcPayload (\ s a -> s{_pmvcPayload = a})
169+
170+-- | OAuth bearer token.
171+pmvcBearerToken :: Lens' ProjectsModelsVersionsCreate (Maybe Text)
172+pmvcBearerToken
173+ = lens _pmvcBearerToken
174+ (\ s a -> s{_pmvcBearerToken = a})
175+
176+-- | JSONP
177+pmvcCallback :: Lens' ProjectsModelsVersionsCreate (Maybe Text)
178+pmvcCallback
179+ = lens _pmvcCallback (\ s a -> s{_pmvcCallback = a})
180+
181+instance GoogleRequest ProjectsModelsVersionsCreate
182+ where
183+ type Rs ProjectsModelsVersionsCreate =
184+ GoogleLongrunning__Operation
185+ type Scopes ProjectsModelsVersionsCreate =
186+ '["https://www.googleapis.com/auth/cloud-platform"]
187+ requestClient ProjectsModelsVersionsCreate'{..}
188+ = go _pmvcParent _pmvcXgafv _pmvcUploadProtocol
189+ (Just _pmvcPp)
190+ _pmvcAccessToken
191+ _pmvcUploadType
192+ _pmvcBearerToken
193+ _pmvcCallback
194+ (Just AltJSON)
195+ _pmvcPayload
196+ machineLearningService
197+ where go
198+ = buildClient
199+ (Proxy :: Proxy ProjectsModelsVersionsCreateResource)
200+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/Delete.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.Ml.Projects.Models.Versions.Delete
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Deletes a model version. Each model can have multiple versions deployed
24+-- and in use at any given time. Use this method to remove a single
25+-- version. Note: You cannot delete the version that is set as the default
26+-- version of the model unless it is the only remaining version.
27+--
28+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.models.versions.delete@.
29+module Network.Google.Resource.Ml.Projects.Models.Versions.Delete
30+ (
31+ -- * REST Resource
32+ ProjectsModelsVersionsDeleteResource
33+
34+ -- * Creating a Request
35+ , projectsModelsVersionsDelete
36+ , ProjectsModelsVersionsDelete
37+
38+ -- * Request Lenses
39+ , pmvdXgafv
40+ , pmvdUploadProtocol
41+ , pmvdPp
42+ , pmvdAccessToken
43+ , pmvdUploadType
44+ , pmvdBearerToken
45+ , pmvdName
46+ , pmvdCallback
47+ ) where
48+
49+import Network.Google.MachineLearning.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @ml.projects.models.versions.delete@ method which the
53+-- 'ProjectsModelsVersionsDelete' request conforms to.
54+type ProjectsModelsVersionsDeleteResource =
55+ "v1beta1" :>
56+ Capture "name" Text :>
57+ QueryParam "$.xgafv" Xgafv :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :>
65+ Delete '[JSON] GoogleLongrunning__Operation
66+
67+-- | Deletes a model version. Each model can have multiple versions deployed
68+-- and in use at any given time. Use this method to remove a single
69+-- version. Note: You cannot delete the version that is set as the default
70+-- version of the model unless it is the only remaining version.
71+--
72+-- /See:/ 'projectsModelsVersionsDelete' smart constructor.
73+data ProjectsModelsVersionsDelete = ProjectsModelsVersionsDelete'
74+ { _pmvdXgafv :: !(Maybe Xgafv)
75+ , _pmvdUploadProtocol :: !(Maybe Text)
76+ , _pmvdPp :: !Bool
77+ , _pmvdAccessToken :: !(Maybe Text)
78+ , _pmvdUploadType :: !(Maybe Text)
79+ , _pmvdBearerToken :: !(Maybe Text)
80+ , _pmvdName :: !Text
81+ , _pmvdCallback :: !(Maybe Text)
82+ } deriving (Eq,Show,Data,Typeable,Generic)
83+
84+-- | Creates a value of 'ProjectsModelsVersionsDelete' with the minimum fields required to make a request.
85+--
86+-- Use one of the following lenses to modify other fields as desired:
87+--
88+-- * 'pmvdXgafv'
89+--
90+-- * 'pmvdUploadProtocol'
91+--
92+-- * 'pmvdPp'
93+--
94+-- * 'pmvdAccessToken'
95+--
96+-- * 'pmvdUploadType'
97+--
98+-- * 'pmvdBearerToken'
99+--
100+-- * 'pmvdName'
101+--
102+-- * 'pmvdCallback'
103+projectsModelsVersionsDelete
104+ :: Text -- ^ 'pmvdName'
105+ -> ProjectsModelsVersionsDelete
106+projectsModelsVersionsDelete pPmvdName_ =
107+ ProjectsModelsVersionsDelete'
108+ { _pmvdXgafv = Nothing
109+ , _pmvdUploadProtocol = Nothing
110+ , _pmvdPp = True
111+ , _pmvdAccessToken = Nothing
112+ , _pmvdUploadType = Nothing
113+ , _pmvdBearerToken = Nothing
114+ , _pmvdName = pPmvdName_
115+ , _pmvdCallback = Nothing
116+ }
117+
118+-- | V1 error format.
119+pmvdXgafv :: Lens' ProjectsModelsVersionsDelete (Maybe Xgafv)
120+pmvdXgafv
121+ = lens _pmvdXgafv (\ s a -> s{_pmvdXgafv = a})
122+
123+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
124+pmvdUploadProtocol :: Lens' ProjectsModelsVersionsDelete (Maybe Text)
125+pmvdUploadProtocol
126+ = lens _pmvdUploadProtocol
127+ (\ s a -> s{_pmvdUploadProtocol = a})
128+
129+-- | Pretty-print response.
130+pmvdPp :: Lens' ProjectsModelsVersionsDelete Bool
131+pmvdPp = lens _pmvdPp (\ s a -> s{_pmvdPp = a})
132+
133+-- | OAuth access token.
134+pmvdAccessToken :: Lens' ProjectsModelsVersionsDelete (Maybe Text)
135+pmvdAccessToken
136+ = lens _pmvdAccessToken
137+ (\ s a -> s{_pmvdAccessToken = a})
138+
139+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
140+pmvdUploadType :: Lens' ProjectsModelsVersionsDelete (Maybe Text)
141+pmvdUploadType
142+ = lens _pmvdUploadType
143+ (\ s a -> s{_pmvdUploadType = a})
144+
145+-- | OAuth bearer token.
146+pmvdBearerToken :: Lens' ProjectsModelsVersionsDelete (Maybe Text)
147+pmvdBearerToken
148+ = lens _pmvdBearerToken
149+ (\ s a -> s{_pmvdBearerToken = a})
150+
151+-- | Required. The name of the version. You can get the names of all the
152+-- versions of a model by calling
153+-- [projects.models.versions.list](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/list).
154+-- Authorization: requires \`Editor\` role on the parent project.
155+pmvdName :: Lens' ProjectsModelsVersionsDelete Text
156+pmvdName = lens _pmvdName (\ s a -> s{_pmvdName = a})
157+
158+-- | JSONP
159+pmvdCallback :: Lens' ProjectsModelsVersionsDelete (Maybe Text)
160+pmvdCallback
161+ = lens _pmvdCallback (\ s a -> s{_pmvdCallback = a})
162+
163+instance GoogleRequest ProjectsModelsVersionsDelete
164+ where
165+ type Rs ProjectsModelsVersionsDelete =
166+ GoogleLongrunning__Operation
167+ type Scopes ProjectsModelsVersionsDelete =
168+ '["https://www.googleapis.com/auth/cloud-platform"]
169+ requestClient ProjectsModelsVersionsDelete'{..}
170+ = go _pmvdName _pmvdXgafv _pmvdUploadProtocol
171+ (Just _pmvdPp)
172+ _pmvdAccessToken
173+ _pmvdUploadType
174+ _pmvdBearerToken
175+ _pmvdCallback
176+ (Just AltJSON)
177+ machineLearningService
178+ where go
179+ = buildClient
180+ (Proxy :: Proxy ProjectsModelsVersionsDeleteResource)
181+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/Get.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.Ml.Projects.Models.Versions.Get
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Gets information about a model version. Models can have multiple
24+-- versions. You can call
25+-- [projects.models.versions.list](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/list)
26+-- to get the same information that this method returns for all of the
27+-- versions of a model.
28+--
29+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.models.versions.get@.
30+module Network.Google.Resource.Ml.Projects.Models.Versions.Get
31+ (
32+ -- * REST Resource
33+ ProjectsModelsVersionsGetResource
34+
35+ -- * Creating a Request
36+ , projectsModelsVersionsGet
37+ , ProjectsModelsVersionsGet
38+
39+ -- * Request Lenses
40+ , pmvgXgafv
41+ , pmvgUploadProtocol
42+ , pmvgPp
43+ , pmvgAccessToken
44+ , pmvgUploadType
45+ , pmvgBearerToken
46+ , pmvgName
47+ , pmvgCallback
48+ ) where
49+
50+import Network.Google.MachineLearning.Types
51+import Network.Google.Prelude
52+
53+-- | A resource alias for @ml.projects.models.versions.get@ method which the
54+-- 'ProjectsModelsVersionsGet' request conforms to.
55+type ProjectsModelsVersionsGetResource =
56+ "v1beta1" :>
57+ Capture "name" Text :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "callback" Text :>
65+ QueryParam "alt" AltJSON :>
66+ Get '[JSON] GoogleCloudMlV1beta1__Version
67+
68+-- | Gets information about a model version. Models can have multiple
69+-- versions. You can call
70+-- [projects.models.versions.list](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/list)
71+-- to get the same information that this method returns for all of the
72+-- versions of a model.
73+--
74+-- /See:/ 'projectsModelsVersionsGet' smart constructor.
75+data ProjectsModelsVersionsGet = ProjectsModelsVersionsGet'
76+ { _pmvgXgafv :: !(Maybe Xgafv)
77+ , _pmvgUploadProtocol :: !(Maybe Text)
78+ , _pmvgPp :: !Bool
79+ , _pmvgAccessToken :: !(Maybe Text)
80+ , _pmvgUploadType :: !(Maybe Text)
81+ , _pmvgBearerToken :: !(Maybe Text)
82+ , _pmvgName :: !Text
83+ , _pmvgCallback :: !(Maybe Text)
84+ } deriving (Eq,Show,Data,Typeable,Generic)
85+
86+-- | Creates a value of 'ProjectsModelsVersionsGet' 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+-- * 'pmvgXgafv'
91+--
92+-- * 'pmvgUploadProtocol'
93+--
94+-- * 'pmvgPp'
95+--
96+-- * 'pmvgAccessToken'
97+--
98+-- * 'pmvgUploadType'
99+--
100+-- * 'pmvgBearerToken'
101+--
102+-- * 'pmvgName'
103+--
104+-- * 'pmvgCallback'
105+projectsModelsVersionsGet
106+ :: Text -- ^ 'pmvgName'
107+ -> ProjectsModelsVersionsGet
108+projectsModelsVersionsGet pPmvgName_ =
109+ ProjectsModelsVersionsGet'
110+ { _pmvgXgafv = Nothing
111+ , _pmvgUploadProtocol = Nothing
112+ , _pmvgPp = True
113+ , _pmvgAccessToken = Nothing
114+ , _pmvgUploadType = Nothing
115+ , _pmvgBearerToken = Nothing
116+ , _pmvgName = pPmvgName_
117+ , _pmvgCallback = Nothing
118+ }
119+
120+-- | V1 error format.
121+pmvgXgafv :: Lens' ProjectsModelsVersionsGet (Maybe Xgafv)
122+pmvgXgafv
123+ = lens _pmvgXgafv (\ s a -> s{_pmvgXgafv = a})
124+
125+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
126+pmvgUploadProtocol :: Lens' ProjectsModelsVersionsGet (Maybe Text)
127+pmvgUploadProtocol
128+ = lens _pmvgUploadProtocol
129+ (\ s a -> s{_pmvgUploadProtocol = a})
130+
131+-- | Pretty-print response.
132+pmvgPp :: Lens' ProjectsModelsVersionsGet Bool
133+pmvgPp = lens _pmvgPp (\ s a -> s{_pmvgPp = a})
134+
135+-- | OAuth access token.
136+pmvgAccessToken :: Lens' ProjectsModelsVersionsGet (Maybe Text)
137+pmvgAccessToken
138+ = lens _pmvgAccessToken
139+ (\ s a -> s{_pmvgAccessToken = a})
140+
141+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
142+pmvgUploadType :: Lens' ProjectsModelsVersionsGet (Maybe Text)
143+pmvgUploadType
144+ = lens _pmvgUploadType
145+ (\ s a -> s{_pmvgUploadType = a})
146+
147+-- | OAuth bearer token.
148+pmvgBearerToken :: Lens' ProjectsModelsVersionsGet (Maybe Text)
149+pmvgBearerToken
150+ = lens _pmvgBearerToken
151+ (\ s a -> s{_pmvgBearerToken = a})
152+
153+-- | Required. The name of the version. Authorization: requires \`Viewer\`
154+-- role on the parent project.
155+pmvgName :: Lens' ProjectsModelsVersionsGet Text
156+pmvgName = lens _pmvgName (\ s a -> s{_pmvgName = a})
157+
158+-- | JSONP
159+pmvgCallback :: Lens' ProjectsModelsVersionsGet (Maybe Text)
160+pmvgCallback
161+ = lens _pmvgCallback (\ s a -> s{_pmvgCallback = a})
162+
163+instance GoogleRequest ProjectsModelsVersionsGet
164+ where
165+ type Rs ProjectsModelsVersionsGet =
166+ GoogleCloudMlV1beta1__Version
167+ type Scopes ProjectsModelsVersionsGet =
168+ '["https://www.googleapis.com/auth/cloud-platform"]
169+ requestClient ProjectsModelsVersionsGet'{..}
170+ = go _pmvgName _pmvgXgafv _pmvgUploadProtocol
171+ (Just _pmvgPp)
172+ _pmvgAccessToken
173+ _pmvgUploadType
174+ _pmvgBearerToken
175+ _pmvgCallback
176+ (Just AltJSON)
177+ machineLearningService
178+ where go
179+ = buildClient
180+ (Proxy :: Proxy ProjectsModelsVersionsGetResource)
181+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/List.hsnew file+213
@@ -0,0 +1,213 @@
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.Ml.Projects.Models.Versions.List
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Gets basic information about all the versions of a model. If you expect
24+-- that a model has a lot of versions, or if you need to handle only a
25+-- limited number of results at a time, you can request that the list be
26+-- retrieved in batches (called pages):
27+--
28+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.models.versions.list@.
29+module Network.Google.Resource.Ml.Projects.Models.Versions.List
30+ (
31+ -- * REST Resource
32+ ProjectsModelsVersionsListResource
33+
34+ -- * Creating a Request
35+ , projectsModelsVersionsList
36+ , ProjectsModelsVersionsList
37+
38+ -- * Request Lenses
39+ , pmvlParent
40+ , pmvlXgafv
41+ , pmvlUploadProtocol
42+ , pmvlPp
43+ , pmvlAccessToken
44+ , pmvlUploadType
45+ , pmvlBearerToken
46+ , pmvlPageToken
47+ , pmvlPageSize
48+ , pmvlCallback
49+ ) where
50+
51+import Network.Google.MachineLearning.Types
52+import Network.Google.Prelude
53+
54+-- | A resource alias for @ml.projects.models.versions.list@ method which the
55+-- 'ProjectsModelsVersionsList' request conforms to.
56+type ProjectsModelsVersionsListResource =
57+ "v1beta1" :>
58+ Capture "parent" Text :>
59+ "versions" :>
60+ QueryParam "$.xgafv" Xgafv :>
61+ QueryParam "upload_protocol" Text :>
62+ QueryParam "pp" Bool :>
63+ QueryParam "access_token" Text :>
64+ QueryParam "uploadType" Text :>
65+ QueryParam "bearer_token" Text :>
66+ QueryParam "pageToken" Text :>
67+ QueryParam "pageSize" (Textual Int32) :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ Get '[JSON]
71+ GoogleCloudMlV1beta1__ListVersionsResponse
72+
73+-- | Gets basic information about all the versions of a model. If you expect
74+-- that a model has a lot of versions, or if you need to handle only a
75+-- limited number of results at a time, you can request that the list be
76+-- retrieved in batches (called pages):
77+--
78+-- /See:/ 'projectsModelsVersionsList' smart constructor.
79+data ProjectsModelsVersionsList = ProjectsModelsVersionsList'
80+ { _pmvlParent :: !Text
81+ , _pmvlXgafv :: !(Maybe Xgafv)
82+ , _pmvlUploadProtocol :: !(Maybe Text)
83+ , _pmvlPp :: !Bool
84+ , _pmvlAccessToken :: !(Maybe Text)
85+ , _pmvlUploadType :: !(Maybe Text)
86+ , _pmvlBearerToken :: !(Maybe Text)
87+ , _pmvlPageToken :: !(Maybe Text)
88+ , _pmvlPageSize :: !(Maybe (Textual Int32))
89+ , _pmvlCallback :: !(Maybe Text)
90+ } deriving (Eq,Show,Data,Typeable,Generic)
91+
92+-- | Creates a value of 'ProjectsModelsVersionsList' 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+-- * 'pmvlParent'
97+--
98+-- * 'pmvlXgafv'
99+--
100+-- * 'pmvlUploadProtocol'
101+--
102+-- * 'pmvlPp'
103+--
104+-- * 'pmvlAccessToken'
105+--
106+-- * 'pmvlUploadType'
107+--
108+-- * 'pmvlBearerToken'
109+--
110+-- * 'pmvlPageToken'
111+--
112+-- * 'pmvlPageSize'
113+--
114+-- * 'pmvlCallback'
115+projectsModelsVersionsList
116+ :: Text -- ^ 'pmvlParent'
117+ -> ProjectsModelsVersionsList
118+projectsModelsVersionsList pPmvlParent_ =
119+ ProjectsModelsVersionsList'
120+ { _pmvlParent = pPmvlParent_
121+ , _pmvlXgafv = Nothing
122+ , _pmvlUploadProtocol = Nothing
123+ , _pmvlPp = True
124+ , _pmvlAccessToken = Nothing
125+ , _pmvlUploadType = Nothing
126+ , _pmvlBearerToken = Nothing
127+ , _pmvlPageToken = Nothing
128+ , _pmvlPageSize = Nothing
129+ , _pmvlCallback = Nothing
130+ }
131+
132+-- | Required. The name of the model for which to list the version.
133+-- Authorization: requires \`Viewer\` role on the parent project.
134+pmvlParent :: Lens' ProjectsModelsVersionsList Text
135+pmvlParent
136+ = lens _pmvlParent (\ s a -> s{_pmvlParent = a})
137+
138+-- | V1 error format.
139+pmvlXgafv :: Lens' ProjectsModelsVersionsList (Maybe Xgafv)
140+pmvlXgafv
141+ = lens _pmvlXgafv (\ s a -> s{_pmvlXgafv = a})
142+
143+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
144+pmvlUploadProtocol :: Lens' ProjectsModelsVersionsList (Maybe Text)
145+pmvlUploadProtocol
146+ = lens _pmvlUploadProtocol
147+ (\ s a -> s{_pmvlUploadProtocol = a})
148+
149+-- | Pretty-print response.
150+pmvlPp :: Lens' ProjectsModelsVersionsList Bool
151+pmvlPp = lens _pmvlPp (\ s a -> s{_pmvlPp = a})
152+
153+-- | OAuth access token.
154+pmvlAccessToken :: Lens' ProjectsModelsVersionsList (Maybe Text)
155+pmvlAccessToken
156+ = lens _pmvlAccessToken
157+ (\ s a -> s{_pmvlAccessToken = a})
158+
159+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
160+pmvlUploadType :: Lens' ProjectsModelsVersionsList (Maybe Text)
161+pmvlUploadType
162+ = lens _pmvlUploadType
163+ (\ s a -> s{_pmvlUploadType = a})
164+
165+-- | OAuth bearer token.
166+pmvlBearerToken :: Lens' ProjectsModelsVersionsList (Maybe Text)
167+pmvlBearerToken
168+ = lens _pmvlBearerToken
169+ (\ s a -> s{_pmvlBearerToken = a})
170+
171+-- | Optional. A page token to request the next page of results. You get the
172+-- token from the \`next_page_token\` field of the response from the
173+-- previous call.
174+pmvlPageToken :: Lens' ProjectsModelsVersionsList (Maybe Text)
175+pmvlPageToken
176+ = lens _pmvlPageToken
177+ (\ s a -> s{_pmvlPageToken = a})
178+
179+-- | Optional. The number of versions to retrieve per \"page\" of results. If
180+-- there are more remaining results than this number, the response message
181+-- will contain a valid value in the \`next_page_token\` field. The default
182+-- value is 20, and the maximum page size is 100.
183+pmvlPageSize :: Lens' ProjectsModelsVersionsList (Maybe Int32)
184+pmvlPageSize
185+ = lens _pmvlPageSize (\ s a -> s{_pmvlPageSize = a})
186+ . mapping _Coerce
187+
188+-- | JSONP
189+pmvlCallback :: Lens' ProjectsModelsVersionsList (Maybe Text)
190+pmvlCallback
191+ = lens _pmvlCallback (\ s a -> s{_pmvlCallback = a})
192+
193+instance GoogleRequest ProjectsModelsVersionsList
194+ where
195+ type Rs ProjectsModelsVersionsList =
196+ GoogleCloudMlV1beta1__ListVersionsResponse
197+ type Scopes ProjectsModelsVersionsList =
198+ '["https://www.googleapis.com/auth/cloud-platform"]
199+ requestClient ProjectsModelsVersionsList'{..}
200+ = go _pmvlParent _pmvlXgafv _pmvlUploadProtocol
201+ (Just _pmvlPp)
202+ _pmvlAccessToken
203+ _pmvlUploadType
204+ _pmvlBearerToken
205+ _pmvlPageToken
206+ _pmvlPageSize
207+ _pmvlCallback
208+ (Just AltJSON)
209+ machineLearningService
210+ where go
211+ = buildClient
212+ (Proxy :: Proxy ProjectsModelsVersionsListResource)
213+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/SetDefault.hsnew file+200
@@ -0,0 +1,200 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Ml.Projects.Models.Versions.SetDefault
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Designates a version to be the default for the model. The default
24+-- version is used for prediction requests made against the model that
25+-- don\'t specify a version. The first version to be created for a model is
26+-- automatically set as the default. You must make any subsequent changes
27+-- to the default version setting manually using this method.
28+--
29+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.models.versions.setDefault@.
30+module Network.Google.Resource.Ml.Projects.Models.Versions.SetDefault
31+ (
32+ -- * REST Resource
33+ ProjectsModelsVersionsSetDefaultResource
34+
35+ -- * Creating a Request
36+ , projectsModelsVersionsSetDefault
37+ , ProjectsModelsVersionsSetDefault
38+
39+ -- * Request Lenses
40+ , pmvsdXgafv
41+ , pmvsdUploadProtocol
42+ , pmvsdPp
43+ , pmvsdAccessToken
44+ , pmvsdUploadType
45+ , pmvsdPayload
46+ , pmvsdBearerToken
47+ , pmvsdName
48+ , pmvsdCallback
49+ ) where
50+
51+import Network.Google.MachineLearning.Types
52+import Network.Google.Prelude
53+
54+-- | A resource alias for @ml.projects.models.versions.setDefault@ method which the
55+-- 'ProjectsModelsVersionsSetDefault' request conforms to.
56+type ProjectsModelsVersionsSetDefaultResource =
57+ "v1beta1" :>
58+ CaptureMode "name" "setDefault" Text :>
59+ QueryParam "$.xgafv" Xgafv :>
60+ QueryParam "upload_protocol" Text :>
61+ QueryParam "pp" Bool :>
62+ QueryParam "access_token" Text :>
63+ QueryParam "uploadType" Text :>
64+ QueryParam "bearer_token" Text :>
65+ QueryParam "callback" Text :>
66+ QueryParam "alt" AltJSON :>
67+ ReqBody '[JSON]
68+ GoogleCloudMlV1beta1__SetDefaultVersionRequest
69+ :> Post '[JSON] GoogleCloudMlV1beta1__Version
70+
71+-- | Designates a version to be the default for the model. The default
72+-- version is used for prediction requests made against the model that
73+-- don\'t specify a version. The first version to be created for a model is
74+-- automatically set as the default. You must make any subsequent changes
75+-- to the default version setting manually using this method.
76+--
77+-- /See:/ 'projectsModelsVersionsSetDefault' smart constructor.
78+data ProjectsModelsVersionsSetDefault = ProjectsModelsVersionsSetDefault'
79+ { _pmvsdXgafv :: !(Maybe Xgafv)
80+ , _pmvsdUploadProtocol :: !(Maybe Text)
81+ , _pmvsdPp :: !Bool
82+ , _pmvsdAccessToken :: !(Maybe Text)
83+ , _pmvsdUploadType :: !(Maybe Text)
84+ , _pmvsdPayload :: !GoogleCloudMlV1beta1__SetDefaultVersionRequest
85+ , _pmvsdBearerToken :: !(Maybe Text)
86+ , _pmvsdName :: !Text
87+ , _pmvsdCallback :: !(Maybe Text)
88+ } deriving (Eq,Show,Data,Typeable,Generic)
89+
90+-- | Creates a value of 'ProjectsModelsVersionsSetDefault' 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+-- * 'pmvsdXgafv'
95+--
96+-- * 'pmvsdUploadProtocol'
97+--
98+-- * 'pmvsdPp'
99+--
100+-- * 'pmvsdAccessToken'
101+--
102+-- * 'pmvsdUploadType'
103+--
104+-- * 'pmvsdPayload'
105+--
106+-- * 'pmvsdBearerToken'
107+--
108+-- * 'pmvsdName'
109+--
110+-- * 'pmvsdCallback'
111+projectsModelsVersionsSetDefault
112+ :: GoogleCloudMlV1beta1__SetDefaultVersionRequest -- ^ 'pmvsdPayload'
113+ -> Text -- ^ 'pmvsdName'
114+ -> ProjectsModelsVersionsSetDefault
115+projectsModelsVersionsSetDefault pPmvsdPayload_ pPmvsdName_ =
116+ ProjectsModelsVersionsSetDefault'
117+ { _pmvsdXgafv = Nothing
118+ , _pmvsdUploadProtocol = Nothing
119+ , _pmvsdPp = True
120+ , _pmvsdAccessToken = Nothing
121+ , _pmvsdUploadType = Nothing
122+ , _pmvsdPayload = pPmvsdPayload_
123+ , _pmvsdBearerToken = Nothing
124+ , _pmvsdName = pPmvsdName_
125+ , _pmvsdCallback = Nothing
126+ }
127+
128+-- | V1 error format.
129+pmvsdXgafv :: Lens' ProjectsModelsVersionsSetDefault (Maybe Xgafv)
130+pmvsdXgafv
131+ = lens _pmvsdXgafv (\ s a -> s{_pmvsdXgafv = a})
132+
133+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
134+pmvsdUploadProtocol :: Lens' ProjectsModelsVersionsSetDefault (Maybe Text)
135+pmvsdUploadProtocol
136+ = lens _pmvsdUploadProtocol
137+ (\ s a -> s{_pmvsdUploadProtocol = a})
138+
139+-- | Pretty-print response.
140+pmvsdPp :: Lens' ProjectsModelsVersionsSetDefault Bool
141+pmvsdPp = lens _pmvsdPp (\ s a -> s{_pmvsdPp = a})
142+
143+-- | OAuth access token.
144+pmvsdAccessToken :: Lens' ProjectsModelsVersionsSetDefault (Maybe Text)
145+pmvsdAccessToken
146+ = lens _pmvsdAccessToken
147+ (\ s a -> s{_pmvsdAccessToken = a})
148+
149+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
150+pmvsdUploadType :: Lens' ProjectsModelsVersionsSetDefault (Maybe Text)
151+pmvsdUploadType
152+ = lens _pmvsdUploadType
153+ (\ s a -> s{_pmvsdUploadType = a})
154+
155+-- | Multipart request metadata.
156+pmvsdPayload :: Lens' ProjectsModelsVersionsSetDefault GoogleCloudMlV1beta1__SetDefaultVersionRequest
157+pmvsdPayload
158+ = lens _pmvsdPayload (\ s a -> s{_pmvsdPayload = a})
159+
160+-- | OAuth bearer token.
161+pmvsdBearerToken :: Lens' ProjectsModelsVersionsSetDefault (Maybe Text)
162+pmvsdBearerToken
163+ = lens _pmvsdBearerToken
164+ (\ s a -> s{_pmvsdBearerToken = a})
165+
166+-- | Required. The name of the version to make the default for the model. You
167+-- can get the names of all the versions of a model by calling
168+-- [projects.models.versions.list](\/ml\/reference\/rest\/v1beta1\/projects.models.versions\/list).
169+-- Authorization: requires \`Editor\` role on the parent project.
170+pmvsdName :: Lens' ProjectsModelsVersionsSetDefault Text
171+pmvsdName
172+ = lens _pmvsdName (\ s a -> s{_pmvsdName = a})
173+
174+-- | JSONP
175+pmvsdCallback :: Lens' ProjectsModelsVersionsSetDefault (Maybe Text)
176+pmvsdCallback
177+ = lens _pmvsdCallback
178+ (\ s a -> s{_pmvsdCallback = a})
179+
180+instance GoogleRequest
181+ ProjectsModelsVersionsSetDefault where
182+ type Rs ProjectsModelsVersionsSetDefault =
183+ GoogleCloudMlV1beta1__Version
184+ type Scopes ProjectsModelsVersionsSetDefault =
185+ '["https://www.googleapis.com/auth/cloud-platform"]
186+ requestClient ProjectsModelsVersionsSetDefault'{..}
187+ = go _pmvsdName _pmvsdXgafv _pmvsdUploadProtocol
188+ (Just _pmvsdPp)
189+ _pmvsdAccessToken
190+ _pmvsdUploadType
191+ _pmvsdBearerToken
192+ _pmvsdCallback
193+ (Just AltJSON)
194+ _pmvsdPayload
195+ machineLearningService
196+ where go
197+ = buildClient
198+ (Proxy ::
199+ Proxy ProjectsModelsVersionsSetDefaultResource)
200+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Operations/Cancel.hsnew file+186
@@ -0,0 +1,186 @@
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.Ml.Projects.Operations.Cancel
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Starts asynchronous cancellation on a long-running operation. The server
24+-- makes a best effort to cancel the operation, but success is not
25+-- guaranteed. If the server doesn\'t support this method, it returns
26+-- \`google.rpc.Code.UNIMPLEMENTED\`. Clients can use
27+-- Operations.GetOperation or other methods to check whether the
28+-- cancellation succeeded or whether the operation completed despite
29+-- cancellation. On successful cancellation, the operation is not deleted;
30+-- instead, it becomes an operation with an Operation.error value with a
31+-- google.rpc.Status.code of 1, corresponding to \`Code.CANCELLED\`.
32+--
33+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.operations.cancel@.
34+module Network.Google.Resource.Ml.Projects.Operations.Cancel
35+ (
36+ -- * REST Resource
37+ ProjectsOperationsCancelResource
38+
39+ -- * Creating a Request
40+ , projectsOperationsCancel
41+ , ProjectsOperationsCancel
42+
43+ -- * Request Lenses
44+ , pocXgafv
45+ , pocUploadProtocol
46+ , pocPp
47+ , pocAccessToken
48+ , pocUploadType
49+ , pocBearerToken
50+ , pocName
51+ , pocCallback
52+ ) where
53+
54+import Network.Google.MachineLearning.Types
55+import Network.Google.Prelude
56+
57+-- | A resource alias for @ml.projects.operations.cancel@ method which the
58+-- 'ProjectsOperationsCancel' request conforms to.
59+type ProjectsOperationsCancelResource =
60+ "v1beta1" :>
61+ CaptureMode "name" "cancel" Text :>
62+ QueryParam "$.xgafv" Xgafv :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ Post '[JSON] GoogleProtobuf__Empty
71+
72+-- | Starts asynchronous cancellation on a long-running operation. The server
73+-- makes a best effort to cancel the operation, but success is not
74+-- guaranteed. If the server doesn\'t support this method, it returns
75+-- \`google.rpc.Code.UNIMPLEMENTED\`. Clients can use
76+-- Operations.GetOperation or other methods to check whether the
77+-- cancellation succeeded or whether the operation completed despite
78+-- cancellation. On successful cancellation, the operation is not deleted;
79+-- instead, it becomes an operation with an Operation.error value with a
80+-- google.rpc.Status.code of 1, corresponding to \`Code.CANCELLED\`.
81+--
82+-- /See:/ 'projectsOperationsCancel' smart constructor.
83+data ProjectsOperationsCancel = ProjectsOperationsCancel'
84+ { _pocXgafv :: !(Maybe Xgafv)
85+ , _pocUploadProtocol :: !(Maybe Text)
86+ , _pocPp :: !Bool
87+ , _pocAccessToken :: !(Maybe Text)
88+ , _pocUploadType :: !(Maybe Text)
89+ , _pocBearerToken :: !(Maybe Text)
90+ , _pocName :: !Text
91+ , _pocCallback :: !(Maybe Text)
92+ } deriving (Eq,Show,Data,Typeable,Generic)
93+
94+-- | Creates a value of 'ProjectsOperationsCancel' with the minimum fields required to make a request.
95+--
96+-- Use one of the following lenses to modify other fields as desired:
97+--
98+-- * 'pocXgafv'
99+--
100+-- * 'pocUploadProtocol'
101+--
102+-- * 'pocPp'
103+--
104+-- * 'pocAccessToken'
105+--
106+-- * 'pocUploadType'
107+--
108+-- * 'pocBearerToken'
109+--
110+-- * 'pocName'
111+--
112+-- * 'pocCallback'
113+projectsOperationsCancel
114+ :: Text -- ^ 'pocName'
115+ -> ProjectsOperationsCancel
116+projectsOperationsCancel pPocName_ =
117+ ProjectsOperationsCancel'
118+ { _pocXgafv = Nothing
119+ , _pocUploadProtocol = Nothing
120+ , _pocPp = True
121+ , _pocAccessToken = Nothing
122+ , _pocUploadType = Nothing
123+ , _pocBearerToken = Nothing
124+ , _pocName = pPocName_
125+ , _pocCallback = Nothing
126+ }
127+
128+-- | V1 error format.
129+pocXgafv :: Lens' ProjectsOperationsCancel (Maybe Xgafv)
130+pocXgafv = lens _pocXgafv (\ s a -> s{_pocXgafv = a})
131+
132+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
133+pocUploadProtocol :: Lens' ProjectsOperationsCancel (Maybe Text)
134+pocUploadProtocol
135+ = lens _pocUploadProtocol
136+ (\ s a -> s{_pocUploadProtocol = a})
137+
138+-- | Pretty-print response.
139+pocPp :: Lens' ProjectsOperationsCancel Bool
140+pocPp = lens _pocPp (\ s a -> s{_pocPp = a})
141+
142+-- | OAuth access token.
143+pocAccessToken :: Lens' ProjectsOperationsCancel (Maybe Text)
144+pocAccessToken
145+ = lens _pocAccessToken
146+ (\ s a -> s{_pocAccessToken = a})
147+
148+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
149+pocUploadType :: Lens' ProjectsOperationsCancel (Maybe Text)
150+pocUploadType
151+ = lens _pocUploadType
152+ (\ s a -> s{_pocUploadType = a})
153+
154+-- | OAuth bearer token.
155+pocBearerToken :: Lens' ProjectsOperationsCancel (Maybe Text)
156+pocBearerToken
157+ = lens _pocBearerToken
158+ (\ s a -> s{_pocBearerToken = a})
159+
160+-- | The name of the operation resource to be cancelled.
161+pocName :: Lens' ProjectsOperationsCancel Text
162+pocName = lens _pocName (\ s a -> s{_pocName = a})
163+
164+-- | JSONP
165+pocCallback :: Lens' ProjectsOperationsCancel (Maybe Text)
166+pocCallback
167+ = lens _pocCallback (\ s a -> s{_pocCallback = a})
168+
169+instance GoogleRequest ProjectsOperationsCancel where
170+ type Rs ProjectsOperationsCancel =
171+ GoogleProtobuf__Empty
172+ type Scopes ProjectsOperationsCancel =
173+ '["https://www.googleapis.com/auth/cloud-platform"]
174+ requestClient ProjectsOperationsCancel'{..}
175+ = go _pocName _pocXgafv _pocUploadProtocol
176+ (Just _pocPp)
177+ _pocAccessToken
178+ _pocUploadType
179+ _pocBearerToken
180+ _pocCallback
181+ (Just AltJSON)
182+ machineLearningService
183+ where go
184+ = buildClient
185+ (Proxy :: Proxy ProjectsOperationsCancelResource)
186+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Operations/Delete.hsnew file+176
@@ -0,0 +1,176 @@
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.Ml.Projects.Operations.Delete
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Deletes a long-running operation. This method indicates that the client
24+-- is no longer interested in the operation result. It does not cancel the
25+-- operation. If the server doesn\'t support this method, it returns
26+-- \`google.rpc.Code.UNIMPLEMENTED\`.
27+--
28+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.operations.delete@.
29+module Network.Google.Resource.Ml.Projects.Operations.Delete
30+ (
31+ -- * REST Resource
32+ ProjectsOperationsDeleteResource
33+
34+ -- * Creating a Request
35+ , projectsOperationsDelete
36+ , ProjectsOperationsDelete
37+
38+ -- * Request Lenses
39+ , podXgafv
40+ , podUploadProtocol
41+ , podPp
42+ , podAccessToken
43+ , podUploadType
44+ , podBearerToken
45+ , podName
46+ , podCallback
47+ ) where
48+
49+import Network.Google.MachineLearning.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @ml.projects.operations.delete@ method which the
53+-- 'ProjectsOperationsDelete' request conforms to.
54+type ProjectsOperationsDeleteResource =
55+ "v1beta1" :>
56+ Capture "name" Text :>
57+ QueryParam "$.xgafv" Xgafv :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :>
65+ Delete '[JSON] GoogleProtobuf__Empty
66+
67+-- | Deletes a long-running operation. This method indicates that the client
68+-- is no longer interested in the operation result. It does not cancel the
69+-- operation. If the server doesn\'t support this method, it returns
70+-- \`google.rpc.Code.UNIMPLEMENTED\`.
71+--
72+-- /See:/ 'projectsOperationsDelete' smart constructor.
73+data ProjectsOperationsDelete = ProjectsOperationsDelete'
74+ { _podXgafv :: !(Maybe Xgafv)
75+ , _podUploadProtocol :: !(Maybe Text)
76+ , _podPp :: !Bool
77+ , _podAccessToken :: !(Maybe Text)
78+ , _podUploadType :: !(Maybe Text)
79+ , _podBearerToken :: !(Maybe Text)
80+ , _podName :: !Text
81+ , _podCallback :: !(Maybe Text)
82+ } deriving (Eq,Show,Data,Typeable,Generic)
83+
84+-- | Creates a value of 'ProjectsOperationsDelete' with the minimum fields required to make a request.
85+--
86+-- Use one of the following lenses to modify other fields as desired:
87+--
88+-- * 'podXgafv'
89+--
90+-- * 'podUploadProtocol'
91+--
92+-- * 'podPp'
93+--
94+-- * 'podAccessToken'
95+--
96+-- * 'podUploadType'
97+--
98+-- * 'podBearerToken'
99+--
100+-- * 'podName'
101+--
102+-- * 'podCallback'
103+projectsOperationsDelete
104+ :: Text -- ^ 'podName'
105+ -> ProjectsOperationsDelete
106+projectsOperationsDelete pPodName_ =
107+ ProjectsOperationsDelete'
108+ { _podXgafv = Nothing
109+ , _podUploadProtocol = Nothing
110+ , _podPp = True
111+ , _podAccessToken = Nothing
112+ , _podUploadType = Nothing
113+ , _podBearerToken = Nothing
114+ , _podName = pPodName_
115+ , _podCallback = Nothing
116+ }
117+
118+-- | V1 error format.
119+podXgafv :: Lens' ProjectsOperationsDelete (Maybe Xgafv)
120+podXgafv = lens _podXgafv (\ s a -> s{_podXgafv = a})
121+
122+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
123+podUploadProtocol :: Lens' ProjectsOperationsDelete (Maybe Text)
124+podUploadProtocol
125+ = lens _podUploadProtocol
126+ (\ s a -> s{_podUploadProtocol = a})
127+
128+-- | Pretty-print response.
129+podPp :: Lens' ProjectsOperationsDelete Bool
130+podPp = lens _podPp (\ s a -> s{_podPp = a})
131+
132+-- | OAuth access token.
133+podAccessToken :: Lens' ProjectsOperationsDelete (Maybe Text)
134+podAccessToken
135+ = lens _podAccessToken
136+ (\ s a -> s{_podAccessToken = a})
137+
138+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
139+podUploadType :: Lens' ProjectsOperationsDelete (Maybe Text)
140+podUploadType
141+ = lens _podUploadType
142+ (\ s a -> s{_podUploadType = a})
143+
144+-- | OAuth bearer token.
145+podBearerToken :: Lens' ProjectsOperationsDelete (Maybe Text)
146+podBearerToken
147+ = lens _podBearerToken
148+ (\ s a -> s{_podBearerToken = a})
149+
150+-- | The name of the operation resource to be deleted.
151+podName :: Lens' ProjectsOperationsDelete Text
152+podName = lens _podName (\ s a -> s{_podName = a})
153+
154+-- | JSONP
155+podCallback :: Lens' ProjectsOperationsDelete (Maybe Text)
156+podCallback
157+ = lens _podCallback (\ s a -> s{_podCallback = a})
158+
159+instance GoogleRequest ProjectsOperationsDelete where
160+ type Rs ProjectsOperationsDelete =
161+ GoogleProtobuf__Empty
162+ type Scopes ProjectsOperationsDelete =
163+ '["https://www.googleapis.com/auth/cloud-platform"]
164+ requestClient ProjectsOperationsDelete'{..}
165+ = go _podName _podXgafv _podUploadProtocol
166+ (Just _podPp)
167+ _podAccessToken
168+ _podUploadType
169+ _podBearerToken
170+ _podCallback
171+ (Just AltJSON)
172+ machineLearningService
173+ where go
174+ = buildClient
175+ (Proxy :: Proxy ProjectsOperationsDeleteResource)
176+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Operations/Get.hsnew file+174
@@ -0,0 +1,174 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Ml.Projects.Operations.Get
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Gets the latest state of a long-running operation. Clients can use this
24+-- method to poll the operation result at intervals as recommended by the
25+-- API service.
26+--
27+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.operations.get@.
28+module Network.Google.Resource.Ml.Projects.Operations.Get
29+ (
30+ -- * REST Resource
31+ ProjectsOperationsGetResource
32+
33+ -- * Creating a Request
34+ , projectsOperationsGet
35+ , ProjectsOperationsGet
36+
37+ -- * Request Lenses
38+ , pogXgafv
39+ , pogUploadProtocol
40+ , pogPp
41+ , pogAccessToken
42+ , pogUploadType
43+ , pogBearerToken
44+ , pogName
45+ , pogCallback
46+ ) where
47+
48+import Network.Google.MachineLearning.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @ml.projects.operations.get@ method which the
52+-- 'ProjectsOperationsGet' request conforms to.
53+type ProjectsOperationsGetResource =
54+ "v1beta1" :>
55+ Capture "name" Text :>
56+ QueryParam "$.xgafv" Xgafv :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :>
64+ Get '[JSON] GoogleLongrunning__Operation
65+
66+-- | Gets the latest state of a long-running operation. Clients can use this
67+-- method to poll the operation result at intervals as recommended by the
68+-- API service.
69+--
70+-- /See:/ 'projectsOperationsGet' smart constructor.
71+data ProjectsOperationsGet = ProjectsOperationsGet'
72+ { _pogXgafv :: !(Maybe Xgafv)
73+ , _pogUploadProtocol :: !(Maybe Text)
74+ , _pogPp :: !Bool
75+ , _pogAccessToken :: !(Maybe Text)
76+ , _pogUploadType :: !(Maybe Text)
77+ , _pogBearerToken :: !(Maybe Text)
78+ , _pogName :: !Text
79+ , _pogCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ProjectsOperationsGet' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'pogXgafv'
87+--
88+-- * 'pogUploadProtocol'
89+--
90+-- * 'pogPp'
91+--
92+-- * 'pogAccessToken'
93+--
94+-- * 'pogUploadType'
95+--
96+-- * 'pogBearerToken'
97+--
98+-- * 'pogName'
99+--
100+-- * 'pogCallback'
101+projectsOperationsGet
102+ :: Text -- ^ 'pogName'
103+ -> ProjectsOperationsGet
104+projectsOperationsGet pPogName_ =
105+ ProjectsOperationsGet'
106+ { _pogXgafv = Nothing
107+ , _pogUploadProtocol = Nothing
108+ , _pogPp = True
109+ , _pogAccessToken = Nothing
110+ , _pogUploadType = Nothing
111+ , _pogBearerToken = Nothing
112+ , _pogName = pPogName_
113+ , _pogCallback = Nothing
114+ }
115+
116+-- | V1 error format.
117+pogXgafv :: Lens' ProjectsOperationsGet (Maybe Xgafv)
118+pogXgafv = lens _pogXgafv (\ s a -> s{_pogXgafv = a})
119+
120+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
121+pogUploadProtocol :: Lens' ProjectsOperationsGet (Maybe Text)
122+pogUploadProtocol
123+ = lens _pogUploadProtocol
124+ (\ s a -> s{_pogUploadProtocol = a})
125+
126+-- | Pretty-print response.
127+pogPp :: Lens' ProjectsOperationsGet Bool
128+pogPp = lens _pogPp (\ s a -> s{_pogPp = a})
129+
130+-- | OAuth access token.
131+pogAccessToken :: Lens' ProjectsOperationsGet (Maybe Text)
132+pogAccessToken
133+ = lens _pogAccessToken
134+ (\ s a -> s{_pogAccessToken = a})
135+
136+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
137+pogUploadType :: Lens' ProjectsOperationsGet (Maybe Text)
138+pogUploadType
139+ = lens _pogUploadType
140+ (\ s a -> s{_pogUploadType = a})
141+
142+-- | OAuth bearer token.
143+pogBearerToken :: Lens' ProjectsOperationsGet (Maybe Text)
144+pogBearerToken
145+ = lens _pogBearerToken
146+ (\ s a -> s{_pogBearerToken = a})
147+
148+-- | The name of the operation resource.
149+pogName :: Lens' ProjectsOperationsGet Text
150+pogName = lens _pogName (\ s a -> s{_pogName = a})
151+
152+-- | JSONP
153+pogCallback :: Lens' ProjectsOperationsGet (Maybe Text)
154+pogCallback
155+ = lens _pogCallback (\ s a -> s{_pogCallback = a})
156+
157+instance GoogleRequest ProjectsOperationsGet where
158+ type Rs ProjectsOperationsGet =
159+ GoogleLongrunning__Operation
160+ type Scopes ProjectsOperationsGet =
161+ '["https://www.googleapis.com/auth/cloud-platform"]
162+ requestClient ProjectsOperationsGet'{..}
163+ = go _pogName _pogXgafv _pogUploadProtocol
164+ (Just _pogPp)
165+ _pogAccessToken
166+ _pogUploadType
167+ _pogBearerToken
168+ _pogCallback
169+ (Just AltJSON)
170+ machineLearningService
171+ where go
172+ = buildClient
173+ (Proxy :: Proxy ProjectsOperationsGetResource)
174+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/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.Ml.Projects.Operations.List
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Lists operations that match the specified filter in the request. If the
24+-- server doesn\'t support this method, it returns \`UNIMPLEMENTED\`. NOTE:
25+-- the \`name\` binding below allows API services to override the binding
26+-- to use different resource name schemes, such as
27+-- \`users\/*\/operations\`.
28+--
29+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.operations.list@.
30+module Network.Google.Resource.Ml.Projects.Operations.List
31+ (
32+ -- * REST Resource
33+ ProjectsOperationsListResource
34+
35+ -- * Creating a Request
36+ , projectsOperationsList
37+ , ProjectsOperationsList
38+
39+ -- * Request Lenses
40+ , polXgafv
41+ , polUploadProtocol
42+ , polPp
43+ , polAccessToken
44+ , polUploadType
45+ , polBearerToken
46+ , polName
47+ , polFilter
48+ , polPageToken
49+ , polPageSize
50+ , polCallback
51+ ) where
52+
53+import Network.Google.MachineLearning.Types
54+import Network.Google.Prelude
55+
56+-- | A resource alias for @ml.projects.operations.list@ method which the
57+-- 'ProjectsOperationsList' request conforms to.
58+type ProjectsOperationsListResource =
59+ "v1beta1" :>
60+ Capture "name" Text :>
61+ "operations" :>
62+ QueryParam "$.xgafv" Xgafv :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "filter" Text :>
69+ QueryParam "pageToken" Text :>
70+ QueryParam "pageSize" (Textual Int32) :>
71+ QueryParam "callback" Text :>
72+ QueryParam "alt" AltJSON :>
73+ Get '[JSON]
74+ GoogleLongrunning__ListOperationsResponse
75+
76+-- | Lists operations that match the specified filter in the request. If the
77+-- server doesn\'t support this method, it returns \`UNIMPLEMENTED\`. NOTE:
78+-- the \`name\` binding below allows API services to override the binding
79+-- to use different resource name schemes, such as
80+-- \`users\/*\/operations\`.
81+--
82+-- /See:/ 'projectsOperationsList' smart constructor.
83+data ProjectsOperationsList = ProjectsOperationsList'
84+ { _polXgafv :: !(Maybe Xgafv)
85+ , _polUploadProtocol :: !(Maybe Text)
86+ , _polPp :: !Bool
87+ , _polAccessToken :: !(Maybe Text)
88+ , _polUploadType :: !(Maybe Text)
89+ , _polBearerToken :: !(Maybe Text)
90+ , _polName :: !Text
91+ , _polFilter :: !(Maybe Text)
92+ , _polPageToken :: !(Maybe Text)
93+ , _polPageSize :: !(Maybe (Textual Int32))
94+ , _polCallback :: !(Maybe Text)
95+ } deriving (Eq,Show,Data,Typeable,Generic)
96+
97+-- | Creates a value of 'ProjectsOperationsList' with the minimum fields required to make a request.
98+--
99+-- Use one of the following lenses to modify other fields as desired:
100+--
101+-- * 'polXgafv'
102+--
103+-- * 'polUploadProtocol'
104+--
105+-- * 'polPp'
106+--
107+-- * 'polAccessToken'
108+--
109+-- * 'polUploadType'
110+--
111+-- * 'polBearerToken'
112+--
113+-- * 'polName'
114+--
115+-- * 'polFilter'
116+--
117+-- * 'polPageToken'
118+--
119+-- * 'polPageSize'
120+--
121+-- * 'polCallback'
122+projectsOperationsList
123+ :: Text -- ^ 'polName'
124+ -> ProjectsOperationsList
125+projectsOperationsList pPolName_ =
126+ ProjectsOperationsList'
127+ { _polXgafv = Nothing
128+ , _polUploadProtocol = Nothing
129+ , _polPp = True
130+ , _polAccessToken = Nothing
131+ , _polUploadType = Nothing
132+ , _polBearerToken = Nothing
133+ , _polName = pPolName_
134+ , _polFilter = Nothing
135+ , _polPageToken = Nothing
136+ , _polPageSize = Nothing
137+ , _polCallback = Nothing
138+ }
139+
140+-- | V1 error format.
141+polXgafv :: Lens' ProjectsOperationsList (Maybe Xgafv)
142+polXgafv = lens _polXgafv (\ s a -> s{_polXgafv = a})
143+
144+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
145+polUploadProtocol :: Lens' ProjectsOperationsList (Maybe Text)
146+polUploadProtocol
147+ = lens _polUploadProtocol
148+ (\ s a -> s{_polUploadProtocol = a})
149+
150+-- | Pretty-print response.
151+polPp :: Lens' ProjectsOperationsList Bool
152+polPp = lens _polPp (\ s a -> s{_polPp = a})
153+
154+-- | OAuth access token.
155+polAccessToken :: Lens' ProjectsOperationsList (Maybe Text)
156+polAccessToken
157+ = lens _polAccessToken
158+ (\ s a -> s{_polAccessToken = a})
159+
160+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
161+polUploadType :: Lens' ProjectsOperationsList (Maybe Text)
162+polUploadType
163+ = lens _polUploadType
164+ (\ s a -> s{_polUploadType = a})
165+
166+-- | OAuth bearer token.
167+polBearerToken :: Lens' ProjectsOperationsList (Maybe Text)
168+polBearerToken
169+ = lens _polBearerToken
170+ (\ s a -> s{_polBearerToken = a})
171+
172+-- | The name of the operation collection.
173+polName :: Lens' ProjectsOperationsList Text
174+polName = lens _polName (\ s a -> s{_polName = a})
175+
176+-- | The standard list filter.
177+polFilter :: Lens' ProjectsOperationsList (Maybe Text)
178+polFilter
179+ = lens _polFilter (\ s a -> s{_polFilter = a})
180+
181+-- | The standard list page token.
182+polPageToken :: Lens' ProjectsOperationsList (Maybe Text)
183+polPageToken
184+ = lens _polPageToken (\ s a -> s{_polPageToken = a})
185+
186+-- | The standard list page size.
187+polPageSize :: Lens' ProjectsOperationsList (Maybe Int32)
188+polPageSize
189+ = lens _polPageSize (\ s a -> s{_polPageSize = a}) .
190+ mapping _Coerce
191+
192+-- | JSONP
193+polCallback :: Lens' ProjectsOperationsList (Maybe Text)
194+polCallback
195+ = lens _polCallback (\ s a -> s{_polCallback = a})
196+
197+instance GoogleRequest ProjectsOperationsList where
198+ type Rs ProjectsOperationsList =
199+ GoogleLongrunning__ListOperationsResponse
200+ type Scopes ProjectsOperationsList =
201+ '["https://www.googleapis.com/auth/cloud-platform"]
202+ requestClient ProjectsOperationsList'{..}
203+ = go _polName _polXgafv _polUploadProtocol
204+ (Just _polPp)
205+ _polAccessToken
206+ _polUploadType
207+ _polBearerToken
208+ _polFilter
209+ _polPageToken
210+ _polPageSize
211+ _polCallback
212+ (Just AltJSON)
213+ machineLearningService
214+ where go
215+ = buildClient
216+ (Proxy :: Proxy ProjectsOperationsListResource)
217+ mempty
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Predict.hsnew file+257
@@ -0,0 +1,257 @@
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.Ml.Projects.Predict
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Performs prediction on the data in the request. Responses are very
24+-- similar to requests. There are two top-level fields, each of which are
25+-- JSON lists:
26+--
27+-- [predictions]
28+-- The list of predictions, one per instance in the request.
29+-- [error]
30+-- An error message returned instead of a prediction list if any
31+-- instance produced an error.
32+--
33+-- If the call is successful, the response body will contain one prediction
34+-- entry per instance in the request body. If prediction fails for any
35+-- instance, the response body will contain no predictions and will contian
36+-- a single error entry instead. Even though there is one prediction per
37+-- instance, the format of a prediction is not directly related to the
38+-- format of an instance. Predictions take whatever format is specified in
39+-- the outputs collection defined in the model. The collection of
40+-- predictions is returned in a JSON list. Each member of the list can be a
41+-- simple value, a list, or a JSON object of any complexity. If your model
42+-- has more than one output tensor, each prediction will be a JSON object
43+-- containing a name\/value pair for each output. The names identify the
44+-- output aliases in the graph. The following examples show some possible
45+-- responses: A simple set of predictions for three input instances, where
46+-- each prediction is an integer value:
47+--
48+-- > {"predictions": [5, 4, 3]}
49+--
50+-- A more complex set of predictions, each containing two named values that
51+-- correspond to output tensors, named **label** and **scores**
52+-- respectively. The value of **label** is the predicted category (\"car\"
53+-- or \"beach\") and **scores** contains a list of probabilities for that
54+-- instance across the possible categories.
55+--
56+-- > {"predictions": [{"label": "beach", "scores": [0.1, 0.9]},
57+-- > {"label": "car", "scores": [0.75, 0.25]}]}
58+--
59+-- A response when there is an error processing an input instance:
60+--
61+-- > {"error": "Divide by zero"}
62+--
63+-- /See:/ <https://cloud.google.com/ml/ Google Cloud Machine Learning Reference> for @ml.projects.predict@.
64+module Network.Google.Resource.Ml.Projects.Predict
65+ (
66+ -- * REST Resource
67+ ProjectsPredictResource
68+
69+ -- * Creating a Request
70+ , projectsPredict
71+ , ProjectsPredict
72+
73+ -- * Request Lenses
74+ , ppXgafv
75+ , ppUploadProtocol
76+ , ppPp
77+ , ppAccessToken
78+ , ppUploadType
79+ , ppPayload
80+ , ppBearerToken
81+ , ppName
82+ , ppCallback
83+ ) where
84+
85+import Network.Google.MachineLearning.Types
86+import Network.Google.Prelude
87+
88+-- | A resource alias for @ml.projects.predict@ method which the
89+-- 'ProjectsPredict' request conforms to.
90+type ProjectsPredictResource =
91+ "v1beta1" :>
92+ CaptureMode "name" "predict" Text :>
93+ QueryParam "$.xgafv" Xgafv :>
94+ QueryParam "upload_protocol" Text :>
95+ QueryParam "pp" Bool :>
96+ QueryParam "access_token" Text :>
97+ QueryParam "uploadType" Text :>
98+ QueryParam "bearer_token" Text :>
99+ QueryParam "callback" Text :>
100+ QueryParam "alt" AltJSON :>
101+ ReqBody '[JSON] GoogleCloudMlV1beta1__PredictRequest
102+ :> Post '[JSON] GoogleAPI__HTTPBody
103+
104+-- | Performs prediction on the data in the request. Responses are very
105+-- similar to requests. There are two top-level fields, each of which are
106+-- JSON lists:
107+--
108+-- [predictions]
109+-- The list of predictions, one per instance in the request.
110+-- [error]
111+-- An error message returned instead of a prediction list if any
112+-- instance produced an error.
113+--
114+-- If the call is successful, the response body will contain one prediction
115+-- entry per instance in the request body. If prediction fails for any
116+-- instance, the response body will contain no predictions and will contian
117+-- a single error entry instead. Even though there is one prediction per
118+-- instance, the format of a prediction is not directly related to the
119+-- format of an instance. Predictions take whatever format is specified in
120+-- the outputs collection defined in the model. The collection of
121+-- predictions is returned in a JSON list. Each member of the list can be a
122+-- simple value, a list, or a JSON object of any complexity. If your model
123+-- has more than one output tensor, each prediction will be a JSON object
124+-- containing a name\/value pair for each output. The names identify the
125+-- output aliases in the graph. The following examples show some possible
126+-- responses: A simple set of predictions for three input instances, where
127+-- each prediction is an integer value:
128+--
129+-- > {"predictions": [5, 4, 3]}
130+--
131+-- A more complex set of predictions, each containing two named values that
132+-- correspond to output tensors, named **label** and **scores**
133+-- respectively. The value of **label** is the predicted category (\"car\"
134+-- or \"beach\") and **scores** contains a list of probabilities for that
135+-- instance across the possible categories.
136+--
137+-- > {"predictions": [{"label": "beach", "scores": [0.1, 0.9]},
138+-- > {"label": "car", "scores": [0.75, 0.25]}]}
139+--
140+-- A response when there is an error processing an input instance:
141+--
142+-- > {"error": "Divide by zero"}
143+--
144+-- /See:/ 'projectsPredict' smart constructor.
145+data ProjectsPredict = ProjectsPredict'
146+ { _ppXgafv :: !(Maybe Xgafv)
147+ , _ppUploadProtocol :: !(Maybe Text)
148+ , _ppPp :: !Bool
149+ , _ppAccessToken :: !(Maybe Text)
150+ , _ppUploadType :: !(Maybe Text)
151+ , _ppPayload :: !GoogleCloudMlV1beta1__PredictRequest
152+ , _ppBearerToken :: !(Maybe Text)
153+ , _ppName :: !Text
154+ , _ppCallback :: !(Maybe Text)
155+ } deriving (Eq,Show,Data,Typeable,Generic)
156+
157+-- | Creates a value of 'ProjectsPredict' with the minimum fields required to make a request.
158+--
159+-- Use one of the following lenses to modify other fields as desired:
160+--
161+-- * 'ppXgafv'
162+--
163+-- * 'ppUploadProtocol'
164+--
165+-- * 'ppPp'
166+--
167+-- * 'ppAccessToken'
168+--
169+-- * 'ppUploadType'
170+--
171+-- * 'ppPayload'
172+--
173+-- * 'ppBearerToken'
174+--
175+-- * 'ppName'
176+--
177+-- * 'ppCallback'
178+projectsPredict
179+ :: GoogleCloudMlV1beta1__PredictRequest -- ^ 'ppPayload'
180+ -> Text -- ^ 'ppName'
181+ -> ProjectsPredict
182+projectsPredict pPpPayload_ pPpName_ =
183+ ProjectsPredict'
184+ { _ppXgafv = Nothing
185+ , _ppUploadProtocol = Nothing
186+ , _ppPp = True
187+ , _ppAccessToken = Nothing
188+ , _ppUploadType = Nothing
189+ , _ppPayload = pPpPayload_
190+ , _ppBearerToken = Nothing
191+ , _ppName = pPpName_
192+ , _ppCallback = Nothing
193+ }
194+
195+-- | V1 error format.
196+ppXgafv :: Lens' ProjectsPredict (Maybe Xgafv)
197+ppXgafv = lens _ppXgafv (\ s a -> s{_ppXgafv = a})
198+
199+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
200+ppUploadProtocol :: Lens' ProjectsPredict (Maybe Text)
201+ppUploadProtocol
202+ = lens _ppUploadProtocol
203+ (\ s a -> s{_ppUploadProtocol = a})
204+
205+-- | Pretty-print response.
206+ppPp :: Lens' ProjectsPredict Bool
207+ppPp = lens _ppPp (\ s a -> s{_ppPp = a})
208+
209+-- | OAuth access token.
210+ppAccessToken :: Lens' ProjectsPredict (Maybe Text)
211+ppAccessToken
212+ = lens _ppAccessToken
213+ (\ s a -> s{_ppAccessToken = a})
214+
215+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
216+ppUploadType :: Lens' ProjectsPredict (Maybe Text)
217+ppUploadType
218+ = lens _ppUploadType (\ s a -> s{_ppUploadType = a})
219+
220+-- | Multipart request metadata.
221+ppPayload :: Lens' ProjectsPredict GoogleCloudMlV1beta1__PredictRequest
222+ppPayload
223+ = lens _ppPayload (\ s a -> s{_ppPayload = a})
224+
225+-- | OAuth bearer token.
226+ppBearerToken :: Lens' ProjectsPredict (Maybe Text)
227+ppBearerToken
228+ = lens _ppBearerToken
229+ (\ s a -> s{_ppBearerToken = a})
230+
231+-- | Required. The resource name of a model or a version. Authorization:
232+-- requires \`Viewer\` role on the parent project.
233+ppName :: Lens' ProjectsPredict Text
234+ppName = lens _ppName (\ s a -> s{_ppName = a})
235+
236+-- | JSONP
237+ppCallback :: Lens' ProjectsPredict (Maybe Text)
238+ppCallback
239+ = lens _ppCallback (\ s a -> s{_ppCallback = a})
240+
241+instance GoogleRequest ProjectsPredict where
242+ type Rs ProjectsPredict = GoogleAPI__HTTPBody
243+ type Scopes ProjectsPredict =
244+ '["https://www.googleapis.com/auth/cloud-platform"]
245+ requestClient ProjectsPredict'{..}
246+ = go _ppName _ppXgafv _ppUploadProtocol (Just _ppPp)
247+ _ppAccessToken
248+ _ppUploadType
249+ _ppBearerToken
250+ _ppCallback
251+ (Just AltJSON)
252+ _ppPayload
253+ machineLearningService
254+ where go
255+ = buildClient
256+ (Proxy :: Proxy ProjectsPredictResource)
257+ mempty
gogol-ml/gogol-ml.cabalnew file+64
@@ -0,0 +1,64 @@
1+name: gogol-ml
2+version: 0.1.0
3+synopsis: Google Cloud Machine Learning SDK.
4+homepage: https://github.com/brendanhay/gogol
5+bug-reports: https://github.com/brendanhay/gogol/issues
6+license: OtherLicense
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay@gmail.com>
10+copyright: Copyright (c) 2015-2016 Brendan Hay
11+category: Network, Google, Cloud
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md
15+
16+description:
17+ An API to enable creating and using machine learning models.
18+ .
19+ /Warning:/ This is an experimental prototype/preview release which is still
20+ under exploratory development and not intended for public use, caveat emptor!
21+ .
22+ This library is compatible with version @v1beta1@
23+ of the API.
24+
25+source-repository head
26+ type: git
27+ location: git://github.com/brendanhay/gogol.git
28+
29+library
30+ default-language: Haskell2010
31+ hs-source-dirs: src gen
32+
33+ ghc-options: -Wall
34+
35+ exposed-modules:
36+ Network.Google.MachineLearning
37+ , Network.Google.MachineLearning.Types
38+ , Network.Google.Resource.Ml.Projects.GetConfig
39+ , Network.Google.Resource.Ml.Projects.Jobs.Cancel
40+ , Network.Google.Resource.Ml.Projects.Jobs.Create
41+ , Network.Google.Resource.Ml.Projects.Jobs.Get
42+ , Network.Google.Resource.Ml.Projects.Jobs.List
43+ , Network.Google.Resource.Ml.Projects.Models.Create
44+ , Network.Google.Resource.Ml.Projects.Models.Delete
45+ , Network.Google.Resource.Ml.Projects.Models.Get
46+ , Network.Google.Resource.Ml.Projects.Models.List
47+ , Network.Google.Resource.Ml.Projects.Models.Versions.Create
48+ , Network.Google.Resource.Ml.Projects.Models.Versions.Delete
49+ , Network.Google.Resource.Ml.Projects.Models.Versions.Get
50+ , Network.Google.Resource.Ml.Projects.Models.Versions.List
51+ , Network.Google.Resource.Ml.Projects.Models.Versions.SetDefault
52+ , Network.Google.Resource.Ml.Projects.Operations.Cancel
53+ , Network.Google.Resource.Ml.Projects.Operations.Delete
54+ , Network.Google.Resource.Ml.Projects.Operations.Get
55+ , Network.Google.Resource.Ml.Projects.Operations.List
56+ , Network.Google.Resource.Ml.Projects.Predict
57+
58+ other-modules:
59+ Network.Google.MachineLearning.Types.Product
60+ , Network.Google.MachineLearning.Types.Sum
61+
62+ build-depends:
63+ gogol-core == 0.1.0.*
64+ , base >= 4.7 && < 5
gogol-ml/src/.gitkeepnew file

No changes to the content.