google-cloud-chronicle 0.5.0 → 0.7.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d7a4083ec0c4a87d24edca8c3f5a53fb38a7273ff8d34d674c8e2293998aedd
4
- data.tar.gz: 336f2441c809da40e7854aa7b61d8a1c4ba1087946a5313529f03512182f2448
3
+ metadata.gz: 79f37ec6f64f24130575ddf6a1299b04ca14286e29f2000c64257d3a4fbbcaed
4
+ data.tar.gz: 9968856552da7e5fda968bc00ffd5574823c57e98c172c60a621112dbd3ce2bc
5
5
  SHA512:
6
- metadata.gz: e1dda9adeb6487348cbc8fb167021fdade1328ec000933ff6756dff207218d352adafc29e4577fb1e23487f785ecd42eb3572e5306aee71ce0e54a5162ad2773
7
- data.tar.gz: a1facfe40eca2e609208bef34aff1044966e3f464333d8be927f6c82dbb569e43ea5aeabac1f222452cd0a1c6789d89196c6e28321ffbf655eee188b7e90a8a5
6
+ metadata.gz: 25ae3d03ae56a379c9fd08fc1c49ebca10e3cb75fd51e73a202a729a5e708c5a6f99b04f171988f3710bb3f00d7daac6324a64abd98a8f42c51af89d448806a0
7
+ data.tar.gz: 71b478f027ad27878ed33834f323d556532afa75dd2797fbf47ea2d8fe815ac8950d27cd5090cf14ecfba72ddd675b44f67cbbc75078ab2e6ca34f6664681b25
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Chronicle
23
- VERSION = "0.5.0"
23
+ VERSION = "0.7.0"
24
24
  end
25
25
  end
26
26
  end
@@ -607,6 +607,78 @@ module Google
607
607
  false
608
608
  end
609
609
 
610
+ ##
611
+ # Create a new client object for FindingsRefinementService.
612
+ #
613
+ # By default, this returns an instance of
614
+ # [Google::Cloud::Chronicle::V1::FindingsRefinementService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest/Google-Cloud-Chronicle-V1-FindingsRefinementService-Client)
615
+ # for a gRPC client for version V1 of the API.
616
+ # However, you can specify a different API version by passing it in the
617
+ # `version` parameter. If the FindingsRefinementService service is
618
+ # supported by that API version, and the corresponding gem is available, the
619
+ # appropriate versioned client will be returned.
620
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
621
+ # the `transport` parameter.
622
+ #
623
+ # Raises an exception if the currently installed versioned client gem for the
624
+ # given API version does not support the given transport of the FindingsRefinementService service.
625
+ # You can determine whether the method will succeed by calling
626
+ # {Google::Cloud::Chronicle.findings_refinement_service_available?}.
627
+ #
628
+ # ## About FindingsRefinementService
629
+ #
630
+ # FindingsRefinementService provides an interface for filtering out
631
+ # findings that are unlikely to be real threats to prevent them
632
+ # from triggering alerts or notifications.
633
+ #
634
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
635
+ # Defaults to `:v1`.
636
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
637
+ # @return [::Object] A client object for the specified version.
638
+ #
639
+ def self.findings_refinement_service version: :v1, transport: :grpc, &block
640
+ require "google/cloud/chronicle/#{version.to_s.downcase}"
641
+
642
+ package_name = Google::Cloud::Chronicle
643
+ .constants
644
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
645
+ .first
646
+ service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:FindingsRefinementService)
647
+ service_module = service_module.const_get(:Rest) if transport == :rest
648
+ service_module.const_get(:Client).new(&block)
649
+ end
650
+
651
+ ##
652
+ # Determines whether the FindingsRefinementService service is supported by the current client.
653
+ # If true, you can retrieve a client object by calling {Google::Cloud::Chronicle.findings_refinement_service}.
654
+ # If false, that method will raise an exception. This could happen if the given
655
+ # API version does not exist or does not support the FindingsRefinementService service,
656
+ # or if the versioned client gem needs an update to support the FindingsRefinementService service.
657
+ #
658
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
659
+ # Defaults to `:v1`.
660
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
661
+ # @return [boolean] Whether the service is available.
662
+ #
663
+ def self.findings_refinement_service_available? version: :v1, transport: :grpc
664
+ require "google/cloud/chronicle/#{version.to_s.downcase}"
665
+ package_name = Google::Cloud::Chronicle
666
+ .constants
667
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
668
+ .first
669
+ return false unless package_name
670
+ service_module = Google::Cloud::Chronicle.const_get package_name
671
+ return false unless service_module.const_defined? :FindingsRefinementService
672
+ service_module = service_module.const_get :FindingsRefinementService
673
+ if transport == :rest
674
+ return false unless service_module.const_defined? :Rest
675
+ service_module = service_module.const_get :Rest
676
+ end
677
+ service_module.const_defined? :Client
678
+ rescue ::LoadError
679
+ false
680
+ end
681
+
610
682
  ##
611
683
  # Create a new client object for InstanceService.
612
684
  #
@@ -817,6 +889,77 @@ module Google
817
889
  false
818
890
  end
819
891
 
892
+ ##
893
+ # Create a new client object for RuleExecutionErrorService.
894
+ #
895
+ # By default, this returns an instance of
896
+ # [Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest/Google-Cloud-Chronicle-V1-RuleExecutionErrorService-Client)
897
+ # for a gRPC client for version V1 of the API.
898
+ # However, you can specify a different API version by passing it in the
899
+ # `version` parameter. If the RuleExecutionErrorService service is
900
+ # supported by that API version, and the corresponding gem is available, the
901
+ # appropriate versioned client will be returned.
902
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
903
+ # the `transport` parameter.
904
+ #
905
+ # Raises an exception if the currently installed versioned client gem for the
906
+ # given API version does not support the given transport of the RuleExecutionErrorService service.
907
+ # You can determine whether the method will succeed by calling
908
+ # {Google::Cloud::Chronicle.rule_execution_error_service_available?}.
909
+ #
910
+ # ## About RuleExecutionErrorService
911
+ #
912
+ # RuleExecutionErrorService contains endpoints related to rule execution
913
+ # errors.
914
+ #
915
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
916
+ # Defaults to `:v1`.
917
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
918
+ # @return [::Object] A client object for the specified version.
919
+ #
920
+ def self.rule_execution_error_service version: :v1, transport: :grpc, &block
921
+ require "google/cloud/chronicle/#{version.to_s.downcase}"
922
+
923
+ package_name = Google::Cloud::Chronicle
924
+ .constants
925
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
926
+ .first
927
+ service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:RuleExecutionErrorService)
928
+ service_module = service_module.const_get(:Rest) if transport == :rest
929
+ service_module.const_get(:Client).new(&block)
930
+ end
931
+
932
+ ##
933
+ # Determines whether the RuleExecutionErrorService service is supported by the current client.
934
+ # If true, you can retrieve a client object by calling {Google::Cloud::Chronicle.rule_execution_error_service}.
935
+ # If false, that method will raise an exception. This could happen if the given
936
+ # API version does not exist or does not support the RuleExecutionErrorService service,
937
+ # or if the versioned client gem needs an update to support the RuleExecutionErrorService service.
938
+ #
939
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
940
+ # Defaults to `:v1`.
941
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
942
+ # @return [boolean] Whether the service is available.
943
+ #
944
+ def self.rule_execution_error_service_available? version: :v1, transport: :grpc
945
+ require "google/cloud/chronicle/#{version.to_s.downcase}"
946
+ package_name = Google::Cloud::Chronicle
947
+ .constants
948
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
949
+ .first
950
+ return false unless package_name
951
+ service_module = Google::Cloud::Chronicle.const_get package_name
952
+ return false unless service_module.const_defined? :RuleExecutionErrorService
953
+ service_module = service_module.const_get :RuleExecutionErrorService
954
+ if transport == :rest
955
+ return false unless service_module.const_defined? :Rest
956
+ service_module = service_module.const_get :Rest
957
+ end
958
+ service_module.const_defined? :Client
959
+ rescue ::LoadError
960
+ false
961
+ end
962
+
820
963
  ##
821
964
  # Configure the google-cloud-chronicle library.
822
965
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-chronicle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC