on develop help sign in
Generating kgsearch (Knowledge Graph Search) API library
23ea12bBrendan Hay
gogol-kgsearch/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-kgsearch/Makefilenew file+1
@@ -0,0 +1 @@
1+include ../share/library.mk
gogol-kgsearch/README.mdnew file+28
@@ -0,0 +1,28 @@
1+# gogol-kgsearch
2+
3+* [Version](#version)
4+* [Description](#description)
5+* [Contribute](#contribute)
6+* [Licence](#licence)
7+
8+
9+## Version
10+
11+`0.0.1`
12+
13+
14+## Description
15+
16+A client library for the Google Identity and Access Management.
17+
18+
19+## Contribute
20+
21+For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/gogol/issues).
22+
23+> _Note:_ this library is an auto-generated Haskell package. Please see `gogol-gen` for more information.
24+
25+
26+## Licence
27+
28+`gogol-kgsearch` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
gogol-kgsearch/Setup.hsnew file+2
@@ -0,0 +1,2 @@
1+import Distribution.Simple
2+main = defaultMain
gogol-kgsearch/gen/Network/Google/KnowledgeGraphSearch.hsnew file+239
@@ -0,0 +1,239 @@
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.KnowledgeGraphSearch
10+-- Copyright : (c) 2015 Brendan Hay
11+-- License : Mozilla Public License, v. 2.0.
12+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
13+-- Stability : auto-generated
14+-- Portability : non-portable (GHC extensions)
15+--
16+-- Manages identity and access control for Google Cloud Platform resources,
17+-- including the creation of service accounts, which you can use to
18+-- authenticate to Google and make API calls.
19+--
20+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference>
21+module Network.Google.KnowledgeGraphSearch
22+ (
23+ -- * Service Configuration
24+ knowledgeGraphSearchService
25+
26+ -- * OAuth Scopes
27+ , cloudPlatformScope
28+
29+ -- * API Declaration
30+ , KnowledgeGraphSearchAPI
31+
32+ -- * Resources
33+
34+ -- ** iam.projects.serviceAccounts.create
35+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.Create
36+
37+ -- ** iam.projects.serviceAccounts.delete
38+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.Delete
39+
40+ -- ** iam.projects.serviceAccounts.get
41+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.Get
42+
43+ -- ** iam.projects.serviceAccounts.getIamPolicy
44+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.GetIAMPolicy
45+
46+ -- ** iam.projects.serviceAccounts.keys.create
47+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Create
48+
49+ -- ** iam.projects.serviceAccounts.keys.delete
50+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Delete
51+
52+ -- ** iam.projects.serviceAccounts.keys.get
53+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Get
54+
55+ -- ** iam.projects.serviceAccounts.keys.list
56+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.List
57+
58+ -- ** iam.projects.serviceAccounts.list
59+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.List
60+
61+ -- ** iam.projects.serviceAccounts.setIamPolicy
62+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.SetIAMPolicy
63+
64+ -- ** iam.projects.serviceAccounts.signBlob
65+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.SignBlob
66+
67+ -- ** iam.projects.serviceAccounts.testIamPermissions
68+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.TestIAMPermissions
69+
70+ -- ** iam.projects.serviceAccounts.update
71+ , module Network.Google.Resource.IAM.Projects.ServiceAccounts.Update
72+
73+ -- * Types
74+
75+ -- ** CounterOptions
76+ , CounterOptions
77+ , counterOptions
78+ , coField
79+ , coMetric
80+
81+ -- ** Empty
82+ , Empty
83+ , empty
84+
85+ -- ** ServiceAccountKey
86+ , ServiceAccountKey
87+ , serviceAccountKey
88+ , sakValidAfterTime
89+ , sakPrivateKeyData
90+ , sakName
91+ , sakPrivateKeyType
92+ , sakValidBeforeTime
93+
94+ -- ** Rule
95+ , Rule
96+ , rule
97+ , rAction
98+ , rIn
99+ , rNotIn
100+ , rConditions
101+ , rPermissions
102+ , rLogConfig
103+ , rDescription
104+
105+ -- ** CreateServiceAccountKeyRequest
106+ , CreateServiceAccountKeyRequest
107+ , createServiceAccountKeyRequest
108+ , csakrPrivateKeyType
109+
110+ -- ** SetIAMPolicyRequest
111+ , SetIAMPolicyRequest
112+ , setIAMPolicyRequest
113+ , siprPolicy
114+
115+ -- ** SignBlobRequest
116+ , SignBlobRequest
117+ , signBlobRequest
118+ , sbrBytesToSign
119+
120+ -- ** ListServiceAccountKeysResponse
121+ , ListServiceAccountKeysResponse
122+ , listServiceAccountKeysResponse
123+ , lsakrKeys
124+
125+ -- ** CloudAuditOptions
126+ , CloudAuditOptions
127+ , cloudAuditOptions
128+
129+ -- ** DataAccessOptions
130+ , DataAccessOptions
131+ , dataAccessOptions
132+
133+ -- ** ServiceAccount
134+ , ServiceAccount
135+ , serviceAccount
136+ , saEmail
137+ , saEtag
138+ , saUniqueId
139+ , saName
140+ , saDisplayName
141+ , saProjectId
142+ , saOAuth2ClientId
143+
144+ -- ** TestIAMPermissionsRequest
145+ , TestIAMPermissionsRequest
146+ , testIAMPermissionsRequest
147+ , tiprPermissions
148+
149+ -- ** TestIAMPermissionsResponse
150+ , TestIAMPermissionsResponse
151+ , testIAMPermissionsResponse
152+ , tiamprPermissions
153+
154+ -- ** Policy
155+ , Policy
156+ , policy
157+ , pEtag
158+ , pRules
159+ , pVersion
160+ , pBindings
161+
162+ -- ** Condition
163+ , Condition
164+ , condition
165+ , cOp
166+ , cIAM
167+ , cValues
168+ , cValue
169+ , cSys
170+ , cSvc
171+
172+ -- ** SignBlobResponse
173+ , SignBlobResponse
174+ , signBlobResponse
175+ , sbrSignature
176+ , sbrKeyId
177+
178+ -- ** ListServiceAccountsResponse
179+ , ListServiceAccountsResponse
180+ , listServiceAccountsResponse
181+ , lsarNextPageToken
182+ , lsarAccounts
183+
184+ -- ** LogConfig
185+ , LogConfig
186+ , logConfig
187+ , lcCloudAudit
188+ , lcDataAccess
189+ , lcCounter
190+
191+ -- ** CreateServiceAccountRequest
192+ , CreateServiceAccountRequest
193+ , createServiceAccountRequest
194+ , csarServiceAccount
195+ , csarAccountId
196+
197+ -- ** Binding
198+ , Binding
199+ , binding
200+ , bMembers
201+ , bRole
202+ ) where
203+
204+import Network.Google.KnowledgeGraphSearch.Types
205+import Network.Google.Prelude
206+import Network.Google.Resource.IAM.Projects.ServiceAccounts.Create
207+import Network.Google.Resource.IAM.Projects.ServiceAccounts.Delete
208+import Network.Google.Resource.IAM.Projects.ServiceAccounts.Get
209+import Network.Google.Resource.IAM.Projects.ServiceAccounts.GetIAMPolicy
210+import Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Create
211+import Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Delete
212+import Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Get
213+import Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.List
214+import Network.Google.Resource.IAM.Projects.ServiceAccounts.List
215+import Network.Google.Resource.IAM.Projects.ServiceAccounts.SetIAMPolicy
216+import Network.Google.Resource.IAM.Projects.ServiceAccounts.SignBlob
217+import Network.Google.Resource.IAM.Projects.ServiceAccounts.TestIAMPermissions
218+import Network.Google.Resource.IAM.Projects.ServiceAccounts.Update
219+
220+{- $resources
221+TODO
222+-}
223+
224+-- | Represents the entirety of the methods and resources available for the Google Identity and Access Management API service.
225+type KnowledgeGraphSearchAPI =
226+ ProjectsServiceAccountsKeysListResource :<|>
227+ ProjectsServiceAccountsKeysGetResource
228+ :<|> ProjectsServiceAccountsKeysCreateResource
229+ :<|> ProjectsServiceAccountsKeysDeleteResource
230+ :<|> ProjectsServiceAccountsListResource
231+ :<|> ProjectsServiceAccountsGetIAMPolicyResource
232+ :<|> ProjectsServiceAccountsGetResource
233+ :<|> ProjectsServiceAccountsCreateResource
234+ :<|> ProjectsServiceAccountsSetIAMPolicyResource
235+ :<|> ProjectsServiceAccountsSignBlobResource
236+ :<|>
237+ ProjectsServiceAccountsTestIAMPermissionsResource
238+ :<|> ProjectsServiceAccountsDeleteResource
239+ :<|> ProjectsServiceAccountsUpdateResource
gogol-kgsearch/gen/Network/Google/KnowledgeGraphSearch/Types.hsnew file+165
@@ -0,0 +1,165 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE NoImplicitPrelude #-}
4+{-# LANGUAGE OverloadedStrings #-}
5+
6+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
7+
8+-- |
9+-- Module : Network.Google.KnowledgeGraphSearch.Types
10+-- Copyright : (c) 2015 Brendan Hay
11+-- License : Mozilla Public License, v. 2.0.
12+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
13+-- Stability : auto-generated
14+-- Portability : non-portable (GHC extensions)
15+--
16+module Network.Google.KnowledgeGraphSearch.Types
17+ (
18+ -- * Service Configuration
19+ knowledgeGraphSearchService
20+
21+ -- * OAuth Scopes
22+ , cloudPlatformScope
23+
24+ -- * CounterOptions
25+ , CounterOptions
26+ , counterOptions
27+ , coField
28+ , coMetric
29+
30+ -- * Empty
31+ , Empty
32+ , empty
33+
34+ -- * ServiceAccountKey
35+ , ServiceAccountKey
36+ , serviceAccountKey
37+ , sakValidAfterTime
38+ , sakPrivateKeyData
39+ , sakName
40+ , sakPrivateKeyType
41+ , sakValidBeforeTime
42+
43+ -- * Rule
44+ , Rule
45+ , rule
46+ , rAction
47+ , rIn
48+ , rNotIn
49+ , rConditions
50+ , rPermissions
51+ , rLogConfig
52+ , rDescription
53+
54+ -- * CreateServiceAccountKeyRequest
55+ , CreateServiceAccountKeyRequest
56+ , createServiceAccountKeyRequest
57+ , csakrPrivateKeyType
58+
59+ -- * SetIAMPolicyRequest
60+ , SetIAMPolicyRequest
61+ , setIAMPolicyRequest
62+ , siprPolicy
63+
64+ -- * SignBlobRequest
65+ , SignBlobRequest
66+ , signBlobRequest
67+ , sbrBytesToSign
68+
69+ -- * ListServiceAccountKeysResponse
70+ , ListServiceAccountKeysResponse
71+ , listServiceAccountKeysResponse
72+ , lsakrKeys
73+
74+ -- * CloudAuditOptions
75+ , CloudAuditOptions
76+ , cloudAuditOptions
77+
78+ -- * DataAccessOptions
79+ , DataAccessOptions
80+ , dataAccessOptions
81+
82+ -- * ServiceAccount
83+ , ServiceAccount
84+ , serviceAccount
85+ , saEmail
86+ , saEtag
87+ , saUniqueId
88+ , saName
89+ , saDisplayName
90+ , saProjectId
91+ , saOAuth2ClientId
92+
93+ -- * TestIAMPermissionsRequest
94+ , TestIAMPermissionsRequest
95+ , testIAMPermissionsRequest
96+ , tiprPermissions
97+
98+ -- * TestIAMPermissionsResponse
99+ , TestIAMPermissionsResponse
100+ , testIAMPermissionsResponse
101+ , tiamprPermissions
102+
103+ -- * Policy
104+ , Policy
105+ , policy
106+ , pEtag
107+ , pRules
108+ , pVersion
109+ , pBindings
110+
111+ -- * Condition
112+ , Condition
113+ , condition
114+ , cOp
115+ , cIAM
116+ , cValues
117+ , cValue
118+ , cSys
119+ , cSvc
120+
121+ -- * SignBlobResponse
122+ , SignBlobResponse
123+ , signBlobResponse
124+ , sbrSignature
125+ , sbrKeyId
126+
127+ -- * ListServiceAccountsResponse
128+ , ListServiceAccountsResponse
129+ , listServiceAccountsResponse
130+ , lsarNextPageToken
131+ , lsarAccounts
132+
133+ -- * LogConfig
134+ , LogConfig
135+ , logConfig
136+ , lcCloudAudit
137+ , lcDataAccess
138+ , lcCounter
139+
140+ -- * CreateServiceAccountRequest
141+ , CreateServiceAccountRequest
142+ , createServiceAccountRequest
143+ , csarServiceAccount
144+ , csarAccountId
145+
146+ -- * Binding
147+ , Binding
148+ , binding
149+ , bMembers
150+ , bRole
151+ ) where
152+
153+import Network.Google.KnowledgeGraphSearch.Types.Product
154+import Network.Google.KnowledgeGraphSearch.Types.Sum
155+import Network.Google.Prelude
156+
157+-- | Default request referring to version 'v1' of the Google Identity and Access Management API. This contains the host and root path used as a starting point for constructing service requests.
158+knowledgeGraphSearchService :: ServiceConfig
159+knowledgeGraphSearchService
160+ = defaultService (ServiceId "iam:v1")
161+ "iam.googleapis.com"
162+
163+-- | View and manage your data across Google Cloud Platform services
164+cloudPlatformScope :: OAuthScope
165+cloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform";
gogol-kgsearch/gen/Network/Google/KnowledgeGraphSearch/Types/Product.hsnew file+1145
@@ -0,0 +1,1145 @@
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.KnowledgeGraphSearch.Types.Product
12+-- Copyright : (c) 2015 Brendan Hay
13+-- License : Mozilla Public License, v. 2.0.
14+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
15+-- Stability : auto-generated
16+-- Portability : non-portable (GHC extensions)
17+--
18+module Network.Google.KnowledgeGraphSearch.Types.Product where
19+
20+import Network.Google.KnowledgeGraphSearch.Types.Sum
21+import Network.Google.Prelude
22+
23+-- | Options for counters
24+--
25+-- /See:/ 'counterOptions' smart constructor.
26+data CounterOptions = CounterOptions
27+ { _coField :: !(Maybe Text)
28+ , _coMetric :: !(Maybe Text)
29+ } deriving (Eq,Show,Data,Typeable,Generic)
30+
31+-- | Creates a value of 'CounterOptions' with the minimum fields required to make a request.
32+--
33+-- Use one of the following lenses to modify other fields as desired:
34+--
35+-- * 'coField'
36+--
37+-- * 'coMetric'
38+counterOptions
39+ :: CounterOptions
40+counterOptions =
41+ CounterOptions
42+ { _coField = Nothing
43+ , _coMetric = Nothing
44+ }
45+
46+-- | The field value to attribute.
47+coField :: Lens' CounterOptions (Maybe Text)
48+coField = lens _coField (\ s a -> s{_coField = a})
49+
50+-- | The metric to update.
51+coMetric :: Lens' CounterOptions (Maybe Text)
52+coMetric = lens _coMetric (\ s a -> s{_coMetric = a})
53+
54+instance FromJSON CounterOptions where
55+ parseJSON
56+ = withObject "CounterOptions"
57+ (\ o ->
58+ CounterOptions <$>
59+ (o .:? "field") <*> (o .:? "metric"))
60+
61+instance ToJSON CounterOptions where
62+ toJSON CounterOptions{..}
63+ = object
64+ (catMaybes
65+ [("field" .=) <$> _coField,
66+ ("metric" .=) <$> _coMetric])
67+
68+-- | A generic empty message that you can re-use to avoid defining duplicated
69+-- empty messages in your APIs. A typical example is to use it as the
70+-- request or the response type of an API method. For instance: service Foo
71+-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The
72+-- JSON representation for \`Empty\` is empty JSON object \`{}\`.
73+--
74+-- /See:/ 'empty' smart constructor.
75+data Empty =
76+ Empty
77+ deriving (Eq,Show,Data,Typeable,Generic)
78+
79+-- | Creates a value of 'Empty' with the minimum fields required to make a request.
80+--
81+empty
82+ :: Empty
83+empty = Empty
84+
85+instance FromJSON Empty where
86+ parseJSON = withObject "Empty" (\ o -> pure Empty)
87+
88+instance ToJSON Empty where
89+ toJSON = const emptyObject
90+
91+-- | Represents a service account key. A service account can have 0 or more
92+-- key pairs. The private keys for these are not stored by Google.
93+-- ServiceAccountKeys are immutable.
94+--
95+-- /See:/ 'serviceAccountKey' smart constructor.
96+data ServiceAccountKey = ServiceAccountKey
97+ { _sakValidAfterTime :: !(Maybe Text)
98+ , _sakPrivateKeyData :: !(Maybe (Textual Word8))
99+ , _sakName :: !(Maybe Text)
100+ , _sakPrivateKeyType :: !(Maybe Text)
101+ , _sakValidBeforeTime :: !(Maybe Text)
102+ } deriving (Eq,Show,Data,Typeable,Generic)
103+
104+-- | Creates a value of 'ServiceAccountKey' with the minimum fields required to make a request.
105+--
106+-- Use one of the following lenses to modify other fields as desired:
107+--
108+-- * 'sakValidAfterTime'
109+--
110+-- * 'sakPrivateKeyData'
111+--
112+-- * 'sakName'
113+--
114+-- * 'sakPrivateKeyType'
115+--
116+-- * 'sakValidBeforeTime'
117+serviceAccountKey
118+ :: ServiceAccountKey
119+serviceAccountKey =
120+ ServiceAccountKey
121+ { _sakValidAfterTime = Nothing
122+ , _sakPrivateKeyData = Nothing
123+ , _sakName = Nothing
124+ , _sakPrivateKeyType = Nothing
125+ , _sakValidBeforeTime = Nothing
126+ }
127+
128+-- | The key can be used after this timestamp.
129+sakValidAfterTime :: Lens' ServiceAccountKey (Maybe Text)
130+sakValidAfterTime
131+ = lens _sakValidAfterTime
132+ (\ s a -> s{_sakValidAfterTime = a})
133+
134+-- | The key data.
135+sakPrivateKeyData :: Lens' ServiceAccountKey (Maybe Word8)
136+sakPrivateKeyData
137+ = lens _sakPrivateKeyData
138+ (\ s a -> s{_sakPrivateKeyData = a})
139+ . mapping _Coerce
140+
141+-- | The resource name of the service account key in the format
142+-- \"projects\/{project}\/serviceAccounts\/{email}\/keys\/{key}\".
143+sakName :: Lens' ServiceAccountKey (Maybe Text)
144+sakName = lens _sakName (\ s a -> s{_sakName = a})
145+
146+-- | The type of the private key.
147+sakPrivateKeyType :: Lens' ServiceAccountKey (Maybe Text)
148+sakPrivateKeyType
149+ = lens _sakPrivateKeyType
150+ (\ s a -> s{_sakPrivateKeyType = a})
151+
152+-- | The key can be used before this timestamp.
153+sakValidBeforeTime :: Lens' ServiceAccountKey (Maybe Text)
154+sakValidBeforeTime
155+ = lens _sakValidBeforeTime
156+ (\ s a -> s{_sakValidBeforeTime = a})
157+
158+instance FromJSON ServiceAccountKey where
159+ parseJSON
160+ = withObject "ServiceAccountKey"
161+ (\ o ->
162+ ServiceAccountKey <$>
163+ (o .:? "validAfterTime") <*> (o .:? "privateKeyData")
164+ <*> (o .:? "name")
165+ <*> (o .:? "privateKeyType")
166+ <*> (o .:? "validBeforeTime"))
167+
168+instance ToJSON ServiceAccountKey where
169+ toJSON ServiceAccountKey{..}
170+ = object
171+ (catMaybes
172+ [("validAfterTime" .=) <$> _sakValidAfterTime,
173+ ("privateKeyData" .=) <$> _sakPrivateKeyData,
174+ ("name" .=) <$> _sakName,
175+ ("privateKeyType" .=) <$> _sakPrivateKeyType,
176+ ("validBeforeTime" .=) <$> _sakValidBeforeTime])
177+
178+-- | A rule to be applied in a Policy.
179+--
180+-- /See:/ 'rule' smart constructor.
181+data Rule = Rule
182+ { _rAction :: !(Maybe Text)
183+ , _rIn :: !(Maybe [Text])
184+ , _rNotIn :: !(Maybe [Text])
185+ , _rConditions :: !(Maybe [Condition])
186+ , _rPermissions :: !(Maybe [Text])
187+ , _rLogConfig :: !(Maybe [LogConfig])
188+ , _rDescription :: !(Maybe Text)
189+ } deriving (Eq,Show,Data,Typeable,Generic)
190+
191+-- | Creates a value of 'Rule' with the minimum fields required to make a request.
192+--
193+-- Use one of the following lenses to modify other fields as desired:
194+--
195+-- * 'rAction'
196+--
197+-- * 'rIn'
198+--
199+-- * 'rNotIn'
200+--
201+-- * 'rConditions'
202+--
203+-- * 'rPermissions'
204+--
205+-- * 'rLogConfig'
206+--
207+-- * 'rDescription'
208+rule
209+ :: Rule
210+rule =
211+ Rule
212+ { _rAction = Nothing
213+ , _rIn = Nothing
214+ , _rNotIn = Nothing
215+ , _rConditions = Nothing
216+ , _rPermissions = Nothing
217+ , _rLogConfig = Nothing
218+ , _rDescription = Nothing
219+ }
220+
221+-- | Required
222+rAction :: Lens' Rule (Maybe Text)
223+rAction = lens _rAction (\ s a -> s{_rAction = a})
224+
225+-- | The rule matches if the PRINCIPAL\/AUTHORITY_SELECTOR is in this set of
226+-- entries.
227+rIn :: Lens' Rule [Text]
228+rIn
229+ = lens _rIn (\ s a -> s{_rIn = a}) . _Default .
230+ _Coerce
231+
232+-- | The rule matches if the PRINCIPAL\/AUTHORITY_SELECTOR is not in this set
233+-- of entries. The format for in and not_in entries is the same as for
234+-- members in a Binding (see google\/iam\/v1\/policy.proto).
235+rNotIn :: Lens' Rule [Text]
236+rNotIn
237+ = lens _rNotIn (\ s a -> s{_rNotIn = a}) . _Default .
238+ _Coerce
239+
240+-- | Additional restrictions that must be met
241+rConditions :: Lens' Rule [Condition]
242+rConditions
243+ = lens _rConditions (\ s a -> s{_rConditions = a}) .
244+ _Default
245+ . _Coerce
246+
247+-- | A permission is a string of form \'..\' (e.g.,
248+-- \'storage.buckets.list\'). A value of \'*\' matches all permissions, and
249+-- a verb part of \'*\' (e.g., \'storage.buckets.*\') matches all verbs.
250+rPermissions :: Lens' Rule [Text]
251+rPermissions
252+ = lens _rPermissions (\ s a -> s{_rPermissions = a})
253+ . _Default
254+ . _Coerce
255+
256+-- | The config returned to callers of tech.iam.IAM.CheckPolicy for any
257+-- entries that match the LOG action.
258+rLogConfig :: Lens' Rule [LogConfig]
259+rLogConfig
260+ = lens _rLogConfig (\ s a -> s{_rLogConfig = a}) .
261+ _Default
262+ . _Coerce
263+
264+-- | Human-readable description of the rule.
265+rDescription :: Lens' Rule (Maybe Text)
266+rDescription
267+ = lens _rDescription (\ s a -> s{_rDescription = a})
268+
269+instance FromJSON Rule where
270+ parseJSON
271+ = withObject "Rule"
272+ (\ o ->
273+ Rule <$>
274+ (o .:? "action") <*> (o .:? "in" .!= mempty) <*>
275+ (o .:? "notIn" .!= mempty)
276+ <*> (o .:? "conditions" .!= mempty)
277+ <*> (o .:? "permissions" .!= mempty)
278+ <*> (o .:? "logConfig" .!= mempty)
279+ <*> (o .:? "description"))
280+
281+instance ToJSON Rule where
282+ toJSON Rule{..}
283+ = object
284+ (catMaybes
285+ [("action" .=) <$> _rAction, ("in" .=) <$> _rIn,
286+ ("notIn" .=) <$> _rNotIn,
287+ ("conditions" .=) <$> _rConditions,
288+ ("permissions" .=) <$> _rPermissions,
289+ ("logConfig" .=) <$> _rLogConfig,
290+ ("description" .=) <$> _rDescription])
291+
292+-- | The service account key create request.
293+--
294+-- /See:/ 'createServiceAccountKeyRequest' smart constructor.
295+newtype CreateServiceAccountKeyRequest = CreateServiceAccountKeyRequest
296+ { _csakrPrivateKeyType :: Maybe Text
297+ } deriving (Eq,Show,Data,Typeable,Generic)
298+
299+-- | Creates a value of 'CreateServiceAccountKeyRequest' with the minimum fields required to make a request.
300+--
301+-- Use one of the following lenses to modify other fields as desired:
302+--
303+-- * 'csakrPrivateKeyType'
304+createServiceAccountKeyRequest
305+ :: CreateServiceAccountKeyRequest
306+createServiceAccountKeyRequest =
307+ CreateServiceAccountKeyRequest
308+ { _csakrPrivateKeyType = Nothing
309+ }
310+
311+-- | The type of the key requested. GOOGLE_CREDENTIALS is the default key
312+-- type.
313+csakrPrivateKeyType :: Lens' CreateServiceAccountKeyRequest (Maybe Text)
314+csakrPrivateKeyType
315+ = lens _csakrPrivateKeyType
316+ (\ s a -> s{_csakrPrivateKeyType = a})
317+
318+instance FromJSON CreateServiceAccountKeyRequest
319+ where
320+ parseJSON
321+ = withObject "CreateServiceAccountKeyRequest"
322+ (\ o ->
323+ CreateServiceAccountKeyRequest <$>
324+ (o .:? "privateKeyType"))
325+
326+instance ToJSON CreateServiceAccountKeyRequest where
327+ toJSON CreateServiceAccountKeyRequest{..}
328+ = object
329+ (catMaybes
330+ [("privateKeyType" .=) <$> _csakrPrivateKeyType])
331+
332+-- | Request message for \`SetIamPolicy\` method.
333+--
334+-- /See:/ 'setIAMPolicyRequest' smart constructor.
335+newtype SetIAMPolicyRequest = SetIAMPolicyRequest
336+ { _siprPolicy :: Maybe Policy
337+ } deriving (Eq,Show,Data,Typeable,Generic)
338+
339+-- | Creates a value of 'SetIAMPolicyRequest' with the minimum fields required to make a request.
340+--
341+-- Use one of the following lenses to modify other fields as desired:
342+--
343+-- * 'siprPolicy'
344+setIAMPolicyRequest
345+ :: SetIAMPolicyRequest
346+setIAMPolicyRequest =
347+ SetIAMPolicyRequest
348+ { _siprPolicy = Nothing
349+ }
350+
351+-- | REQUIRED: The complete policy to be applied to the \`resource\`. The
352+-- size of the policy is limited to a few 10s of KB. An empty policy is a
353+-- valid policy but certain Cloud Platform services (such as Projects)
354+-- might reject them.
355+siprPolicy :: Lens' SetIAMPolicyRequest (Maybe Policy)
356+siprPolicy
357+ = lens _siprPolicy (\ s a -> s{_siprPolicy = a})
358+
359+instance FromJSON SetIAMPolicyRequest where
360+ parseJSON
361+ = withObject "SetIAMPolicyRequest"
362+ (\ o -> SetIAMPolicyRequest <$> (o .:? "policy"))
363+
364+instance ToJSON SetIAMPolicyRequest where
365+ toJSON SetIAMPolicyRequest{..}
366+ = object (catMaybes [("policy" .=) <$> _siprPolicy])
367+
368+-- | The service account sign blob request.
369+--
370+-- /See:/ 'signBlobRequest' smart constructor.
371+newtype SignBlobRequest = SignBlobRequest
372+ { _sbrBytesToSign :: Maybe (Textual Word8)
373+ } deriving (Eq,Show,Data,Typeable,Generic)
374+
375+-- | Creates a value of 'SignBlobRequest' with the minimum fields required to make a request.
376+--
377+-- Use one of the following lenses to modify other fields as desired:
378+--
379+-- * 'sbrBytesToSign'
380+signBlobRequest
381+ :: SignBlobRequest
382+signBlobRequest =
383+ SignBlobRequest
384+ { _sbrBytesToSign = Nothing
385+ }
386+
387+-- | The bytes to sign
388+sbrBytesToSign :: Lens' SignBlobRequest (Maybe Word8)
389+sbrBytesToSign
390+ = lens _sbrBytesToSign
391+ (\ s a -> s{_sbrBytesToSign = a})
392+ . mapping _Coerce
393+
394+instance FromJSON SignBlobRequest where
395+ parseJSON
396+ = withObject "SignBlobRequest"
397+ (\ o -> SignBlobRequest <$> (o .:? "bytesToSign"))
398+
399+instance ToJSON SignBlobRequest where
400+ toJSON SignBlobRequest{..}
401+ = object
402+ (catMaybes [("bytesToSign" .=) <$> _sbrBytesToSign])
403+
404+-- | The service account keys list response.
405+--
406+-- /See:/ 'listServiceAccountKeysResponse' smart constructor.
407+newtype ListServiceAccountKeysResponse = ListServiceAccountKeysResponse
408+ { _lsakrKeys :: Maybe [ServiceAccountKey]
409+ } deriving (Eq,Show,Data,Typeable,Generic)
410+
411+-- | Creates a value of 'ListServiceAccountKeysResponse' with the minimum fields required to make a request.
412+--
413+-- Use one of the following lenses to modify other fields as desired:
414+--
415+-- * 'lsakrKeys'
416+listServiceAccountKeysResponse
417+ :: ListServiceAccountKeysResponse
418+listServiceAccountKeysResponse =
419+ ListServiceAccountKeysResponse
420+ { _lsakrKeys = Nothing
421+ }
422+
423+-- | The public keys for the service account.
424+lsakrKeys :: Lens' ListServiceAccountKeysResponse [ServiceAccountKey]
425+lsakrKeys
426+ = lens _lsakrKeys (\ s a -> s{_lsakrKeys = a}) .
427+ _Default
428+ . _Coerce
429+
430+instance FromJSON ListServiceAccountKeysResponse
431+ where
432+ parseJSON
433+ = withObject "ListServiceAccountKeysResponse"
434+ (\ o ->
435+ ListServiceAccountKeysResponse <$>
436+ (o .:? "keys" .!= mempty))
437+
438+instance ToJSON ListServiceAccountKeysResponse where
439+ toJSON ListServiceAccountKeysResponse{..}
440+ = object (catMaybes [("keys" .=) <$> _lsakrKeys])
441+
442+-- | Write a Cloud Audit log
443+--
444+-- /See:/ 'cloudAuditOptions' smart constructor.
445+data CloudAuditOptions =
446+ CloudAuditOptions
447+ deriving (Eq,Show,Data,Typeable,Generic)
448+
449+-- | Creates a value of 'CloudAuditOptions' with the minimum fields required to make a request.
450+--
451+cloudAuditOptions
452+ :: CloudAuditOptions
453+cloudAuditOptions = CloudAuditOptions
454+
455+instance FromJSON CloudAuditOptions where
456+ parseJSON
457+ = withObject "CloudAuditOptions"
458+ (\ o -> pure CloudAuditOptions)
459+
460+instance ToJSON CloudAuditOptions where
461+ toJSON = const emptyObject
462+
463+-- | Write a Data Access (Gin) log
464+--
465+-- /See:/ 'dataAccessOptions' smart constructor.
466+data DataAccessOptions =
467+ DataAccessOptions
468+ deriving (Eq,Show,Data,Typeable,Generic)
469+
470+-- | Creates a value of 'DataAccessOptions' with the minimum fields required to make a request.
471+--
472+dataAccessOptions
473+ :: DataAccessOptions
474+dataAccessOptions = DataAccessOptions
475+
476+instance FromJSON DataAccessOptions where
477+ parseJSON
478+ = withObject "DataAccessOptions"
479+ (\ o -> pure DataAccessOptions)
480+
481+instance ToJSON DataAccessOptions where
482+ toJSON = const emptyObject
483+
484+-- | A service account in the Identity and Access Management API. To create a
485+-- service account, you specify the project_id and account_id for the
486+-- account. The account_id is unique within the project, and used to
487+-- generate the service account email address and a stable unique id. All
488+-- other methods can identify accounts using the format
489+-- \"projects\/{project}\/serviceAccounts\/{account}\". Using \'-\' as a
490+-- wildcard for the project, will infer the project from the account. The
491+-- account value can be the email address or the unique_id of the service
492+-- account.
493+--
494+-- /See:/ 'serviceAccount' smart constructor.
495+data ServiceAccount = ServiceAccount
496+ { _saEmail :: !(Maybe Text)
497+ , _saEtag :: !(Maybe (Textual Word8))
498+ , _saUniqueId :: !(Maybe Text)
499+ , _saName :: !(Maybe Text)
500+ , _saDisplayName :: !(Maybe Text)
501+ , _saProjectId :: !(Maybe Text)
502+ , _saOAuth2ClientId :: !(Maybe Text)
503+ } deriving (Eq,Show,Data,Typeable,Generic)
504+
505+-- | Creates a value of 'ServiceAccount' with the minimum fields required to make a request.
506+--
507+-- Use one of the following lenses to modify other fields as desired:
508+--
509+-- * 'saEmail'
510+--
511+-- * 'saEtag'
512+--
513+-- * 'saUniqueId'
514+--
515+-- * 'saName'
516+--
517+-- * 'saDisplayName'
518+--
519+-- * 'saProjectId'
520+--
521+-- * 'saOAuth2ClientId'
522+serviceAccount
523+ :: ServiceAccount
524+serviceAccount =
525+ ServiceAccount
526+ { _saEmail = Nothing
527+ , _saEtag = Nothing
528+ , _saUniqueId = Nothing
529+ , _saName = Nothing
530+ , _saDisplayName = Nothing
531+ , _saProjectId = Nothing
532+ , _saOAuth2ClientId = Nothing
533+ }
534+
535+-- | \'OutputOnly Email address of the service account.
536+saEmail :: Lens' ServiceAccount (Maybe Text)
537+saEmail = lens _saEmail (\ s a -> s{_saEmail = a})
538+
539+-- | Used to perform a consistent read-modify-write.
540+saEtag :: Lens' ServiceAccount (Maybe Word8)
541+saEtag
542+ = lens _saEtag (\ s a -> s{_saEtag = a}) .
543+ mapping _Coerce
544+
545+-- | \'OutputOnly unique and stable id of the service account.
546+saUniqueId :: Lens' ServiceAccount (Maybe Text)
547+saUniqueId
548+ = lens _saUniqueId (\ s a -> s{_saUniqueId = a})
549+
550+-- | The resource name of the service account in the format
551+-- \"projects\/{project}\/serviceAccounts\/{account}\". In requests using
552+-- \'-\' as a wildcard for the project, will infer the project from the
553+-- account and the account value can be the email address or the unique_id
554+-- of the service account. In responses the resource name will always be in
555+-- the format \"projects\/{project}\/serviceAccounts\/{email}\".
556+saName :: Lens' ServiceAccount (Maybe Text)
557+saName = lens _saName (\ s a -> s{_saName = a})
558+
559+-- | Optional. A user-specified description of the service account. Must be
560+-- fewer than 100 UTF-8 bytes.
561+saDisplayName :: Lens' ServiceAccount (Maybe Text)
562+saDisplayName
563+ = lens _saDisplayName
564+ (\ s a -> s{_saDisplayName = a})
565+
566+-- | \'OutputOnly The id of the project that owns the service account.
567+saProjectId :: Lens' ServiceAccount (Maybe Text)
568+saProjectId
569+ = lens _saProjectId (\ s a -> s{_saProjectId = a})
570+
571+-- | \'OutputOnly. The OAuth2 client id for the service account. This is used
572+-- in conjunction with the OAuth2 clientconfig API to make three legged
573+-- OAuth2 (3LO) flows to access the data of Google users.
574+saOAuth2ClientId :: Lens' ServiceAccount (Maybe Text)
575+saOAuth2ClientId
576+ = lens _saOAuth2ClientId
577+ (\ s a -> s{_saOAuth2ClientId = a})
578+
579+instance FromJSON ServiceAccount where
580+ parseJSON
581+ = withObject "ServiceAccount"
582+ (\ o ->
583+ ServiceAccount <$>
584+ (o .:? "email") <*> (o .:? "etag") <*>
585+ (o .:? "uniqueId")
586+ <*> (o .:? "name")
587+ <*> (o .:? "displayName")
588+ <*> (o .:? "projectId")
589+ <*> (o .:? "oauth2ClientId"))
590+
591+instance ToJSON ServiceAccount where
592+ toJSON ServiceAccount{..}
593+ = object
594+ (catMaybes
595+ [("email" .=) <$> _saEmail, ("etag" .=) <$> _saEtag,
596+ ("uniqueId" .=) <$> _saUniqueId,
597+ ("name" .=) <$> _saName,
598+ ("displayName" .=) <$> _saDisplayName,
599+ ("projectId" .=) <$> _saProjectId,
600+ ("oauth2ClientId" .=) <$> _saOAuth2ClientId])
601+
602+-- | Request message for \`TestIamPermissions\` method.
603+--
604+-- /See:/ 'testIAMPermissionsRequest' smart constructor.
605+newtype TestIAMPermissionsRequest = TestIAMPermissionsRequest
606+ { _tiprPermissions :: Maybe [Text]
607+ } deriving (Eq,Show,Data,Typeable,Generic)
608+
609+-- | Creates a value of 'TestIAMPermissionsRequest' with the minimum fields required to make a request.
610+--
611+-- Use one of the following lenses to modify other fields as desired:
612+--
613+-- * 'tiprPermissions'
614+testIAMPermissionsRequest
615+ :: TestIAMPermissionsRequest
616+testIAMPermissionsRequest =
617+ TestIAMPermissionsRequest
618+ { _tiprPermissions = Nothing
619+ }
620+
621+-- | The set of permissions to check for the \`resource\`. Permissions with
622+-- wildcards (such as \'*\' or \'storage.*\') are not allowed. For more
623+-- information see IAM Overview.
624+tiprPermissions :: Lens' TestIAMPermissionsRequest [Text]
625+tiprPermissions
626+ = lens _tiprPermissions
627+ (\ s a -> s{_tiprPermissions = a})
628+ . _Default
629+ . _Coerce
630+
631+instance FromJSON TestIAMPermissionsRequest where
632+ parseJSON
633+ = withObject "TestIAMPermissionsRequest"
634+ (\ o ->
635+ TestIAMPermissionsRequest <$>
636+ (o .:? "permissions" .!= mempty))
637+
638+instance ToJSON TestIAMPermissionsRequest where
639+ toJSON TestIAMPermissionsRequest{..}
640+ = object
641+ (catMaybes [("permissions" .=) <$> _tiprPermissions])
642+
643+-- | Response message for \`TestIamPermissions\` method.
644+--
645+-- /See:/ 'testIAMPermissionsResponse' smart constructor.
646+newtype TestIAMPermissionsResponse = TestIAMPermissionsResponse
647+ { _tiamprPermissions :: Maybe [Text]
648+ } deriving (Eq,Show,Data,Typeable,Generic)
649+
650+-- | Creates a value of 'TestIAMPermissionsResponse' with the minimum fields required to make a request.
651+--
652+-- Use one of the following lenses to modify other fields as desired:
653+--
654+-- * 'tiamprPermissions'
655+testIAMPermissionsResponse
656+ :: TestIAMPermissionsResponse
657+testIAMPermissionsResponse =
658+ TestIAMPermissionsResponse
659+ { _tiamprPermissions = Nothing
660+ }
661+
662+-- | A subset of \`TestPermissionsRequest.permissions\` that the caller is
663+-- allowed.
664+tiamprPermissions :: Lens' TestIAMPermissionsResponse [Text]
665+tiamprPermissions
666+ = lens _tiamprPermissions
667+ (\ s a -> s{_tiamprPermissions = a})
668+ . _Default
669+ . _Coerce
670+
671+instance FromJSON TestIAMPermissionsResponse where
672+ parseJSON
673+ = withObject "TestIAMPermissionsResponse"
674+ (\ o ->
675+ TestIAMPermissionsResponse <$>
676+ (o .:? "permissions" .!= mempty))
677+
678+instance ToJSON TestIAMPermissionsResponse where
679+ toJSON TestIAMPermissionsResponse{..}
680+ = object
681+ (catMaybes
682+ [("permissions" .=) <$> _tiamprPermissions])
683+
684+-- | Defines an Identity and Access Management (IAM) policy. It is used to
685+-- specify access control policies for Cloud Platform resources. A
686+-- \`Policy\` consists of a list of \`bindings\`. A \`Binding\` binds a
687+-- list of \`members\` to a \`role\`, where the members can be user
688+-- accounts, Google groups, Google domains, and service accounts. A
689+-- \`role\` is a named list of permissions defined by IAM. **Example** {
690+-- \"bindings\": [ { \"role\": \"roles\/owner\", \"members\": [
691+-- \"user:mike\'example.com\", \"group:admins\'example.com\",
692+-- \"domain:google.com\",
693+-- \"serviceAccount:my-other-app\'appspot.gserviceaccount.com\"] }, {
694+-- \"role\": \"roles\/viewer\", \"members\": [\"user:sean\'example.com\"] }
695+-- ] } For a description of IAM and its features, see the [IAM developer\'s
696+-- guide](https:\/\/cloud.google.com\/iam).
697+--
698+-- /See:/ 'policy' smart constructor.
699+data Policy = Policy
700+ { _pEtag :: !(Maybe (Textual Word8))
701+ , _pRules :: !(Maybe [Rule])
702+ , _pVersion :: !(Maybe (Textual Int32))
703+ , _pBindings :: !(Maybe [Binding])
704+ } deriving (Eq,Show,Data,Typeable,Generic)
705+
706+-- | Creates a value of 'Policy' 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+-- * 'pEtag'
711+--
712+-- * 'pRules'
713+--
714+-- * 'pVersion'
715+--
716+-- * 'pBindings'
717+policy
718+ :: Policy
719+policy =
720+ Policy
721+ { _pEtag = Nothing
722+ , _pRules = Nothing
723+ , _pVersion = Nothing
724+ , _pBindings = Nothing
725+ }
726+
727+-- | \`etag\` is used for optimistic concurrency control as a way to help
728+-- prevent simultaneous updates of a policy from overwriting each other. It
729+-- is strongly suggested that systems make use of the \`etag\` in the
730+-- read-modify-write cycle to perform policy updates in order to avoid race
731+-- conditions: An \`etag\` is returned in the response to \`getIamPolicy\`,
732+-- and systems are expected to put that etag in the request to
733+-- \`setIamPolicy\` to ensure that their change will be applied to the same
734+-- version of the policy. If no \`etag\` is provided in the call to
735+-- \`setIamPolicy\`, then the existing policy is overwritten blindly.
736+pEtag :: Lens' Policy (Maybe Word8)
737+pEtag
738+ = lens _pEtag (\ s a -> s{_pEtag = a}) .
739+ mapping _Coerce
740+
741+pRules :: Lens' Policy [Rule]
742+pRules
743+ = lens _pRules (\ s a -> s{_pRules = a}) . _Default .
744+ _Coerce
745+
746+-- | Version of the \`Policy\`. The default version is 0.
747+pVersion :: Lens' Policy (Maybe Int32)
748+pVersion
749+ = lens _pVersion (\ s a -> s{_pVersion = a}) .
750+ mapping _Coerce
751+
752+-- | Associates a list of \`members\` to a \`role\`. Multiple \`bindings\`
753+-- must not be specified for the same \`role\`. \`bindings\` with no
754+-- members will result in an error.
755+pBindings :: Lens' Policy [Binding]
756+pBindings
757+ = lens _pBindings (\ s a -> s{_pBindings = a}) .
758+ _Default
759+ . _Coerce
760+
761+instance FromJSON Policy where
762+ parseJSON
763+ = withObject "Policy"
764+ (\ o ->
765+ Policy <$>
766+ (o .:? "etag") <*> (o .:? "rules" .!= mempty) <*>
767+ (o .:? "version")
768+ <*> (o .:? "bindings" .!= mempty))
769+
770+instance ToJSON Policy where
771+ toJSON Policy{..}
772+ = object
773+ (catMaybes
774+ [("etag" .=) <$> _pEtag, ("rules" .=) <$> _pRules,
775+ ("version" .=) <$> _pVersion,
776+ ("bindings" .=) <$> _pBindings])
777+
778+-- | A condition to be met.
779+--
780+-- /See:/ 'condition' smart constructor.
781+data Condition = Condition
782+ { _cOp :: !(Maybe Text)
783+ , _cIAM :: !(Maybe Text)
784+ , _cValues :: !(Maybe [Text])
785+ , _cValue :: !(Maybe Text)
786+ , _cSys :: !(Maybe Text)
787+ , _cSvc :: !(Maybe Text)
788+ } deriving (Eq,Show,Data,Typeable,Generic)
789+
790+-- | Creates a value of 'Condition' with the minimum fields required to make a request.
791+--
792+-- Use one of the following lenses to modify other fields as desired:
793+--
794+-- * 'cOp'
795+--
796+-- * 'cIAM'
797+--
798+-- * 'cValues'
799+--
800+-- * 'cValue'
801+--
802+-- * 'cSys'
803+--
804+-- * 'cSvc'
805+condition
806+ :: Condition
807+condition =
808+ Condition
809+ { _cOp = Nothing
810+ , _cIAM = Nothing
811+ , _cValues = Nothing
812+ , _cValue = Nothing
813+ , _cSys = Nothing
814+ , _cSvc = Nothing
815+ }
816+
817+-- | An operator to apply the subject with.
818+cOp :: Lens' Condition (Maybe Text)
819+cOp = lens _cOp (\ s a -> s{_cOp = a})
820+
821+-- | Trusted attributes supplied by the IAM system.
822+cIAM :: Lens' Condition (Maybe Text)
823+cIAM = lens _cIAM (\ s a -> s{_cIAM = a})
824+
825+-- | The objects of the condition. This is mutually exclusive with \'value\'.
826+cValues :: Lens' Condition [Text]
827+cValues
828+ = lens _cValues (\ s a -> s{_cValues = a}) . _Default
829+ . _Coerce
830+
831+-- | The object of the condition. Exactly one of these must be set.
832+cValue :: Lens' Condition (Maybe Text)
833+cValue = lens _cValue (\ s a -> s{_cValue = a})
834+
835+-- | Trusted attributes supplied by any service that owns resources and uses
836+-- the IAM system for access control.
837+cSys :: Lens' Condition (Maybe Text)
838+cSys = lens _cSys (\ s a -> s{_cSys = a})
839+
840+-- | Trusted attributes discharged by the service.
841+cSvc :: Lens' Condition (Maybe Text)
842+cSvc = lens _cSvc (\ s a -> s{_cSvc = a})
843+
844+instance FromJSON Condition where
845+ parseJSON
846+ = withObject "Condition"
847+ (\ o ->
848+ Condition <$>
849+ (o .:? "op") <*> (o .:? "iam") <*>
850+ (o .:? "values" .!= mempty)
851+ <*> (o .:? "value")
852+ <*> (o .:? "sys")
853+ <*> (o .:? "svc"))
854+
855+instance ToJSON Condition where
856+ toJSON Condition{..}
857+ = object
858+ (catMaybes
859+ [("op" .=) <$> _cOp, ("iam" .=) <$> _cIAM,
860+ ("values" .=) <$> _cValues, ("value" .=) <$> _cValue,
861+ ("sys" .=) <$> _cSys, ("svc" .=) <$> _cSvc])
862+
863+-- | The service account sign blob response.
864+--
865+-- /See:/ 'signBlobResponse' smart constructor.
866+data SignBlobResponse = SignBlobResponse
867+ { _sbrSignature :: !(Maybe (Textual Word8))
868+ , _sbrKeyId :: !(Maybe Text)
869+ } deriving (Eq,Show,Data,Typeable,Generic)
870+
871+-- | Creates a value of 'SignBlobResponse' with the minimum fields required to make a request.
872+--
873+-- Use one of the following lenses to modify other fields as desired:
874+--
875+-- * 'sbrSignature'
876+--
877+-- * 'sbrKeyId'
878+signBlobResponse
879+ :: SignBlobResponse
880+signBlobResponse =
881+ SignBlobResponse
882+ { _sbrSignature = Nothing
883+ , _sbrKeyId = Nothing
884+ }
885+
886+-- | The signed blob.
887+sbrSignature :: Lens' SignBlobResponse (Maybe Word8)
888+sbrSignature
889+ = lens _sbrSignature (\ s a -> s{_sbrSignature = a})
890+ . mapping _Coerce
891+
892+-- | The id of the key used to sign the blob.
893+sbrKeyId :: Lens' SignBlobResponse (Maybe Text)
894+sbrKeyId = lens _sbrKeyId (\ s a -> s{_sbrKeyId = a})
895+
896+instance FromJSON SignBlobResponse where
897+ parseJSON
898+ = withObject "SignBlobResponse"
899+ (\ o ->
900+ SignBlobResponse <$>
901+ (o .:? "signature") <*> (o .:? "keyId"))
902+
903+instance ToJSON SignBlobResponse where
904+ toJSON SignBlobResponse{..}
905+ = object
906+ (catMaybes
907+ [("signature" .=) <$> _sbrSignature,
908+ ("keyId" .=) <$> _sbrKeyId])
909+
910+-- | The service account list response.
911+--
912+-- /See:/ 'listServiceAccountsResponse' smart constructor.
913+data ListServiceAccountsResponse = ListServiceAccountsResponse
914+ { _lsarNextPageToken :: !(Maybe Text)
915+ , _lsarAccounts :: !(Maybe [ServiceAccount])
916+ } deriving (Eq,Show,Data,Typeable,Generic)
917+
918+-- | Creates a value of 'ListServiceAccountsResponse' with the minimum fields required to make a request.
919+--
920+-- Use one of the following lenses to modify other fields as desired:
921+--
922+-- * 'lsarNextPageToken'
923+--
924+-- * 'lsarAccounts'
925+listServiceAccountsResponse
926+ :: ListServiceAccountsResponse
927+listServiceAccountsResponse =
928+ ListServiceAccountsResponse
929+ { _lsarNextPageToken = Nothing
930+ , _lsarAccounts = Nothing
931+ }
932+
933+-- | To retrieve the next page of results, set
934+-- [ListServiceAccountsRequest.page_token] to this value.
935+lsarNextPageToken :: Lens' ListServiceAccountsResponse (Maybe Text)
936+lsarNextPageToken
937+ = lens _lsarNextPageToken
938+ (\ s a -> s{_lsarNextPageToken = a})
939+
940+-- | The list of matching service accounts.
941+lsarAccounts :: Lens' ListServiceAccountsResponse [ServiceAccount]
942+lsarAccounts
943+ = lens _lsarAccounts (\ s a -> s{_lsarAccounts = a})
944+ . _Default
945+ . _Coerce
946+
947+instance FromJSON ListServiceAccountsResponse where
948+ parseJSON
949+ = withObject "ListServiceAccountsResponse"
950+ (\ o ->
951+ ListServiceAccountsResponse <$>
952+ (o .:? "nextPageToken") <*>
953+ (o .:? "accounts" .!= mempty))
954+
955+instance ToJSON ListServiceAccountsResponse where
956+ toJSON ListServiceAccountsResponse{..}
957+ = object
958+ (catMaybes
959+ [("nextPageToken" .=) <$> _lsarNextPageToken,
960+ ("accounts" .=) <$> _lsarAccounts])
961+
962+-- | Specifies what kind of log the caller must write Increment a streamz
963+-- counter with the specified metric and field names. Metric names should
964+-- start with a \'\/\', generally be lowercase-only, and end in \"_count\".
965+-- Field names should not contain an initial slash. The actual exported
966+-- metric names will have \"\/iam\/policy\" prepended. Field names
967+-- correspond to IAM request parameters and field values are their
968+-- respective values. At present only \"iam_principal\", corresponding to
969+-- IAMContext.principal, is supported. Examples: counter { metric:
970+-- \"\/debug_access_count\" field: \"iam_principal\" } ==> increment
971+-- counter \/iam\/policy\/backend_debug_access_count {iam_principal=[value
972+-- of IAMContext.principal]} At this time we do not support: * multiple
973+-- field names (though this may be supported in the future) * decrementing
974+-- the counter * incrementing it by anything other than 1
975+--
976+-- /See:/ 'logConfig' smart constructor.
977+data LogConfig = LogConfig
978+ { _lcCloudAudit :: !(Maybe CloudAuditOptions)
979+ , _lcDataAccess :: !(Maybe DataAccessOptions)
980+ , _lcCounter :: !(Maybe CounterOptions)
981+ } deriving (Eq,Show,Data,Typeable,Generic)
982+
983+-- | Creates a value of 'LogConfig' with the minimum fields required to make a request.
984+--
985+-- Use one of the following lenses to modify other fields as desired:
986+--
987+-- * 'lcCloudAudit'
988+--
989+-- * 'lcDataAccess'
990+--
991+-- * 'lcCounter'
992+logConfig
993+ :: LogConfig
994+logConfig =
995+ LogConfig
996+ { _lcCloudAudit = Nothing
997+ , _lcDataAccess = Nothing
998+ , _lcCounter = Nothing
999+ }
1000+
1001+-- | Cloud audit options.
1002+lcCloudAudit :: Lens' LogConfig (Maybe CloudAuditOptions)
1003+lcCloudAudit
1004+ = lens _lcCloudAudit (\ s a -> s{_lcCloudAudit = a})
1005+
1006+-- | Data access options.
1007+lcDataAccess :: Lens' LogConfig (Maybe DataAccessOptions)
1008+lcDataAccess
1009+ = lens _lcDataAccess (\ s a -> s{_lcDataAccess = a})
1010+
1011+-- | Counter options.
1012+lcCounter :: Lens' LogConfig (Maybe CounterOptions)
1013+lcCounter
1014+ = lens _lcCounter (\ s a -> s{_lcCounter = a})
1015+
1016+instance FromJSON LogConfig where
1017+ parseJSON
1018+ = withObject "LogConfig"
1019+ (\ o ->
1020+ LogConfig <$>
1021+ (o .:? "cloudAudit") <*> (o .:? "dataAccess") <*>
1022+ (o .:? "counter"))
1023+
1024+instance ToJSON LogConfig where
1025+ toJSON LogConfig{..}
1026+ = object
1027+ (catMaybes
1028+ [("cloudAudit" .=) <$> _lcCloudAudit,
1029+ ("dataAccess" .=) <$> _lcDataAccess,
1030+ ("counter" .=) <$> _lcCounter])
1031+
1032+-- | The service account create request.
1033+--
1034+-- /See:/ 'createServiceAccountRequest' smart constructor.
1035+data CreateServiceAccountRequest = CreateServiceAccountRequest
1036+ { _csarServiceAccount :: !(Maybe ServiceAccount)
1037+ , _csarAccountId :: !(Maybe Text)
1038+ } deriving (Eq,Show,Data,Typeable,Generic)
1039+
1040+-- | Creates a value of 'CreateServiceAccountRequest' with the minimum fields required to make a request.
1041+--
1042+-- Use one of the following lenses to modify other fields as desired:
1043+--
1044+-- * 'csarServiceAccount'
1045+--
1046+-- * 'csarAccountId'
1047+createServiceAccountRequest
1048+ :: CreateServiceAccountRequest
1049+createServiceAccountRequest =
1050+ CreateServiceAccountRequest
1051+ { _csarServiceAccount = Nothing
1052+ , _csarAccountId = Nothing
1053+ }
1054+
1055+-- | The ServiceAccount resource to create. Currently, only the following
1056+-- values are user assignable: display_name .
1057+csarServiceAccount :: Lens' CreateServiceAccountRequest (Maybe ServiceAccount)
1058+csarServiceAccount
1059+ = lens _csarServiceAccount
1060+ (\ s a -> s{_csarServiceAccount = a})
1061+
1062+-- | Required. The account id that is used to generate the service account
1063+-- email address and a stable unique id. It is unique within a project,
1064+-- must be 1-63 characters long, and match the regular expression
1065+-- [a-z]([-a-z0-9]*[a-z0-9]) to comply with RFC1035.
1066+csarAccountId :: Lens' CreateServiceAccountRequest (Maybe Text)
1067+csarAccountId
1068+ = lens _csarAccountId
1069+ (\ s a -> s{_csarAccountId = a})
1070+
1071+instance FromJSON CreateServiceAccountRequest where
1072+ parseJSON
1073+ = withObject "CreateServiceAccountRequest"
1074+ (\ o ->
1075+ CreateServiceAccountRequest <$>
1076+ (o .:? "serviceAccount") <*> (o .:? "accountId"))
1077+
1078+instance ToJSON CreateServiceAccountRequest where
1079+ toJSON CreateServiceAccountRequest{..}
1080+ = object
1081+ (catMaybes
1082+ [("serviceAccount" .=) <$> _csarServiceAccount,
1083+ ("accountId" .=) <$> _csarAccountId])
1084+
1085+-- | Associates \`members\` with a \`role\`.
1086+--
1087+-- /See:/ 'binding' smart constructor.
1088+data Binding = Binding
1089+ { _bMembers :: !(Maybe [Text])
1090+ , _bRole :: !(Maybe Text)
1091+ } deriving (Eq,Show,Data,Typeable,Generic)
1092+
1093+-- | Creates a value of 'Binding' with the minimum fields required to make a request.
1094+--
1095+-- Use one of the following lenses to modify other fields as desired:
1096+--
1097+-- * 'bMembers'
1098+--
1099+-- * 'bRole'
1100+binding
1101+ :: Binding
1102+binding =
1103+ Binding
1104+ { _bMembers = Nothing
1105+ , _bRole = Nothing
1106+ }
1107+
1108+-- | Specifies the identities requesting access for a Cloud Platform
1109+-- resource. \`members\` can have the following values: * \`allUsers\`: A
1110+-- special identifier that represents anyone who is on the internet; with
1111+-- or without a Google account. * \`allAuthenticatedUsers\`: A special
1112+-- identifier that represents anyone who is authenticated with a Google
1113+-- account or a service account. * \`user:{emailid}\`: An email address
1114+-- that represents a specific Google account. For example,
1115+-- \`alice\'gmail.com\` or \`joe\'example.com\`. *
1116+-- \`serviceAccount:{emailid}\`: An email address that represents a service
1117+-- account. For example, \`my-other-app\'appspot.gserviceaccount.com\`. *
1118+-- \`group:{emailid}\`: An email address that represents a Google group.
1119+-- For example, \`admins\'example.com\`. * \`domain:{domain}\`: A Google
1120+-- Apps domain name that represents all the users of that domain. For
1121+-- example, \`google.com\` or \`example.com\`.
1122+bMembers :: Lens' Binding [Text]
1123+bMembers
1124+ = lens _bMembers (\ s a -> s{_bMembers = a}) .
1125+ _Default
1126+ . _Coerce
1127+
1128+-- | Role that is assigned to \`members\`. For example, \`roles\/viewer\`,
1129+-- \`roles\/editor\`, or \`roles\/owner\`. Required
1130+bRole :: Lens' Binding (Maybe Text)
1131+bRole = lens _bRole (\ s a -> s{_bRole = a})
1132+
1133+instance FromJSON Binding where
1134+ parseJSON
1135+ = withObject "Binding"
1136+ (\ o ->
1137+ Binding <$>
1138+ (o .:? "members" .!= mempty) <*> (o .:? "role"))
1139+
1140+instance ToJSON Binding where
1141+ toJSON Binding{..}
1142+ = object
1143+ (catMaybes
1144+ [("members" .=) <$> _bMembers,
1145+ ("role" .=) <$> _bRole])
gogol-kgsearch/gen/Network/Google/KnowledgeGraphSearch/Types/Sum.hsnew file+19
@@ -0,0 +1,19 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE LambdaCase #-}
4+{-# LANGUAGE NoImplicitPrelude #-}
5+{-# LANGUAGE OverloadedStrings #-}
6+
7+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
8+
9+-- |
10+-- Module : Network.Google.KnowledgeGraphSearch.Types.Sum
11+-- Copyright : (c) 2015 Brendan Hay
12+-- License : Mozilla Public License, v. 2.0.
13+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
14+-- Stability : auto-generated
15+-- Portability : non-portable (GHC extensions)
16+--
17+module Network.Google.KnowledgeGraphSearch.Types.Sum where
18+
19+import Network.Google.Prelude
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/Create.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.IAM.Projects.ServiceAccounts.Create
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Creates a service account and returns it.
24+--
25+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.create@.
26+module Network.Google.Resource.IAM.Projects.ServiceAccounts.Create
27+ (
28+ -- * REST Resource
29+ ProjectsServiceAccountsCreateResource
30+
31+ -- * Creating a Request
32+ , projectsServiceAccountsCreate
33+ , ProjectsServiceAccountsCreate
34+
35+ -- * Request Lenses
36+ , psacXgafv
37+ , psacUploadProtocol
38+ , psacPp
39+ , psacAccessToken
40+ , psacUploadType
41+ , psacPayload
42+ , psacBearerToken
43+ , psacName
44+ , psacCallback
45+ ) where
46+
47+import Network.Google.KnowledgeGraphSearch.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @iam.projects.serviceAccounts.create@ method which the
51+-- 'ProjectsServiceAccountsCreate' request conforms to.
52+type ProjectsServiceAccountsCreateResource =
53+ "v1" :>
54+ Capture "name" Text :>
55+ "serviceAccounts" :>
56+ QueryParam "$.xgafv" Text :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :>
64+ ReqBody '[JSON] CreateServiceAccountRequest :>
65+ Post '[JSON] ServiceAccount
66+
67+-- | Creates a service account and returns it.
68+--
69+-- /See:/ 'projectsServiceAccountsCreate' smart constructor.
70+data ProjectsServiceAccountsCreate = ProjectsServiceAccountsCreate
71+ { _psacXgafv :: !(Maybe Text)
72+ , _psacUploadProtocol :: !(Maybe Text)
73+ , _psacPp :: !Bool
74+ , _psacAccessToken :: !(Maybe Text)
75+ , _psacUploadType :: !(Maybe Text)
76+ , _psacPayload :: !CreateServiceAccountRequest
77+ , _psacBearerToken :: !(Maybe Text)
78+ , _psacName :: !Text
79+ , _psacCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ProjectsServiceAccountsCreate' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'psacXgafv'
87+--
88+-- * 'psacUploadProtocol'
89+--
90+-- * 'psacPp'
91+--
92+-- * 'psacAccessToken'
93+--
94+-- * 'psacUploadType'
95+--
96+-- * 'psacPayload'
97+--
98+-- * 'psacBearerToken'
99+--
100+-- * 'psacName'
101+--
102+-- * 'psacCallback'
103+projectsServiceAccountsCreate
104+ :: CreateServiceAccountRequest -- ^ 'psacPayload'
105+ -> Text -- ^ 'psacName'
106+ -> ProjectsServiceAccountsCreate
107+projectsServiceAccountsCreate pPsacPayload_ pPsacName_ =
108+ ProjectsServiceAccountsCreate
109+ { _psacXgafv = Nothing
110+ , _psacUploadProtocol = Nothing
111+ , _psacPp = True
112+ , _psacAccessToken = Nothing
113+ , _psacUploadType = Nothing
114+ , _psacPayload = pPsacPayload_
115+ , _psacBearerToken = Nothing
116+ , _psacName = pPsacName_
117+ , _psacCallback = Nothing
118+ }
119+
120+-- | V1 error format.
121+psacXgafv :: Lens' ProjectsServiceAccountsCreate (Maybe Text)
122+psacXgafv
123+ = lens _psacXgafv (\ s a -> s{_psacXgafv = a})
124+
125+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
126+psacUploadProtocol :: Lens' ProjectsServiceAccountsCreate (Maybe Text)
127+psacUploadProtocol
128+ = lens _psacUploadProtocol
129+ (\ s a -> s{_psacUploadProtocol = a})
130+
131+-- | Pretty-print response.
132+psacPp :: Lens' ProjectsServiceAccountsCreate Bool
133+psacPp = lens _psacPp (\ s a -> s{_psacPp = a})
134+
135+-- | OAuth access token.
136+psacAccessToken :: Lens' ProjectsServiceAccountsCreate (Maybe Text)
137+psacAccessToken
138+ = lens _psacAccessToken
139+ (\ s a -> s{_psacAccessToken = a})
140+
141+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
142+psacUploadType :: Lens' ProjectsServiceAccountsCreate (Maybe Text)
143+psacUploadType
144+ = lens _psacUploadType
145+ (\ s a -> s{_psacUploadType = a})
146+
147+-- | Multipart request metadata.
148+psacPayload :: Lens' ProjectsServiceAccountsCreate CreateServiceAccountRequest
149+psacPayload
150+ = lens _psacPayload (\ s a -> s{_psacPayload = a})
151+
152+-- | OAuth bearer token.
153+psacBearerToken :: Lens' ProjectsServiceAccountsCreate (Maybe Text)
154+psacBearerToken
155+ = lens _psacBearerToken
156+ (\ s a -> s{_psacBearerToken = a})
157+
158+-- | Required. The resource name of the project associated with the service
159+-- accounts, such as \"projects\/123\"
160+psacName :: Lens' ProjectsServiceAccountsCreate Text
161+psacName = lens _psacName (\ s a -> s{_psacName = a})
162+
163+-- | JSONP
164+psacCallback :: Lens' ProjectsServiceAccountsCreate (Maybe Text)
165+psacCallback
166+ = lens _psacCallback (\ s a -> s{_psacCallback = a})
167+
168+instance GoogleRequest ProjectsServiceAccountsCreate
169+ where
170+ type Rs ProjectsServiceAccountsCreate =
171+ ServiceAccount
172+ requestClient ProjectsServiceAccountsCreate{..}
173+ = go _psacName _psacXgafv _psacUploadProtocol
174+ (Just _psacPp)
175+ _psacAccessToken
176+ _psacUploadType
177+ _psacBearerToken
178+ _psacCallback
179+ (Just AltJSON)
180+ _psacPayload
181+ knowledgeGraphSearchService
182+ where go
183+ = buildClient
184+ (Proxy ::
185+ Proxy ProjectsServiceAccountsCreateResource)
186+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/Delete.hsnew file+173
@@ -0,0 +1,173 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.IAM.Projects.ServiceAccounts.Delete
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Deletes a service acount.
24+--
25+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.delete@.
26+module Network.Google.Resource.IAM.Projects.ServiceAccounts.Delete
27+ (
28+ -- * REST Resource
29+ ProjectsServiceAccountsDeleteResource
30+
31+ -- * Creating a Request
32+ , projectsServiceAccountsDelete
33+ , ProjectsServiceAccountsDelete
34+
35+ -- * Request Lenses
36+ , psadXgafv
37+ , psadUploadProtocol
38+ , psadPp
39+ , psadAccessToken
40+ , psadUploadType
41+ , psadBearerToken
42+ , psadName
43+ , psadCallback
44+ ) where
45+
46+import Network.Google.KnowledgeGraphSearch.Types
47+import Network.Google.Prelude
48+
49+-- | A resource alias for @iam.projects.serviceAccounts.delete@ method which the
50+-- 'ProjectsServiceAccountsDelete' request conforms to.
51+type ProjectsServiceAccountsDeleteResource =
52+ "v1" :>
53+ Capture "name" Text :>
54+ QueryParam "$.xgafv" Text :>
55+ QueryParam "upload_protocol" Text :>
56+ QueryParam "pp" Bool :>
57+ QueryParam "access_token" Text :>
58+ QueryParam "uploadType" Text :>
59+ QueryParam "bearer_token" Text :>
60+ QueryParam "callback" Text :>
61+ QueryParam "alt" AltJSON :> Delete '[JSON] Empty
62+
63+-- | Deletes a service acount.
64+--
65+-- /See:/ 'projectsServiceAccountsDelete' smart constructor.
66+data ProjectsServiceAccountsDelete = ProjectsServiceAccountsDelete
67+ { _psadXgafv :: !(Maybe Text)
68+ , _psadUploadProtocol :: !(Maybe Text)
69+ , _psadPp :: !Bool
70+ , _psadAccessToken :: !(Maybe Text)
71+ , _psadUploadType :: !(Maybe Text)
72+ , _psadBearerToken :: !(Maybe Text)
73+ , _psadName :: !Text
74+ , _psadCallback :: !(Maybe Text)
75+ } deriving (Eq,Show,Data,Typeable,Generic)
76+
77+-- | Creates a value of 'ProjectsServiceAccountsDelete' with the minimum fields required to make a request.
78+--
79+-- Use one of the following lenses to modify other fields as desired:
80+--
81+-- * 'psadXgafv'
82+--
83+-- * 'psadUploadProtocol'
84+--
85+-- * 'psadPp'
86+--
87+-- * 'psadAccessToken'
88+--
89+-- * 'psadUploadType'
90+--
91+-- * 'psadBearerToken'
92+--
93+-- * 'psadName'
94+--
95+-- * 'psadCallback'
96+projectsServiceAccountsDelete
97+ :: Text -- ^ 'psadName'
98+ -> ProjectsServiceAccountsDelete
99+projectsServiceAccountsDelete pPsadName_ =
100+ ProjectsServiceAccountsDelete
101+ { _psadXgafv = Nothing
102+ , _psadUploadProtocol = Nothing
103+ , _psadPp = True
104+ , _psadAccessToken = Nothing
105+ , _psadUploadType = Nothing
106+ , _psadBearerToken = Nothing
107+ , _psadName = pPsadName_
108+ , _psadCallback = Nothing
109+ }
110+
111+-- | V1 error format.
112+psadXgafv :: Lens' ProjectsServiceAccountsDelete (Maybe Text)
113+psadXgafv
114+ = lens _psadXgafv (\ s a -> s{_psadXgafv = a})
115+
116+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
117+psadUploadProtocol :: Lens' ProjectsServiceAccountsDelete (Maybe Text)
118+psadUploadProtocol
119+ = lens _psadUploadProtocol
120+ (\ s a -> s{_psadUploadProtocol = a})
121+
122+-- | Pretty-print response.
123+psadPp :: Lens' ProjectsServiceAccountsDelete Bool
124+psadPp = lens _psadPp (\ s a -> s{_psadPp = a})
125+
126+-- | OAuth access token.
127+psadAccessToken :: Lens' ProjectsServiceAccountsDelete (Maybe Text)
128+psadAccessToken
129+ = lens _psadAccessToken
130+ (\ s a -> s{_psadAccessToken = a})
131+
132+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
133+psadUploadType :: Lens' ProjectsServiceAccountsDelete (Maybe Text)
134+psadUploadType
135+ = lens _psadUploadType
136+ (\ s a -> s{_psadUploadType = a})
137+
138+-- | OAuth bearer token.
139+psadBearerToken :: Lens' ProjectsServiceAccountsDelete (Maybe Text)
140+psadBearerToken
141+ = lens _psadBearerToken
142+ (\ s a -> s{_psadBearerToken = a})
143+
144+-- | The resource name of the service account in the format
145+-- \"projects\/{project}\/serviceAccounts\/{account}\". Using \'-\' as a
146+-- wildcard for the project, will infer the project from the account. The
147+-- account value can be the email address or the unique_id of the service
148+-- account.
149+psadName :: Lens' ProjectsServiceAccountsDelete Text
150+psadName = lens _psadName (\ s a -> s{_psadName = a})
151+
152+-- | JSONP
153+psadCallback :: Lens' ProjectsServiceAccountsDelete (Maybe Text)
154+psadCallback
155+ = lens _psadCallback (\ s a -> s{_psadCallback = a})
156+
157+instance GoogleRequest ProjectsServiceAccountsDelete
158+ where
159+ type Rs ProjectsServiceAccountsDelete = Empty
160+ requestClient ProjectsServiceAccountsDelete{..}
161+ = go _psadName _psadXgafv _psadUploadProtocol
162+ (Just _psadPp)
163+ _psadAccessToken
164+ _psadUploadType
165+ _psadBearerToken
166+ _psadCallback
167+ (Just AltJSON)
168+ knowledgeGraphSearchService
169+ where go
170+ = buildClient
171+ (Proxy ::
172+ Proxy ProjectsServiceAccountsDeleteResource)
173+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/Get.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.IAM.Projects.ServiceAccounts.Get
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Gets a ServiceAccount
24+--
25+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.get@.
26+module Network.Google.Resource.IAM.Projects.ServiceAccounts.Get
27+ (
28+ -- * REST Resource
29+ ProjectsServiceAccountsGetResource
30+
31+ -- * Creating a Request
32+ , projectsServiceAccountsGet
33+ , ProjectsServiceAccountsGet
34+
35+ -- * Request Lenses
36+ , psagXgafv
37+ , psagUploadProtocol
38+ , psagPp
39+ , psagAccessToken
40+ , psagUploadType
41+ , psagBearerToken
42+ , psagName
43+ , psagCallback
44+ ) where
45+
46+import Network.Google.KnowledgeGraphSearch.Types
47+import Network.Google.Prelude
48+
49+-- | A resource alias for @iam.projects.serviceAccounts.get@ method which the
50+-- 'ProjectsServiceAccountsGet' request conforms to.
51+type ProjectsServiceAccountsGetResource =
52+ "v1" :>
53+ Capture "name" Text :>
54+ QueryParam "$.xgafv" Text :>
55+ QueryParam "upload_protocol" Text :>
56+ QueryParam "pp" Bool :>
57+ QueryParam "access_token" Text :>
58+ QueryParam "uploadType" Text :>
59+ QueryParam "bearer_token" Text :>
60+ QueryParam "callback" Text :>
61+ QueryParam "alt" AltJSON :>
62+ Get '[JSON] ServiceAccount
63+
64+-- | Gets a ServiceAccount
65+--
66+-- /See:/ 'projectsServiceAccountsGet' smart constructor.
67+data ProjectsServiceAccountsGet = ProjectsServiceAccountsGet
68+ { _psagXgafv :: !(Maybe Text)
69+ , _psagUploadProtocol :: !(Maybe Text)
70+ , _psagPp :: !Bool
71+ , _psagAccessToken :: !(Maybe Text)
72+ , _psagUploadType :: !(Maybe Text)
73+ , _psagBearerToken :: !(Maybe Text)
74+ , _psagName :: !Text
75+ , _psagCallback :: !(Maybe Text)
76+ } deriving (Eq,Show,Data,Typeable,Generic)
77+
78+-- | Creates a value of 'ProjectsServiceAccountsGet' with the minimum fields required to make a request.
79+--
80+-- Use one of the following lenses to modify other fields as desired:
81+--
82+-- * 'psagXgafv'
83+--
84+-- * 'psagUploadProtocol'
85+--
86+-- * 'psagPp'
87+--
88+-- * 'psagAccessToken'
89+--
90+-- * 'psagUploadType'
91+--
92+-- * 'psagBearerToken'
93+--
94+-- * 'psagName'
95+--
96+-- * 'psagCallback'
97+projectsServiceAccountsGet
98+ :: Text -- ^ 'psagName'
99+ -> ProjectsServiceAccountsGet
100+projectsServiceAccountsGet pPsagName_ =
101+ ProjectsServiceAccountsGet
102+ { _psagXgafv = Nothing
103+ , _psagUploadProtocol = Nothing
104+ , _psagPp = True
105+ , _psagAccessToken = Nothing
106+ , _psagUploadType = Nothing
107+ , _psagBearerToken = Nothing
108+ , _psagName = pPsagName_
109+ , _psagCallback = Nothing
110+ }
111+
112+-- | V1 error format.
113+psagXgafv :: Lens' ProjectsServiceAccountsGet (Maybe Text)
114+psagXgafv
115+ = lens _psagXgafv (\ s a -> s{_psagXgafv = a})
116+
117+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
118+psagUploadProtocol :: Lens' ProjectsServiceAccountsGet (Maybe Text)
119+psagUploadProtocol
120+ = lens _psagUploadProtocol
121+ (\ s a -> s{_psagUploadProtocol = a})
122+
123+-- | Pretty-print response.
124+psagPp :: Lens' ProjectsServiceAccountsGet Bool
125+psagPp = lens _psagPp (\ s a -> s{_psagPp = a})
126+
127+-- | OAuth access token.
128+psagAccessToken :: Lens' ProjectsServiceAccountsGet (Maybe Text)
129+psagAccessToken
130+ = lens _psagAccessToken
131+ (\ s a -> s{_psagAccessToken = a})
132+
133+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
134+psagUploadType :: Lens' ProjectsServiceAccountsGet (Maybe Text)
135+psagUploadType
136+ = lens _psagUploadType
137+ (\ s a -> s{_psagUploadType = a})
138+
139+-- | OAuth bearer token.
140+psagBearerToken :: Lens' ProjectsServiceAccountsGet (Maybe Text)
141+psagBearerToken
142+ = lens _psagBearerToken
143+ (\ s a -> s{_psagBearerToken = a})
144+
145+-- | The resource name of the service account in the format
146+-- \"projects\/{project}\/serviceAccounts\/{account}\". Using \'-\' as a
147+-- wildcard for the project, will infer the project from the account. The
148+-- account value can be the email address or the unique_id of the service
149+-- account.
150+psagName :: Lens' ProjectsServiceAccountsGet Text
151+psagName = lens _psagName (\ s a -> s{_psagName = a})
152+
153+-- | JSONP
154+psagCallback :: Lens' ProjectsServiceAccountsGet (Maybe Text)
155+psagCallback
156+ = lens _psagCallback (\ s a -> s{_psagCallback = a})
157+
158+instance GoogleRequest ProjectsServiceAccountsGet
159+ where
160+ type Rs ProjectsServiceAccountsGet = ServiceAccount
161+ requestClient ProjectsServiceAccountsGet{..}
162+ = go _psagName _psagXgafv _psagUploadProtocol
163+ (Just _psagPp)
164+ _psagAccessToken
165+ _psagUploadType
166+ _psagBearerToken
167+ _psagCallback
168+ (Just AltJSON)
169+ knowledgeGraphSearchService
170+ where go
171+ = buildClient
172+ (Proxy :: Proxy ProjectsServiceAccountsGetResource)
173+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/GetIAMPolicy.hsnew file+177
@@ -0,0 +1,177 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.IAM.Projects.ServiceAccounts.GetIAMPolicy
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Returns the IAM access control policy for specified IAM resource.
24+--
25+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.getIamPolicy@.
26+module Network.Google.Resource.IAM.Projects.ServiceAccounts.GetIAMPolicy
27+ (
28+ -- * REST Resource
29+ ProjectsServiceAccountsGetIAMPolicyResource
30+
31+ -- * Creating a Request
32+ , projectsServiceAccountsGetIAMPolicy
33+ , ProjectsServiceAccountsGetIAMPolicy
34+
35+ -- * Request Lenses
36+ , psagipXgafv
37+ , psagipUploadProtocol
38+ , psagipPp
39+ , psagipAccessToken
40+ , psagipUploadType
41+ , psagipBearerToken
42+ , psagipResource
43+ , psagipCallback
44+ ) where
45+
46+import Network.Google.KnowledgeGraphSearch.Types
47+import Network.Google.Prelude
48+
49+-- | A resource alias for @iam.projects.serviceAccounts.getIamPolicy@ method which the
50+-- 'ProjectsServiceAccountsGetIAMPolicy' request conforms to.
51+type ProjectsServiceAccountsGetIAMPolicyResource =
52+ "v1" :>
53+ CaptureMode "resource" "getIamPolicy" Text :>
54+ QueryParam "$.xgafv" Text :>
55+ QueryParam "upload_protocol" Text :>
56+ QueryParam "pp" Bool :>
57+ QueryParam "access_token" Text :>
58+ QueryParam "uploadType" Text :>
59+ QueryParam "bearer_token" Text :>
60+ QueryParam "callback" Text :>
61+ QueryParam "alt" AltJSON :> Post '[JSON] Policy
62+
63+-- | Returns the IAM access control policy for specified IAM resource.
64+--
65+-- /See:/ 'projectsServiceAccountsGetIAMPolicy' smart constructor.
66+data ProjectsServiceAccountsGetIAMPolicy = ProjectsServiceAccountsGetIAMPolicy
67+ { _psagipXgafv :: !(Maybe Text)
68+ , _psagipUploadProtocol :: !(Maybe Text)
69+ , _psagipPp :: !Bool
70+ , _psagipAccessToken :: !(Maybe Text)
71+ , _psagipUploadType :: !(Maybe Text)
72+ , _psagipBearerToken :: !(Maybe Text)
73+ , _psagipResource :: !Text
74+ , _psagipCallback :: !(Maybe Text)
75+ } deriving (Eq,Show,Data,Typeable,Generic)
76+
77+-- | Creates a value of 'ProjectsServiceAccountsGetIAMPolicy' with the minimum fields required to make a request.
78+--
79+-- Use one of the following lenses to modify other fields as desired:
80+--
81+-- * 'psagipXgafv'
82+--
83+-- * 'psagipUploadProtocol'
84+--
85+-- * 'psagipPp'
86+--
87+-- * 'psagipAccessToken'
88+--
89+-- * 'psagipUploadType'
90+--
91+-- * 'psagipBearerToken'
92+--
93+-- * 'psagipResource'
94+--
95+-- * 'psagipCallback'
96+projectsServiceAccountsGetIAMPolicy
97+ :: Text -- ^ 'psagipResource'
98+ -> ProjectsServiceAccountsGetIAMPolicy
99+projectsServiceAccountsGetIAMPolicy pPsagipResource_ =
100+ ProjectsServiceAccountsGetIAMPolicy
101+ { _psagipXgafv = Nothing
102+ , _psagipUploadProtocol = Nothing
103+ , _psagipPp = True
104+ , _psagipAccessToken = Nothing
105+ , _psagipUploadType = Nothing
106+ , _psagipBearerToken = Nothing
107+ , _psagipResource = pPsagipResource_
108+ , _psagipCallback = Nothing
109+ }
110+
111+-- | V1 error format.
112+psagipXgafv :: Lens' ProjectsServiceAccountsGetIAMPolicy (Maybe Text)
113+psagipXgafv
114+ = lens _psagipXgafv (\ s a -> s{_psagipXgafv = a})
115+
116+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
117+psagipUploadProtocol :: Lens' ProjectsServiceAccountsGetIAMPolicy (Maybe Text)
118+psagipUploadProtocol
119+ = lens _psagipUploadProtocol
120+ (\ s a -> s{_psagipUploadProtocol = a})
121+
122+-- | Pretty-print response.
123+psagipPp :: Lens' ProjectsServiceAccountsGetIAMPolicy Bool
124+psagipPp = lens _psagipPp (\ s a -> s{_psagipPp = a})
125+
126+-- | OAuth access token.
127+psagipAccessToken :: Lens' ProjectsServiceAccountsGetIAMPolicy (Maybe Text)
128+psagipAccessToken
129+ = lens _psagipAccessToken
130+ (\ s a -> s{_psagipAccessToken = a})
131+
132+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
133+psagipUploadType :: Lens' ProjectsServiceAccountsGetIAMPolicy (Maybe Text)
134+psagipUploadType
135+ = lens _psagipUploadType
136+ (\ s a -> s{_psagipUploadType = a})
137+
138+-- | OAuth bearer token.
139+psagipBearerToken :: Lens' ProjectsServiceAccountsGetIAMPolicy (Maybe Text)
140+psagipBearerToken
141+ = lens _psagipBearerToken
142+ (\ s a -> s{_psagipBearerToken = a})
143+
144+-- | REQUIRED: The resource for which the policy is being requested.
145+-- \`resource\` is usually specified as a path, such as
146+-- \`projects\/*project*\/zones\/*zone*\/disks\/*disk*\`. The format for
147+-- the path specified in this value is resource specific and is specified
148+-- in the \`getIamPolicy\` documentation.
149+psagipResource :: Lens' ProjectsServiceAccountsGetIAMPolicy Text
150+psagipResource
151+ = lens _psagipResource
152+ (\ s a -> s{_psagipResource = a})
153+
154+-- | JSONP
155+psagipCallback :: Lens' ProjectsServiceAccountsGetIAMPolicy (Maybe Text)
156+psagipCallback
157+ = lens _psagipCallback
158+ (\ s a -> s{_psagipCallback = a})
159+
160+instance GoogleRequest
161+ ProjectsServiceAccountsGetIAMPolicy where
162+ type Rs ProjectsServiceAccountsGetIAMPolicy = Policy
163+ requestClient ProjectsServiceAccountsGetIAMPolicy{..}
164+ = go _psagipResource _psagipXgafv
165+ _psagipUploadProtocol
166+ (Just _psagipPp)
167+ _psagipAccessToken
168+ _psagipUploadType
169+ _psagipBearerToken
170+ _psagipCallback
171+ (Just AltJSON)
172+ knowledgeGraphSearchService
173+ where go
174+ = buildClient
175+ (Proxy ::
176+ Proxy ProjectsServiceAccountsGetIAMPolicyResource)
177+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/Keys/Create.hsnew file+191
@@ -0,0 +1,191 @@
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.IAM.Projects.ServiceAccounts.Keys.Create
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Creates a service account key and returns it.
24+--
25+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.keys.create@.
26+module Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Create
27+ (
28+ -- * REST Resource
29+ ProjectsServiceAccountsKeysCreateResource
30+
31+ -- * Creating a Request
32+ , projectsServiceAccountsKeysCreate
33+ , ProjectsServiceAccountsKeysCreate
34+
35+ -- * Request Lenses
36+ , psakcXgafv
37+ , psakcUploadProtocol
38+ , psakcPp
39+ , psakcAccessToken
40+ , psakcUploadType
41+ , psakcPayload
42+ , psakcBearerToken
43+ , psakcName
44+ , psakcCallback
45+ ) where
46+
47+import Network.Google.KnowledgeGraphSearch.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @iam.projects.serviceAccounts.keys.create@ method which the
51+-- 'ProjectsServiceAccountsKeysCreate' request conforms to.
52+type ProjectsServiceAccountsKeysCreateResource =
53+ "v1" :>
54+ Capture "name" Text :>
55+ "keys" :>
56+ QueryParam "$.xgafv" Text :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :>
64+ ReqBody '[JSON] CreateServiceAccountKeyRequest :>
65+ Post '[JSON] ServiceAccountKey
66+
67+-- | Creates a service account key and returns it.
68+--
69+-- /See:/ 'projectsServiceAccountsKeysCreate' smart constructor.
70+data ProjectsServiceAccountsKeysCreate = ProjectsServiceAccountsKeysCreate
71+ { _psakcXgafv :: !(Maybe Text)
72+ , _psakcUploadProtocol :: !(Maybe Text)
73+ , _psakcPp :: !Bool
74+ , _psakcAccessToken :: !(Maybe Text)
75+ , _psakcUploadType :: !(Maybe Text)
76+ , _psakcPayload :: !CreateServiceAccountKeyRequest
77+ , _psakcBearerToken :: !(Maybe Text)
78+ , _psakcName :: !Text
79+ , _psakcCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ProjectsServiceAccountsKeysCreate' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'psakcXgafv'
87+--
88+-- * 'psakcUploadProtocol'
89+--
90+-- * 'psakcPp'
91+--
92+-- * 'psakcAccessToken'
93+--
94+-- * 'psakcUploadType'
95+--
96+-- * 'psakcPayload'
97+--
98+-- * 'psakcBearerToken'
99+--
100+-- * 'psakcName'
101+--
102+-- * 'psakcCallback'
103+projectsServiceAccountsKeysCreate
104+ :: CreateServiceAccountKeyRequest -- ^ 'psakcPayload'
105+ -> Text -- ^ 'psakcName'
106+ -> ProjectsServiceAccountsKeysCreate
107+projectsServiceAccountsKeysCreate pPsakcPayload_ pPsakcName_ =
108+ ProjectsServiceAccountsKeysCreate
109+ { _psakcXgafv = Nothing
110+ , _psakcUploadProtocol = Nothing
111+ , _psakcPp = True
112+ , _psakcAccessToken = Nothing
113+ , _psakcUploadType = Nothing
114+ , _psakcPayload = pPsakcPayload_
115+ , _psakcBearerToken = Nothing
116+ , _psakcName = pPsakcName_
117+ , _psakcCallback = Nothing
118+ }
119+
120+-- | V1 error format.
121+psakcXgafv :: Lens' ProjectsServiceAccountsKeysCreate (Maybe Text)
122+psakcXgafv
123+ = lens _psakcXgafv (\ s a -> s{_psakcXgafv = a})
124+
125+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
126+psakcUploadProtocol :: Lens' ProjectsServiceAccountsKeysCreate (Maybe Text)
127+psakcUploadProtocol
128+ = lens _psakcUploadProtocol
129+ (\ s a -> s{_psakcUploadProtocol = a})
130+
131+-- | Pretty-print response.
132+psakcPp :: Lens' ProjectsServiceAccountsKeysCreate Bool
133+psakcPp = lens _psakcPp (\ s a -> s{_psakcPp = a})
134+
135+-- | OAuth access token.
136+psakcAccessToken :: Lens' ProjectsServiceAccountsKeysCreate (Maybe Text)
137+psakcAccessToken
138+ = lens _psakcAccessToken
139+ (\ s a -> s{_psakcAccessToken = a})
140+
141+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
142+psakcUploadType :: Lens' ProjectsServiceAccountsKeysCreate (Maybe Text)
143+psakcUploadType
144+ = lens _psakcUploadType
145+ (\ s a -> s{_psakcUploadType = a})
146+
147+-- | Multipart request metadata.
148+psakcPayload :: Lens' ProjectsServiceAccountsKeysCreate CreateServiceAccountKeyRequest
149+psakcPayload
150+ = lens _psakcPayload (\ s a -> s{_psakcPayload = a})
151+
152+-- | OAuth bearer token.
153+psakcBearerToken :: Lens' ProjectsServiceAccountsKeysCreate (Maybe Text)
154+psakcBearerToken
155+ = lens _psakcBearerToken
156+ (\ s a -> s{_psakcBearerToken = a})
157+
158+-- | The resource name of the service account in the format
159+-- \"projects\/{project}\/serviceAccounts\/{account}\". Using \'-\' as a
160+-- wildcard for the project, will infer the project from the account. The
161+-- account value can be the email address or the unique_id of the service
162+-- account.
163+psakcName :: Lens' ProjectsServiceAccountsKeysCreate Text
164+psakcName
165+ = lens _psakcName (\ s a -> s{_psakcName = a})
166+
167+-- | JSONP
168+psakcCallback :: Lens' ProjectsServiceAccountsKeysCreate (Maybe Text)
169+psakcCallback
170+ = lens _psakcCallback
171+ (\ s a -> s{_psakcCallback = a})
172+
173+instance GoogleRequest
174+ ProjectsServiceAccountsKeysCreate where
175+ type Rs ProjectsServiceAccountsKeysCreate =
176+ ServiceAccountKey
177+ requestClient ProjectsServiceAccountsKeysCreate{..}
178+ = go _psakcName _psakcXgafv _psakcUploadProtocol
179+ (Just _psakcPp)
180+ _psakcAccessToken
181+ _psakcUploadType
182+ _psakcBearerToken
183+ _psakcCallback
184+ (Just AltJSON)
185+ _psakcPayload
186+ knowledgeGraphSearchService
187+ where go
188+ = buildClient
189+ (Proxy ::
190+ Proxy ProjectsServiceAccountsKeysCreateResource)
191+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/Keys/Delete.hsnew file+175
@@ -0,0 +1,175 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Delete
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Deletes a service account key.
24+--
25+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.keys.delete@.
26+module Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Delete
27+ (
28+ -- * REST Resource
29+ ProjectsServiceAccountsKeysDeleteResource
30+
31+ -- * Creating a Request
32+ , projectsServiceAccountsKeysDelete
33+ , ProjectsServiceAccountsKeysDelete
34+
35+ -- * Request Lenses
36+ , psakdXgafv
37+ , psakdUploadProtocol
38+ , psakdPp
39+ , psakdAccessToken
40+ , psakdUploadType
41+ , psakdBearerToken
42+ , psakdName
43+ , psakdCallback
44+ ) where
45+
46+import Network.Google.KnowledgeGraphSearch.Types
47+import Network.Google.Prelude
48+
49+-- | A resource alias for @iam.projects.serviceAccounts.keys.delete@ method which the
50+-- 'ProjectsServiceAccountsKeysDelete' request conforms to.
51+type ProjectsServiceAccountsKeysDeleteResource =
52+ "v1" :>
53+ Capture "name" Text :>
54+ QueryParam "$.xgafv" Text :>
55+ QueryParam "upload_protocol" Text :>
56+ QueryParam "pp" Bool :>
57+ QueryParam "access_token" Text :>
58+ QueryParam "uploadType" Text :>
59+ QueryParam "bearer_token" Text :>
60+ QueryParam "callback" Text :>
61+ QueryParam "alt" AltJSON :> Delete '[JSON] Empty
62+
63+-- | Deletes a service account key.
64+--
65+-- /See:/ 'projectsServiceAccountsKeysDelete' smart constructor.
66+data ProjectsServiceAccountsKeysDelete = ProjectsServiceAccountsKeysDelete
67+ { _psakdXgafv :: !(Maybe Text)
68+ , _psakdUploadProtocol :: !(Maybe Text)
69+ , _psakdPp :: !Bool
70+ , _psakdAccessToken :: !(Maybe Text)
71+ , _psakdUploadType :: !(Maybe Text)
72+ , _psakdBearerToken :: !(Maybe Text)
73+ , _psakdName :: !Text
74+ , _psakdCallback :: !(Maybe Text)
75+ } deriving (Eq,Show,Data,Typeable,Generic)
76+
77+-- | Creates a value of 'ProjectsServiceAccountsKeysDelete' with the minimum fields required to make a request.
78+--
79+-- Use one of the following lenses to modify other fields as desired:
80+--
81+-- * 'psakdXgafv'
82+--
83+-- * 'psakdUploadProtocol'
84+--
85+-- * 'psakdPp'
86+--
87+-- * 'psakdAccessToken'
88+--
89+-- * 'psakdUploadType'
90+--
91+-- * 'psakdBearerToken'
92+--
93+-- * 'psakdName'
94+--
95+-- * 'psakdCallback'
96+projectsServiceAccountsKeysDelete
97+ :: Text -- ^ 'psakdName'
98+ -> ProjectsServiceAccountsKeysDelete
99+projectsServiceAccountsKeysDelete pPsakdName_ =
100+ ProjectsServiceAccountsKeysDelete
101+ { _psakdXgafv = Nothing
102+ , _psakdUploadProtocol = Nothing
103+ , _psakdPp = True
104+ , _psakdAccessToken = Nothing
105+ , _psakdUploadType = Nothing
106+ , _psakdBearerToken = Nothing
107+ , _psakdName = pPsakdName_
108+ , _psakdCallback = Nothing
109+ }
110+
111+-- | V1 error format.
112+psakdXgafv :: Lens' ProjectsServiceAccountsKeysDelete (Maybe Text)
113+psakdXgafv
114+ = lens _psakdXgafv (\ s a -> s{_psakdXgafv = a})
115+
116+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
117+psakdUploadProtocol :: Lens' ProjectsServiceAccountsKeysDelete (Maybe Text)
118+psakdUploadProtocol
119+ = lens _psakdUploadProtocol
120+ (\ s a -> s{_psakdUploadProtocol = a})
121+
122+-- | Pretty-print response.
123+psakdPp :: Lens' ProjectsServiceAccountsKeysDelete Bool
124+psakdPp = lens _psakdPp (\ s a -> s{_psakdPp = a})
125+
126+-- | OAuth access token.
127+psakdAccessToken :: Lens' ProjectsServiceAccountsKeysDelete (Maybe Text)
128+psakdAccessToken
129+ = lens _psakdAccessToken
130+ (\ s a -> s{_psakdAccessToken = a})
131+
132+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
133+psakdUploadType :: Lens' ProjectsServiceAccountsKeysDelete (Maybe Text)
134+psakdUploadType
135+ = lens _psakdUploadType
136+ (\ s a -> s{_psakdUploadType = a})
137+
138+-- | OAuth bearer token.
139+psakdBearerToken :: Lens' ProjectsServiceAccountsKeysDelete (Maybe Text)
140+psakdBearerToken
141+ = lens _psakdBearerToken
142+ (\ s a -> s{_psakdBearerToken = a})
143+
144+-- | The resource name of the service account key in the format
145+-- \"projects\/{project}\/serviceAccounts\/{account}\/keys\/{key}\". Using
146+-- \'-\' as a wildcard for the project will infer the project from the
147+-- account. The account value can be the email address or the unique_id of
148+-- the service account.
149+psakdName :: Lens' ProjectsServiceAccountsKeysDelete Text
150+psakdName
151+ = lens _psakdName (\ s a -> s{_psakdName = a})
152+
153+-- | JSONP
154+psakdCallback :: Lens' ProjectsServiceAccountsKeysDelete (Maybe Text)
155+psakdCallback
156+ = lens _psakdCallback
157+ (\ s a -> s{_psakdCallback = a})
158+
159+instance GoogleRequest
160+ ProjectsServiceAccountsKeysDelete where
161+ type Rs ProjectsServiceAccountsKeysDelete = Empty
162+ requestClient ProjectsServiceAccountsKeysDelete{..}
163+ = go _psakdName _psakdXgafv _psakdUploadProtocol
164+ (Just _psakdPp)
165+ _psakdAccessToken
166+ _psakdUploadType
167+ _psakdBearerToken
168+ _psakdCallback
169+ (Just AltJSON)
170+ knowledgeGraphSearchService
171+ where go
172+ = buildClient
173+ (Proxy ::
174+ Proxy ProjectsServiceAccountsKeysDeleteResource)
175+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/Keys/Get.hsnew file+177
@@ -0,0 +1,177 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Get
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Gets the ServiceAccountKey by key id.
24+--
25+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.keys.get@.
26+module Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Get
27+ (
28+ -- * REST Resource
29+ ProjectsServiceAccountsKeysGetResource
30+
31+ -- * Creating a Request
32+ , projectsServiceAccountsKeysGet
33+ , ProjectsServiceAccountsKeysGet
34+
35+ -- * Request Lenses
36+ , psakgXgafv
37+ , psakgUploadProtocol
38+ , psakgPp
39+ , psakgAccessToken
40+ , psakgUploadType
41+ , psakgBearerToken
42+ , psakgName
43+ , psakgCallback
44+ ) where
45+
46+import Network.Google.KnowledgeGraphSearch.Types
47+import Network.Google.Prelude
48+
49+-- | A resource alias for @iam.projects.serviceAccounts.keys.get@ method which the
50+-- 'ProjectsServiceAccountsKeysGet' request conforms to.
51+type ProjectsServiceAccountsKeysGetResource =
52+ "v1" :>
53+ Capture "name" Text :>
54+ QueryParam "$.xgafv" Text :>
55+ QueryParam "upload_protocol" Text :>
56+ QueryParam "pp" Bool :>
57+ QueryParam "access_token" Text :>
58+ QueryParam "uploadType" Text :>
59+ QueryParam "bearer_token" Text :>
60+ QueryParam "callback" Text :>
61+ QueryParam "alt" AltJSON :>
62+ Get '[JSON] ServiceAccountKey
63+
64+-- | Gets the ServiceAccountKey by key id.
65+--
66+-- /See:/ 'projectsServiceAccountsKeysGet' smart constructor.
67+data ProjectsServiceAccountsKeysGet = ProjectsServiceAccountsKeysGet
68+ { _psakgXgafv :: !(Maybe Text)
69+ , _psakgUploadProtocol :: !(Maybe Text)
70+ , _psakgPp :: !Bool
71+ , _psakgAccessToken :: !(Maybe Text)
72+ , _psakgUploadType :: !(Maybe Text)
73+ , _psakgBearerToken :: !(Maybe Text)
74+ , _psakgName :: !Text
75+ , _psakgCallback :: !(Maybe Text)
76+ } deriving (Eq,Show,Data,Typeable,Generic)
77+
78+-- | Creates a value of 'ProjectsServiceAccountsKeysGet' with the minimum fields required to make a request.
79+--
80+-- Use one of the following lenses to modify other fields as desired:
81+--
82+-- * 'psakgXgafv'
83+--
84+-- * 'psakgUploadProtocol'
85+--
86+-- * 'psakgPp'
87+--
88+-- * 'psakgAccessToken'
89+--
90+-- * 'psakgUploadType'
91+--
92+-- * 'psakgBearerToken'
93+--
94+-- * 'psakgName'
95+--
96+-- * 'psakgCallback'
97+projectsServiceAccountsKeysGet
98+ :: Text -- ^ 'psakgName'
99+ -> ProjectsServiceAccountsKeysGet
100+projectsServiceAccountsKeysGet pPsakgName_ =
101+ ProjectsServiceAccountsKeysGet
102+ { _psakgXgafv = Nothing
103+ , _psakgUploadProtocol = Nothing
104+ , _psakgPp = True
105+ , _psakgAccessToken = Nothing
106+ , _psakgUploadType = Nothing
107+ , _psakgBearerToken = Nothing
108+ , _psakgName = pPsakgName_
109+ , _psakgCallback = Nothing
110+ }
111+
112+-- | V1 error format.
113+psakgXgafv :: Lens' ProjectsServiceAccountsKeysGet (Maybe Text)
114+psakgXgafv
115+ = lens _psakgXgafv (\ s a -> s{_psakgXgafv = a})
116+
117+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
118+psakgUploadProtocol :: Lens' ProjectsServiceAccountsKeysGet (Maybe Text)
119+psakgUploadProtocol
120+ = lens _psakgUploadProtocol
121+ (\ s a -> s{_psakgUploadProtocol = a})
122+
123+-- | Pretty-print response.
124+psakgPp :: Lens' ProjectsServiceAccountsKeysGet Bool
125+psakgPp = lens _psakgPp (\ s a -> s{_psakgPp = a})
126+
127+-- | OAuth access token.
128+psakgAccessToken :: Lens' ProjectsServiceAccountsKeysGet (Maybe Text)
129+psakgAccessToken
130+ = lens _psakgAccessToken
131+ (\ s a -> s{_psakgAccessToken = a})
132+
133+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
134+psakgUploadType :: Lens' ProjectsServiceAccountsKeysGet (Maybe Text)
135+psakgUploadType
136+ = lens _psakgUploadType
137+ (\ s a -> s{_psakgUploadType = a})
138+
139+-- | OAuth bearer token.
140+psakgBearerToken :: Lens' ProjectsServiceAccountsKeysGet (Maybe Text)
141+psakgBearerToken
142+ = lens _psakgBearerToken
143+ (\ s a -> s{_psakgBearerToken = a})
144+
145+-- | The resource name of the service account key in the format
146+-- \"projects\/{project}\/serviceAccounts\/{account}\/keys\/{key}\". Using
147+-- \'-\' as a wildcard for the project will infer the project from the
148+-- account. The account value can be the email address or the unique_id of
149+-- the service account.
150+psakgName :: Lens' ProjectsServiceAccountsKeysGet Text
151+psakgName
152+ = lens _psakgName (\ s a -> s{_psakgName = a})
153+
154+-- | JSONP
155+psakgCallback :: Lens' ProjectsServiceAccountsKeysGet (Maybe Text)
156+psakgCallback
157+ = lens _psakgCallback
158+ (\ s a -> s{_psakgCallback = a})
159+
160+instance GoogleRequest ProjectsServiceAccountsKeysGet
161+ where
162+ type Rs ProjectsServiceAccountsKeysGet =
163+ ServiceAccountKey
164+ requestClient ProjectsServiceAccountsKeysGet{..}
165+ = go _psakgName _psakgXgafv _psakgUploadProtocol
166+ (Just _psakgPp)
167+ _psakgAccessToken
168+ _psakgUploadType
169+ _psakgBearerToken
170+ _psakgCallback
171+ (Just AltJSON)
172+ knowledgeGraphSearchService
173+ where go
174+ = buildClient
175+ (Proxy ::
176+ Proxy ProjectsServiceAccountsKeysGetResource)
177+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/Keys/List.hsnew file+195
@@ -0,0 +1,195 @@
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.IAM.Projects.ServiceAccounts.Keys.List
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Lists service account keys
24+--
25+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.keys.list@.
26+module Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.List
27+ (
28+ -- * REST Resource
29+ ProjectsServiceAccountsKeysListResource
30+
31+ -- * Creating a Request
32+ , projectsServiceAccountsKeysList
33+ , ProjectsServiceAccountsKeysList
34+
35+ -- * Request Lenses
36+ , psaklKeyTypes
37+ , psaklXgafv
38+ , psaklUploadProtocol
39+ , psaklPp
40+ , psaklAccessToken
41+ , psaklUploadType
42+ , psaklBearerToken
43+ , psaklName
44+ , psaklCallback
45+ ) where
46+
47+import Network.Google.KnowledgeGraphSearch.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @iam.projects.serviceAccounts.keys.list@ method which the
51+-- 'ProjectsServiceAccountsKeysList' request conforms to.
52+type ProjectsServiceAccountsKeysListResource =
53+ "v1" :>
54+ Capture "name" Text :>
55+ "keys" :>
56+ QueryParams "keyTypes" Text :>
57+ QueryParam "$.xgafv" Text :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :>
65+ Get '[JSON] ListServiceAccountKeysResponse
66+
67+-- | Lists service account keys
68+--
69+-- /See:/ 'projectsServiceAccountsKeysList' smart constructor.
70+data ProjectsServiceAccountsKeysList = ProjectsServiceAccountsKeysList
71+ { _psaklKeyTypes :: !(Maybe [Text])
72+ , _psaklXgafv :: !(Maybe Text)
73+ , _psaklUploadProtocol :: !(Maybe Text)
74+ , _psaklPp :: !Bool
75+ , _psaklAccessToken :: !(Maybe Text)
76+ , _psaklUploadType :: !(Maybe Text)
77+ , _psaklBearerToken :: !(Maybe Text)
78+ , _psaklName :: !Text
79+ , _psaklCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'ProjectsServiceAccountsKeysList' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'psaklKeyTypes'
87+--
88+-- * 'psaklXgafv'
89+--
90+-- * 'psaklUploadProtocol'
91+--
92+-- * 'psaklPp'
93+--
94+-- * 'psaklAccessToken'
95+--
96+-- * 'psaklUploadType'
97+--
98+-- * 'psaklBearerToken'
99+--
100+-- * 'psaklName'
101+--
102+-- * 'psaklCallback'
103+projectsServiceAccountsKeysList
104+ :: Text -- ^ 'psaklName'
105+ -> ProjectsServiceAccountsKeysList
106+projectsServiceAccountsKeysList pPsaklName_ =
107+ ProjectsServiceAccountsKeysList
108+ { _psaklKeyTypes = Nothing
109+ , _psaklXgafv = Nothing
110+ , _psaklUploadProtocol = Nothing
111+ , _psaklPp = True
112+ , _psaklAccessToken = Nothing
113+ , _psaklUploadType = Nothing
114+ , _psaklBearerToken = Nothing
115+ , _psaklName = pPsaklName_
116+ , _psaklCallback = Nothing
117+ }
118+
119+-- | The type of keys the user wants to list. If empty, all key types are
120+-- included in the response. Duplicate key types are not allowed.
121+psaklKeyTypes :: Lens' ProjectsServiceAccountsKeysList [Text]
122+psaklKeyTypes
123+ = lens _psaklKeyTypes
124+ (\ s a -> s{_psaklKeyTypes = a})
125+ . _Default
126+ . _Coerce
127+
128+-- | V1 error format.
129+psaklXgafv :: Lens' ProjectsServiceAccountsKeysList (Maybe Text)
130+psaklXgafv
131+ = lens _psaklXgafv (\ s a -> s{_psaklXgafv = a})
132+
133+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
134+psaklUploadProtocol :: Lens' ProjectsServiceAccountsKeysList (Maybe Text)
135+psaklUploadProtocol
136+ = lens _psaklUploadProtocol
137+ (\ s a -> s{_psaklUploadProtocol = a})
138+
139+-- | Pretty-print response.
140+psaklPp :: Lens' ProjectsServiceAccountsKeysList Bool
141+psaklPp = lens _psaklPp (\ s a -> s{_psaklPp = a})
142+
143+-- | OAuth access token.
144+psaklAccessToken :: Lens' ProjectsServiceAccountsKeysList (Maybe Text)
145+psaklAccessToken
146+ = lens _psaklAccessToken
147+ (\ s a -> s{_psaklAccessToken = a})
148+
149+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
150+psaklUploadType :: Lens' ProjectsServiceAccountsKeysList (Maybe Text)
151+psaklUploadType
152+ = lens _psaklUploadType
153+ (\ s a -> s{_psaklUploadType = a})
154+
155+-- | OAuth bearer token.
156+psaklBearerToken :: Lens' ProjectsServiceAccountsKeysList (Maybe Text)
157+psaklBearerToken
158+ = lens _psaklBearerToken
159+ (\ s a -> s{_psaklBearerToken = a})
160+
161+-- | The resource name of the service account in the format
162+-- \"projects\/{project}\/serviceAccounts\/{account}\". Using \'-\' as a
163+-- wildcard for the project, will infer the project from the account. The
164+-- account value can be the email address or the unique_id of the service
165+-- account.
166+psaklName :: Lens' ProjectsServiceAccountsKeysList Text
167+psaklName
168+ = lens _psaklName (\ s a -> s{_psaklName = a})
169+
170+-- | JSONP
171+psaklCallback :: Lens' ProjectsServiceAccountsKeysList (Maybe Text)
172+psaklCallback
173+ = lens _psaklCallback
174+ (\ s a -> s{_psaklCallback = a})
175+
176+instance GoogleRequest
177+ ProjectsServiceAccountsKeysList where
178+ type Rs ProjectsServiceAccountsKeysList =
179+ ListServiceAccountKeysResponse
180+ requestClient ProjectsServiceAccountsKeysList{..}
181+ = go _psaklName (_psaklKeyTypes ^. _Default)
182+ _psaklXgafv
183+ _psaklUploadProtocol
184+ (Just _psaklPp)
185+ _psaklAccessToken
186+ _psaklUploadType
187+ _psaklBearerToken
188+ _psaklCallback
189+ (Just AltJSON)
190+ knowledgeGraphSearchService
191+ where go
192+ = buildClient
193+ (Proxy ::
194+ Proxy ProjectsServiceAccountsKeysListResource)
195+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/List.hsnew file+201
@@ -0,0 +1,201 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.IAM.Projects.ServiceAccounts.List
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Lists service accounts for a project.
24+--
25+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.list@.
26+module Network.Google.Resource.IAM.Projects.ServiceAccounts.List
27+ (
28+ -- * REST Resource
29+ ProjectsServiceAccountsListResource
30+
31+ -- * Creating a Request
32+ , projectsServiceAccountsList
33+ , ProjectsServiceAccountsList
34+
35+ -- * Request Lenses
36+ , psalXgafv
37+ , psalUploadProtocol
38+ , psalPp
39+ , psalAccessToken
40+ , psalUploadType
41+ , psalBearerToken
42+ , psalName
43+ , psalPageToken
44+ , psalPageSize
45+ , psalCallback
46+ ) where
47+
48+import Network.Google.KnowledgeGraphSearch.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @iam.projects.serviceAccounts.list@ method which the
52+-- 'ProjectsServiceAccountsList' request conforms to.
53+type ProjectsServiceAccountsListResource =
54+ "v1" :>
55+ Capture "name" Text :>
56+ "serviceAccounts" :>
57+ QueryParam "$.xgafv" Text :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "pageToken" Text :>
64+ QueryParam "pageSize" (Textual Int32) :>
65+ QueryParam "callback" Text :>
66+ QueryParam "alt" AltJSON :>
67+ Get '[JSON] ListServiceAccountsResponse
68+
69+-- | Lists service accounts for a project.
70+--
71+-- /See:/ 'projectsServiceAccountsList' smart constructor.
72+data ProjectsServiceAccountsList = ProjectsServiceAccountsList
73+ { _psalXgafv :: !(Maybe Text)
74+ , _psalUploadProtocol :: !(Maybe Text)
75+ , _psalPp :: !Bool
76+ , _psalAccessToken :: !(Maybe Text)
77+ , _psalUploadType :: !(Maybe Text)
78+ , _psalBearerToken :: !(Maybe Text)
79+ , _psalName :: !Text
80+ , _psalPageToken :: !(Maybe Text)
81+ , _psalPageSize :: !(Maybe (Textual Int32))
82+ , _psalCallback :: !(Maybe Text)
83+ } deriving (Eq,Show,Data,Typeable,Generic)
84+
85+-- | Creates a value of 'ProjectsServiceAccountsList' with the minimum fields required to make a request.
86+--
87+-- Use one of the following lenses to modify other fields as desired:
88+--
89+-- * 'psalXgafv'
90+--
91+-- * 'psalUploadProtocol'
92+--
93+-- * 'psalPp'
94+--
95+-- * 'psalAccessToken'
96+--
97+-- * 'psalUploadType'
98+--
99+-- * 'psalBearerToken'
100+--
101+-- * 'psalName'
102+--
103+-- * 'psalPageToken'
104+--
105+-- * 'psalPageSize'
106+--
107+-- * 'psalCallback'
108+projectsServiceAccountsList
109+ :: Text -- ^ 'psalName'
110+ -> ProjectsServiceAccountsList
111+projectsServiceAccountsList pPsalName_ =
112+ ProjectsServiceAccountsList
113+ { _psalXgafv = Nothing
114+ , _psalUploadProtocol = Nothing
115+ , _psalPp = True
116+ , _psalAccessToken = Nothing
117+ , _psalUploadType = Nothing
118+ , _psalBearerToken = Nothing
119+ , _psalName = pPsalName_
120+ , _psalPageToken = Nothing
121+ , _psalPageSize = Nothing
122+ , _psalCallback = Nothing
123+ }
124+
125+-- | V1 error format.
126+psalXgafv :: Lens' ProjectsServiceAccountsList (Maybe Text)
127+psalXgafv
128+ = lens _psalXgafv (\ s a -> s{_psalXgafv = a})
129+
130+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
131+psalUploadProtocol :: Lens' ProjectsServiceAccountsList (Maybe Text)
132+psalUploadProtocol
133+ = lens _psalUploadProtocol
134+ (\ s a -> s{_psalUploadProtocol = a})
135+
136+-- | Pretty-print response.
137+psalPp :: Lens' ProjectsServiceAccountsList Bool
138+psalPp = lens _psalPp (\ s a -> s{_psalPp = a})
139+
140+-- | OAuth access token.
141+psalAccessToken :: Lens' ProjectsServiceAccountsList (Maybe Text)
142+psalAccessToken
143+ = lens _psalAccessToken
144+ (\ s a -> s{_psalAccessToken = a})
145+
146+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
147+psalUploadType :: Lens' ProjectsServiceAccountsList (Maybe Text)
148+psalUploadType
149+ = lens _psalUploadType
150+ (\ s a -> s{_psalUploadType = a})
151+
152+-- | OAuth bearer token.
153+psalBearerToken :: Lens' ProjectsServiceAccountsList (Maybe Text)
154+psalBearerToken
155+ = lens _psalBearerToken
156+ (\ s a -> s{_psalBearerToken = a})
157+
158+-- | Required. The resource name of the project associated with the service
159+-- accounts, such as \"projects\/123\"
160+psalName :: Lens' ProjectsServiceAccountsList Text
161+psalName = lens _psalName (\ s a -> s{_psalName = a})
162+
163+-- | Optional pagination token returned in an earlier
164+-- [ListServiceAccountsResponse.next_page_token].
165+psalPageToken :: Lens' ProjectsServiceAccountsList (Maybe Text)
166+psalPageToken
167+ = lens _psalPageToken
168+ (\ s a -> s{_psalPageToken = a})
169+
170+-- | Optional limit on the number of service accounts to include in the
171+-- response. Further accounts can subsequently be obtained by including the
172+-- [ListServiceAccountsResponse.next_page_token] in a subsequent request.
173+psalPageSize :: Lens' ProjectsServiceAccountsList (Maybe Int32)
174+psalPageSize
175+ = lens _psalPageSize (\ s a -> s{_psalPageSize = a})
176+ . mapping _Coerce
177+
178+-- | JSONP
179+psalCallback :: Lens' ProjectsServiceAccountsList (Maybe Text)
180+psalCallback
181+ = lens _psalCallback (\ s a -> s{_psalCallback = a})
182+
183+instance GoogleRequest ProjectsServiceAccountsList
184+ where
185+ type Rs ProjectsServiceAccountsList =
186+ ListServiceAccountsResponse
187+ requestClient ProjectsServiceAccountsList{..}
188+ = go _psalName _psalXgafv _psalUploadProtocol
189+ (Just _psalPp)
190+ _psalAccessToken
191+ _psalUploadType
192+ _psalBearerToken
193+ _psalPageToken
194+ _psalPageSize
195+ _psalCallback
196+ (Just AltJSON)
197+ knowledgeGraphSearchService
198+ where go
199+ = buildClient
200+ (Proxy :: Proxy ProjectsServiceAccountsListResource)
201+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/SetIAMPolicy.hsnew file+192
@@ -0,0 +1,192 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.IAM.Projects.ServiceAccounts.SetIAMPolicy
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Sets the IAM access control policy for the specified IAM resource.
24+--
25+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.setIamPolicy@.
26+module Network.Google.Resource.IAM.Projects.ServiceAccounts.SetIAMPolicy
27+ (
28+ -- * REST Resource
29+ ProjectsServiceAccountsSetIAMPolicyResource
30+
31+ -- * Creating a Request
32+ , projectsServiceAccountsSetIAMPolicy
33+ , ProjectsServiceAccountsSetIAMPolicy
34+
35+ -- * Request Lenses
36+ , psasipXgafv
37+ , psasipUploadProtocol
38+ , psasipPp
39+ , psasipAccessToken
40+ , psasipUploadType
41+ , psasipPayload
42+ , psasipBearerToken
43+ , psasipResource
44+ , psasipCallback
45+ ) where
46+
47+import Network.Google.KnowledgeGraphSearch.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @iam.projects.serviceAccounts.setIamPolicy@ method which the
51+-- 'ProjectsServiceAccountsSetIAMPolicy' request conforms to.
52+type ProjectsServiceAccountsSetIAMPolicyResource =
53+ "v1" :>
54+ CaptureMode "resource" "setIamPolicy" Text :>
55+ QueryParam "$.xgafv" Text :>
56+ QueryParam "upload_protocol" Text :>
57+ QueryParam "pp" Bool :>
58+ QueryParam "access_token" Text :>
59+ QueryParam "uploadType" Text :>
60+ QueryParam "bearer_token" Text :>
61+ QueryParam "callback" Text :>
62+ QueryParam "alt" AltJSON :>
63+ ReqBody '[JSON] SetIAMPolicyRequest :>
64+ Post '[JSON] Policy
65+
66+-- | Sets the IAM access control policy for the specified IAM resource.
67+--
68+-- /See:/ 'projectsServiceAccountsSetIAMPolicy' smart constructor.
69+data ProjectsServiceAccountsSetIAMPolicy = ProjectsServiceAccountsSetIAMPolicy
70+ { _psasipXgafv :: !(Maybe Text)
71+ , _psasipUploadProtocol :: !(Maybe Text)
72+ , _psasipPp :: !Bool
73+ , _psasipAccessToken :: !(Maybe Text)
74+ , _psasipUploadType :: !(Maybe Text)
75+ , _psasipPayload :: !SetIAMPolicyRequest
76+ , _psasipBearerToken :: !(Maybe Text)
77+ , _psasipResource :: !Text
78+ , _psasipCallback :: !(Maybe Text)
79+ } deriving (Eq,Show,Data,Typeable,Generic)
80+
81+-- | Creates a value of 'ProjectsServiceAccountsSetIAMPolicy' 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+-- * 'psasipXgafv'
86+--
87+-- * 'psasipUploadProtocol'
88+--
89+-- * 'psasipPp'
90+--
91+-- * 'psasipAccessToken'
92+--
93+-- * 'psasipUploadType'
94+--
95+-- * 'psasipPayload'
96+--
97+-- * 'psasipBearerToken'
98+--
99+-- * 'psasipResource'
100+--
101+-- * 'psasipCallback'
102+projectsServiceAccountsSetIAMPolicy
103+ :: SetIAMPolicyRequest -- ^ 'psasipPayload'
104+ -> Text -- ^ 'psasipResource'
105+ -> ProjectsServiceAccountsSetIAMPolicy
106+projectsServiceAccountsSetIAMPolicy pPsasipPayload_ pPsasipResource_ =
107+ ProjectsServiceAccountsSetIAMPolicy
108+ { _psasipXgafv = Nothing
109+ , _psasipUploadProtocol = Nothing
110+ , _psasipPp = True
111+ , _psasipAccessToken = Nothing
112+ , _psasipUploadType = Nothing
113+ , _psasipPayload = pPsasipPayload_
114+ , _psasipBearerToken = Nothing
115+ , _psasipResource = pPsasipResource_
116+ , _psasipCallback = Nothing
117+ }
118+
119+-- | V1 error format.
120+psasipXgafv :: Lens' ProjectsServiceAccountsSetIAMPolicy (Maybe Text)
121+psasipXgafv
122+ = lens _psasipXgafv (\ s a -> s{_psasipXgafv = a})
123+
124+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
125+psasipUploadProtocol :: Lens' ProjectsServiceAccountsSetIAMPolicy (Maybe Text)
126+psasipUploadProtocol
127+ = lens _psasipUploadProtocol
128+ (\ s a -> s{_psasipUploadProtocol = a})
129+
130+-- | Pretty-print response.
131+psasipPp :: Lens' ProjectsServiceAccountsSetIAMPolicy Bool
132+psasipPp = lens _psasipPp (\ s a -> s{_psasipPp = a})
133+
134+-- | OAuth access token.
135+psasipAccessToken :: Lens' ProjectsServiceAccountsSetIAMPolicy (Maybe Text)
136+psasipAccessToken
137+ = lens _psasipAccessToken
138+ (\ s a -> s{_psasipAccessToken = a})
139+
140+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
141+psasipUploadType :: Lens' ProjectsServiceAccountsSetIAMPolicy (Maybe Text)
142+psasipUploadType
143+ = lens _psasipUploadType
144+ (\ s a -> s{_psasipUploadType = a})
145+
146+-- | Multipart request metadata.
147+psasipPayload :: Lens' ProjectsServiceAccountsSetIAMPolicy SetIAMPolicyRequest
148+psasipPayload
149+ = lens _psasipPayload
150+ (\ s a -> s{_psasipPayload = a})
151+
152+-- | OAuth bearer token.
153+psasipBearerToken :: Lens' ProjectsServiceAccountsSetIAMPolicy (Maybe Text)
154+psasipBearerToken
155+ = lens _psasipBearerToken
156+ (\ s a -> s{_psasipBearerToken = a})
157+
158+-- | REQUIRED: The resource for which the policy is being specified.
159+-- \`resource\` is usually specified as a path, such as
160+-- \`projects\/*project*\/zones\/*zone*\/disks\/*disk*\`. The format for
161+-- the path specified in this value is resource specific and is specified
162+-- in the \`setIamPolicy\` documentation.
163+psasipResource :: Lens' ProjectsServiceAccountsSetIAMPolicy Text
164+psasipResource
165+ = lens _psasipResource
166+ (\ s a -> s{_psasipResource = a})
167+
168+-- | JSONP
169+psasipCallback :: Lens' ProjectsServiceAccountsSetIAMPolicy (Maybe Text)
170+psasipCallback
171+ = lens _psasipCallback
172+ (\ s a -> s{_psasipCallback = a})
173+
174+instance GoogleRequest
175+ ProjectsServiceAccountsSetIAMPolicy where
176+ type Rs ProjectsServiceAccountsSetIAMPolicy = Policy
177+ requestClient ProjectsServiceAccountsSetIAMPolicy{..}
178+ = go _psasipResource _psasipXgafv
179+ _psasipUploadProtocol
180+ (Just _psasipPp)
181+ _psasipAccessToken
182+ _psasipUploadType
183+ _psasipBearerToken
184+ _psasipCallback
185+ (Just AltJSON)
186+ _psasipPayload
187+ knowledgeGraphSearchService
188+ where go
189+ = buildClient
190+ (Proxy ::
191+ Proxy ProjectsServiceAccountsSetIAMPolicyResource)
192+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/SignBlob.hsnew file+190
@@ -0,0 +1,190 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.IAM.Projects.ServiceAccounts.SignBlob
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Signs a blob using a service account.
24+--
25+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.signBlob@.
26+module Network.Google.Resource.IAM.Projects.ServiceAccounts.SignBlob
27+ (
28+ -- * REST Resource
29+ ProjectsServiceAccountsSignBlobResource
30+
31+ -- * Creating a Request
32+ , projectsServiceAccountsSignBlob
33+ , ProjectsServiceAccountsSignBlob
34+
35+ -- * Request Lenses
36+ , psasbXgafv
37+ , psasbUploadProtocol
38+ , psasbPp
39+ , psasbAccessToken
40+ , psasbUploadType
41+ , psasbPayload
42+ , psasbBearerToken
43+ , psasbName
44+ , psasbCallback
45+ ) where
46+
47+import Network.Google.KnowledgeGraphSearch.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @iam.projects.serviceAccounts.signBlob@ method which the
51+-- 'ProjectsServiceAccountsSignBlob' request conforms to.
52+type ProjectsServiceAccountsSignBlobResource =
53+ "v1" :>
54+ CaptureMode "name" "signBlob" Text :>
55+ QueryParam "$.xgafv" Text :>
56+ QueryParam "upload_protocol" Text :>
57+ QueryParam "pp" Bool :>
58+ QueryParam "access_token" Text :>
59+ QueryParam "uploadType" Text :>
60+ QueryParam "bearer_token" Text :>
61+ QueryParam "callback" Text :>
62+ QueryParam "alt" AltJSON :>
63+ ReqBody '[JSON] SignBlobRequest :>
64+ Post '[JSON] SignBlobResponse
65+
66+-- | Signs a blob using a service account.
67+--
68+-- /See:/ 'projectsServiceAccountsSignBlob' smart constructor.
69+data ProjectsServiceAccountsSignBlob = ProjectsServiceAccountsSignBlob
70+ { _psasbXgafv :: !(Maybe Text)
71+ , _psasbUploadProtocol :: !(Maybe Text)
72+ , _psasbPp :: !Bool
73+ , _psasbAccessToken :: !(Maybe Text)
74+ , _psasbUploadType :: !(Maybe Text)
75+ , _psasbPayload :: !SignBlobRequest
76+ , _psasbBearerToken :: !(Maybe Text)
77+ , _psasbName :: !Text
78+ , _psasbCallback :: !(Maybe Text)
79+ } deriving (Eq,Show,Data,Typeable,Generic)
80+
81+-- | Creates a value of 'ProjectsServiceAccountsSignBlob' 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+-- * 'psasbXgafv'
86+--
87+-- * 'psasbUploadProtocol'
88+--
89+-- * 'psasbPp'
90+--
91+-- * 'psasbAccessToken'
92+--
93+-- * 'psasbUploadType'
94+--
95+-- * 'psasbPayload'
96+--
97+-- * 'psasbBearerToken'
98+--
99+-- * 'psasbName'
100+--
101+-- * 'psasbCallback'
102+projectsServiceAccountsSignBlob
103+ :: SignBlobRequest -- ^ 'psasbPayload'
104+ -> Text -- ^ 'psasbName'
105+ -> ProjectsServiceAccountsSignBlob
106+projectsServiceAccountsSignBlob pPsasbPayload_ pPsasbName_ =
107+ ProjectsServiceAccountsSignBlob
108+ { _psasbXgafv = Nothing
109+ , _psasbUploadProtocol = Nothing
110+ , _psasbPp = True
111+ , _psasbAccessToken = Nothing
112+ , _psasbUploadType = Nothing
113+ , _psasbPayload = pPsasbPayload_
114+ , _psasbBearerToken = Nothing
115+ , _psasbName = pPsasbName_
116+ , _psasbCallback = Nothing
117+ }
118+
119+-- | V1 error format.
120+psasbXgafv :: Lens' ProjectsServiceAccountsSignBlob (Maybe Text)
121+psasbXgafv
122+ = lens _psasbXgafv (\ s a -> s{_psasbXgafv = a})
123+
124+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
125+psasbUploadProtocol :: Lens' ProjectsServiceAccountsSignBlob (Maybe Text)
126+psasbUploadProtocol
127+ = lens _psasbUploadProtocol
128+ (\ s a -> s{_psasbUploadProtocol = a})
129+
130+-- | Pretty-print response.
131+psasbPp :: Lens' ProjectsServiceAccountsSignBlob Bool
132+psasbPp = lens _psasbPp (\ s a -> s{_psasbPp = a})
133+
134+-- | OAuth access token.
135+psasbAccessToken :: Lens' ProjectsServiceAccountsSignBlob (Maybe Text)
136+psasbAccessToken
137+ = lens _psasbAccessToken
138+ (\ s a -> s{_psasbAccessToken = a})
139+
140+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
141+psasbUploadType :: Lens' ProjectsServiceAccountsSignBlob (Maybe Text)
142+psasbUploadType
143+ = lens _psasbUploadType
144+ (\ s a -> s{_psasbUploadType = a})
145+
146+-- | Multipart request metadata.
147+psasbPayload :: Lens' ProjectsServiceAccountsSignBlob SignBlobRequest
148+psasbPayload
149+ = lens _psasbPayload (\ s a -> s{_psasbPayload = a})
150+
151+-- | OAuth bearer token.
152+psasbBearerToken :: Lens' ProjectsServiceAccountsSignBlob (Maybe Text)
153+psasbBearerToken
154+ = lens _psasbBearerToken
155+ (\ s a -> s{_psasbBearerToken = a})
156+
157+-- | The resource name of the service account in the format
158+-- \"projects\/{project}\/serviceAccounts\/{account}\". Using \'-\' as a
159+-- wildcard for the project, will infer the project from the account. The
160+-- account value can be the email address or the unique_id of the service
161+-- account.
162+psasbName :: Lens' ProjectsServiceAccountsSignBlob Text
163+psasbName
164+ = lens _psasbName (\ s a -> s{_psasbName = a})
165+
166+-- | JSONP
167+psasbCallback :: Lens' ProjectsServiceAccountsSignBlob (Maybe Text)
168+psasbCallback
169+ = lens _psasbCallback
170+ (\ s a -> s{_psasbCallback = a})
171+
172+instance GoogleRequest
173+ ProjectsServiceAccountsSignBlob where
174+ type Rs ProjectsServiceAccountsSignBlob =
175+ SignBlobResponse
176+ requestClient ProjectsServiceAccountsSignBlob{..}
177+ = go _psasbName _psasbXgafv _psasbUploadProtocol
178+ (Just _psasbPp)
179+ _psasbAccessToken
180+ _psasbUploadType
181+ _psasbBearerToken
182+ _psasbCallback
183+ (Just AltJSON)
184+ _psasbPayload
185+ knowledgeGraphSearchService
186+ where go
187+ = buildClient
188+ (Proxy ::
189+ Proxy ProjectsServiceAccountsSignBlobResource)
190+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/TestIAMPermissions.hsnew file+198
@@ -0,0 +1,198 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.IAM.Projects.ServiceAccounts.TestIAMPermissions
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Tests the specified permissions against the IAM access control policy
24+-- for the specified IAM resource.
25+--
26+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.testIamPermissions@.
27+module Network.Google.Resource.IAM.Projects.ServiceAccounts.TestIAMPermissions
28+ (
29+ -- * REST Resource
30+ ProjectsServiceAccountsTestIAMPermissionsResource
31+
32+ -- * Creating a Request
33+ , projectsServiceAccountsTestIAMPermissions
34+ , ProjectsServiceAccountsTestIAMPermissions
35+
36+ -- * Request Lenses
37+ , psatipXgafv
38+ , psatipUploadProtocol
39+ , psatipPp
40+ , psatipAccessToken
41+ , psatipUploadType
42+ , psatipPayload
43+ , psatipBearerToken
44+ , psatipResource
45+ , psatipCallback
46+ ) where
47+
48+import Network.Google.KnowledgeGraphSearch.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @iam.projects.serviceAccounts.testIamPermissions@ method which the
52+-- 'ProjectsServiceAccountsTestIAMPermissions' request conforms to.
53+type ProjectsServiceAccountsTestIAMPermissionsResource
54+ =
55+ "v1" :>
56+ CaptureMode "resource" "testIamPermissions" Text :>
57+ QueryParam "$.xgafv" Text :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :>
65+ ReqBody '[JSON] TestIAMPermissionsRequest :>
66+ Post '[JSON] TestIAMPermissionsResponse
67+
68+-- | Tests the specified permissions against the IAM access control policy
69+-- for the specified IAM resource.
70+--
71+-- /See:/ 'projectsServiceAccountsTestIAMPermissions' smart constructor.
72+data ProjectsServiceAccountsTestIAMPermissions = ProjectsServiceAccountsTestIAMPermissions
73+ { _psatipXgafv :: !(Maybe Text)
74+ , _psatipUploadProtocol :: !(Maybe Text)
75+ , _psatipPp :: !Bool
76+ , _psatipAccessToken :: !(Maybe Text)
77+ , _psatipUploadType :: !(Maybe Text)
78+ , _psatipPayload :: !TestIAMPermissionsRequest
79+ , _psatipBearerToken :: !(Maybe Text)
80+ , _psatipResource :: !Text
81+ , _psatipCallback :: !(Maybe Text)
82+ } deriving (Eq,Show,Data,Typeable,Generic)
83+
84+-- | Creates a value of 'ProjectsServiceAccountsTestIAMPermissions' 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+-- * 'psatipXgafv'
89+--
90+-- * 'psatipUploadProtocol'
91+--
92+-- * 'psatipPp'
93+--
94+-- * 'psatipAccessToken'
95+--
96+-- * 'psatipUploadType'
97+--
98+-- * 'psatipPayload'
99+--
100+-- * 'psatipBearerToken'
101+--
102+-- * 'psatipResource'
103+--
104+-- * 'psatipCallback'
105+projectsServiceAccountsTestIAMPermissions
106+ :: TestIAMPermissionsRequest -- ^ 'psatipPayload'
107+ -> Text -- ^ 'psatipResource'
108+ -> ProjectsServiceAccountsTestIAMPermissions
109+projectsServiceAccountsTestIAMPermissions pPsatipPayload_ pPsatipResource_ =
110+ ProjectsServiceAccountsTestIAMPermissions
111+ { _psatipXgafv = Nothing
112+ , _psatipUploadProtocol = Nothing
113+ , _psatipPp = True
114+ , _psatipAccessToken = Nothing
115+ , _psatipUploadType = Nothing
116+ , _psatipPayload = pPsatipPayload_
117+ , _psatipBearerToken = Nothing
118+ , _psatipResource = pPsatipResource_
119+ , _psatipCallback = Nothing
120+ }
121+
122+-- | V1 error format.
123+psatipXgafv :: Lens' ProjectsServiceAccountsTestIAMPermissions (Maybe Text)
124+psatipXgafv
125+ = lens _psatipXgafv (\ s a -> s{_psatipXgafv = a})
126+
127+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
128+psatipUploadProtocol :: Lens' ProjectsServiceAccountsTestIAMPermissions (Maybe Text)
129+psatipUploadProtocol
130+ = lens _psatipUploadProtocol
131+ (\ s a -> s{_psatipUploadProtocol = a})
132+
133+-- | Pretty-print response.
134+psatipPp :: Lens' ProjectsServiceAccountsTestIAMPermissions Bool
135+psatipPp = lens _psatipPp (\ s a -> s{_psatipPp = a})
136+
137+-- | OAuth access token.
138+psatipAccessToken :: Lens' ProjectsServiceAccountsTestIAMPermissions (Maybe Text)
139+psatipAccessToken
140+ = lens _psatipAccessToken
141+ (\ s a -> s{_psatipAccessToken = a})
142+
143+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
144+psatipUploadType :: Lens' ProjectsServiceAccountsTestIAMPermissions (Maybe Text)
145+psatipUploadType
146+ = lens _psatipUploadType
147+ (\ s a -> s{_psatipUploadType = a})
148+
149+-- | Multipart request metadata.
150+psatipPayload :: Lens' ProjectsServiceAccountsTestIAMPermissions TestIAMPermissionsRequest
151+psatipPayload
152+ = lens _psatipPayload
153+ (\ s a -> s{_psatipPayload = a})
154+
155+-- | OAuth bearer token.
156+psatipBearerToken :: Lens' ProjectsServiceAccountsTestIAMPermissions (Maybe Text)
157+psatipBearerToken
158+ = lens _psatipBearerToken
159+ (\ s a -> s{_psatipBearerToken = a})
160+
161+-- | REQUIRED: The resource for which the policy detail is being requested.
162+-- \`resource\` is usually specified as a path, such as
163+-- \`projects\/*project*\/zones\/*zone*\/disks\/*disk*\`. The format for
164+-- the path specified in this value is resource specific and is specified
165+-- in the \`testIamPermissions\` documentation.
166+psatipResource :: Lens' ProjectsServiceAccountsTestIAMPermissions Text
167+psatipResource
168+ = lens _psatipResource
169+ (\ s a -> s{_psatipResource = a})
170+
171+-- | JSONP
172+psatipCallback :: Lens' ProjectsServiceAccountsTestIAMPermissions (Maybe Text)
173+psatipCallback
174+ = lens _psatipCallback
175+ (\ s a -> s{_psatipCallback = a})
176+
177+instance GoogleRequest
178+ ProjectsServiceAccountsTestIAMPermissions where
179+ type Rs ProjectsServiceAccountsTestIAMPermissions =
180+ TestIAMPermissionsResponse
181+ requestClient
182+ ProjectsServiceAccountsTestIAMPermissions{..}
183+ = go _psatipResource _psatipXgafv
184+ _psatipUploadProtocol
185+ (Just _psatipPp)
186+ _psatipAccessToken
187+ _psatipUploadType
188+ _psatipBearerToken
189+ _psatipCallback
190+ (Just AltJSON)
191+ _psatipPayload
192+ knowledgeGraphSearchService
193+ where go
194+ = buildClient
195+ (Proxy ::
196+ Proxy
197+ ProjectsServiceAccountsTestIAMPermissionsResource)
198+ mempty
gogol-kgsearch/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/Update.hsnew file+191
@@ -0,0 +1,191 @@
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.IAM.Projects.ServiceAccounts.Update
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Updates a service account. Currently, only the following fields are
24+-- updatable: \'display_name\' . The \'etag\' is mandatory.
25+--
26+-- /See:/ <https://cloud.google.com/iam/ Google Identity and Access Management API Reference> for @iam.projects.serviceAccounts.update@.
27+module Network.Google.Resource.IAM.Projects.ServiceAccounts.Update
28+ (
29+ -- * REST Resource
30+ ProjectsServiceAccountsUpdateResource
31+
32+ -- * Creating a Request
33+ , projectsServiceAccountsUpdate
34+ , ProjectsServiceAccountsUpdate
35+
36+ -- * Request Lenses
37+ , psauXgafv
38+ , psauUploadProtocol
39+ , psauPp
40+ , psauAccessToken
41+ , psauUploadType
42+ , psauPayload
43+ , psauBearerToken
44+ , psauName
45+ , psauCallback
46+ ) where
47+
48+import Network.Google.KnowledgeGraphSearch.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @iam.projects.serviceAccounts.update@ method which the
52+-- 'ProjectsServiceAccountsUpdate' request conforms to.
53+type ProjectsServiceAccountsUpdateResource =
54+ "v1" :>
55+ Capture "name" Text :>
56+ QueryParam "$.xgafv" Text :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :>
64+ ReqBody '[JSON] ServiceAccount :>
65+ Put '[JSON] ServiceAccount
66+
67+-- | Updates a service account. Currently, only the following fields are
68+-- updatable: \'display_name\' . The \'etag\' is mandatory.
69+--
70+-- /See:/ 'projectsServiceAccountsUpdate' smart constructor.
71+data ProjectsServiceAccountsUpdate = ProjectsServiceAccountsUpdate
72+ { _psauXgafv :: !(Maybe Text)
73+ , _psauUploadProtocol :: !(Maybe Text)
74+ , _psauPp :: !Bool
75+ , _psauAccessToken :: !(Maybe Text)
76+ , _psauUploadType :: !(Maybe Text)
77+ , _psauPayload :: !ServiceAccount
78+ , _psauBearerToken :: !(Maybe Text)
79+ , _psauName :: !Text
80+ , _psauCallback :: !(Maybe Text)
81+ } deriving (Eq,Show,Data,Typeable,Generic)
82+
83+-- | Creates a value of 'ProjectsServiceAccountsUpdate' 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+-- * 'psauXgafv'
88+--
89+-- * 'psauUploadProtocol'
90+--
91+-- * 'psauPp'
92+--
93+-- * 'psauAccessToken'
94+--
95+-- * 'psauUploadType'
96+--
97+-- * 'psauPayload'
98+--
99+-- * 'psauBearerToken'
100+--
101+-- * 'psauName'
102+--
103+-- * 'psauCallback'
104+projectsServiceAccountsUpdate
105+ :: ServiceAccount -- ^ 'psauPayload'
106+ -> Text -- ^ 'psauName'
107+ -> ProjectsServiceAccountsUpdate
108+projectsServiceAccountsUpdate pPsauPayload_ pPsauName_ =
109+ ProjectsServiceAccountsUpdate
110+ { _psauXgafv = Nothing
111+ , _psauUploadProtocol = Nothing
112+ , _psauPp = True
113+ , _psauAccessToken = Nothing
114+ , _psauUploadType = Nothing
115+ , _psauPayload = pPsauPayload_
116+ , _psauBearerToken = Nothing
117+ , _psauName = pPsauName_
118+ , _psauCallback = Nothing
119+ }
120+
121+-- | V1 error format.
122+psauXgafv :: Lens' ProjectsServiceAccountsUpdate (Maybe Text)
123+psauXgafv
124+ = lens _psauXgafv (\ s a -> s{_psauXgafv = a})
125+
126+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
127+psauUploadProtocol :: Lens' ProjectsServiceAccountsUpdate (Maybe Text)
128+psauUploadProtocol
129+ = lens _psauUploadProtocol
130+ (\ s a -> s{_psauUploadProtocol = a})
131+
132+-- | Pretty-print response.
133+psauPp :: Lens' ProjectsServiceAccountsUpdate Bool
134+psauPp = lens _psauPp (\ s a -> s{_psauPp = a})
135+
136+-- | OAuth access token.
137+psauAccessToken :: Lens' ProjectsServiceAccountsUpdate (Maybe Text)
138+psauAccessToken
139+ = lens _psauAccessToken
140+ (\ s a -> s{_psauAccessToken = a})
141+
142+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
143+psauUploadType :: Lens' ProjectsServiceAccountsUpdate (Maybe Text)
144+psauUploadType
145+ = lens _psauUploadType
146+ (\ s a -> s{_psauUploadType = a})
147+
148+-- | Multipart request metadata.
149+psauPayload :: Lens' ProjectsServiceAccountsUpdate ServiceAccount
150+psauPayload
151+ = lens _psauPayload (\ s a -> s{_psauPayload = a})
152+
153+-- | OAuth bearer token.
154+psauBearerToken :: Lens' ProjectsServiceAccountsUpdate (Maybe Text)
155+psauBearerToken
156+ = lens _psauBearerToken
157+ (\ s a -> s{_psauBearerToken = a})
158+
159+-- | The resource name of the service account in the format
160+-- \"projects\/{project}\/serviceAccounts\/{account}\". In requests using
161+-- \'-\' as a wildcard for the project, will infer the project from the
162+-- account and the account value can be the email address or the unique_id
163+-- of the service account. In responses the resource name will always be in
164+-- the format \"projects\/{project}\/serviceAccounts\/{email}\".
165+psauName :: Lens' ProjectsServiceAccountsUpdate Text
166+psauName = lens _psauName (\ s a -> s{_psauName = a})
167+
168+-- | JSONP
169+psauCallback :: Lens' ProjectsServiceAccountsUpdate (Maybe Text)
170+psauCallback
171+ = lens _psauCallback (\ s a -> s{_psauCallback = a})
172+
173+instance GoogleRequest ProjectsServiceAccountsUpdate
174+ where
175+ type Rs ProjectsServiceAccountsUpdate =
176+ ServiceAccount
177+ requestClient ProjectsServiceAccountsUpdate{..}
178+ = go _psauName _psauXgafv _psauUploadProtocol
179+ (Just _psauPp)
180+ _psauAccessToken
181+ _psauUploadType
182+ _psauBearerToken
183+ _psauCallback
184+ (Just AltJSON)
185+ _psauPayload
186+ knowledgeGraphSearchService
187+ where go
188+ = buildClient
189+ (Proxy ::
190+ Proxy ProjectsServiceAccountsUpdateResource)
191+ mempty
gogol-kgsearch/gogol-kgsearch.cabalnew file+60
@@ -0,0 +1,60 @@
1+name: gogol-kgsearch
2+version: 0.0.1
3+synopsis: Google Identity and Access Management SDK.
4+homepage: https://github.com/brendanhay/gogol
5+bug-reports: https://github.com/brendanhay/gogol/issues
6+license: OtherLicense
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay@gmail.com>
10+copyright: Copyright (c) 2015 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+ Manages identity and access control for Google Cloud Platform resources,
18+ including the creation of service accounts, which you can use to
19+ authenticate to Google and make API calls.
20+ .
21+ /Warning:/ This is an experimental prototype/preview release which is still
22+ under exploratory development and not intended for public use, caveat emptor!
23+ .
24+ This library is compatible with version @v1@
25+ of the API.
26+
27+source-repository head
28+ type: git
29+ location: git://github.com/brendanhay/gogol.git
30+
31+library
32+ default-language: Haskell2010
33+ hs-source-dirs: src gen
34+
35+ ghc-options: -Wall
36+
37+ exposed-modules:
38+ Network.Google.KnowledgeGraphSearch
39+ , Network.Google.KnowledgeGraphSearch.Types
40+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.Create
41+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.Delete
42+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.Get
43+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.GetIAMPolicy
44+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Create
45+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Delete
46+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.Get
47+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.Keys.List
48+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.List
49+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.SetIAMPolicy
50+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.SignBlob
51+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.TestIAMPermissions
52+ , Network.Google.Resource.IAM.Projects.ServiceAccounts.Update
53+
54+ other-modules:
55+ Network.Google.KnowledgeGraphSearch.Types.Product
56+ , Network.Google.KnowledgeGraphSearch.Types.Sum
57+
58+ build-depends:
59+ gogol-core == 0.0.1.*
60+ , base >= 4.7 && < 5
gogol-kgsearch/src/.gitkeepnew file

No changes to the content.