google-cloud-chronicle-v1 0.a → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/chronicle/v1/data_access_control_pb.rb +67 -0
  6. data/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb +1414 -0
  7. data/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb +47 -0
  8. data/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb +94 -0
  9. data/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb +1318 -0
  10. data/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb +695 -0
  11. data/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb +53 -0
  12. data/lib/google/cloud/chronicle/v1/data_access_control_service.rb +56 -0
  13. data/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb +76 -0
  14. data/lib/google/cloud/chronicle/v1/entity_pb.rb +62 -0
  15. data/lib/google/cloud/chronicle/v1/entity_service/client.rb +891 -0
  16. data/lib/google/cloud/chronicle/v1/entity_service/credentials.rb +47 -0
  17. data/lib/google/cloud/chronicle/v1/entity_service/paths.rb +73 -0
  18. data/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb +830 -0
  19. data/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb +388 -0
  20. data/lib/google/cloud/chronicle/v1/entity_service/rest.rb +52 -0
  21. data/lib/google/cloud/chronicle/v1/entity_service.rb +55 -0
  22. data/lib/google/cloud/chronicle/v1/entity_services_pb.rb +54 -0
  23. data/lib/google/cloud/chronicle/v1/instance_pb.rb +48 -0
  24. data/lib/google/cloud/chronicle/v1/instance_service/client.rb +464 -0
  25. data/lib/google/cloud/chronicle/v1/instance_service/credentials.rb +47 -0
  26. data/lib/google/cloud/chronicle/v1/instance_service/paths.rb +52 -0
  27. data/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb +431 -0
  28. data/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb +142 -0
  29. data/lib/google/cloud/chronicle/v1/instance_service/rest.rb +52 -0
  30. data/lib/google/cloud/chronicle/v1/instance_service.rb +55 -0
  31. data/lib/google/cloud/chronicle/v1/instance_services_pb.rb +45 -0
  32. data/lib/google/cloud/chronicle/v1/reference_list_pb.rb +61 -0
  33. data/lib/google/cloud/chronicle/v1/reference_list_service/client.rb +792 -0
  34. data/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb +47 -0
  35. data/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb +73 -0
  36. data/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb +738 -0
  37. data/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb +327 -0
  38. data/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb +52 -0
  39. data/lib/google/cloud/chronicle/v1/reference_list_service.rb +55 -0
  40. data/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb +51 -0
  41. data/lib/google/cloud/chronicle/v1/rest.rb +41 -0
  42. data/lib/google/cloud/chronicle/v1/rule_pb.rb +85 -0
  43. data/lib/google/cloud/chronicle/v1/rule_service/client.rb +1674 -0
  44. data/lib/google/cloud/chronicle/v1/rule_service/credentials.rb +47 -0
  45. data/lib/google/cloud/chronicle/v1/rule_service/operations.rb +813 -0
  46. data/lib/google/cloud/chronicle/v1/rule_service/paths.rb +159 -0
  47. data/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb +1564 -0
  48. data/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb +914 -0
  49. data/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb +817 -0
  50. data/lib/google/cloud/chronicle/v1/rule_service/rest.rb +53 -0
  51. data/lib/google/cloud/chronicle/v1/rule_service.rb +56 -0
  52. data/lib/google/cloud/chronicle/v1/rule_services_pb.rb +70 -0
  53. data/lib/google/cloud/chronicle/v1/version.rb +7 -2
  54. data/lib/google/cloud/chronicle/v1.rb +49 -0
  55. data/lib/google-cloud-chronicle-v1.rb +21 -0
  56. data/proto_docs/README.md +4 -0
  57. data/proto_docs/google/api/client.rb +473 -0
  58. data/proto_docs/google/api/field_behavior.rb +85 -0
  59. data/proto_docs/google/api/launch_stage.rb +71 -0
  60. data/proto_docs/google/api/resource.rb +227 -0
  61. data/proto_docs/google/cloud/chronicle/v1/data_access_control.rb +364 -0
  62. data/proto_docs/google/cloud/chronicle/v1/entity.rb +210 -0
  63. data/proto_docs/google/cloud/chronicle/v1/instance.rb +47 -0
  64. data/proto_docs/google/cloud/chronicle/v1/reference_list.rb +232 -0
  65. data/proto_docs/google/cloud/chronicle/v1/rule.rb +701 -0
  66. data/proto_docs/google/longrunning/operations.rb +173 -0
  67. data/proto_docs/google/protobuf/any.rb +145 -0
  68. data/proto_docs/google/protobuf/duration.rb +98 -0
  69. data/proto_docs/google/protobuf/empty.rb +34 -0
  70. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  71. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  72. data/proto_docs/google/rpc/status.rb +48 -0
  73. data/proto_docs/google/type/interval.rb +45 -0
  74. metadata +110 -10
@@ -0,0 +1,464 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/instance_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Chronicle
25
+ module V1
26
+ module InstanceService
27
+ ##
28
+ # Client for the InstanceService service.
29
+ #
30
+ # InstanceService provides the entry interface for the Chronicle API.
31
+ #
32
+ class Client
33
+ # @private
34
+ API_VERSION = ""
35
+
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$"
38
+
39
+ include Paths
40
+
41
+ # @private
42
+ attr_reader :instance_service_stub
43
+
44
+ ##
45
+ # Configure the InstanceService Client class.
46
+ #
47
+ # See {::Google::Cloud::Chronicle::V1::InstanceService::Client::Configuration}
48
+ # for a description of the configuration fields.
49
+ #
50
+ # @example
51
+ #
52
+ # # Modify the configuration for all InstanceService clients
53
+ # ::Google::Cloud::Chronicle::V1::InstanceService::Client.configure do |config|
54
+ # config.timeout = 10.0
55
+ # end
56
+ #
57
+ # @yield [config] Configure the Client client.
58
+ # @yieldparam config [Client::Configuration]
59
+ #
60
+ # @return [Client::Configuration]
61
+ #
62
+ def self.configure
63
+ @configure ||= begin
64
+ namespace = ["Google", "Cloud", "Chronicle", "V1"]
65
+ parent_config = while namespace.any?
66
+ parent_name = namespace.join "::"
67
+ parent_const = const_get parent_name
68
+ break parent_const.configure if parent_const.respond_to? :configure
69
+ namespace.pop
70
+ end
71
+ default_config = Client::Configuration.new parent_config
72
+
73
+ default_config.rpcs.get_instance.timeout = 60.0
74
+ default_config.rpcs.get_instance.retry_policy = {
75
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
76
+ }
77
+
78
+ default_config
79
+ end
80
+ yield @configure if block_given?
81
+ @configure
82
+ end
83
+
84
+ ##
85
+ # Configure the InstanceService Client instance.
86
+ #
87
+ # The configuration is set to the derived mode, meaning that values can be changed,
88
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
89
+ # should be made on {Client.configure}.
90
+ #
91
+ # See {::Google::Cloud::Chronicle::V1::InstanceService::Client::Configuration}
92
+ # for a description of the configuration fields.
93
+ #
94
+ # @yield [config] Configure the Client client.
95
+ # @yieldparam config [Client::Configuration]
96
+ #
97
+ # @return [Client::Configuration]
98
+ #
99
+ def configure
100
+ yield @config if block_given?
101
+ @config
102
+ end
103
+
104
+ ##
105
+ # The effective universe domain
106
+ #
107
+ # @return [String]
108
+ #
109
+ def universe_domain
110
+ @instance_service_stub.universe_domain
111
+ end
112
+
113
+ ##
114
+ # Create a new InstanceService client object.
115
+ #
116
+ # @example
117
+ #
118
+ # # Create a client using the default configuration
119
+ # client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new
120
+ #
121
+ # # Create a client using a custom configuration
122
+ # client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config|
123
+ # config.timeout = 10.0
124
+ # end
125
+ #
126
+ # @yield [config] Configure the InstanceService client.
127
+ # @yieldparam config [Client::Configuration]
128
+ #
129
+ def initialize
130
+ # These require statements are intentionally placed here to initialize
131
+ # the gRPC module only when it's required.
132
+ # See https://github.com/googleapis/toolkit/issues/446
133
+ require "gapic/grpc"
134
+ require "google/cloud/chronicle/v1/instance_services_pb"
135
+
136
+ # Create the configuration object
137
+ @config = Configuration.new Client.configure
138
+
139
+ # Yield the configuration if needed
140
+ yield @config if block_given?
141
+
142
+ # Create credentials
143
+ credentials = @config.credentials
144
+ # Use self-signed JWT if the endpoint is unchanged from default,
145
+ # but only if the default endpoint does not have a region prefix.
146
+ enable_self_signed_jwt = @config.endpoint.nil? ||
147
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
148
+ !@config.endpoint.split(".").first.include?("-"))
149
+ credentials ||= Credentials.default scope: @config.scope,
150
+ enable_self_signed_jwt: enable_self_signed_jwt
151
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
152
+ credentials = Credentials.new credentials, scope: @config.scope
153
+ end
154
+ @quota_project_id = @config.quota_project
155
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
156
+
157
+ @instance_service_stub = ::Gapic::ServiceStub.new(
158
+ ::Google::Cloud::Chronicle::V1::InstanceService::Stub,
159
+ credentials: credentials,
160
+ endpoint: @config.endpoint,
161
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
162
+ universe_domain: @config.universe_domain,
163
+ channel_args: @config.channel_args,
164
+ interceptors: @config.interceptors,
165
+ channel_pool_config: @config.channel_pool,
166
+ logger: @config.logger
167
+ )
168
+
169
+ @instance_service_stub.stub_logger&.info do |entry|
170
+ entry.set_system_name
171
+ entry.set_service
172
+ entry.message = "Created client for #{entry.service}"
173
+ entry.set_credentials_fields credentials
174
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
175
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
176
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
177
+ end
178
+ end
179
+
180
+ ##
181
+ # The logger used for request/response debug logging.
182
+ #
183
+ # @return [Logger]
184
+ #
185
+ def logger
186
+ @instance_service_stub.logger
187
+ end
188
+
189
+ # Service calls
190
+
191
+ ##
192
+ # Gets a Instance.
193
+ #
194
+ # @overload get_instance(request, options = nil)
195
+ # Pass arguments to `get_instance` via a request object, either of type
196
+ # {::Google::Cloud::Chronicle::V1::GetInstanceRequest} or an equivalent Hash.
197
+ #
198
+ # @param request [::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::Hash]
199
+ # A request object representing the call parameters. Required. To specify no
200
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
201
+ # @param options [::Gapic::CallOptions, ::Hash]
202
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
203
+ #
204
+ # @overload get_instance(name: nil)
205
+ # Pass arguments to `get_instance` via keyword arguments. Note that at
206
+ # least one keyword argument is required. To specify no parameters, or to keep all
207
+ # the default parameter values, pass an empty Hash as a request object (see above).
208
+ #
209
+ # @param name [::String]
210
+ # Required. The name of the instance to retrieve.
211
+ # Format:
212
+ # `projects/{project_id}/locations/{location}/instances/{instance}`
213
+ #
214
+ # @yield [response, operation] Access the result along with the RPC operation
215
+ # @yieldparam response [::Google::Cloud::Chronicle::V1::Instance]
216
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
217
+ #
218
+ # @return [::Google::Cloud::Chronicle::V1::Instance]
219
+ #
220
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
221
+ #
222
+ # @example Basic example
223
+ # require "google/cloud/chronicle/v1"
224
+ #
225
+ # # Create a client object. The client can be reused for multiple calls.
226
+ # client = Google::Cloud::Chronicle::V1::InstanceService::Client.new
227
+ #
228
+ # # Create a request. To set request fields, pass in keyword arguments.
229
+ # request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new
230
+ #
231
+ # # Call the get_instance method.
232
+ # result = client.get_instance request
233
+ #
234
+ # # The returned object is of type Google::Cloud::Chronicle::V1::Instance.
235
+ # p result
236
+ #
237
+ def get_instance request, options = nil
238
+ raise ::ArgumentError, "request must be provided" if request.nil?
239
+
240
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetInstanceRequest
241
+
242
+ # Converts hash and nil to an options object
243
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
244
+
245
+ # Customize the options with defaults
246
+ metadata = @config.rpcs.get_instance.metadata.to_h
247
+
248
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
249
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
250
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
251
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
252
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
253
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
254
+
255
+ header_params = {}
256
+ if request.name
257
+ header_params["name"] = request.name
258
+ end
259
+
260
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
261
+ metadata[:"x-goog-request-params"] ||= request_params_header
262
+
263
+ options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
264
+ metadata: metadata,
265
+ retry_policy: @config.rpcs.get_instance.retry_policy
266
+
267
+ options.apply_defaults timeout: @config.timeout,
268
+ metadata: @config.metadata,
269
+ retry_policy: @config.retry_policy
270
+
271
+ @instance_service_stub.call_rpc :get_instance, request, options: options do |response, operation|
272
+ yield response, operation if block_given?
273
+ end
274
+ rescue ::GRPC::BadStatus => e
275
+ raise ::Google::Cloud::Error.from_error(e)
276
+ end
277
+
278
+ ##
279
+ # Configuration class for the InstanceService API.
280
+ #
281
+ # This class represents the configuration for InstanceService,
282
+ # providing control over timeouts, retry behavior, logging, transport
283
+ # parameters, and other low-level controls. Certain parameters can also be
284
+ # applied individually to specific RPCs. See
285
+ # {::Google::Cloud::Chronicle::V1::InstanceService::Client::Configuration::Rpcs}
286
+ # for a list of RPCs that can be configured independently.
287
+ #
288
+ # Configuration can be applied globally to all clients, or to a single client
289
+ # on construction.
290
+ #
291
+ # @example
292
+ #
293
+ # # Modify the global config, setting the timeout for
294
+ # # get_instance to 20 seconds,
295
+ # # and all remaining timeouts to 10 seconds.
296
+ # ::Google::Cloud::Chronicle::V1::InstanceService::Client.configure do |config|
297
+ # config.timeout = 10.0
298
+ # config.rpcs.get_instance.timeout = 20.0
299
+ # end
300
+ #
301
+ # # Apply the above configuration only to a new client.
302
+ # client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config|
303
+ # config.timeout = 10.0
304
+ # config.rpcs.get_instance.timeout = 20.0
305
+ # end
306
+ #
307
+ # @!attribute [rw] endpoint
308
+ # A custom service endpoint, as a hostname or hostname:port. The default is
309
+ # nil, indicating to use the default endpoint in the current universe domain.
310
+ # @return [::String,nil]
311
+ # @!attribute [rw] credentials
312
+ # Credentials to send with calls. You may provide any of the following types:
313
+ # * (`String`) The path to a service account key file in JSON format
314
+ # * (`Hash`) A service account key as a Hash
315
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
316
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
317
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
318
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
319
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
320
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
321
+ # * (`nil`) indicating no credentials
322
+ #
323
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
324
+ # external source for authentication to Google Cloud, you must validate it before
325
+ # providing it to a Google API client library. Providing an unvalidated credential
326
+ # configuration to Google APIs can compromise the security of your systems and data.
327
+ # For more information, refer to [Validate credential configurations from external
328
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
329
+ # @return [::Object]
330
+ # @!attribute [rw] scope
331
+ # The OAuth scopes
332
+ # @return [::Array<::String>]
333
+ # @!attribute [rw] lib_name
334
+ # The library name as recorded in instrumentation and logging
335
+ # @return [::String]
336
+ # @!attribute [rw] lib_version
337
+ # The library version as recorded in instrumentation and logging
338
+ # @return [::String]
339
+ # @!attribute [rw] channel_args
340
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
341
+ # `GRPC::Core::Channel` object is provided as the credential.
342
+ # @return [::Hash]
343
+ # @!attribute [rw] interceptors
344
+ # An array of interceptors that are run before calls are executed.
345
+ # @return [::Array<::GRPC::ClientInterceptor>]
346
+ # @!attribute [rw] timeout
347
+ # The call timeout in seconds.
348
+ # @return [::Numeric]
349
+ # @!attribute [rw] metadata
350
+ # Additional gRPC headers to be sent with the call.
351
+ # @return [::Hash{::Symbol=>::String}]
352
+ # @!attribute [rw] retry_policy
353
+ # The retry policy. The value is a hash with the following keys:
354
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
355
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
356
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
357
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
358
+ # trigger a retry.
359
+ # @return [::Hash]
360
+ # @!attribute [rw] quota_project
361
+ # A separate project against which to charge quota.
362
+ # @return [::String]
363
+ # @!attribute [rw] universe_domain
364
+ # The universe domain within which to make requests. This determines the
365
+ # default endpoint URL. The default value of nil uses the environment
366
+ # universe (usually the default "googleapis.com" universe).
367
+ # @return [::String,nil]
368
+ # @!attribute [rw] logger
369
+ # A custom logger to use for request/response debug logging, or the value
370
+ # `:default` (the default) to construct a default logger, or `nil` to
371
+ # explicitly disable logging.
372
+ # @return [::Logger,:default,nil]
373
+ #
374
+ class Configuration
375
+ extend ::Gapic::Config
376
+
377
+ # @private
378
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
379
+ DEFAULT_ENDPOINT = "chronicle.googleapis.com"
380
+
381
+ config_attr :endpoint, nil, ::String, nil
382
+ config_attr :credentials, nil do |value|
383
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
384
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
385
+ allowed.any? { |klass| klass === value }
386
+ end
387
+ config_attr :scope, nil, ::String, ::Array, nil
388
+ config_attr :lib_name, nil, ::String, nil
389
+ config_attr :lib_version, nil, ::String, nil
390
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
391
+ config_attr :interceptors, nil, ::Array, nil
392
+ config_attr :timeout, nil, ::Numeric, nil
393
+ config_attr :metadata, nil, ::Hash, nil
394
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
395
+ config_attr :quota_project, nil, ::String, nil
396
+ config_attr :universe_domain, nil, ::String, nil
397
+ config_attr :logger, :default, ::Logger, nil, :default
398
+
399
+ # @private
400
+ def initialize parent_config = nil
401
+ @parent_config = parent_config unless parent_config.nil?
402
+
403
+ yield self if block_given?
404
+ end
405
+
406
+ ##
407
+ # Configurations for individual RPCs
408
+ # @return [Rpcs]
409
+ #
410
+ def rpcs
411
+ @rpcs ||= begin
412
+ parent_rpcs = nil
413
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
414
+ Rpcs.new parent_rpcs
415
+ end
416
+ end
417
+
418
+ ##
419
+ # Configuration for the channel pool
420
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
421
+ #
422
+ def channel_pool
423
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
424
+ end
425
+
426
+ ##
427
+ # Configuration RPC class for the InstanceService API.
428
+ #
429
+ # Includes fields providing the configuration for each RPC in this service.
430
+ # Each configuration object is of type `Gapic::Config::Method` and includes
431
+ # the following configuration fields:
432
+ #
433
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
434
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
435
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
436
+ # include the following keys:
437
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
438
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
439
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
440
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
441
+ # trigger a retry.
442
+ #
443
+ class Rpcs
444
+ ##
445
+ # RPC-specific configuration for `get_instance`
446
+ # @return [::Gapic::Config::Method]
447
+ #
448
+ attr_reader :get_instance
449
+
450
+ # @private
451
+ def initialize parent_rpcs = nil
452
+ get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
453
+ @get_instance = ::Gapic::Config::Method.new get_instance_config
454
+
455
+ yield self if block_given?
456
+ end
457
+ end
458
+ end
459
+ end
460
+ end
461
+ end
462
+ end
463
+ end
464
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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 "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Chronicle
24
+ module V1
25
+ module InstanceService
26
+ # Credentials for the InstanceService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "GOOGLE_CLOUD_CREDENTIALS",
33
+ "GOOGLE_CLOUD_KEYFILE",
34
+ "GCLOUD_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
36
+ "GOOGLE_CLOUD_KEYFILE_JSON",
37
+ "GCLOUD_KEYFILE_JSON"
38
+ ]
39
+ self.paths = [
40
+ "~/.config/google_cloud/application_default_credentials.json"
41
+ ]
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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
+
20
+ module Google
21
+ module Cloud
22
+ module Chronicle
23
+ module V1
24
+ module InstanceService
25
+ # Path helper methods for the InstanceService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Instance resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/instances/{instance}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param instance [String]
37
+ #
38
+ # @return [::String]
39
+ def instance_path project:, location:, instance:
40
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
42
+
43
+ "projects/#{project}/locations/#{location}/instances/#{instance}"
44
+ end
45
+
46
+ extend self
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end