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,1484 @@
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/native_dashboard_pb"
21
+ require "google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Chronicle
26
+ module V1
27
+ module NativeDashboardService
28
+ module Rest
29
+ ##
30
+ # REST client for the NativeDashboardService service.
31
+ #
32
+ # A service providing functionality for managing native dashboards.
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 :native_dashboard_service_stub
45
+
46
+ ##
47
+ # Configure the NativeDashboardService Client class.
48
+ #
49
+ # See {::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all NativeDashboardService clients
55
+ # ::Google::Cloud::Chronicle::V1::NativeDashboardService::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.create_native_dashboard.timeout = 60.0
76
+
77
+ default_config.rpcs.get_native_dashboard.timeout = 60.0
78
+ default_config.rpcs.get_native_dashboard.retry_policy = {
79
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
80
+ }
81
+
82
+ default_config.rpcs.list_native_dashboards.timeout = 60.0
83
+ default_config.rpcs.list_native_dashboards.retry_policy = {
84
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
85
+ }
86
+
87
+ default_config.rpcs.update_native_dashboard.timeout = 60.0
88
+
89
+ default_config.rpcs.duplicate_native_dashboard.timeout = 60.0
90
+
91
+ default_config.rpcs.delete_native_dashboard.timeout = 60.0
92
+
93
+ default_config.rpcs.add_chart.timeout = 60.0
94
+
95
+ default_config.rpcs.remove_chart.timeout = 60.0
96
+
97
+ default_config.rpcs.edit_chart.timeout = 60.0
98
+
99
+ default_config.rpcs.duplicate_chart.timeout = 60.0
100
+
101
+ default_config.rpcs.export_native_dashboards.timeout = 60.0
102
+ default_config.rpcs.export_native_dashboards.retry_policy = {
103
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
104
+ }
105
+
106
+ default_config.rpcs.import_native_dashboards.timeout = 60.0
107
+
108
+ default_config
109
+ end
110
+ yield @configure if block_given?
111
+ @configure
112
+ end
113
+
114
+ ##
115
+ # Configure the NativeDashboardService Client instance.
116
+ #
117
+ # The configuration is set to the derived mode, meaning that values can be changed,
118
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
119
+ # should be made on {Client.configure}.
120
+ #
121
+ # See {::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client::Configuration}
122
+ # for a description of the configuration fields.
123
+ #
124
+ # @yield [config] Configure the Client client.
125
+ # @yieldparam config [Client::Configuration]
126
+ #
127
+ # @return [Client::Configuration]
128
+ #
129
+ def configure
130
+ yield @config if block_given?
131
+ @config
132
+ end
133
+
134
+ ##
135
+ # The effective universe domain
136
+ #
137
+ # @return [String]
138
+ #
139
+ def universe_domain
140
+ @native_dashboard_service_stub.universe_domain
141
+ end
142
+
143
+ ##
144
+ # Create a new NativeDashboardService REST client object.
145
+ #
146
+ # @example
147
+ #
148
+ # # Create a client using the default configuration
149
+ # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
150
+ #
151
+ # # Create a client using a custom configuration
152
+ # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config|
153
+ # config.timeout = 10.0
154
+ # end
155
+ #
156
+ # @yield [config] Configure the NativeDashboardService client.
157
+ # @yieldparam config [Client::Configuration]
158
+ #
159
+ def initialize
160
+ # Create the configuration object
161
+ @config = Configuration.new Client.configure
162
+
163
+ # Yield the configuration if needed
164
+ yield @config if block_given?
165
+
166
+ # Create credentials
167
+ credentials = @config.credentials
168
+ # Use self-signed JWT if the endpoint is unchanged from default,
169
+ # but only if the default endpoint does not have a region prefix.
170
+ enable_self_signed_jwt = @config.endpoint.nil? ||
171
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
172
+ !@config.endpoint.split(".").first.include?("-"))
173
+ credentials ||= Credentials.default scope: @config.scope,
174
+ enable_self_signed_jwt: enable_self_signed_jwt
175
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
176
+ credentials = Credentials.new credentials, scope: @config.scope
177
+ end
178
+
179
+ @quota_project_id = @config.quota_project
180
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
181
+
182
+ @native_dashboard_service_stub = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.new(
183
+ endpoint: @config.endpoint,
184
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
185
+ universe_domain: @config.universe_domain,
186
+ credentials: credentials,
187
+ logger: @config.logger
188
+ )
189
+
190
+ @native_dashboard_service_stub.logger(stub: true)&.info do |entry|
191
+ entry.set_system_name
192
+ entry.set_service
193
+ entry.message = "Created client for #{entry.service}"
194
+ entry.set_credentials_fields credentials
195
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
196
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
197
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
198
+ end
199
+ end
200
+
201
+ ##
202
+ # The logger used for request/response debug logging.
203
+ #
204
+ # @return [Logger]
205
+ #
206
+ def logger
207
+ @native_dashboard_service_stub.logger
208
+ end
209
+
210
+ # Service calls
211
+
212
+ ##
213
+ # Create a dashboard.
214
+ #
215
+ # @overload create_native_dashboard(request, options = nil)
216
+ # Pass arguments to `create_native_dashboard` via a request object, either of type
217
+ # {::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest} or an equivalent Hash.
218
+ #
219
+ # @param request [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, ::Hash]
220
+ # A request object representing the call parameters. Required. To specify no
221
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
222
+ # @param options [::Gapic::CallOptions, ::Hash]
223
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
224
+ #
225
+ # @overload create_native_dashboard(parent: nil, native_dashboard: nil)
226
+ # Pass arguments to `create_native_dashboard` via keyword arguments. Note that at
227
+ # least one keyword argument is required. To specify no parameters, or to keep all
228
+ # the default parameter values, pass an empty Hash as a request object (see above).
229
+ #
230
+ # @param parent [::String]
231
+ # Required. The parent resource where this dashboard will be created.
232
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
233
+ # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash]
234
+ # Required. The dashboard to create.
235
+ # @yield [result, operation] Access the result along with the TransportOperation object
236
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard]
237
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
238
+ #
239
+ # @return [::Google::Cloud::Chronicle::V1::NativeDashboard]
240
+ #
241
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
242
+ #
243
+ # @example Basic example
244
+ # require "google/cloud/chronicle/v1"
245
+ #
246
+ # # Create a client object. The client can be reused for multiple calls.
247
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
248
+ #
249
+ # # Create a request. To set request fields, pass in keyword arguments.
250
+ # request = Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new
251
+ #
252
+ # # Call the create_native_dashboard method.
253
+ # result = client.create_native_dashboard request
254
+ #
255
+ # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard.
256
+ # p result
257
+ #
258
+ def create_native_dashboard request, options = nil
259
+ raise ::ArgumentError, "request must be provided" if request.nil?
260
+
261
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest
262
+
263
+ # Converts hash and nil to an options object
264
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
265
+
266
+ # Customize the options with defaults
267
+ call_metadata = @config.rpcs.create_native_dashboard.metadata.to_h
268
+
269
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
270
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
272
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
273
+ transports_version_send: [:rest]
274
+
275
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
276
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
277
+
278
+ options.apply_defaults timeout: @config.rpcs.create_native_dashboard.timeout,
279
+ metadata: call_metadata,
280
+ retry_policy: @config.rpcs.create_native_dashboard.retry_policy
281
+
282
+ options.apply_defaults timeout: @config.timeout,
283
+ metadata: @config.metadata,
284
+ retry_policy: @config.retry_policy
285
+
286
+ @native_dashboard_service_stub.create_native_dashboard request, options do |result, operation|
287
+ yield result, operation if block_given?
288
+ end
289
+ rescue ::Gapic::Rest::Error => e
290
+ raise ::Google::Cloud::Error.from_error(e)
291
+ end
292
+
293
+ ##
294
+ # Get a dashboard.
295
+ #
296
+ # @overload get_native_dashboard(request, options = nil)
297
+ # Pass arguments to `get_native_dashboard` via a request object, either of type
298
+ # {::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest} or an equivalent Hash.
299
+ #
300
+ # @param request [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, ::Hash]
301
+ # A request object representing the call parameters. Required. To specify no
302
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
303
+ # @param options [::Gapic::CallOptions, ::Hash]
304
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
305
+ #
306
+ # @overload get_native_dashboard(name: nil, view: nil)
307
+ # Pass arguments to `get_native_dashboard` via keyword arguments. Note that at
308
+ # least one keyword argument is required. To specify no parameters, or to keep all
309
+ # the default parameter values, pass an empty Hash as a request object (see above).
310
+ #
311
+ # @param name [::String]
312
+ # Required. The dashboard name to fetch.
313
+ # Format:
314
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard}
315
+ # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView]
316
+ # Optional. View indicates the scope of fields to populate when returning the
317
+ # dashboard resource. If unspecified, defaults to the basic view.
318
+ # @yield [result, operation] Access the result along with the TransportOperation object
319
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard]
320
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
321
+ #
322
+ # @return [::Google::Cloud::Chronicle::V1::NativeDashboard]
323
+ #
324
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
325
+ #
326
+ # @example Basic example
327
+ # require "google/cloud/chronicle/v1"
328
+ #
329
+ # # Create a client object. The client can be reused for multiple calls.
330
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
331
+ #
332
+ # # Create a request. To set request fields, pass in keyword arguments.
333
+ # request = Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new
334
+ #
335
+ # # Call the get_native_dashboard method.
336
+ # result = client.get_native_dashboard request
337
+ #
338
+ # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard.
339
+ # p result
340
+ #
341
+ def get_native_dashboard request, options = nil
342
+ raise ::ArgumentError, "request must be provided" if request.nil?
343
+
344
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest
345
+
346
+ # Converts hash and nil to an options object
347
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
348
+
349
+ # Customize the options with defaults
350
+ call_metadata = @config.rpcs.get_native_dashboard.metadata.to_h
351
+
352
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
353
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
354
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
355
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
356
+ transports_version_send: [:rest]
357
+
358
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
359
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
360
+
361
+ options.apply_defaults timeout: @config.rpcs.get_native_dashboard.timeout,
362
+ metadata: call_metadata,
363
+ retry_policy: @config.rpcs.get_native_dashboard.retry_policy
364
+
365
+ options.apply_defaults timeout: @config.timeout,
366
+ metadata: @config.metadata,
367
+ retry_policy: @config.retry_policy
368
+
369
+ @native_dashboard_service_stub.get_native_dashboard request, options do |result, operation|
370
+ yield result, operation if block_given?
371
+ end
372
+ rescue ::Gapic::Rest::Error => e
373
+ raise ::Google::Cloud::Error.from_error(e)
374
+ end
375
+
376
+ ##
377
+ # List all dashboards.
378
+ #
379
+ # @overload list_native_dashboards(request, options = nil)
380
+ # Pass arguments to `list_native_dashboards` via a request object, either of type
381
+ # {::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest} or an equivalent Hash.
382
+ #
383
+ # @param request [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, ::Hash]
384
+ # A request object representing the call parameters. Required. To specify no
385
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
386
+ # @param options [::Gapic::CallOptions, ::Hash]
387
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
388
+ #
389
+ # @overload list_native_dashboards(parent: nil, page_size: nil, page_token: nil, view: nil)
390
+ # Pass arguments to `list_native_dashboards` via keyword arguments. Note that at
391
+ # least one keyword argument is required. To specify no parameters, or to keep all
392
+ # the default parameter values, pass an empty Hash as a request object (see above).
393
+ #
394
+ # @param parent [::String]
395
+ # Required. The parent owning this dashboard collection.
396
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
397
+ # @param page_size [::Integer]
398
+ # Optional. The maximum number of dashboards to return. The service may
399
+ # return fewer than this value.
400
+ # @param page_token [::String]
401
+ # Optional. A page token, received from a previous `ListDashboards` call.
402
+ # Provide this to retrieve the subsequent page.
403
+ #
404
+ # When paginating, all other parameters provided to `ListDashboards` must
405
+ # match the call that provided the page token.
406
+ # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView]
407
+ # Optional. View indicates the scope of fields to populate when returning the
408
+ # dashboard resource. If unspecified, defaults to the basic view.
409
+ # @yield [result, operation] Access the result along with the TransportOperation object
410
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>]
411
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
412
+ #
413
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>]
414
+ #
415
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
416
+ #
417
+ # @example Basic example
418
+ # require "google/cloud/chronicle/v1"
419
+ #
420
+ # # Create a client object. The client can be reused for multiple calls.
421
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
422
+ #
423
+ # # Create a request. To set request fields, pass in keyword arguments.
424
+ # request = Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new
425
+ #
426
+ # # Call the list_native_dashboards method.
427
+ # result = client.list_native_dashboards request
428
+ #
429
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
430
+ # # over elements, and API calls will be issued to fetch pages as needed.
431
+ # result.each do |item|
432
+ # # Each element is of type ::Google::Cloud::Chronicle::V1::NativeDashboard.
433
+ # p item
434
+ # end
435
+ #
436
+ def list_native_dashboards request, options = nil
437
+ raise ::ArgumentError, "request must be provided" if request.nil?
438
+
439
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest
440
+
441
+ # Converts hash and nil to an options object
442
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
443
+
444
+ # Customize the options with defaults
445
+ call_metadata = @config.rpcs.list_native_dashboards.metadata.to_h
446
+
447
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
448
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
449
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
450
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
451
+ transports_version_send: [:rest]
452
+
453
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
454
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
455
+
456
+ options.apply_defaults timeout: @config.rpcs.list_native_dashboards.timeout,
457
+ metadata: call_metadata,
458
+ retry_policy: @config.rpcs.list_native_dashboards.retry_policy
459
+
460
+ options.apply_defaults timeout: @config.timeout,
461
+ metadata: @config.metadata,
462
+ retry_policy: @config.retry_policy
463
+
464
+ @native_dashboard_service_stub.list_native_dashboards request, options do |result, operation|
465
+ result = ::Gapic::Rest::PagedEnumerable.new @native_dashboard_service_stub, :list_native_dashboards, "native_dashboards", request, result, options
466
+ yield result, operation if block_given?
467
+ throw :response, result
468
+ end
469
+ rescue ::Gapic::Rest::Error => e
470
+ raise ::Google::Cloud::Error.from_error(e)
471
+ end
472
+
473
+ ##
474
+ # Update a dashboard.
475
+ #
476
+ # @overload update_native_dashboard(request, options = nil)
477
+ # Pass arguments to `update_native_dashboard` via a request object, either of type
478
+ # {::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest} or an equivalent Hash.
479
+ #
480
+ # @param request [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, ::Hash]
481
+ # A request object representing the call parameters. Required. To specify no
482
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
483
+ # @param options [::Gapic::CallOptions, ::Hash]
484
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
485
+ #
486
+ # @overload update_native_dashboard(native_dashboard: nil, update_mask: nil)
487
+ # Pass arguments to `update_native_dashboard` via keyword arguments. Note that at
488
+ # least one keyword argument is required. To specify no parameters, or to keep all
489
+ # the default parameter values, pass an empty Hash as a request object (see above).
490
+ #
491
+ # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash]
492
+ # Required. The dashboard to update.
493
+ #
494
+ # The dashboard's `name` field is used to identify the dashboard to update.
495
+ # Format:
496
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard}
497
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
498
+ # Required. LINT.IfChange(update_mask_values)
499
+ # The list of fields to update.
500
+ # Supported paths are -
501
+ # display_name
502
+ # description
503
+ # definition.filters
504
+ # definition.charts
505
+ # type
506
+ # access
507
+ # dashboard_user_data.is_pinned
508
+ # @yield [result, operation] Access the result along with the TransportOperation object
509
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard]
510
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
511
+ #
512
+ # @return [::Google::Cloud::Chronicle::V1::NativeDashboard]
513
+ #
514
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
515
+ #
516
+ # @example Basic example
517
+ # require "google/cloud/chronicle/v1"
518
+ #
519
+ # # Create a client object. The client can be reused for multiple calls.
520
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
521
+ #
522
+ # # Create a request. To set request fields, pass in keyword arguments.
523
+ # request = Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new
524
+ #
525
+ # # Call the update_native_dashboard method.
526
+ # result = client.update_native_dashboard request
527
+ #
528
+ # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard.
529
+ # p result
530
+ #
531
+ def update_native_dashboard request, options = nil
532
+ raise ::ArgumentError, "request must be provided" if request.nil?
533
+
534
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest
535
+
536
+ # Converts hash and nil to an options object
537
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
538
+
539
+ # Customize the options with defaults
540
+ call_metadata = @config.rpcs.update_native_dashboard.metadata.to_h
541
+
542
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
543
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
544
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
545
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
546
+ transports_version_send: [:rest]
547
+
548
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
549
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
550
+
551
+ options.apply_defaults timeout: @config.rpcs.update_native_dashboard.timeout,
552
+ metadata: call_metadata,
553
+ retry_policy: @config.rpcs.update_native_dashboard.retry_policy
554
+
555
+ options.apply_defaults timeout: @config.timeout,
556
+ metadata: @config.metadata,
557
+ retry_policy: @config.retry_policy
558
+
559
+ @native_dashboard_service_stub.update_native_dashboard request, options do |result, operation|
560
+ yield result, operation if block_given?
561
+ end
562
+ rescue ::Gapic::Rest::Error => e
563
+ raise ::Google::Cloud::Error.from_error(e)
564
+ end
565
+
566
+ ##
567
+ # Duplicate a dashboard.
568
+ #
569
+ # @overload duplicate_native_dashboard(request, options = nil)
570
+ # Pass arguments to `duplicate_native_dashboard` via a request object, either of type
571
+ # {::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest} or an equivalent Hash.
572
+ #
573
+ # @param request [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, ::Hash]
574
+ # A request object representing the call parameters. Required. To specify no
575
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
576
+ # @param options [::Gapic::CallOptions, ::Hash]
577
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
578
+ #
579
+ # @overload duplicate_native_dashboard(name: nil, native_dashboard: nil)
580
+ # Pass arguments to `duplicate_native_dashboard` via keyword arguments. Note that at
581
+ # least one keyword argument is required. To specify no parameters, or to keep all
582
+ # the default parameter values, pass an empty Hash as a request object (see above).
583
+ #
584
+ # @param name [::String]
585
+ # Required. The dashboard name to duplicate.
586
+ # Format:
587
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard}
588
+ # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash]
589
+ # Required. Any fields that need modification can be passed through this like
590
+ # name, description etc.
591
+ # @yield [result, operation] Access the result along with the TransportOperation object
592
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard]
593
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
594
+ #
595
+ # @return [::Google::Cloud::Chronicle::V1::NativeDashboard]
596
+ #
597
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
598
+ #
599
+ # @example Basic example
600
+ # require "google/cloud/chronicle/v1"
601
+ #
602
+ # # Create a client object. The client can be reused for multiple calls.
603
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
604
+ #
605
+ # # Create a request. To set request fields, pass in keyword arguments.
606
+ # request = Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new
607
+ #
608
+ # # Call the duplicate_native_dashboard method.
609
+ # result = client.duplicate_native_dashboard request
610
+ #
611
+ # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard.
612
+ # p result
613
+ #
614
+ def duplicate_native_dashboard request, options = nil
615
+ raise ::ArgumentError, "request must be provided" if request.nil?
616
+
617
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest
618
+
619
+ # Converts hash and nil to an options object
620
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
621
+
622
+ # Customize the options with defaults
623
+ call_metadata = @config.rpcs.duplicate_native_dashboard.metadata.to_h
624
+
625
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
626
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
627
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
628
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
629
+ transports_version_send: [:rest]
630
+
631
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
632
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
633
+
634
+ options.apply_defaults timeout: @config.rpcs.duplicate_native_dashboard.timeout,
635
+ metadata: call_metadata,
636
+ retry_policy: @config.rpcs.duplicate_native_dashboard.retry_policy
637
+
638
+ options.apply_defaults timeout: @config.timeout,
639
+ metadata: @config.metadata,
640
+ retry_policy: @config.retry_policy
641
+
642
+ @native_dashboard_service_stub.duplicate_native_dashboard request, options do |result, operation|
643
+ yield result, operation if block_given?
644
+ end
645
+ rescue ::Gapic::Rest::Error => e
646
+ raise ::Google::Cloud::Error.from_error(e)
647
+ end
648
+
649
+ ##
650
+ # Delete a dashboard.
651
+ #
652
+ # @overload delete_native_dashboard(request, options = nil)
653
+ # Pass arguments to `delete_native_dashboard` via a request object, either of type
654
+ # {::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest} or an equivalent Hash.
655
+ #
656
+ # @param request [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, ::Hash]
657
+ # A request object representing the call parameters. Required. To specify no
658
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
659
+ # @param options [::Gapic::CallOptions, ::Hash]
660
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
661
+ #
662
+ # @overload delete_native_dashboard(name: nil)
663
+ # Pass arguments to `delete_native_dashboard` via keyword arguments. Note that at
664
+ # least one keyword argument is required. To specify no parameters, or to keep all
665
+ # the default parameter values, pass an empty Hash as a request object (see above).
666
+ #
667
+ # @param name [::String]
668
+ # Required. The dashboard name to delete.
669
+ # Format:
670
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard}
671
+ # @yield [result, operation] Access the result along with the TransportOperation object
672
+ # @yieldparam result [::Google::Protobuf::Empty]
673
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
674
+ #
675
+ # @return [::Google::Protobuf::Empty]
676
+ #
677
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
678
+ #
679
+ # @example Basic example
680
+ # require "google/cloud/chronicle/v1"
681
+ #
682
+ # # Create a client object. The client can be reused for multiple calls.
683
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
684
+ #
685
+ # # Create a request. To set request fields, pass in keyword arguments.
686
+ # request = Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new
687
+ #
688
+ # # Call the delete_native_dashboard method.
689
+ # result = client.delete_native_dashboard request
690
+ #
691
+ # # The returned object is of type Google::Protobuf::Empty.
692
+ # p result
693
+ #
694
+ def delete_native_dashboard request, options = nil
695
+ raise ::ArgumentError, "request must be provided" if request.nil?
696
+
697
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest
698
+
699
+ # Converts hash and nil to an options object
700
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
701
+
702
+ # Customize the options with defaults
703
+ call_metadata = @config.rpcs.delete_native_dashboard.metadata.to_h
704
+
705
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
706
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
707
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
708
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
709
+ transports_version_send: [:rest]
710
+
711
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
712
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
713
+
714
+ options.apply_defaults timeout: @config.rpcs.delete_native_dashboard.timeout,
715
+ metadata: call_metadata,
716
+ retry_policy: @config.rpcs.delete_native_dashboard.retry_policy
717
+
718
+ options.apply_defaults timeout: @config.timeout,
719
+ metadata: @config.metadata,
720
+ retry_policy: @config.retry_policy
721
+
722
+ @native_dashboard_service_stub.delete_native_dashboard request, options do |result, operation|
723
+ yield result, operation if block_given?
724
+ end
725
+ rescue ::Gapic::Rest::Error => e
726
+ raise ::Google::Cloud::Error.from_error(e)
727
+ end
728
+
729
+ ##
730
+ # Add chart in a dashboard.
731
+ #
732
+ # @overload add_chart(request, options = nil)
733
+ # Pass arguments to `add_chart` via a request object, either of type
734
+ # {::Google::Cloud::Chronicle::V1::AddChartRequest} or an equivalent Hash.
735
+ #
736
+ # @param request [::Google::Cloud::Chronicle::V1::AddChartRequest, ::Hash]
737
+ # A request object representing the call parameters. Required. To specify no
738
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
739
+ # @param options [::Gapic::CallOptions, ::Hash]
740
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
741
+ #
742
+ # @overload add_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, chart_layout: nil)
743
+ # Pass arguments to `add_chart` via keyword arguments. Note that at
744
+ # least one keyword argument is required. To specify no parameters, or to keep all
745
+ # the default parameter values, pass an empty Hash as a request object (see above).
746
+ #
747
+ # @param name [::String]
748
+ # Required. The dashboard name to add chart in.
749
+ # Format:
750
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard}
751
+ # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash]
752
+ # Optional. Query used to create the chart.
753
+ # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash]
754
+ # Required. Chart to be added to the dashboard.
755
+ # @param chart_layout [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout, ::Hash]
756
+ # Required. ChartLayout for newly added chart.
757
+ # @yield [result, operation] Access the result along with the TransportOperation object
758
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::AddChartResponse]
759
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
760
+ #
761
+ # @return [::Google::Cloud::Chronicle::V1::AddChartResponse]
762
+ #
763
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
764
+ #
765
+ # @example Basic example
766
+ # require "google/cloud/chronicle/v1"
767
+ #
768
+ # # Create a client object. The client can be reused for multiple calls.
769
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
770
+ #
771
+ # # Create a request. To set request fields, pass in keyword arguments.
772
+ # request = Google::Cloud::Chronicle::V1::AddChartRequest.new
773
+ #
774
+ # # Call the add_chart method.
775
+ # result = client.add_chart request
776
+ #
777
+ # # The returned object is of type Google::Cloud::Chronicle::V1::AddChartResponse.
778
+ # p result
779
+ #
780
+ def add_chart request, options = nil
781
+ raise ::ArgumentError, "request must be provided" if request.nil?
782
+
783
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::AddChartRequest
784
+
785
+ # Converts hash and nil to an options object
786
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
787
+
788
+ # Customize the options with defaults
789
+ call_metadata = @config.rpcs.add_chart.metadata.to_h
790
+
791
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
792
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
793
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
794
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
795
+ transports_version_send: [:rest]
796
+
797
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
798
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
799
+
800
+ options.apply_defaults timeout: @config.rpcs.add_chart.timeout,
801
+ metadata: call_metadata,
802
+ retry_policy: @config.rpcs.add_chart.retry_policy
803
+
804
+ options.apply_defaults timeout: @config.timeout,
805
+ metadata: @config.metadata,
806
+ retry_policy: @config.retry_policy
807
+
808
+ @native_dashboard_service_stub.add_chart request, options do |result, operation|
809
+ yield result, operation if block_given?
810
+ end
811
+ rescue ::Gapic::Rest::Error => e
812
+ raise ::Google::Cloud::Error.from_error(e)
813
+ end
814
+
815
+ ##
816
+ # Remove chart from a dashboard.
817
+ #
818
+ # @overload remove_chart(request, options = nil)
819
+ # Pass arguments to `remove_chart` via a request object, either of type
820
+ # {::Google::Cloud::Chronicle::V1::RemoveChartRequest} or an equivalent Hash.
821
+ #
822
+ # @param request [::Google::Cloud::Chronicle::V1::RemoveChartRequest, ::Hash]
823
+ # A request object representing the call parameters. Required. To specify no
824
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
825
+ # @param options [::Gapic::CallOptions, ::Hash]
826
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
827
+ #
828
+ # @overload remove_chart(name: nil, dashboard_chart: nil)
829
+ # Pass arguments to `remove_chart` via keyword arguments. Note that at
830
+ # least one keyword argument is required. To specify no parameters, or to keep all
831
+ # the default parameter values, pass an empty Hash as a request object (see above).
832
+ #
833
+ # @param name [::String]
834
+ # Required. The dashboard name to remove chart from.
835
+ # Format:
836
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard}
837
+ # @param dashboard_chart [::String]
838
+ # Required. The dashboard chart name to remove.
839
+ # @yield [result, operation] Access the result along with the TransportOperation object
840
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard]
841
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
842
+ #
843
+ # @return [::Google::Cloud::Chronicle::V1::NativeDashboard]
844
+ #
845
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
846
+ #
847
+ # @example Basic example
848
+ # require "google/cloud/chronicle/v1"
849
+ #
850
+ # # Create a client object. The client can be reused for multiple calls.
851
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
852
+ #
853
+ # # Create a request. To set request fields, pass in keyword arguments.
854
+ # request = Google::Cloud::Chronicle::V1::RemoveChartRequest.new
855
+ #
856
+ # # Call the remove_chart method.
857
+ # result = client.remove_chart request
858
+ #
859
+ # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard.
860
+ # p result
861
+ #
862
+ def remove_chart request, options = nil
863
+ raise ::ArgumentError, "request must be provided" if request.nil?
864
+
865
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::RemoveChartRequest
866
+
867
+ # Converts hash and nil to an options object
868
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
869
+
870
+ # Customize the options with defaults
871
+ call_metadata = @config.rpcs.remove_chart.metadata.to_h
872
+
873
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
874
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
875
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
876
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
877
+ transports_version_send: [:rest]
878
+
879
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
880
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
881
+
882
+ options.apply_defaults timeout: @config.rpcs.remove_chart.timeout,
883
+ metadata: call_metadata,
884
+ retry_policy: @config.rpcs.remove_chart.retry_policy
885
+
886
+ options.apply_defaults timeout: @config.timeout,
887
+ metadata: @config.metadata,
888
+ retry_policy: @config.retry_policy
889
+
890
+ @native_dashboard_service_stub.remove_chart request, options do |result, operation|
891
+ yield result, operation if block_given?
892
+ end
893
+ rescue ::Gapic::Rest::Error => e
894
+ raise ::Google::Cloud::Error.from_error(e)
895
+ end
896
+
897
+ ##
898
+ # Edit chart in a dashboard.
899
+ #
900
+ # @overload edit_chart(request, options = nil)
901
+ # Pass arguments to `edit_chart` via a request object, either of type
902
+ # {::Google::Cloud::Chronicle::V1::EditChartRequest} or an equivalent Hash.
903
+ #
904
+ # @param request [::Google::Cloud::Chronicle::V1::EditChartRequest, ::Hash]
905
+ # A request object representing the call parameters. Required. To specify no
906
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
907
+ # @param options [::Gapic::CallOptions, ::Hash]
908
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
909
+ #
910
+ # @overload edit_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, edit_mask: nil, language_features: nil)
911
+ # Pass arguments to `edit_chart` via keyword arguments. Note that at
912
+ # least one keyword argument is required. To specify no parameters, or to keep all
913
+ # the default parameter values, pass an empty Hash as a request object (see above).
914
+ #
915
+ # @param name [::String]
916
+ # Required. The dashboard name to edit chart in.
917
+ # Format:
918
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard}
919
+ # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash]
920
+ # Optional. Query for the edited chart.
921
+ # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash]
922
+ # Optional. Edited chart.
923
+ # @param edit_mask [::Google::Protobuf::FieldMask, ::Hash]
924
+ # Required. The list of fields to edit for chart and query.
925
+ # Supported paths in chart are -
926
+ # dashboard_chart.display_name
927
+ # dashboard_chart.description
928
+ # dashboard_chart.chart_datasource.data_sources
929
+ # dashboard_chart.visualization
930
+ # dashboard_chart.visualization.button
931
+ # dashboard_chart.visualization.markdown
932
+ # dashboard_chart.drill_down_config
933
+ # Supported paths in query are -
934
+ # dashboard_query.query
935
+ # dashboard_query.input
936
+ # @param language_features [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>]
937
+ # Optional. Language Features present in the query.
938
+ # @yield [result, operation] Access the result along with the TransportOperation object
939
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::EditChartResponse]
940
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
941
+ #
942
+ # @return [::Google::Cloud::Chronicle::V1::EditChartResponse]
943
+ #
944
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
945
+ #
946
+ # @example Basic example
947
+ # require "google/cloud/chronicle/v1"
948
+ #
949
+ # # Create a client object. The client can be reused for multiple calls.
950
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
951
+ #
952
+ # # Create a request. To set request fields, pass in keyword arguments.
953
+ # request = Google::Cloud::Chronicle::V1::EditChartRequest.new
954
+ #
955
+ # # Call the edit_chart method.
956
+ # result = client.edit_chart request
957
+ #
958
+ # # The returned object is of type Google::Cloud::Chronicle::V1::EditChartResponse.
959
+ # p result
960
+ #
961
+ def edit_chart request, options = nil
962
+ raise ::ArgumentError, "request must be provided" if request.nil?
963
+
964
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::EditChartRequest
965
+
966
+ # Converts hash and nil to an options object
967
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
968
+
969
+ # Customize the options with defaults
970
+ call_metadata = @config.rpcs.edit_chart.metadata.to_h
971
+
972
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
973
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
974
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
975
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
976
+ transports_version_send: [:rest]
977
+
978
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
979
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
980
+
981
+ options.apply_defaults timeout: @config.rpcs.edit_chart.timeout,
982
+ metadata: call_metadata,
983
+ retry_policy: @config.rpcs.edit_chart.retry_policy
984
+
985
+ options.apply_defaults timeout: @config.timeout,
986
+ metadata: @config.metadata,
987
+ retry_policy: @config.retry_policy
988
+
989
+ @native_dashboard_service_stub.edit_chart request, options do |result, operation|
990
+ yield result, operation if block_given?
991
+ end
992
+ rescue ::Gapic::Rest::Error => e
993
+ raise ::Google::Cloud::Error.from_error(e)
994
+ end
995
+
996
+ ##
997
+ # Duplicate chart in a dashboard.
998
+ #
999
+ # @overload duplicate_chart(request, options = nil)
1000
+ # Pass arguments to `duplicate_chart` via a request object, either of type
1001
+ # {::Google::Cloud::Chronicle::V1::DuplicateChartRequest} or an equivalent Hash.
1002
+ #
1003
+ # @param request [::Google::Cloud::Chronicle::V1::DuplicateChartRequest, ::Hash]
1004
+ # A request object representing the call parameters. Required. To specify no
1005
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1006
+ # @param options [::Gapic::CallOptions, ::Hash]
1007
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1008
+ #
1009
+ # @overload duplicate_chart(name: nil, dashboard_chart: nil)
1010
+ # Pass arguments to `duplicate_chart` via keyword arguments. Note that at
1011
+ # least one keyword argument is required. To specify no parameters, or to keep all
1012
+ # the default parameter values, pass an empty Hash as a request object (see above).
1013
+ #
1014
+ # @param name [::String]
1015
+ # Required. The dashboard name that involves chart duplication.
1016
+ # Format:
1017
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard}
1018
+ # @param dashboard_chart [::String]
1019
+ # Required. The dashboard chart name to duplicate.
1020
+ # @yield [result, operation] Access the result along with the TransportOperation object
1021
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::DuplicateChartResponse]
1022
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1023
+ #
1024
+ # @return [::Google::Cloud::Chronicle::V1::DuplicateChartResponse]
1025
+ #
1026
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1027
+ #
1028
+ # @example Basic example
1029
+ # require "google/cloud/chronicle/v1"
1030
+ #
1031
+ # # Create a client object. The client can be reused for multiple calls.
1032
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
1033
+ #
1034
+ # # Create a request. To set request fields, pass in keyword arguments.
1035
+ # request = Google::Cloud::Chronicle::V1::DuplicateChartRequest.new
1036
+ #
1037
+ # # Call the duplicate_chart method.
1038
+ # result = client.duplicate_chart request
1039
+ #
1040
+ # # The returned object is of type Google::Cloud::Chronicle::V1::DuplicateChartResponse.
1041
+ # p result
1042
+ #
1043
+ def duplicate_chart request, options = nil
1044
+ raise ::ArgumentError, "request must be provided" if request.nil?
1045
+
1046
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateChartRequest
1047
+
1048
+ # Converts hash and nil to an options object
1049
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1050
+
1051
+ # Customize the options with defaults
1052
+ call_metadata = @config.rpcs.duplicate_chart.metadata.to_h
1053
+
1054
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1055
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1056
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1057
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
1058
+ transports_version_send: [:rest]
1059
+
1060
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1061
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1062
+
1063
+ options.apply_defaults timeout: @config.rpcs.duplicate_chart.timeout,
1064
+ metadata: call_metadata,
1065
+ retry_policy: @config.rpcs.duplicate_chart.retry_policy
1066
+
1067
+ options.apply_defaults timeout: @config.timeout,
1068
+ metadata: @config.metadata,
1069
+ retry_policy: @config.retry_policy
1070
+
1071
+ @native_dashboard_service_stub.duplicate_chart request, options do |result, operation|
1072
+ yield result, operation if block_given?
1073
+ end
1074
+ rescue ::Gapic::Rest::Error => e
1075
+ raise ::Google::Cloud::Error.from_error(e)
1076
+ end
1077
+
1078
+ ##
1079
+ # Exports the dashboards.
1080
+ #
1081
+ # @overload export_native_dashboards(request, options = nil)
1082
+ # Pass arguments to `export_native_dashboards` via a request object, either of type
1083
+ # {::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest} or an equivalent Hash.
1084
+ #
1085
+ # @param request [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, ::Hash]
1086
+ # A request object representing the call parameters. Required. To specify no
1087
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1088
+ # @param options [::Gapic::CallOptions, ::Hash]
1089
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1090
+ #
1091
+ # @overload export_native_dashboards(parent: nil, names: nil)
1092
+ # Pass arguments to `export_native_dashboards` via keyword arguments. Note that at
1093
+ # least one keyword argument is required. To specify no parameters, or to keep all
1094
+ # the default parameter values, pass an empty Hash as a request object (see above).
1095
+ #
1096
+ # @param parent [::String]
1097
+ # Required. The parent resource that the dashboards to be exported belong to.
1098
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
1099
+ # @param names [::Array<::String>]
1100
+ # Required. The resource names of the dashboards to export.
1101
+ # @yield [result, operation] Access the result along with the TransportOperation object
1102
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse]
1103
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1104
+ #
1105
+ # @return [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse]
1106
+ #
1107
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1108
+ #
1109
+ # @example Basic example
1110
+ # require "google/cloud/chronicle/v1"
1111
+ #
1112
+ # # Create a client object. The client can be reused for multiple calls.
1113
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
1114
+ #
1115
+ # # Create a request. To set request fields, pass in keyword arguments.
1116
+ # request = Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new
1117
+ #
1118
+ # # Call the export_native_dashboards method.
1119
+ # result = client.export_native_dashboards request
1120
+ #
1121
+ # # The returned object is of type Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse.
1122
+ # p result
1123
+ #
1124
+ def export_native_dashboards request, options = nil
1125
+ raise ::ArgumentError, "request must be provided" if request.nil?
1126
+
1127
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest
1128
+
1129
+ # Converts hash and nil to an options object
1130
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1131
+
1132
+ # Customize the options with defaults
1133
+ call_metadata = @config.rpcs.export_native_dashboards.metadata.to_h
1134
+
1135
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1136
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1137
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1138
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
1139
+ transports_version_send: [:rest]
1140
+
1141
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1142
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1143
+
1144
+ options.apply_defaults timeout: @config.rpcs.export_native_dashboards.timeout,
1145
+ metadata: call_metadata,
1146
+ retry_policy: @config.rpcs.export_native_dashboards.retry_policy
1147
+
1148
+ options.apply_defaults timeout: @config.timeout,
1149
+ metadata: @config.metadata,
1150
+ retry_policy: @config.retry_policy
1151
+
1152
+ @native_dashboard_service_stub.export_native_dashboards request, options do |result, operation|
1153
+ yield result, operation if block_given?
1154
+ end
1155
+ rescue ::Gapic::Rest::Error => e
1156
+ raise ::Google::Cloud::Error.from_error(e)
1157
+ end
1158
+
1159
+ ##
1160
+ # Imports the dashboards.
1161
+ #
1162
+ # @overload import_native_dashboards(request, options = nil)
1163
+ # Pass arguments to `import_native_dashboards` via a request object, either of type
1164
+ # {::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest} or an equivalent Hash.
1165
+ #
1166
+ # @param request [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, ::Hash]
1167
+ # A request object representing the call parameters. Required. To specify no
1168
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1169
+ # @param options [::Gapic::CallOptions, ::Hash]
1170
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1171
+ #
1172
+ # @overload import_native_dashboards(parent: nil, source: nil)
1173
+ # Pass arguments to `import_native_dashboards` via keyword arguments. Note that at
1174
+ # least one keyword argument is required. To specify no parameters, or to keep all
1175
+ # the default parameter values, pass an empty Hash as a request object (see above).
1176
+ #
1177
+ # @param parent [::String]
1178
+ # Required. The parent resource where this dashboard will be created.
1179
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
1180
+ # @param source [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource, ::Hash]
1181
+ # Required. The data will imported from this proto.
1182
+ # @yield [result, operation] Access the result along with the TransportOperation object
1183
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse]
1184
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1185
+ #
1186
+ # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse]
1187
+ #
1188
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1189
+ #
1190
+ # @example Basic example
1191
+ # require "google/cloud/chronicle/v1"
1192
+ #
1193
+ # # Create a client object. The client can be reused for multiple calls.
1194
+ # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new
1195
+ #
1196
+ # # Create a request. To set request fields, pass in keyword arguments.
1197
+ # request = Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new
1198
+ #
1199
+ # # Call the import_native_dashboards method.
1200
+ # result = client.import_native_dashboards request
1201
+ #
1202
+ # # The returned object is of type Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse.
1203
+ # p result
1204
+ #
1205
+ def import_native_dashboards request, options = nil
1206
+ raise ::ArgumentError, "request must be provided" if request.nil?
1207
+
1208
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest
1209
+
1210
+ # Converts hash and nil to an options object
1211
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1212
+
1213
+ # Customize the options with defaults
1214
+ call_metadata = @config.rpcs.import_native_dashboards.metadata.to_h
1215
+
1216
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1217
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1218
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1219
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
1220
+ transports_version_send: [:rest]
1221
+
1222
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1223
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1224
+
1225
+ options.apply_defaults timeout: @config.rpcs.import_native_dashboards.timeout,
1226
+ metadata: call_metadata,
1227
+ retry_policy: @config.rpcs.import_native_dashboards.retry_policy
1228
+
1229
+ options.apply_defaults timeout: @config.timeout,
1230
+ metadata: @config.metadata,
1231
+ retry_policy: @config.retry_policy
1232
+
1233
+ @native_dashboard_service_stub.import_native_dashboards request, options do |result, operation|
1234
+ yield result, operation if block_given?
1235
+ end
1236
+ rescue ::Gapic::Rest::Error => e
1237
+ raise ::Google::Cloud::Error.from_error(e)
1238
+ end
1239
+
1240
+ ##
1241
+ # Configuration class for the NativeDashboardService REST API.
1242
+ #
1243
+ # This class represents the configuration for NativeDashboardService REST,
1244
+ # providing control over timeouts, retry behavior, logging, transport
1245
+ # parameters, and other low-level controls. Certain parameters can also be
1246
+ # applied individually to specific RPCs. See
1247
+ # {::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client::Configuration::Rpcs}
1248
+ # for a list of RPCs that can be configured independently.
1249
+ #
1250
+ # Configuration can be applied globally to all clients, or to a single client
1251
+ # on construction.
1252
+ #
1253
+ # @example
1254
+ #
1255
+ # # Modify the global config, setting the timeout for
1256
+ # # create_native_dashboard to 20 seconds,
1257
+ # # and all remaining timeouts to 10 seconds.
1258
+ # ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.configure do |config|
1259
+ # config.timeout = 10.0
1260
+ # config.rpcs.create_native_dashboard.timeout = 20.0
1261
+ # end
1262
+ #
1263
+ # # Apply the above configuration only to a new client.
1264
+ # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config|
1265
+ # config.timeout = 10.0
1266
+ # config.rpcs.create_native_dashboard.timeout = 20.0
1267
+ # end
1268
+ #
1269
+ # @!attribute [rw] endpoint
1270
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1271
+ # nil, indicating to use the default endpoint in the current universe domain.
1272
+ # @return [::String,nil]
1273
+ # @!attribute [rw] credentials
1274
+ # Credentials to send with calls. You may provide any of the following types:
1275
+ # * (`String`) The path to a service account key file in JSON format
1276
+ # * (`Hash`) A service account key as a Hash
1277
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1278
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1279
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1280
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1281
+ # * (`nil`) indicating no credentials
1282
+ #
1283
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1284
+ # external source for authentication to Google Cloud, you must validate it before
1285
+ # providing it to a Google API client library. Providing an unvalidated credential
1286
+ # configuration to Google APIs can compromise the security of your systems and data.
1287
+ # For more information, refer to [Validate credential configurations from external
1288
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1289
+ # @return [::Object]
1290
+ # @!attribute [rw] scope
1291
+ # The OAuth scopes
1292
+ # @return [::Array<::String>]
1293
+ # @!attribute [rw] lib_name
1294
+ # The library name as recorded in instrumentation and logging
1295
+ # @return [::String]
1296
+ # @!attribute [rw] lib_version
1297
+ # The library version as recorded in instrumentation and logging
1298
+ # @return [::String]
1299
+ # @!attribute [rw] timeout
1300
+ # The call timeout in seconds.
1301
+ # @return [::Numeric]
1302
+ # @!attribute [rw] metadata
1303
+ # Additional headers to be sent with the call.
1304
+ # @return [::Hash{::Symbol=>::String}]
1305
+ # @!attribute [rw] retry_policy
1306
+ # The retry policy. The value is a hash with the following keys:
1307
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1308
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1309
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1310
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1311
+ # trigger a retry.
1312
+ # @return [::Hash]
1313
+ # @!attribute [rw] quota_project
1314
+ # A separate project against which to charge quota.
1315
+ # @return [::String]
1316
+ # @!attribute [rw] universe_domain
1317
+ # The universe domain within which to make requests. This determines the
1318
+ # default endpoint URL. The default value of nil uses the environment
1319
+ # universe (usually the default "googleapis.com" universe).
1320
+ # @return [::String,nil]
1321
+ # @!attribute [rw] logger
1322
+ # A custom logger to use for request/response debug logging, or the value
1323
+ # `:default` (the default) to construct a default logger, or `nil` to
1324
+ # explicitly disable logging.
1325
+ # @return [::Logger,:default,nil]
1326
+ #
1327
+ class Configuration
1328
+ extend ::Gapic::Config
1329
+
1330
+ # @private
1331
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1332
+ DEFAULT_ENDPOINT = "chronicle.googleapis.com"
1333
+
1334
+ config_attr :endpoint, nil, ::String, nil
1335
+ config_attr :credentials, nil do |value|
1336
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
1337
+ allowed.any? { |klass| klass === value }
1338
+ end
1339
+ config_attr :scope, nil, ::String, ::Array, nil
1340
+ config_attr :lib_name, nil, ::String, nil
1341
+ config_attr :lib_version, nil, ::String, nil
1342
+ config_attr :timeout, nil, ::Numeric, nil
1343
+ config_attr :metadata, nil, ::Hash, nil
1344
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1345
+ config_attr :quota_project, nil, ::String, nil
1346
+ config_attr :universe_domain, nil, ::String, nil
1347
+ config_attr :logger, :default, ::Logger, nil, :default
1348
+
1349
+ # @private
1350
+ def initialize parent_config = nil
1351
+ @parent_config = parent_config unless parent_config.nil?
1352
+
1353
+ yield self if block_given?
1354
+ end
1355
+
1356
+ ##
1357
+ # Configurations for individual RPCs
1358
+ # @return [Rpcs]
1359
+ #
1360
+ def rpcs
1361
+ @rpcs ||= begin
1362
+ parent_rpcs = nil
1363
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1364
+ Rpcs.new parent_rpcs
1365
+ end
1366
+ end
1367
+
1368
+ ##
1369
+ # Configuration RPC class for the NativeDashboardService API.
1370
+ #
1371
+ # Includes fields providing the configuration for each RPC in this service.
1372
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1373
+ # the following configuration fields:
1374
+ #
1375
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1376
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1377
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1378
+ # include the following keys:
1379
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1380
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1381
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1382
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1383
+ # trigger a retry.
1384
+ #
1385
+ class Rpcs
1386
+ ##
1387
+ # RPC-specific configuration for `create_native_dashboard`
1388
+ # @return [::Gapic::Config::Method]
1389
+ #
1390
+ attr_reader :create_native_dashboard
1391
+ ##
1392
+ # RPC-specific configuration for `get_native_dashboard`
1393
+ # @return [::Gapic::Config::Method]
1394
+ #
1395
+ attr_reader :get_native_dashboard
1396
+ ##
1397
+ # RPC-specific configuration for `list_native_dashboards`
1398
+ # @return [::Gapic::Config::Method]
1399
+ #
1400
+ attr_reader :list_native_dashboards
1401
+ ##
1402
+ # RPC-specific configuration for `update_native_dashboard`
1403
+ # @return [::Gapic::Config::Method]
1404
+ #
1405
+ attr_reader :update_native_dashboard
1406
+ ##
1407
+ # RPC-specific configuration for `duplicate_native_dashboard`
1408
+ # @return [::Gapic::Config::Method]
1409
+ #
1410
+ attr_reader :duplicate_native_dashboard
1411
+ ##
1412
+ # RPC-specific configuration for `delete_native_dashboard`
1413
+ # @return [::Gapic::Config::Method]
1414
+ #
1415
+ attr_reader :delete_native_dashboard
1416
+ ##
1417
+ # RPC-specific configuration for `add_chart`
1418
+ # @return [::Gapic::Config::Method]
1419
+ #
1420
+ attr_reader :add_chart
1421
+ ##
1422
+ # RPC-specific configuration for `remove_chart`
1423
+ # @return [::Gapic::Config::Method]
1424
+ #
1425
+ attr_reader :remove_chart
1426
+ ##
1427
+ # RPC-specific configuration for `edit_chart`
1428
+ # @return [::Gapic::Config::Method]
1429
+ #
1430
+ attr_reader :edit_chart
1431
+ ##
1432
+ # RPC-specific configuration for `duplicate_chart`
1433
+ # @return [::Gapic::Config::Method]
1434
+ #
1435
+ attr_reader :duplicate_chart
1436
+ ##
1437
+ # RPC-specific configuration for `export_native_dashboards`
1438
+ # @return [::Gapic::Config::Method]
1439
+ #
1440
+ attr_reader :export_native_dashboards
1441
+ ##
1442
+ # RPC-specific configuration for `import_native_dashboards`
1443
+ # @return [::Gapic::Config::Method]
1444
+ #
1445
+ attr_reader :import_native_dashboards
1446
+
1447
+ # @private
1448
+ def initialize parent_rpcs = nil
1449
+ create_native_dashboard_config = parent_rpcs.create_native_dashboard if parent_rpcs.respond_to? :create_native_dashboard
1450
+ @create_native_dashboard = ::Gapic::Config::Method.new create_native_dashboard_config
1451
+ get_native_dashboard_config = parent_rpcs.get_native_dashboard if parent_rpcs.respond_to? :get_native_dashboard
1452
+ @get_native_dashboard = ::Gapic::Config::Method.new get_native_dashboard_config
1453
+ list_native_dashboards_config = parent_rpcs.list_native_dashboards if parent_rpcs.respond_to? :list_native_dashboards
1454
+ @list_native_dashboards = ::Gapic::Config::Method.new list_native_dashboards_config
1455
+ update_native_dashboard_config = parent_rpcs.update_native_dashboard if parent_rpcs.respond_to? :update_native_dashboard
1456
+ @update_native_dashboard = ::Gapic::Config::Method.new update_native_dashboard_config
1457
+ duplicate_native_dashboard_config = parent_rpcs.duplicate_native_dashboard if parent_rpcs.respond_to? :duplicate_native_dashboard
1458
+ @duplicate_native_dashboard = ::Gapic::Config::Method.new duplicate_native_dashboard_config
1459
+ delete_native_dashboard_config = parent_rpcs.delete_native_dashboard if parent_rpcs.respond_to? :delete_native_dashboard
1460
+ @delete_native_dashboard = ::Gapic::Config::Method.new delete_native_dashboard_config
1461
+ add_chart_config = parent_rpcs.add_chart if parent_rpcs.respond_to? :add_chart
1462
+ @add_chart = ::Gapic::Config::Method.new add_chart_config
1463
+ remove_chart_config = parent_rpcs.remove_chart if parent_rpcs.respond_to? :remove_chart
1464
+ @remove_chart = ::Gapic::Config::Method.new remove_chart_config
1465
+ edit_chart_config = parent_rpcs.edit_chart if parent_rpcs.respond_to? :edit_chart
1466
+ @edit_chart = ::Gapic::Config::Method.new edit_chart_config
1467
+ duplicate_chart_config = parent_rpcs.duplicate_chart if parent_rpcs.respond_to? :duplicate_chart
1468
+ @duplicate_chart = ::Gapic::Config::Method.new duplicate_chart_config
1469
+ export_native_dashboards_config = parent_rpcs.export_native_dashboards if parent_rpcs.respond_to? :export_native_dashboards
1470
+ @export_native_dashboards = ::Gapic::Config::Method.new export_native_dashboards_config
1471
+ import_native_dashboards_config = parent_rpcs.import_native_dashboards if parent_rpcs.respond_to? :import_native_dashboards
1472
+ @import_native_dashboards = ::Gapic::Config::Method.new import_native_dashboards_config
1473
+
1474
+ yield self if block_given?
1475
+ end
1476
+ end
1477
+ end
1478
+ end
1479
+ end
1480
+ end
1481
+ end
1482
+ end
1483
+ end
1484
+ end