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