on develop help sign in
Regenerating gogol-containerbuilder
commit33ac893a690326a2e41c5cc368e78932d3a515bf authorBrendan Hay <brendan.g.hay@gmail.com> dateFri 28 Oct 2016, 08:23 (10 years ago) parent6adfa37
21 files changed+4721
gogol-containerbuilder/LICENSE+367 gogol-containerbuilder/Makefile+1 gogol-containerbuilder/README.md+28 gogol-containerbuilder/Setup.hs+2 gogol-containerbuilder/gen/Network/Google/ContainerBuilder.hs+274 gogol-containerbuilder/gen/Network/Google/ContainerBuilder/Types.hs+215 gogol-containerbuilder/gen/Network/Google/ContainerBuilder/Types/Product.hs+1520 gogol-containerbuilder/gen/Network/Google/ContainerBuilder/Types/Sum.hs+170 gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Operations/Get.hs+169 gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Operations/List.hs+210 gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/Cancel.hs+197 gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/Create.hs+185 gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/Get.hs+187 gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/List.hs+211 gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/Create.hs+185 gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/Delete.hs+186 gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/Get.hs+185 gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/List.hs+173 gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/Patch.hs+200 gogol-containerbuilder/gogol-containerbuilder.cabal+56 gogol-containerbuilder/src/.gitkeep
gogol-containerbuilder/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-containerbuilder/Makefilenew file+1
@@ -0,0 +1 @@
1+include ../share/library.mk
gogol-containerbuilder/README.mdnew file+28
@@ -0,0 +1,28 @@
1+# gogol-containerbuilder
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 Container Builder.
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-containerbuilder` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
gogol-containerbuilder/Setup.hsnew file+2
@@ -0,0 +1,2 @@
1+import Distribution.Simple
2+main = defaultMain
gogol-containerbuilder/gen/Network/Google/ContainerBuilder.hsnew file+274
@@ -0,0 +1,274 @@
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.ContainerBuilder
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+-- Builds container images in the cloud.
17+--
18+-- /See:/ <https://cloud.google.com/container-builder/docs/ Google Cloud Container Builder API Reference>
19+module Network.Google.ContainerBuilder
20+ (
21+ -- * Service Configuration
22+ containerBuilderService
23+
24+ -- * OAuth Scopes
25+ , cloudPlatformScope
26+
27+ -- * API Declaration
28+ , ContainerBuilderAPI
29+
30+ -- * Resources
31+
32+ -- ** cloudbuild.operations.get
33+ , module Network.Google.Resource.Cloudbuild.Operations.Get
34+
35+ -- ** cloudbuild.operations.list
36+ , module Network.Google.Resource.Cloudbuild.Operations.List
37+
38+ -- ** cloudbuild.projects.builds.cancel
39+ , module Network.Google.Resource.Cloudbuild.Projects.Builds.Cancel
40+
41+ -- ** cloudbuild.projects.builds.create
42+ , module Network.Google.Resource.Cloudbuild.Projects.Builds.Create
43+
44+ -- ** cloudbuild.projects.builds.get
45+ , module Network.Google.Resource.Cloudbuild.Projects.Builds.Get
46+
47+ -- ** cloudbuild.projects.builds.list
48+ , module Network.Google.Resource.Cloudbuild.Projects.Builds.List
49+
50+ -- ** cloudbuild.projects.triggers.create
51+ , module Network.Google.Resource.Cloudbuild.Projects.Triggers.Create
52+
53+ -- ** cloudbuild.projects.triggers.delete
54+ , module Network.Google.Resource.Cloudbuild.Projects.Triggers.Delete
55+
56+ -- ** cloudbuild.projects.triggers.get
57+ , module Network.Google.Resource.Cloudbuild.Projects.Triggers.Get
58+
59+ -- ** cloudbuild.projects.triggers.list
60+ , module Network.Google.Resource.Cloudbuild.Projects.Triggers.List
61+
62+ -- ** cloudbuild.projects.triggers.patch
63+ , module Network.Google.Resource.Cloudbuild.Projects.Triggers.Patch
64+
65+ -- * Types
66+
67+ -- ** BuildStep
68+ , BuildStep
69+ , buildStep
70+ , bsDir
71+ , bsArgs
72+ , bsEnv
73+ , bsWaitFor
74+ , bsName
75+ , bsId
76+
77+ -- ** SourceProvenance
78+ , SourceProvenance
79+ , sourceProvenance
80+ , spResolvedRepoSource
81+ , spResolvedStorageSource
82+ , spFileHashes
83+
84+ -- ** ListBuildsResponse
85+ , ListBuildsResponse
86+ , listBuildsResponse
87+ , lbrNextPageToken
88+ , lbrBuilds
89+
90+ -- ** Status
91+ , Status
92+ , status
93+ , sDetails
94+ , sCode
95+ , sMessage
96+
97+ -- ** ListOperationsResponse
98+ , ListOperationsResponse
99+ , listOperationsResponse
100+ , lorNextPageToken
101+ , lorOperations
102+
103+ -- ** Hash
104+ , Hash
105+ , hash
106+ , hValue
107+ , hType
108+
109+ -- ** Results
110+ , Results
111+ , results
112+ , rImages
113+ , rBuildStepImages
114+
115+ -- ** RepoSource
116+ , RepoSource
117+ , repoSource
118+ , rsRepoName
119+ , rsCommitSha
120+ , rsBranchName
121+ , rsTagName
122+ , rsProjectId
123+
124+ -- ** Operation
125+ , Operation
126+ , operation
127+ , oDone
128+ , oError
129+ , oResponse
130+ , oName
131+ , oMetadata
132+
133+ -- ** Empty
134+ , Empty
135+ , empty
136+
137+ -- ** StatusDetailsItem
138+ , StatusDetailsItem
139+ , statusDetailsItem
140+ , sdiAddtional
141+
142+ -- ** Build
143+ , Build
144+ , build
145+ , bImages
146+ , bStatus
147+ , bSourceProvenance
148+ , bLogURL
149+ , bResults
150+ , bStartTime
151+ , bLogsBucket
152+ , bSteps
153+ , bStatusDetail
154+ , bSource
155+ , bId
156+ , bOptions
157+ , bProjectId
158+ , bTimeout
159+ , bFinishTime
160+ , bCreateTime
161+
162+ -- ** SourceProvenanceFileHashes
163+ , SourceProvenanceFileHashes
164+ , sourceProvenanceFileHashes
165+ , spfhAddtional
166+
167+ -- ** CancelBuildRequest
168+ , CancelBuildRequest
169+ , cancelBuildRequest
170+
171+ -- ** StorageSource
172+ , StorageSource
173+ , storageSource
174+ , ssBucket
175+ , ssObject
176+ , ssGeneration
177+
178+ -- ** ListBuildTriggersResponse
179+ , ListBuildTriggersResponse
180+ , listBuildTriggersResponse
181+ , lbtrTriggers
182+
183+ -- ** BuildOptionsRequestedVerifyOption
184+ , BuildOptionsRequestedVerifyOption (..)
185+
186+ -- ** FileHashes
187+ , FileHashes
188+ , fileHashes
189+ , fhFileHash
190+
191+ -- ** Xgafv
192+ , Xgafv (..)
193+
194+ -- ** BuildStatus
195+ , BuildStatus (..)
196+
197+ -- ** HashType
198+ , HashType (..)
199+
200+ -- ** Source
201+ , Source
202+ , source
203+ , sRepoSource
204+ , sStorageSource
205+
206+ -- ** OperationMetadata
207+ , OperationMetadata
208+ , operationMetadata
209+ , omAddtional
210+
211+ -- ** BuildOperationMetadata
212+ , BuildOperationMetadata
213+ , buildOperationMetadata
214+ , bomBuild
215+
216+ -- ** BuildOptions
217+ , BuildOptions
218+ , buildOptions
219+ , boRequestedVerifyOption
220+ , boSourceProvenanceHash
221+
222+ -- ** OperationResponse
223+ , OperationResponse
224+ , operationResponse
225+ , orAddtional
226+
227+ -- ** BuildTrigger
228+ , BuildTrigger
229+ , buildTrigger
230+ , btDisabled
231+ , btTriggerTemplate
232+ , btBuild
233+ , btId
234+ , btDescription
235+ , btFilename
236+ , btCreateTime
237+
238+ -- ** BuiltImage
239+ , BuiltImage
240+ , builtImage
241+ , biName
242+ , biDigest
243+ ) where
244+
245+import Network.Google.ContainerBuilder.Types
246+import Network.Google.Prelude
247+import Network.Google.Resource.Cloudbuild.Operations.Get
248+import Network.Google.Resource.Cloudbuild.Operations.List
249+import Network.Google.Resource.Cloudbuild.Projects.Builds.Cancel
250+import Network.Google.Resource.Cloudbuild.Projects.Builds.Create
251+import Network.Google.Resource.Cloudbuild.Projects.Builds.Get
252+import Network.Google.Resource.Cloudbuild.Projects.Builds.List
253+import Network.Google.Resource.Cloudbuild.Projects.Triggers.Create
254+import Network.Google.Resource.Cloudbuild.Projects.Triggers.Delete
255+import Network.Google.Resource.Cloudbuild.Projects.Triggers.Get
256+import Network.Google.Resource.Cloudbuild.Projects.Triggers.List
257+import Network.Google.Resource.Cloudbuild.Projects.Triggers.Patch
258+
259+{- $resources
260+TODO
261+-}
262+
263+-- | Represents the entirety of the methods and resources available for the Google Cloud Container Builder API service.
264+type ContainerBuilderAPI =
265+ OperationsListResource :<|> OperationsGetResource
266+ :<|> ProjectsBuildsListResource
267+ :<|> ProjectsBuildsGetResource
268+ :<|> ProjectsBuildsCreateResource
269+ :<|> ProjectsBuildsCancelResource
270+ :<|> ProjectsTriggersListResource
271+ :<|> ProjectsTriggersPatchResource
272+ :<|> ProjectsTriggersGetResource
273+ :<|> ProjectsTriggersCreateResource
274+ :<|> ProjectsTriggersDeleteResource
gogol-containerbuilder/gen/Network/Google/ContainerBuilder/Types.hsnew file+215
@@ -0,0 +1,215 @@
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.ContainerBuilder.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.ContainerBuilder.Types
18+ (
19+ -- * Service Configuration
20+ containerBuilderService
21+
22+ -- * OAuth Scopes
23+ , cloudPlatformScope
24+
25+ -- * BuildStep
26+ , BuildStep
27+ , buildStep
28+ , bsDir
29+ , bsArgs
30+ , bsEnv
31+ , bsWaitFor
32+ , bsName
33+ , bsId
34+
35+ -- * SourceProvenance
36+ , SourceProvenance
37+ , sourceProvenance
38+ , spResolvedRepoSource
39+ , spResolvedStorageSource
40+ , spFileHashes
41+
42+ -- * ListBuildsResponse
43+ , ListBuildsResponse
44+ , listBuildsResponse
45+ , lbrNextPageToken
46+ , lbrBuilds
47+
48+ -- * Status
49+ , Status
50+ , status
51+ , sDetails
52+ , sCode
53+ , sMessage
54+
55+ -- * ListOperationsResponse
56+ , ListOperationsResponse
57+ , listOperationsResponse
58+ , lorNextPageToken
59+ , lorOperations
60+
61+ -- * Hash
62+ , Hash
63+ , hash
64+ , hValue
65+ , hType
66+
67+ -- * Results
68+ , Results
69+ , results
70+ , rImages
71+ , rBuildStepImages
72+
73+ -- * RepoSource
74+ , RepoSource
75+ , repoSource
76+ , rsRepoName
77+ , rsCommitSha
78+ , rsBranchName
79+ , rsTagName
80+ , rsProjectId
81+
82+ -- * Operation
83+ , Operation
84+ , operation
85+ , oDone
86+ , oError
87+ , oResponse
88+ , oName
89+ , oMetadata
90+
91+ -- * Empty
92+ , Empty
93+ , empty
94+
95+ -- * StatusDetailsItem
96+ , StatusDetailsItem
97+ , statusDetailsItem
98+ , sdiAddtional
99+
100+ -- * Build
101+ , Build
102+ , build
103+ , bImages
104+ , bStatus
105+ , bSourceProvenance
106+ , bLogURL
107+ , bResults
108+ , bStartTime
109+ , bLogsBucket
110+ , bSteps
111+ , bStatusDetail
112+ , bSource
113+ , bId
114+ , bOptions
115+ , bProjectId
116+ , bTimeout
117+ , bFinishTime
118+ , bCreateTime
119+
120+ -- * SourceProvenanceFileHashes
121+ , SourceProvenanceFileHashes
122+ , sourceProvenanceFileHashes
123+ , spfhAddtional
124+
125+ -- * CancelBuildRequest
126+ , CancelBuildRequest
127+ , cancelBuildRequest
128+
129+ -- * StorageSource
130+ , StorageSource
131+ , storageSource
132+ , ssBucket
133+ , ssObject
134+ , ssGeneration
135+
136+ -- * ListBuildTriggersResponse
137+ , ListBuildTriggersResponse
138+ , listBuildTriggersResponse
139+ , lbtrTriggers
140+
141+ -- * BuildOptionsRequestedVerifyOption
142+ , BuildOptionsRequestedVerifyOption (..)
143+
144+ -- * FileHashes
145+ , FileHashes
146+ , fileHashes
147+ , fhFileHash
148+
149+ -- * Xgafv
150+ , Xgafv (..)
151+
152+ -- * BuildStatus
153+ , BuildStatus (..)
154+
155+ -- * HashType
156+ , HashType (..)
157+
158+ -- * Source
159+ , Source
160+ , source
161+ , sRepoSource
162+ , sStorageSource
163+
164+ -- * OperationMetadata
165+ , OperationMetadata
166+ , operationMetadata
167+ , omAddtional
168+
169+ -- * BuildOperationMetadata
170+ , BuildOperationMetadata
171+ , buildOperationMetadata
172+ , bomBuild
173+
174+ -- * BuildOptions
175+ , BuildOptions
176+ , buildOptions
177+ , boRequestedVerifyOption
178+ , boSourceProvenanceHash
179+
180+ -- * OperationResponse
181+ , OperationResponse
182+ , operationResponse
183+ , orAddtional
184+
185+ -- * BuildTrigger
186+ , BuildTrigger
187+ , buildTrigger
188+ , btDisabled
189+ , btTriggerTemplate
190+ , btBuild
191+ , btId
192+ , btDescription
193+ , btFilename
194+ , btCreateTime
195+
196+ -- * BuiltImage
197+ , BuiltImage
198+ , builtImage
199+ , biName
200+ , biDigest
201+ ) where
202+
203+import Network.Google.ContainerBuilder.Types.Product
204+import Network.Google.ContainerBuilder.Types.Sum
205+import Network.Google.Prelude
206+
207+-- | Default request referring to version 'v1' of the Google Cloud Container Builder API. This contains the host and root path used as a starting point for constructing service requests.
208+containerBuilderService :: ServiceConfig
209+containerBuilderService
210+ = defaultService (ServiceId "cloudbuild:v1")
211+ "cloudbuild.googleapis.com"
212+
213+-- | View and manage your data across Google Cloud Platform services
214+cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]
215+cloudPlatformScope = Proxy;
gogol-containerbuilder/gen/Network/Google/ContainerBuilder/Types/Product.hsnew file+1520
@@ -0,0 +1,1520 @@
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.ContainerBuilder.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.ContainerBuilder.Types.Product where
19+
20+import Network.Google.ContainerBuilder.Types.Sum
21+import Network.Google.Prelude
22+
23+-- | BuildStep describes a step to perform in the build pipeline.
24+--
25+-- /See:/ 'buildStep' smart constructor.
26+data BuildStep = BuildStep'
27+ { _bsDir :: !(Maybe Text)
28+ , _bsArgs :: !(Maybe [Text])
29+ , _bsEnv :: !(Maybe [Text])
30+ , _bsWaitFor :: !(Maybe [Text])
31+ , _bsName :: !(Maybe Text)
32+ , _bsId :: !(Maybe Text)
33+ } deriving (Eq,Show,Data,Typeable,Generic)
34+
35+-- | Creates a value of 'BuildStep' with the minimum fields required to make a request.
36+--
37+-- Use one of the following lenses to modify other fields as desired:
38+--
39+-- * 'bsDir'
40+--
41+-- * 'bsArgs'
42+--
43+-- * 'bsEnv'
44+--
45+-- * 'bsWaitFor'
46+--
47+-- * 'bsName'
48+--
49+-- * 'bsId'
50+buildStep
51+ :: BuildStep
52+buildStep =
53+ BuildStep'
54+ { _bsDir = Nothing
55+ , _bsArgs = Nothing
56+ , _bsEnv = Nothing
57+ , _bsWaitFor = Nothing
58+ , _bsName = Nothing
59+ , _bsId = Nothing
60+ }
61+
62+-- | Working directory (relative to project source root) to use when running
63+-- this operation\'s container.
64+bsDir :: Lens' BuildStep (Maybe Text)
65+bsDir = lens _bsDir (\ s a -> s{_bsDir = a})
66+
67+-- | A list of arguments that will be presented to the step when it is
68+-- started. If the image used to run the step\'s container has an
69+-- entrypoint, these args will be used as arguments to that entrypoint. If
70+-- the image does not define an entrypoint, the first element in args will
71+-- be used as the entrypoint, and the remainder will be used as arguments.
72+bsArgs :: Lens' BuildStep [Text]
73+bsArgs
74+ = lens _bsArgs (\ s a -> s{_bsArgs = a}) . _Default .
75+ _Coerce
76+
77+-- | A list of environment variable definitions to be used when running a
78+-- step. The elements are of the form \"KEY=VALUE\" for the environment
79+-- variable \"KEY\" being given the value \"VALUE\".
80+bsEnv :: Lens' BuildStep [Text]
81+bsEnv
82+ = lens _bsEnv (\ s a -> s{_bsEnv = a}) . _Default .
83+ _Coerce
84+
85+-- | The ID(s) of the step(s) that this build step depends on. This build
86+-- step will not start until all the build steps in wait_for have completed
87+-- successfully. If wait_for is empty, this build step will start when all
88+-- previous build steps in the Build.Steps list have completed
89+-- successfully.
90+bsWaitFor :: Lens' BuildStep [Text]
91+bsWaitFor
92+ = lens _bsWaitFor (\ s a -> s{_bsWaitFor = a}) .
93+ _Default
94+ . _Coerce
95+
96+-- | The name of the container image that will run this particular build
97+-- step. If the image is already available in the host\'s Docker daemon\'s
98+-- cache, it will be run directly. If not, the host will attempt to pull
99+-- the image first, using the builder service account\'s credentials if
100+-- necessary. The Docker daemon\'s cache will already have the latest
101+-- versions of all of the officially supported build steps
102+-- (https:\/\/github.com\/GoogleCloudPlatform\/cloud-builders). The Docker
103+-- daemon will also have cached many of the layers for some popular images,
104+-- like \"ubuntu\", \"debian\", but they will be refreshed at the time you
105+-- attempt to use them. If you built an image in a previous build step, it
106+-- will be stored in the host\'s Docker daemon\'s cache and is available to
107+-- use as the name for a later build step.
108+bsName :: Lens' BuildStep (Maybe Text)
109+bsName = lens _bsName (\ s a -> s{_bsName = a})
110+
111+-- | Optional unique identifier for this build step, used in wait_for to
112+-- reference this build step as a dependency.
113+bsId :: Lens' BuildStep (Maybe Text)
114+bsId = lens _bsId (\ s a -> s{_bsId = a})
115+
116+instance FromJSON BuildStep where
117+ parseJSON
118+ = withObject "BuildStep"
119+ (\ o ->
120+ BuildStep' <$>
121+ (o .:? "dir") <*> (o .:? "args" .!= mempty) <*>
122+ (o .:? "env" .!= mempty)
123+ <*> (o .:? "waitFor" .!= mempty)
124+ <*> (o .:? "name")
125+ <*> (o .:? "id"))
126+
127+instance ToJSON BuildStep where
128+ toJSON BuildStep'{..}
129+ = object
130+ (catMaybes
131+ [("dir" .=) <$> _bsDir, ("args" .=) <$> _bsArgs,
132+ ("env" .=) <$> _bsEnv, ("waitFor" .=) <$> _bsWaitFor,
133+ ("name" .=) <$> _bsName, ("id" .=) <$> _bsId])
134+
135+-- | Provenance of the source. Ways to find the original source, or verify
136+-- that some source was used for this build.
137+--
138+-- /See:/ 'sourceProvenance' smart constructor.
139+data SourceProvenance = SourceProvenance'
140+ { _spResolvedRepoSource :: !(Maybe RepoSource)
141+ , _spResolvedStorageSource :: !(Maybe StorageSource)
142+ , _spFileHashes :: !(Maybe SourceProvenanceFileHashes)
143+ } deriving (Eq,Show,Data,Typeable,Generic)
144+
145+-- | Creates a value of 'SourceProvenance' with the minimum fields required to make a request.
146+--
147+-- Use one of the following lenses to modify other fields as desired:
148+--
149+-- * 'spResolvedRepoSource'
150+--
151+-- * 'spResolvedStorageSource'
152+--
153+-- * 'spFileHashes'
154+sourceProvenance
155+ :: SourceProvenance
156+sourceProvenance =
157+ SourceProvenance'
158+ { _spResolvedRepoSource = Nothing
159+ , _spResolvedStorageSource = Nothing
160+ , _spFileHashes = Nothing
161+ }
162+
163+-- | A copy of the build\'s source.repo_source, if exists, with any revisions
164+-- resolved.
165+spResolvedRepoSource :: Lens' SourceProvenance (Maybe RepoSource)
166+spResolvedRepoSource
167+ = lens _spResolvedRepoSource
168+ (\ s a -> s{_spResolvedRepoSource = a})
169+
170+-- | A copy of the build\'s source.storage_source, if exists, with any
171+-- generations resolved.
172+spResolvedStorageSource :: Lens' SourceProvenance (Maybe StorageSource)
173+spResolvedStorageSource
174+ = lens _spResolvedStorageSource
175+ (\ s a -> s{_spResolvedStorageSource = a})
176+
177+-- | Hash(es) of the build source, which can be used to verify that the
178+-- original source integrity was maintained in the build. Note that
179+-- FileHashes will only be populated if BuildOptions has requested a
180+-- SourceProvenanceHash. The keys to this map are file paths used as build
181+-- source and the values contain the hash values for those files. If the
182+-- build source came in a single package such as a gzipped tarfile
183+-- (.tar.gz), the FileHash will be for the single path to that file.
184+-- \'OutputOnly
185+spFileHashes :: Lens' SourceProvenance (Maybe SourceProvenanceFileHashes)
186+spFileHashes
187+ = lens _spFileHashes (\ s a -> s{_spFileHashes = a})
188+
189+instance FromJSON SourceProvenance where
190+ parseJSON
191+ = withObject "SourceProvenance"
192+ (\ o ->
193+ SourceProvenance' <$>
194+ (o .:? "resolvedRepoSource") <*>
195+ (o .:? "resolvedStorageSource")
196+ <*> (o .:? "fileHashes"))
197+
198+instance ToJSON SourceProvenance where
199+ toJSON SourceProvenance'{..}
200+ = object
201+ (catMaybes
202+ [("resolvedRepoSource" .=) <$> _spResolvedRepoSource,
203+ ("resolvedStorageSource" .=) <$>
204+ _spResolvedStorageSource,
205+ ("fileHashes" .=) <$> _spFileHashes])
206+
207+-- | Response including listed builds.
208+--
209+-- /See:/ 'listBuildsResponse' smart constructor.
210+data ListBuildsResponse = ListBuildsResponse'
211+ { _lbrNextPageToken :: !(Maybe Text)
212+ , _lbrBuilds :: !(Maybe [Build])
213+ } deriving (Eq,Show,Data,Typeable,Generic)
214+
215+-- | Creates a value of 'ListBuildsResponse' with the minimum fields required to make a request.
216+--
217+-- Use one of the following lenses to modify other fields as desired:
218+--
219+-- * 'lbrNextPageToken'
220+--
221+-- * 'lbrBuilds'
222+listBuildsResponse
223+ :: ListBuildsResponse
224+listBuildsResponse =
225+ ListBuildsResponse'
226+ { _lbrNextPageToken = Nothing
227+ , _lbrBuilds = Nothing
228+ }
229+
230+-- | Token to receive the next page of results.
231+lbrNextPageToken :: Lens' ListBuildsResponse (Maybe Text)
232+lbrNextPageToken
233+ = lens _lbrNextPageToken
234+ (\ s a -> s{_lbrNextPageToken = a})
235+
236+-- | Builds will be sorted by create_time, descending.
237+lbrBuilds :: Lens' ListBuildsResponse [Build]
238+lbrBuilds
239+ = lens _lbrBuilds (\ s a -> s{_lbrBuilds = a}) .
240+ _Default
241+ . _Coerce
242+
243+instance FromJSON ListBuildsResponse where
244+ parseJSON
245+ = withObject "ListBuildsResponse"
246+ (\ o ->
247+ ListBuildsResponse' <$>
248+ (o .:? "nextPageToken") <*>
249+ (o .:? "builds" .!= mempty))
250+
251+instance ToJSON ListBuildsResponse where
252+ toJSON ListBuildsResponse'{..}
253+ = object
254+ (catMaybes
255+ [("nextPageToken" .=) <$> _lbrNextPageToken,
256+ ("builds" .=) <$> _lbrBuilds])
257+
258+-- | The \`Status\` type defines a logical error model that is suitable for
259+-- different programming environments, including REST APIs and RPC APIs. It
260+-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is
261+-- designed to be: - Simple to use and understand for most users - Flexible
262+-- enough to meet unexpected needs # Overview The \`Status\` message
263+-- contains three pieces of data: error code, error message, and error
264+-- details. The error code should be an enum value of google.rpc.Code, but
265+-- it may accept additional error codes if needed. The error message should
266+-- be a developer-facing English message that helps developers *understand*
267+-- and *resolve* the error. If a localized user-facing error message is
268+-- needed, put the localized message in the error details or localize it in
269+-- the client. The optional error details may contain arbitrary information
270+-- about the error. There is a predefined set of error detail types in the
271+-- package \`google.rpc\` which can be used for common error conditions. #
272+-- Language mapping The \`Status\` message is the logical representation of
273+-- the error model, but it is not necessarily the actual wire format. When
274+-- the \`Status\` message is exposed in different client libraries and
275+-- different wire protocols, it can be mapped differently. For example, it
276+-- will likely be mapped to some exceptions in Java, but more likely mapped
277+-- to some error codes in C. # Other uses The error model and the
278+-- \`Status\` message can be used in a variety of environments, either with
279+-- or without APIs, to provide a consistent developer experience across
280+-- different environments. Example uses of this error model include: -
281+-- Partial errors. If a service needs to return partial errors to the
282+-- client, it may embed the \`Status\` in the normal response to indicate
283+-- the partial errors. - Workflow errors. A typical workflow has multiple
284+-- steps. Each step may have a \`Status\` message for error reporting
285+-- purpose. - Batch operations. If a client uses batch request and batch
286+-- response, the \`Status\` message should be used directly inside batch
287+-- response, one for each error sub-response. - Asynchronous operations. If
288+-- an API call embeds asynchronous operation results in its response, the
289+-- status of those operations should be represented directly using the
290+-- \`Status\` message. - Logging. If some API errors are stored in logs,
291+-- the message \`Status\` could be used directly after any stripping needed
292+-- for security\/privacy reasons.
293+--
294+-- /See:/ 'status' smart constructor.
295+data Status = Status'
296+ { _sDetails :: !(Maybe [StatusDetailsItem])
297+ , _sCode :: !(Maybe (Textual Int32))
298+ , _sMessage :: !(Maybe Text)
299+ } deriving (Eq,Show,Data,Typeable,Generic)
300+
301+-- | Creates a value of 'Status' with the minimum fields required to make a request.
302+--
303+-- Use one of the following lenses to modify other fields as desired:
304+--
305+-- * 'sDetails'
306+--
307+-- * 'sCode'
308+--
309+-- * 'sMessage'
310+status
311+ :: Status
312+status =
313+ Status'
314+ { _sDetails = Nothing
315+ , _sCode = Nothing
316+ , _sMessage = Nothing
317+ }
318+
319+-- | A list of messages that carry the error details. There will be a common
320+-- set of message types for APIs to use.
321+sDetails :: Lens' Status [StatusDetailsItem]
322+sDetails
323+ = lens _sDetails (\ s a -> s{_sDetails = a}) .
324+ _Default
325+ . _Coerce
326+
327+-- | The status code, which should be an enum value of google.rpc.Code.
328+sCode :: Lens' Status (Maybe Int32)
329+sCode
330+ = lens _sCode (\ s a -> s{_sCode = a}) .
331+ mapping _Coerce
332+
333+-- | A developer-facing error message, which should be in English. Any
334+-- user-facing error message should be localized and sent in the
335+-- google.rpc.Status.details field, or localized by the client.
336+sMessage :: Lens' Status (Maybe Text)
337+sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
338+
339+instance FromJSON Status where
340+ parseJSON
341+ = withObject "Status"
342+ (\ o ->
343+ Status' <$>
344+ (o .:? "details" .!= mempty) <*> (o .:? "code") <*>
345+ (o .:? "message"))
346+
347+instance ToJSON Status where
348+ toJSON Status'{..}
349+ = object
350+ (catMaybes
351+ [("details" .=) <$> _sDetails,
352+ ("code" .=) <$> _sCode,
353+ ("message" .=) <$> _sMessage])
354+
355+-- | The response message for Operations.ListOperations.
356+--
357+-- /See:/ 'listOperationsResponse' smart constructor.
358+data ListOperationsResponse = ListOperationsResponse'
359+ { _lorNextPageToken :: !(Maybe Text)
360+ , _lorOperations :: !(Maybe [Operation])
361+ } deriving (Eq,Show,Data,Typeable,Generic)
362+
363+-- | Creates a value of 'ListOperationsResponse' with the minimum fields required to make a request.
364+--
365+-- Use one of the following lenses to modify other fields as desired:
366+--
367+-- * 'lorNextPageToken'
368+--
369+-- * 'lorOperations'
370+listOperationsResponse
371+ :: ListOperationsResponse
372+listOperationsResponse =
373+ ListOperationsResponse'
374+ { _lorNextPageToken = Nothing
375+ , _lorOperations = Nothing
376+ }
377+
378+-- | The standard List next-page token.
379+lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text)
380+lorNextPageToken
381+ = lens _lorNextPageToken
382+ (\ s a -> s{_lorNextPageToken = a})
383+
384+-- | A list of operations that matches the specified filter in the request.
385+lorOperations :: Lens' ListOperationsResponse [Operation]
386+lorOperations
387+ = lens _lorOperations
388+ (\ s a -> s{_lorOperations = a})
389+ . _Default
390+ . _Coerce
391+
392+instance FromJSON ListOperationsResponse where
393+ parseJSON
394+ = withObject "ListOperationsResponse"
395+ (\ o ->
396+ ListOperationsResponse' <$>
397+ (o .:? "nextPageToken") <*>
398+ (o .:? "operations" .!= mempty))
399+
400+instance ToJSON ListOperationsResponse where
401+ toJSON ListOperationsResponse'{..}
402+ = object
403+ (catMaybes
404+ [("nextPageToken" .=) <$> _lorNextPageToken,
405+ ("operations" .=) <$> _lorOperations])
406+
407+-- | Container message for hash values.
408+--
409+-- /See:/ 'hash' smart constructor.
410+data Hash = Hash'
411+ { _hValue :: !(Maybe Base64)
412+ , _hType :: !(Maybe HashType)
413+ } deriving (Eq,Show,Data,Typeable,Generic)
414+
415+-- | Creates a value of 'Hash' with the minimum fields required to make a request.
416+--
417+-- Use one of the following lenses to modify other fields as desired:
418+--
419+-- * 'hValue'
420+--
421+-- * 'hType'
422+hash
423+ :: Hash
424+hash =
425+ Hash'
426+ { _hValue = Nothing
427+ , _hType = Nothing
428+ }
429+
430+-- | The hash value.
431+hValue :: Lens' Hash (Maybe ByteString)
432+hValue
433+ = lens _hValue (\ s a -> s{_hValue = a}) .
434+ mapping _Base64
435+
436+-- | The type of hash that was performed.
437+hType :: Lens' Hash (Maybe HashType)
438+hType = lens _hType (\ s a -> s{_hType = a})
439+
440+instance FromJSON Hash where
441+ parseJSON
442+ = withObject "Hash"
443+ (\ o -> Hash' <$> (o .:? "value") <*> (o .:? "type"))
444+
445+instance ToJSON Hash where
446+ toJSON Hash'{..}
447+ = object
448+ (catMaybes
449+ [("value" .=) <$> _hValue, ("type" .=) <$> _hType])
450+
451+-- | Results describes the artifacts created by the build pipeline.
452+--
453+-- /See:/ 'results' smart constructor.
454+data Results = Results'
455+ { _rImages :: !(Maybe [BuiltImage])
456+ , _rBuildStepImages :: !(Maybe [Text])
457+ } deriving (Eq,Show,Data,Typeable,Generic)
458+
459+-- | Creates a value of 'Results' with the minimum fields required to make a request.
460+--
461+-- Use one of the following lenses to modify other fields as desired:
462+--
463+-- * 'rImages'
464+--
465+-- * 'rBuildStepImages'
466+results
467+ :: Results
468+results =
469+ Results'
470+ { _rImages = Nothing
471+ , _rBuildStepImages = Nothing
472+ }
473+
474+-- | Images that were built as a part of the build.
475+rImages :: Lens' Results [BuiltImage]
476+rImages
477+ = lens _rImages (\ s a -> s{_rImages = a}) . _Default
478+ . _Coerce
479+
480+-- | List of build step digests, in order corresponding to build step
481+-- indices.
482+rBuildStepImages :: Lens' Results [Text]
483+rBuildStepImages
484+ = lens _rBuildStepImages
485+ (\ s a -> s{_rBuildStepImages = a})
486+ . _Default
487+ . _Coerce
488+
489+instance FromJSON Results where
490+ parseJSON
491+ = withObject "Results"
492+ (\ o ->
493+ Results' <$>
494+ (o .:? "images" .!= mempty) <*>
495+ (o .:? "buildStepImages" .!= mempty))
496+
497+instance ToJSON Results where
498+ toJSON Results'{..}
499+ = object
500+ (catMaybes
501+ [("images" .=) <$> _rImages,
502+ ("buildStepImages" .=) <$> _rBuildStepImages])
503+
504+-- | RepoSource describes the location of the source in a Google Cloud Source
505+-- Repository.
506+--
507+-- /See:/ 'repoSource' smart constructor.
508+data RepoSource = RepoSource'
509+ { _rsRepoName :: !(Maybe Text)
510+ , _rsCommitSha :: !(Maybe Text)
511+ , _rsBranchName :: !(Maybe Text)
512+ , _rsTagName :: !(Maybe Text)
513+ , _rsProjectId :: !(Maybe Text)
514+ } deriving (Eq,Show,Data,Typeable,Generic)
515+
516+-- | Creates a value of 'RepoSource' with the minimum fields required to make a request.
517+--
518+-- Use one of the following lenses to modify other fields as desired:
519+--
520+-- * 'rsRepoName'
521+--
522+-- * 'rsCommitSha'
523+--
524+-- * 'rsBranchName'
525+--
526+-- * 'rsTagName'
527+--
528+-- * 'rsProjectId'
529+repoSource
530+ :: RepoSource
531+repoSource =
532+ RepoSource'
533+ { _rsRepoName = Nothing
534+ , _rsCommitSha = Nothing
535+ , _rsBranchName = Nothing
536+ , _rsTagName = Nothing
537+ , _rsProjectId = Nothing
538+ }
539+
540+-- | Name of the repo. If omitted, the name \"default\" is assumed.
541+rsRepoName :: Lens' RepoSource (Maybe Text)
542+rsRepoName
543+ = lens _rsRepoName (\ s a -> s{_rsRepoName = a})
544+
545+-- | Explicit commit SHA to build.
546+rsCommitSha :: Lens' RepoSource (Maybe Text)
547+rsCommitSha
548+ = lens _rsCommitSha (\ s a -> s{_rsCommitSha = a})
549+
550+-- | Name of the branch to build.
551+rsBranchName :: Lens' RepoSource (Maybe Text)
552+rsBranchName
553+ = lens _rsBranchName (\ s a -> s{_rsBranchName = a})
554+
555+-- | Name of the tag to build.
556+rsTagName :: Lens' RepoSource (Maybe Text)
557+rsTagName
558+ = lens _rsTagName (\ s a -> s{_rsTagName = a})
559+
560+-- | ID of the project that owns the repo. If omitted, the project ID
561+-- requesting the build is assumed.
562+rsProjectId :: Lens' RepoSource (Maybe Text)
563+rsProjectId
564+ = lens _rsProjectId (\ s a -> s{_rsProjectId = a})
565+
566+instance FromJSON RepoSource where
567+ parseJSON
568+ = withObject "RepoSource"
569+ (\ o ->
570+ RepoSource' <$>
571+ (o .:? "repoName") <*> (o .:? "commitSha") <*>
572+ (o .:? "branchName")
573+ <*> (o .:? "tagName")
574+ <*> (o .:? "projectId"))
575+
576+instance ToJSON RepoSource where
577+ toJSON RepoSource'{..}
578+ = object
579+ (catMaybes
580+ [("repoName" .=) <$> _rsRepoName,
581+ ("commitSha" .=) <$> _rsCommitSha,
582+ ("branchName" .=) <$> _rsBranchName,
583+ ("tagName" .=) <$> _rsTagName,
584+ ("projectId" .=) <$> _rsProjectId])
585+
586+-- | This resource represents a long-running operation that is the result of
587+-- a network API call.
588+--
589+-- /See:/ 'operation' smart constructor.
590+data Operation = Operation'
591+ { _oDone :: !(Maybe Bool)
592+ , _oError :: !(Maybe Status)
593+ , _oResponse :: !(Maybe OperationResponse)
594+ , _oName :: !(Maybe Text)
595+ , _oMetadata :: !(Maybe OperationMetadata)
596+ } deriving (Eq,Show,Data,Typeable,Generic)
597+
598+-- | Creates a value of 'Operation' with the minimum fields required to make a request.
599+--
600+-- Use one of the following lenses to modify other fields as desired:
601+--
602+-- * 'oDone'
603+--
604+-- * 'oError'
605+--
606+-- * 'oResponse'
607+--
608+-- * 'oName'
609+--
610+-- * 'oMetadata'
611+operation
612+ :: Operation
613+operation =
614+ Operation'
615+ { _oDone = Nothing
616+ , _oError = Nothing
617+ , _oResponse = Nothing
618+ , _oName = Nothing
619+ , _oMetadata = Nothing
620+ }
621+
622+-- | If the value is \`false\`, it means the operation is still in progress.
623+-- If true, the operation is completed, and either \`error\` or
624+-- \`response\` is available.
625+oDone :: Lens' Operation (Maybe Bool)
626+oDone = lens _oDone (\ s a -> s{_oDone = a})
627+
628+-- | The error result of the operation in case of failure or cancellation.
629+oError :: Lens' Operation (Maybe Status)
630+oError = lens _oError (\ s a -> s{_oError = a})
631+
632+-- | The normal response of the operation in case of success. If the original
633+-- method returns no data on success, such as \`Delete\`, the response is
634+-- \`google.protobuf.Empty\`. If the original method is standard
635+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
636+-- For other methods, the response should have the type \`XxxResponse\`,
637+-- where \`Xxx\` is the original method name. For example, if the original
638+-- method name is \`TakeSnapshot()\`, the inferred response type is
639+-- \`TakeSnapshotResponse\`.
640+oResponse :: Lens' Operation (Maybe OperationResponse)
641+oResponse
642+ = lens _oResponse (\ s a -> s{_oResponse = a})
643+
644+-- | The server-assigned name, which is only unique within the same service
645+-- that originally returns it. If you use the default HTTP mapping, the
646+-- \`name\` should have the format of \`operations\/some\/unique\/name\`.
647+oName :: Lens' Operation (Maybe Text)
648+oName = lens _oName (\ s a -> s{_oName = a})
649+
650+-- | Service-specific metadata associated with the operation. It typically
651+-- contains progress information and common metadata such as create time.
652+-- Some services might not provide such metadata. Any method that returns a
653+-- long-running operation should document the metadata type, if any.
654+oMetadata :: Lens' Operation (Maybe OperationMetadata)
655+oMetadata
656+ = lens _oMetadata (\ s a -> s{_oMetadata = a})
657+
658+instance FromJSON Operation where
659+ parseJSON
660+ = withObject "Operation"
661+ (\ o ->
662+ Operation' <$>
663+ (o .:? "done") <*> (o .:? "error") <*>
664+ (o .:? "response")
665+ <*> (o .:? "name")
666+ <*> (o .:? "metadata"))
667+
668+instance ToJSON Operation where
669+ toJSON Operation'{..}
670+ = object
671+ (catMaybes
672+ [("done" .=) <$> _oDone, ("error" .=) <$> _oError,
673+ ("response" .=) <$> _oResponse,
674+ ("name" .=) <$> _oName,
675+ ("metadata" .=) <$> _oMetadata])
676+
677+-- | A generic empty message that you can re-use to avoid defining duplicated
678+-- empty messages in your APIs. A typical example is to use it as the
679+-- request or the response type of an API method. For instance: service Foo
680+-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The
681+-- JSON representation for \`Empty\` is empty JSON object \`{}\`.
682+--
683+-- /See:/ 'empty' smart constructor.
684+data Empty =
685+ Empty'
686+ deriving (Eq,Show,Data,Typeable,Generic)
687+
688+-- | Creates a value of 'Empty' with the minimum fields required to make a request.
689+--
690+empty
691+ :: Empty
692+empty = Empty'
693+
694+instance FromJSON Empty where
695+ parseJSON = withObject "Empty" (\ o -> pure Empty')
696+
697+instance ToJSON Empty where
698+ toJSON = const emptyObject
699+
700+--
701+-- /See:/ 'statusDetailsItem' smart constructor.
702+newtype StatusDetailsItem = StatusDetailsItem'
703+ { _sdiAddtional :: HashMap Text JSONValue
704+ } deriving (Eq,Show,Data,Typeable,Generic)
705+
706+-- | Creates a value of 'StatusDetailsItem' with the minimum fields required to make a request.
707+--
708+-- Use one of the following lenses to modify other fields as desired:
709+--
710+-- * 'sdiAddtional'
711+statusDetailsItem
712+ :: HashMap Text JSONValue -- ^ 'sdiAddtional'
713+ -> StatusDetailsItem
714+statusDetailsItem pSdiAddtional_ =
715+ StatusDetailsItem'
716+ { _sdiAddtional = _Coerce # pSdiAddtional_
717+ }
718+
719+-- | Properties of the object. Contains field \'type with type URL.
720+sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
721+sdiAddtional
722+ = lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
723+ . _Coerce
724+
725+instance FromJSON StatusDetailsItem where
726+ parseJSON
727+ = withObject "StatusDetailsItem"
728+ (\ o -> StatusDetailsItem' <$> (parseJSONObject o))
729+
730+instance ToJSON StatusDetailsItem where
731+ toJSON = toJSON . _sdiAddtional
732+
733+-- | A build resource in the Container Builder API. At a high level, a Build
734+-- describes where to find source code, how to build it (for example, the
735+-- builder image to run on the source), and what tag to apply to the built
736+-- image when it is pushed to Google Container Registry. Fields can include
737+-- the following variables which will be expanded when the build is
738+-- created: - $PROJECT_ID: the project ID of the build. - $BUILD_ID: the
739+-- autogenerated ID of the build. - $REPO_NAME: the source repository name
740+-- specified by RepoSource. - $BRANCH_NAME: the branch name specified by
741+-- RepoSource. - $TAG_NAME: the tag name specified by RepoSource. -
742+-- $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
743+-- resolved from the specified branch or tag.
744+--
745+-- /See:/ 'build' smart constructor.
746+data Build = Build'
747+ { _bImages :: !(Maybe [Text])
748+ , _bStatus :: !(Maybe BuildStatus)
749+ , _bSourceProvenance :: !(Maybe SourceProvenance)
750+ , _bLogURL :: !(Maybe Text)
751+ , _bResults :: !(Maybe Results)
752+ , _bStartTime :: !(Maybe DateTime')
753+ , _bLogsBucket :: !(Maybe Text)
754+ , _bSteps :: !(Maybe [BuildStep])
755+ , _bStatusDetail :: !(Maybe Text)
756+ , _bSource :: !(Maybe Source)
757+ , _bId :: !(Maybe Text)
758+ , _bOptions :: !(Maybe BuildOptions)
759+ , _bProjectId :: !(Maybe Text)
760+ , _bTimeout :: !(Maybe Duration)
761+ , _bFinishTime :: !(Maybe DateTime')
762+ , _bCreateTime :: !(Maybe DateTime')
763+ } deriving (Eq,Show,Data,Typeable,Generic)
764+
765+-- | Creates a value of 'Build' with the minimum fields required to make a request.
766+--
767+-- Use one of the following lenses to modify other fields as desired:
768+--
769+-- * 'bImages'
770+--
771+-- * 'bStatus'
772+--
773+-- * 'bSourceProvenance'
774+--
775+-- * 'bLogURL'
776+--
777+-- * 'bResults'
778+--
779+-- * 'bStartTime'
780+--
781+-- * 'bLogsBucket'
782+--
783+-- * 'bSteps'
784+--
785+-- * 'bStatusDetail'
786+--
787+-- * 'bSource'
788+--
789+-- * 'bId'
790+--
791+-- * 'bOptions'
792+--
793+-- * 'bProjectId'
794+--
795+-- * 'bTimeout'
796+--
797+-- * 'bFinishTime'
798+--
799+-- * 'bCreateTime'
800+build
801+ :: Build
802+build =
803+ Build'
804+ { _bImages = Nothing
805+ , _bStatus = Nothing
806+ , _bSourceProvenance = Nothing
807+ , _bLogURL = Nothing
808+ , _bResults = Nothing
809+ , _bStartTime = Nothing
810+ , _bLogsBucket = Nothing
811+ , _bSteps = Nothing
812+ , _bStatusDetail = Nothing
813+ , _bSource = Nothing
814+ , _bId = Nothing
815+ , _bOptions = Nothing
816+ , _bProjectId = Nothing
817+ , _bTimeout = Nothing
818+ , _bFinishTime = Nothing
819+ , _bCreateTime = Nothing
820+ }
821+
822+-- | A list of images to be pushed upon the successful completion of all
823+-- build steps. The images will be pushed using the builder service
824+-- account\'s credentials. The digests of the pushed images will be stored
825+-- in the Build resource\'s results field. If any of the images fail to be
826+-- pushed, the build is marked FAILURE.
827+bImages :: Lens' Build [Text]
828+bImages
829+ = lens _bImages (\ s a -> s{_bImages = a}) . _Default
830+ . _Coerce
831+
832+-- | Status of the build. \'OutputOnly
833+bStatus :: Lens' Build (Maybe BuildStatus)
834+bStatus = lens _bStatus (\ s a -> s{_bStatus = a})
835+
836+-- | A permanent fixed identifier for source. \'OutputOnly
837+bSourceProvenance :: Lens' Build (Maybe SourceProvenance)
838+bSourceProvenance
839+ = lens _bSourceProvenance
840+ (\ s a -> s{_bSourceProvenance = a})
841+
842+-- | URL to logs for this build in Google Cloud Logging. \'OutputOnly
843+bLogURL :: Lens' Build (Maybe Text)
844+bLogURL = lens _bLogURL (\ s a -> s{_bLogURL = a})
845+
846+-- | Results of the build. \'OutputOnly
847+bResults :: Lens' Build (Maybe Results)
848+bResults = lens _bResults (\ s a -> s{_bResults = a})
849+
850+-- | Time at which execution of the build was started. \'OutputOnly
851+bStartTime :: Lens' Build (Maybe UTCTime)
852+bStartTime
853+ = lens _bStartTime (\ s a -> s{_bStartTime = a}) .
854+ mapping _DateTime
855+
856+-- | Google Cloud Storage bucket where logs should be written (see [Bucket
857+-- Name
858+-- Requirements](https:\/\/cloud.google.com\/storage\/docs\/bucket-naming#requirements)).
859+-- Logs file names will be of the format
860+-- \`/l//o//g//s//b//u//c//k//e//t/\//l//o//g/−{build_id}.txt\`.
861+bLogsBucket :: Lens' Build (Maybe Text)
862+bLogsBucket
863+ = lens _bLogsBucket (\ s a -> s{_bLogsBucket = a})
864+
865+-- | Describes the operations to be performed on the workspace.
866+bSteps :: Lens' Build [BuildStep]
867+bSteps
868+ = lens _bSteps (\ s a -> s{_bSteps = a}) . _Default .
869+ _Coerce
870+
871+-- | Customer-readable message about the current status. \'OutputOnly
872+bStatusDetail :: Lens' Build (Maybe Text)
873+bStatusDetail
874+ = lens _bStatusDetail
875+ (\ s a -> s{_bStatusDetail = a})
876+
877+-- | Describes where to find the source files to build.
878+bSource :: Lens' Build (Maybe Source)
879+bSource = lens _bSource (\ s a -> s{_bSource = a})
880+
881+-- | Unique identifier of the build. \'OutputOnly
882+bId :: Lens' Build (Maybe Text)
883+bId = lens _bId (\ s a -> s{_bId = a})
884+
885+-- | Special options for this build.
886+bOptions :: Lens' Build (Maybe BuildOptions)
887+bOptions = lens _bOptions (\ s a -> s{_bOptions = a})
888+
889+-- | ID of the project. \'OutputOnly.
890+bProjectId :: Lens' Build (Maybe Text)
891+bProjectId
892+ = lens _bProjectId (\ s a -> s{_bProjectId = a})
893+
894+-- | Amount of time that this build should be allowed to run, to second
895+-- granularity. If this amount of time elapses, work on the build will
896+-- cease and the build status will be TIMEOUT. Default time is ten minutes.
897+bTimeout :: Lens' Build (Maybe Scientific)
898+bTimeout
899+ = lens _bTimeout (\ s a -> s{_bTimeout = a}) .
900+ mapping _Duration
901+
902+-- | Time at which execution of the build was finished. \'OutputOnly
903+bFinishTime :: Lens' Build (Maybe UTCTime)
904+bFinishTime
905+ = lens _bFinishTime (\ s a -> s{_bFinishTime = a}) .
906+ mapping _DateTime
907+
908+-- | Time at which the build was created. \'OutputOnly
909+bCreateTime :: Lens' Build (Maybe UTCTime)
910+bCreateTime
911+ = lens _bCreateTime (\ s a -> s{_bCreateTime = a}) .
912+ mapping _DateTime
913+
914+instance FromJSON Build where
915+ parseJSON
916+ = withObject "Build"
917+ (\ o ->
918+ Build' <$>
919+ (o .:? "images" .!= mempty) <*> (o .:? "status") <*>
920+ (o .:? "sourceProvenance")
921+ <*> (o .:? "logUrl")
922+ <*> (o .:? "results")
923+ <*> (o .:? "startTime")
924+ <*> (o .:? "logsBucket")
925+ <*> (o .:? "steps" .!= mempty)
926+ <*> (o .:? "statusDetail")
927+ <*> (o .:? "source")
928+ <*> (o .:? "id")
929+ <*> (o .:? "options")
930+ <*> (o .:? "projectId")
931+ <*> (o .:? "timeout")
932+ <*> (o .:? "finishTime")
933+ <*> (o .:? "createTime"))
934+
935+instance ToJSON Build where
936+ toJSON Build'{..}
937+ = object
938+ (catMaybes
939+ [("images" .=) <$> _bImages,
940+ ("status" .=) <$> _bStatus,
941+ ("sourceProvenance" .=) <$> _bSourceProvenance,
942+ ("logUrl" .=) <$> _bLogURL,
943+ ("results" .=) <$> _bResults,
944+ ("startTime" .=) <$> _bStartTime,
945+ ("logsBucket" .=) <$> _bLogsBucket,
946+ ("steps" .=) <$> _bSteps,
947+ ("statusDetail" .=) <$> _bStatusDetail,
948+ ("source" .=) <$> _bSource, ("id" .=) <$> _bId,
949+ ("options" .=) <$> _bOptions,
950+ ("projectId" .=) <$> _bProjectId,
951+ ("timeout" .=) <$> _bTimeout,
952+ ("finishTime" .=) <$> _bFinishTime,
953+ ("createTime" .=) <$> _bCreateTime])
954+
955+-- | Hash(es) of the build source, which can be used to verify that the
956+-- original source integrity was maintained in the build. Note that
957+-- FileHashes will only be populated if BuildOptions has requested a
958+-- SourceProvenanceHash. The keys to this map are file paths used as build
959+-- source and the values contain the hash values for those files. If the
960+-- build source came in a single package such as a gzipped tarfile
961+-- (.tar.gz), the FileHash will be for the single path to that file.
962+-- \'OutputOnly
963+--
964+-- /See:/ 'sourceProvenanceFileHashes' smart constructor.
965+newtype SourceProvenanceFileHashes = SourceProvenanceFileHashes'
966+ { _spfhAddtional :: HashMap Text FileHashes
967+ } deriving (Eq,Show,Data,Typeable,Generic)
968+
969+-- | Creates a value of 'SourceProvenanceFileHashes' with the minimum fields required to make a request.
970+--
971+-- Use one of the following lenses to modify other fields as desired:
972+--
973+-- * 'spfhAddtional'
974+sourceProvenanceFileHashes
975+ :: HashMap Text FileHashes -- ^ 'spfhAddtional'
976+ -> SourceProvenanceFileHashes
977+sourceProvenanceFileHashes pSpfhAddtional_ =
978+ SourceProvenanceFileHashes'
979+ { _spfhAddtional = _Coerce # pSpfhAddtional_
980+ }
981+
982+spfhAddtional :: Lens' SourceProvenanceFileHashes (HashMap Text FileHashes)
983+spfhAddtional
984+ = lens _spfhAddtional
985+ (\ s a -> s{_spfhAddtional = a})
986+ . _Coerce
987+
988+instance FromJSON SourceProvenanceFileHashes where
989+ parseJSON
990+ = withObject "SourceProvenanceFileHashes"
991+ (\ o ->
992+ SourceProvenanceFileHashes' <$> (parseJSONObject o))
993+
994+instance ToJSON SourceProvenanceFileHashes where
995+ toJSON = toJSON . _spfhAddtional
996+
997+-- | Request to cancel an ongoing build.
998+--
999+-- /See:/ 'cancelBuildRequest' smart constructor.
1000+data CancelBuildRequest =
1001+ CancelBuildRequest'
1002+ deriving (Eq,Show,Data,Typeable,Generic)
1003+
1004+-- | Creates a value of 'CancelBuildRequest' with the minimum fields required to make a request.
1005+--
1006+cancelBuildRequest
1007+ :: CancelBuildRequest
1008+cancelBuildRequest = CancelBuildRequest'
1009+
1010+instance FromJSON CancelBuildRequest where
1011+ parseJSON
1012+ = withObject "CancelBuildRequest"
1013+ (\ o -> pure CancelBuildRequest')
1014+
1015+instance ToJSON CancelBuildRequest where
1016+ toJSON = const emptyObject
1017+
1018+-- | StorageSource describes the location of the source in an archive file in
1019+-- Google Cloud Storage.
1020+--
1021+-- /See:/ 'storageSource' smart constructor.
1022+data StorageSource = StorageSource'
1023+ { _ssBucket :: !(Maybe Text)
1024+ , _ssObject :: !(Maybe Text)
1025+ , _ssGeneration :: !(Maybe (Textual Int64))
1026+ } deriving (Eq,Show,Data,Typeable,Generic)
1027+
1028+-- | Creates a value of 'StorageSource' with the minimum fields required to make a request.
1029+--
1030+-- Use one of the following lenses to modify other fields as desired:
1031+--
1032+-- * 'ssBucket'
1033+--
1034+-- * 'ssObject'
1035+--
1036+-- * 'ssGeneration'
1037+storageSource
1038+ :: StorageSource
1039+storageSource =
1040+ StorageSource'
1041+ { _ssBucket = Nothing
1042+ , _ssObject = Nothing
1043+ , _ssGeneration = Nothing
1044+ }
1045+
1046+-- | Google Cloud Storage bucket containing source (see [Bucket Name
1047+-- Requirements](https:\/\/cloud.google.com\/storage\/docs\/bucket-naming#requirements)).
1048+ssBucket :: Lens' StorageSource (Maybe Text)
1049+ssBucket = lens _ssBucket (\ s a -> s{_ssBucket = a})
1050+
1051+-- | Google Cloud Storage object containing source. This object must be a
1052+-- gzipped archive file (.tar.gz) containing source to build.
1053+ssObject :: Lens' StorageSource (Maybe Text)
1054+ssObject = lens _ssObject (\ s a -> s{_ssObject = a})
1055+
1056+-- | Google Cloud Storage generation for the object. If the generation is
1057+-- omitted, the latest generation will be used.
1058+ssGeneration :: Lens' StorageSource (Maybe Int64)
1059+ssGeneration
1060+ = lens _ssGeneration (\ s a -> s{_ssGeneration = a})
1061+ . mapping _Coerce
1062+
1063+instance FromJSON StorageSource where
1064+ parseJSON
1065+ = withObject "StorageSource"
1066+ (\ o ->
1067+ StorageSource' <$>
1068+ (o .:? "bucket") <*> (o .:? "object") <*>
1069+ (o .:? "generation"))
1070+
1071+instance ToJSON StorageSource where
1072+ toJSON StorageSource'{..}
1073+ = object
1074+ (catMaybes
1075+ [("bucket" .=) <$> _ssBucket,
1076+ ("object" .=) <$> _ssObject,
1077+ ("generation" .=) <$> _ssGeneration])
1078+
1079+-- | Response containing existing BuildTriggers.
1080+--
1081+-- /See:/ 'listBuildTriggersResponse' smart constructor.
1082+newtype ListBuildTriggersResponse = ListBuildTriggersResponse'
1083+ { _lbtrTriggers :: Maybe [BuildTrigger]
1084+ } deriving (Eq,Show,Data,Typeable,Generic)
1085+
1086+-- | Creates a value of 'ListBuildTriggersResponse' with the minimum fields required to make a request.
1087+--
1088+-- Use one of the following lenses to modify other fields as desired:
1089+--
1090+-- * 'lbtrTriggers'
1091+listBuildTriggersResponse
1092+ :: ListBuildTriggersResponse
1093+listBuildTriggersResponse =
1094+ ListBuildTriggersResponse'
1095+ { _lbtrTriggers = Nothing
1096+ }
1097+
1098+-- | BuildTriggers for the project, sorted by create_time descending.
1099+lbtrTriggers :: Lens' ListBuildTriggersResponse [BuildTrigger]
1100+lbtrTriggers
1101+ = lens _lbtrTriggers (\ s a -> s{_lbtrTriggers = a})
1102+ . _Default
1103+ . _Coerce
1104+
1105+instance FromJSON ListBuildTriggersResponse where
1106+ parseJSON
1107+ = withObject "ListBuildTriggersResponse"
1108+ (\ o ->
1109+ ListBuildTriggersResponse' <$>
1110+ (o .:? "triggers" .!= mempty))
1111+
1112+instance ToJSON ListBuildTriggersResponse where
1113+ toJSON ListBuildTriggersResponse'{..}
1114+ = object
1115+ (catMaybes [("triggers" .=) <$> _lbtrTriggers])
1116+
1117+-- | Container message for hashes of byte content of files, used in
1118+-- SourceProvenance messages to verify integrity of source input to the
1119+-- build.
1120+--
1121+-- /See:/ 'fileHashes' smart constructor.
1122+newtype FileHashes = FileHashes'
1123+ { _fhFileHash :: Maybe [Hash]
1124+ } deriving (Eq,Show,Data,Typeable,Generic)
1125+
1126+-- | Creates a value of 'FileHashes' with the minimum fields required to make a request.
1127+--
1128+-- Use one of the following lenses to modify other fields as desired:
1129+--
1130+-- * 'fhFileHash'
1131+fileHashes
1132+ :: FileHashes
1133+fileHashes =
1134+ FileHashes'
1135+ { _fhFileHash = Nothing
1136+ }
1137+
1138+-- | Collection of file hashes.
1139+fhFileHash :: Lens' FileHashes [Hash]
1140+fhFileHash
1141+ = lens _fhFileHash (\ s a -> s{_fhFileHash = a}) .
1142+ _Default
1143+ . _Coerce
1144+
1145+instance FromJSON FileHashes where
1146+ parseJSON
1147+ = withObject "FileHashes"
1148+ (\ o ->
1149+ FileHashes' <$> (o .:? "fileHash" .!= mempty))
1150+
1151+instance ToJSON FileHashes where
1152+ toJSON FileHashes'{..}
1153+ = object
1154+ (catMaybes [("fileHash" .=) <$> _fhFileHash])
1155+
1156+-- | Source describes the location of the source in a supported storage
1157+-- service.
1158+--
1159+-- /See:/ 'source' smart constructor.
1160+data Source = Source'
1161+ { _sRepoSource :: !(Maybe RepoSource)
1162+ , _sStorageSource :: !(Maybe StorageSource)
1163+ } deriving (Eq,Show,Data,Typeable,Generic)
1164+
1165+-- | Creates a value of 'Source' with the minimum fields required to make a request.
1166+--
1167+-- Use one of the following lenses to modify other fields as desired:
1168+--
1169+-- * 'sRepoSource'
1170+--
1171+-- * 'sStorageSource'
1172+source
1173+ :: Source
1174+source =
1175+ Source'
1176+ { _sRepoSource = Nothing
1177+ , _sStorageSource = Nothing
1178+ }
1179+
1180+-- | If provided, get source from this location in a Cloud Repo.
1181+sRepoSource :: Lens' Source (Maybe RepoSource)
1182+sRepoSource
1183+ = lens _sRepoSource (\ s a -> s{_sRepoSource = a})
1184+
1185+-- | If provided, get the source from this location in in Google Cloud
1186+-- Storage.
1187+sStorageSource :: Lens' Source (Maybe StorageSource)
1188+sStorageSource
1189+ = lens _sStorageSource
1190+ (\ s a -> s{_sStorageSource = a})
1191+
1192+instance FromJSON Source where
1193+ parseJSON
1194+ = withObject "Source"
1195+ (\ o ->
1196+ Source' <$>
1197+ (o .:? "repoSource") <*> (o .:? "storageSource"))
1198+
1199+instance ToJSON Source where
1200+ toJSON Source'{..}
1201+ = object
1202+ (catMaybes
1203+ [("repoSource" .=) <$> _sRepoSource,
1204+ ("storageSource" .=) <$> _sStorageSource])
1205+
1206+-- | Service-specific metadata associated with the operation. It typically
1207+-- contains progress information and common metadata such as create time.
1208+-- Some services might not provide such metadata. Any method that returns a
1209+-- long-running operation should document the metadata type, if any.
1210+--
1211+-- /See:/ 'operationMetadata' smart constructor.
1212+newtype OperationMetadata = OperationMetadata'
1213+ { _omAddtional :: HashMap Text JSONValue
1214+ } deriving (Eq,Show,Data,Typeable,Generic)
1215+
1216+-- | Creates a value of 'OperationMetadata' with the minimum fields required to make a request.
1217+--
1218+-- Use one of the following lenses to modify other fields as desired:
1219+--
1220+-- * 'omAddtional'
1221+operationMetadata
1222+ :: HashMap Text JSONValue -- ^ 'omAddtional'
1223+ -> OperationMetadata
1224+operationMetadata pOmAddtional_ =
1225+ OperationMetadata'
1226+ { _omAddtional = _Coerce # pOmAddtional_
1227+ }
1228+
1229+-- | Properties of the object. Contains field \'type with type URL.
1230+omAddtional :: Lens' OperationMetadata (HashMap Text JSONValue)
1231+omAddtional
1232+ = lens _omAddtional (\ s a -> s{_omAddtional = a}) .
1233+ _Coerce
1234+
1235+instance FromJSON OperationMetadata where
1236+ parseJSON
1237+ = withObject "OperationMetadata"
1238+ (\ o -> OperationMetadata' <$> (parseJSONObject o))
1239+
1240+instance ToJSON OperationMetadata where
1241+ toJSON = toJSON . _omAddtional
1242+
1243+-- | Metadata for build operations.
1244+--
1245+-- /See:/ 'buildOperationMetadata' smart constructor.
1246+newtype BuildOperationMetadata = BuildOperationMetadata'
1247+ { _bomBuild :: Maybe Build
1248+ } deriving (Eq,Show,Data,Typeable,Generic)
1249+
1250+-- | Creates a value of 'BuildOperationMetadata' with the minimum fields required to make a request.
1251+--
1252+-- Use one of the following lenses to modify other fields as desired:
1253+--
1254+-- * 'bomBuild'
1255+buildOperationMetadata
1256+ :: BuildOperationMetadata
1257+buildOperationMetadata =
1258+ BuildOperationMetadata'
1259+ { _bomBuild = Nothing
1260+ }
1261+
1262+-- | The build that the operation is tracking.
1263+bomBuild :: Lens' BuildOperationMetadata (Maybe Build)
1264+bomBuild = lens _bomBuild (\ s a -> s{_bomBuild = a})
1265+
1266+instance FromJSON BuildOperationMetadata where
1267+ parseJSON
1268+ = withObject "BuildOperationMetadata"
1269+ (\ o -> BuildOperationMetadata' <$> (o .:? "build"))
1270+
1271+instance ToJSON BuildOperationMetadata where
1272+ toJSON BuildOperationMetadata'{..}
1273+ = object (catMaybes [("build" .=) <$> _bomBuild])
1274+
1275+-- | Optional arguments to enable specific features of builds.
1276+--
1277+-- /See:/ 'buildOptions' smart constructor.
1278+data BuildOptions = BuildOptions'
1279+ { _boRequestedVerifyOption :: !(Maybe BuildOptionsRequestedVerifyOption)
1280+ , _boSourceProvenanceHash :: !(Maybe [Text])
1281+ } deriving (Eq,Show,Data,Typeable,Generic)
1282+
1283+-- | Creates a value of 'BuildOptions' with the minimum fields required to make a request.
1284+--
1285+-- Use one of the following lenses to modify other fields as desired:
1286+--
1287+-- * 'boRequestedVerifyOption'
1288+--
1289+-- * 'boSourceProvenanceHash'
1290+buildOptions
1291+ :: BuildOptions
1292+buildOptions =
1293+ BuildOptions'
1294+ { _boRequestedVerifyOption = Nothing
1295+ , _boSourceProvenanceHash = Nothing
1296+ }
1297+
1298+-- | Requested verifiability options.
1299+boRequestedVerifyOption :: Lens' BuildOptions (Maybe BuildOptionsRequestedVerifyOption)
1300+boRequestedVerifyOption
1301+ = lens _boRequestedVerifyOption
1302+ (\ s a -> s{_boRequestedVerifyOption = a})
1303+
1304+-- | Requested hash for SourceProvenance.
1305+boSourceProvenanceHash :: Lens' BuildOptions [Text]
1306+boSourceProvenanceHash
1307+ = lens _boSourceProvenanceHash
1308+ (\ s a -> s{_boSourceProvenanceHash = a})
1309+ . _Default
1310+ . _Coerce
1311+
1312+instance FromJSON BuildOptions where
1313+ parseJSON
1314+ = withObject "BuildOptions"
1315+ (\ o ->
1316+ BuildOptions' <$>
1317+ (o .:? "requestedVerifyOption") <*>
1318+ (o .:? "sourceProvenanceHash" .!= mempty))
1319+
1320+instance ToJSON BuildOptions where
1321+ toJSON BuildOptions'{..}
1322+ = object
1323+ (catMaybes
1324+ [("requestedVerifyOption" .=) <$>
1325+ _boRequestedVerifyOption,
1326+ ("sourceProvenanceHash" .=) <$>
1327+ _boSourceProvenanceHash])
1328+
1329+-- | The normal response of the operation in case of success. If the original
1330+-- method returns no data on success, such as \`Delete\`, the response is
1331+-- \`google.protobuf.Empty\`. If the original method is standard
1332+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
1333+-- For other methods, the response should have the type \`XxxResponse\`,
1334+-- where \`Xxx\` is the original method name. For example, if the original
1335+-- method name is \`TakeSnapshot()\`, the inferred response type is
1336+-- \`TakeSnapshotResponse\`.
1337+--
1338+-- /See:/ 'operationResponse' smart constructor.
1339+newtype OperationResponse = OperationResponse'
1340+ { _orAddtional :: HashMap Text JSONValue
1341+ } deriving (Eq,Show,Data,Typeable,Generic)
1342+
1343+-- | Creates a value of 'OperationResponse' with the minimum fields required to make a request.
1344+--
1345+-- Use one of the following lenses to modify other fields as desired:
1346+--
1347+-- * 'orAddtional'
1348+operationResponse
1349+ :: HashMap Text JSONValue -- ^ 'orAddtional'
1350+ -> OperationResponse
1351+operationResponse pOrAddtional_ =
1352+ OperationResponse'
1353+ { _orAddtional = _Coerce # pOrAddtional_
1354+ }
1355+
1356+-- | Properties of the object. Contains field \'type with type URL.
1357+orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
1358+orAddtional
1359+ = lens _orAddtional (\ s a -> s{_orAddtional = a}) .
1360+ _Coerce
1361+
1362+instance FromJSON OperationResponse where
1363+ parseJSON
1364+ = withObject "OperationResponse"
1365+ (\ o -> OperationResponse' <$> (parseJSONObject o))
1366+
1367+instance ToJSON OperationResponse where
1368+ toJSON = toJSON . _orAddtional
1369+
1370+-- | Configuration for an automated build in response to source repository
1371+-- changes.
1372+--
1373+-- /See:/ 'buildTrigger' smart constructor.
1374+data BuildTrigger = BuildTrigger'
1375+ { _btDisabled :: !(Maybe Bool)
1376+ , _btTriggerTemplate :: !(Maybe RepoSource)
1377+ , _btBuild :: !(Maybe Build)
1378+ , _btId :: !(Maybe Text)
1379+ , _btDescription :: !(Maybe Text)
1380+ , _btFilename :: !(Maybe Text)
1381+ , _btCreateTime :: !(Maybe DateTime')
1382+ } deriving (Eq,Show,Data,Typeable,Generic)
1383+
1384+-- | Creates a value of 'BuildTrigger' with the minimum fields required to make a request.
1385+--
1386+-- Use one of the following lenses to modify other fields as desired:
1387+--
1388+-- * 'btDisabled'
1389+--
1390+-- * 'btTriggerTemplate'
1391+--
1392+-- * 'btBuild'
1393+--
1394+-- * 'btId'
1395+--
1396+-- * 'btDescription'
1397+--
1398+-- * 'btFilename'
1399+--
1400+-- * 'btCreateTime'
1401+buildTrigger
1402+ :: BuildTrigger
1403+buildTrigger =
1404+ BuildTrigger'
1405+ { _btDisabled = Nothing
1406+ , _btTriggerTemplate = Nothing
1407+ , _btBuild = Nothing
1408+ , _btId = Nothing
1409+ , _btDescription = Nothing
1410+ , _btFilename = Nothing
1411+ , _btCreateTime = Nothing
1412+ }
1413+
1414+-- | If true, the trigger will never result in a build.
1415+btDisabled :: Lens' BuildTrigger (Maybe Bool)
1416+btDisabled
1417+ = lens _btDisabled (\ s a -> s{_btDisabled = a})
1418+
1419+-- | Template describing the types of source changes to trigger a build.
1420+-- Branch and tag names in trigger templates are interpreted as regular
1421+-- expressions. Any branch or tag change that matches that regular
1422+-- expression will trigger a build.
1423+btTriggerTemplate :: Lens' BuildTrigger (Maybe RepoSource)
1424+btTriggerTemplate
1425+ = lens _btTriggerTemplate
1426+ (\ s a -> s{_btTriggerTemplate = a})
1427+
1428+-- | Contents of the build template.
1429+btBuild :: Lens' BuildTrigger (Maybe Build)
1430+btBuild = lens _btBuild (\ s a -> s{_btBuild = a})
1431+
1432+-- | Unique identifier of the trigger. \'OutputOnly
1433+btId :: Lens' BuildTrigger (Maybe Text)
1434+btId = lens _btId (\ s a -> s{_btId = a})
1435+
1436+-- | Human-readable description of this trigger.
1437+btDescription :: Lens' BuildTrigger (Maybe Text)
1438+btDescription
1439+ = lens _btDescription
1440+ (\ s a -> s{_btDescription = a})
1441+
1442+-- | Path, from the source root, to a file whose contents is used for the
1443+-- template.
1444+btFilename :: Lens' BuildTrigger (Maybe Text)
1445+btFilename
1446+ = lens _btFilename (\ s a -> s{_btFilename = a})
1447+
1448+-- | Time when the trigger was created. \'OutputOnly
1449+btCreateTime :: Lens' BuildTrigger (Maybe UTCTime)
1450+btCreateTime
1451+ = lens _btCreateTime (\ s a -> s{_btCreateTime = a})
1452+ . mapping _DateTime
1453+
1454+instance FromJSON BuildTrigger where
1455+ parseJSON
1456+ = withObject "BuildTrigger"
1457+ (\ o ->
1458+ BuildTrigger' <$>
1459+ (o .:? "disabled") <*> (o .:? "triggerTemplate") <*>
1460+ (o .:? "build")
1461+ <*> (o .:? "id")
1462+ <*> (o .:? "description")
1463+ <*> (o .:? "filename")
1464+ <*> (o .:? "createTime"))
1465+
1466+instance ToJSON BuildTrigger where
1467+ toJSON BuildTrigger'{..}
1468+ = object
1469+ (catMaybes
1470+ [("disabled" .=) <$> _btDisabled,
1471+ ("triggerTemplate" .=) <$> _btTriggerTemplate,
1472+ ("build" .=) <$> _btBuild, ("id" .=) <$> _btId,
1473+ ("description" .=) <$> _btDescription,
1474+ ("filename" .=) <$> _btFilename,
1475+ ("createTime" .=) <$> _btCreateTime])
1476+
1477+-- | BuiltImage describes an image built by the pipeline.
1478+--
1479+-- /See:/ 'builtImage' smart constructor.
1480+data BuiltImage = BuiltImage'
1481+ { _biName :: !(Maybe Text)
1482+ , _biDigest :: !(Maybe Text)
1483+ } deriving (Eq,Show,Data,Typeable,Generic)
1484+
1485+-- | Creates a value of 'BuiltImage' with the minimum fields required to make a request.
1486+--
1487+-- Use one of the following lenses to modify other fields as desired:
1488+--
1489+-- * 'biName'
1490+--
1491+-- * 'biDigest'
1492+builtImage
1493+ :: BuiltImage
1494+builtImage =
1495+ BuiltImage'
1496+ { _biName = Nothing
1497+ , _biDigest = Nothing
1498+ }
1499+
1500+-- | Name used to push the container image to Google Container Registry, as
1501+-- presented to \`docker push\`.
1502+biName :: Lens' BuiltImage (Maybe Text)
1503+biName = lens _biName (\ s a -> s{_biName = a})
1504+
1505+-- | Docker Registry 2.0 digest.
1506+biDigest :: Lens' BuiltImage (Maybe Text)
1507+biDigest = lens _biDigest (\ s a -> s{_biDigest = a})
1508+
1509+instance FromJSON BuiltImage where
1510+ parseJSON
1511+ = withObject "BuiltImage"
1512+ (\ o ->
1513+ BuiltImage' <$> (o .:? "name") <*> (o .:? "digest"))
1514+
1515+instance ToJSON BuiltImage where
1516+ toJSON BuiltImage'{..}
1517+ = object
1518+ (catMaybes
1519+ [("name" .=) <$> _biName,
1520+ ("digest" .=) <$> _biDigest])
gogol-containerbuilder/gen/Network/Google/ContainerBuilder/Types/Sum.hsnew file+170
@@ -0,0 +1,170 @@
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.ContainerBuilder.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.ContainerBuilder.Types.Sum where
18+
19+import Network.Google.Prelude
20+
21+-- | Requested verifiability options.
22+data BuildOptionsRequestedVerifyOption
23+ = NotVerified
24+ -- ^ @NOT_VERIFIED@
25+ -- Not a verifiable build. (default)
26+ | Verified
27+ -- ^ @VERIFIED@
28+ -- Verified build.
29+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
30+
31+instance Hashable BuildOptionsRequestedVerifyOption
32+
33+instance FromHttpApiData BuildOptionsRequestedVerifyOption where
34+ parseQueryParam = \case
35+ "NOT_VERIFIED" -> Right NotVerified
36+ "VERIFIED" -> Right Verified
37+ x -> Left ("Unable to parse BuildOptionsRequestedVerifyOption from: " <> x)
38+
39+instance ToHttpApiData BuildOptionsRequestedVerifyOption where
40+ toQueryParam = \case
41+ NotVerified -> "NOT_VERIFIED"
42+ Verified -> "VERIFIED"
43+
44+instance FromJSON BuildOptionsRequestedVerifyOption where
45+ parseJSON = parseJSONText "BuildOptionsRequestedVerifyOption"
46+
47+instance ToJSON BuildOptionsRequestedVerifyOption where
48+ toJSON = toJSONText
49+
50+-- | V1 error format.
51+data Xgafv
52+ = X1
53+ -- ^ @1@
54+ -- v1 error format
55+ | X2
56+ -- ^ @2@
57+ -- v2 error format
58+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
59+
60+instance Hashable Xgafv
61+
62+instance FromHttpApiData Xgafv where
63+ parseQueryParam = \case
64+ "1" -> Right X1
65+ "2" -> Right X2
66+ x -> Left ("Unable to parse Xgafv from: " <> x)
67+
68+instance ToHttpApiData Xgafv where
69+ toQueryParam = \case
70+ X1 -> "1"
71+ X2 -> "2"
72+
73+instance FromJSON Xgafv where
74+ parseJSON = parseJSONText "Xgafv"
75+
76+instance ToJSON Xgafv where
77+ toJSON = toJSONText
78+
79+-- | Status of the build. \'OutputOnly
80+data BuildStatus
81+ = StatusUnknown
82+ -- ^ @STATUS_UNKNOWN@
83+ -- Status of the build is unknown.
84+ | Queuing
85+ -- ^ @QUEUING@
86+ -- Build has been received and is being queued.
87+ | Queued
88+ -- ^ @QUEUED@
89+ -- Build is queued; work has not yet begun.
90+ | Working
91+ -- ^ @WORKING@
92+ -- Build is being executed.
93+ | Success
94+ -- ^ @SUCCESS@
95+ -- Build finished successfully.
96+ | Failure
97+ -- ^ @FAILURE@
98+ -- Build failed to complete successfully.
99+ | InternalError
100+ -- ^ @INTERNAL_ERROR@
101+ -- Build failed due to an internal cause.
102+ | Timeout
103+ -- ^ @TIMEOUT@
104+ -- Build took longer than was allowed.
105+ | Cancelled
106+ -- ^ @CANCELLED@
107+ -- Build was canceled by a user.
108+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
109+
110+instance Hashable BuildStatus
111+
112+instance FromHttpApiData BuildStatus where
113+ parseQueryParam = \case
114+ "STATUS_UNKNOWN" -> Right StatusUnknown
115+ "QUEUING" -> Right Queuing
116+ "QUEUED" -> Right Queued
117+ "WORKING" -> Right Working
118+ "SUCCESS" -> Right Success
119+ "FAILURE" -> Right Failure
120+ "INTERNAL_ERROR" -> Right InternalError
121+ "TIMEOUT" -> Right Timeout
122+ "CANCELLED" -> Right Cancelled
123+ x -> Left ("Unable to parse BuildStatus from: " <> x)
124+
125+instance ToHttpApiData BuildStatus where
126+ toQueryParam = \case
127+ StatusUnknown -> "STATUS_UNKNOWN"
128+ Queuing -> "QUEUING"
129+ Queued -> "QUEUED"
130+ Working -> "WORKING"
131+ Success -> "SUCCESS"
132+ Failure -> "FAILURE"
133+ InternalError -> "INTERNAL_ERROR"
134+ Timeout -> "TIMEOUT"
135+ Cancelled -> "CANCELLED"
136+
137+instance FromJSON BuildStatus where
138+ parseJSON = parseJSONText "BuildStatus"
139+
140+instance ToJSON BuildStatus where
141+ toJSON = toJSONText
142+
143+-- | The type of hash that was performed.
144+data HashType
145+ = None
146+ -- ^ @NONE@
147+ -- No hash requested.
148+ | SHA256
149+ -- ^ @SHA256@
150+ -- Use a sha256 hash.
151+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
152+
153+instance Hashable HashType
154+
155+instance FromHttpApiData HashType where
156+ parseQueryParam = \case
157+ "NONE" -> Right None
158+ "SHA256" -> Right SHA256
159+ x -> Left ("Unable to parse HashType from: " <> x)
160+
161+instance ToHttpApiData HashType where
162+ toQueryParam = \case
163+ None -> "NONE"
164+ SHA256 -> "SHA256"
165+
166+instance FromJSON HashType where
167+ parseJSON = parseJSONText "HashType"
168+
169+instance ToJSON HashType where
170+ toJSON = toJSONText
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Operations/Get.hsnew file+169
@@ -0,0 +1,169 @@
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.Cloudbuild.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/container-builder/docs/ Google Cloud Container Builder API Reference> for @cloudbuild.operations.get@.
28+module Network.Google.Resource.Cloudbuild.Operations.Get
29+ (
30+ -- * REST Resource
31+ OperationsGetResource
32+
33+ -- * Creating a Request
34+ , operationsGet
35+ , OperationsGet
36+
37+ -- * Request Lenses
38+ , ogXgafv
39+ , ogUploadProtocol
40+ , ogPp
41+ , ogAccessToken
42+ , ogUploadType
43+ , ogBearerToken
44+ , ogName
45+ , ogCallback
46+ ) where
47+
48+import Network.Google.ContainerBuilder.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @cloudbuild.operations.get@ method which the
52+-- 'OperationsGet' request conforms to.
53+type OperationsGetResource =
54+ "v1" :>
55+ Capture "name" Text :>
56+ QueryParam "$.xgafv" Xgafv :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :> Get '[JSON] Operation
64+
65+-- | Gets the latest state of a long-running operation. Clients can use this
66+-- method to poll the operation result at intervals as recommended by the
67+-- API service.
68+--
69+-- /See:/ 'operationsGet' smart constructor.
70+data OperationsGet = OperationsGet'
71+ { _ogXgafv :: !(Maybe Xgafv)
72+ , _ogUploadProtocol :: !(Maybe Text)
73+ , _ogPp :: !Bool
74+ , _ogAccessToken :: !(Maybe Text)
75+ , _ogUploadType :: !(Maybe Text)
76+ , _ogBearerToken :: !(Maybe Text)
77+ , _ogName :: !Text
78+ , _ogCallback :: !(Maybe Text)
79+ } deriving (Eq,Show,Data,Typeable,Generic)
80+
81+-- | Creates a value of 'OperationsGet' with the minimum fields required to make a request.
82+--
83+-- Use one of the following lenses to modify other fields as desired:
84+--
85+-- * 'ogXgafv'
86+--
87+-- * 'ogUploadProtocol'
88+--
89+-- * 'ogPp'
90+--
91+-- * 'ogAccessToken'
92+--
93+-- * 'ogUploadType'
94+--
95+-- * 'ogBearerToken'
96+--
97+-- * 'ogName'
98+--
99+-- * 'ogCallback'
100+operationsGet
101+ :: Text -- ^ 'ogName'
102+ -> OperationsGet
103+operationsGet pOgName_ =
104+ OperationsGet'
105+ { _ogXgafv = Nothing
106+ , _ogUploadProtocol = Nothing
107+ , _ogPp = True
108+ , _ogAccessToken = Nothing
109+ , _ogUploadType = Nothing
110+ , _ogBearerToken = Nothing
111+ , _ogName = pOgName_
112+ , _ogCallback = Nothing
113+ }
114+
115+-- | V1 error format.
116+ogXgafv :: Lens' OperationsGet (Maybe Xgafv)
117+ogXgafv = lens _ogXgafv (\ s a -> s{_ogXgafv = a})
118+
119+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
120+ogUploadProtocol :: Lens' OperationsGet (Maybe Text)
121+ogUploadProtocol
122+ = lens _ogUploadProtocol
123+ (\ s a -> s{_ogUploadProtocol = a})
124+
125+-- | Pretty-print response.
126+ogPp :: Lens' OperationsGet Bool
127+ogPp = lens _ogPp (\ s a -> s{_ogPp = a})
128+
129+-- | OAuth access token.
130+ogAccessToken :: Lens' OperationsGet (Maybe Text)
131+ogAccessToken
132+ = lens _ogAccessToken
133+ (\ s a -> s{_ogAccessToken = a})
134+
135+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
136+ogUploadType :: Lens' OperationsGet (Maybe Text)
137+ogUploadType
138+ = lens _ogUploadType (\ s a -> s{_ogUploadType = a})
139+
140+-- | OAuth bearer token.
141+ogBearerToken :: Lens' OperationsGet (Maybe Text)
142+ogBearerToken
143+ = lens _ogBearerToken
144+ (\ s a -> s{_ogBearerToken = a})
145+
146+-- | The name of the operation resource.
147+ogName :: Lens' OperationsGet Text
148+ogName = lens _ogName (\ s a -> s{_ogName = a})
149+
150+-- | JSONP
151+ogCallback :: Lens' OperationsGet (Maybe Text)
152+ogCallback
153+ = lens _ogCallback (\ s a -> s{_ogCallback = a})
154+
155+instance GoogleRequest OperationsGet where
156+ type Rs OperationsGet = Operation
157+ type Scopes OperationsGet =
158+ '["https://www.googleapis.com/auth/cloud-platform"]
159+ requestClient OperationsGet'{..}
160+ = go _ogName _ogXgafv _ogUploadProtocol (Just _ogPp)
161+ _ogAccessToken
162+ _ogUploadType
163+ _ogBearerToken
164+ _ogCallback
165+ (Just AltJSON)
166+ containerBuilderService
167+ where go
168+ = buildClient (Proxy :: Proxy OperationsGetResource)
169+ mempty
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Operations/List.hsnew file+210
@@ -0,0 +1,210 @@
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.Cloudbuild.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/container-builder/docs/ Google Cloud Container Builder API Reference> for @cloudbuild.operations.list@.
30+module Network.Google.Resource.Cloudbuild.Operations.List
31+ (
32+ -- * REST Resource
33+ OperationsListResource
34+
35+ -- * Creating a Request
36+ , operationsList
37+ , OperationsList
38+
39+ -- * Request Lenses
40+ , olXgafv
41+ , olUploadProtocol
42+ , olPp
43+ , olAccessToken
44+ , olUploadType
45+ , olBearerToken
46+ , olName
47+ , olFilter
48+ , olPageToken
49+ , olPageSize
50+ , olCallback
51+ ) where
52+
53+import Network.Google.ContainerBuilder.Types
54+import Network.Google.Prelude
55+
56+-- | A resource alias for @cloudbuild.operations.list@ method which the
57+-- 'OperationsList' request conforms to.
58+type OperationsListResource =
59+ "v1" :>
60+ Capture "name" Text :>
61+ QueryParam "$.xgafv" Xgafv :>
62+ QueryParam "upload_protocol" Text :>
63+ QueryParam "pp" Bool :>
64+ QueryParam "access_token" Text :>
65+ QueryParam "uploadType" Text :>
66+ QueryParam "bearer_token" Text :>
67+ QueryParam "filter" Text :>
68+ QueryParam "pageToken" Text :>
69+ QueryParam "pageSize" (Textual Int32) :>
70+ QueryParam "callback" Text :>
71+ QueryParam "alt" AltJSON :>
72+ Get '[JSON] ListOperationsResponse
73+
74+-- | Lists operations that match the specified filter in the request. If the
75+-- server doesn\'t support this method, it returns \`UNIMPLEMENTED\`. NOTE:
76+-- the \`name\` binding below allows API services to override the binding
77+-- to use different resource name schemes, such as
78+-- \`users\/*\/operations\`.
79+--
80+-- /See:/ 'operationsList' smart constructor.
81+data OperationsList = OperationsList'
82+ { _olXgafv :: !(Maybe Xgafv)
83+ , _olUploadProtocol :: !(Maybe Text)
84+ , _olPp :: !Bool
85+ , _olAccessToken :: !(Maybe Text)
86+ , _olUploadType :: !(Maybe Text)
87+ , _olBearerToken :: !(Maybe Text)
88+ , _olName :: !Text
89+ , _olFilter :: !(Maybe Text)
90+ , _olPageToken :: !(Maybe Text)
91+ , _olPageSize :: !(Maybe (Textual Int32))
92+ , _olCallback :: !(Maybe Text)
93+ } deriving (Eq,Show,Data,Typeable,Generic)
94+
95+-- | Creates a value of 'OperationsList' with the minimum fields required to make a request.
96+--
97+-- Use one of the following lenses to modify other fields as desired:
98+--
99+-- * 'olXgafv'
100+--
101+-- * 'olUploadProtocol'
102+--
103+-- * 'olPp'
104+--
105+-- * 'olAccessToken'
106+--
107+-- * 'olUploadType'
108+--
109+-- * 'olBearerToken'
110+--
111+-- * 'olName'
112+--
113+-- * 'olFilter'
114+--
115+-- * 'olPageToken'
116+--
117+-- * 'olPageSize'
118+--
119+-- * 'olCallback'
120+operationsList
121+ :: Text -- ^ 'olName'
122+ -> OperationsList
123+operationsList pOlName_ =
124+ OperationsList'
125+ { _olXgafv = Nothing
126+ , _olUploadProtocol = Nothing
127+ , _olPp = True
128+ , _olAccessToken = Nothing
129+ , _olUploadType = Nothing
130+ , _olBearerToken = Nothing
131+ , _olName = pOlName_
132+ , _olFilter = Nothing
133+ , _olPageToken = Nothing
134+ , _olPageSize = Nothing
135+ , _olCallback = Nothing
136+ }
137+
138+-- | V1 error format.
139+olXgafv :: Lens' OperationsList (Maybe Xgafv)
140+olXgafv = lens _olXgafv (\ s a -> s{_olXgafv = a})
141+
142+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
143+olUploadProtocol :: Lens' OperationsList (Maybe Text)
144+olUploadProtocol
145+ = lens _olUploadProtocol
146+ (\ s a -> s{_olUploadProtocol = a})
147+
148+-- | Pretty-print response.
149+olPp :: Lens' OperationsList Bool
150+olPp = lens _olPp (\ s a -> s{_olPp = a})
151+
152+-- | OAuth access token.
153+olAccessToken :: Lens' OperationsList (Maybe Text)
154+olAccessToken
155+ = lens _olAccessToken
156+ (\ s a -> s{_olAccessToken = a})
157+
158+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
159+olUploadType :: Lens' OperationsList (Maybe Text)
160+olUploadType
161+ = lens _olUploadType (\ s a -> s{_olUploadType = a})
162+
163+-- | OAuth bearer token.
164+olBearerToken :: Lens' OperationsList (Maybe Text)
165+olBearerToken
166+ = lens _olBearerToken
167+ (\ s a -> s{_olBearerToken = a})
168+
169+-- | The name of the operation collection.
170+olName :: Lens' OperationsList Text
171+olName = lens _olName (\ s a -> s{_olName = a})
172+
173+-- | The standard list filter.
174+olFilter :: Lens' OperationsList (Maybe Text)
175+olFilter = lens _olFilter (\ s a -> s{_olFilter = a})
176+
177+-- | The standard list page token.
178+olPageToken :: Lens' OperationsList (Maybe Text)
179+olPageToken
180+ = lens _olPageToken (\ s a -> s{_olPageToken = a})
181+
182+-- | The standard list page size.
183+olPageSize :: Lens' OperationsList (Maybe Int32)
184+olPageSize
185+ = lens _olPageSize (\ s a -> s{_olPageSize = a}) .
186+ mapping _Coerce
187+
188+-- | JSONP
189+olCallback :: Lens' OperationsList (Maybe Text)
190+olCallback
191+ = lens _olCallback (\ s a -> s{_olCallback = a})
192+
193+instance GoogleRequest OperationsList where
194+ type Rs OperationsList = ListOperationsResponse
195+ type Scopes OperationsList =
196+ '["https://www.googleapis.com/auth/cloud-platform"]
197+ requestClient OperationsList'{..}
198+ = go _olName _olXgafv _olUploadProtocol (Just _olPp)
199+ _olAccessToken
200+ _olUploadType
201+ _olBearerToken
202+ _olFilter
203+ _olPageToken
204+ _olPageSize
205+ _olCallback
206+ (Just AltJSON)
207+ containerBuilderService
208+ where go
209+ = buildClient (Proxy :: Proxy OperationsListResource)
210+ mempty
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/Cancel.hsnew file+197
@@ -0,0 +1,197 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Cloudbuild.Projects.Builds.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 requested build in progress.
24+--
25+-- /See:/ <https://cloud.google.com/container-builder/docs/ Google Cloud Container Builder API Reference> for @cloudbuild.projects.builds.cancel@.
26+module Network.Google.Resource.Cloudbuild.Projects.Builds.Cancel
27+ (
28+ -- * REST Resource
29+ ProjectsBuildsCancelResource
30+
31+ -- * Creating a Request
32+ , projectsBuildsCancel
33+ , ProjectsBuildsCancel
34+
35+ -- * Request Lenses
36+ , pbcXgafv
37+ , pbcUploadProtocol
38+ , pbcPp
39+ , pbcAccessToken
40+ , pbcUploadType
41+ , pbcPayload
42+ , pbcBearerToken
43+ , pbcId
44+ , pbcProjectId
45+ , pbcCallback
46+ ) where
47+
48+import Network.Google.ContainerBuilder.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @cloudbuild.projects.builds.cancel@ method which the
52+-- 'ProjectsBuildsCancel' request conforms to.
53+type ProjectsBuildsCancelResource =
54+ "v1" :>
55+ "projects" :>
56+ Capture "projectId" Text :>
57+ "builds" :>
58+ CaptureMode "id" "cancel" 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] CancelBuildRequest :>
68+ Post '[JSON] Build
69+
70+-- | Cancels a requested build in progress.
71+--
72+-- /See:/ 'projectsBuildsCancel' smart constructor.
73+data ProjectsBuildsCancel = ProjectsBuildsCancel'
74+ { _pbcXgafv :: !(Maybe Xgafv)
75+ , _pbcUploadProtocol :: !(Maybe Text)
76+ , _pbcPp :: !Bool
77+ , _pbcAccessToken :: !(Maybe Text)
78+ , _pbcUploadType :: !(Maybe Text)
79+ , _pbcPayload :: !CancelBuildRequest
80+ , _pbcBearerToken :: !(Maybe Text)
81+ , _pbcId :: !Text
82+ , _pbcProjectId :: !Text
83+ , _pbcCallback :: !(Maybe Text)
84+ } deriving (Eq,Show,Data,Typeable,Generic)
85+
86+-- | Creates a value of 'ProjectsBuildsCancel' 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+-- * 'pbcXgafv'
91+--
92+-- * 'pbcUploadProtocol'
93+--
94+-- * 'pbcPp'
95+--
96+-- * 'pbcAccessToken'
97+--
98+-- * 'pbcUploadType'
99+--
100+-- * 'pbcPayload'
101+--
102+-- * 'pbcBearerToken'
103+--
104+-- * 'pbcId'
105+--
106+-- * 'pbcProjectId'
107+--
108+-- * 'pbcCallback'
109+projectsBuildsCancel
110+ :: CancelBuildRequest -- ^ 'pbcPayload'
111+ -> Text -- ^ 'pbcId'
112+ -> Text -- ^ 'pbcProjectId'
113+ -> ProjectsBuildsCancel
114+projectsBuildsCancel pPbcPayload_ pPbcId_ pPbcProjectId_ =
115+ ProjectsBuildsCancel'
116+ { _pbcXgafv = Nothing
117+ , _pbcUploadProtocol = Nothing
118+ , _pbcPp = True
119+ , _pbcAccessToken = Nothing
120+ , _pbcUploadType = Nothing
121+ , _pbcPayload = pPbcPayload_
122+ , _pbcBearerToken = Nothing
123+ , _pbcId = pPbcId_
124+ , _pbcProjectId = pPbcProjectId_
125+ , _pbcCallback = Nothing
126+ }
127+
128+-- | V1 error format.
129+pbcXgafv :: Lens' ProjectsBuildsCancel (Maybe Xgafv)
130+pbcXgafv = lens _pbcXgafv (\ s a -> s{_pbcXgafv = a})
131+
132+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
133+pbcUploadProtocol :: Lens' ProjectsBuildsCancel (Maybe Text)
134+pbcUploadProtocol
135+ = lens _pbcUploadProtocol
136+ (\ s a -> s{_pbcUploadProtocol = a})
137+
138+-- | Pretty-print response.
139+pbcPp :: Lens' ProjectsBuildsCancel Bool
140+pbcPp = lens _pbcPp (\ s a -> s{_pbcPp = a})
141+
142+-- | OAuth access token.
143+pbcAccessToken :: Lens' ProjectsBuildsCancel (Maybe Text)
144+pbcAccessToken
145+ = lens _pbcAccessToken
146+ (\ s a -> s{_pbcAccessToken = a})
147+
148+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
149+pbcUploadType :: Lens' ProjectsBuildsCancel (Maybe Text)
150+pbcUploadType
151+ = lens _pbcUploadType
152+ (\ s a -> s{_pbcUploadType = a})
153+
154+-- | Multipart request metadata.
155+pbcPayload :: Lens' ProjectsBuildsCancel CancelBuildRequest
156+pbcPayload
157+ = lens _pbcPayload (\ s a -> s{_pbcPayload = a})
158+
159+-- | OAuth bearer token.
160+pbcBearerToken :: Lens' ProjectsBuildsCancel (Maybe Text)
161+pbcBearerToken
162+ = lens _pbcBearerToken
163+ (\ s a -> s{_pbcBearerToken = a})
164+
165+-- | ID of the build.
166+pbcId :: Lens' ProjectsBuildsCancel Text
167+pbcId = lens _pbcId (\ s a -> s{_pbcId = a})
168+
169+-- | ID of the project.
170+pbcProjectId :: Lens' ProjectsBuildsCancel Text
171+pbcProjectId
172+ = lens _pbcProjectId (\ s a -> s{_pbcProjectId = a})
173+
174+-- | JSONP
175+pbcCallback :: Lens' ProjectsBuildsCancel (Maybe Text)
176+pbcCallback
177+ = lens _pbcCallback (\ s a -> s{_pbcCallback = a})
178+
179+instance GoogleRequest ProjectsBuildsCancel where
180+ type Rs ProjectsBuildsCancel = Build
181+ type Scopes ProjectsBuildsCancel =
182+ '["https://www.googleapis.com/auth/cloud-platform"]
183+ requestClient ProjectsBuildsCancel'{..}
184+ = go _pbcProjectId _pbcId _pbcXgafv
185+ _pbcUploadProtocol
186+ (Just _pbcPp)
187+ _pbcAccessToken
188+ _pbcUploadType
189+ _pbcBearerToken
190+ _pbcCallback
191+ (Just AltJSON)
192+ _pbcPayload
193+ containerBuilderService
194+ where go
195+ = buildClient
196+ (Proxy :: Proxy ProjectsBuildsCancelResource)
197+ mempty
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/Create.hsnew file+185
@@ -0,0 +1,185 @@
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.Cloudbuild.Projects.Builds.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+-- Starts a build with the specified configuration. The long-running
24+-- Operation returned by this method will include the ID of the build,
25+-- which can be passed to GetBuild to determine its status (e.g., success
26+-- or failure).
27+--
28+-- /See:/ <https://cloud.google.com/container-builder/docs/ Google Cloud Container Builder API Reference> for @cloudbuild.projects.builds.create@.
29+module Network.Google.Resource.Cloudbuild.Projects.Builds.Create
30+ (
31+ -- * REST Resource
32+ ProjectsBuildsCreateResource
33+
34+ -- * Creating a Request
35+ , projectsBuildsCreate
36+ , ProjectsBuildsCreate
37+
38+ -- * Request Lenses
39+ , pXgafv
40+ , pUploadProtocol
41+ , pPp
42+ , pAccessToken
43+ , pUploadType
44+ , pPayload
45+ , pBearerToken
46+ , pProjectId
47+ , pCallback
48+ ) where
49+
50+import Network.Google.ContainerBuilder.Types
51+import Network.Google.Prelude
52+
53+-- | A resource alias for @cloudbuild.projects.builds.create@ method which the
54+-- 'ProjectsBuildsCreate' request conforms to.
55+type ProjectsBuildsCreateResource =
56+ "v1" :>
57+ "projects" :>
58+ Capture "projectId" Text :>
59+ "builds" :>
60+ QueryParam "$.xgafv" Xgafv :>
61+ QueryParam "upload_protocol" Text :>
62+ QueryParam "pp" Bool :>
63+ QueryParam "access_token" Text :>
64+ QueryParam "uploadType" Text :>
65+ QueryParam "bearer_token" Text :>
66+ QueryParam "callback" Text :>
67+ QueryParam "alt" AltJSON :>
68+ ReqBody '[JSON] Build :> Post '[JSON] Operation
69+
70+-- | Starts a build with the specified configuration. The long-running
71+-- Operation returned by this method will include the ID of the build,
72+-- which can be passed to GetBuild to determine its status (e.g., success
73+-- or failure).
74+--
75+-- /See:/ 'projectsBuildsCreate' smart constructor.
76+data ProjectsBuildsCreate = ProjectsBuildsCreate'
77+ { _pXgafv :: !(Maybe Xgafv)
78+ , _pUploadProtocol :: !(Maybe Text)
79+ , _pPp :: !Bool
80+ , _pAccessToken :: !(Maybe Text)
81+ , _pUploadType :: !(Maybe Text)
82+ , _pPayload :: !Build
83+ , _pBearerToken :: !(Maybe Text)
84+ , _pProjectId :: !Text
85+ , _pCallback :: !(Maybe Text)
86+ } deriving (Eq,Show,Data,Typeable,Generic)
87+
88+-- | Creates a value of 'ProjectsBuildsCreate' 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+-- * 'pXgafv'
93+--
94+-- * 'pUploadProtocol'
95+--
96+-- * 'pPp'
97+--
98+-- * 'pAccessToken'
99+--
100+-- * 'pUploadType'
101+--
102+-- * 'pPayload'
103+--
104+-- * 'pBearerToken'
105+--
106+-- * 'pProjectId'
107+--
108+-- * 'pCallback'
109+projectsBuildsCreate
110+ :: Build -- ^ 'pPayload'
111+ -> Text -- ^ 'pProjectId'
112+ -> ProjectsBuildsCreate
113+projectsBuildsCreate pPPayload_ pPProjectId_ =
114+ ProjectsBuildsCreate'
115+ { _pXgafv = Nothing
116+ , _pUploadProtocol = Nothing
117+ , _pPp = True
118+ , _pAccessToken = Nothing
119+ , _pUploadType = Nothing
120+ , _pPayload = pPPayload_
121+ , _pBearerToken = Nothing
122+ , _pProjectId = pPProjectId_
123+ , _pCallback = Nothing
124+ }
125+
126+-- | V1 error format.
127+pXgafv :: Lens' ProjectsBuildsCreate (Maybe Xgafv)
128+pXgafv = lens _pXgafv (\ s a -> s{_pXgafv = a})
129+
130+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
131+pUploadProtocol :: Lens' ProjectsBuildsCreate (Maybe Text)
132+pUploadProtocol
133+ = lens _pUploadProtocol
134+ (\ s a -> s{_pUploadProtocol = a})
135+
136+-- | Pretty-print response.
137+pPp :: Lens' ProjectsBuildsCreate Bool
138+pPp = lens _pPp (\ s a -> s{_pPp = a})
139+
140+-- | OAuth access token.
141+pAccessToken :: Lens' ProjectsBuildsCreate (Maybe Text)
142+pAccessToken
143+ = lens _pAccessToken (\ s a -> s{_pAccessToken = a})
144+
145+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
146+pUploadType :: Lens' ProjectsBuildsCreate (Maybe Text)
147+pUploadType
148+ = lens _pUploadType (\ s a -> s{_pUploadType = a})
149+
150+-- | Multipart request metadata.
151+pPayload :: Lens' ProjectsBuildsCreate Build
152+pPayload = lens _pPayload (\ s a -> s{_pPayload = a})
153+
154+-- | OAuth bearer token.
155+pBearerToken :: Lens' ProjectsBuildsCreate (Maybe Text)
156+pBearerToken
157+ = lens _pBearerToken (\ s a -> s{_pBearerToken = a})
158+
159+-- | ID of the project.
160+pProjectId :: Lens' ProjectsBuildsCreate Text
161+pProjectId
162+ = lens _pProjectId (\ s a -> s{_pProjectId = a})
163+
164+-- | JSONP
165+pCallback :: Lens' ProjectsBuildsCreate (Maybe Text)
166+pCallback
167+ = lens _pCallback (\ s a -> s{_pCallback = a})
168+
169+instance GoogleRequest ProjectsBuildsCreate where
170+ type Rs ProjectsBuildsCreate = Operation
171+ type Scopes ProjectsBuildsCreate =
172+ '["https://www.googleapis.com/auth/cloud-platform"]
173+ requestClient ProjectsBuildsCreate'{..}
174+ = go _pProjectId _pXgafv _pUploadProtocol (Just _pPp)
175+ _pAccessToken
176+ _pUploadType
177+ _pBearerToken
178+ _pCallback
179+ (Just AltJSON)
180+ _pPayload
181+ containerBuilderService
182+ where go
183+ = buildClient
184+ (Proxy :: Proxy ProjectsBuildsCreateResource)
185+ mempty
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/Get.hsnew file+187
@@ -0,0 +1,187 @@
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.Cloudbuild.Projects.Builds.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+-- Returns information about a previously requested build. The Build that
24+-- is returned includes its status (e.g., success or failure, or
25+-- in-progress), and timing information.
26+--
27+-- /See:/ <https://cloud.google.com/container-builder/docs/ Google Cloud Container Builder API Reference> for @cloudbuild.projects.builds.get@.
28+module Network.Google.Resource.Cloudbuild.Projects.Builds.Get
29+ (
30+ -- * REST Resource
31+ ProjectsBuildsGetResource
32+
33+ -- * Creating a Request
34+ , projectsBuildsGet
35+ , ProjectsBuildsGet
36+
37+ -- * Request Lenses
38+ , pbgXgafv
39+ , pbgUploadProtocol
40+ , pbgPp
41+ , pbgAccessToken
42+ , pbgUploadType
43+ , pbgBearerToken
44+ , pbgId
45+ , pbgProjectId
46+ , pbgCallback
47+ ) where
48+
49+import Network.Google.ContainerBuilder.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @cloudbuild.projects.builds.get@ method which the
53+-- 'ProjectsBuildsGet' request conforms to.
54+type ProjectsBuildsGetResource =
55+ "v1" :>
56+ "projects" :>
57+ Capture "projectId" Text :>
58+ "builds" :>
59+ Capture "id" Text :>
60+ QueryParam "$.xgafv" Xgafv :>
61+ QueryParam "upload_protocol" Text :>
62+ QueryParam "pp" Bool :>
63+ QueryParam "access_token" Text :>
64+ QueryParam "uploadType" Text :>
65+ QueryParam "bearer_token" Text :>
66+ QueryParam "callback" Text :>
67+ QueryParam "alt" AltJSON :> Get '[JSON] Build
68+
69+-- | Returns information about a previously requested build. The Build that
70+-- is returned includes its status (e.g., success or failure, or
71+-- in-progress), and timing information.
72+--
73+-- /See:/ 'projectsBuildsGet' smart constructor.
74+data ProjectsBuildsGet = ProjectsBuildsGet'
75+ { _pbgXgafv :: !(Maybe Xgafv)
76+ , _pbgUploadProtocol :: !(Maybe Text)
77+ , _pbgPp :: !Bool
78+ , _pbgAccessToken :: !(Maybe Text)
79+ , _pbgUploadType :: !(Maybe Text)
80+ , _pbgBearerToken :: !(Maybe Text)
81+ , _pbgId :: !Text
82+ , _pbgProjectId :: !Text
83+ , _pbgCallback :: !(Maybe Text)
84+ } deriving (Eq,Show,Data,Typeable,Generic)
85+
86+-- | Creates a value of 'ProjectsBuildsGet' 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+-- * 'pbgXgafv'
91+--
92+-- * 'pbgUploadProtocol'
93+--
94+-- * 'pbgPp'
95+--
96+-- * 'pbgAccessToken'
97+--
98+-- * 'pbgUploadType'
99+--
100+-- * 'pbgBearerToken'
101+--
102+-- * 'pbgId'
103+--
104+-- * 'pbgProjectId'
105+--
106+-- * 'pbgCallback'
107+projectsBuildsGet
108+ :: Text -- ^ 'pbgId'
109+ -> Text -- ^ 'pbgProjectId'
110+ -> ProjectsBuildsGet
111+projectsBuildsGet pPbgId_ pPbgProjectId_ =
112+ ProjectsBuildsGet'
113+ { _pbgXgafv = Nothing
114+ , _pbgUploadProtocol = Nothing
115+ , _pbgPp = True
116+ , _pbgAccessToken = Nothing
117+ , _pbgUploadType = Nothing
118+ , _pbgBearerToken = Nothing
119+ , _pbgId = pPbgId_
120+ , _pbgProjectId = pPbgProjectId_
121+ , _pbgCallback = Nothing
122+ }
123+
124+-- | V1 error format.
125+pbgXgafv :: Lens' ProjectsBuildsGet (Maybe Xgafv)
126+pbgXgafv = lens _pbgXgafv (\ s a -> s{_pbgXgafv = a})
127+
128+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
129+pbgUploadProtocol :: Lens' ProjectsBuildsGet (Maybe Text)
130+pbgUploadProtocol
131+ = lens _pbgUploadProtocol
132+ (\ s a -> s{_pbgUploadProtocol = a})
133+
134+-- | Pretty-print response.
135+pbgPp :: Lens' ProjectsBuildsGet Bool
136+pbgPp = lens _pbgPp (\ s a -> s{_pbgPp = a})
137+
138+-- | OAuth access token.
139+pbgAccessToken :: Lens' ProjectsBuildsGet (Maybe Text)
140+pbgAccessToken
141+ = lens _pbgAccessToken
142+ (\ s a -> s{_pbgAccessToken = a})
143+
144+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
145+pbgUploadType :: Lens' ProjectsBuildsGet (Maybe Text)
146+pbgUploadType
147+ = lens _pbgUploadType
148+ (\ s a -> s{_pbgUploadType = a})
149+
150+-- | OAuth bearer token.
151+pbgBearerToken :: Lens' ProjectsBuildsGet (Maybe Text)
152+pbgBearerToken
153+ = lens _pbgBearerToken
154+ (\ s a -> s{_pbgBearerToken = a})
155+
156+-- | ID of the build.
157+pbgId :: Lens' ProjectsBuildsGet Text
158+pbgId = lens _pbgId (\ s a -> s{_pbgId = a})
159+
160+-- | ID of the project.
161+pbgProjectId :: Lens' ProjectsBuildsGet Text
162+pbgProjectId
163+ = lens _pbgProjectId (\ s a -> s{_pbgProjectId = a})
164+
165+-- | JSONP
166+pbgCallback :: Lens' ProjectsBuildsGet (Maybe Text)
167+pbgCallback
168+ = lens _pbgCallback (\ s a -> s{_pbgCallback = a})
169+
170+instance GoogleRequest ProjectsBuildsGet where
171+ type Rs ProjectsBuildsGet = Build
172+ type Scopes ProjectsBuildsGet =
173+ '["https://www.googleapis.com/auth/cloud-platform"]
174+ requestClient ProjectsBuildsGet'{..}
175+ = go _pbgProjectId _pbgId _pbgXgafv
176+ _pbgUploadProtocol
177+ (Just _pbgPp)
178+ _pbgAccessToken
179+ _pbgUploadType
180+ _pbgBearerToken
181+ _pbgCallback
182+ (Just AltJSON)
183+ containerBuilderService
184+ where go
185+ = buildClient
186+ (Proxy :: Proxy ProjectsBuildsGetResource)
187+ mempty
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/List.hsnew file+211
@@ -0,0 +1,211 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Cloudbuild.Projects.Builds.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 previously requested builds. Previously requested builds may still
24+-- be in-progress, or may have finished successfully or unsuccessfully.
25+--
26+-- /See:/ <https://cloud.google.com/container-builder/docs/ Google Cloud Container Builder API Reference> for @cloudbuild.projects.builds.list@.
27+module Network.Google.Resource.Cloudbuild.Projects.Builds.List
28+ (
29+ -- * REST Resource
30+ ProjectsBuildsListResource
31+
32+ -- * Creating a Request
33+ , projectsBuildsList
34+ , ProjectsBuildsList
35+
36+ -- * Request Lenses
37+ , pblXgafv
38+ , pblUploadProtocol
39+ , pblPp
40+ , pblAccessToken
41+ , pblUploadType
42+ , pblBearerToken
43+ , pblFilter
44+ , pblPageToken
45+ , pblProjectId
46+ , pblPageSize
47+ , pblCallback
48+ ) where
49+
50+import Network.Google.ContainerBuilder.Types
51+import Network.Google.Prelude
52+
53+-- | A resource alias for @cloudbuild.projects.builds.list@ method which the
54+-- 'ProjectsBuildsList' request conforms to.
55+type ProjectsBuildsListResource =
56+ "v1" :>
57+ "projects" :>
58+ Capture "projectId" Text :>
59+ "builds" :>
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 "filter" Text :>
67+ QueryParam "pageToken" Text :>
68+ QueryParam "pageSize" (Textual Int32) :>
69+ QueryParam "callback" Text :>
70+ QueryParam "alt" AltJSON :>
71+ Get '[JSON] ListBuildsResponse
72+
73+-- | Lists previously requested builds. Previously requested builds may still
74+-- be in-progress, or may have finished successfully or unsuccessfully.
75+--
76+-- /See:/ 'projectsBuildsList' smart constructor.
77+data ProjectsBuildsList = ProjectsBuildsList'
78+ { _pblXgafv :: !(Maybe Xgafv)
79+ , _pblUploadProtocol :: !(Maybe Text)
80+ , _pblPp :: !Bool
81+ , _pblAccessToken :: !(Maybe Text)
82+ , _pblUploadType :: !(Maybe Text)
83+ , _pblBearerToken :: !(Maybe Text)
84+ , _pblFilter :: !(Maybe Text)
85+ , _pblPageToken :: !(Maybe Text)
86+ , _pblProjectId :: !Text
87+ , _pblPageSize :: !(Maybe (Textual Int32))
88+ , _pblCallback :: !(Maybe Text)
89+ } deriving (Eq,Show,Data,Typeable,Generic)
90+
91+-- | Creates a value of 'ProjectsBuildsList' with the minimum fields required to make a request.
92+--
93+-- Use one of the following lenses to modify other fields as desired:
94+--
95+-- * 'pblXgafv'
96+--
97+-- * 'pblUploadProtocol'
98+--
99+-- * 'pblPp'
100+--
101+-- * 'pblAccessToken'
102+--
103+-- * 'pblUploadType'
104+--
105+-- * 'pblBearerToken'
106+--
107+-- * 'pblFilter'
108+--
109+-- * 'pblPageToken'
110+--
111+-- * 'pblProjectId'
112+--
113+-- * 'pblPageSize'
114+--
115+-- * 'pblCallback'
116+projectsBuildsList
117+ :: Text -- ^ 'pblProjectId'
118+ -> ProjectsBuildsList
119+projectsBuildsList pPblProjectId_ =
120+ ProjectsBuildsList'
121+ { _pblXgafv = Nothing
122+ , _pblUploadProtocol = Nothing
123+ , _pblPp = True
124+ , _pblAccessToken = Nothing
125+ , _pblUploadType = Nothing
126+ , _pblBearerToken = Nothing
127+ , _pblFilter = Nothing
128+ , _pblPageToken = Nothing
129+ , _pblProjectId = pPblProjectId_
130+ , _pblPageSize = Nothing
131+ , _pblCallback = Nothing
132+ }
133+
134+-- | V1 error format.
135+pblXgafv :: Lens' ProjectsBuildsList (Maybe Xgafv)
136+pblXgafv = lens _pblXgafv (\ s a -> s{_pblXgafv = a})
137+
138+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
139+pblUploadProtocol :: Lens' ProjectsBuildsList (Maybe Text)
140+pblUploadProtocol
141+ = lens _pblUploadProtocol
142+ (\ s a -> s{_pblUploadProtocol = a})
143+
144+-- | Pretty-print response.
145+pblPp :: Lens' ProjectsBuildsList Bool
146+pblPp = lens _pblPp (\ s a -> s{_pblPp = a})
147+
148+-- | OAuth access token.
149+pblAccessToken :: Lens' ProjectsBuildsList (Maybe Text)
150+pblAccessToken
151+ = lens _pblAccessToken
152+ (\ s a -> s{_pblAccessToken = a})
153+
154+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
155+pblUploadType :: Lens' ProjectsBuildsList (Maybe Text)
156+pblUploadType
157+ = lens _pblUploadType
158+ (\ s a -> s{_pblUploadType = a})
159+
160+-- | OAuth bearer token.
161+pblBearerToken :: Lens' ProjectsBuildsList (Maybe Text)
162+pblBearerToken
163+ = lens _pblBearerToken
164+ (\ s a -> s{_pblBearerToken = a})
165+
166+-- | The raw filter text to constrain the results.
167+pblFilter :: Lens' ProjectsBuildsList (Maybe Text)
168+pblFilter
169+ = lens _pblFilter (\ s a -> s{_pblFilter = a})
170+
171+-- | Token to provide to skip to a particular spot in the list.
172+pblPageToken :: Lens' ProjectsBuildsList (Maybe Text)
173+pblPageToken
174+ = lens _pblPageToken (\ s a -> s{_pblPageToken = a})
175+
176+-- | ID of the project.
177+pblProjectId :: Lens' ProjectsBuildsList Text
178+pblProjectId
179+ = lens _pblProjectId (\ s a -> s{_pblProjectId = a})
180+
181+-- | Number of results to return in the list.
182+pblPageSize :: Lens' ProjectsBuildsList (Maybe Int32)
183+pblPageSize
184+ = lens _pblPageSize (\ s a -> s{_pblPageSize = a}) .
185+ mapping _Coerce
186+
187+-- | JSONP
188+pblCallback :: Lens' ProjectsBuildsList (Maybe Text)
189+pblCallback
190+ = lens _pblCallback (\ s a -> s{_pblCallback = a})
191+
192+instance GoogleRequest ProjectsBuildsList where
193+ type Rs ProjectsBuildsList = ListBuildsResponse
194+ type Scopes ProjectsBuildsList =
195+ '["https://www.googleapis.com/auth/cloud-platform"]
196+ requestClient ProjectsBuildsList'{..}
197+ = go _pblProjectId _pblXgafv _pblUploadProtocol
198+ (Just _pblPp)
199+ _pblAccessToken
200+ _pblUploadType
201+ _pblBearerToken
202+ _pblFilter
203+ _pblPageToken
204+ _pblPageSize
205+ _pblCallback
206+ (Just AltJSON)
207+ containerBuilderService
208+ where go
209+ = buildClient
210+ (Proxy :: Proxy ProjectsBuildsListResource)
211+ mempty
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/Create.hsnew file+185
@@ -0,0 +1,185 @@
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.Cloudbuild.Projects.Triggers.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 BuildTrigger. This API is experimental.
24+--
25+-- /See:/ <https://cloud.google.com/container-builder/docs/ Google Cloud Container Builder API Reference> for @cloudbuild.projects.triggers.create@.
26+module Network.Google.Resource.Cloudbuild.Projects.Triggers.Create
27+ (
28+ -- * REST Resource
29+ ProjectsTriggersCreateResource
30+
31+ -- * Creating a Request
32+ , projectsTriggersCreate
33+ , ProjectsTriggersCreate
34+
35+ -- * Request Lenses
36+ , ptcXgafv
37+ , ptcUploadProtocol
38+ , ptcPp
39+ , ptcAccessToken
40+ , ptcUploadType
41+ , ptcPayload
42+ , ptcBearerToken
43+ , ptcProjectId
44+ , ptcCallback
45+ ) where
46+
47+import Network.Google.ContainerBuilder.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @cloudbuild.projects.triggers.create@ method which the
51+-- 'ProjectsTriggersCreate' request conforms to.
52+type ProjectsTriggersCreateResource =
53+ "v1" :>
54+ "projects" :>
55+ Capture "projectId" Text :>
56+ "triggers" :>
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+ ReqBody '[JSON] BuildTrigger :>
66+ Post '[JSON] BuildTrigger
67+
68+-- | Creates a new BuildTrigger. This API is experimental.
69+--
70+-- /See:/ 'projectsTriggersCreate' smart constructor.
71+data ProjectsTriggersCreate = ProjectsTriggersCreate'
72+ { _ptcXgafv :: !(Maybe Xgafv)
73+ , _ptcUploadProtocol :: !(Maybe Text)
74+ , _ptcPp :: !Bool
75+ , _ptcAccessToken :: !(Maybe Text)
76+ , _ptcUploadType :: !(Maybe Text)
77+ , _ptcPayload :: !BuildTrigger
78+ , _ptcBearerToken :: !(Maybe Text)
79+ , _ptcProjectId :: !Text
80+ , _ptcCallback :: !(Maybe Text)
81+ } deriving (Eq,Show,Data,Typeable,Generic)
82+
83+-- | Creates a value of 'ProjectsTriggersCreate' with the minimum fields required to make a request.
84+--
85+-- Use one of the following lenses to modify other fields as desired:
86+--
87+-- * 'ptcXgafv'
88+--
89+-- * 'ptcUploadProtocol'
90+--
91+-- * 'ptcPp'
92+--
93+-- * 'ptcAccessToken'
94+--
95+-- * 'ptcUploadType'
96+--
97+-- * 'ptcPayload'
98+--
99+-- * 'ptcBearerToken'
100+--
101+-- * 'ptcProjectId'
102+--
103+-- * 'ptcCallback'
104+projectsTriggersCreate
105+ :: BuildTrigger -- ^ 'ptcPayload'
106+ -> Text -- ^ 'ptcProjectId'
107+ -> ProjectsTriggersCreate
108+projectsTriggersCreate pPtcPayload_ pPtcProjectId_ =
109+ ProjectsTriggersCreate'
110+ { _ptcXgafv = Nothing
111+ , _ptcUploadProtocol = Nothing
112+ , _ptcPp = True
113+ , _ptcAccessToken = Nothing
114+ , _ptcUploadType = Nothing
115+ , _ptcPayload = pPtcPayload_
116+ , _ptcBearerToken = Nothing
117+ , _ptcProjectId = pPtcProjectId_
118+ , _ptcCallback = Nothing
119+ }
120+
121+-- | V1 error format.
122+ptcXgafv :: Lens' ProjectsTriggersCreate (Maybe Xgafv)
123+ptcXgafv = lens _ptcXgafv (\ s a -> s{_ptcXgafv = a})
124+
125+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
126+ptcUploadProtocol :: Lens' ProjectsTriggersCreate (Maybe Text)
127+ptcUploadProtocol
128+ = lens _ptcUploadProtocol
129+ (\ s a -> s{_ptcUploadProtocol = a})
130+
131+-- | Pretty-print response.
132+ptcPp :: Lens' ProjectsTriggersCreate Bool
133+ptcPp = lens _ptcPp (\ s a -> s{_ptcPp = a})
134+
135+-- | OAuth access token.
136+ptcAccessToken :: Lens' ProjectsTriggersCreate (Maybe Text)
137+ptcAccessToken
138+ = lens _ptcAccessToken
139+ (\ s a -> s{_ptcAccessToken = a})
140+
141+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
142+ptcUploadType :: Lens' ProjectsTriggersCreate (Maybe Text)
143+ptcUploadType
144+ = lens _ptcUploadType
145+ (\ s a -> s{_ptcUploadType = a})
146+
147+-- | Multipart request metadata.
148+ptcPayload :: Lens' ProjectsTriggersCreate BuildTrigger
149+ptcPayload
150+ = lens _ptcPayload (\ s a -> s{_ptcPayload = a})
151+
152+-- | OAuth bearer token.
153+ptcBearerToken :: Lens' ProjectsTriggersCreate (Maybe Text)
154+ptcBearerToken
155+ = lens _ptcBearerToken
156+ (\ s a -> s{_ptcBearerToken = a})
157+
158+-- | ID of the project for which to configure automatic builds.
159+ptcProjectId :: Lens' ProjectsTriggersCreate Text
160+ptcProjectId
161+ = lens _ptcProjectId (\ s a -> s{_ptcProjectId = a})
162+
163+-- | JSONP
164+ptcCallback :: Lens' ProjectsTriggersCreate (Maybe Text)
165+ptcCallback
166+ = lens _ptcCallback (\ s a -> s{_ptcCallback = a})
167+
168+instance GoogleRequest ProjectsTriggersCreate where
169+ type Rs ProjectsTriggersCreate = BuildTrigger
170+ type Scopes ProjectsTriggersCreate =
171+ '["https://www.googleapis.com/auth/cloud-platform"]
172+ requestClient ProjectsTriggersCreate'{..}
173+ = go _ptcProjectId _ptcXgafv _ptcUploadProtocol
174+ (Just _ptcPp)
175+ _ptcAccessToken
176+ _ptcUploadType
177+ _ptcBearerToken
178+ _ptcCallback
179+ (Just AltJSON)
180+ _ptcPayload
181+ containerBuilderService
182+ where go
183+ = buildClient
184+ (Proxy :: Proxy ProjectsTriggersCreateResource)
185+ mempty
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/Delete.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.Cloudbuild.Projects.Triggers.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 an BuildTrigger by its project ID and trigger ID. This API is
24+-- experimental.
25+--
26+-- /See:/ <https://cloud.google.com/container-builder/docs/ Google Cloud Container Builder API Reference> for @cloudbuild.projects.triggers.delete@.
27+module Network.Google.Resource.Cloudbuild.Projects.Triggers.Delete
28+ (
29+ -- * REST Resource
30+ ProjectsTriggersDeleteResource
31+
32+ -- * Creating a Request
33+ , projectsTriggersDelete
34+ , ProjectsTriggersDelete
35+
36+ -- * Request Lenses
37+ , ptdXgafv
38+ , ptdUploadProtocol
39+ , ptdTriggerId
40+ , ptdPp
41+ , ptdAccessToken
42+ , ptdUploadType
43+ , ptdBearerToken
44+ , ptdProjectId
45+ , ptdCallback
46+ ) where
47+
48+import Network.Google.ContainerBuilder.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @cloudbuild.projects.triggers.delete@ method which the
52+-- 'ProjectsTriggersDelete' request conforms to.
53+type ProjectsTriggersDeleteResource =
54+ "v1" :>
55+ "projects" :>
56+ Capture "projectId" Text :>
57+ "triggers" :>
58+ Capture "triggerId" 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 :> Delete '[JSON] Empty
67+
68+-- | Deletes an BuildTrigger by its project ID and trigger ID. This API is
69+-- experimental.
70+--
71+-- /See:/ 'projectsTriggersDelete' smart constructor.
72+data ProjectsTriggersDelete = ProjectsTriggersDelete'
73+ { _ptdXgafv :: !(Maybe Xgafv)
74+ , _ptdUploadProtocol :: !(Maybe Text)
75+ , _ptdTriggerId :: !Text
76+ , _ptdPp :: !Bool
77+ , _ptdAccessToken :: !(Maybe Text)
78+ , _ptdUploadType :: !(Maybe Text)
79+ , _ptdBearerToken :: !(Maybe Text)
80+ , _ptdProjectId :: !Text
81+ , _ptdCallback :: !(Maybe Text)
82+ } deriving (Eq,Show,Data,Typeable,Generic)
83+
84+-- | Creates a value of 'ProjectsTriggersDelete' 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+-- * 'ptdXgafv'
89+--
90+-- * 'ptdUploadProtocol'
91+--
92+-- * 'ptdTriggerId'
93+--
94+-- * 'ptdPp'
95+--
96+-- * 'ptdAccessToken'
97+--
98+-- * 'ptdUploadType'
99+--
100+-- * 'ptdBearerToken'
101+--
102+-- * 'ptdProjectId'
103+--
104+-- * 'ptdCallback'
105+projectsTriggersDelete
106+ :: Text -- ^ 'ptdTriggerId'
107+ -> Text -- ^ 'ptdProjectId'
108+ -> ProjectsTriggersDelete
109+projectsTriggersDelete pPtdTriggerId_ pPtdProjectId_ =
110+ ProjectsTriggersDelete'
111+ { _ptdXgafv = Nothing
112+ , _ptdUploadProtocol = Nothing
113+ , _ptdTriggerId = pPtdTriggerId_
114+ , _ptdPp = True
115+ , _ptdAccessToken = Nothing
116+ , _ptdUploadType = Nothing
117+ , _ptdBearerToken = Nothing
118+ , _ptdProjectId = pPtdProjectId_
119+ , _ptdCallback = Nothing
120+ }
121+
122+-- | V1 error format.
123+ptdXgafv :: Lens' ProjectsTriggersDelete (Maybe Xgafv)
124+ptdXgafv = lens _ptdXgafv (\ s a -> s{_ptdXgafv = a})
125+
126+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
127+ptdUploadProtocol :: Lens' ProjectsTriggersDelete (Maybe Text)
128+ptdUploadProtocol
129+ = lens _ptdUploadProtocol
130+ (\ s a -> s{_ptdUploadProtocol = a})
131+
132+-- | ID of the BuildTrigger to delete.
133+ptdTriggerId :: Lens' ProjectsTriggersDelete Text
134+ptdTriggerId
135+ = lens _ptdTriggerId (\ s a -> s{_ptdTriggerId = a})
136+
137+-- | Pretty-print response.
138+ptdPp :: Lens' ProjectsTriggersDelete Bool
139+ptdPp = lens _ptdPp (\ s a -> s{_ptdPp = a})
140+
141+-- | OAuth access token.
142+ptdAccessToken :: Lens' ProjectsTriggersDelete (Maybe Text)
143+ptdAccessToken
144+ = lens _ptdAccessToken
145+ (\ s a -> s{_ptdAccessToken = a})
146+
147+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
148+ptdUploadType :: Lens' ProjectsTriggersDelete (Maybe Text)
149+ptdUploadType
150+ = lens _ptdUploadType
151+ (\ s a -> s{_ptdUploadType = a})
152+
153+-- | OAuth bearer token.
154+ptdBearerToken :: Lens' ProjectsTriggersDelete (Maybe Text)
155+ptdBearerToken
156+ = lens _ptdBearerToken
157+ (\ s a -> s{_ptdBearerToken = a})
158+
159+-- | ID of the project that owns the trigger.
160+ptdProjectId :: Lens' ProjectsTriggersDelete Text
161+ptdProjectId
162+ = lens _ptdProjectId (\ s a -> s{_ptdProjectId = a})
163+
164+-- | JSONP
165+ptdCallback :: Lens' ProjectsTriggersDelete (Maybe Text)
166+ptdCallback
167+ = lens _ptdCallback (\ s a -> s{_ptdCallback = a})
168+
169+instance GoogleRequest ProjectsTriggersDelete where
170+ type Rs ProjectsTriggersDelete = Empty
171+ type Scopes ProjectsTriggersDelete =
172+ '["https://www.googleapis.com/auth/cloud-platform"]
173+ requestClient ProjectsTriggersDelete'{..}
174+ = go _ptdProjectId _ptdTriggerId _ptdXgafv
175+ _ptdUploadProtocol
176+ (Just _ptdPp)
177+ _ptdAccessToken
178+ _ptdUploadType
179+ _ptdBearerToken
180+ _ptdCallback
181+ (Just AltJSON)
182+ containerBuilderService
183+ where go
184+ = buildClient
185+ (Proxy :: Proxy ProjectsTriggersDeleteResource)
186+ mempty
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/Get.hsnew file+185
@@ -0,0 +1,185 @@
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.Cloudbuild.Projects.Triggers.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 BuildTrigger. This API is experimental.
24+--
25+-- /See:/ <https://cloud.google.com/container-builder/docs/ Google Cloud Container Builder API Reference> for @cloudbuild.projects.triggers.get@.
26+module Network.Google.Resource.Cloudbuild.Projects.Triggers.Get
27+ (
28+ -- * REST Resource
29+ ProjectsTriggersGetResource
30+
31+ -- * Creating a Request
32+ , projectsTriggersGet
33+ , ProjectsTriggersGet
34+
35+ -- * Request Lenses
36+ , ptgXgafv
37+ , ptgUploadProtocol
38+ , ptgTriggerId
39+ , ptgPp
40+ , ptgAccessToken
41+ , ptgUploadType
42+ , ptgBearerToken
43+ , ptgProjectId
44+ , ptgCallback
45+ ) where
46+
47+import Network.Google.ContainerBuilder.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @cloudbuild.projects.triggers.get@ method which the
51+-- 'ProjectsTriggersGet' request conforms to.
52+type ProjectsTriggersGetResource =
53+ "v1" :>
54+ "projects" :>
55+ Capture "projectId" Text :>
56+ "triggers" :>
57+ Capture "triggerId" 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] BuildTrigger
67+
68+-- | Gets information about a BuildTrigger. This API is experimental.
69+--
70+-- /See:/ 'projectsTriggersGet' smart constructor.
71+data ProjectsTriggersGet = ProjectsTriggersGet'
72+ { _ptgXgafv :: !(Maybe Xgafv)
73+ , _ptgUploadProtocol :: !(Maybe Text)
74+ , _ptgTriggerId :: !Text
75+ , _ptgPp :: !Bool
76+ , _ptgAccessToken :: !(Maybe Text)
77+ , _ptgUploadType :: !(Maybe Text)
78+ , _ptgBearerToken :: !(Maybe Text)
79+ , _ptgProjectId :: !Text
80+ , _ptgCallback :: !(Maybe Text)
81+ } deriving (Eq,Show,Data,Typeable,Generic)
82+
83+-- | Creates a value of 'ProjectsTriggersGet' with the minimum fields required to make a request.
84+--
85+-- Use one of the following lenses to modify other fields as desired:
86+--
87+-- * 'ptgXgafv'
88+--
89+-- * 'ptgUploadProtocol'
90+--
91+-- * 'ptgTriggerId'
92+--
93+-- * 'ptgPp'
94+--
95+-- * 'ptgAccessToken'
96+--
97+-- * 'ptgUploadType'
98+--
99+-- * 'ptgBearerToken'
100+--
101+-- * 'ptgProjectId'
102+--
103+-- * 'ptgCallback'
104+projectsTriggersGet
105+ :: Text -- ^ 'ptgTriggerId'
106+ -> Text -- ^ 'ptgProjectId'
107+ -> ProjectsTriggersGet
108+projectsTriggersGet pPtgTriggerId_ pPtgProjectId_ =
109+ ProjectsTriggersGet'
110+ { _ptgXgafv = Nothing
111+ , _ptgUploadProtocol = Nothing
112+ , _ptgTriggerId = pPtgTriggerId_
113+ , _ptgPp = True
114+ , _ptgAccessToken = Nothing
115+ , _ptgUploadType = Nothing
116+ , _ptgBearerToken = Nothing
117+ , _ptgProjectId = pPtgProjectId_
118+ , _ptgCallback = Nothing
119+ }
120+
121+-- | V1 error format.
122+ptgXgafv :: Lens' ProjectsTriggersGet (Maybe Xgafv)
123+ptgXgafv = lens _ptgXgafv (\ s a -> s{_ptgXgafv = a})
124+
125+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
126+ptgUploadProtocol :: Lens' ProjectsTriggersGet (Maybe Text)
127+ptgUploadProtocol
128+ = lens _ptgUploadProtocol
129+ (\ s a -> s{_ptgUploadProtocol = a})
130+
131+-- | ID of the BuildTrigger to get.
132+ptgTriggerId :: Lens' ProjectsTriggersGet Text
133+ptgTriggerId
134+ = lens _ptgTriggerId (\ s a -> s{_ptgTriggerId = a})
135+
136+-- | Pretty-print response.
137+ptgPp :: Lens' ProjectsTriggersGet Bool
138+ptgPp = lens _ptgPp (\ s a -> s{_ptgPp = a})
139+
140+-- | OAuth access token.
141+ptgAccessToken :: Lens' ProjectsTriggersGet (Maybe Text)
142+ptgAccessToken
143+ = lens _ptgAccessToken
144+ (\ s a -> s{_ptgAccessToken = a})
145+
146+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
147+ptgUploadType :: Lens' ProjectsTriggersGet (Maybe Text)
148+ptgUploadType
149+ = lens _ptgUploadType
150+ (\ s a -> s{_ptgUploadType = a})
151+
152+-- | OAuth bearer token.
153+ptgBearerToken :: Lens' ProjectsTriggersGet (Maybe Text)
154+ptgBearerToken
155+ = lens _ptgBearerToken
156+ (\ s a -> s{_ptgBearerToken = a})
157+
158+-- | ID of the project that owns the trigger.
159+ptgProjectId :: Lens' ProjectsTriggersGet Text
160+ptgProjectId
161+ = lens _ptgProjectId (\ s a -> s{_ptgProjectId = a})
162+
163+-- | JSONP
164+ptgCallback :: Lens' ProjectsTriggersGet (Maybe Text)
165+ptgCallback
166+ = lens _ptgCallback (\ s a -> s{_ptgCallback = a})
167+
168+instance GoogleRequest ProjectsTriggersGet where
169+ type Rs ProjectsTriggersGet = BuildTrigger
170+ type Scopes ProjectsTriggersGet =
171+ '["https://www.googleapis.com/auth/cloud-platform"]
172+ requestClient ProjectsTriggersGet'{..}
173+ = go _ptgProjectId _ptgTriggerId _ptgXgafv
174+ _ptgUploadProtocol
175+ (Just _ptgPp)
176+ _ptgAccessToken
177+ _ptgUploadType
178+ _ptgBearerToken
179+ _ptgCallback
180+ (Just AltJSON)
181+ containerBuilderService
182+ where go
183+ = buildClient
184+ (Proxy :: Proxy ProjectsTriggersGetResource)
185+ mempty
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/List.hsnew file+173
@@ -0,0 +1,173 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Cloudbuild.Projects.Triggers.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 existing BuildTrigger. This API is experimental.
24+--
25+-- /See:/ <https://cloud.google.com/container-builder/docs/ Google Cloud Container Builder API Reference> for @cloudbuild.projects.triggers.list@.
26+module Network.Google.Resource.Cloudbuild.Projects.Triggers.List
27+ (
28+ -- * REST Resource
29+ ProjectsTriggersListResource
30+
31+ -- * Creating a Request
32+ , projectsTriggersList
33+ , ProjectsTriggersList
34+
35+ -- * Request Lenses
36+ , ptlXgafv
37+ , ptlUploadProtocol
38+ , ptlPp
39+ , ptlAccessToken
40+ , ptlUploadType
41+ , ptlBearerToken
42+ , ptlProjectId
43+ , ptlCallback
44+ ) where
45+
46+import Network.Google.ContainerBuilder.Types
47+import Network.Google.Prelude
48+
49+-- | A resource alias for @cloudbuild.projects.triggers.list@ method which the
50+-- 'ProjectsTriggersList' request conforms to.
51+type ProjectsTriggersListResource =
52+ "v1" :>
53+ "projects" :>
54+ Capture "projectId" Text :>
55+ "triggers" :>
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] ListBuildTriggersResponse
65+
66+-- | Lists existing BuildTrigger. This API is experimental.
67+--
68+-- /See:/ 'projectsTriggersList' smart constructor.
69+data ProjectsTriggersList = ProjectsTriggersList'
70+ { _ptlXgafv :: !(Maybe Xgafv)
71+ , _ptlUploadProtocol :: !(Maybe Text)
72+ , _ptlPp :: !Bool
73+ , _ptlAccessToken :: !(Maybe Text)
74+ , _ptlUploadType :: !(Maybe Text)
75+ , _ptlBearerToken :: !(Maybe Text)
76+ , _ptlProjectId :: !Text
77+ , _ptlCallback :: !(Maybe Text)
78+ } deriving (Eq,Show,Data,Typeable,Generic)
79+
80+-- | Creates a value of 'ProjectsTriggersList' with the minimum fields required to make a request.
81+--
82+-- Use one of the following lenses to modify other fields as desired:
83+--
84+-- * 'ptlXgafv'
85+--
86+-- * 'ptlUploadProtocol'
87+--
88+-- * 'ptlPp'
89+--
90+-- * 'ptlAccessToken'
91+--
92+-- * 'ptlUploadType'
93+--
94+-- * 'ptlBearerToken'
95+--
96+-- * 'ptlProjectId'
97+--
98+-- * 'ptlCallback'
99+projectsTriggersList
100+ :: Text -- ^ 'ptlProjectId'
101+ -> ProjectsTriggersList
102+projectsTriggersList pPtlProjectId_ =
103+ ProjectsTriggersList'
104+ { _ptlXgafv = Nothing
105+ , _ptlUploadProtocol = Nothing
106+ , _ptlPp = True
107+ , _ptlAccessToken = Nothing
108+ , _ptlUploadType = Nothing
109+ , _ptlBearerToken = Nothing
110+ , _ptlProjectId = pPtlProjectId_
111+ , _ptlCallback = Nothing
112+ }
113+
114+-- | V1 error format.
115+ptlXgafv :: Lens' ProjectsTriggersList (Maybe Xgafv)
116+ptlXgafv = lens _ptlXgafv (\ s a -> s{_ptlXgafv = a})
117+
118+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
119+ptlUploadProtocol :: Lens' ProjectsTriggersList (Maybe Text)
120+ptlUploadProtocol
121+ = lens _ptlUploadProtocol
122+ (\ s a -> s{_ptlUploadProtocol = a})
123+
124+-- | Pretty-print response.
125+ptlPp :: Lens' ProjectsTriggersList Bool
126+ptlPp = lens _ptlPp (\ s a -> s{_ptlPp = a})
127+
128+-- | OAuth access token.
129+ptlAccessToken :: Lens' ProjectsTriggersList (Maybe Text)
130+ptlAccessToken
131+ = lens _ptlAccessToken
132+ (\ s a -> s{_ptlAccessToken = a})
133+
134+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
135+ptlUploadType :: Lens' ProjectsTriggersList (Maybe Text)
136+ptlUploadType
137+ = lens _ptlUploadType
138+ (\ s a -> s{_ptlUploadType = a})
139+
140+-- | OAuth bearer token.
141+ptlBearerToken :: Lens' ProjectsTriggersList (Maybe Text)
142+ptlBearerToken
143+ = lens _ptlBearerToken
144+ (\ s a -> s{_ptlBearerToken = a})
145+
146+-- | ID of the project for which to list BuildTriggers.
147+ptlProjectId :: Lens' ProjectsTriggersList Text
148+ptlProjectId
149+ = lens _ptlProjectId (\ s a -> s{_ptlProjectId = a})
150+
151+-- | JSONP
152+ptlCallback :: Lens' ProjectsTriggersList (Maybe Text)
153+ptlCallback
154+ = lens _ptlCallback (\ s a -> s{_ptlCallback = a})
155+
156+instance GoogleRequest ProjectsTriggersList where
157+ type Rs ProjectsTriggersList =
158+ ListBuildTriggersResponse
159+ type Scopes ProjectsTriggersList =
160+ '["https://www.googleapis.com/auth/cloud-platform"]
161+ requestClient ProjectsTriggersList'{..}
162+ = go _ptlProjectId _ptlXgafv _ptlUploadProtocol
163+ (Just _ptlPp)
164+ _ptlAccessToken
165+ _ptlUploadType
166+ _ptlBearerToken
167+ _ptlCallback
168+ (Just AltJSON)
169+ containerBuilderService
170+ where go
171+ = buildClient
172+ (Proxy :: Proxy ProjectsTriggersListResource)
173+ mempty
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/Patch.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.Cloudbuild.Projects.Triggers.Patch
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+-- Updates an BuildTrigger by its project ID and trigger ID. This API is
24+-- experimental.
25+--
26+-- /See:/ <https://cloud.google.com/container-builder/docs/ Google Cloud Container Builder API Reference> for @cloudbuild.projects.triggers.patch@.
27+module Network.Google.Resource.Cloudbuild.Projects.Triggers.Patch
28+ (
29+ -- * REST Resource
30+ ProjectsTriggersPatchResource
31+
32+ -- * Creating a Request
33+ , projectsTriggersPatch
34+ , ProjectsTriggersPatch
35+
36+ -- * Request Lenses
37+ , ptpXgafv
38+ , ptpUploadProtocol
39+ , ptpTriggerId
40+ , ptpPp
41+ , ptpAccessToken
42+ , ptpUploadType
43+ , ptpPayload
44+ , ptpBearerToken
45+ , ptpProjectId
46+ , ptpCallback
47+ ) where
48+
49+import Network.Google.ContainerBuilder.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @cloudbuild.projects.triggers.patch@ method which the
53+-- 'ProjectsTriggersPatch' request conforms to.
54+type ProjectsTriggersPatchResource =
55+ "v1" :>
56+ "projects" :>
57+ Capture "projectId" Text :>
58+ "triggers" :>
59+ Capture "triggerId" Text :>
60+ QueryParam "$.xgafv" Xgafv :>
61+ QueryParam "upload_protocol" Text :>
62+ QueryParam "pp" Bool :>
63+ QueryParam "access_token" Text :>
64+ QueryParam "uploadType" Text :>
65+ QueryParam "bearer_token" Text :>
66+ QueryParam "callback" Text :>
67+ QueryParam "alt" AltJSON :>
68+ ReqBody '[JSON] BuildTrigger :>
69+ Patch '[JSON] BuildTrigger
70+
71+-- | Updates an BuildTrigger by its project ID and trigger ID. This API is
72+-- experimental.
73+--
74+-- /See:/ 'projectsTriggersPatch' smart constructor.
75+data ProjectsTriggersPatch = ProjectsTriggersPatch'
76+ { _ptpXgafv :: !(Maybe Xgafv)
77+ , _ptpUploadProtocol :: !(Maybe Text)
78+ , _ptpTriggerId :: !Text
79+ , _ptpPp :: !Bool
80+ , _ptpAccessToken :: !(Maybe Text)
81+ , _ptpUploadType :: !(Maybe Text)
82+ , _ptpPayload :: !BuildTrigger
83+ , _ptpBearerToken :: !(Maybe Text)
84+ , _ptpProjectId :: !Text
85+ , _ptpCallback :: !(Maybe Text)
86+ } deriving (Eq,Show,Data,Typeable,Generic)
87+
88+-- | Creates a value of 'ProjectsTriggersPatch' 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+-- * 'ptpXgafv'
93+--
94+-- * 'ptpUploadProtocol'
95+--
96+-- * 'ptpTriggerId'
97+--
98+-- * 'ptpPp'
99+--
100+-- * 'ptpAccessToken'
101+--
102+-- * 'ptpUploadType'
103+--
104+-- * 'ptpPayload'
105+--
106+-- * 'ptpBearerToken'
107+--
108+-- * 'ptpProjectId'
109+--
110+-- * 'ptpCallback'
111+projectsTriggersPatch
112+ :: Text -- ^ 'ptpTriggerId'
113+ -> BuildTrigger -- ^ 'ptpPayload'
114+ -> Text -- ^ 'ptpProjectId'
115+ -> ProjectsTriggersPatch
116+projectsTriggersPatch pPtpTriggerId_ pPtpPayload_ pPtpProjectId_ =
117+ ProjectsTriggersPatch'
118+ { _ptpXgafv = Nothing
119+ , _ptpUploadProtocol = Nothing
120+ , _ptpTriggerId = pPtpTriggerId_
121+ , _ptpPp = True
122+ , _ptpAccessToken = Nothing
123+ , _ptpUploadType = Nothing
124+ , _ptpPayload = pPtpPayload_
125+ , _ptpBearerToken = Nothing
126+ , _ptpProjectId = pPtpProjectId_
127+ , _ptpCallback = Nothing
128+ }
129+
130+-- | V1 error format.
131+ptpXgafv :: Lens' ProjectsTriggersPatch (Maybe Xgafv)
132+ptpXgafv = lens _ptpXgafv (\ s a -> s{_ptpXgafv = a})
133+
134+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
135+ptpUploadProtocol :: Lens' ProjectsTriggersPatch (Maybe Text)
136+ptpUploadProtocol
137+ = lens _ptpUploadProtocol
138+ (\ s a -> s{_ptpUploadProtocol = a})
139+
140+-- | ID of the BuildTrigger to update.
141+ptpTriggerId :: Lens' ProjectsTriggersPatch Text
142+ptpTriggerId
143+ = lens _ptpTriggerId (\ s a -> s{_ptpTriggerId = a})
144+
145+-- | Pretty-print response.
146+ptpPp :: Lens' ProjectsTriggersPatch Bool
147+ptpPp = lens _ptpPp (\ s a -> s{_ptpPp = a})
148+
149+-- | OAuth access token.
150+ptpAccessToken :: Lens' ProjectsTriggersPatch (Maybe Text)
151+ptpAccessToken
152+ = lens _ptpAccessToken
153+ (\ s a -> s{_ptpAccessToken = a})
154+
155+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
156+ptpUploadType :: Lens' ProjectsTriggersPatch (Maybe Text)
157+ptpUploadType
158+ = lens _ptpUploadType
159+ (\ s a -> s{_ptpUploadType = a})
160+
161+-- | Multipart request metadata.
162+ptpPayload :: Lens' ProjectsTriggersPatch BuildTrigger
163+ptpPayload
164+ = lens _ptpPayload (\ s a -> s{_ptpPayload = a})
165+
166+-- | OAuth bearer token.
167+ptpBearerToken :: Lens' ProjectsTriggersPatch (Maybe Text)
168+ptpBearerToken
169+ = lens _ptpBearerToken
170+ (\ s a -> s{_ptpBearerToken = a})
171+
172+-- | ID of the project that owns the trigger.
173+ptpProjectId :: Lens' ProjectsTriggersPatch Text
174+ptpProjectId
175+ = lens _ptpProjectId (\ s a -> s{_ptpProjectId = a})
176+
177+-- | JSONP
178+ptpCallback :: Lens' ProjectsTriggersPatch (Maybe Text)
179+ptpCallback
180+ = lens _ptpCallback (\ s a -> s{_ptpCallback = a})
181+
182+instance GoogleRequest ProjectsTriggersPatch where
183+ type Rs ProjectsTriggersPatch = BuildTrigger
184+ type Scopes ProjectsTriggersPatch =
185+ '["https://www.googleapis.com/auth/cloud-platform"]
186+ requestClient ProjectsTriggersPatch'{..}
187+ = go _ptpProjectId _ptpTriggerId _ptpXgafv
188+ _ptpUploadProtocol
189+ (Just _ptpPp)
190+ _ptpAccessToken
191+ _ptpUploadType
192+ _ptpBearerToken
193+ _ptpCallback
194+ (Just AltJSON)
195+ _ptpPayload
196+ containerBuilderService
197+ where go
198+ = buildClient
199+ (Proxy :: Proxy ProjectsTriggersPatchResource)
200+ mempty
gogol-containerbuilder/gogol-containerbuilder.cabalnew file+56
@@ -0,0 +1,56 @@
1+name: gogol-containerbuilder
2+version: 0.1.0
3+synopsis: Google Cloud Container Builder 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+ Builds container images in the cloud.
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 @v1@
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.ContainerBuilder
37+ , Network.Google.ContainerBuilder.Types
38+ , Network.Google.Resource.Cloudbuild.Operations.Get
39+ , Network.Google.Resource.Cloudbuild.Operations.List
40+ , Network.Google.Resource.Cloudbuild.Projects.Builds.Cancel
41+ , Network.Google.Resource.Cloudbuild.Projects.Builds.Create
42+ , Network.Google.Resource.Cloudbuild.Projects.Builds.Get
43+ , Network.Google.Resource.Cloudbuild.Projects.Builds.List
44+ , Network.Google.Resource.Cloudbuild.Projects.Triggers.Create
45+ , Network.Google.Resource.Cloudbuild.Projects.Triggers.Delete
46+ , Network.Google.Resource.Cloudbuild.Projects.Triggers.Get
47+ , Network.Google.Resource.Cloudbuild.Projects.Triggers.List
48+ , Network.Google.Resource.Cloudbuild.Projects.Triggers.Patch
49+
50+ other-modules:
51+ Network.Google.ContainerBuilder.Types.Product
52+ , Network.Google.ContainerBuilder.Types.Sum
53+
54+ build-depends:
55+ gogol-core == 0.1.0.*
56+ , base >= 4.7 && < 5
gogol-containerbuilder/src/.gitkeepnew file

No changes to the content.