google-cloud-chronicle-v1 0.6.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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/chronicle/v1/big_query_export_service/client.rb +2 -0
  4. data/lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb +2 -0
  5. data/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb +2 -0
  6. data/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb +2 -0
  7. data/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb +2 -0
  8. data/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb +2 -0
  9. data/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb +2 -0
  10. data/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb +2 -0
  11. data/lib/google/cloud/chronicle/v1/data_table_service/client.rb +2 -0
  12. data/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb +2 -0
  13. data/lib/google/cloud/chronicle/v1/entity_service/client.rb +2 -0
  14. data/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb +2 -0
  15. data/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb +2 -0
  16. data/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb +2 -0
  17. data/lib/google/cloud/chronicle/v1/instance_service/client.rb +2 -0
  18. data/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb +2 -0
  19. data/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb +2 -0
  20. data/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb +2 -0
  21. data/lib/google/cloud/chronicle/v1/reference_list_pb.rb +4 -1
  22. data/lib/google/cloud/chronicle/v1/reference_list_service/client.rb +106 -0
  23. data/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb +2 -0
  24. data/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb +99 -0
  25. data/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb +62 -0
  26. data/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb +2 -0
  27. data/lib/google/cloud/chronicle/v1/rest.rb +1 -0
  28. data/lib/google/cloud/chronicle/v1/rule_execution_error_pb.rb +30 -0
  29. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/client.rb +522 -0
  30. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/credentials.rb +49 -0
  31. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/paths.rb +52 -0
  32. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/rest/client.rb +472 -0
  33. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/rest/service_stub.rb +142 -0
  34. data/lib/google/cloud/chronicle/v1/rule_execution_error_service/rest.rb +53 -0
  35. data/lib/google/cloud/chronicle/v1/rule_execution_error_service.rb +56 -0
  36. data/lib/google/cloud/chronicle/v1/rule_execution_error_services_pb.rb +46 -0
  37. data/lib/google/cloud/chronicle/v1/rule_pb.rb +3 -1
  38. data/lib/google/cloud/chronicle/v1/rule_service/client.rb +103 -0
  39. data/lib/google/cloud/chronicle/v1/rule_service/credentials.rb +2 -0
  40. data/lib/google/cloud/chronicle/v1/rule_service/operations.rb +2 -0
  41. data/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb +96 -0
  42. data/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb +2 -0
  43. data/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb +62 -0
  44. data/lib/google/cloud/chronicle/v1/rule_services_pb.rb +2 -0
  45. data/lib/google/cloud/chronicle/v1/version.rb +1 -1
  46. data/lib/google/cloud/chronicle/v1.rb +1 -0
  47. data/proto_docs/google/cloud/chronicle/v1/reference_list.rb +43 -0
  48. data/proto_docs/google/cloud/chronicle/v1/rule.rb +27 -0
  49. data/proto_docs/google/cloud/chronicle/v1/rule_execution_error.rb +116 -0
  50. metadata +13 -3
@@ -86,6 +86,11 @@ module Google
86
86
 
87
87
  default_config.rpcs.update_reference_list.timeout = 60.0
88
88
 
89
+ default_config.rpcs.verify_reference_list.timeout = 60.0
90
+ default_config.rpcs.verify_reference_list.retry_policy = {
91
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
92
+ }
93
+
89
94
  default_config
90
95
  end
91
96
  yield @configure if block_given?
@@ -547,6 +552,91 @@ module Google
547
552
  raise ::Google::Cloud::Error.from_error(e)
548
553
  end
549
554
 
555
+ ##
556
+ # VerifyReferenceList validates list content and returns line errors, if any.
557
+ #
558
+ # @overload verify_reference_list(request, options = nil)
559
+ # Pass arguments to `verify_reference_list` via a request object, either of type
560
+ # {::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest} or an equivalent Hash.
561
+ #
562
+ # @param request [::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest, ::Hash]
563
+ # A request object representing the call parameters. Required. To specify no
564
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
565
+ # @param options [::Gapic::CallOptions, ::Hash]
566
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
567
+ #
568
+ # @overload verify_reference_list(instance: nil, syntax_type: nil, entries: nil)
569
+ # Pass arguments to `verify_reference_list` via keyword arguments. Note that at
570
+ # least one keyword argument is required. To specify no parameters, or to keep all
571
+ # the default parameter values, pass an empty Hash as a request object (see above).
572
+ #
573
+ # @param instance [::String]
574
+ # Required. The name of the parent resource, which is the SecOps instance
575
+ # associated with the request. Format:
576
+ # `projects/{project}/locations/{location}/instances/{instance}`
577
+ # @param syntax_type [::Google::Cloud::Chronicle::V1::ReferenceListSyntaxType]
578
+ # Required. Type (format) of list lines.
579
+ # @param entries [::Array<::Google::Cloud::Chronicle::V1::ReferenceListEntry, ::Hash>]
580
+ # Required. The entries of the reference list.
581
+ # Each line may be either an item in the list or a comment.
582
+ # @yield [result, operation] Access the result along with the TransportOperation object
583
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse]
584
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
585
+ #
586
+ # @return [::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse]
587
+ #
588
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
589
+ #
590
+ # @example Basic example
591
+ # require "google/cloud/chronicle/v1"
592
+ #
593
+ # # Create a client object. The client can be reused for multiple calls.
594
+ # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new
595
+ #
596
+ # # Create a request. To set request fields, pass in keyword arguments.
597
+ # request = Google::Cloud::Chronicle::V1::VerifyReferenceListRequest.new
598
+ #
599
+ # # Call the verify_reference_list method.
600
+ # result = client.verify_reference_list request
601
+ #
602
+ # # The returned object is of type Google::Cloud::Chronicle::V1::VerifyReferenceListResponse.
603
+ # p result
604
+ #
605
+ def verify_reference_list request, options = nil
606
+ raise ::ArgumentError, "request must be provided" if request.nil?
607
+
608
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest
609
+
610
+ # Converts hash and nil to an options object
611
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
612
+
613
+ # Customize the options with defaults
614
+ call_metadata = @config.rpcs.verify_reference_list.metadata.to_h
615
+
616
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
617
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
618
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
619
+ gapic_version: ::Google::Cloud::Chronicle::V1::VERSION,
620
+ transports_version_send: [:rest]
621
+
622
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
623
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
624
+
625
+ options.apply_defaults timeout: @config.rpcs.verify_reference_list.timeout,
626
+ metadata: call_metadata,
627
+ retry_policy: @config.rpcs.verify_reference_list.retry_policy
628
+
629
+ options.apply_defaults timeout: @config.timeout,
630
+ metadata: @config.metadata,
631
+ retry_policy: @config.retry_policy
632
+
633
+ @reference_list_service_stub.verify_reference_list request, options do |result, operation|
634
+ yield result, operation if block_given?
635
+ end
636
+ rescue ::Gapic::Rest::Error => e
637
+ raise ::Google::Cloud::Error.from_error(e)
638
+ end
639
+
550
640
  ##
551
641
  # Configuration class for the ReferenceListService REST API.
552
642
  #
@@ -617,6 +707,7 @@ module Google
617
707
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
618
708
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
619
709
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
710
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
620
711
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
621
712
  # trigger a retry.
622
713
  # @return [::Hash]
@@ -689,6 +780,7 @@ module Google
689
780
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
690
781
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
691
782
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
783
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
692
784
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
693
785
  # trigger a retry.
694
786
  #
@@ -713,6 +805,11 @@ module Google
713
805
  # @return [::Gapic::Config::Method]
714
806
  #
715
807
  attr_reader :update_reference_list
808
+ ##
809
+ # RPC-specific configuration for `verify_reference_list`
810
+ # @return [::Gapic::Config::Method]
811
+ #
812
+ attr_reader :verify_reference_list
716
813
 
717
814
  # @private
718
815
  def initialize parent_rpcs = nil
@@ -724,6 +821,8 @@ module Google
724
821
  @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config
725
822
  update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list
726
823
  @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config
824
+ verify_reference_list_config = parent_rpcs.verify_reference_list if parent_rpcs.respond_to? :verify_reference_list
825
+ @verify_reference_list = ::Gapic::Config::Method.new verify_reference_list_config
727
826
 
728
827
  yield self if block_given?
729
828
  end
@@ -233,6 +233,46 @@ module Google
233
233
  end
234
234
  end
235
235
 
236
+ ##
237
+ # Baseline implementation for the verify_reference_list REST call
238
+ #
239
+ # @param request_pb [::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest]
240
+ # A request object representing the call parameters. Required.
241
+ # @param options [::Gapic::CallOptions]
242
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
243
+ #
244
+ # @yield [result, operation] Access the result along with the TransportOperation object
245
+ # @yieldparam result [::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse]
246
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
247
+ #
248
+ # @return [::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse]
249
+ # A result object deserialized from the server's reply
250
+ def verify_reference_list request_pb, options = nil
251
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
252
+
253
+ verb, uri, query_string_params, body = ServiceStub.transcode_verify_reference_list_request request_pb
254
+ query_string_params = if query_string_params.any?
255
+ query_string_params.to_h { |p| p.split "=", 2 }
256
+ else
257
+ {}
258
+ end
259
+
260
+ response = @client_stub.make_http_request(
261
+ verb,
262
+ uri: uri,
263
+ body: body || "",
264
+ params: query_string_params,
265
+ method_name: "verify_reference_list",
266
+ options: options
267
+ )
268
+ operation = ::Gapic::Rest::TransportOperation.new response
269
+ result = ::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse.decode_json response.body, ignore_unknown_fields: true
270
+ catch :response do
271
+ yield result, operation if block_given?
272
+ result
273
+ end
274
+ end
275
+
236
276
  ##
237
277
  # @private
238
278
  #
@@ -318,6 +358,28 @@ module Google
318
358
  )
319
359
  transcoder.transcode request_pb
320
360
  end
361
+
362
+ ##
363
+ # @private
364
+ #
365
+ # GRPC transcoding helper method for the verify_reference_list REST call
366
+ #
367
+ # @param request_pb [::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest]
368
+ # A request object representing the call parameters. Required.
369
+ # @return [Array(String, [String, nil], Hash{String => String})]
370
+ # Uri, Body, Query string parameters
371
+ def self.transcode_verify_reference_list_request request_pb
372
+ transcoder = Gapic::Rest::GrpcTranscoder.new
373
+ .with_bindings(
374
+ uri_method: :post,
375
+ uri_template: "/v1/{instance}:verifyReferenceList",
376
+ body: "*",
377
+ matches: [
378
+ ["instance", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false]
379
+ ]
380
+ )
381
+ transcoder.transcode request_pb
382
+ end
321
383
  end
322
384
  end
323
385
  end
@@ -41,6 +41,8 @@ module Google
41
41
  rpc :CreateReferenceList, ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList
42
42
  # Updates an existing reference list.
43
43
  rpc :UpdateReferenceList, ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList
44
+ # VerifyReferenceList validates list content and returns line errors, if any.
45
+ rpc :VerifyReferenceList, ::Google::Cloud::Chronicle::V1::VerifyReferenceListRequest, ::Google::Cloud::Chronicle::V1::VerifyReferenceListResponse
44
46
  end
45
47
 
46
48
  Stub = Service.rpc_stub_class
@@ -27,6 +27,7 @@ require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/res
27
27
  require "google/cloud/chronicle/v1/instance_service/rest"
28
28
  require "google/cloud/chronicle/v1/reference_list_service/rest"
29
29
  require "google/cloud/chronicle/v1/rule_service/rest"
30
+ require "google/cloud/chronicle/v1/rule_execution_error_service/rest"
30
31
  require "google/cloud/chronicle/v1/version"
31
32
 
32
33
  module Google
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/chronicle/v1/rule_execution_error.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
11
+ require 'google/rpc/status_pb'
12
+ require 'google/type/interval_pb'
13
+
14
+
15
+ descriptor_data = "\n4google/cloud/chronicle/v1/rule_execution_error.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\x1a\x1agoogle/type/interval.proto\"\x9c\x01\n\x1eListRuleExecutionErrorsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+chronicle.googleapis.com/RuleExecutionError\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x88\x01\n\x1fListRuleExecutionErrorsResponse\x12L\n\x15rule_execution_errors\x18\x01 \x03(\x0b\x32-.google.cloud.chronicle.v1.RuleExecutionError\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa3\x03\n\x12RuleExecutionError\x12\x35\n\x04rule\x18\x04 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/RuleH\x00\x12\x44\n\x0c\x63urated_rule\x18\x05 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$chronicle.googleapis.com/CuratedRuleH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12.\n\ntime_range\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03:\x9a\x01\xea\x41\x96\x01\n+chronicle.googleapis.com/RuleExecutionError\x12gprojects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}B\x08\n\x06source2\xb1\x03\n\x19RuleExecutionErrorService\x12\xe6\x01\n\x17ListRuleExecutionErrors\x12\x39.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest\x1a:.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/instances/*}/ruleExecutionErrors\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xd0\x02\n\x1d\x63om.google.cloud.chronicle.v1B\x17RuleExecutionErrorProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1\xea\x41\x7f\n$chronicle.googleapis.com/CuratedRule\x12Wprojects/{project}/locations/{location}/instances/{instance}/curatedRules/{curatedRule}b\x06proto3"
16
+
17
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
18
+ pool.add_serialized_file(descriptor_data)
19
+
20
+ module Google
21
+ module Cloud
22
+ module Chronicle
23
+ module V1
24
+ ListRuleExecutionErrorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest").msgclass
25
+ ListRuleExecutionErrorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse").msgclass
26
+ RuleExecutionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleExecutionError").msgclass
27
+ end
28
+ end
29
+ end
30
+ end