google-apis-identitytoolkit_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1589 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module IdentitytoolkitV1
23
+ # Identity Toolkit API
24
+ #
25
+ # The Google Identity Toolkit API lets you use open standards to verify a user's
26
+ # identity.
27
+ #
28
+ # @example
29
+ # require 'google/apis/identitytoolkit_v1'
30
+ #
31
+ # Identitytoolkit = Google::Apis::IdentitytoolkitV1 # Alias the module
32
+ # service = Identitytoolkit::IdentityToolkitService.new
33
+ #
34
+ # @see https://cloud.google.com/identity-platform
35
+ class IdentityToolkitService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://identitytoolkit.googleapis.com/', '',
48
+ client_name: 'google-apis-identitytoolkit_v1',
49
+ client_version: Google::Apis::IdentitytoolkitV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # If an email identifier is specified, checks and returns if any user account is
54
+ # registered with the email. If there is a registered account, fetches all
55
+ # providers associated with the account's email. If the provider ID of an
56
+ # Identity Provider (IdP) is specified, creates an authorization URI for the IdP.
57
+ # The user can be directed to this URI to sign in with the IdP. An [API key](
58
+ # https://cloud.google.com/docs/authentication/api-keys) is required in the
59
+ # request in order to identify the Google Cloud project.
60
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateAuthUriRequest] google_cloud_identitytoolkit_v1_create_auth_uri_request_object
61
+ # @param [String] fields
62
+ # Selector specifying which fields to include in a partial response.
63
+ # @param [String] quota_user
64
+ # Available to use for quota purposes for server-side applications. Can be any
65
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
66
+ # @param [Google::Apis::RequestOptions] options
67
+ # Request-specific options
68
+ #
69
+ # @yield [result, err] Result & error if block supplied
70
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateAuthUriResponse] parsed result object
71
+ # @yieldparam err [StandardError] error object if request failed
72
+ #
73
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateAuthUriResponse]
74
+ #
75
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
76
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
77
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
78
+ def create_account_auth_uri(google_cloud_identitytoolkit_v1_create_auth_uri_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
79
+ command = make_simple_command(:post, 'v1/accounts:createAuthUri', options)
80
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateAuthUriRequest::Representation
81
+ command.request_object = google_cloud_identitytoolkit_v1_create_auth_uri_request_object
82
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateAuthUriResponse::Representation
83
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateAuthUriResponse
84
+ command.query['fields'] = fields unless fields.nil?
85
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
86
+ execute_or_queue_command(command, &block)
87
+ end
88
+
89
+ # Deletes a user's account.
90
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountRequest] google_cloud_identitytoolkit_v1_delete_account_request_object
91
+ # @param [String] fields
92
+ # Selector specifying which fields to include in a partial response.
93
+ # @param [String] quota_user
94
+ # Available to use for quota purposes for server-side applications. Can be any
95
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
96
+ # @param [Google::Apis::RequestOptions] options
97
+ # Request-specific options
98
+ #
99
+ # @yield [result, err] Result & error if block supplied
100
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse] parsed result object
101
+ # @yieldparam err [StandardError] error object if request failed
102
+ #
103
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse]
104
+ #
105
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
106
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
107
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
108
+ def delete_account(google_cloud_identitytoolkit_v1_delete_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
109
+ command = make_simple_command(:post, 'v1/accounts:delete', options)
110
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountRequest::Representation
111
+ command.request_object = google_cloud_identitytoolkit_v1_delete_account_request_object
112
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse::Representation
113
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse
114
+ command.query['fields'] = fields unless fields.nil?
115
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
116
+ execute_or_queue_command(command, &block)
117
+ end
118
+
119
+ # Experimental
120
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1IssueSamlResponseRequest] google_cloud_identitytoolkit_v1_issue_saml_response_request_object
121
+ # @param [String] fields
122
+ # Selector specifying which fields to include in a partial response.
123
+ # @param [String] quota_user
124
+ # Available to use for quota purposes for server-side applications. Can be any
125
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
126
+ # @param [Google::Apis::RequestOptions] options
127
+ # Request-specific options
128
+ #
129
+ # @yield [result, err] Result & error if block supplied
130
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1IssueSamlResponseResponse] parsed result object
131
+ # @yieldparam err [StandardError] error object if request failed
132
+ #
133
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1IssueSamlResponseResponse]
134
+ #
135
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
136
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
137
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
138
+ def issue_account_saml_response(google_cloud_identitytoolkit_v1_issue_saml_response_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
139
+ command = make_simple_command(:post, 'v1/accounts:issueSamlResponse', options)
140
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1IssueSamlResponseRequest::Representation
141
+ command.request_object = google_cloud_identitytoolkit_v1_issue_saml_response_request_object
142
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1IssueSamlResponseResponse::Representation
143
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1IssueSamlResponseResponse
144
+ command.query['fields'] = fields unless fields.nil?
145
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
146
+ execute_or_queue_command(command, &block)
147
+ end
148
+
149
+ # Gets account information for all matched accounts. For an end user request,
150
+ # retrieves the account of the end user. For an admin request with Google OAuth
151
+ # 2.0 credential, retrieves one or multiple account(s) with matching criteria.
152
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoRequest] google_cloud_identitytoolkit_v1_get_account_info_request_object
153
+ # @param [String] fields
154
+ # Selector specifying which fields to include in a partial response.
155
+ # @param [String] quota_user
156
+ # Available to use for quota purposes for server-side applications. Can be any
157
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
158
+ # @param [Google::Apis::RequestOptions] options
159
+ # Request-specific options
160
+ #
161
+ # @yield [result, err] Result & error if block supplied
162
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse] parsed result object
163
+ # @yieldparam err [StandardError] error object if request failed
164
+ #
165
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse]
166
+ #
167
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
168
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
169
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
170
+ def lookup_account(google_cloud_identitytoolkit_v1_get_account_info_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
171
+ command = make_simple_command(:post, 'v1/accounts:lookup', options)
172
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoRequest::Representation
173
+ command.request_object = google_cloud_identitytoolkit_v1_get_account_info_request_object
174
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse::Representation
175
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse
176
+ command.query['fields'] = fields unless fields.nil?
177
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
178
+ execute_or_queue_command(command, &block)
179
+ end
180
+
181
+ # Resets the password of an account either using an out-of-band code generated
182
+ # by sendOobCode or by specifying the email and password of the account to be
183
+ # modified. Can also check the purpose of an out-of-band code without consuming
184
+ # it.
185
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1ResetPasswordRequest] google_cloud_identitytoolkit_v1_reset_password_request_object
186
+ # @param [String] fields
187
+ # Selector specifying which fields to include in a partial response.
188
+ # @param [String] quota_user
189
+ # Available to use for quota purposes for server-side applications. Can be any
190
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
191
+ # @param [Google::Apis::RequestOptions] options
192
+ # Request-specific options
193
+ #
194
+ # @yield [result, err] Result & error if block supplied
195
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1ResetPasswordResponse] parsed result object
196
+ # @yieldparam err [StandardError] error object if request failed
197
+ #
198
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1ResetPasswordResponse]
199
+ #
200
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
201
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
202
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
203
+ def reset_account_password(google_cloud_identitytoolkit_v1_reset_password_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
204
+ command = make_simple_command(:post, 'v1/accounts:resetPassword', options)
205
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1ResetPasswordRequest::Representation
206
+ command.request_object = google_cloud_identitytoolkit_v1_reset_password_request_object
207
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1ResetPasswordResponse::Representation
208
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1ResetPasswordResponse
209
+ command.query['fields'] = fields unless fields.nil?
210
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
211
+ execute_or_queue_command(command, &block)
212
+ end
213
+
214
+ # Sends an out-of-band confirmation code for an account. Requests from a
215
+ # authenticated request can optionally return a link including the OOB code
216
+ # instead of sending it.
217
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeRequest] google_cloud_identitytoolkit_v1_get_oob_code_request_object
218
+ # @param [String] fields
219
+ # Selector specifying which fields to include in a partial response.
220
+ # @param [String] quota_user
221
+ # Available to use for quota purposes for server-side applications. Can be any
222
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
223
+ # @param [Google::Apis::RequestOptions] options
224
+ # Request-specific options
225
+ #
226
+ # @yield [result, err] Result & error if block supplied
227
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse] parsed result object
228
+ # @yieldparam err [StandardError] error object if request failed
229
+ #
230
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse]
231
+ #
232
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
233
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
234
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
235
+ def send_account_oob_code(google_cloud_identitytoolkit_v1_get_oob_code_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
236
+ command = make_simple_command(:post, 'v1/accounts:sendOobCode', options)
237
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeRequest::Representation
238
+ command.request_object = google_cloud_identitytoolkit_v1_get_oob_code_request_object
239
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse::Representation
240
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse
241
+ command.query['fields'] = fields unless fields.nil?
242
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
243
+ execute_or_queue_command(command, &block)
244
+ end
245
+
246
+ # Sends a SMS verification code for phone number sign-in. An [API key](https://
247
+ # cloud.google.com/docs/authentication/api-keys) is required in the request in
248
+ # order to identify the Google Cloud project.
249
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SendVerificationCodeRequest] google_cloud_identitytoolkit_v1_send_verification_code_request_object
250
+ # @param [String] fields
251
+ # Selector specifying which fields to include in a partial response.
252
+ # @param [String] quota_user
253
+ # Available to use for quota purposes for server-side applications. Can be any
254
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
255
+ # @param [Google::Apis::RequestOptions] options
256
+ # Request-specific options
257
+ #
258
+ # @yield [result, err] Result & error if block supplied
259
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SendVerificationCodeResponse] parsed result object
260
+ # @yieldparam err [StandardError] error object if request failed
261
+ #
262
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SendVerificationCodeResponse]
263
+ #
264
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
265
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
266
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
267
+ def send_account_verification_code(google_cloud_identitytoolkit_v1_send_verification_code_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
268
+ command = make_simple_command(:post, 'v1/accounts:sendVerificationCode', options)
269
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SendVerificationCodeRequest::Representation
270
+ command.request_object = google_cloud_identitytoolkit_v1_send_verification_code_request_object
271
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SendVerificationCodeResponse::Representation
272
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SendVerificationCodeResponse
273
+ command.query['fields'] = fields unless fields.nil?
274
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
275
+ execute_or_queue_command(command, &block)
276
+ end
277
+
278
+ # Signs in or signs up a user by exchanging a custom Auth token. Upon a
279
+ # successful sign-in or sign-up, a new Identity Platform ID token and refresh
280
+ # token are issued for the user. An [API key](https://cloud.google.com/docs/
281
+ # authentication/api-keys) is required in the request in order to identify the
282
+ # Google Cloud project.
283
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithCustomTokenRequest] google_cloud_identitytoolkit_v1_sign_in_with_custom_token_request_object
284
+ # @param [String] fields
285
+ # Selector specifying which fields to include in a partial response.
286
+ # @param [String] quota_user
287
+ # Available to use for quota purposes for server-side applications. Can be any
288
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
289
+ # @param [Google::Apis::RequestOptions] options
290
+ # Request-specific options
291
+ #
292
+ # @yield [result, err] Result & error if block supplied
293
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithCustomTokenResponse] parsed result object
294
+ # @yieldparam err [StandardError] error object if request failed
295
+ #
296
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithCustomTokenResponse]
297
+ #
298
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
299
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
300
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
301
+ def sign_account_in_with_custom_token(google_cloud_identitytoolkit_v1_sign_in_with_custom_token_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
302
+ command = make_simple_command(:post, 'v1/accounts:signInWithCustomToken', options)
303
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithCustomTokenRequest::Representation
304
+ command.request_object = google_cloud_identitytoolkit_v1_sign_in_with_custom_token_request_object
305
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithCustomTokenResponse::Representation
306
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithCustomTokenResponse
307
+ command.query['fields'] = fields unless fields.nil?
308
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
309
+ execute_or_queue_command(command, &block)
310
+ end
311
+
312
+ # Signs in or signs up a user with a out-of-band code from an email link. If a
313
+ # user does not exist with the given email address, a user record will be
314
+ # created. If the sign-in succeeds, an Identity Platform ID and refresh token
315
+ # are issued for the authenticated user. An [API key](https://cloud.google.com/
316
+ # docs/authentication/api-keys) is required in the request in order to identify
317
+ # the Google Cloud project.
318
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithEmailLinkRequest] google_cloud_identitytoolkit_v1_sign_in_with_email_link_request_object
319
+ # @param [String] fields
320
+ # Selector specifying which fields to include in a partial response.
321
+ # @param [String] quota_user
322
+ # Available to use for quota purposes for server-side applications. Can be any
323
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
324
+ # @param [Google::Apis::RequestOptions] options
325
+ # Request-specific options
326
+ #
327
+ # @yield [result, err] Result & error if block supplied
328
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithEmailLinkResponse] parsed result object
329
+ # @yieldparam err [StandardError] error object if request failed
330
+ #
331
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithEmailLinkResponse]
332
+ #
333
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
334
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
335
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
336
+ def sign_account_in_with_email_link(google_cloud_identitytoolkit_v1_sign_in_with_email_link_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
337
+ command = make_simple_command(:post, 'v1/accounts:signInWithEmailLink', options)
338
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithEmailLinkRequest::Representation
339
+ command.request_object = google_cloud_identitytoolkit_v1_sign_in_with_email_link_request_object
340
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithEmailLinkResponse::Representation
341
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithEmailLinkResponse
342
+ command.query['fields'] = fields unless fields.nil?
343
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
344
+ execute_or_queue_command(command, &block)
345
+ end
346
+
347
+ # Signs in or signs up a user with iOS Game Center credentials. If the sign-in
348
+ # succeeds, a new Identity Platform ID token and refresh token are issued for
349
+ # the authenticated user. The bundle ID is required in the request header as `x-
350
+ # ios-bundle-identifier`. An [API key](https://cloud.google.com/docs/
351
+ # authentication/api-keys) is required in the request in order to identify the
352
+ # Google Cloud project.
353
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithGameCenterRequest] google_cloud_identitytoolkit_v1_sign_in_with_game_center_request_object
354
+ # @param [String] fields
355
+ # Selector specifying which fields to include in a partial response.
356
+ # @param [String] quota_user
357
+ # Available to use for quota purposes for server-side applications. Can be any
358
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
359
+ # @param [Google::Apis::RequestOptions] options
360
+ # Request-specific options
361
+ #
362
+ # @yield [result, err] Result & error if block supplied
363
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithGameCenterResponse] parsed result object
364
+ # @yieldparam err [StandardError] error object if request failed
365
+ #
366
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithGameCenterResponse]
367
+ #
368
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
369
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
370
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
371
+ def sign_account_in_with_game_center(google_cloud_identitytoolkit_v1_sign_in_with_game_center_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
372
+ command = make_simple_command(:post, 'v1/accounts:signInWithGameCenter', options)
373
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithGameCenterRequest::Representation
374
+ command.request_object = google_cloud_identitytoolkit_v1_sign_in_with_game_center_request_object
375
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithGameCenterResponse::Representation
376
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithGameCenterResponse
377
+ command.query['fields'] = fields unless fields.nil?
378
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
379
+ execute_or_queue_command(command, &block)
380
+ end
381
+
382
+ # Signs in or signs up a user using credentials from an Identity Provider (IdP).
383
+ # This is done by manually providing an IdP credential, or by providing the
384
+ # authorization response obtained via the authorization request from
385
+ # CreateAuthUri. If the sign-in succeeds, a new Identity Platform ID token and
386
+ # refresh token are issued for the authenticated user. A new Identity Platform
387
+ # user account will be created if the user has not previously signed in to the
388
+ # IdP with the same account. In addition, when the "One account per email
389
+ # address" setting is enabled, there should not be an existing Identity Platform
390
+ # user account with the same email address for a new user account to be created.
391
+ # An [API key](https://cloud.google.com/docs/authentication/api-keys) is
392
+ # required in the request in order to identify the Google Cloud project.
393
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithIdpRequest] google_cloud_identitytoolkit_v1_sign_in_with_idp_request_object
394
+ # @param [String] fields
395
+ # Selector specifying which fields to include in a partial response.
396
+ # @param [String] quota_user
397
+ # Available to use for quota purposes for server-side applications. Can be any
398
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
399
+ # @param [Google::Apis::RequestOptions] options
400
+ # Request-specific options
401
+ #
402
+ # @yield [result, err] Result & error if block supplied
403
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithIdpResponse] parsed result object
404
+ # @yieldparam err [StandardError] error object if request failed
405
+ #
406
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithIdpResponse]
407
+ #
408
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
409
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
410
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
411
+ def sign_account_in_with_idp(google_cloud_identitytoolkit_v1_sign_in_with_idp_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
412
+ command = make_simple_command(:post, 'v1/accounts:signInWithIdp', options)
413
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithIdpRequest::Representation
414
+ command.request_object = google_cloud_identitytoolkit_v1_sign_in_with_idp_request_object
415
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithIdpResponse::Representation
416
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithIdpResponse
417
+ command.query['fields'] = fields unless fields.nil?
418
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
419
+ execute_or_queue_command(command, &block)
420
+ end
421
+
422
+ # Signs in a user with email and password. If the sign-in succeeds, a new
423
+ # Identity Platform ID token and refresh token are issued for the authenticated
424
+ # user. An [API key](https://cloud.google.com/docs/authentication/api-keys) is
425
+ # required in the request in order to identify the Google Cloud project.
426
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPasswordRequest] google_cloud_identitytoolkit_v1_sign_in_with_password_request_object
427
+ # @param [String] fields
428
+ # Selector specifying which fields to include in a partial response.
429
+ # @param [String] quota_user
430
+ # Available to use for quota purposes for server-side applications. Can be any
431
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
432
+ # @param [Google::Apis::RequestOptions] options
433
+ # Request-specific options
434
+ #
435
+ # @yield [result, err] Result & error if block supplied
436
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPasswordResponse] parsed result object
437
+ # @yieldparam err [StandardError] error object if request failed
438
+ #
439
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPasswordResponse]
440
+ #
441
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
442
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
443
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
444
+ def sign_account_in_with_password(google_cloud_identitytoolkit_v1_sign_in_with_password_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
445
+ command = make_simple_command(:post, 'v1/accounts:signInWithPassword', options)
446
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPasswordRequest::Representation
447
+ command.request_object = google_cloud_identitytoolkit_v1_sign_in_with_password_request_object
448
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPasswordResponse::Representation
449
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPasswordResponse
450
+ command.query['fields'] = fields unless fields.nil?
451
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
452
+ execute_or_queue_command(command, &block)
453
+ end
454
+
455
+ # Completes a phone number authentication attempt. If a user already exists with
456
+ # the given phone number, an ID token is minted for that user. Otherwise, a new
457
+ # user is created and associated with the phone number. This method may also be
458
+ # used to link a phone number to an existing user. An [API key](https://cloud.
459
+ # google.com/docs/authentication/api-keys) is required in the request in order
460
+ # to identify the Google Cloud project.
461
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPhoneNumberRequest] google_cloud_identitytoolkit_v1_sign_in_with_phone_number_request_object
462
+ # @param [String] fields
463
+ # Selector specifying which fields to include in a partial response.
464
+ # @param [String] quota_user
465
+ # Available to use for quota purposes for server-side applications. Can be any
466
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
467
+ # @param [Google::Apis::RequestOptions] options
468
+ # Request-specific options
469
+ #
470
+ # @yield [result, err] Result & error if block supplied
471
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPhoneNumberResponse] parsed result object
472
+ # @yieldparam err [StandardError] error object if request failed
473
+ #
474
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPhoneNumberResponse]
475
+ #
476
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
477
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
478
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
479
+ def sign_account_in_with_phone_number(google_cloud_identitytoolkit_v1_sign_in_with_phone_number_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
480
+ command = make_simple_command(:post, 'v1/accounts:signInWithPhoneNumber', options)
481
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPhoneNumberRequest::Representation
482
+ command.request_object = google_cloud_identitytoolkit_v1_sign_in_with_phone_number_request_object
483
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPhoneNumberResponse::Representation
484
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignInWithPhoneNumberResponse
485
+ command.query['fields'] = fields unless fields.nil?
486
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
487
+ execute_or_queue_command(command, &block)
488
+ end
489
+
490
+ # Signs up a new email and password user or anonymous user, or upgrades an
491
+ # anonymous user to email and password. For an admin request with a Google OAuth
492
+ # 2.0 credential with the proper [permissions](https://cloud.google.com/identity-
493
+ # platform/docs/access-control), creates a new anonymous, email and password, or
494
+ # phone number user. An [API key](https://cloud.google.com/docs/authentication/
495
+ # api-keys) is required in the request in order to identify the Google Cloud
496
+ # project.
497
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpRequest] google_cloud_identitytoolkit_v1_sign_up_request_object
498
+ # @param [String] fields
499
+ # Selector specifying which fields to include in a partial response.
500
+ # @param [String] quota_user
501
+ # Available to use for quota purposes for server-side applications. Can be any
502
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
503
+ # @param [Google::Apis::RequestOptions] options
504
+ # Request-specific options
505
+ #
506
+ # @yield [result, err] Result & error if block supplied
507
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse] parsed result object
508
+ # @yieldparam err [StandardError] error object if request failed
509
+ #
510
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse]
511
+ #
512
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
513
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
514
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
515
+ def sign_account_up(google_cloud_identitytoolkit_v1_sign_up_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
516
+ command = make_simple_command(:post, 'v1/accounts:signUp', options)
517
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpRequest::Representation
518
+ command.request_object = google_cloud_identitytoolkit_v1_sign_up_request_object
519
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse::Representation
520
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse
521
+ command.query['fields'] = fields unless fields.nil?
522
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
523
+ execute_or_queue_command(command, &block)
524
+ end
525
+
526
+ # Updates account-related information for the specified user by setting specific
527
+ # fields or applying action codes. Requests from administrators and end users
528
+ # are supported.
529
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoRequest] google_cloud_identitytoolkit_v1_set_account_info_request_object
530
+ # @param [String] fields
531
+ # Selector specifying which fields to include in a partial response.
532
+ # @param [String] quota_user
533
+ # Available to use for quota purposes for server-side applications. Can be any
534
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
535
+ # @param [Google::Apis::RequestOptions] options
536
+ # Request-specific options
537
+ #
538
+ # @yield [result, err] Result & error if block supplied
539
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse] parsed result object
540
+ # @yieldparam err [StandardError] error object if request failed
541
+ #
542
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse]
543
+ #
544
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
545
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
546
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
547
+ def update_account(google_cloud_identitytoolkit_v1_set_account_info_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
548
+ command = make_simple_command(:post, 'v1/accounts:update', options)
549
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoRequest::Representation
550
+ command.request_object = google_cloud_identitytoolkit_v1_set_account_info_request_object
551
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse::Representation
552
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse
553
+ command.query['fields'] = fields unless fields.nil?
554
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
555
+ execute_or_queue_command(command, &block)
556
+ end
557
+
558
+ # Verifies an iOS client is a real iOS device. If the request is valid, a
559
+ # receipt will be sent in the response and a secret will be sent via Apple Push
560
+ # Notification Service. The client should send both of them back to certain
561
+ # Identity Platform APIs in a later call (for example, /accounts:
562
+ # sendVerificationCode), in order to verify the client. The bundle ID is
563
+ # required in the request header as `x-ios-bundle-identifier`. An [API key](
564
+ # https://cloud.google.com/docs/authentication/api-keys) is required in the
565
+ # request in order to identify the Google Cloud project.
566
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1VerifyIosClientRequest] google_cloud_identitytoolkit_v1_verify_ios_client_request_object
567
+ # @param [String] fields
568
+ # Selector specifying which fields to include in a partial response.
569
+ # @param [String] quota_user
570
+ # Available to use for quota purposes for server-side applications. Can be any
571
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
572
+ # @param [Google::Apis::RequestOptions] options
573
+ # Request-specific options
574
+ #
575
+ # @yield [result, err] Result & error if block supplied
576
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1VerifyIosClientResponse] parsed result object
577
+ # @yieldparam err [StandardError] error object if request failed
578
+ #
579
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1VerifyIosClientResponse]
580
+ #
581
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
582
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
583
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
584
+ def verify_account_ios_client(google_cloud_identitytoolkit_v1_verify_ios_client_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
585
+ command = make_simple_command(:post, 'v1/accounts:verifyIosClient', options)
586
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1VerifyIosClientRequest::Representation
587
+ command.request_object = google_cloud_identitytoolkit_v1_verify_ios_client_request_object
588
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1VerifyIosClientResponse::Representation
589
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1VerifyIosClientResponse
590
+ command.query['fields'] = fields unless fields.nil?
591
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
592
+ execute_or_queue_command(command, &block)
593
+ end
594
+
595
+ # Signs up a new email and password user or anonymous user, or upgrades an
596
+ # anonymous user to email and password. For an admin request with a Google OAuth
597
+ # 2.0 credential with the proper [permissions](https://cloud.google.com/identity-
598
+ # platform/docs/access-control), creates a new anonymous, email and password, or
599
+ # phone number user. An [API key](https://cloud.google.com/docs/authentication/
600
+ # api-keys) is required in the request in order to identify the Google Cloud
601
+ # project.
602
+ # @param [String] target_project_id
603
+ # The project ID of the project which the user should belong to. Specifying this
604
+ # field requires a Google OAuth 2.0 credential with the proper [permissions](
605
+ # https://cloud.google.com/identity-platform/docs/access-control). If this is
606
+ # not set, the target project is inferred from the scope associated to the
607
+ # Bearer access token.
608
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpRequest] google_cloud_identitytoolkit_v1_sign_up_request_object
609
+ # @param [String] fields
610
+ # Selector specifying which fields to include in a partial response.
611
+ # @param [String] quota_user
612
+ # Available to use for quota purposes for server-side applications. Can be any
613
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
614
+ # @param [Google::Apis::RequestOptions] options
615
+ # Request-specific options
616
+ #
617
+ # @yield [result, err] Result & error if block supplied
618
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse] parsed result object
619
+ # @yieldparam err [StandardError] error object if request failed
620
+ #
621
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse]
622
+ #
623
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
624
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
625
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
626
+ def accounts_project(target_project_id, google_cloud_identitytoolkit_v1_sign_up_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
627
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/accounts', options)
628
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpRequest::Representation
629
+ command.request_object = google_cloud_identitytoolkit_v1_sign_up_request_object
630
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse::Representation
631
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse
632
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
633
+ command.query['fields'] = fields unless fields.nil?
634
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
635
+ execute_or_queue_command(command, &block)
636
+ end
637
+
638
+ # Creates a session cookie for the given Identity Platform ID token. The session
639
+ # cookie is used by the client to preserve the user's login state.
640
+ # @param [String] target_project_id
641
+ # The ID of the project that the account belongs to.
642
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieRequest] google_cloud_identitytoolkit_v1_create_session_cookie_request_object
643
+ # @param [String] fields
644
+ # Selector specifying which fields to include in a partial response.
645
+ # @param [String] quota_user
646
+ # Available to use for quota purposes for server-side applications. Can be any
647
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
648
+ # @param [Google::Apis::RequestOptions] options
649
+ # Request-specific options
650
+ #
651
+ # @yield [result, err] Result & error if block supplied
652
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieResponse] parsed result object
653
+ # @yieldparam err [StandardError] error object if request failed
654
+ #
655
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieResponse]
656
+ #
657
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
658
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
659
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
660
+ def create_project_session_cookie(target_project_id, google_cloud_identitytoolkit_v1_create_session_cookie_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
661
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}:createSessionCookie', options)
662
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieRequest::Representation
663
+ command.request_object = google_cloud_identitytoolkit_v1_create_session_cookie_request_object
664
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieResponse::Representation
665
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieResponse
666
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
667
+ command.query['fields'] = fields unless fields.nil?
668
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
669
+ execute_or_queue_command(command, &block)
670
+ end
671
+
672
+ # Looks up user accounts within a project or a tenant based on conditions in the
673
+ # request.
674
+ # @param [String] target_project_id
675
+ # The ID of the project to which the result is scoped.
676
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoRequest] google_cloud_identitytoolkit_v1_query_user_info_request_object
677
+ # @param [String] fields
678
+ # Selector specifying which fields to include in a partial response.
679
+ # @param [String] quota_user
680
+ # Available to use for quota purposes for server-side applications. Can be any
681
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
682
+ # @param [Google::Apis::RequestOptions] options
683
+ # Request-specific options
684
+ #
685
+ # @yield [result, err] Result & error if block supplied
686
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse] parsed result object
687
+ # @yieldparam err [StandardError] error object if request failed
688
+ #
689
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse]
690
+ #
691
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
692
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
693
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
694
+ def query_project_accounts(target_project_id, google_cloud_identitytoolkit_v1_query_user_info_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
695
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}:queryAccounts', options)
696
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoRequest::Representation
697
+ command.request_object = google_cloud_identitytoolkit_v1_query_user_info_request_object
698
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse::Representation
699
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse
700
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
701
+ command.query['fields'] = fields unless fields.nil?
702
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
703
+ execute_or_queue_command(command, &block)
704
+ end
705
+
706
+ # Uploads multiple accounts into the Google Cloud project. If there is a problem
707
+ # uploading one or more of the accounts, the rest will be uploaded, and a list
708
+ # of the errors will be returned. To use this method requires a Google OAuth 2.0
709
+ # credential with proper [permissions](https://cloud.google.com/identity-
710
+ # platform/docs/access-control).
711
+ # @param [String] target_project_id
712
+ # The Project ID of the Identity Platform project which the account belongs to.
713
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountRequest] google_cloud_identitytoolkit_v1_upload_account_request_object
714
+ # @param [String] fields
715
+ # Selector specifying which fields to include in a partial response.
716
+ # @param [String] quota_user
717
+ # Available to use for quota purposes for server-side applications. Can be any
718
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
719
+ # @param [Google::Apis::RequestOptions] options
720
+ # Request-specific options
721
+ #
722
+ # @yield [result, err] Result & error if block supplied
723
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountResponse] parsed result object
724
+ # @yieldparam err [StandardError] error object if request failed
725
+ #
726
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountResponse]
727
+ #
728
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
729
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
730
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
731
+ def batch_project_account_create(target_project_id, google_cloud_identitytoolkit_v1_upload_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
732
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/accounts:batchCreate', options)
733
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountRequest::Representation
734
+ command.request_object = google_cloud_identitytoolkit_v1_upload_account_request_object
735
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountResponse::Representation
736
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountResponse
737
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
738
+ command.query['fields'] = fields unless fields.nil?
739
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
740
+ execute_or_queue_command(command, &block)
741
+ end
742
+
743
+ # Batch deletes multiple accounts. For accounts that fail to be deleted, error
744
+ # info is contained in the response. The method ignores accounts that do not
745
+ # exist or are duplicated in the request. This method requires a Google OAuth 2.
746
+ # 0 credential with proper [permissions] (https://cloud.google.com/identity-
747
+ # platform/docs/access-control).
748
+ # @param [String] target_project_id
749
+ # If `tenant_id` is specified, the ID of the Google Cloud project that the
750
+ # Identity Platform tenant belongs to. Otherwise, the ID of the Google Cloud
751
+ # project that accounts belong to.
752
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsRequest] google_cloud_identitytoolkit_v1_batch_delete_accounts_request_object
753
+ # @param [String] fields
754
+ # Selector specifying which fields to include in a partial response.
755
+ # @param [String] quota_user
756
+ # Available to use for quota purposes for server-side applications. Can be any
757
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
758
+ # @param [Google::Apis::RequestOptions] options
759
+ # Request-specific options
760
+ #
761
+ # @yield [result, err] Result & error if block supplied
762
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsResponse] parsed result object
763
+ # @yieldparam err [StandardError] error object if request failed
764
+ #
765
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsResponse]
766
+ #
767
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
768
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
769
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
770
+ def batch_project_account_delete(target_project_id, google_cloud_identitytoolkit_v1_batch_delete_accounts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
771
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/accounts:batchDelete', options)
772
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsRequest::Representation
773
+ command.request_object = google_cloud_identitytoolkit_v1_batch_delete_accounts_request_object
774
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsResponse::Representation
775
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsResponse
776
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
777
+ command.query['fields'] = fields unless fields.nil?
778
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
779
+ execute_or_queue_command(command, &block)
780
+ end
781
+
782
+ # Download account information for all accounts on the project in a paginated
783
+ # manner. To use this method requires a Google OAuth 2.0 credential with proper [
784
+ # permissions](https://cloud.google.com/identity-platform/docs/access-control)..
785
+ # Furthermore, additional permissions are needed to get password hash, password
786
+ # salt, and password version from accounts; otherwise these fields are redacted.
787
+ # @param [String] target_project_id
788
+ # If `tenant_id` is specified, the ID of the Google Cloud project that the
789
+ # Identity Platform tenant belongs to. Otherwise, the ID of the Google Cloud
790
+ # project that the accounts belong to.
791
+ # @param [Fixnum] delegated_project_number
792
+ # @param [Fixnum] max_results
793
+ # The maximum number of results to return. Must be at least 1 and no greater
794
+ # than 1000. By default, it is 20.
795
+ # @param [String] next_page_token
796
+ # The pagination token from the response of a previous request.
797
+ # @param [String] tenant_id
798
+ # The ID of the Identity Platform tenant the accounts belongs to. If not
799
+ # specified, accounts on the Identity Platform project are returned.
800
+ # @param [String] fields
801
+ # Selector specifying which fields to include in a partial response.
802
+ # @param [String] quota_user
803
+ # Available to use for quota purposes for server-side applications. Can be any
804
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
805
+ # @param [Google::Apis::RequestOptions] options
806
+ # Request-specific options
807
+ #
808
+ # @yield [result, err] Result & error if block supplied
809
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DownloadAccountResponse] parsed result object
810
+ # @yieldparam err [StandardError] error object if request failed
811
+ #
812
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DownloadAccountResponse]
813
+ #
814
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
815
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
816
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
817
+ def batch_project_account_get(target_project_id, delegated_project_number: nil, max_results: nil, next_page_token: nil, tenant_id: nil, fields: nil, quota_user: nil, options: nil, &block)
818
+ command = make_simple_command(:get, 'v1/projects/{+targetProjectId}/accounts:batchGet', options)
819
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DownloadAccountResponse::Representation
820
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DownloadAccountResponse
821
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
822
+ command.query['delegatedProjectNumber'] = delegated_project_number unless delegated_project_number.nil?
823
+ command.query['maxResults'] = max_results unless max_results.nil?
824
+ command.query['nextPageToken'] = next_page_token unless next_page_token.nil?
825
+ command.query['tenantId'] = tenant_id unless tenant_id.nil?
826
+ command.query['fields'] = fields unless fields.nil?
827
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
828
+ execute_or_queue_command(command, &block)
829
+ end
830
+
831
+ # Deletes a user's account.
832
+ # @param [String] target_project_id
833
+ # The ID of the project which the account belongs to. Should only be specified
834
+ # in authenticated requests that specify local_id of an account.
835
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountRequest] google_cloud_identitytoolkit_v1_delete_account_request_object
836
+ # @param [String] fields
837
+ # Selector specifying which fields to include in a partial response.
838
+ # @param [String] quota_user
839
+ # Available to use for quota purposes for server-side applications. Can be any
840
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
841
+ # @param [Google::Apis::RequestOptions] options
842
+ # Request-specific options
843
+ #
844
+ # @yield [result, err] Result & error if block supplied
845
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse] parsed result object
846
+ # @yieldparam err [StandardError] error object if request failed
847
+ #
848
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse]
849
+ #
850
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
851
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
852
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
853
+ def delete_project_account(target_project_id, google_cloud_identitytoolkit_v1_delete_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
854
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/accounts:delete', options)
855
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountRequest::Representation
856
+ command.request_object = google_cloud_identitytoolkit_v1_delete_account_request_object
857
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse::Representation
858
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse
859
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
860
+ command.query['fields'] = fields unless fields.nil?
861
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
862
+ execute_or_queue_command(command, &block)
863
+ end
864
+
865
+ # Gets account information for all matched accounts. For an end user request,
866
+ # retrieves the account of the end user. For an admin request with Google OAuth
867
+ # 2.0 credential, retrieves one or multiple account(s) with matching criteria.
868
+ # @param [String] target_project_id
869
+ # The ID of the Google Cloud project that the account or the Identity Platform
870
+ # tenant specified by `tenant_id` belongs to. Should only be specified by
871
+ # authenticated requests bearing a Google OAuth 2.0 credential with proper [
872
+ # permissions](https://cloud.google.com/identity-platform/docs/access-control).
873
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoRequest] google_cloud_identitytoolkit_v1_get_account_info_request_object
874
+ # @param [String] fields
875
+ # Selector specifying which fields to include in a partial response.
876
+ # @param [String] quota_user
877
+ # Available to use for quota purposes for server-side applications. Can be any
878
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
879
+ # @param [Google::Apis::RequestOptions] options
880
+ # Request-specific options
881
+ #
882
+ # @yield [result, err] Result & error if block supplied
883
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse] parsed result object
884
+ # @yieldparam err [StandardError] error object if request failed
885
+ #
886
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse]
887
+ #
888
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
889
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
890
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
891
+ def lookup_project_account(target_project_id, google_cloud_identitytoolkit_v1_get_account_info_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
892
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/accounts:lookup', options)
893
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoRequest::Representation
894
+ command.request_object = google_cloud_identitytoolkit_v1_get_account_info_request_object
895
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse::Representation
896
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse
897
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
898
+ command.query['fields'] = fields unless fields.nil?
899
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
900
+ execute_or_queue_command(command, &block)
901
+ end
902
+
903
+ # Looks up user accounts within a project or a tenant based on conditions in the
904
+ # request.
905
+ # @param [String] target_project_id
906
+ # The ID of the project to which the result is scoped.
907
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoRequest] google_cloud_identitytoolkit_v1_query_user_info_request_object
908
+ # @param [String] fields
909
+ # Selector specifying which fields to include in a partial response.
910
+ # @param [String] quota_user
911
+ # Available to use for quota purposes for server-side applications. Can be any
912
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
913
+ # @param [Google::Apis::RequestOptions] options
914
+ # Request-specific options
915
+ #
916
+ # @yield [result, err] Result & error if block supplied
917
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse] parsed result object
918
+ # @yieldparam err [StandardError] error object if request failed
919
+ #
920
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse]
921
+ #
922
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
923
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
924
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
925
+ def query_project_account(target_project_id, google_cloud_identitytoolkit_v1_query_user_info_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
926
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/accounts:query', options)
927
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoRequest::Representation
928
+ command.request_object = google_cloud_identitytoolkit_v1_query_user_info_request_object
929
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse::Representation
930
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse
931
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
932
+ command.query['fields'] = fields unless fields.nil?
933
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
934
+ execute_or_queue_command(command, &block)
935
+ end
936
+
937
+ # Sends an out-of-band confirmation code for an account. Requests from a
938
+ # authenticated request can optionally return a link including the OOB code
939
+ # instead of sending it.
940
+ # @param [String] target_project_id
941
+ # The Project ID of the Identity Platform project which the account belongs to.
942
+ # To specify this field, it requires a Google OAuth 2.0 credential with proper [
943
+ # permissions](https://cloud.google.com/identity-platform/docs/access-control).
944
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeRequest] google_cloud_identitytoolkit_v1_get_oob_code_request_object
945
+ # @param [String] fields
946
+ # Selector specifying which fields to include in a partial response.
947
+ # @param [String] quota_user
948
+ # Available to use for quota purposes for server-side applications. Can be any
949
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
950
+ # @param [Google::Apis::RequestOptions] options
951
+ # Request-specific options
952
+ #
953
+ # @yield [result, err] Result & error if block supplied
954
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse] parsed result object
955
+ # @yieldparam err [StandardError] error object if request failed
956
+ #
957
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse]
958
+ #
959
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
960
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
961
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
962
+ def send_project_account_oob_code(target_project_id, google_cloud_identitytoolkit_v1_get_oob_code_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
963
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/accounts:sendOobCode', options)
964
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeRequest::Representation
965
+ command.request_object = google_cloud_identitytoolkit_v1_get_oob_code_request_object
966
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse::Representation
967
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse
968
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
969
+ command.query['fields'] = fields unless fields.nil?
970
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
971
+ execute_or_queue_command(command, &block)
972
+ end
973
+
974
+ # Updates account-related information for the specified user by setting specific
975
+ # fields or applying action codes. Requests from administrators and end users
976
+ # are supported.
977
+ # @param [String] target_project_id
978
+ # The project ID for the project that the account belongs to. Specifying this
979
+ # field requires Google OAuth 2.0 credential with proper [permissions] (https://
980
+ # cloud.google.com/identity-platform/docs/access-control). Requests from end
981
+ # users should pass an Identity Platform ID token instead.
982
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoRequest] google_cloud_identitytoolkit_v1_set_account_info_request_object
983
+ # @param [String] fields
984
+ # Selector specifying which fields to include in a partial response.
985
+ # @param [String] quota_user
986
+ # Available to use for quota purposes for server-side applications. Can be any
987
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
988
+ # @param [Google::Apis::RequestOptions] options
989
+ # Request-specific options
990
+ #
991
+ # @yield [result, err] Result & error if block supplied
992
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse] parsed result object
993
+ # @yieldparam err [StandardError] error object if request failed
994
+ #
995
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse]
996
+ #
997
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
998
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
999
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1000
+ def update_project_account(target_project_id, google_cloud_identitytoolkit_v1_set_account_info_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1001
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/accounts:update', options)
1002
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoRequest::Representation
1003
+ command.request_object = google_cloud_identitytoolkit_v1_set_account_info_request_object
1004
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse::Representation
1005
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse
1006
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
1007
+ command.query['fields'] = fields unless fields.nil?
1008
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1009
+ execute_or_queue_command(command, &block)
1010
+ end
1011
+
1012
+ # Signs up a new email and password user or anonymous user, or upgrades an
1013
+ # anonymous user to email and password. For an admin request with a Google OAuth
1014
+ # 2.0 credential with the proper [permissions](https://cloud.google.com/identity-
1015
+ # platform/docs/access-control), creates a new anonymous, email and password, or
1016
+ # phone number user. An [API key](https://cloud.google.com/docs/authentication/
1017
+ # api-keys) is required in the request in order to identify the Google Cloud
1018
+ # project.
1019
+ # @param [String] target_project_id
1020
+ # The project ID of the project which the user should belong to. Specifying this
1021
+ # field requires a Google OAuth 2.0 credential with the proper [permissions](
1022
+ # https://cloud.google.com/identity-platform/docs/access-control). If this is
1023
+ # not set, the target project is inferred from the scope associated to the
1024
+ # Bearer access token.
1025
+ # @param [String] tenant_id
1026
+ # The ID of the Identity Platform tenant to create a user under. If not set, the
1027
+ # user will be created under the default Identity Platform project.
1028
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpRequest] google_cloud_identitytoolkit_v1_sign_up_request_object
1029
+ # @param [String] fields
1030
+ # Selector specifying which fields to include in a partial response.
1031
+ # @param [String] quota_user
1032
+ # Available to use for quota purposes for server-side applications. Can be any
1033
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1034
+ # @param [Google::Apis::RequestOptions] options
1035
+ # Request-specific options
1036
+ #
1037
+ # @yield [result, err] Result & error if block supplied
1038
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse] parsed result object
1039
+ # @yieldparam err [StandardError] error object if request failed
1040
+ #
1041
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse]
1042
+ #
1043
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1044
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1045
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1046
+ def accounts_project_tenant(target_project_id, tenant_id, google_cloud_identitytoolkit_v1_sign_up_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1047
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/tenants/{+tenantId}/accounts', options)
1048
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpRequest::Representation
1049
+ command.request_object = google_cloud_identitytoolkit_v1_sign_up_request_object
1050
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse::Representation
1051
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SignUpResponse
1052
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
1053
+ command.params['tenantId'] = tenant_id unless tenant_id.nil?
1054
+ command.query['fields'] = fields unless fields.nil?
1055
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1056
+ execute_or_queue_command(command, &block)
1057
+ end
1058
+
1059
+ # Creates a session cookie for the given Identity Platform ID token. The session
1060
+ # cookie is used by the client to preserve the user's login state.
1061
+ # @param [String] target_project_id
1062
+ # The ID of the project that the account belongs to.
1063
+ # @param [String] tenant_id
1064
+ # The tenant ID of the Identity Platform tenant the account belongs to.
1065
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieRequest] google_cloud_identitytoolkit_v1_create_session_cookie_request_object
1066
+ # @param [String] fields
1067
+ # Selector specifying which fields to include in a partial response.
1068
+ # @param [String] quota_user
1069
+ # Available to use for quota purposes for server-side applications. Can be any
1070
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1071
+ # @param [Google::Apis::RequestOptions] options
1072
+ # Request-specific options
1073
+ #
1074
+ # @yield [result, err] Result & error if block supplied
1075
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieResponse] parsed result object
1076
+ # @yieldparam err [StandardError] error object if request failed
1077
+ #
1078
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieResponse]
1079
+ #
1080
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1081
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1082
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1083
+ def create_project_tenant_session_cookie(target_project_id, tenant_id, google_cloud_identitytoolkit_v1_create_session_cookie_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1084
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/tenants/{+tenantId}:createSessionCookie', options)
1085
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieRequest::Representation
1086
+ command.request_object = google_cloud_identitytoolkit_v1_create_session_cookie_request_object
1087
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieResponse::Representation
1088
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1CreateSessionCookieResponse
1089
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
1090
+ command.params['tenantId'] = tenant_id unless tenant_id.nil?
1091
+ command.query['fields'] = fields unless fields.nil?
1092
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1093
+ execute_or_queue_command(command, &block)
1094
+ end
1095
+
1096
+ # Uploads multiple accounts into the Google Cloud project. If there is a problem
1097
+ # uploading one or more of the accounts, the rest will be uploaded, and a list
1098
+ # of the errors will be returned. To use this method requires a Google OAuth 2.0
1099
+ # credential with proper [permissions](https://cloud.google.com/identity-
1100
+ # platform/docs/access-control).
1101
+ # @param [String] target_project_id
1102
+ # The Project ID of the Identity Platform project which the account belongs to.
1103
+ # @param [String] tenant_id
1104
+ # The ID of the Identity Platform tenant the account belongs to.
1105
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountRequest] google_cloud_identitytoolkit_v1_upload_account_request_object
1106
+ # @param [String] fields
1107
+ # Selector specifying which fields to include in a partial response.
1108
+ # @param [String] quota_user
1109
+ # Available to use for quota purposes for server-side applications. Can be any
1110
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1111
+ # @param [Google::Apis::RequestOptions] options
1112
+ # Request-specific options
1113
+ #
1114
+ # @yield [result, err] Result & error if block supplied
1115
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountResponse] parsed result object
1116
+ # @yieldparam err [StandardError] error object if request failed
1117
+ #
1118
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountResponse]
1119
+ #
1120
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1121
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1122
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1123
+ def batch_project_tenant_account_create(target_project_id, tenant_id, google_cloud_identitytoolkit_v1_upload_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1124
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/tenants/{+tenantId}/accounts:batchCreate', options)
1125
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountRequest::Representation
1126
+ command.request_object = google_cloud_identitytoolkit_v1_upload_account_request_object
1127
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountResponse::Representation
1128
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1UploadAccountResponse
1129
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
1130
+ command.params['tenantId'] = tenant_id unless tenant_id.nil?
1131
+ command.query['fields'] = fields unless fields.nil?
1132
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1133
+ execute_or_queue_command(command, &block)
1134
+ end
1135
+
1136
+ # Batch deletes multiple accounts. For accounts that fail to be deleted, error
1137
+ # info is contained in the response. The method ignores accounts that do not
1138
+ # exist or are duplicated in the request. This method requires a Google OAuth 2.
1139
+ # 0 credential with proper [permissions] (https://cloud.google.com/identity-
1140
+ # platform/docs/access-control).
1141
+ # @param [String] target_project_id
1142
+ # If `tenant_id` is specified, the ID of the Google Cloud project that the
1143
+ # Identity Platform tenant belongs to. Otherwise, the ID of the Google Cloud
1144
+ # project that accounts belong to.
1145
+ # @param [String] tenant_id
1146
+ # If the accounts belong to an Identity Platform tenant, the ID of the tenant.
1147
+ # If the accounts belong to an default Identity Platform project, the field is
1148
+ # not needed.
1149
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsRequest] google_cloud_identitytoolkit_v1_batch_delete_accounts_request_object
1150
+ # @param [String] fields
1151
+ # Selector specifying which fields to include in a partial response.
1152
+ # @param [String] quota_user
1153
+ # Available to use for quota purposes for server-side applications. Can be any
1154
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1155
+ # @param [Google::Apis::RequestOptions] options
1156
+ # Request-specific options
1157
+ #
1158
+ # @yield [result, err] Result & error if block supplied
1159
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsResponse] parsed result object
1160
+ # @yieldparam err [StandardError] error object if request failed
1161
+ #
1162
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsResponse]
1163
+ #
1164
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1165
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1166
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1167
+ def batch_project_tenant_account_delete(target_project_id, tenant_id, google_cloud_identitytoolkit_v1_batch_delete_accounts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1168
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/tenants/{+tenantId}/accounts:batchDelete', options)
1169
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsRequest::Representation
1170
+ command.request_object = google_cloud_identitytoolkit_v1_batch_delete_accounts_request_object
1171
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsResponse::Representation
1172
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1BatchDeleteAccountsResponse
1173
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
1174
+ command.params['tenantId'] = tenant_id unless tenant_id.nil?
1175
+ command.query['fields'] = fields unless fields.nil?
1176
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1177
+ execute_or_queue_command(command, &block)
1178
+ end
1179
+
1180
+ # Download account information for all accounts on the project in a paginated
1181
+ # manner. To use this method requires a Google OAuth 2.0 credential with proper [
1182
+ # permissions](https://cloud.google.com/identity-platform/docs/access-control)..
1183
+ # Furthermore, additional permissions are needed to get password hash, password
1184
+ # salt, and password version from accounts; otherwise these fields are redacted.
1185
+ # @param [String] target_project_id
1186
+ # If `tenant_id` is specified, the ID of the Google Cloud project that the
1187
+ # Identity Platform tenant belongs to. Otherwise, the ID of the Google Cloud
1188
+ # project that the accounts belong to.
1189
+ # @param [String] tenant_id
1190
+ # The ID of the Identity Platform tenant the accounts belongs to. If not
1191
+ # specified, accounts on the Identity Platform project are returned.
1192
+ # @param [Fixnum] delegated_project_number
1193
+ # @param [Fixnum] max_results
1194
+ # The maximum number of results to return. Must be at least 1 and no greater
1195
+ # than 1000. By default, it is 20.
1196
+ # @param [String] next_page_token
1197
+ # The pagination token from the response of a previous request.
1198
+ # @param [String] fields
1199
+ # Selector specifying which fields to include in a partial response.
1200
+ # @param [String] quota_user
1201
+ # Available to use for quota purposes for server-side applications. Can be any
1202
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1203
+ # @param [Google::Apis::RequestOptions] options
1204
+ # Request-specific options
1205
+ #
1206
+ # @yield [result, err] Result & error if block supplied
1207
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DownloadAccountResponse] parsed result object
1208
+ # @yieldparam err [StandardError] error object if request failed
1209
+ #
1210
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DownloadAccountResponse]
1211
+ #
1212
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1213
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1214
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1215
+ def batch_project_tenant_account_get(target_project_id, tenant_id, delegated_project_number: nil, max_results: nil, next_page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1216
+ command = make_simple_command(:get, 'v1/projects/{+targetProjectId}/tenants/{+tenantId}/accounts:batchGet', options)
1217
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DownloadAccountResponse::Representation
1218
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DownloadAccountResponse
1219
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
1220
+ command.params['tenantId'] = tenant_id unless tenant_id.nil?
1221
+ command.query['delegatedProjectNumber'] = delegated_project_number unless delegated_project_number.nil?
1222
+ command.query['maxResults'] = max_results unless max_results.nil?
1223
+ command.query['nextPageToken'] = next_page_token unless next_page_token.nil?
1224
+ command.query['fields'] = fields unless fields.nil?
1225
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1226
+ execute_or_queue_command(command, &block)
1227
+ end
1228
+
1229
+ # Deletes a user's account.
1230
+ # @param [String] target_project_id
1231
+ # The ID of the project which the account belongs to. Should only be specified
1232
+ # in authenticated requests that specify local_id of an account.
1233
+ # @param [String] tenant_id
1234
+ # The ID of the tenant that the account belongs to, if applicable. Only require
1235
+ # to be specified for authenticated requests bearing a Google OAuth 2.0
1236
+ # credential that specify local_id of an account that belongs to an Identity
1237
+ # Platform tenant.
1238
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountRequest] google_cloud_identitytoolkit_v1_delete_account_request_object
1239
+ # @param [String] fields
1240
+ # Selector specifying which fields to include in a partial response.
1241
+ # @param [String] quota_user
1242
+ # Available to use for quota purposes for server-side applications. Can be any
1243
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1244
+ # @param [Google::Apis::RequestOptions] options
1245
+ # Request-specific options
1246
+ #
1247
+ # @yield [result, err] Result & error if block supplied
1248
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse] parsed result object
1249
+ # @yieldparam err [StandardError] error object if request failed
1250
+ #
1251
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse]
1252
+ #
1253
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1254
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1255
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1256
+ def delete_project_tenant_account(target_project_id, tenant_id, google_cloud_identitytoolkit_v1_delete_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1257
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/tenants/{+tenantId}/accounts:delete', options)
1258
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountRequest::Representation
1259
+ command.request_object = google_cloud_identitytoolkit_v1_delete_account_request_object
1260
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse::Representation
1261
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1DeleteAccountResponse
1262
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
1263
+ command.params['tenantId'] = tenant_id unless tenant_id.nil?
1264
+ command.query['fields'] = fields unless fields.nil?
1265
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1266
+ execute_or_queue_command(command, &block)
1267
+ end
1268
+
1269
+ # Gets account information for all matched accounts. For an end user request,
1270
+ # retrieves the account of the end user. For an admin request with Google OAuth
1271
+ # 2.0 credential, retrieves one or multiple account(s) with matching criteria.
1272
+ # @param [String] target_project_id
1273
+ # The ID of the Google Cloud project that the account or the Identity Platform
1274
+ # tenant specified by `tenant_id` belongs to. Should only be specified by
1275
+ # authenticated requests bearing a Google OAuth 2.0 credential with proper [
1276
+ # permissions](https://cloud.google.com/identity-platform/docs/access-control).
1277
+ # @param [String] tenant_id
1278
+ # The ID of the tenant that the account belongs to. Should only be specified by
1279
+ # authenticated requests from a developer.
1280
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoRequest] google_cloud_identitytoolkit_v1_get_account_info_request_object
1281
+ # @param [String] fields
1282
+ # Selector specifying which fields to include in a partial response.
1283
+ # @param [String] quota_user
1284
+ # Available to use for quota purposes for server-side applications. Can be any
1285
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1286
+ # @param [Google::Apis::RequestOptions] options
1287
+ # Request-specific options
1288
+ #
1289
+ # @yield [result, err] Result & error if block supplied
1290
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse] parsed result object
1291
+ # @yieldparam err [StandardError] error object if request failed
1292
+ #
1293
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse]
1294
+ #
1295
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1296
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1297
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1298
+ def lookup_project_tenant_account(target_project_id, tenant_id, google_cloud_identitytoolkit_v1_get_account_info_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1299
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/tenants/{+tenantId}/accounts:lookup', options)
1300
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoRequest::Representation
1301
+ command.request_object = google_cloud_identitytoolkit_v1_get_account_info_request_object
1302
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse::Representation
1303
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetAccountInfoResponse
1304
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
1305
+ command.params['tenantId'] = tenant_id unless tenant_id.nil?
1306
+ command.query['fields'] = fields unless fields.nil?
1307
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1308
+ execute_or_queue_command(command, &block)
1309
+ end
1310
+
1311
+ # Looks up user accounts within a project or a tenant based on conditions in the
1312
+ # request.
1313
+ # @param [String] target_project_id
1314
+ # The ID of the project to which the result is scoped.
1315
+ # @param [String] tenant_id
1316
+ # The ID of the tenant to which the result is scoped.
1317
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoRequest] google_cloud_identitytoolkit_v1_query_user_info_request_object
1318
+ # @param [String] fields
1319
+ # Selector specifying which fields to include in a partial response.
1320
+ # @param [String] quota_user
1321
+ # Available to use for quota purposes for server-side applications. Can be any
1322
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1323
+ # @param [Google::Apis::RequestOptions] options
1324
+ # Request-specific options
1325
+ #
1326
+ # @yield [result, err] Result & error if block supplied
1327
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse] parsed result object
1328
+ # @yieldparam err [StandardError] error object if request failed
1329
+ #
1330
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse]
1331
+ #
1332
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1333
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1334
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1335
+ def query_project_tenant_account(target_project_id, tenant_id, google_cloud_identitytoolkit_v1_query_user_info_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1336
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/tenants/{+tenantId}/accounts:query', options)
1337
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoRequest::Representation
1338
+ command.request_object = google_cloud_identitytoolkit_v1_query_user_info_request_object
1339
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse::Representation
1340
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1QueryUserInfoResponse
1341
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
1342
+ command.params['tenantId'] = tenant_id unless tenant_id.nil?
1343
+ command.query['fields'] = fields unless fields.nil?
1344
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1345
+ execute_or_queue_command(command, &block)
1346
+ end
1347
+
1348
+ # Sends an out-of-band confirmation code for an account. Requests from a
1349
+ # authenticated request can optionally return a link including the OOB code
1350
+ # instead of sending it.
1351
+ # @param [String] target_project_id
1352
+ # The Project ID of the Identity Platform project which the account belongs to.
1353
+ # To specify this field, it requires a Google OAuth 2.0 credential with proper [
1354
+ # permissions](https://cloud.google.com/identity-platform/docs/access-control).
1355
+ # @param [String] tenant_id
1356
+ # The tenant ID of the Identity Platform tenant the account belongs to.
1357
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeRequest] google_cloud_identitytoolkit_v1_get_oob_code_request_object
1358
+ # @param [String] fields
1359
+ # Selector specifying which fields to include in a partial response.
1360
+ # @param [String] quota_user
1361
+ # Available to use for quota purposes for server-side applications. Can be any
1362
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1363
+ # @param [Google::Apis::RequestOptions] options
1364
+ # Request-specific options
1365
+ #
1366
+ # @yield [result, err] Result & error if block supplied
1367
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse] parsed result object
1368
+ # @yieldparam err [StandardError] error object if request failed
1369
+ #
1370
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse]
1371
+ #
1372
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1373
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1374
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1375
+ def send_project_tenant_account_oob_code(target_project_id, tenant_id, google_cloud_identitytoolkit_v1_get_oob_code_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1376
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/tenants/{+tenantId}/accounts:sendOobCode', options)
1377
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeRequest::Representation
1378
+ command.request_object = google_cloud_identitytoolkit_v1_get_oob_code_request_object
1379
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse::Representation
1380
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetOobCodeResponse
1381
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
1382
+ command.params['tenantId'] = tenant_id unless tenant_id.nil?
1383
+ command.query['fields'] = fields unless fields.nil?
1384
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1385
+ execute_or_queue_command(command, &block)
1386
+ end
1387
+
1388
+ # Updates account-related information for the specified user by setting specific
1389
+ # fields or applying action codes. Requests from administrators and end users
1390
+ # are supported.
1391
+ # @param [String] target_project_id
1392
+ # The project ID for the project that the account belongs to. Specifying this
1393
+ # field requires Google OAuth 2.0 credential with proper [permissions] (https://
1394
+ # cloud.google.com/identity-platform/docs/access-control). Requests from end
1395
+ # users should pass an Identity Platform ID token instead.
1396
+ # @param [String] tenant_id
1397
+ # The tenant ID of the Identity Platform tenant that the account belongs to.
1398
+ # Requests from end users should pass an Identity Platform ID token rather than
1399
+ # setting this field.
1400
+ # @param [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoRequest] google_cloud_identitytoolkit_v1_set_account_info_request_object
1401
+ # @param [String] fields
1402
+ # Selector specifying which fields to include in a partial response.
1403
+ # @param [String] quota_user
1404
+ # Available to use for quota purposes for server-side applications. Can be any
1405
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1406
+ # @param [Google::Apis::RequestOptions] options
1407
+ # Request-specific options
1408
+ #
1409
+ # @yield [result, err] Result & error if block supplied
1410
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse] parsed result object
1411
+ # @yieldparam err [StandardError] error object if request failed
1412
+ #
1413
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse]
1414
+ #
1415
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1416
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1417
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1418
+ def update_project_tenant_account(target_project_id, tenant_id, google_cloud_identitytoolkit_v1_set_account_info_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1419
+ command = make_simple_command(:post, 'v1/projects/{+targetProjectId}/tenants/{+tenantId}/accounts:update', options)
1420
+ command.request_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoRequest::Representation
1421
+ command.request_object = google_cloud_identitytoolkit_v1_set_account_info_request_object
1422
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse::Representation
1423
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1SetAccountInfoResponse
1424
+ command.params['targetProjectId'] = target_project_id unless target_project_id.nil?
1425
+ command.params['tenantId'] = tenant_id unless tenant_id.nil?
1426
+ command.query['fields'] = fields unless fields.nil?
1427
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1428
+ execute_or_queue_command(command, &block)
1429
+ end
1430
+
1431
+ # Gets a project's public Identity Toolkit configuration. (Legacy) This method
1432
+ # also supports authenticated calls from a developer to retrieve non-public
1433
+ # configuration.
1434
+ # @param [String] android_package_name
1435
+ # Android package name to check against the real android package name. If this
1436
+ # field is provided, and sha1_cert_hash is not provided, the action will throw
1437
+ # an error if this does not match the real android package name.
1438
+ # @param [String] client_id
1439
+ # The RP OAuth client ID. If set, a check will be performed to ensure that the
1440
+ # OAuth client is valid for the retrieved project and the request rejected with
1441
+ # a client error if not valid.
1442
+ # @param [Fixnum] delegated_project_number
1443
+ # Project Number of the delegated project request. This field should only be
1444
+ # used as part of the Firebase V1 migration.
1445
+ # @param [String] firebase_app_id
1446
+ # The Firebase app ID, for applications that use Firebase. This can be found in
1447
+ # the Firebase console for your project. If set, a check will be performed to
1448
+ # ensure that the app ID is valid for the retrieved project. If not valid, the
1449
+ # request will be rejected with a client error.
1450
+ # @param [String] ios_bundle_id
1451
+ # iOS bundle id to check against the real ios bundle id. If this field is
1452
+ # provided, the action will throw an error if this does not match the real iOS
1453
+ # bundle id.
1454
+ # @param [Fixnum] project_number
1455
+ # Project number of the configuration to retrieve. This field is deprecated and
1456
+ # should not be used by new integrations.
1457
+ # @param [Boolean] return_dynamic_link
1458
+ # Whether dynamic link should be returned.
1459
+ # @param [String] sha1_cert
1460
+ # SHA-1 Android application cert hash. If set, a check will be performed to
1461
+ # ensure that the cert hash is valid for the retrieved project and
1462
+ # android_package_name.
1463
+ # @param [String] fields
1464
+ # Selector specifying which fields to include in a partial response.
1465
+ # @param [String] quota_user
1466
+ # Available to use for quota purposes for server-side applications. Can be any
1467
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1468
+ # @param [Google::Apis::RequestOptions] options
1469
+ # Request-specific options
1470
+ #
1471
+ # @yield [result, err] Result & error if block supplied
1472
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetProjectConfigResponse] parsed result object
1473
+ # @yieldparam err [StandardError] error object if request failed
1474
+ #
1475
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetProjectConfigResponse]
1476
+ #
1477
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1478
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1479
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1480
+ def get_projects(android_package_name: nil, client_id: nil, delegated_project_number: nil, firebase_app_id: nil, ios_bundle_id: nil, project_number: nil, return_dynamic_link: nil, sha1_cert: nil, fields: nil, quota_user: nil, options: nil, &block)
1481
+ command = make_simple_command(:get, 'v1/projects', options)
1482
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetProjectConfigResponse::Representation
1483
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetProjectConfigResponse
1484
+ command.query['androidPackageName'] = android_package_name unless android_package_name.nil?
1485
+ command.query['clientId'] = client_id unless client_id.nil?
1486
+ command.query['delegatedProjectNumber'] = delegated_project_number unless delegated_project_number.nil?
1487
+ command.query['firebaseAppId'] = firebase_app_id unless firebase_app_id.nil?
1488
+ command.query['iosBundleId'] = ios_bundle_id unless ios_bundle_id.nil?
1489
+ command.query['projectNumber'] = project_number unless project_number.nil?
1490
+ command.query['returnDynamicLink'] = return_dynamic_link unless return_dynamic_link.nil?
1491
+ command.query['sha1Cert'] = sha1_cert unless sha1_cert.nil?
1492
+ command.query['fields'] = fields unless fields.nil?
1493
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1494
+ execute_or_queue_command(command, &block)
1495
+ end
1496
+
1497
+ # Retrieves public keys of the legacy Identity Toolkit token signer to enable
1498
+ # third parties to verify the legacy ID token. For now the X509 pem cert is the
1499
+ # only format supported.
1500
+ # @param [String] fields
1501
+ # Selector specifying which fields to include in a partial response.
1502
+ # @param [String] quota_user
1503
+ # Available to use for quota purposes for server-side applications. Can be any
1504
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1505
+ # @param [Google::Apis::RequestOptions] options
1506
+ # Request-specific options
1507
+ #
1508
+ # @yield [result, err] Result & error if block supplied
1509
+ # @yieldparam result [NilClass] No result returned for this method
1510
+ # @yieldparam err [StandardError] error object if request failed
1511
+ #
1512
+ # @return [void]
1513
+ #
1514
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1515
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1516
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1517
+ def get_public_keys(fields: nil, quota_user: nil, options: nil, &block)
1518
+ command = make_simple_command(:get, 'v1/publicKeys', options)
1519
+ command.query['fields'] = fields unless fields.nil?
1520
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1521
+ execute_or_queue_command(command, &block)
1522
+ end
1523
+
1524
+ # Gets parameters needed for generating a reCAPTCHA challenge.
1525
+ # @param [String] fields
1526
+ # Selector specifying which fields to include in a partial response.
1527
+ # @param [String] quota_user
1528
+ # Available to use for quota purposes for server-side applications. Can be any
1529
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1530
+ # @param [Google::Apis::RequestOptions] options
1531
+ # Request-specific options
1532
+ #
1533
+ # @yield [result, err] Result & error if block supplied
1534
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetRecaptchaParamResponse] parsed result object
1535
+ # @yieldparam err [StandardError] error object if request failed
1536
+ #
1537
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetRecaptchaParamResponse]
1538
+ #
1539
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1540
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1541
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1542
+ def get_recaptcha_params(fields: nil, quota_user: nil, options: nil, &block)
1543
+ command = make_simple_command(:get, 'v1/recaptchaParams', options)
1544
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetRecaptchaParamResponse::Representation
1545
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetRecaptchaParamResponse
1546
+ command.query['fields'] = fields unless fields.nil?
1547
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1548
+ execute_or_queue_command(command, &block)
1549
+ end
1550
+
1551
+ # Retrieves the set of public keys of the session cookie JSON Web Token (JWT)
1552
+ # signer that can be used to validate the session cookie created through
1553
+ # createSessionCookie.
1554
+ # @param [String] fields
1555
+ # Selector specifying which fields to include in a partial response.
1556
+ # @param [String] quota_user
1557
+ # Available to use for quota purposes for server-side applications. Can be any
1558
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1559
+ # @param [Google::Apis::RequestOptions] options
1560
+ # Request-specific options
1561
+ #
1562
+ # @yield [result, err] Result & error if block supplied
1563
+ # @yieldparam result [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetSessionCookiePublicKeysResponse] parsed result object
1564
+ # @yieldparam err [StandardError] error object if request failed
1565
+ #
1566
+ # @return [Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetSessionCookiePublicKeysResponse]
1567
+ #
1568
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1569
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1570
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1571
+ def get_session_cookie_public_keys(fields: nil, quota_user: nil, options: nil, &block)
1572
+ command = make_simple_command(:get, 'v1/sessionCookiePublicKeys', options)
1573
+ command.response_representation = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetSessionCookiePublicKeysResponse::Representation
1574
+ command.response_class = Google::Apis::IdentitytoolkitV1::GoogleCloudIdentitytoolkitV1GetSessionCookiePublicKeysResponse
1575
+ command.query['fields'] = fields unless fields.nil?
1576
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1577
+ execute_or_queue_command(command, &block)
1578
+ end
1579
+
1580
+ protected
1581
+
1582
+ def apply_command_defaults(command)
1583
+ command.query['key'] = key unless key.nil?
1584
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1585
+ end
1586
+ end
1587
+ end
1588
+ end
1589
+ end