google-cloud-chronicle-v1 0.4.0 → 0.6.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 (71) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -4
  3. data/README.md +6 -6
  4. data/lib/google/cloud/chronicle/v1/big_query_export_pb.rb +34 -0
  5. data/lib/google/cloud/chronicle/v1/big_query_export_service/client.rb +682 -0
  6. data/lib/google/cloud/chronicle/v1/big_query_export_service/credentials.rb +49 -0
  7. data/lib/google/cloud/chronicle/v1/big_query_export_service/paths.rb +71 -0
  8. data/lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb +618 -0
  9. data/lib/google/cloud/chronicle/v1/big_query_export_service/rest/service_stub.rb +266 -0
  10. data/lib/google/cloud/chronicle/v1/big_query_export_service/rest.rb +52 -0
  11. data/lib/google/cloud/chronicle/v1/big_query_export_service.rb +55 -0
  12. data/lib/google/cloud/chronicle/v1/big_query_export_services_pb.rb +51 -0
  13. data/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb +83 -0
  14. data/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb +584 -0
  15. data/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb +49 -0
  16. data/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb +73 -0
  17. data/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb +527 -0
  18. data/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb +203 -0
  19. data/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb +52 -0
  20. data/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb +55 -0
  21. data/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb +47 -0
  22. data/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb +58 -0
  23. data/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb +589 -0
  24. data/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb +49 -0
  25. data/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb +94 -0
  26. data/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb +532 -0
  27. data/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb +204 -0
  28. data/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb +52 -0
  29. data/lib/google/cloud/chronicle/v1/dashboard_query_service.rb +55 -0
  30. data/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb +47 -0
  31. data/lib/google/cloud/chronicle/v1/data_table_pb.rb +57 -0
  32. data/lib/google/cloud/chronicle/v1/data_table_service/client.rb +1915 -0
  33. data/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb +49 -0
  34. data/lib/google/cloud/chronicle/v1/data_table_service/paths.rb +138 -0
  35. data/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb +1767 -0
  36. data/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb +1004 -0
  37. data/lib/google/cloud/chronicle/v1/data_table_service/rest.rb +52 -0
  38. data/lib/google/cloud/chronicle/v1/data_table_service.rb +55 -0
  39. data/lib/google/cloud/chronicle/v1/data_table_services_pb.rb +73 -0
  40. data/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb +25 -0
  41. data/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb +33 -0
  42. data/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb +717 -0
  43. data/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb +49 -0
  44. data/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb +136 -0
  45. data/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb +653 -0
  46. data/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb +265 -0
  47. data/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb +53 -0
  48. data/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb +56 -0
  49. data/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb +50 -0
  50. data/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb +61 -0
  51. data/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb +1611 -0
  52. data/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb +49 -0
  53. data/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb +115 -0
  54. data/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb +1484 -0
  55. data/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb +822 -0
  56. data/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb +52 -0
  57. data/lib/google/cloud/chronicle/v1/native_dashboard_service.rb +55 -0
  58. data/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb +67 -0
  59. data/lib/google/cloud/chronicle/v1/rest.rb +7 -1
  60. data/lib/google/cloud/chronicle/v1/version.rb +1 -1
  61. data/lib/google/cloud/chronicle/v1.rb +8 -2
  62. data/proto_docs/google/api/client.rb +149 -29
  63. data/proto_docs/google/cloud/chronicle/v1/big_query_export.rb +142 -0
  64. data/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb +923 -0
  65. data/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb +653 -0
  66. data/proto_docs/google/cloud/chronicle/v1/data_table.rb +512 -0
  67. data/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb +82 -0
  68. data/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb +141 -0
  69. data/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb +502 -0
  70. data/proto_docs/google/type/date.rb +56 -0
  71. metadata +71 -9
@@ -0,0 +1,618 @@
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/chronicle/v1/big_query_export_pb"
21
+ require "google/cloud/chronicle/v1/big_query_export_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Chronicle
26
+ module V1
27
+ module BigQueryExportService
28
+ module Rest
29
+ ##
30
+ # REST client for the BigQueryExportService service.
31
+ #
32
+ # Service for managing BigQuery export configurations for Chronicle instances.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :big_query_export_service_stub
45
+
46
+ ##
47
+ # Configure the BigQueryExportService Client class.
48
+ #
49
+ # See {::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all BigQueryExportService clients
55
+ # ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "Chronicle", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config.rpcs.get_big_query_export.timeout = 120.0
76
+ default_config.rpcs.get_big_query_export.retry_policy = {
77
+ initial_delay: 1.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [14]
78
+ }
79
+
80
+ default_config.rpcs.update_big_query_export.timeout = 120.0
81
+ default_config.rpcs.update_big_query_export.retry_policy = {
82
+ initial_delay: 1.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [14]
83
+ }
84
+
85
+ default_config.rpcs.provision_big_query_export.timeout = 120.0
86
+ default_config.rpcs.provision_big_query_export.retry_policy = {
87
+ initial_delay: 1.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [14]
88
+ }
89
+
90
+ default_config
91
+ end
92
+ yield @configure if block_given?
93
+ @configure
94
+ end
95
+
96
+ ##
97
+ # Configure the BigQueryExportService Client instance.
98
+ #
99
+ # The configuration is set to the derived mode, meaning that values can be changed,
100
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
101
+ # should be made on {Client.configure}.
102
+ #
103
+ # See {::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client::Configuration}
104
+ # for a description of the configuration fields.
105
+ #
106
+ # @yield [config] Configure the Client client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ # @return [Client::Configuration]
110
+ #
111
+ def configure
112
+ yield @config if block_given?
113
+ @config
114
+ end
115
+
116
+ ##
117
+ # The effective universe domain
118
+ #
119
+ # @return [String]
120
+ #
121
+ def universe_domain
122
+ @big_query_export_service_stub.universe_domain
123
+ end
124
+
125
+ ##
126
+ # Create a new BigQueryExportService REST client object.
127
+ #
128
+ # @example
129
+ #
130
+ # # Create a client using the default configuration
131
+ # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new
132
+ #
133
+ # # Create a client using a custom configuration
134
+ # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new do |config|
135
+ # config.timeout = 10.0
136
+ # end
137
+ #
138
+ # @yield [config] Configure the BigQueryExportService client.
139
+ # @yieldparam config [Client::Configuration]
140
+ #
141
+ def initialize
142
+ # Create the configuration object
143
+ @config = Configuration.new Client.configure
144
+
145
+ # Yield the configuration if needed
146
+ yield @config if block_given?
147
+
148
+ # Create credentials
149
+ credentials = @config.credentials
150
+ # Use self-signed JWT if the endpoint is unchanged from default,
151
+ # but only if the default endpoint does not have a region prefix.
152
+ enable_self_signed_jwt = @config.endpoint.nil? ||
153
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
154
+ !@config.endpoint.split(".").first.include?("-"))
155
+ credentials ||= Credentials.default scope: @config.scope,
156
+ enable_self_signed_jwt: enable_self_signed_jwt
157
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
158
+ credentials = Credentials.new credentials, scope: @config.scope
159
+ end
160
+
161
+ @quota_project_id = @config.quota_project
162
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
163
+
164
+ @big_query_export_service_stub = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::ServiceStub.new(
165
+ endpoint: @config.endpoint,
166
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
167
+ universe_domain: @config.universe_domain,
168
+ credentials: credentials,
169
+ logger: @config.logger
170
+ )
171
+
172
+ @big_query_export_service_stub.logger(stub: true)&.info do |entry|
173
+ entry.set_system_name
174
+ entry.set_service
175
+ entry.message = "Created client for #{entry.service}"
176
+ entry.set_credentials_fields credentials
177
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
178
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
179
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
180
+ end
181
+ end
182
+
183
+ ##
184
+ # The logger used for request/response debug logging.
185
+ #
186
+ # @return [Logger]
187
+ #
188
+ def logger
189
+ @big_query_export_service_stub.logger
190
+ end
191
+
192
+ # Service calls
193
+
194
+ ##
195
+ # Get the BigQuery export configuration for a Chronicle instance.
196
+ #
197
+ # @overload get_big_query_export(request, options = nil)
198
+ # Pass arguments to `get_big_query_export` via a request object, either of type
199
+ # {::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest} or an equivalent Hash.
200
+ #
201
+ # @param request [::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest, ::Hash]
202
+ # A request object representing the call parameters. Required. To specify no
203
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
204
+ # @param options [::Gapic::CallOptions, ::Hash]
205
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
206
+ #
207
+ # @overload get_big_query_export(name: nil)
208
+ # Pass arguments to `get_big_query_export` via keyword arguments. Note that at
209
+ # least one keyword argument is required. To specify no parameters, or to keep all
210
+ # the default parameter values, pass an empty Hash as a request object (see above).
211
+ #
212
+ # @param name [::String]
213
+ # Required. The resource name of the BigqueryExport to retrieve.
214
+ # Format:
215
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/bigQueryExport
216
+ # @yield [result, operation] Access the result along with the TransportOperation object
217
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::BigQueryExport]
218
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
219
+ #
220
+ # @return [::Google::Cloud::Chronicle::V1::BigQueryExport]
221
+ #
222
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
223
+ #
224
+ # @example Basic example
225
+ # require "google/cloud/chronicle/v1"
226
+ #
227
+ # # Create a client object. The client can be reused for multiple calls.
228
+ # client = Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new
229
+ #
230
+ # # Create a request. To set request fields, pass in keyword arguments.
231
+ # request = Google::Cloud::Chronicle::V1::GetBigQueryExportRequest.new
232
+ #
233
+ # # Call the get_big_query_export method.
234
+ # result = client.get_big_query_export request
235
+ #
236
+ # # The returned object is of type Google::Cloud::Chronicle::V1::BigQueryExport.
237
+ # p result
238
+ #
239
+ def get_big_query_export request, options = nil
240
+ raise ::ArgumentError, "request must be provided" if request.nil?
241
+
242
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest
243
+
244
+ # Converts hash and nil to an options object
245
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
246
+
247
+ # Customize the options with defaults
248
+ call_metadata = @config.rpcs.get_big_query_export.metadata.to_h
249
+
250
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
251
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
252
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
253
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
254
+ transports_version_send: [:rest]
255
+
256
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
257
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
258
+
259
+ options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout,
260
+ metadata: call_metadata,
261
+ retry_policy: @config.rpcs.get_big_query_export.retry_policy
262
+
263
+ options.apply_defaults timeout: @config.timeout,
264
+ metadata: @config.metadata,
265
+ retry_policy: @config.retry_policy
266
+
267
+ @big_query_export_service_stub.get_big_query_export request, options do |result, operation|
268
+ yield result, operation if block_given?
269
+ end
270
+ rescue ::Gapic::Rest::Error => e
271
+ raise ::Google::Cloud::Error.from_error(e)
272
+ end
273
+
274
+ ##
275
+ # Update the BigQuery export configuration for a Chronicle instance.
276
+ #
277
+ # @overload update_big_query_export(request, options = nil)
278
+ # Pass arguments to `update_big_query_export` via a request object, either of type
279
+ # {::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest} or an equivalent Hash.
280
+ #
281
+ # @param request [::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest, ::Hash]
282
+ # A request object representing the call parameters. Required. To specify no
283
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
284
+ # @param options [::Gapic::CallOptions, ::Hash]
285
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
286
+ #
287
+ # @overload update_big_query_export(big_query_export: nil, update_mask: nil)
288
+ # Pass arguments to `update_big_query_export` via keyword arguments. Note that at
289
+ # least one keyword argument is required. To specify no parameters, or to keep all
290
+ # the default parameter values, pass an empty Hash as a request object (see above).
291
+ #
292
+ # @param big_query_export [::Google::Cloud::Chronicle::V1::BigQueryExport, ::Hash]
293
+ # Required. The BigQueryExport settings to update.
294
+ # Format:
295
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/bigQueryExport
296
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
297
+ # Optional. The list of fields to update.
298
+ # @yield [result, operation] Access the result along with the TransportOperation object
299
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::BigQueryExport]
300
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
301
+ #
302
+ # @return [::Google::Cloud::Chronicle::V1::BigQueryExport]
303
+ #
304
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
305
+ #
306
+ # @example Basic example
307
+ # require "google/cloud/chronicle/v1"
308
+ #
309
+ # # Create a client object. The client can be reused for multiple calls.
310
+ # client = Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new
311
+ #
312
+ # # Create a request. To set request fields, pass in keyword arguments.
313
+ # request = Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest.new
314
+ #
315
+ # # Call the update_big_query_export method.
316
+ # result = client.update_big_query_export request
317
+ #
318
+ # # The returned object is of type Google::Cloud::Chronicle::V1::BigQueryExport.
319
+ # p result
320
+ #
321
+ def update_big_query_export request, options = nil
322
+ raise ::ArgumentError, "request must be provided" if request.nil?
323
+
324
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest
325
+
326
+ # Converts hash and nil to an options object
327
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
328
+
329
+ # Customize the options with defaults
330
+ call_metadata = @config.rpcs.update_big_query_export.metadata.to_h
331
+
332
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
333
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
334
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
335
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
336
+ transports_version_send: [:rest]
337
+
338
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
339
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
340
+
341
+ options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout,
342
+ metadata: call_metadata,
343
+ retry_policy: @config.rpcs.update_big_query_export.retry_policy
344
+
345
+ options.apply_defaults timeout: @config.timeout,
346
+ metadata: @config.metadata,
347
+ retry_policy: @config.retry_policy
348
+
349
+ @big_query_export_service_stub.update_big_query_export request, options do |result, operation|
350
+ yield result, operation if block_given?
351
+ end
352
+ rescue ::Gapic::Rest::Error => e
353
+ raise ::Google::Cloud::Error.from_error(e)
354
+ end
355
+
356
+ ##
357
+ # Provision the BigQuery export for a Chronicle instance. This will create
358
+ # \\{\\{gcp_name}} resources like \\{\\{storage_name}} buckets, BigQuery datasets
359
+ # and set default export settings for each data source.
360
+ #
361
+ # @overload provision_big_query_export(request, options = nil)
362
+ # Pass arguments to `provision_big_query_export` via a request object, either of type
363
+ # {::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest} or an equivalent Hash.
364
+ #
365
+ # @param request [::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest, ::Hash]
366
+ # A request object representing the call parameters. Required. To specify no
367
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
368
+ # @param options [::Gapic::CallOptions, ::Hash]
369
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
370
+ #
371
+ # @overload provision_big_query_export(parent: nil)
372
+ # Pass arguments to `provision_big_query_export` via keyword arguments. Note that at
373
+ # least one keyword argument is required. To specify no parameters, or to keep all
374
+ # the default parameter values, pass an empty Hash as a request object (see above).
375
+ #
376
+ # @param parent [::String]
377
+ # Required. The instance for which BigQuery export is being provisioned.
378
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
379
+ # @yield [result, operation] Access the result along with the TransportOperation object
380
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::BigQueryExport]
381
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
382
+ #
383
+ # @return [::Google::Cloud::Chronicle::V1::BigQueryExport]
384
+ #
385
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
386
+ #
387
+ # @example Basic example
388
+ # require "google/cloud/chronicle/v1"
389
+ #
390
+ # # Create a client object. The client can be reused for multiple calls.
391
+ # client = Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new
392
+ #
393
+ # # Create a request. To set request fields, pass in keyword arguments.
394
+ # request = Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest.new
395
+ #
396
+ # # Call the provision_big_query_export method.
397
+ # result = client.provision_big_query_export request
398
+ #
399
+ # # The returned object is of type Google::Cloud::Chronicle::V1::BigQueryExport.
400
+ # p result
401
+ #
402
+ def provision_big_query_export request, options = nil
403
+ raise ::ArgumentError, "request must be provided" if request.nil?
404
+
405
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest
406
+
407
+ # Converts hash and nil to an options object
408
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
409
+
410
+ # Customize the options with defaults
411
+ call_metadata = @config.rpcs.provision_big_query_export.metadata.to_h
412
+
413
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
414
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
415
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
416
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
417
+ transports_version_send: [:rest]
418
+
419
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
420
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
421
+
422
+ options.apply_defaults timeout: @config.rpcs.provision_big_query_export.timeout,
423
+ metadata: call_metadata,
424
+ retry_policy: @config.rpcs.provision_big_query_export.retry_policy
425
+
426
+ options.apply_defaults timeout: @config.timeout,
427
+ metadata: @config.metadata,
428
+ retry_policy: @config.retry_policy
429
+
430
+ @big_query_export_service_stub.provision_big_query_export request, options do |result, operation|
431
+ yield result, operation if block_given?
432
+ end
433
+ rescue ::Gapic::Rest::Error => e
434
+ raise ::Google::Cloud::Error.from_error(e)
435
+ end
436
+
437
+ ##
438
+ # Configuration class for the BigQueryExportService REST API.
439
+ #
440
+ # This class represents the configuration for BigQueryExportService REST,
441
+ # providing control over timeouts, retry behavior, logging, transport
442
+ # parameters, and other low-level controls. Certain parameters can also be
443
+ # applied individually to specific RPCs. See
444
+ # {::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client::Configuration::Rpcs}
445
+ # for a list of RPCs that can be configured independently.
446
+ #
447
+ # Configuration can be applied globally to all clients, or to a single client
448
+ # on construction.
449
+ #
450
+ # @example
451
+ #
452
+ # # Modify the global config, setting the timeout for
453
+ # # get_big_query_export to 20 seconds,
454
+ # # and all remaining timeouts to 10 seconds.
455
+ # ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.configure do |config|
456
+ # config.timeout = 10.0
457
+ # config.rpcs.get_big_query_export.timeout = 20.0
458
+ # end
459
+ #
460
+ # # Apply the above configuration only to a new client.
461
+ # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new do |config|
462
+ # config.timeout = 10.0
463
+ # config.rpcs.get_big_query_export.timeout = 20.0
464
+ # end
465
+ #
466
+ # @!attribute [rw] endpoint
467
+ # A custom service endpoint, as a hostname or hostname:port. The default is
468
+ # nil, indicating to use the default endpoint in the current universe domain.
469
+ # @return [::String,nil]
470
+ # @!attribute [rw] credentials
471
+ # Credentials to send with calls. You may provide any of the following types:
472
+ # * (`String`) The path to a service account key file in JSON format
473
+ # * (`Hash`) A service account key as a Hash
474
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
475
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
476
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
477
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
478
+ # * (`nil`) indicating no credentials
479
+ #
480
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
481
+ # external source for authentication to Google Cloud, you must validate it before
482
+ # providing it to a Google API client library. Providing an unvalidated credential
483
+ # configuration to Google APIs can compromise the security of your systems and data.
484
+ # For more information, refer to [Validate credential configurations from external
485
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
486
+ # @return [::Object]
487
+ # @!attribute [rw] scope
488
+ # The OAuth scopes
489
+ # @return [::Array<::String>]
490
+ # @!attribute [rw] lib_name
491
+ # The library name as recorded in instrumentation and logging
492
+ # @return [::String]
493
+ # @!attribute [rw] lib_version
494
+ # The library version as recorded in instrumentation and logging
495
+ # @return [::String]
496
+ # @!attribute [rw] timeout
497
+ # The call timeout in seconds.
498
+ # @return [::Numeric]
499
+ # @!attribute [rw] metadata
500
+ # Additional headers to be sent with the call.
501
+ # @return [::Hash{::Symbol=>::String}]
502
+ # @!attribute [rw] retry_policy
503
+ # The retry policy. The value is a hash with the following keys:
504
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
505
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
506
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
507
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
508
+ # trigger a retry.
509
+ # @return [::Hash]
510
+ # @!attribute [rw] quota_project
511
+ # A separate project against which to charge quota.
512
+ # @return [::String]
513
+ # @!attribute [rw] universe_domain
514
+ # The universe domain within which to make requests. This determines the
515
+ # default endpoint URL. The default value of nil uses the environment
516
+ # universe (usually the default "googleapis.com" universe).
517
+ # @return [::String,nil]
518
+ # @!attribute [rw] logger
519
+ # A custom logger to use for request/response debug logging, or the value
520
+ # `:default` (the default) to construct a default logger, or `nil` to
521
+ # explicitly disable logging.
522
+ # @return [::Logger,:default,nil]
523
+ #
524
+ class Configuration
525
+ extend ::Gapic::Config
526
+
527
+ # @private
528
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
529
+ DEFAULT_ENDPOINT = "chronicle.googleapis.com"
530
+
531
+ config_attr :endpoint, nil, ::String, nil
532
+ config_attr :credentials, nil do |value|
533
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
534
+ allowed.any? { |klass| klass === value }
535
+ end
536
+ config_attr :scope, nil, ::String, ::Array, nil
537
+ config_attr :lib_name, nil, ::String, nil
538
+ config_attr :lib_version, nil, ::String, nil
539
+ config_attr :timeout, nil, ::Numeric, nil
540
+ config_attr :metadata, nil, ::Hash, nil
541
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
542
+ config_attr :quota_project, nil, ::String, nil
543
+ config_attr :universe_domain, nil, ::String, nil
544
+ config_attr :logger, :default, ::Logger, nil, :default
545
+
546
+ # @private
547
+ def initialize parent_config = nil
548
+ @parent_config = parent_config unless parent_config.nil?
549
+
550
+ yield self if block_given?
551
+ end
552
+
553
+ ##
554
+ # Configurations for individual RPCs
555
+ # @return [Rpcs]
556
+ #
557
+ def rpcs
558
+ @rpcs ||= begin
559
+ parent_rpcs = nil
560
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
561
+ Rpcs.new parent_rpcs
562
+ end
563
+ end
564
+
565
+ ##
566
+ # Configuration RPC class for the BigQueryExportService API.
567
+ #
568
+ # Includes fields providing the configuration for each RPC in this service.
569
+ # Each configuration object is of type `Gapic::Config::Method` and includes
570
+ # the following configuration fields:
571
+ #
572
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
573
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
574
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
575
+ # include the following keys:
576
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
577
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
578
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
579
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
580
+ # trigger a retry.
581
+ #
582
+ class Rpcs
583
+ ##
584
+ # RPC-specific configuration for `get_big_query_export`
585
+ # @return [::Gapic::Config::Method]
586
+ #
587
+ attr_reader :get_big_query_export
588
+ ##
589
+ # RPC-specific configuration for `update_big_query_export`
590
+ # @return [::Gapic::Config::Method]
591
+ #
592
+ attr_reader :update_big_query_export
593
+ ##
594
+ # RPC-specific configuration for `provision_big_query_export`
595
+ # @return [::Gapic::Config::Method]
596
+ #
597
+ attr_reader :provision_big_query_export
598
+
599
+ # @private
600
+ def initialize parent_rpcs = nil
601
+ get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export
602
+ @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config
603
+ update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export
604
+ @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config
605
+ provision_big_query_export_config = parent_rpcs.provision_big_query_export if parent_rpcs.respond_to? :provision_big_query_export
606
+ @provision_big_query_export = ::Gapic::Config::Method.new provision_big_query_export_config
607
+
608
+ yield self if block_given?
609
+ end
610
+ end
611
+ end
612
+ end
613
+ end
614
+ end
615
+ end
616
+ end
617
+ end
618
+ end