google-cloud-gemini_data_analytics-v1 0.a → 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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/gemini_data_analytics/v1/bindings_override.rb +75 -0
  6. data/lib/google/cloud/gemini_data_analytics/v1/data_agent_service/client.rb +1635 -0
  7. data/lib/google/cloud/gemini_data_analytics/v1/data_agent_service/credentials.rb +47 -0
  8. data/lib/google/cloud/gemini_data_analytics/v1/data_agent_service/operations.rb +841 -0
  9. data/lib/google/cloud/gemini_data_analytics/v1/data_agent_service/paths.rb +90 -0
  10. data/lib/google/cloud/gemini_data_analytics/v1/data_agent_service/rest/client.rb +1523 -0
  11. data/lib/google/cloud/gemini_data_analytics/v1/data_agent_service/rest/operations.rb +925 -0
  12. data/lib/google/cloud/gemini_data_analytics/v1/data_agent_service/rest/service_stub.rb +758 -0
  13. data/lib/google/cloud/gemini_data_analytics/v1/data_agent_service/rest.rb +54 -0
  14. data/lib/google/cloud/gemini_data_analytics/v1/data_agent_service.rb +56 -0
  15. data/lib/google/cloud/gemini_data_analytics/v1/data_chat_service/client.rb +1063 -0
  16. data/lib/google/cloud/gemini_data_analytics/v1/data_chat_service/credentials.rb +47 -0
  17. data/lib/google/cloud/gemini_data_analytics/v1/data_chat_service/paths.rb +109 -0
  18. data/lib/google/cloud/gemini_data_analytics/v1/data_chat_service/rest/client.rb +988 -0
  19. data/lib/google/cloud/gemini_data_analytics/v1/data_chat_service/rest/service_stub.rb +443 -0
  20. data/lib/google/cloud/gemini_data_analytics/v1/data_chat_service/rest.rb +55 -0
  21. data/lib/google/cloud/gemini_data_analytics/v1/data_chat_service.rb +57 -0
  22. data/lib/google/cloud/gemini_data_analytics/v1/rest.rb +39 -0
  23. data/lib/google/cloud/gemini_data_analytics/v1/version.rb +7 -2
  24. data/lib/google/cloud/gemini_data_analytics/v1.rb +46 -0
  25. data/lib/google/cloud/geminidataanalytics/v1/context_pb.rb +49 -0
  26. data/lib/google/cloud/geminidataanalytics/v1/conversation_pb.rb +31 -0
  27. data/lib/google/cloud/geminidataanalytics/v1/credentials_pb.rb +26 -0
  28. data/lib/google/cloud/geminidataanalytics/v1/data_agent_pb.rb +26 -0
  29. data/lib/google/cloud/geminidataanalytics/v1/data_agent_service_pb.rb +43 -0
  30. data/lib/google/cloud/geminidataanalytics/v1/data_agent_service_services_pb.rb +66 -0
  31. data/lib/google/cloud/geminidataanalytics/v1/data_analytics_agent_pb.rb +24 -0
  32. data/lib/google/cloud/geminidataanalytics/v1/data_chat_service_pb.rb +64 -0
  33. data/lib/google/cloud/geminidataanalytics/v1/data_chat_service_services_pb.rb +59 -0
  34. data/lib/google/cloud/geminidataanalytics/v1/datasource_pb.rb +37 -0
  35. data/lib/google-cloud-gemini_data_analytics-v1.rb +21 -0
  36. data/proto_docs/README.md +4 -0
  37. data/proto_docs/google/api/client.rb +593 -0
  38. data/proto_docs/google/api/field_behavior.rb +85 -0
  39. data/proto_docs/google/api/field_info.rb +88 -0
  40. data/proto_docs/google/api/launch_stage.rb +71 -0
  41. data/proto_docs/google/api/resource.rb +227 -0
  42. data/proto_docs/google/cloud/geminidataanalytics/v1/context.rb +450 -0
  43. data/proto_docs/google/cloud/geminidataanalytics/v1/conversation.rb +167 -0
  44. data/proto_docs/google/cloud/geminidataanalytics/v1/credentials.rb +74 -0
  45. data/proto_docs/google/cloud/geminidataanalytics/v1/data_agent.rb +96 -0
  46. data/proto_docs/google/cloud/geminidataanalytics/v1/data_agent_service.rb +267 -0
  47. data/proto_docs/google/cloud/geminidataanalytics/v1/data_analytics_agent.rb +46 -0
  48. data/proto_docs/google/cloud/geminidataanalytics/v1/data_chat_service.rb +689 -0
  49. data/proto_docs/google/cloud/geminidataanalytics/v1/datasource.rb +304 -0
  50. data/proto_docs/google/iam/v1/iam_policy.rb +87 -0
  51. data/proto_docs/google/iam/v1/options.rb +50 -0
  52. data/proto_docs/google/iam/v1/policy.rb +426 -0
  53. data/proto_docs/google/longrunning/operations.rb +191 -0
  54. data/proto_docs/google/protobuf/any.rb +145 -0
  55. data/proto_docs/google/protobuf/duration.rb +98 -0
  56. data/proto_docs/google/protobuf/empty.rb +34 -0
  57. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  58. data/proto_docs/google/protobuf/struct.rb +108 -0
  59. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  60. data/proto_docs/google/protobuf/wrappers.rb +148 -0
  61. data/proto_docs/google/rpc/status.rb +48 -0
  62. data/proto_docs/google/type/expr.rb +75 -0
  63. metadata +127 -9
@@ -0,0 +1,1523 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/geminidataanalytics/v1/data_agent_service_pb"
21
+ require "google/cloud/gemini_data_analytics/v1/data_agent_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module GeminiDataAnalytics
27
+ module V1
28
+ module DataAgentService
29
+ module Rest
30
+ ##
31
+ # REST client for the DataAgentService service.
32
+ #
33
+ # Service describing handlers for resources.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :data_agent_service_stub
46
+
47
+ ##
48
+ # Configure the DataAgentService Client class.
49
+ #
50
+ # See {::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all DataAgentService clients
56
+ # ::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Cloud", "GeminiDataAnalytics", "V1"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.timeout = 600.0
77
+ default_config.retry_policy = {
78
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config
82
+ end
83
+ yield @configure if block_given?
84
+ @configure
85
+ end
86
+
87
+ ##
88
+ # Configure the DataAgentService Client instance.
89
+ #
90
+ # The configuration is set to the derived mode, meaning that values can be changed,
91
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
92
+ # should be made on {Client.configure}.
93
+ #
94
+ # See {::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client::Configuration}
95
+ # for a description of the configuration fields.
96
+ #
97
+ # @yield [config] Configure the Client client.
98
+ # @yieldparam config [Client::Configuration]
99
+ #
100
+ # @return [Client::Configuration]
101
+ #
102
+ def configure
103
+ yield @config if block_given?
104
+ @config
105
+ end
106
+
107
+ ##
108
+ # The effective universe domain
109
+ #
110
+ # @return [String]
111
+ #
112
+ def universe_domain
113
+ @data_agent_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new DataAgentService REST client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the DataAgentService client.
130
+ # @yieldparam config [Client::Configuration]
131
+ #
132
+ def initialize
133
+ # Create the configuration object
134
+ @config = Configuration.new Client.configure
135
+
136
+ # Yield the configuration if needed
137
+ yield @config if block_given?
138
+
139
+ # Create credentials
140
+ credentials = @config.credentials
141
+ # Use self-signed JWT if the endpoint is unchanged from default,
142
+ # but only if the default endpoint does not have a region prefix.
143
+ enable_self_signed_jwt = @config.endpoint.nil? ||
144
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
145
+ !@config.endpoint.split(".").first.include?("-"))
146
+ credentials ||= Credentials.default scope: @config.scope,
147
+ enable_self_signed_jwt: enable_self_signed_jwt
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
149
+ credentials = Credentials.new credentials, scope: @config.scope
150
+ end
151
+
152
+ @quota_project_id = @config.quota_project
153
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
154
+
155
+ @operations_client = ::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Operations.new do |config|
156
+ config.credentials = credentials
157
+ config.quota_project = @quota_project_id
158
+ config.endpoint = @config.endpoint
159
+ config.universe_domain = @config.universe_domain
160
+ end
161
+
162
+ @data_agent_service_stub = ::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::ServiceStub.new(
163
+ endpoint: @config.endpoint,
164
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
165
+ universe_domain: @config.universe_domain,
166
+ credentials: credentials,
167
+ logger: @config.logger
168
+ )
169
+
170
+ @data_agent_service_stub.logger(stub: true)&.info do |entry|
171
+ entry.set_system_name
172
+ entry.set_service
173
+ entry.message = "Created client for #{entry.service}"
174
+ entry.set_credentials_fields credentials
175
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
176
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
177
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
178
+ end
179
+
180
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
181
+ config.credentials = credentials
182
+ config.quota_project = @quota_project_id
183
+ config.endpoint = @data_agent_service_stub.endpoint
184
+ config.universe_domain = @data_agent_service_stub.universe_domain
185
+ config.bindings_override = @config.bindings_override
186
+ config.logger = @data_agent_service_stub.logger if config.respond_to? :logger=
187
+ end
188
+ end
189
+
190
+ ##
191
+ # Get the associated client for long-running operations.
192
+ #
193
+ # @return [::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Operations]
194
+ #
195
+ attr_reader :operations_client
196
+
197
+ ##
198
+ # Get the associated client for mix-in of the Locations.
199
+ #
200
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
201
+ #
202
+ attr_reader :location_client
203
+
204
+ ##
205
+ # The logger used for request/response debug logging.
206
+ #
207
+ # @return [Logger]
208
+ #
209
+ def logger
210
+ @data_agent_service_stub.logger
211
+ end
212
+
213
+ # Service calls
214
+
215
+ ##
216
+ # Lists DataAgents in a given project and location.
217
+ #
218
+ # @overload list_data_agents(request, options = nil)
219
+ # Pass arguments to `list_data_agents` via a request object, either of type
220
+ # {::Google::Cloud::GeminiDataAnalytics::V1::ListDataAgentsRequest} or an equivalent Hash.
221
+ #
222
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1::ListDataAgentsRequest, ::Hash]
223
+ # A request object representing the call parameters. Required. To specify no
224
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
225
+ # @param options [::Gapic::CallOptions, ::Hash]
226
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
227
+ #
228
+ # @overload list_data_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil)
229
+ # Pass arguments to `list_data_agents` via keyword arguments. Note that at
230
+ # least one keyword argument is required. To specify no parameters, or to keep all
231
+ # the default parameter values, pass an empty Hash as a request object (see above).
232
+ #
233
+ # @param parent [::String]
234
+ # Required. Parent value for ListDataAgentsRequest.
235
+ # @param page_size [::Integer]
236
+ # Optional. Server may return fewer items than requested.
237
+ # If unspecified, server will pick an appropriate default.
238
+ # @param page_token [::String]
239
+ # Optional. A page token, received from a previous `ListDataAgents` call.
240
+ # Provide this to retrieve the subsequent page.
241
+ #
242
+ # When paginating, all other parameters provided to `ListDataAgents` must
243
+ # match the call that provided the page token. The service may return fewer
244
+ # than this value.
245
+ # @param filter [::String]
246
+ # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
247
+ # syntax.
248
+ # @param order_by [::String]
249
+ # Optional. User specification for how to order the results.
250
+ # @param show_deleted [::Boolean]
251
+ # Optional. If true, the list results will include soft-deleted DataAgents.
252
+ # Defaults to false.
253
+ # @yield [result, operation] Access the result along with the TransportOperation object
254
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>]
255
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
256
+ #
257
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>]
258
+ #
259
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
260
+ #
261
+ # @example Basic example
262
+ # require "google/cloud/gemini_data_analytics/v1"
263
+ #
264
+ # # Create a client object. The client can be reused for multiple calls.
265
+ # client = Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
266
+ #
267
+ # # Create a request. To set request fields, pass in keyword arguments.
268
+ # request = Google::Cloud::GeminiDataAnalytics::V1::ListDataAgentsRequest.new
269
+ #
270
+ # # Call the list_data_agents method.
271
+ # result = client.list_data_agents request
272
+ #
273
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
274
+ # # over elements, and API calls will be issued to fetch pages as needed.
275
+ # result.each do |item|
276
+ # # Each element is of type ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent.
277
+ # p item
278
+ # end
279
+ #
280
+ def list_data_agents request, options = nil
281
+ raise ::ArgumentError, "request must be provided" if request.nil?
282
+
283
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1::ListDataAgentsRequest
284
+
285
+ # Converts hash and nil to an options object
286
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
287
+
288
+ # Customize the options with defaults
289
+ call_metadata = @config.rpcs.list_data_agents.metadata.to_h
290
+
291
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
292
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
293
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
294
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1::VERSION,
295
+ transports_version_send: [:rest]
296
+
297
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
298
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
299
+
300
+ options.apply_defaults timeout: @config.rpcs.list_data_agents.timeout,
301
+ metadata: call_metadata,
302
+ retry_policy: @config.rpcs.list_data_agents.retry_policy
303
+
304
+ options.apply_defaults timeout: @config.timeout,
305
+ metadata: @config.metadata,
306
+ retry_policy: @config.retry_policy
307
+
308
+ @data_agent_service_stub.list_data_agents request, options do |result, operation|
309
+ result = ::Gapic::Rest::PagedEnumerable.new @data_agent_service_stub, :list_data_agents, "data_agents", request, result, options
310
+ yield result, operation if block_given?
311
+ throw :response, result
312
+ end
313
+ rescue ::Gapic::Rest::Error => e
314
+ raise ::Google::Cloud::Error.from_error(e)
315
+ end
316
+
317
+ ##
318
+ # Lists DataAgents that are accessible to the caller in a given project and
319
+ # location.
320
+ #
321
+ # @overload list_accessible_data_agents(request, options = nil)
322
+ # Pass arguments to `list_accessible_data_agents` via a request object, either of type
323
+ # {::Google::Cloud::GeminiDataAnalytics::V1::ListAccessibleDataAgentsRequest} or an equivalent Hash.
324
+ #
325
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1::ListAccessibleDataAgentsRequest, ::Hash]
326
+ # A request object representing the call parameters. Required. To specify no
327
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
328
+ # @param options [::Gapic::CallOptions, ::Hash]
329
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
330
+ #
331
+ # @overload list_accessible_data_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil, creator_filter: nil)
332
+ # Pass arguments to `list_accessible_data_agents` via keyword arguments. Note that at
333
+ # least one keyword argument is required. To specify no parameters, or to keep all
334
+ # the default parameter values, pass an empty Hash as a request object (see above).
335
+ #
336
+ # @param parent [::String]
337
+ # Required. Parent value for ListAccessibleDataAgentsRequest.
338
+ # @param page_size [::Integer]
339
+ # Optional. Server may return fewer items than requested.
340
+ # If unspecified, server will pick an appropriate default.
341
+ # @param page_token [::String]
342
+ # Optional. A page token, received from a previous `ListAccessibleDataAgents`
343
+ # call. Provide this to retrieve the subsequent page.
344
+ #
345
+ # When paginating, all other parameters provided to
346
+ # `ListAccessibleDataAgents` must match the call that provided the page
347
+ # token. The service may return fewer than this value.
348
+ # @param filter [::String]
349
+ # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for
350
+ # syntax.
351
+ # @param order_by [::String]
352
+ # Optional. User specification for how to order the results.
353
+ # @param show_deleted [::Boolean]
354
+ # Optional. If true, the list results will include soft-deleted DataAgents.
355
+ # Defaults to false.
356
+ # @param creator_filter [::Google::Cloud::GeminiDataAnalytics::V1::ListAccessibleDataAgentsRequest::CreatorFilter]
357
+ # Optional. Filter for the creator of the agent.
358
+ # @yield [result, operation] Access the result along with the TransportOperation object
359
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>]
360
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
361
+ #
362
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>]
363
+ #
364
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
365
+ #
366
+ # @example Basic example
367
+ # require "google/cloud/gemini_data_analytics/v1"
368
+ #
369
+ # # Create a client object. The client can be reused for multiple calls.
370
+ # client = Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
371
+ #
372
+ # # Create a request. To set request fields, pass in keyword arguments.
373
+ # request = Google::Cloud::GeminiDataAnalytics::V1::ListAccessibleDataAgentsRequest.new
374
+ #
375
+ # # Call the list_accessible_data_agents method.
376
+ # result = client.list_accessible_data_agents request
377
+ #
378
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
379
+ # # over elements, and API calls will be issued to fetch pages as needed.
380
+ # result.each do |item|
381
+ # # Each element is of type ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent.
382
+ # p item
383
+ # end
384
+ #
385
+ def list_accessible_data_agents request, options = nil
386
+ raise ::ArgumentError, "request must be provided" if request.nil?
387
+
388
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1::ListAccessibleDataAgentsRequest
389
+
390
+ # Converts hash and nil to an options object
391
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
392
+
393
+ # Customize the options with defaults
394
+ call_metadata = @config.rpcs.list_accessible_data_agents.metadata.to_h
395
+
396
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
397
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
398
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
399
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1::VERSION,
400
+ transports_version_send: [:rest]
401
+
402
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
403
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
404
+
405
+ options.apply_defaults timeout: @config.rpcs.list_accessible_data_agents.timeout,
406
+ metadata: call_metadata,
407
+ retry_policy: @config.rpcs.list_accessible_data_agents.retry_policy
408
+
409
+ options.apply_defaults timeout: @config.timeout,
410
+ metadata: @config.metadata,
411
+ retry_policy: @config.retry_policy
412
+
413
+ @data_agent_service_stub.list_accessible_data_agents request, options do |result, operation|
414
+ result = ::Gapic::Rest::PagedEnumerable.new @data_agent_service_stub, :list_accessible_data_agents, "data_agents", request, result, options
415
+ yield result, operation if block_given?
416
+ throw :response, result
417
+ end
418
+ rescue ::Gapic::Rest::Error => e
419
+ raise ::Google::Cloud::Error.from_error(e)
420
+ end
421
+
422
+ ##
423
+ # Gets details of a single DataAgent.
424
+ #
425
+ # @overload get_data_agent(request, options = nil)
426
+ # Pass arguments to `get_data_agent` via a request object, either of type
427
+ # {::Google::Cloud::GeminiDataAnalytics::V1::GetDataAgentRequest} or an equivalent Hash.
428
+ #
429
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1::GetDataAgentRequest, ::Hash]
430
+ # A request object representing the call parameters. Required. To specify no
431
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
432
+ # @param options [::Gapic::CallOptions, ::Hash]
433
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
434
+ #
435
+ # @overload get_data_agent(name: nil)
436
+ # Pass arguments to `get_data_agent` via keyword arguments. Note that at
437
+ # least one keyword argument is required. To specify no parameters, or to keep all
438
+ # the default parameter values, pass an empty Hash as a request object (see above).
439
+ #
440
+ # @param name [::String]
441
+ # Required. Name of the resource.
442
+ # @yield [result, operation] Access the result along with the TransportOperation object
443
+ # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1::DataAgent]
444
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
445
+ #
446
+ # @return [::Google::Cloud::GeminiDataAnalytics::V1::DataAgent]
447
+ #
448
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
449
+ #
450
+ # @example Basic example
451
+ # require "google/cloud/gemini_data_analytics/v1"
452
+ #
453
+ # # Create a client object. The client can be reused for multiple calls.
454
+ # client = Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
455
+ #
456
+ # # Create a request. To set request fields, pass in keyword arguments.
457
+ # request = Google::Cloud::GeminiDataAnalytics::V1::GetDataAgentRequest.new
458
+ #
459
+ # # Call the get_data_agent method.
460
+ # result = client.get_data_agent request
461
+ #
462
+ # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1::DataAgent.
463
+ # p result
464
+ #
465
+ def get_data_agent request, options = nil
466
+ raise ::ArgumentError, "request must be provided" if request.nil?
467
+
468
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1::GetDataAgentRequest
469
+
470
+ # Converts hash and nil to an options object
471
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
472
+
473
+ # Customize the options with defaults
474
+ call_metadata = @config.rpcs.get_data_agent.metadata.to_h
475
+
476
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
477
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
478
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
479
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1::VERSION,
480
+ transports_version_send: [:rest]
481
+
482
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
483
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
484
+
485
+ options.apply_defaults timeout: @config.rpcs.get_data_agent.timeout,
486
+ metadata: call_metadata,
487
+ retry_policy: @config.rpcs.get_data_agent.retry_policy
488
+
489
+ options.apply_defaults timeout: @config.timeout,
490
+ metadata: @config.metadata,
491
+ retry_policy: @config.retry_policy
492
+
493
+ @data_agent_service_stub.get_data_agent request, options do |result, operation|
494
+ yield result, operation if block_given?
495
+ end
496
+ rescue ::Gapic::Rest::Error => e
497
+ raise ::Google::Cloud::Error.from_error(e)
498
+ end
499
+
500
+ ##
501
+ # Creates a new DataAgent in a given project and location.
502
+ #
503
+ # @overload create_data_agent(request, options = nil)
504
+ # Pass arguments to `create_data_agent` via a request object, either of type
505
+ # {::Google::Cloud::GeminiDataAnalytics::V1::CreateDataAgentRequest} or an equivalent Hash.
506
+ #
507
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1::CreateDataAgentRequest, ::Hash]
508
+ # A request object representing the call parameters. Required. To specify no
509
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
510
+ # @param options [::Gapic::CallOptions, ::Hash]
511
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
512
+ #
513
+ # @overload create_data_agent(parent: nil, data_agent_id: nil, data_agent: nil, request_id: nil)
514
+ # Pass arguments to `create_data_agent` via keyword arguments. Note that at
515
+ # least one keyword argument is required. To specify no parameters, or to keep all
516
+ # the default parameter values, pass an empty Hash as a request object (see above).
517
+ #
518
+ # @param parent [::String]
519
+ # Required. Value for parent.
520
+ # @param data_agent_id [::String]
521
+ # Optional. Id of the requesting object. Must be unique within the parent.
522
+ # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
523
+ # If not provided, the server will auto-generate a value for the id.
524
+ # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1::DataAgent, ::Hash]
525
+ # Required. The resource being created.
526
+ # @param request_id [::String]
527
+ # Optional. An optional request ID to identify requests. Specify a unique
528
+ # request ID so that if you must retry your request, the server will know to
529
+ # ignore the request if it has already been completed. The server will
530
+ # guarantee that for at least 60 minutes since the first request.
531
+ #
532
+ # For example, consider a situation where you make an initial request and the
533
+ # request times out. If you make the request again with the same request
534
+ # ID, the server can check if original operation with the same request ID
535
+ # was received, and if so, will ignore the second request. This prevents
536
+ # clients from accidentally creating duplicate commitments.
537
+ #
538
+ # The request ID must be a valid UUID with the exception that zero UUID is
539
+ # not supported (00000000-0000-0000-0000-000000000000).
540
+ # @yield [result, operation] Access the result along with the TransportOperation object
541
+ # @yieldparam result [::Gapic::Operation]
542
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
543
+ #
544
+ # @return [::Gapic::Operation]
545
+ #
546
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
547
+ #
548
+ # @example Basic example
549
+ # require "google/cloud/gemini_data_analytics/v1"
550
+ #
551
+ # # Create a client object. The client can be reused for multiple calls.
552
+ # client = Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
553
+ #
554
+ # # Create a request. To set request fields, pass in keyword arguments.
555
+ # request = Google::Cloud::GeminiDataAnalytics::V1::CreateDataAgentRequest.new
556
+ #
557
+ # # Call the create_data_agent method.
558
+ # result = client.create_data_agent request
559
+ #
560
+ # # The returned object is of type Gapic::Operation. You can use it to
561
+ # # check the status of an operation, cancel it, or wait for results.
562
+ # # Here is how to wait for a response.
563
+ # result.wait_until_done! timeout: 60
564
+ # if result.response?
565
+ # p result.response
566
+ # else
567
+ # puts "No response received."
568
+ # end
569
+ #
570
+ def create_data_agent request, options = nil
571
+ raise ::ArgumentError, "request must be provided" if request.nil?
572
+
573
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1::CreateDataAgentRequest
574
+
575
+ # Converts hash and nil to an options object
576
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
577
+
578
+ # Customize the options with defaults
579
+ call_metadata = @config.rpcs.create_data_agent.metadata.to_h
580
+
581
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
582
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
583
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
584
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1::VERSION,
585
+ transports_version_send: [:rest]
586
+
587
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
588
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
589
+
590
+ options.apply_defaults timeout: @config.rpcs.create_data_agent.timeout,
591
+ metadata: call_metadata,
592
+ retry_policy: @config.rpcs.create_data_agent.retry_policy
593
+
594
+ options.apply_defaults timeout: @config.timeout,
595
+ metadata: @config.metadata,
596
+ retry_policy: @config.retry_policy
597
+
598
+ @data_agent_service_stub.create_data_agent request, options do |result, operation|
599
+ result = ::Gapic::Operation.new result, @operations_client, options: options
600
+ yield result, operation if block_given?
601
+ throw :response, result
602
+ end
603
+ rescue ::Gapic::Rest::Error => e
604
+ raise ::Google::Cloud::Error.from_error(e)
605
+ end
606
+
607
+ ##
608
+ # Creates a new DataAgent in a given project and location synchronously.
609
+ #
610
+ # @overload create_data_agent_sync(request, options = nil)
611
+ # Pass arguments to `create_data_agent_sync` via a request object, either of type
612
+ # {::Google::Cloud::GeminiDataAnalytics::V1::CreateDataAgentRequest} or an equivalent Hash.
613
+ #
614
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1::CreateDataAgentRequest, ::Hash]
615
+ # A request object representing the call parameters. Required. To specify no
616
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
617
+ # @param options [::Gapic::CallOptions, ::Hash]
618
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
619
+ #
620
+ # @overload create_data_agent_sync(parent: nil, data_agent_id: nil, data_agent: nil, request_id: nil)
621
+ # Pass arguments to `create_data_agent_sync` via keyword arguments. Note that at
622
+ # least one keyword argument is required. To specify no parameters, or to keep all
623
+ # the default parameter values, pass an empty Hash as a request object (see above).
624
+ #
625
+ # @param parent [::String]
626
+ # Required. Value for parent.
627
+ # @param data_agent_id [::String]
628
+ # Optional. Id of the requesting object. Must be unique within the parent.
629
+ # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
630
+ # If not provided, the server will auto-generate a value for the id.
631
+ # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1::DataAgent, ::Hash]
632
+ # Required. The resource being created.
633
+ # @param request_id [::String]
634
+ # Optional. An optional request ID to identify requests. Specify a unique
635
+ # request ID so that if you must retry your request, the server will know to
636
+ # ignore the request if it has already been completed. The server will
637
+ # guarantee that for at least 60 minutes since the first request.
638
+ #
639
+ # For example, consider a situation where you make an initial request and the
640
+ # request times out. If you make the request again with the same request
641
+ # ID, the server can check if original operation with the same request ID
642
+ # was received, and if so, will ignore the second request. This prevents
643
+ # clients from accidentally creating duplicate commitments.
644
+ #
645
+ # The request ID must be a valid UUID with the exception that zero UUID is
646
+ # not supported (00000000-0000-0000-0000-000000000000).
647
+ # @yield [result, operation] Access the result along with the TransportOperation object
648
+ # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1::DataAgent]
649
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
650
+ #
651
+ # @return [::Google::Cloud::GeminiDataAnalytics::V1::DataAgent]
652
+ #
653
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
654
+ #
655
+ # @example Basic example
656
+ # require "google/cloud/gemini_data_analytics/v1"
657
+ #
658
+ # # Create a client object. The client can be reused for multiple calls.
659
+ # client = Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
660
+ #
661
+ # # Create a request. To set request fields, pass in keyword arguments.
662
+ # request = Google::Cloud::GeminiDataAnalytics::V1::CreateDataAgentRequest.new
663
+ #
664
+ # # Call the create_data_agent_sync method.
665
+ # result = client.create_data_agent_sync request
666
+ #
667
+ # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1::DataAgent.
668
+ # p result
669
+ #
670
+ def create_data_agent_sync request, options = nil
671
+ raise ::ArgumentError, "request must be provided" if request.nil?
672
+
673
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1::CreateDataAgentRequest
674
+
675
+ # Converts hash and nil to an options object
676
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
677
+
678
+ # Customize the options with defaults
679
+ call_metadata = @config.rpcs.create_data_agent_sync.metadata.to_h
680
+
681
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
682
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
683
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
684
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1::VERSION,
685
+ transports_version_send: [:rest]
686
+
687
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
688
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
689
+
690
+ options.apply_defaults timeout: @config.rpcs.create_data_agent_sync.timeout,
691
+ metadata: call_metadata,
692
+ retry_policy: @config.rpcs.create_data_agent_sync.retry_policy
693
+
694
+ options.apply_defaults timeout: @config.timeout,
695
+ metadata: @config.metadata,
696
+ retry_policy: @config.retry_policy
697
+
698
+ @data_agent_service_stub.create_data_agent_sync request, options do |result, operation|
699
+ yield result, operation if block_given?
700
+ end
701
+ rescue ::Gapic::Rest::Error => e
702
+ raise ::Google::Cloud::Error.from_error(e)
703
+ end
704
+
705
+ ##
706
+ # Updates the parameters of a single DataAgent.
707
+ #
708
+ # @overload update_data_agent(request, options = nil)
709
+ # Pass arguments to `update_data_agent` via a request object, either of type
710
+ # {::Google::Cloud::GeminiDataAnalytics::V1::UpdateDataAgentRequest} or an equivalent Hash.
711
+ #
712
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1::UpdateDataAgentRequest, ::Hash]
713
+ # A request object representing the call parameters. Required. To specify no
714
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
715
+ # @param options [::Gapic::CallOptions, ::Hash]
716
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
717
+ #
718
+ # @overload update_data_agent(update_mask: nil, data_agent: nil, request_id: nil)
719
+ # Pass arguments to `update_data_agent` via keyword arguments. Note that at
720
+ # least one keyword argument is required. To specify no parameters, or to keep all
721
+ # the default parameter values, pass an empty Hash as a request object (see above).
722
+ #
723
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
724
+ # Optional. Field mask is used to specify the fields to be overwritten in the
725
+ # DataAgent resource by the update.
726
+ # The fields specified in the update_mask are relative to the resource, not
727
+ # the full request. A field will be overwritten if it is in the mask. If the
728
+ # user does not provide a mask then all fields with non-default values
729
+ # present in the request will be overwritten. If a wildcard mask is provided,
730
+ # all fields will be overwritten.
731
+ # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1::DataAgent, ::Hash]
732
+ # Required. The resource being updated.
733
+ # @param request_id [::String]
734
+ # Optional. An optional request ID to identify requests. Specify a unique
735
+ # request ID so that if you must retry your request, the server will know to
736
+ # ignore the request if it has already been completed. The server will
737
+ # guarantee that for at least 60 minutes since the first request.
738
+ #
739
+ # For example, consider a situation where you make an initial request and the
740
+ # request times out. If you make the request again with the same request
741
+ # ID, the server can check if original operation with the same request ID
742
+ # was received, and if so, will ignore the second request. This prevents
743
+ # clients from accidentally creating duplicate commitments.
744
+ #
745
+ # The request ID must be a valid UUID with the exception that zero UUID is
746
+ # not supported (00000000-0000-0000-0000-000000000000).
747
+ # @yield [result, operation] Access the result along with the TransportOperation object
748
+ # @yieldparam result [::Gapic::Operation]
749
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
750
+ #
751
+ # @return [::Gapic::Operation]
752
+ #
753
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
754
+ #
755
+ # @example Basic example
756
+ # require "google/cloud/gemini_data_analytics/v1"
757
+ #
758
+ # # Create a client object. The client can be reused for multiple calls.
759
+ # client = Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
760
+ #
761
+ # # Create a request. To set request fields, pass in keyword arguments.
762
+ # request = Google::Cloud::GeminiDataAnalytics::V1::UpdateDataAgentRequest.new
763
+ #
764
+ # # Call the update_data_agent method.
765
+ # result = client.update_data_agent request
766
+ #
767
+ # # The returned object is of type Gapic::Operation. You can use it to
768
+ # # check the status of an operation, cancel it, or wait for results.
769
+ # # Here is how to wait for a response.
770
+ # result.wait_until_done! timeout: 60
771
+ # if result.response?
772
+ # p result.response
773
+ # else
774
+ # puts "No response received."
775
+ # end
776
+ #
777
+ def update_data_agent request, options = nil
778
+ raise ::ArgumentError, "request must be provided" if request.nil?
779
+
780
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1::UpdateDataAgentRequest
781
+
782
+ # Converts hash and nil to an options object
783
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
784
+
785
+ # Customize the options with defaults
786
+ call_metadata = @config.rpcs.update_data_agent.metadata.to_h
787
+
788
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
789
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
790
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
791
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1::VERSION,
792
+ transports_version_send: [:rest]
793
+
794
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
795
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
796
+
797
+ options.apply_defaults timeout: @config.rpcs.update_data_agent.timeout,
798
+ metadata: call_metadata,
799
+ retry_policy: @config.rpcs.update_data_agent.retry_policy
800
+
801
+ options.apply_defaults timeout: @config.timeout,
802
+ metadata: @config.metadata,
803
+ retry_policy: @config.retry_policy
804
+
805
+ @data_agent_service_stub.update_data_agent request, options do |result, operation|
806
+ result = ::Gapic::Operation.new result, @operations_client, options: options
807
+ yield result, operation if block_given?
808
+ throw :response, result
809
+ end
810
+ rescue ::Gapic::Rest::Error => e
811
+ raise ::Google::Cloud::Error.from_error(e)
812
+ end
813
+
814
+ ##
815
+ # Updates the parameters of a single DataAgent synchronously.
816
+ #
817
+ # @overload update_data_agent_sync(request, options = nil)
818
+ # Pass arguments to `update_data_agent_sync` via a request object, either of type
819
+ # {::Google::Cloud::GeminiDataAnalytics::V1::UpdateDataAgentRequest} or an equivalent Hash.
820
+ #
821
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1::UpdateDataAgentRequest, ::Hash]
822
+ # A request object representing the call parameters. Required. To specify no
823
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
824
+ # @param options [::Gapic::CallOptions, ::Hash]
825
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
826
+ #
827
+ # @overload update_data_agent_sync(update_mask: nil, data_agent: nil, request_id: nil)
828
+ # Pass arguments to `update_data_agent_sync` via keyword arguments. Note that at
829
+ # least one keyword argument is required. To specify no parameters, or to keep all
830
+ # the default parameter values, pass an empty Hash as a request object (see above).
831
+ #
832
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
833
+ # Optional. Field mask is used to specify the fields to be overwritten in the
834
+ # DataAgent resource by the update.
835
+ # The fields specified in the update_mask are relative to the resource, not
836
+ # the full request. A field will be overwritten if it is in the mask. If the
837
+ # user does not provide a mask then all fields with non-default values
838
+ # present in the request will be overwritten. If a wildcard mask is provided,
839
+ # all fields will be overwritten.
840
+ # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1::DataAgent, ::Hash]
841
+ # Required. The resource being updated.
842
+ # @param request_id [::String]
843
+ # Optional. An optional request ID to identify requests. Specify a unique
844
+ # request ID so that if you must retry your request, the server will know to
845
+ # ignore the request if it has already been completed. The server will
846
+ # guarantee that for at least 60 minutes since the first request.
847
+ #
848
+ # For example, consider a situation where you make an initial request and the
849
+ # request times out. If you make the request again with the same request
850
+ # ID, the server can check if original operation with the same request ID
851
+ # was received, and if so, will ignore the second request. This prevents
852
+ # clients from accidentally creating duplicate commitments.
853
+ #
854
+ # The request ID must be a valid UUID with the exception that zero UUID is
855
+ # not supported (00000000-0000-0000-0000-000000000000).
856
+ # @yield [result, operation] Access the result along with the TransportOperation object
857
+ # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1::DataAgent]
858
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
859
+ #
860
+ # @return [::Google::Cloud::GeminiDataAnalytics::V1::DataAgent]
861
+ #
862
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
863
+ #
864
+ # @example Basic example
865
+ # require "google/cloud/gemini_data_analytics/v1"
866
+ #
867
+ # # Create a client object. The client can be reused for multiple calls.
868
+ # client = Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
869
+ #
870
+ # # Create a request. To set request fields, pass in keyword arguments.
871
+ # request = Google::Cloud::GeminiDataAnalytics::V1::UpdateDataAgentRequest.new
872
+ #
873
+ # # Call the update_data_agent_sync method.
874
+ # result = client.update_data_agent_sync request
875
+ #
876
+ # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1::DataAgent.
877
+ # p result
878
+ #
879
+ def update_data_agent_sync request, options = nil
880
+ raise ::ArgumentError, "request must be provided" if request.nil?
881
+
882
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1::UpdateDataAgentRequest
883
+
884
+ # Converts hash and nil to an options object
885
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
886
+
887
+ # Customize the options with defaults
888
+ call_metadata = @config.rpcs.update_data_agent_sync.metadata.to_h
889
+
890
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
891
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
892
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
893
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1::VERSION,
894
+ transports_version_send: [:rest]
895
+
896
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
897
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
898
+
899
+ options.apply_defaults timeout: @config.rpcs.update_data_agent_sync.timeout,
900
+ metadata: call_metadata,
901
+ retry_policy: @config.rpcs.update_data_agent_sync.retry_policy
902
+
903
+ options.apply_defaults timeout: @config.timeout,
904
+ metadata: @config.metadata,
905
+ retry_policy: @config.retry_policy
906
+
907
+ @data_agent_service_stub.update_data_agent_sync request, options do |result, operation|
908
+ yield result, operation if block_given?
909
+ end
910
+ rescue ::Gapic::Rest::Error => e
911
+ raise ::Google::Cloud::Error.from_error(e)
912
+ end
913
+
914
+ ##
915
+ # Deletes a single DataAgent.
916
+ #
917
+ # @overload delete_data_agent(request, options = nil)
918
+ # Pass arguments to `delete_data_agent` via a request object, either of type
919
+ # {::Google::Cloud::GeminiDataAnalytics::V1::DeleteDataAgentRequest} or an equivalent Hash.
920
+ #
921
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1::DeleteDataAgentRequest, ::Hash]
922
+ # A request object representing the call parameters. Required. To specify no
923
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
924
+ # @param options [::Gapic::CallOptions, ::Hash]
925
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
926
+ #
927
+ # @overload delete_data_agent(name: nil, request_id: nil)
928
+ # Pass arguments to `delete_data_agent` via keyword arguments. Note that at
929
+ # least one keyword argument is required. To specify no parameters, or to keep all
930
+ # the default parameter values, pass an empty Hash as a request object (see above).
931
+ #
932
+ # @param name [::String]
933
+ # Required. Name of the resource.
934
+ # @param request_id [::String]
935
+ # Optional. An optional request ID to identify requests. Specify a unique
936
+ # request ID so that if you must retry your request, the server will know to
937
+ # ignore the request if it has already been completed. The server will
938
+ # guarantee that for at least 60 minutes after the first request.
939
+ #
940
+ # For example, consider a situation where you make an initial request and the
941
+ # request times out. If you make the request again with the same request
942
+ # ID, the server can check if original operation with the same request ID
943
+ # was received, and if so, will ignore the second request. This prevents
944
+ # clients from accidentally creating duplicate commitments.
945
+ #
946
+ # The request ID must be a valid UUID with the exception that zero UUID is
947
+ # not supported (00000000-0000-0000-0000-000000000000).
948
+ # @yield [result, operation] Access the result along with the TransportOperation object
949
+ # @yieldparam result [::Gapic::Operation]
950
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
951
+ #
952
+ # @return [::Gapic::Operation]
953
+ #
954
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
955
+ #
956
+ # @example Basic example
957
+ # require "google/cloud/gemini_data_analytics/v1"
958
+ #
959
+ # # Create a client object. The client can be reused for multiple calls.
960
+ # client = Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
961
+ #
962
+ # # Create a request. To set request fields, pass in keyword arguments.
963
+ # request = Google::Cloud::GeminiDataAnalytics::V1::DeleteDataAgentRequest.new
964
+ #
965
+ # # Call the delete_data_agent method.
966
+ # result = client.delete_data_agent request
967
+ #
968
+ # # The returned object is of type Gapic::Operation. You can use it to
969
+ # # check the status of an operation, cancel it, or wait for results.
970
+ # # Here is how to wait for a response.
971
+ # result.wait_until_done! timeout: 60
972
+ # if result.response?
973
+ # p result.response
974
+ # else
975
+ # puts "No response received."
976
+ # end
977
+ #
978
+ def delete_data_agent request, options = nil
979
+ raise ::ArgumentError, "request must be provided" if request.nil?
980
+
981
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1::DeleteDataAgentRequest
982
+
983
+ # Converts hash and nil to an options object
984
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
985
+
986
+ # Customize the options with defaults
987
+ call_metadata = @config.rpcs.delete_data_agent.metadata.to_h
988
+
989
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
990
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
991
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
992
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1::VERSION,
993
+ transports_version_send: [:rest]
994
+
995
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
996
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
997
+
998
+ options.apply_defaults timeout: @config.rpcs.delete_data_agent.timeout,
999
+ metadata: call_metadata,
1000
+ retry_policy: @config.rpcs.delete_data_agent.retry_policy
1001
+
1002
+ options.apply_defaults timeout: @config.timeout,
1003
+ metadata: @config.metadata,
1004
+ retry_policy: @config.retry_policy
1005
+
1006
+ @data_agent_service_stub.delete_data_agent request, options do |result, operation|
1007
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1008
+ yield result, operation if block_given?
1009
+ throw :response, result
1010
+ end
1011
+ rescue ::Gapic::Rest::Error => e
1012
+ raise ::Google::Cloud::Error.from_error(e)
1013
+ end
1014
+
1015
+ ##
1016
+ # Deletes a single DataAgent synchronously.
1017
+ #
1018
+ # @overload delete_data_agent_sync(request, options = nil)
1019
+ # Pass arguments to `delete_data_agent_sync` via a request object, either of type
1020
+ # {::Google::Cloud::GeminiDataAnalytics::V1::DeleteDataAgentRequest} or an equivalent Hash.
1021
+ #
1022
+ # @param request [::Google::Cloud::GeminiDataAnalytics::V1::DeleteDataAgentRequest, ::Hash]
1023
+ # A request object representing the call parameters. Required. To specify no
1024
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1025
+ # @param options [::Gapic::CallOptions, ::Hash]
1026
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1027
+ #
1028
+ # @overload delete_data_agent_sync(name: nil, request_id: nil)
1029
+ # Pass arguments to `delete_data_agent_sync` via keyword arguments. Note that at
1030
+ # least one keyword argument is required. To specify no parameters, or to keep all
1031
+ # the default parameter values, pass an empty Hash as a request object (see above).
1032
+ #
1033
+ # @param name [::String]
1034
+ # Required. Name of the resource.
1035
+ # @param request_id [::String]
1036
+ # Optional. An optional request ID to identify requests. Specify a unique
1037
+ # request ID so that if you must retry your request, the server will know to
1038
+ # ignore the request if it has already been completed. The server will
1039
+ # guarantee that for at least 60 minutes after the first request.
1040
+ #
1041
+ # For example, consider a situation where you make an initial request and the
1042
+ # request times out. If you make the request again with the same request
1043
+ # ID, the server can check if original operation with the same request ID
1044
+ # was received, and if so, will ignore the second request. This prevents
1045
+ # clients from accidentally creating duplicate commitments.
1046
+ #
1047
+ # The request ID must be a valid UUID with the exception that zero UUID is
1048
+ # not supported (00000000-0000-0000-0000-000000000000).
1049
+ # @yield [result, operation] Access the result along with the TransportOperation object
1050
+ # @yieldparam result [::Google::Protobuf::Empty]
1051
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1052
+ #
1053
+ # @return [::Google::Protobuf::Empty]
1054
+ #
1055
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1056
+ #
1057
+ # @example Basic example
1058
+ # require "google/cloud/gemini_data_analytics/v1"
1059
+ #
1060
+ # # Create a client object. The client can be reused for multiple calls.
1061
+ # client = Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
1062
+ #
1063
+ # # Create a request. To set request fields, pass in keyword arguments.
1064
+ # request = Google::Cloud::GeminiDataAnalytics::V1::DeleteDataAgentRequest.new
1065
+ #
1066
+ # # Call the delete_data_agent_sync method.
1067
+ # result = client.delete_data_agent_sync request
1068
+ #
1069
+ # # The returned object is of type Google::Protobuf::Empty.
1070
+ # p result
1071
+ #
1072
+ def delete_data_agent_sync request, options = nil
1073
+ raise ::ArgumentError, "request must be provided" if request.nil?
1074
+
1075
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1::DeleteDataAgentRequest
1076
+
1077
+ # Converts hash and nil to an options object
1078
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1079
+
1080
+ # Customize the options with defaults
1081
+ call_metadata = @config.rpcs.delete_data_agent_sync.metadata.to_h
1082
+
1083
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1084
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1085
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1086
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1::VERSION,
1087
+ transports_version_send: [:rest]
1088
+
1089
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1090
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1091
+
1092
+ options.apply_defaults timeout: @config.rpcs.delete_data_agent_sync.timeout,
1093
+ metadata: call_metadata,
1094
+ retry_policy: @config.rpcs.delete_data_agent_sync.retry_policy
1095
+
1096
+ options.apply_defaults timeout: @config.timeout,
1097
+ metadata: @config.metadata,
1098
+ retry_policy: @config.retry_policy
1099
+
1100
+ @data_agent_service_stub.delete_data_agent_sync request, options do |result, operation|
1101
+ yield result, operation if block_given?
1102
+ end
1103
+ rescue ::Gapic::Rest::Error => e
1104
+ raise ::Google::Cloud::Error.from_error(e)
1105
+ end
1106
+
1107
+ ##
1108
+ # Gets the IAM policy for DataAgent
1109
+ #
1110
+ # @overload get_iam_policy(request, options = nil)
1111
+ # Pass arguments to `get_iam_policy` via a request object, either of type
1112
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
1113
+ #
1114
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
1115
+ # A request object representing the call parameters. Required. To specify no
1116
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1117
+ # @param options [::Gapic::CallOptions, ::Hash]
1118
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1119
+ #
1120
+ # @overload get_iam_policy(resource: nil, options: nil)
1121
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
1122
+ # least one keyword argument is required. To specify no parameters, or to keep all
1123
+ # the default parameter values, pass an empty Hash as a request object (see above).
1124
+ #
1125
+ # @param resource [::String]
1126
+ # REQUIRED: The resource for which the policy is being requested.
1127
+ # See the operation documentation for the appropriate value for this field.
1128
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
1129
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
1130
+ # `GetIamPolicy`.
1131
+ # @yield [result, operation] Access the result along with the TransportOperation object
1132
+ # @yieldparam result [::Google::Iam::V1::Policy]
1133
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1134
+ #
1135
+ # @return [::Google::Iam::V1::Policy]
1136
+ #
1137
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1138
+ #
1139
+ # @example Basic example
1140
+ # require "google/cloud/gemini_data_analytics/v1"
1141
+ #
1142
+ # # Create a client object. The client can be reused for multiple calls.
1143
+ # client = Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
1144
+ #
1145
+ # # Create a request. To set request fields, pass in keyword arguments.
1146
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
1147
+ #
1148
+ # # Call the get_iam_policy method.
1149
+ # result = client.get_iam_policy request
1150
+ #
1151
+ # # The returned object is of type Google::Iam::V1::Policy.
1152
+ # p result
1153
+ #
1154
+ def get_iam_policy request, options = nil
1155
+ raise ::ArgumentError, "request must be provided" if request.nil?
1156
+
1157
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
1158
+
1159
+ # Converts hash and nil to an options object
1160
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1161
+
1162
+ # Customize the options with defaults
1163
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
1164
+
1165
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1166
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1167
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1168
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1::VERSION,
1169
+ transports_version_send: [:rest]
1170
+
1171
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1172
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1173
+
1174
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
1175
+ metadata: call_metadata,
1176
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
1177
+
1178
+ options.apply_defaults timeout: @config.timeout,
1179
+ metadata: @config.metadata,
1180
+ retry_policy: @config.retry_policy
1181
+
1182
+ @data_agent_service_stub.get_iam_policy request, options do |result, operation|
1183
+ yield result, operation if block_given?
1184
+ end
1185
+ rescue ::Gapic::Rest::Error => e
1186
+ raise ::Google::Cloud::Error.from_error(e)
1187
+ end
1188
+
1189
+ ##
1190
+ # Sets the IAM policy for a DataAgent.
1191
+ #
1192
+ # @overload set_iam_policy(request, options = nil)
1193
+ # Pass arguments to `set_iam_policy` via a request object, either of type
1194
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
1195
+ #
1196
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
1197
+ # A request object representing the call parameters. Required. To specify no
1198
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1199
+ # @param options [::Gapic::CallOptions, ::Hash]
1200
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1201
+ #
1202
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
1203
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
1204
+ # least one keyword argument is required. To specify no parameters, or to keep all
1205
+ # the default parameter values, pass an empty Hash as a request object (see above).
1206
+ #
1207
+ # @param resource [::String]
1208
+ # REQUIRED: The resource for which the policy is being specified.
1209
+ # See the operation documentation for the appropriate value for this field.
1210
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
1211
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
1212
+ # the policy is limited to a few 10s of KB. An empty policy is a
1213
+ # valid policy but certain Cloud Platform services (such as Projects)
1214
+ # might reject them.
1215
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1216
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
1217
+ # the fields in the mask will be modified. If no mask is provided, the
1218
+ # following default mask is used:
1219
+ #
1220
+ # `paths: "bindings, etag"`
1221
+ # @yield [result, operation] Access the result along with the TransportOperation object
1222
+ # @yieldparam result [::Google::Iam::V1::Policy]
1223
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1224
+ #
1225
+ # @return [::Google::Iam::V1::Policy]
1226
+ #
1227
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1228
+ #
1229
+ # @example Basic example
1230
+ # require "google/cloud/gemini_data_analytics/v1"
1231
+ #
1232
+ # # Create a client object. The client can be reused for multiple calls.
1233
+ # client = Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new
1234
+ #
1235
+ # # Create a request. To set request fields, pass in keyword arguments.
1236
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
1237
+ #
1238
+ # # Call the set_iam_policy method.
1239
+ # result = client.set_iam_policy request
1240
+ #
1241
+ # # The returned object is of type Google::Iam::V1::Policy.
1242
+ # p result
1243
+ #
1244
+ def set_iam_policy request, options = nil
1245
+ raise ::ArgumentError, "request must be provided" if request.nil?
1246
+
1247
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
1248
+
1249
+ # Converts hash and nil to an options object
1250
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1251
+
1252
+ # Customize the options with defaults
1253
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
1254
+
1255
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1256
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1257
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1258
+ gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1::VERSION,
1259
+ transports_version_send: [:rest]
1260
+
1261
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1262
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1263
+
1264
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1265
+ metadata: call_metadata,
1266
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
1267
+
1268
+ options.apply_defaults timeout: @config.timeout,
1269
+ metadata: @config.metadata,
1270
+ retry_policy: @config.retry_policy
1271
+
1272
+ @data_agent_service_stub.set_iam_policy request, options do |result, operation|
1273
+ yield result, operation if block_given?
1274
+ end
1275
+ rescue ::Gapic::Rest::Error => e
1276
+ raise ::Google::Cloud::Error.from_error(e)
1277
+ end
1278
+
1279
+ ##
1280
+ # Configuration class for the DataAgentService REST API.
1281
+ #
1282
+ # This class represents the configuration for DataAgentService REST,
1283
+ # providing control over timeouts, retry behavior, logging, transport
1284
+ # parameters, and other low-level controls. Certain parameters can also be
1285
+ # applied individually to specific RPCs. See
1286
+ # {::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client::Configuration::Rpcs}
1287
+ # for a list of RPCs that can be configured independently.
1288
+ #
1289
+ # Configuration can be applied globally to all clients, or to a single client
1290
+ # on construction.
1291
+ #
1292
+ # @example
1293
+ #
1294
+ # # Modify the global config, setting the timeout for
1295
+ # # list_data_agents to 20 seconds,
1296
+ # # and all remaining timeouts to 10 seconds.
1297
+ # ::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.configure do |config|
1298
+ # config.timeout = 10.0
1299
+ # config.rpcs.list_data_agents.timeout = 20.0
1300
+ # end
1301
+ #
1302
+ # # Apply the above configuration only to a new client.
1303
+ # client = ::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Rest::Client.new do |config|
1304
+ # config.timeout = 10.0
1305
+ # config.rpcs.list_data_agents.timeout = 20.0
1306
+ # end
1307
+ #
1308
+ # @!attribute [rw] endpoint
1309
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1310
+ # nil, indicating to use the default endpoint in the current universe domain.
1311
+ # @return [::String,nil]
1312
+ # @!attribute [rw] credentials
1313
+ # Credentials to send with calls. You may provide any of the following types:
1314
+ # * (`String`) The path to a service account key file in JSON format
1315
+ # * (`Hash`) A service account key as a Hash
1316
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1317
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1318
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1319
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1320
+ # * (`nil`) indicating no credentials
1321
+ #
1322
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1323
+ # external source for authentication to Google Cloud, you must validate it before
1324
+ # providing it to a Google API client library. Providing an unvalidated credential
1325
+ # configuration to Google APIs can compromise the security of your systems and data.
1326
+ # For more information, refer to [Validate credential configurations from external
1327
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1328
+ # @return [::Object]
1329
+ # @!attribute [rw] scope
1330
+ # The OAuth scopes
1331
+ # @return [::Array<::String>]
1332
+ # @!attribute [rw] lib_name
1333
+ # The library name as recorded in instrumentation and logging
1334
+ # @return [::String]
1335
+ # @!attribute [rw] lib_version
1336
+ # The library version as recorded in instrumentation and logging
1337
+ # @return [::String]
1338
+ # @!attribute [rw] timeout
1339
+ # The call timeout in seconds.
1340
+ # @return [::Numeric]
1341
+ # @!attribute [rw] metadata
1342
+ # Additional headers to be sent with the call.
1343
+ # @return [::Hash{::Symbol=>::String}]
1344
+ # @!attribute [rw] retry_policy
1345
+ # The retry policy. The value is a hash with the following keys:
1346
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1347
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1348
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1349
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1350
+ # trigger a retry.
1351
+ # @return [::Hash]
1352
+ # @!attribute [rw] quota_project
1353
+ # A separate project against which to charge quota.
1354
+ # @return [::String]
1355
+ # @!attribute [rw] universe_domain
1356
+ # The universe domain within which to make requests. This determines the
1357
+ # default endpoint URL. The default value of nil uses the environment
1358
+ # universe (usually the default "googleapis.com" universe).
1359
+ # @return [::String,nil]
1360
+ # @!attribute [rw] logger
1361
+ # A custom logger to use for request/response debug logging, or the value
1362
+ # `:default` (the default) to construct a default logger, or `nil` to
1363
+ # explicitly disable logging.
1364
+ # @return [::Logger,:default,nil]
1365
+ #
1366
+ class Configuration
1367
+ extend ::Gapic::Config
1368
+
1369
+ # @private
1370
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1371
+ DEFAULT_ENDPOINT = "geminidataanalytics.googleapis.com"
1372
+
1373
+ config_attr :endpoint, nil, ::String, nil
1374
+ config_attr :credentials, nil do |value|
1375
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
1376
+ allowed.any? { |klass| klass === value }
1377
+ end
1378
+ config_attr :scope, nil, ::String, ::Array, nil
1379
+ config_attr :lib_name, nil, ::String, nil
1380
+ config_attr :lib_version, nil, ::String, nil
1381
+ config_attr :timeout, nil, ::Numeric, nil
1382
+ config_attr :metadata, nil, ::Hash, nil
1383
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1384
+ config_attr :quota_project, nil, ::String, nil
1385
+ config_attr :universe_domain, nil, ::String, nil
1386
+
1387
+ # @private
1388
+ # Overrides for http bindings for the RPCs of this service
1389
+ # are only used when this service is used as mixin, and only
1390
+ # by the host service.
1391
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1392
+ config_attr :bindings_override, {}, ::Hash, nil
1393
+ config_attr :logger, :default, ::Logger, nil, :default
1394
+
1395
+ # @private
1396
+ def initialize parent_config = nil
1397
+ @parent_config = parent_config unless parent_config.nil?
1398
+
1399
+ yield self if block_given?
1400
+ end
1401
+
1402
+ ##
1403
+ # Configurations for individual RPCs
1404
+ # @return [Rpcs]
1405
+ #
1406
+ def rpcs
1407
+ @rpcs ||= begin
1408
+ parent_rpcs = nil
1409
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1410
+ Rpcs.new parent_rpcs
1411
+ end
1412
+ end
1413
+
1414
+ ##
1415
+ # Configuration RPC class for the DataAgentService API.
1416
+ #
1417
+ # Includes fields providing the configuration for each RPC in this service.
1418
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1419
+ # the following configuration fields:
1420
+ #
1421
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1422
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1423
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1424
+ # include the following keys:
1425
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1426
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1427
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1428
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1429
+ # trigger a retry.
1430
+ #
1431
+ class Rpcs
1432
+ ##
1433
+ # RPC-specific configuration for `list_data_agents`
1434
+ # @return [::Gapic::Config::Method]
1435
+ #
1436
+ attr_reader :list_data_agents
1437
+ ##
1438
+ # RPC-specific configuration for `list_accessible_data_agents`
1439
+ # @return [::Gapic::Config::Method]
1440
+ #
1441
+ attr_reader :list_accessible_data_agents
1442
+ ##
1443
+ # RPC-specific configuration for `get_data_agent`
1444
+ # @return [::Gapic::Config::Method]
1445
+ #
1446
+ attr_reader :get_data_agent
1447
+ ##
1448
+ # RPC-specific configuration for `create_data_agent`
1449
+ # @return [::Gapic::Config::Method]
1450
+ #
1451
+ attr_reader :create_data_agent
1452
+ ##
1453
+ # RPC-specific configuration for `create_data_agent_sync`
1454
+ # @return [::Gapic::Config::Method]
1455
+ #
1456
+ attr_reader :create_data_agent_sync
1457
+ ##
1458
+ # RPC-specific configuration for `update_data_agent`
1459
+ # @return [::Gapic::Config::Method]
1460
+ #
1461
+ attr_reader :update_data_agent
1462
+ ##
1463
+ # RPC-specific configuration for `update_data_agent_sync`
1464
+ # @return [::Gapic::Config::Method]
1465
+ #
1466
+ attr_reader :update_data_agent_sync
1467
+ ##
1468
+ # RPC-specific configuration for `delete_data_agent`
1469
+ # @return [::Gapic::Config::Method]
1470
+ #
1471
+ attr_reader :delete_data_agent
1472
+ ##
1473
+ # RPC-specific configuration for `delete_data_agent_sync`
1474
+ # @return [::Gapic::Config::Method]
1475
+ #
1476
+ attr_reader :delete_data_agent_sync
1477
+ ##
1478
+ # RPC-specific configuration for `get_iam_policy`
1479
+ # @return [::Gapic::Config::Method]
1480
+ #
1481
+ attr_reader :get_iam_policy
1482
+ ##
1483
+ # RPC-specific configuration for `set_iam_policy`
1484
+ # @return [::Gapic::Config::Method]
1485
+ #
1486
+ attr_reader :set_iam_policy
1487
+
1488
+ # @private
1489
+ def initialize parent_rpcs = nil
1490
+ list_data_agents_config = parent_rpcs.list_data_agents if parent_rpcs.respond_to? :list_data_agents
1491
+ @list_data_agents = ::Gapic::Config::Method.new list_data_agents_config
1492
+ list_accessible_data_agents_config = parent_rpcs.list_accessible_data_agents if parent_rpcs.respond_to? :list_accessible_data_agents
1493
+ @list_accessible_data_agents = ::Gapic::Config::Method.new list_accessible_data_agents_config
1494
+ get_data_agent_config = parent_rpcs.get_data_agent if parent_rpcs.respond_to? :get_data_agent
1495
+ @get_data_agent = ::Gapic::Config::Method.new get_data_agent_config
1496
+ create_data_agent_config = parent_rpcs.create_data_agent if parent_rpcs.respond_to? :create_data_agent
1497
+ @create_data_agent = ::Gapic::Config::Method.new create_data_agent_config
1498
+ create_data_agent_sync_config = parent_rpcs.create_data_agent_sync if parent_rpcs.respond_to? :create_data_agent_sync
1499
+ @create_data_agent_sync = ::Gapic::Config::Method.new create_data_agent_sync_config
1500
+ update_data_agent_config = parent_rpcs.update_data_agent if parent_rpcs.respond_to? :update_data_agent
1501
+ @update_data_agent = ::Gapic::Config::Method.new update_data_agent_config
1502
+ update_data_agent_sync_config = parent_rpcs.update_data_agent_sync if parent_rpcs.respond_to? :update_data_agent_sync
1503
+ @update_data_agent_sync = ::Gapic::Config::Method.new update_data_agent_sync_config
1504
+ delete_data_agent_config = parent_rpcs.delete_data_agent if parent_rpcs.respond_to? :delete_data_agent
1505
+ @delete_data_agent = ::Gapic::Config::Method.new delete_data_agent_config
1506
+ delete_data_agent_sync_config = parent_rpcs.delete_data_agent_sync if parent_rpcs.respond_to? :delete_data_agent_sync
1507
+ @delete_data_agent_sync = ::Gapic::Config::Method.new delete_data_agent_sync_config
1508
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
1509
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1510
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1511
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1512
+
1513
+ yield self if block_given?
1514
+ end
1515
+ end
1516
+ end
1517
+ end
1518
+ end
1519
+ end
1520
+ end
1521
+ end
1522
+ end
1523
+ end