google-cloud-chronicle-v1 0.7.0 → 0.8.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 (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/chronicle/v1/reference_list_pb.rb +4 -1
  3. data/lib/google/cloud/chronicle/v1/reference_list_service/client.rb +104 -0
  4. data/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb +2 -0
  5. data/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb +97 -0
  6. data/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb +62 -0
  7. data/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb +2 -0
  8. data/lib/google/cloud/chronicle/v1/rest.rb +1 -0
  9. data/lib/google/cloud/chronicle/v1/rule_execution_error_pb.rb +30 -0
  10. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/client.rb +522 -0
  11. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/credentials.rb +49 -0
  12. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/paths.rb +52 -0
  13. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/rest/client.rb +472 -0
  14. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/rest/service_stub.rb +142 -0
  15. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/rest.rb +53 -0
  16. data/lib/google/cloud/chronicle/v1/rule_execution_error_service.rb +56 -0
  17. data/lib/google/cloud/chronicle/v1/rule_execution_error_services_pb.rb +46 -0
  18. data/lib/google/cloud/chronicle/v1/rule_pb.rb +3 -1
  19. data/lib/google/cloud/chronicle/v1/rule_service/client.rb +101 -0
  20. data/lib/google/cloud/chronicle/v1/rule_service/credentials.rb +2 -0
  21. data/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb +94 -0
  22. data/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb +62 -0
  23. data/lib/google/cloud/chronicle/v1/rule_services_pb.rb +2 -0
  24. data/lib/google/cloud/chronicle/v1/version.rb +1 -1
  25. data/lib/google/cloud/chronicle/v1.rb +1 -0
  26. data/proto_docs/google/cloud/chronicle/v1/reference_list.rb +43 -0
  27. data/proto_docs/google/cloud/chronicle/v1/rule.rb +27 -0
  28. data/proto_docs/google/cloud/chronicle/v1/rule_execution_error.rb +116 -0
  29. metadata +11 -1
@@ -0,0 +1,472 @@
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/rule_execution_error_pb"
21
+ require "google/cloud/chronicle/v1/rule_execution_error_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Chronicle
26
+ module V1
27
+ module RuleExecutionErrorService
28
+ module Rest
29
+ ##
30
+ # REST client for the RuleExecutionErrorService service.
31
+ #
32
+ # RuleExecutionErrorService contains endpoints related to rule execution
33
+ # errors.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :rule_execution_error_service_stub
46
+
47
+ ##
48
+ # Configure the RuleExecutionErrorService Client class.
49
+ #
50
+ # See {::Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all RuleExecutionErrorService clients
56
+ # ::Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Cloud", "Chronicle", "V1"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.rpcs.list_rule_execution_errors.timeout = 600.0
77
+ default_config.rpcs.list_rule_execution_errors.retry_policy = {
78
+ initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config
82
+ end
83
+ yield @configure if block_given?
84
+ @configure
85
+ end
86
+
87
+ ##
88
+ # Configure the RuleExecutionErrorService Client instance.
89
+ #
90
+ # The configuration is set to the derived mode, meaning that values can be changed,
91
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
92
+ # should be made on {Client.configure}.
93
+ #
94
+ # See {::Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Rest::Client::Configuration}
95
+ # for a description of the configuration fields.
96
+ #
97
+ # @yield [config] Configure the Client client.
98
+ # @yieldparam config [Client::Configuration]
99
+ #
100
+ # @return [Client::Configuration]
101
+ #
102
+ def configure
103
+ yield @config if block_given?
104
+ @config
105
+ end
106
+
107
+ ##
108
+ # The effective universe domain
109
+ #
110
+ # @return [String]
111
+ #
112
+ def universe_domain
113
+ @rule_execution_error_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new RuleExecutionErrorService REST client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Rest::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Rest::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the RuleExecutionErrorService client.
130
+ # @yieldparam config [Client::Configuration]
131
+ #
132
+ def initialize
133
+ # Create the configuration object
134
+ @config = Configuration.new Client.configure
135
+
136
+ # Yield the configuration if needed
137
+ yield @config if block_given?
138
+
139
+ # Create credentials
140
+ credentials = @config.credentials
141
+ # Use self-signed JWT if the endpoint is unchanged from default,
142
+ # but only if the default endpoint does not have a region prefix.
143
+ enable_self_signed_jwt = @config.endpoint.nil? ||
144
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
145
+ !@config.endpoint.split(".").first.include?("-"))
146
+ credentials ||= Credentials.default scope: @config.scope,
147
+ enable_self_signed_jwt: enable_self_signed_jwt
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
149
+ credentials = Credentials.new credentials, scope: @config.scope
150
+ end
151
+
152
+ @quota_project_id = @config.quota_project
153
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
154
+
155
+ @rule_execution_error_service_stub = ::Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Rest::ServiceStub.new(
156
+ endpoint: @config.endpoint,
157
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
158
+ universe_domain: @config.universe_domain,
159
+ credentials: credentials,
160
+ logger: @config.logger
161
+ )
162
+
163
+ @rule_execution_error_service_stub.logger(stub: true)&.info do |entry|
164
+ entry.set_system_name
165
+ entry.set_service
166
+ entry.message = "Created client for #{entry.service}"
167
+ entry.set_credentials_fields credentials
168
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
169
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
170
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
171
+ end
172
+ end
173
+
174
+ ##
175
+ # The logger used for request/response debug logging.
176
+ #
177
+ # @return [Logger]
178
+ #
179
+ def logger
180
+ @rule_execution_error_service_stub.logger
181
+ end
182
+
183
+ # Service calls
184
+
185
+ ##
186
+ # Lists rule execution errors.
187
+ #
188
+ # @overload list_rule_execution_errors(request, options = nil)
189
+ # Pass arguments to `list_rule_execution_errors` via a request object, either of type
190
+ # {::Google::Cloud::Chronicle::V1::ListRuleExecutionErrorsRequest} or an equivalent Hash.
191
+ #
192
+ # @param request [::Google::Cloud::Chronicle::V1::ListRuleExecutionErrorsRequest, ::Hash]
193
+ # A request object representing the call parameters. Required. To specify no
194
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
195
+ # @param options [::Gapic::CallOptions, ::Hash]
196
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
197
+ #
198
+ # @overload list_rule_execution_errors(parent: nil, page_size: nil, page_token: nil, filter: nil)
199
+ # Pass arguments to `list_rule_execution_errors` via keyword arguments. Note that at
200
+ # least one keyword argument is required. To specify no parameters, or to keep all
201
+ # the default parameter values, pass an empty Hash as a request object (see above).
202
+ #
203
+ # @param parent [::String]
204
+ # Required. The instance to list rule execution errors from.
205
+ # Format:
206
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}
207
+ # @param page_size [::Integer]
208
+ # The maximum number of rule execution errors to return. The service may
209
+ # return fewer than this value. If unspecified, at most 1000 rule execution
210
+ # errors will be returned. The maximum value is 10000; values above 10000
211
+ # will be coerced to 10000.
212
+ # @param page_token [::String]
213
+ # A page token, received from a previous `ListRuleExecutionErrors` call.
214
+ # Provide this to retrieve the subsequent page.
215
+ #
216
+ # When paginating, all other parameters provided to `ListRuleExecutionErrors`
217
+ # must match the call that provided the page token.
218
+ # @param filter [::String]
219
+ # A filter that can be used to retrieve specific rule execution errors.
220
+ # Only the following filters are allowed:
221
+ # ```
222
+ # rule = "\\{Rule.name}"
223
+ # curated_rule = "\\{CuratedRule.name}"
224
+ # ```
225
+ # The value for rule or curated_rule must be a valid rule resource name or a
226
+ # valid curated rule resource name specified in quotes.
227
+ #
228
+ # For 'rule', an optional 'revision_id' can be specified which can be used to
229
+ # fetch errors for a given revision of the rule. A '-' is also allowed to
230
+ # fetch errors across all revisions of the rule. If unspecified, only errors
231
+ # corresponding to the most recent revision of the rule will be returned. So
232
+ # these variations are all allowed:
233
+ # ```
234
+ # rule = "\\{Rule.name}"
235
+ # rule = "\\{Rule.name}@\\{Rule.revision_id}"
236
+ # rule = "\\{Rule.name}@-"
237
+ # ```
238
+ # Revision IDs are not supported for curated rules.
239
+ # @yield [result, operation] Access the result along with the TransportOperation object
240
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleExecutionError>]
241
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
242
+ #
243
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleExecutionError>]
244
+ #
245
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
246
+ #
247
+ # @example Basic example
248
+ # require "google/cloud/chronicle/v1"
249
+ #
250
+ # # Create a client object. The client can be reused for multiple calls.
251
+ # client = Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Rest::Client.new
252
+ #
253
+ # # Create a request. To set request fields, pass in keyword arguments.
254
+ # request = Google::Cloud::Chronicle::V1::ListRuleExecutionErrorsRequest.new
255
+ #
256
+ # # Call the list_rule_execution_errors method.
257
+ # result = client.list_rule_execution_errors request
258
+ #
259
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
260
+ # # over elements, and API calls will be issued to fetch pages as needed.
261
+ # result.each do |item|
262
+ # # Each element is of type ::Google::Cloud::Chronicle::V1::RuleExecutionError.
263
+ # p item
264
+ # end
265
+ #
266
+ def list_rule_execution_errors request, options = nil
267
+ raise ::ArgumentError, "request must be provided" if request.nil?
268
+
269
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleExecutionErrorsRequest
270
+
271
+ # Converts hash and nil to an options object
272
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
273
+
274
+ # Customize the options with defaults
275
+ call_metadata = @config.rpcs.list_rule_execution_errors.metadata.to_h
276
+
277
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
278
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
279
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
280
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
281
+ transports_version_send: [:rest]
282
+
283
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
284
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
285
+
286
+ options.apply_defaults timeout: @config.rpcs.list_rule_execution_errors.timeout,
287
+ metadata: call_metadata,
288
+ retry_policy: @config.rpcs.list_rule_execution_errors.retry_policy
289
+
290
+ options.apply_defaults timeout: @config.timeout,
291
+ metadata: @config.metadata,
292
+ retry_policy: @config.retry_policy
293
+
294
+ @rule_execution_error_service_stub.list_rule_execution_errors request, options do |result, operation|
295
+ result = ::Gapic::Rest::PagedEnumerable.new @rule_execution_error_service_stub, :list_rule_execution_errors, "rule_execution_errors", request, result, options
296
+ yield result, operation if block_given?
297
+ throw :response, result
298
+ end
299
+ rescue ::Gapic::Rest::Error => e
300
+ raise ::Google::Cloud::Error.from_error(e)
301
+ end
302
+
303
+ ##
304
+ # Configuration class for the RuleExecutionErrorService REST API.
305
+ #
306
+ # This class represents the configuration for RuleExecutionErrorService REST,
307
+ # providing control over timeouts, retry behavior, logging, transport
308
+ # parameters, and other low-level controls. Certain parameters can also be
309
+ # applied individually to specific RPCs. See
310
+ # {::Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Rest::Client::Configuration::Rpcs}
311
+ # for a list of RPCs that can be configured independently.
312
+ #
313
+ # Configuration can be applied globally to all clients, or to a single client
314
+ # on construction.
315
+ #
316
+ # @example
317
+ #
318
+ # # Modify the global config, setting the timeout for
319
+ # # list_rule_execution_errors to 20 seconds,
320
+ # # and all remaining timeouts to 10 seconds.
321
+ # ::Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Rest::Client.configure do |config|
322
+ # config.timeout = 10.0
323
+ # config.rpcs.list_rule_execution_errors.timeout = 20.0
324
+ # end
325
+ #
326
+ # # Apply the above configuration only to a new client.
327
+ # client = ::Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Rest::Client.new do |config|
328
+ # config.timeout = 10.0
329
+ # config.rpcs.list_rule_execution_errors.timeout = 20.0
330
+ # end
331
+ #
332
+ # @!attribute [rw] endpoint
333
+ # A custom service endpoint, as a hostname or hostname:port. The default is
334
+ # nil, indicating to use the default endpoint in the current universe domain.
335
+ # @return [::String,nil]
336
+ # @!attribute [rw] credentials
337
+ # Credentials to send with calls. You may provide any of the following types:
338
+ # * (`String`) The path to a service account key file in JSON format
339
+ # * (`Hash`) A service account key as a Hash
340
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
341
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
342
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
343
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
344
+ # * (`nil`) indicating no credentials
345
+ #
346
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
347
+ # external source for authentication to Google Cloud, you must validate it before
348
+ # providing it to a Google API client library. Providing an unvalidated credential
349
+ # configuration to Google APIs can compromise the security of your systems and data.
350
+ # For more information, refer to [Validate credential configurations from external
351
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
352
+ # @return [::Object]
353
+ # @!attribute [rw] scope
354
+ # The OAuth scopes
355
+ # @return [::Array<::String>]
356
+ # @!attribute [rw] lib_name
357
+ # The library name as recorded in instrumentation and logging
358
+ # @return [::String]
359
+ # @!attribute [rw] lib_version
360
+ # The library version as recorded in instrumentation and logging
361
+ # @return [::String]
362
+ # @!attribute [rw] timeout
363
+ # The call timeout in seconds.
364
+ # @return [::Numeric]
365
+ # @!attribute [rw] metadata
366
+ # Additional headers to be sent with the call.
367
+ # @return [::Hash{::Symbol=>::String}]
368
+ # @!attribute [rw] retry_policy
369
+ # The retry policy. The value is a hash with the following keys:
370
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
371
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
372
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
373
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
374
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
375
+ # trigger a retry.
376
+ # @return [::Hash]
377
+ # @!attribute [rw] quota_project
378
+ # A separate project against which to charge quota.
379
+ # @return [::String]
380
+ # @!attribute [rw] universe_domain
381
+ # The universe domain within which to make requests. This determines the
382
+ # default endpoint URL. The default value of nil uses the environment
383
+ # universe (usually the default "googleapis.com" universe).
384
+ # @return [::String,nil]
385
+ # @!attribute [rw] logger
386
+ # A custom logger to use for request/response debug logging, or the value
387
+ # `:default` (the default) to construct a default logger, or `nil` to
388
+ # explicitly disable logging.
389
+ # @return [::Logger,:default,nil]
390
+ #
391
+ class Configuration
392
+ extend ::Gapic::Config
393
+
394
+ # @private
395
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
396
+ DEFAULT_ENDPOINT = "chronicle.googleapis.com"
397
+
398
+ config_attr :endpoint, nil, ::String, nil
399
+ config_attr :credentials, nil do |value|
400
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
401
+ allowed.any? { |klass| klass === value }
402
+ end
403
+ config_attr :scope, nil, ::String, ::Array, nil
404
+ config_attr :lib_name, nil, ::String, nil
405
+ config_attr :lib_version, nil, ::String, nil
406
+ config_attr :timeout, nil, ::Numeric, nil
407
+ config_attr :metadata, nil, ::Hash, nil
408
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
409
+ config_attr :quota_project, nil, ::String, nil
410
+ config_attr :universe_domain, nil, ::String, nil
411
+ config_attr :logger, :default, ::Logger, nil, :default
412
+
413
+ # @private
414
+ def initialize parent_config = nil
415
+ @parent_config = parent_config unless parent_config.nil?
416
+
417
+ yield self if block_given?
418
+ end
419
+
420
+ ##
421
+ # Configurations for individual RPCs
422
+ # @return [Rpcs]
423
+ #
424
+ def rpcs
425
+ @rpcs ||= begin
426
+ parent_rpcs = nil
427
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
428
+ Rpcs.new parent_rpcs
429
+ end
430
+ end
431
+
432
+ ##
433
+ # Configuration RPC class for the RuleExecutionErrorService API.
434
+ #
435
+ # Includes fields providing the configuration for each RPC in this service.
436
+ # Each configuration object is of type `Gapic::Config::Method` and includes
437
+ # the following configuration fields:
438
+ #
439
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
440
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
441
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
442
+ # include the following keys:
443
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
444
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
445
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
446
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
447
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
448
+ # trigger a retry.
449
+ #
450
+ class Rpcs
451
+ ##
452
+ # RPC-specific configuration for `list_rule_execution_errors`
453
+ # @return [::Gapic::Config::Method]
454
+ #
455
+ attr_reader :list_rule_execution_errors
456
+
457
+ # @private
458
+ def initialize parent_rpcs = nil
459
+ list_rule_execution_errors_config = parent_rpcs.list_rule_execution_errors if parent_rpcs.respond_to? :list_rule_execution_errors
460
+ @list_rule_execution_errors = ::Gapic::Config::Method.new list_rule_execution_errors_config
461
+
462
+ yield self if block_given?
463
+ end
464
+ end
465
+ end
466
+ end
467
+ end
468
+ end
469
+ end
470
+ end
471
+ end
472
+ end
@@ -0,0 +1,142 @@
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/chronicle/v1/rule_execution_error_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Chronicle
24
+ module V1
25
+ module RuleExecutionErrorService
26
+ module Rest
27
+ ##
28
+ # REST service stub for the RuleExecutionErrorService service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
43
+ numeric_enums: true,
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
47
+ end
48
+
49
+ ##
50
+ # The effective universe domain
51
+ #
52
+ # @return [String]
53
+ #
54
+ def universe_domain
55
+ @client_stub.universe_domain
56
+ end
57
+
58
+ ##
59
+ # The effective endpoint
60
+ #
61
+ # @return [String]
62
+ #
63
+ def endpoint
64
+ @client_stub.endpoint
65
+ end
66
+
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
76
+ ##
77
+ # Baseline implementation for the list_rule_execution_errors REST call
78
+ #
79
+ # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleExecutionErrorsRequest]
80
+ # A request object representing the call parameters. Required.
81
+ # @param options [::Gapic::CallOptions]
82
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
83
+ #
84
+ # @yield [result, operation] Access the result along with the TransportOperation object
85
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::ListRuleExecutionErrorsResponse]
86
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
87
+ #
88
+ # @return [::Google::Cloud::Chronicle::V1::ListRuleExecutionErrorsResponse]
89
+ # A result object deserialized from the server's reply
90
+ def list_rule_execution_errors request_pb, options = nil
91
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
92
+
93
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_execution_errors_request request_pb
94
+ query_string_params = if query_string_params.any?
95
+ query_string_params.to_h { |p| p.split "=", 2 }
96
+ else
97
+ {}
98
+ end
99
+
100
+ response = @client_stub.make_http_request(
101
+ verb,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "list_rule_execution_errors",
106
+ options: options
107
+ )
108
+ operation = ::Gapic::Rest::TransportOperation.new response
109
+ result = ::Google::Cloud::Chronicle::V1::ListRuleExecutionErrorsResponse.decode_json response.body, ignore_unknown_fields: true
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
114
+ end
115
+
116
+ ##
117
+ # @private
118
+ #
119
+ # GRPC transcoding helper method for the list_rule_execution_errors REST call
120
+ #
121
+ # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleExecutionErrorsRequest]
122
+ # A request object representing the call parameters. Required.
123
+ # @return [Array(String, [String, nil], Hash{String => String})]
124
+ # Uri, Body, Query string parameters
125
+ def self.transcode_list_rule_execution_errors_request request_pb
126
+ transcoder = Gapic::Rest::GrpcTranscoder.new
127
+ .with_bindings(
128
+ uri_method: :get,
129
+ uri_template: "/v1/{parent}/ruleExecutionErrors",
130
+ matches: [
131
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false]
132
+ ]
133
+ )
134
+ transcoder.transcode request_pb
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
140
+ end
141
+ end
142
+ end
@@ -0,0 +1,53 @@
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 "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/chronicle/v1/version"
24
+
25
+ require "google/cloud/chronicle/v1/rule_execution_error_service/credentials"
26
+ require "google/cloud/chronicle/v1/rule_execution_error_service/paths"
27
+ require "google/cloud/chronicle/v1/rule_execution_error_service/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Chronicle
32
+ module V1
33
+ ##
34
+ # RuleExecutionErrorService contains endpoints related to rule execution
35
+ # errors.
36
+ #
37
+ # To load this service and instantiate a REST client:
38
+ #
39
+ # require "google/cloud/chronicle/v1/rule_execution_error_service/rest"
40
+ # client = ::Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Rest::Client.new
41
+ #
42
+ module RuleExecutionErrorService
43
+ # Client for the REST transport
44
+ module Rest
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+
52
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
53
+ require "google/cloud/chronicle/v1/rule_execution_error_service/rest/helpers" if ::File.file? helper_path