google-cloud-chronicle-v1 1.3.0 → 1.5.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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/chronicle/v1/curated_rule_pb.rb +31 -0
  3. data/lib/google/cloud/chronicle/v1/entity_pb.rb +6 -1
  4. data/lib/google/cloud/chronicle/v1/event_pb.rb +24 -0
  5. data/lib/google/cloud/chronicle/v1/featured_content_rule_pb.rb +33 -0
  6. data/lib/google/cloud/chronicle/v1/featured_content_rule_service/client.rb +540 -0
  7. data/lib/google/cloud/chronicle/v1/featured_content_rule_service/credentials.rb +49 -0
  8. data/lib/google/cloud/chronicle/v1/featured_content_rule_service/paths.rb +52 -0
  9. data/lib/google/cloud/chronicle/v1/featured_content_rule_service/rest/client.rb +490 -0
  10. data/lib/google/cloud/chronicle/v1/featured_content_rule_service/rest/service_stub.rb +142 -0
  11. data/lib/google/cloud/chronicle/v1/featured_content_rule_service/rest.rb +53 -0
  12. data/lib/google/cloud/chronicle/v1/featured_content_rule_service.rb +56 -0
  13. data/lib/google/cloud/chronicle/v1/featured_content_rule_services_pb.rb +46 -0
  14. data/lib/google/cloud/chronicle/v1/rest.rb +3 -1
  15. data/lib/google/cloud/chronicle/v1/rule_execution_error_pb.rb +1 -1
  16. data/lib/google/cloud/chronicle/v1/search_pb.rb +64 -0
  17. data/lib/google/cloud/chronicle/v1/search_service/client.rb +643 -0
  18. data/lib/google/cloud/chronicle/v1/search_service/credentials.rb +49 -0
  19. data/lib/google/cloud/chronicle/v1/search_service/operations.rb +843 -0
  20. data/lib/google/cloud/chronicle/v1/search_service/paths.rb +94 -0
  21. data/lib/google/cloud/chronicle/v1/search_service/rest/client.rb +586 -0
  22. data/lib/google/cloud/chronicle/v1/search_service/rest/operations.rb +927 -0
  23. data/lib/google/cloud/chronicle/v1/search_service/rest/service_stub.rb +204 -0
  24. data/lib/google/cloud/chronicle/v1/search_service/rest.rb +53 -0
  25. data/lib/google/cloud/chronicle/v1/search_service.rb +56 -0
  26. data/lib/google/cloud/chronicle/v1/search_services_pb.rb +47 -0
  27. data/lib/google/cloud/chronicle/v1/simulated_data_pb.rb +21 -0
  28. data/lib/google/cloud/chronicle/v1/version.rb +1 -1
  29. data/lib/google/cloud/chronicle/v1.rb +3 -1
  30. data/proto_docs/backstory/collection.rb +371 -0
  31. data/proto_docs/backstory/data_access.rb +59 -0
  32. data/proto_docs/backstory/entity.rb +639 -0
  33. data/proto_docs/backstory/entity_risk.rb +98 -0
  34. data/proto_docs/backstory/id.rb +73 -0
  35. data/proto_docs/backstory/udm.rb +7008 -0
  36. data/proto_docs/google/cloud/chronicle/v1/curated_rule.rb +117 -0
  37. data/proto_docs/google/cloud/chronicle/v1/entity.rb +38 -0
  38. data/proto_docs/google/cloud/chronicle/v1/event.rb +42 -0
  39. data/proto_docs/google/cloud/chronicle/v1/featured_content_rule.rb +208 -0
  40. data/proto_docs/google/cloud/chronicle/v1/search.rb +593 -0
  41. data/proto_docs/google/cloud/chronicle/v1/simulated_data.rb +40 -0
  42. data/proto_docs/google/protobuf/struct.rb +108 -0
  43. data/proto_docs/google/type/latlng.rb +38 -0
  44. metadata +57 -1
@@ -0,0 +1,540 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/chronicle/v1/featured_content_rule_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Chronicle
25
+ module V1
26
+ module FeaturedContentRuleService
27
+ ##
28
+ # Client for the FeaturedContentRuleService service.
29
+ #
30
+ # This service provides functionality for managing
31
+ # FeaturedContentRule.
32
+ #
33
+ class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$"
39
+
40
+ include Paths
41
+
42
+ # @private
43
+ attr_reader :featured_content_rule_service_stub
44
+
45
+ ##
46
+ # Configure the FeaturedContentRuleService Client class.
47
+ #
48
+ # See {::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all FeaturedContentRuleService clients
54
+ # ::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Cloud", "Chronicle", "V1"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.rpcs.list_featured_content_rules.timeout = 60.0
75
+ default_config.rpcs.list_featured_content_rules.retry_policy = {
76
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
77
+ }
78
+
79
+ default_config
80
+ end
81
+ yield @configure if block_given?
82
+ @configure
83
+ end
84
+
85
+ ##
86
+ # Configure the FeaturedContentRuleService Client instance.
87
+ #
88
+ # The configuration is set to the derived mode, meaning that values can be changed,
89
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
90
+ # should be made on {Client.configure}.
91
+ #
92
+ # See {::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client::Configuration}
93
+ # for a description of the configuration fields.
94
+ #
95
+ # @yield [config] Configure the Client client.
96
+ # @yieldparam config [Client::Configuration]
97
+ #
98
+ # @return [Client::Configuration]
99
+ #
100
+ def configure
101
+ yield @config if block_given?
102
+ @config
103
+ end
104
+
105
+ ##
106
+ # The effective universe domain
107
+ #
108
+ # @return [String]
109
+ #
110
+ def universe_domain
111
+ @featured_content_rule_service_stub.universe_domain
112
+ end
113
+
114
+ ##
115
+ # Create a new FeaturedContentRuleService client object.
116
+ #
117
+ # @example
118
+ #
119
+ # # Create a client using the default configuration
120
+ # client = ::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client.new
121
+ #
122
+ # # Create a client using a custom configuration
123
+ # client = ::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client.new do |config|
124
+ # config.timeout = 10.0
125
+ # end
126
+ #
127
+ # @yield [config] Configure the FeaturedContentRuleService client.
128
+ # @yieldparam config [Client::Configuration]
129
+ #
130
+ def initialize
131
+ # These require statements are intentionally placed here to initialize
132
+ # the gRPC module only when it's required.
133
+ # See https://github.com/googleapis/toolkit/issues/446
134
+ require "gapic/grpc"
135
+ require "google/cloud/chronicle/v1/featured_content_rule_services_pb"
136
+
137
+ # Create the configuration object
138
+ @config = Configuration.new Client.configure
139
+
140
+ # Yield the configuration if needed
141
+ yield @config if block_given?
142
+
143
+ # Create credentials
144
+ credentials = @config.credentials
145
+ # Use self-signed JWT if the endpoint is unchanged from default,
146
+ # but only if the default endpoint does not have a region prefix.
147
+ enable_self_signed_jwt = @config.endpoint.nil? ||
148
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
149
+ !@config.endpoint.split(".").first.include?("-"))
150
+ credentials ||= Credentials.default scope: @config.scope,
151
+ enable_self_signed_jwt: enable_self_signed_jwt
152
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
153
+ credentials = Credentials.new credentials, scope: @config.scope
154
+ end
155
+ @quota_project_id = @config.quota_project
156
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
157
+
158
+ @featured_content_rule_service_stub = ::Gapic::ServiceStub.new(
159
+ ::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Stub,
160
+ credentials: credentials,
161
+ endpoint: @config.endpoint,
162
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
+ universe_domain: @config.universe_domain,
164
+ channel_args: @config.channel_args,
165
+ interceptors: @config.interceptors,
166
+ channel_pool_config: @config.channel_pool,
167
+ logger: @config.logger
168
+ )
169
+
170
+ @featured_content_rule_service_stub.stub_logger&.info do |entry|
171
+ entry.set_system_name
172
+ entry.set_service
173
+ entry.message = "Created client for #{entry.service}"
174
+ entry.set_credentials_fields credentials
175
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
176
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
177
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
178
+ end
179
+ end
180
+
181
+ ##
182
+ # The logger used for request/response debug logging.
183
+ #
184
+ # @return [Logger]
185
+ #
186
+ def logger
187
+ @featured_content_rule_service_stub.logger
188
+ end
189
+
190
+ # Service calls
191
+
192
+ ##
193
+ # Lists FeaturedContentRules
194
+ #
195
+ # @overload list_featured_content_rules(request, options = nil)
196
+ # Pass arguments to `list_featured_content_rules` via a request object, either of type
197
+ # {::Google::Cloud::Chronicle::V1::ListFeaturedContentRulesRequest} or an equivalent Hash.
198
+ #
199
+ # @param request [::Google::Cloud::Chronicle::V1::ListFeaturedContentRulesRequest, ::Hash]
200
+ # A request object representing the call parameters. Required. To specify no
201
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
202
+ # @param options [::Gapic::CallOptions, ::Hash]
203
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
204
+ #
205
+ # @overload list_featured_content_rules(parent: nil, page_size: nil, page_token: nil, filter: nil)
206
+ # Pass arguments to `list_featured_content_rules` via keyword arguments. Note that at
207
+ # least one keyword argument is required. To specify no parameters, or to keep all
208
+ # the default parameter values, pass an empty Hash as a request object (see above).
209
+ #
210
+ # @param parent [::String]
211
+ # Required. The parent which owns this collection of FeaturedContentRules.
212
+ # Format:
213
+ # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub
214
+ # @param page_size [::Integer]
215
+ # Optional. The maximum number of featured contents to return. The service
216
+ # may return fewer than this value. If unspecified, at most 100 featured
217
+ # contents will be returned. The maximum value is 1000; values above 1000
218
+ # will be coerced to 100.
219
+ # @param page_token [::String]
220
+ # Optional. A page token, received from a previous `ListFeaturedContentRules`
221
+ # call. Provide this to retrieve the subsequent page.
222
+ # @param filter [::String]
223
+ # Optional. Only the following filters are allowed:
224
+ # Under HAS operator: Filtering through category names:
225
+ # - Singular: `category_name:"<category_name>"`
226
+ # - Multiple: `category_name:"<category_name1>" OR
227
+ # category_name:"<category_name2>"`
228
+ # -- You can only use OR operator between multiple category_name filters.
229
+ #
230
+ # Filtering through policy names:
231
+ # - Singular: `policy_name:"<policy_name>"`
232
+ # - Multiple: `policy_name:"<policy_name1>" OR
233
+ # policy_name:"<policy_name2>"`
234
+ # -- You can only use OR operator between multiple policy_name filters.
235
+ #
236
+ # Filtering through rule IDs:
237
+ # - Singular: `rule_id:"ur_<id>"`
238
+ # - Multiple: `rule_id:"ur_<rule_id1>" OR rule_id:"ur_<rule_id2>"`
239
+ # -- You can only use OR operator between multiple rule_id filters.
240
+ #
241
+ # Filtering through rule precision: `rule_precision:"<rule_precision>"`
242
+ # -- Rule precision values can be "Precise" or "Broad". If something else
243
+ # is passed, the rule precision will default to "Unknown". You can only
244
+ # filter by one rule precision value.
245
+ #
246
+ # Under MATCHES_REGEXP operator: Search through rule name or description
247
+ # (behaves like a string contains): This search is case-insensitive and
248
+ # filters through the rule metadata, specifically the rule_name and
249
+ # description keys. `search_rule_name_or_description=~"<rule_name> or
250
+ # <rule_description>"`. You can only filter by one rule name or description
251
+ # value.
252
+ #
253
+ # Multiple filters can also be used together:
254
+ # Ex 1: `category_name:"<category_name>" AND policy_name:"<policy_name>"`
255
+ # Ex 2: Since category_name and policy_name are repeated fields, we can also
256
+ # use multiple values for each:
257
+ # `(category_name:"<category_name1>" OR category_name:"<category_name2>")
258
+ # AND policy_name:"<policy_name>"`
259
+ # -- Note that the AND operator has higher precedence than the OR operator.
260
+ # Additionally, parentheses must be used to create a valid filter.
261
+ #
262
+ # Requests using filter comparators other than HAS(:) or MATCHES_REGEXP(=~)
263
+ # will result in an InvalidArgument error.
264
+ #
265
+ # @yield [response, operation] Access the result along with the RPC operation
266
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>]
267
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
268
+ #
269
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>]
270
+ #
271
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
272
+ #
273
+ # @example Basic example
274
+ # require "google/cloud/chronicle/v1"
275
+ #
276
+ # # Create a client object. The client can be reused for multiple calls.
277
+ # client = Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client.new
278
+ #
279
+ # # Create a request. To set request fields, pass in keyword arguments.
280
+ # request = Google::Cloud::Chronicle::V1::ListFeaturedContentRulesRequest.new
281
+ #
282
+ # # Call the list_featured_content_rules method.
283
+ # result = client.list_featured_content_rules request
284
+ #
285
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
286
+ # # over elements, and API calls will be issued to fetch pages as needed.
287
+ # result.each do |item|
288
+ # # Each element is of type ::Google::Cloud::Chronicle::V1::FeaturedContentRule.
289
+ # p item
290
+ # end
291
+ #
292
+ def list_featured_content_rules request, options = nil
293
+ raise ::ArgumentError, "request must be provided" if request.nil?
294
+
295
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListFeaturedContentRulesRequest
296
+
297
+ # Converts hash and nil to an options object
298
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
299
+
300
+ # Customize the options with defaults
301
+ metadata = @config.rpcs.list_featured_content_rules.metadata.to_h
302
+
303
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
304
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
305
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
306
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
307
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
308
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
309
+
310
+ header_params = {}
311
+ if request.parent
312
+ header_params["parent"] = request.parent
313
+ end
314
+
315
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
316
+ metadata[:"x-goog-request-params"] ||= request_params_header
317
+
318
+ options.apply_defaults timeout: @config.rpcs.list_featured_content_rules.timeout,
319
+ metadata: metadata,
320
+ retry_policy: @config.rpcs.list_featured_content_rules.retry_policy
321
+
322
+ options.apply_defaults timeout: @config.timeout,
323
+ metadata: @config.metadata,
324
+ retry_policy: @config.retry_policy
325
+
326
+ @featured_content_rule_service_stub.call_rpc :list_featured_content_rules, request, options: options do |response, operation|
327
+ response = ::Gapic::PagedEnumerable.new @featured_content_rule_service_stub, :list_featured_content_rules, request, response, operation, options
328
+ yield response, operation if block_given?
329
+ throw :response, response
330
+ end
331
+ rescue ::GRPC::BadStatus => e
332
+ raise ::Google::Cloud::Error.from_error(e)
333
+ end
334
+
335
+ ##
336
+ # Configuration class for the FeaturedContentRuleService API.
337
+ #
338
+ # This class represents the configuration for FeaturedContentRuleService,
339
+ # providing control over timeouts, retry behavior, logging, transport
340
+ # parameters, and other low-level controls. Certain parameters can also be
341
+ # applied individually to specific RPCs. See
342
+ # {::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client::Configuration::Rpcs}
343
+ # for a list of RPCs that can be configured independently.
344
+ #
345
+ # Configuration can be applied globally to all clients, or to a single client
346
+ # on construction.
347
+ #
348
+ # @example
349
+ #
350
+ # # Modify the global config, setting the timeout for
351
+ # # list_featured_content_rules to 20 seconds,
352
+ # # and all remaining timeouts to 10 seconds.
353
+ # ::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client.configure do |config|
354
+ # config.timeout = 10.0
355
+ # config.rpcs.list_featured_content_rules.timeout = 20.0
356
+ # end
357
+ #
358
+ # # Apply the above configuration only to a new client.
359
+ # client = ::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client.new do |config|
360
+ # config.timeout = 10.0
361
+ # config.rpcs.list_featured_content_rules.timeout = 20.0
362
+ # end
363
+ #
364
+ # @!attribute [rw] endpoint
365
+ # A custom service endpoint, as a hostname or hostname:port. The default is
366
+ # nil, indicating to use the default endpoint in the current universe domain.
367
+ # @return [::String,nil]
368
+ # @!attribute [rw] credentials
369
+ # Credentials to send with calls. You may provide any of the following types:
370
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
371
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
372
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
373
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
374
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
375
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
376
+ # * (`nil`) indicating no credentials
377
+ #
378
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
379
+ # is deprecated. Providing an unvalidated credential configuration to
380
+ # Google APIs can compromise the security of your systems and data.
381
+ #
382
+ # @example
383
+ #
384
+ # # The recommended way to provide credentials is to use the `make_creds` method
385
+ # # on the appropriate credentials class for your environment.
386
+ #
387
+ # require "googleauth"
388
+ #
389
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
390
+ # json_key_io: ::File.open("/path/to/keyfile.json")
391
+ # )
392
+ #
393
+ # client = ::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Client.new do |config|
394
+ # config.credentials = credentials
395
+ # end
396
+ #
397
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
398
+ # external source for authentication to Google Cloud, you must validate it before
399
+ # providing it to a Google API client library. Providing an unvalidated credential
400
+ # configuration to Google APIs can compromise the security of your systems and data.
401
+ # For more information, refer to [Validate credential configurations from external
402
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
403
+ # @return [::Object]
404
+ # @!attribute [rw] scope
405
+ # The OAuth scopes
406
+ # @return [::Array<::String>]
407
+ # @!attribute [rw] lib_name
408
+ # The library name as recorded in instrumentation and logging
409
+ # @return [::String]
410
+ # @!attribute [rw] lib_version
411
+ # The library version as recorded in instrumentation and logging
412
+ # @return [::String]
413
+ # @!attribute [rw] channel_args
414
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
415
+ # `GRPC::Core::Channel` object is provided as the credential.
416
+ # @return [::Hash]
417
+ # @!attribute [rw] interceptors
418
+ # An array of interceptors that are run before calls are executed.
419
+ # @return [::Array<::GRPC::ClientInterceptor>]
420
+ # @!attribute [rw] timeout
421
+ # The call timeout in seconds.
422
+ # @return [::Numeric]
423
+ # @!attribute [rw] metadata
424
+ # Additional gRPC headers to be sent with the call.
425
+ # @return [::Hash{::Symbol=>::String}]
426
+ # @!attribute [rw] retry_policy
427
+ # The retry policy. The value is a hash with the following keys:
428
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
429
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
430
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
431
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
432
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
433
+ # trigger a retry.
434
+ # @return [::Hash]
435
+ # @!attribute [rw] quota_project
436
+ # A separate project against which to charge quota.
437
+ # @return [::String]
438
+ # @!attribute [rw] universe_domain
439
+ # The universe domain within which to make requests. This determines the
440
+ # default endpoint URL. The default value of nil uses the environment
441
+ # universe (usually the default "googleapis.com" universe).
442
+ # @return [::String,nil]
443
+ # @!attribute [rw] logger
444
+ # A custom logger to use for request/response debug logging, or the value
445
+ # `:default` (the default) to construct a default logger, or `nil` to
446
+ # explicitly disable logging.
447
+ # @return [::Logger,:default,nil]
448
+ #
449
+ class Configuration
450
+ extend ::Gapic::Config
451
+
452
+ # @private
453
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
454
+ DEFAULT_ENDPOINT = "chronicle.googleapis.com"
455
+
456
+ config_attr :endpoint, nil, ::String, nil
457
+ config_attr :credentials, nil do |value|
458
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
459
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
460
+ allowed.any? { |klass| klass === value }
461
+ end
462
+ config_attr :scope, nil, ::String, ::Array, nil
463
+ config_attr :lib_name, nil, ::String, nil
464
+ config_attr :lib_version, nil, ::String, nil
465
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
466
+ config_attr :interceptors, nil, ::Array, nil
467
+ config_attr :timeout, nil, ::Numeric, nil
468
+ config_attr :metadata, nil, ::Hash, nil
469
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
470
+ config_attr :quota_project, nil, ::String, nil
471
+ config_attr :universe_domain, nil, ::String, nil
472
+ config_attr :logger, :default, ::Logger, nil, :default
473
+
474
+ # @private
475
+ def initialize parent_config = nil
476
+ @parent_config = parent_config unless parent_config.nil?
477
+
478
+ yield self if block_given?
479
+ end
480
+
481
+ ##
482
+ # Configurations for individual RPCs
483
+ # @return [Rpcs]
484
+ #
485
+ def rpcs
486
+ @rpcs ||= begin
487
+ parent_rpcs = nil
488
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
489
+ Rpcs.new parent_rpcs
490
+ end
491
+ end
492
+
493
+ ##
494
+ # Configuration for the channel pool
495
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
496
+ #
497
+ def channel_pool
498
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
499
+ end
500
+
501
+ ##
502
+ # Configuration RPC class for the FeaturedContentRuleService API.
503
+ #
504
+ # Includes fields providing the configuration for each RPC in this service.
505
+ # Each configuration object is of type `Gapic::Config::Method` and includes
506
+ # the following configuration fields:
507
+ #
508
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
509
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
510
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
511
+ # include the following keys:
512
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
513
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
514
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
515
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
516
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
517
+ # trigger a retry.
518
+ #
519
+ class Rpcs
520
+ ##
521
+ # RPC-specific configuration for `list_featured_content_rules`
522
+ # @return [::Gapic::Config::Method]
523
+ #
524
+ attr_reader :list_featured_content_rules
525
+
526
+ # @private
527
+ def initialize parent_rpcs = nil
528
+ list_featured_content_rules_config = parent_rpcs.list_featured_content_rules if parent_rpcs.respond_to? :list_featured_content_rules
529
+ @list_featured_content_rules = ::Gapic::Config::Method.new list_featured_content_rules_config
530
+
531
+ yield self if block_given?
532
+ end
533
+ end
534
+ end
535
+ end
536
+ end
537
+ end
538
+ end
539
+ end
540
+ end
@@ -0,0 +1,49 @@
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 "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Chronicle
24
+ module V1
25
+ module FeaturedContentRuleService
26
+ # Credentials for the FeaturedContentRuleService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/chronicle",
30
+ "https://www.googleapis.com/auth/chronicle.readonly",
31
+ "https://www.googleapis.com/auth/cloud-platform"
32
+ ]
33
+ self.env_vars = [
34
+ "GOOGLE_CLOUD_CREDENTIALS",
35
+ "GOOGLE_CLOUD_KEYFILE",
36
+ "GCLOUD_KEYFILE",
37
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
38
+ "GOOGLE_CLOUD_KEYFILE_JSON",
39
+ "GCLOUD_KEYFILE_JSON"
40
+ ]
41
+ self.paths = [
42
+ "~/.config/google_cloud/application_default_credentials.json"
43
+ ]
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,52 @@
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
+
20
+ module Google
21
+ module Cloud
22
+ module Chronicle
23
+ module V1
24
+ module FeaturedContentRuleService
25
+ # Path helper methods for the FeaturedContentRuleService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified ContentHub resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/instances/{instance}/contentHub`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param instance [String]
37
+ #
38
+ # @return [::String]
39
+ def content_hub_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}/contentHub"
44
+ end
45
+
46
+ extend self
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end