google-apis-agentidentity_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,927 @@
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 AgentidentityV1
23
+ # Agent Identity API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/agentidentity_v1'
29
+ #
30
+ # Agentidentity = Google::Apis::AgentidentityV1 # Alias the module
31
+ # service = Agentidentity::AgentIdentityService.new
32
+ #
33
+ # @see https://cloud.google.com/iam/docs/
34
+ class AgentIdentityService < Google::Apis::Core::BaseService
35
+ DEFAULT_ENDPOINT_TEMPLATE = "https://agentidentity.$UNIVERSE_DOMAIN$/"
36
+
37
+ # @return [String]
38
+ # API key. Your API key identifies your project and provides you with API access,
39
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
40
+ attr_accessor :key
41
+
42
+ # @return [String]
43
+ # Available to use for quota purposes for server-side applications. Can be any
44
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
45
+ attr_accessor :quota_user
46
+
47
+ def initialize
48
+ super(DEFAULT_ENDPOINT_TEMPLATE, '',
49
+ client_name: 'google-apis-agentidentity_v1',
50
+ client_version: Google::Apis::AgentidentityV1::GEM_VERSION)
51
+ @batch_path = 'batch'
52
+ end
53
+
54
+ # Gets information about a location.
55
+ # @param [String] name
56
+ # Resource name for the location.
57
+ # @param [String] fields
58
+ # Selector specifying which fields to include in a partial response.
59
+ # @param [String] quota_user
60
+ # Available to use for quota purposes for server-side applications. Can be any
61
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
62
+ # @param [Google::Apis::RequestOptions] options
63
+ # Request-specific options
64
+ #
65
+ # @yield [result, err] Result & error if block supplied
66
+ # @yieldparam result [Google::Apis::AgentidentityV1::Location] parsed result object
67
+ # @yieldparam err [StandardError] error object if request failed
68
+ #
69
+ # @return [Google::Apis::AgentidentityV1::Location]
70
+ #
71
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
72
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
73
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
74
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
75
+ command = make_simple_command(:get, 'v1/{+name}', options)
76
+ command.response_representation = Google::Apis::AgentidentityV1::Location::Representation
77
+ command.response_class = Google::Apis::AgentidentityV1::Location
78
+ command.params['name'] = name unless name.nil?
79
+ command.query['fields'] = fields unless fields.nil?
80
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
81
+ execute_or_queue_command(command, &block)
82
+ end
83
+
84
+ # Lists information about the supported locations for this service. This method
85
+ # lists locations based on the resource scope provided in the
86
+ # ListLocationsRequest.name field: * **Global locations**: If `name` is empty,
87
+ # the method lists the public locations available to all projects. * **Project-
88
+ # specific locations**: If `name` follows the format `projects/`project``, the
89
+ # method lists locations visible to that specific project. This includes public,
90
+ # private, or other project-specific locations enabled for the project. For gRPC
91
+ # and client library implementations, the resource name is passed as the `name`
92
+ # field. For direct service calls, the resource name is incorporated into the
93
+ # request path based on the specific service implementation and version.
94
+ # @param [String] name
95
+ # The resource that owns the locations collection, if applicable.
96
+ # @param [Array<String>, String] extra_location_types
97
+ # Optional. Do not use this field unless explicitly documented otherwise. This
98
+ # is primarily for internal usage.
99
+ # @param [String] filter
100
+ # A filter to narrow down results to a preferred subset. The filtering language
101
+ # accepts strings like `"displayName=tokyo"`, and is documented in more detail
102
+ # in [AIP-160](https://google.aip.dev/160).
103
+ # @param [Fixnum] page_size
104
+ # The maximum number of results to return. If not set, the service selects a
105
+ # default.
106
+ # @param [String] page_token
107
+ # A page token received from the `next_page_token` field in the response. Send
108
+ # that page token to receive the subsequent page.
109
+ # @param [String] fields
110
+ # Selector specifying which fields to include in a partial response.
111
+ # @param [String] quota_user
112
+ # Available to use for quota purposes for server-side applications. Can be any
113
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
114
+ # @param [Google::Apis::RequestOptions] options
115
+ # Request-specific options
116
+ #
117
+ # @yield [result, err] Result & error if block supplied
118
+ # @yieldparam result [Google::Apis::AgentidentityV1::ListLocationsResponse] parsed result object
119
+ # @yieldparam err [StandardError] error object if request failed
120
+ #
121
+ # @return [Google::Apis::AgentidentityV1::ListLocationsResponse]
122
+ #
123
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
124
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
125
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
126
+ def list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
127
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
128
+ command.response_representation = Google::Apis::AgentidentityV1::ListLocationsResponse::Representation
129
+ command.response_class = Google::Apis::AgentidentityV1::ListLocationsResponse
130
+ command.params['name'] = name unless name.nil?
131
+ command.query['extraLocationTypes'] = extra_location_types unless extra_location_types.nil?
132
+ command.query['filter'] = filter unless filter.nil?
133
+ command.query['pageSize'] = page_size unless page_size.nil?
134
+ command.query['pageToken'] = page_token unless page_token.nil?
135
+ command.query['fields'] = fields unless fields.nil?
136
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
137
+ execute_or_queue_command(command, &block)
138
+ end
139
+
140
+ # Gets details of a single AccessSummary.
141
+ # @param [String] name
142
+ # Required. Name of the resource
143
+ # @param [String] fields
144
+ # Selector specifying which fields to include in a partial response.
145
+ # @param [String] quota_user
146
+ # Available to use for quota purposes for server-side applications. Can be any
147
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
148
+ # @param [Google::Apis::RequestOptions] options
149
+ # Request-specific options
150
+ #
151
+ # @yield [result, err] Result & error if block supplied
152
+ # @yieldparam result [Google::Apis::AgentidentityV1::AccessSummary] parsed result object
153
+ # @yieldparam err [StandardError] error object if request failed
154
+ #
155
+ # @return [Google::Apis::AgentidentityV1::AccessSummary]
156
+ #
157
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
158
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
159
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
160
+ def get_project_location_access_summary(name, fields: nil, quota_user: nil, options: nil, &block)
161
+ command = make_simple_command(:get, 'v1/{+name}', options)
162
+ command.response_representation = Google::Apis::AgentidentityV1::AccessSummary::Representation
163
+ command.response_class = Google::Apis::AgentidentityV1::AccessSummary
164
+ command.params['name'] = name unless name.nil?
165
+ command.query['fields'] = fields unless fields.nil?
166
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
167
+ execute_or_queue_command(command, &block)
168
+ end
169
+
170
+ # Lists AccessSummaries in a given project and location. Supported Filters: - `
171
+ # workload_id`: Filter by the SPIFFE ID of the agent. Example: `workload_id="
172
+ # spiffe://example.com/ns/default/sa/my-agent"`
173
+ # @param [String] parent
174
+ # Required. The parent resource where the search is performed. Format: projects/`
175
+ # project`/locations/`location`
176
+ # @param [String] filter
177
+ # Optional. Filter string to restrict the results. Currently supports filtering
178
+ # by `workload_id` or `auth_provider_name`. If no filter is provided, returns
179
+ # all access summaries for the requested project and location. Format: `
180
+ # workload_id=""` or `auth_provider_name=""`
181
+ # @param [String] order_by
182
+ # Optional. This field is currently ignored. Defaults to ordering by (
183
+ # auth_provider_id, user_id) in ascending order.
184
+ # @param [Fixnum] page_size
185
+ # Optional. Requested page size. Server may return fewer items than requested.
186
+ # If unspecified, server will pick an appropriate default.
187
+ # @param [String] page_token
188
+ # Optional. A token identifying a page of results the server should return.
189
+ # @param [String] fields
190
+ # Selector specifying which fields to include in a partial response.
191
+ # @param [String] quota_user
192
+ # Available to use for quota purposes for server-side applications. Can be any
193
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
194
+ # @param [Google::Apis::RequestOptions] options
195
+ # Request-specific options
196
+ #
197
+ # @yield [result, err] Result & error if block supplied
198
+ # @yieldparam result [Google::Apis::AgentidentityV1::ListAccessSummariesResponse] parsed result object
199
+ # @yieldparam err [StandardError] error object if request failed
200
+ #
201
+ # @return [Google::Apis::AgentidentityV1::ListAccessSummariesResponse]
202
+ #
203
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
204
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
205
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
206
+ def list_project_location_access_summaries(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
207
+ command = make_simple_command(:get, 'v1/{+parent}/accessSummaries', options)
208
+ command.response_representation = Google::Apis::AgentidentityV1::ListAccessSummariesResponse::Representation
209
+ command.response_class = Google::Apis::AgentidentityV1::ListAccessSummariesResponse
210
+ command.params['parent'] = parent unless parent.nil?
211
+ command.query['filter'] = filter unless filter.nil?
212
+ command.query['orderBy'] = order_by unless order_by.nil?
213
+ command.query['pageSize'] = page_size unless page_size.nil?
214
+ command.query['pageToken'] = page_token unless page_token.nil?
215
+ command.query['fields'] = fields unless fields.nil?
216
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
217
+ execute_or_queue_command(command, &block)
218
+ end
219
+
220
+ # Creates a new AuthProvider in a given project and location.
221
+ # @param [String] parent
222
+ # Required. The parent resource where the AuthProvider is created. Format:
223
+ # projects/`project`/locations/`location`
224
+ # @param [Google::Apis::AgentidentityV1::AuthProvider] auth_provider_object
225
+ # @param [String] auth_provider_id
226
+ # Required. The ID to use for the AuthProvider, which will become the final
227
+ # segment of the AuthProvider's resource name. This value should be 1-63
228
+ # characters, and valid characters are /a-z-/. The first character must be a
229
+ # lowercase letter, and the last character must be a lowercase letter or a
230
+ # number.
231
+ # @param [String] request_id
232
+ # Optional. An optional request ID to identify requests. Specify a unique
233
+ # request ID so that if you must retry your request, the server will know to
234
+ # ignore the request if it has already been completed. The server will guarantee
235
+ # that for at least 60 minutes since the first request. For example, consider a
236
+ # situation where you make an initial request and the request times out. If you
237
+ # make the request again with the same request ID, the server can check if
238
+ # original operation with the same request ID was received, and if so, will
239
+ # ignore the second request. This prevents clients from accidentally creating
240
+ # duplicate commitments. The request ID must be a valid UUID with the exception
241
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
242
+ # @param [String] fields
243
+ # Selector specifying which fields to include in a partial response.
244
+ # @param [String] quota_user
245
+ # Available to use for quota purposes for server-side applications. Can be any
246
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
247
+ # @param [Google::Apis::RequestOptions] options
248
+ # Request-specific options
249
+ #
250
+ # @yield [result, err] Result & error if block supplied
251
+ # @yieldparam result [Google::Apis::AgentidentityV1::AuthProvider] parsed result object
252
+ # @yieldparam err [StandardError] error object if request failed
253
+ #
254
+ # @return [Google::Apis::AgentidentityV1::AuthProvider]
255
+ #
256
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
257
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
258
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
259
+ def create_project_location_auth_provider(parent, auth_provider_object = nil, auth_provider_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
260
+ command = make_simple_command(:post, 'v1/{+parent}/authProviders', options)
261
+ command.request_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation
262
+ command.request_object = auth_provider_object
263
+ command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation
264
+ command.response_class = Google::Apis::AgentidentityV1::AuthProvider
265
+ command.params['parent'] = parent unless parent.nil?
266
+ command.query['authProviderId'] = auth_provider_id unless auth_provider_id.nil?
267
+ command.query['requestId'] = request_id unless request_id.nil?
268
+ command.query['fields'] = fields unless fields.nil?
269
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
270
+ execute_or_queue_command(command, &block)
271
+ end
272
+
273
+ # Deletes a single AuthProvider.
274
+ # @param [String] name
275
+ # Required. Name of the resource
276
+ # @param [String] request_id
277
+ # Optional. An optional request ID to identify requests. Specify a unique
278
+ # request ID so that if you must retry your request, the server will know to
279
+ # ignore the request if it has already been completed. The server will guarantee
280
+ # that for at least 60 minutes after the first request. For example, consider a
281
+ # situation where you make an initial request and the request times out. If you
282
+ # make the request again with the same request ID, the server can check if
283
+ # original operation with the same request ID was received, and if so, will
284
+ # ignore the second request. This prevents clients from accidentally creating
285
+ # duplicate commitments. The request ID must be a valid UUID with the exception
286
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
287
+ # @param [String] fields
288
+ # Selector specifying which fields to include in a partial response.
289
+ # @param [String] quota_user
290
+ # Available to use for quota purposes for server-side applications. Can be any
291
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
292
+ # @param [Google::Apis::RequestOptions] options
293
+ # Request-specific options
294
+ #
295
+ # @yield [result, err] Result & error if block supplied
296
+ # @yieldparam result [Google::Apis::AgentidentityV1::Empty] parsed result object
297
+ # @yieldparam err [StandardError] error object if request failed
298
+ #
299
+ # @return [Google::Apis::AgentidentityV1::Empty]
300
+ #
301
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
302
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
303
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
304
+ def delete_project_location_auth_provider(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
305
+ command = make_simple_command(:delete, 'v1/{+name}', options)
306
+ command.response_representation = Google::Apis::AgentidentityV1::Empty::Representation
307
+ command.response_class = Google::Apis::AgentidentityV1::Empty
308
+ command.params['name'] = name unless name.nil?
309
+ command.query['requestId'] = request_id unless request_id.nil?
310
+ command.query['fields'] = fields unless fields.nil?
311
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
312
+ execute_or_queue_command(command, &block)
313
+ end
314
+
315
+ # Disables a single AuthProvider.
316
+ # @param [String] name
317
+ # Required. Name of the resource Format: projects/`project`/locations/`location`/
318
+ # authProviders/`auth_provider`
319
+ # @param [Google::Apis::AgentidentityV1::DisableAuthProviderRequest] disable_auth_provider_request_object
320
+ # @param [String] fields
321
+ # Selector specifying which fields to include in a partial response.
322
+ # @param [String] quota_user
323
+ # Available to use for quota purposes for server-side applications. Can be any
324
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
325
+ # @param [Google::Apis::RequestOptions] options
326
+ # Request-specific options
327
+ #
328
+ # @yield [result, err] Result & error if block supplied
329
+ # @yieldparam result [Google::Apis::AgentidentityV1::AuthProvider] parsed result object
330
+ # @yieldparam err [StandardError] error object if request failed
331
+ #
332
+ # @return [Google::Apis::AgentidentityV1::AuthProvider]
333
+ #
334
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
335
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
336
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
337
+ def disable_auth_provider(name, disable_auth_provider_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
338
+ command = make_simple_command(:post, 'v1/{+name}:disable', options)
339
+ command.request_representation = Google::Apis::AgentidentityV1::DisableAuthProviderRequest::Representation
340
+ command.request_object = disable_auth_provider_request_object
341
+ command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation
342
+ command.response_class = Google::Apis::AgentidentityV1::AuthProvider
343
+ command.params['name'] = name unless name.nil?
344
+ command.query['fields'] = fields unless fields.nil?
345
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
346
+ execute_or_queue_command(command, &block)
347
+ end
348
+
349
+ # Enables a single AuthProvider.
350
+ # @param [String] name
351
+ # Required. Name of the resource Format: projects/`project`/locations/`location`/
352
+ # authProviders/`auth_provider`
353
+ # @param [Google::Apis::AgentidentityV1::EnableAuthProviderRequest] enable_auth_provider_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::AgentidentityV1::AuthProvider] parsed result object
364
+ # @yieldparam err [StandardError] error object if request failed
365
+ #
366
+ # @return [Google::Apis::AgentidentityV1::AuthProvider]
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 enable_auth_provider(name, enable_auth_provider_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
372
+ command = make_simple_command(:post, 'v1/{+name}:enable', options)
373
+ command.request_representation = Google::Apis::AgentidentityV1::EnableAuthProviderRequest::Representation
374
+ command.request_object = enable_auth_provider_request_object
375
+ command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation
376
+ command.response_class = Google::Apis::AgentidentityV1::AuthProvider
377
+ command.params['name'] = name unless name.nil?
378
+ command.query['fields'] = fields unless fields.nil?
379
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
380
+ execute_or_queue_command(command, &block)
381
+ end
382
+
383
+ # Gets details of a single AuthProvider.
384
+ # @param [String] name
385
+ # Required. Name of the resource
386
+ # @param [String] fields
387
+ # Selector specifying which fields to include in a partial response.
388
+ # @param [String] quota_user
389
+ # Available to use for quota purposes for server-side applications. Can be any
390
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
391
+ # @param [Google::Apis::RequestOptions] options
392
+ # Request-specific options
393
+ #
394
+ # @yield [result, err] Result & error if block supplied
395
+ # @yieldparam result [Google::Apis::AgentidentityV1::AuthProvider] parsed result object
396
+ # @yieldparam err [StandardError] error object if request failed
397
+ #
398
+ # @return [Google::Apis::AgentidentityV1::AuthProvider]
399
+ #
400
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
401
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
402
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
403
+ def get_project_location_auth_provider(name, fields: nil, quota_user: nil, options: nil, &block)
404
+ command = make_simple_command(:get, 'v1/{+name}', options)
405
+ command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation
406
+ command.response_class = Google::Apis::AgentidentityV1::AuthProvider
407
+ command.params['name'] = name unless name.nil?
408
+ command.query['fields'] = fields unless fields.nil?
409
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
410
+ execute_or_queue_command(command, &block)
411
+ end
412
+
413
+ # Gets the access control policy for a resource. Returns an empty policy if the
414
+ # resource exists and does not have a policy set.
415
+ # @param [String] resource
416
+ # REQUIRED: The resource for which the policy is being requested. See [Resource
417
+ # names](https://cloud.google.com/apis/design/resource_names) for the
418
+ # appropriate value for this field.
419
+ # @param [Fixnum] options_requested_policy_version
420
+ # Optional. The maximum policy version that will be used to format the policy.
421
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
422
+ # rejected. Requests for policies with any conditional role bindings must
423
+ # specify version 3. Policies with no conditional role bindings may specify any
424
+ # valid value or leave the field unset. The policy in the response might use the
425
+ # policy version that you specified, or it might use a lower policy version. For
426
+ # example, if you specify version 3, but the policy has no conditional role
427
+ # bindings, the response uses version 1. To learn which resources support
428
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
429
+ # google.com/iam/help/conditions/resource-policies).
430
+ # @param [String] fields
431
+ # Selector specifying which fields to include in a partial response.
432
+ # @param [String] quota_user
433
+ # Available to use for quota purposes for server-side applications. Can be any
434
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
435
+ # @param [Google::Apis::RequestOptions] options
436
+ # Request-specific options
437
+ #
438
+ # @yield [result, err] Result & error if block supplied
439
+ # @yieldparam result [Google::Apis::AgentidentityV1::Policy] parsed result object
440
+ # @yieldparam err [StandardError] error object if request failed
441
+ #
442
+ # @return [Google::Apis::AgentidentityV1::Policy]
443
+ #
444
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
445
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
446
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
447
+ def get_project_location_auth_provider_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
448
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
449
+ command.response_representation = Google::Apis::AgentidentityV1::Policy::Representation
450
+ command.response_class = Google::Apis::AgentidentityV1::Policy
451
+ command.params['resource'] = resource unless resource.nil?
452
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
453
+ command.query['fields'] = fields unless fields.nil?
454
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
455
+ execute_or_queue_command(command, &block)
456
+ end
457
+
458
+ # Lists AuthProviders in a given project and location.
459
+ # @param [String] parent
460
+ # Required. The parent resource where the search is performed. Format: projects/`
461
+ # project`/locations/`location`
462
+ # @param [String] filter
463
+ # Optional. Filter results. This field is currently ignored.
464
+ # @param [String] order_by
465
+ # Optional. Currently ignored. Defaults to ordering by auth_provider_id in
466
+ # ascending order.
467
+ # @param [Fixnum] page_size
468
+ # Optional. Requested page size. Server may return fewer items than requested.
469
+ # If unspecified, server will pick an appropriate default.
470
+ # @param [String] page_token
471
+ # Optional. A token, which can be sent as `page_token` to retrieve the next page.
472
+ # If this field is omitted, the first page is returned.
473
+ # @param [Boolean] show_deleted
474
+ # Optional. Deleted auth_providers will be kept with a soft-delete for 30 days
475
+ # before being purged. If this field is set to true, deleted auth_providers will
476
+ # also be returned.
477
+ # @param [String] fields
478
+ # Selector specifying which fields to include in a partial response.
479
+ # @param [String] quota_user
480
+ # Available to use for quota purposes for server-side applications. Can be any
481
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
482
+ # @param [Google::Apis::RequestOptions] options
483
+ # Request-specific options
484
+ #
485
+ # @yield [result, err] Result & error if block supplied
486
+ # @yieldparam result [Google::Apis::AgentidentityV1::ListAuthProvidersResponse] parsed result object
487
+ # @yieldparam err [StandardError] error object if request failed
488
+ #
489
+ # @return [Google::Apis::AgentidentityV1::ListAuthProvidersResponse]
490
+ #
491
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
492
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
493
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
494
+ def list_project_location_auth_providers(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
495
+ command = make_simple_command(:get, 'v1/{+parent}/authProviders', options)
496
+ command.response_representation = Google::Apis::AgentidentityV1::ListAuthProvidersResponse::Representation
497
+ command.response_class = Google::Apis::AgentidentityV1::ListAuthProvidersResponse
498
+ command.params['parent'] = parent unless parent.nil?
499
+ command.query['filter'] = filter unless filter.nil?
500
+ command.query['orderBy'] = order_by unless order_by.nil?
501
+ command.query['pageSize'] = page_size unless page_size.nil?
502
+ command.query['pageToken'] = page_token unless page_token.nil?
503
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
504
+ command.query['fields'] = fields unless fields.nil?
505
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
506
+ execute_or_queue_command(command, &block)
507
+ end
508
+
509
+ # Updates the parameters of a single AuthProvider.
510
+ # @param [String] name
511
+ # Identifier. The full resource name of the auth_provider. Format: projects/`
512
+ # project`/locations/`location`/authProviders/`auth_provider`
513
+ # @param [Google::Apis::AgentidentityV1::AuthProvider] auth_provider_object
514
+ # @param [String] request_id
515
+ # Optional. An optional request ID to identify requests. Specify a unique
516
+ # request ID so that if you must retry your request, the server will know to
517
+ # ignore the request if it has already been completed. The server will guarantee
518
+ # that for at least 60 minutes since the first request. For example, consider a
519
+ # situation where you make an initial request and the request times out. If you
520
+ # make the request again with the same request ID, the server can check if
521
+ # original operation with the same request ID was received, and if so, will
522
+ # ignore the second request. This prevents clients from accidentally creating
523
+ # duplicate commitments. The request ID must be a valid UUID with the exception
524
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
525
+ # @param [String] update_mask
526
+ # Optional. Field mask is used to specify the fields to be overwritten in the
527
+ # AuthProvider resource by the update. The fields specified in the update_mask
528
+ # are relative to the resource, not the full request. A field will be
529
+ # overwritten if it is in the mask. If the user does not provide a mask then all
530
+ # fields present in the request will be overwritten.
531
+ # @param [String] fields
532
+ # Selector specifying which fields to include in a partial response.
533
+ # @param [String] quota_user
534
+ # Available to use for quota purposes for server-side applications. Can be any
535
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
536
+ # @param [Google::Apis::RequestOptions] options
537
+ # Request-specific options
538
+ #
539
+ # @yield [result, err] Result & error if block supplied
540
+ # @yieldparam result [Google::Apis::AgentidentityV1::AuthProvider] parsed result object
541
+ # @yieldparam err [StandardError] error object if request failed
542
+ #
543
+ # @return [Google::Apis::AgentidentityV1::AuthProvider]
544
+ #
545
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
546
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
547
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
548
+ def patch_project_location_auth_provider(name, auth_provider_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
549
+ command = make_simple_command(:patch, 'v1/{+name}', options)
550
+ command.request_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation
551
+ command.request_object = auth_provider_object
552
+ command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation
553
+ command.response_class = Google::Apis::AgentidentityV1::AuthProvider
554
+ command.params['name'] = name unless name.nil?
555
+ command.query['requestId'] = request_id unless request_id.nil?
556
+ command.query['updateMask'] = update_mask unless update_mask.nil?
557
+ command.query['fields'] = fields unless fields.nil?
558
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
559
+ execute_or_queue_command(command, &block)
560
+ end
561
+
562
+ # Queries what all auth_providers are used by a given workload_id.
563
+ # @param [String] parent
564
+ # Required. The parent resource where the search is performed. Format: projects/`
565
+ # project`/locations/`location`
566
+ # @param [Fixnum] page_size
567
+ # Optional. Requested page size. Server may return fewer items than requested.
568
+ # If unspecified, server will pick an appropriate default. The maximum page size
569
+ # is 1000.
570
+ # @param [String] page_token
571
+ # Optional. A token, which can be sent as `page_token` to retrieve the next page.
572
+ # If this field is omitted, the first page is returned. A page token, received
573
+ # from a previous QueryAuthProviders call. Provide this to retrieve the
574
+ # subsequent page. When paginating, all other parameters provided to
575
+ # QueryAuthProviders must match the call that provided the page token.
576
+ # @param [String] workload_id
577
+ # Required. The workload identifier to filter by.
578
+ # @param [String] fields
579
+ # Selector specifying which fields to include in a partial response.
580
+ # @param [String] quota_user
581
+ # Available to use for quota purposes for server-side applications. Can be any
582
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
583
+ # @param [Google::Apis::RequestOptions] options
584
+ # Request-specific options
585
+ #
586
+ # @yield [result, err] Result & error if block supplied
587
+ # @yieldparam result [Google::Apis::AgentidentityV1::QueryAuthProvidersResponse] parsed result object
588
+ # @yieldparam err [StandardError] error object if request failed
589
+ #
590
+ # @return [Google::Apis::AgentidentityV1::QueryAuthProvidersResponse]
591
+ #
592
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
593
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
594
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
595
+ def query_project_location_auth_provider(parent, page_size: nil, page_token: nil, workload_id: nil, fields: nil, quota_user: nil, options: nil, &block)
596
+ command = make_simple_command(:get, 'v1/{+parent}/authProviders:query', options)
597
+ command.response_representation = Google::Apis::AgentidentityV1::QueryAuthProvidersResponse::Representation
598
+ command.response_class = Google::Apis::AgentidentityV1::QueryAuthProvidersResponse
599
+ command.params['parent'] = parent unless parent.nil?
600
+ command.query['pageSize'] = page_size unless page_size.nil?
601
+ command.query['pageToken'] = page_token unless page_token.nil?
602
+ command.query['workloadId'] = workload_id unless workload_id.nil?
603
+ command.query['fields'] = fields unless fields.nil?
604
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
605
+ execute_or_queue_command(command, &block)
606
+ end
607
+
608
+ # Queries what all workloads are using a given auth_provider.
609
+ # @param [String] name
610
+ # Required. The name of the auth_provider to query. Format: projects/`project`/
611
+ # locations/`location`/authProviders/`auth_provider`
612
+ # @param [Fixnum] page_size
613
+ # Optional. Requested page size. Server may return fewer items than requested.
614
+ # If unspecified, server will pick an appropriate default.
615
+ # @param [String] page_token
616
+ # Optional. A token, which can be sent as `page_token` to retrieve the next page.
617
+ # When paginating, all other parameters provided to QueryWorkloads must match
618
+ # the call that provided the page token. If this field is omitted, the first
619
+ # page is returned.
620
+ # @param [String] fields
621
+ # Selector specifying which fields to include in a partial response.
622
+ # @param [String] quota_user
623
+ # Available to use for quota purposes for server-side applications. Can be any
624
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
625
+ # @param [Google::Apis::RequestOptions] options
626
+ # Request-specific options
627
+ #
628
+ # @yield [result, err] Result & error if block supplied
629
+ # @yieldparam result [Google::Apis::AgentidentityV1::QueryWorkloadsResponse] parsed result object
630
+ # @yieldparam err [StandardError] error object if request failed
631
+ #
632
+ # @return [Google::Apis::AgentidentityV1::QueryWorkloadsResponse]
633
+ #
634
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
635
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
636
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
637
+ def query_project_location_auth_provider_workloads(name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
638
+ command = make_simple_command(:get, 'v1/{+name}:queryWorkloads', options)
639
+ command.response_representation = Google::Apis::AgentidentityV1::QueryWorkloadsResponse::Representation
640
+ command.response_class = Google::Apis::AgentidentityV1::QueryWorkloadsResponse
641
+ command.params['name'] = name unless name.nil?
642
+ command.query['pageSize'] = page_size unless page_size.nil?
643
+ command.query['pageToken'] = page_token unless page_token.nil?
644
+ command.query['fields'] = fields unless fields.nil?
645
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
646
+ execute_or_queue_command(command, &block)
647
+ end
648
+
649
+ # Revokes all authorizations for a specific user on an AuthProvider. This
650
+ # deletes all authorization records associated with the user and AuthProvider,
651
+ # effectively revoking access across all agents.
652
+ # @param [String] name
653
+ # Required. The resource name of the AuthProvider. Format: projects/`project`/
654
+ # locations/`location`/authProviders/`auth_provider`
655
+ # @param [Google::Apis::AgentidentityV1::RevokeAuthorizationRequest] revoke_authorization_request_object
656
+ # @param [String] fields
657
+ # Selector specifying which fields to include in a partial response.
658
+ # @param [String] quota_user
659
+ # Available to use for quota purposes for server-side applications. Can be any
660
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
661
+ # @param [Google::Apis::RequestOptions] options
662
+ # Request-specific options
663
+ #
664
+ # @yield [result, err] Result & error if block supplied
665
+ # @yieldparam result [Google::Apis::AgentidentityV1::RevokeAuthorizationResponse] parsed result object
666
+ # @yieldparam err [StandardError] error object if request failed
667
+ #
668
+ # @return [Google::Apis::AgentidentityV1::RevokeAuthorizationResponse]
669
+ #
670
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
671
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
672
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
673
+ def revoke_auth_provider_authorization(name, revoke_authorization_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
674
+ command = make_simple_command(:post, 'v1/{+name}:revokeAuthorization', options)
675
+ command.request_representation = Google::Apis::AgentidentityV1::RevokeAuthorizationRequest::Representation
676
+ command.request_object = revoke_authorization_request_object
677
+ command.response_representation = Google::Apis::AgentidentityV1::RevokeAuthorizationResponse::Representation
678
+ command.response_class = Google::Apis::AgentidentityV1::RevokeAuthorizationResponse
679
+ command.params['name'] = name unless name.nil?
680
+ command.query['fields'] = fields unless fields.nil?
681
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
682
+ execute_or_queue_command(command, &block)
683
+ end
684
+
685
+ # Sets the access control policy on the specified resource. Replaces any
686
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
687
+ # PERMISSION_DENIED` errors.
688
+ # @param [String] resource
689
+ # REQUIRED: The resource for which the policy is being specified. See [Resource
690
+ # names](https://cloud.google.com/apis/design/resource_names) for the
691
+ # appropriate value for this field.
692
+ # @param [Google::Apis::AgentidentityV1::SetIamPolicyRequest] set_iam_policy_request_object
693
+ # @param [String] fields
694
+ # Selector specifying which fields to include in a partial response.
695
+ # @param [String] quota_user
696
+ # Available to use for quota purposes for server-side applications. Can be any
697
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
698
+ # @param [Google::Apis::RequestOptions] options
699
+ # Request-specific options
700
+ #
701
+ # @yield [result, err] Result & error if block supplied
702
+ # @yieldparam result [Google::Apis::AgentidentityV1::Policy] parsed result object
703
+ # @yieldparam err [StandardError] error object if request failed
704
+ #
705
+ # @return [Google::Apis::AgentidentityV1::Policy]
706
+ #
707
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
708
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
709
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
710
+ def set_auth_provider_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
711
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
712
+ command.request_representation = Google::Apis::AgentidentityV1::SetIamPolicyRequest::Representation
713
+ command.request_object = set_iam_policy_request_object
714
+ command.response_representation = Google::Apis::AgentidentityV1::Policy::Representation
715
+ command.response_class = Google::Apis::AgentidentityV1::Policy
716
+ command.params['resource'] = resource unless resource.nil?
717
+ command.query['fields'] = fields unless fields.nil?
718
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
719
+ execute_or_queue_command(command, &block)
720
+ end
721
+
722
+ # Returns permissions that a caller has on the specified resource. If the
723
+ # resource does not exist, this will return an empty set of permissions, not a `
724
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
725
+ # permission-aware UIs and command-line tools, not for authorization checking.
726
+ # This operation may "fail open" without warning.
727
+ # @param [String] resource
728
+ # REQUIRED: The resource for which the policy detail is being requested. See [
729
+ # Resource names](https://cloud.google.com/apis/design/resource_names) for the
730
+ # appropriate value for this field.
731
+ # @param [Google::Apis::AgentidentityV1::TestIamPermissionsRequest] test_iam_permissions_request_object
732
+ # @param [String] fields
733
+ # Selector specifying which fields to include in a partial response.
734
+ # @param [String] quota_user
735
+ # Available to use for quota purposes for server-side applications. Can be any
736
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
737
+ # @param [Google::Apis::RequestOptions] options
738
+ # Request-specific options
739
+ #
740
+ # @yield [result, err] Result & error if block supplied
741
+ # @yieldparam result [Google::Apis::AgentidentityV1::TestIamPermissionsResponse] parsed result object
742
+ # @yieldparam err [StandardError] error object if request failed
743
+ #
744
+ # @return [Google::Apis::AgentidentityV1::TestIamPermissionsResponse]
745
+ #
746
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
747
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
748
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
749
+ def test_auth_provider_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
750
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
751
+ command.request_representation = Google::Apis::AgentidentityV1::TestIamPermissionsRequest::Representation
752
+ command.request_object = test_iam_permissions_request_object
753
+ command.response_representation = Google::Apis::AgentidentityV1::TestIamPermissionsResponse::Representation
754
+ command.response_class = Google::Apis::AgentidentityV1::TestIamPermissionsResponse
755
+ command.params['resource'] = resource unless resource.nil?
756
+ command.query['fields'] = fields unless fields.nil?
757
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
758
+ execute_or_queue_command(command, &block)
759
+ end
760
+
761
+ # Undeletes a single AuthProvider.
762
+ # @param [String] name
763
+ # Required. Name of the resource Format: projects/`project`/locations/`location`/
764
+ # authProviders/`auth_provider`
765
+ # @param [Google::Apis::AgentidentityV1::UndeleteAuthProviderRequest] undelete_auth_provider_request_object
766
+ # @param [String] fields
767
+ # Selector specifying which fields to include in a partial response.
768
+ # @param [String] quota_user
769
+ # Available to use for quota purposes for server-side applications. Can be any
770
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
771
+ # @param [Google::Apis::RequestOptions] options
772
+ # Request-specific options
773
+ #
774
+ # @yield [result, err] Result & error if block supplied
775
+ # @yieldparam result [Google::Apis::AgentidentityV1::AuthProvider] parsed result object
776
+ # @yieldparam err [StandardError] error object if request failed
777
+ #
778
+ # @return [Google::Apis::AgentidentityV1::AuthProvider]
779
+ #
780
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
781
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
782
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
783
+ def undelete_auth_provider(name, undelete_auth_provider_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
784
+ command = make_simple_command(:post, 'v1/{+name}:undelete', options)
785
+ command.request_representation = Google::Apis::AgentidentityV1::UndeleteAuthProviderRequest::Representation
786
+ command.request_object = undelete_auth_provider_request_object
787
+ command.response_representation = Google::Apis::AgentidentityV1::AuthProvider::Representation
788
+ command.response_class = Google::Apis::AgentidentityV1::AuthProvider
789
+ command.params['name'] = name unless name.nil?
790
+ command.query['fields'] = fields unless fields.nil?
791
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
792
+ execute_or_queue_command(command, &block)
793
+ end
794
+
795
+ # Deletes a single Authorization.
796
+ # @param [String] name
797
+ # Required. The name of the Authorization to delete. Format: projects/`project`/
798
+ # locations/`location`/authProviders/`auth_provider`/authorizations/`
799
+ # authorization`
800
+ # @param [String] request_id
801
+ # Optional. An optional request ID to identify requests. Specify a unique
802
+ # request ID so that if you must retry your request, the server will know to
803
+ # ignore the request if it has already been completed. The server will guarantee
804
+ # that for at least 60 minutes after the first request. For example, consider a
805
+ # situation where you make an initial request and the request times out. If you
806
+ # make the request again with the same request ID, the server can check if
807
+ # original operation with the same request ID was received, and if so, will
808
+ # ignore the second request. This prevents clients from accidentally creating
809
+ # duplicate commitments. The request ID must be a valid UUID with the exception
810
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
811
+ # @param [String] fields
812
+ # Selector specifying which fields to include in a partial response.
813
+ # @param [String] quota_user
814
+ # Available to use for quota purposes for server-side applications. Can be any
815
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
816
+ # @param [Google::Apis::RequestOptions] options
817
+ # Request-specific options
818
+ #
819
+ # @yield [result, err] Result & error if block supplied
820
+ # @yieldparam result [Google::Apis::AgentidentityV1::Empty] parsed result object
821
+ # @yieldparam err [StandardError] error object if request failed
822
+ #
823
+ # @return [Google::Apis::AgentidentityV1::Empty]
824
+ #
825
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
826
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
827
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
828
+ def delete_project_location_auth_provider_authorization(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
829
+ command = make_simple_command(:delete, 'v1/{+name}', options)
830
+ command.response_representation = Google::Apis::AgentidentityV1::Empty::Representation
831
+ command.response_class = Google::Apis::AgentidentityV1::Empty
832
+ command.params['name'] = name unless name.nil?
833
+ command.query['requestId'] = request_id unless request_id.nil?
834
+ command.query['fields'] = fields unless fields.nil?
835
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
836
+ execute_or_queue_command(command, &block)
837
+ end
838
+
839
+ # Gets details of a single Authorization.
840
+ # @param [String] name
841
+ # Required. Name of the resource
842
+ # @param [String] fields
843
+ # Selector specifying which fields to include in a partial response.
844
+ # @param [String] quota_user
845
+ # Available to use for quota purposes for server-side applications. Can be any
846
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
847
+ # @param [Google::Apis::RequestOptions] options
848
+ # Request-specific options
849
+ #
850
+ # @yield [result, err] Result & error if block supplied
851
+ # @yieldparam result [Google::Apis::AgentidentityV1::Authorization] parsed result object
852
+ # @yieldparam err [StandardError] error object if request failed
853
+ #
854
+ # @return [Google::Apis::AgentidentityV1::Authorization]
855
+ #
856
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
857
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
858
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
859
+ def get_project_location_auth_provider_authorization(name, fields: nil, quota_user: nil, options: nil, &block)
860
+ command = make_simple_command(:get, 'v1/{+name}', options)
861
+ command.response_representation = Google::Apis::AgentidentityV1::Authorization::Representation
862
+ command.response_class = Google::Apis::AgentidentityV1::Authorization
863
+ command.params['name'] = name unless name.nil?
864
+ command.query['fields'] = fields unless fields.nil?
865
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
866
+ execute_or_queue_command(command, &block)
867
+ end
868
+
869
+ # Lists Authorizations in a given project and location.
870
+ # @param [String] parent
871
+ # Required. The parent resource where the search is performed. Format: projects/`
872
+ # project`/locations/`location`/authProviders/`auth_provider`
873
+ # @param [String] filter
874
+ # Optional. Filter string to restrict the results. Currently supports filtering
875
+ # by `client_user_id` only. Format: `client_user_id=""`
876
+ # @param [String] order_by
877
+ # Optional. This field is currently ignored. Defaults to ordering by
878
+ # authorization_id in ascending order.
879
+ # @param [Fixnum] page_size
880
+ # Optional. Requested page size. Server may return fewer items than requested.
881
+ # If unspecified, server will pick an appropriate default.
882
+ # @param [String] page_token
883
+ # Optional. A page token, received from a previous `ListAuthorizations` call.
884
+ # Provide this to retrieve the subsequent page. When paginating, all other
885
+ # parameters provided to `ListAuthorizations` must match the call that provided
886
+ # the page token.
887
+ # @param [String] fields
888
+ # Selector specifying which fields to include in a partial response.
889
+ # @param [String] quota_user
890
+ # Available to use for quota purposes for server-side applications. Can be any
891
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
892
+ # @param [Google::Apis::RequestOptions] options
893
+ # Request-specific options
894
+ #
895
+ # @yield [result, err] Result & error if block supplied
896
+ # @yieldparam result [Google::Apis::AgentidentityV1::ListAuthorizationsResponse] parsed result object
897
+ # @yieldparam err [StandardError] error object if request failed
898
+ #
899
+ # @return [Google::Apis::AgentidentityV1::ListAuthorizationsResponse]
900
+ #
901
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
902
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
903
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
904
+ def list_project_location_auth_provider_authorizations(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
905
+ command = make_simple_command(:get, 'v1/{+parent}/authorizations', options)
906
+ command.response_representation = Google::Apis::AgentidentityV1::ListAuthorizationsResponse::Representation
907
+ command.response_class = Google::Apis::AgentidentityV1::ListAuthorizationsResponse
908
+ command.params['parent'] = parent unless parent.nil?
909
+ command.query['filter'] = filter unless filter.nil?
910
+ command.query['orderBy'] = order_by unless order_by.nil?
911
+ command.query['pageSize'] = page_size unless page_size.nil?
912
+ command.query['pageToken'] = page_token unless page_token.nil?
913
+ command.query['fields'] = fields unless fields.nil?
914
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
915
+ execute_or_queue_command(command, &block)
916
+ end
917
+
918
+ protected
919
+
920
+ def apply_command_defaults(command)
921
+ command.query['key'] = key unless key.nil?
922
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
923
+ end
924
+ end
925
+ end
926
+ end
927
+ end