google-cloud-chronicle 1.0.1 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04062e1d0401b71fc867d5f6b4d133d803f53310002414a67aa9f897f7e91560
4
- data.tar.gz: 8489862f33c795970453d5bc2653332b15f86ec58927dfc673a8a9d0330943b0
3
+ metadata.gz: fafa7b5b5c5dc4f973df1defdd4f2e6ab9d4cf45258150288b2a438c3f040ed7
4
+ data.tar.gz: '026795e9385bd4428a32bb16aeaac8967fd445fe25dc4d01790942461ad0876b'
5
5
  SHA512:
6
- metadata.gz: 63413dea891ef3a10e9340d038d2dd7e3dcaab7723b226b85ab2bf61da1ea089badbabe0545e545fe5c6f29257df3fdf1cec805404a8c78b9e79a32723488b29
7
- data.tar.gz: 9cf5cfab48f199558b1d9d9fc007e50e7ca6ee00162f31ba8cab20f9203b35516be6ef11c2a703e3a39b2e69016a8d4b3814ceea679873de8770c344dfc65bb2
6
+ metadata.gz: '082f74520d645c0937ab0ab225c637b4318042faf50cf8db4b4adf00843d571f15a2551b1ba49732d15f650ac38e8c1252a44924a94574fcf4d05e4a12bb00d6'
7
+ data.tar.gz: 4c332211822e827926101cdaf39964ccec259949d165e5e7ab1c663b6a725117d7ca630a65e6642bfd12ac82853f05ee0c8c49957f036ccb1cf75c4e7cb1c657
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle.
4
4
 
5
- The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle.
6
5
 
7
6
  Actual client classes for the various versions of this API are defined in
8
7
  _versioned_ client gems, with names of the form `google-cloud-chronicle-v*`.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Chronicle
23
- VERSION = "1.0.1"
23
+ VERSION = "1.1.0"
24
24
  end
25
25
  end
26
26
  end
@@ -607,6 +607,76 @@ module Google
607
607
  false
608
608
  end
609
609
 
610
+ ##
611
+ # Create a new client object for FeedsService.
612
+ #
613
+ # By default, this returns an instance of
614
+ # [Google::Cloud::Chronicle::V1::FeedsService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest/Google-Cloud-Chronicle-V1-FeedsService-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 FeedsService 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 FeedsService service.
625
+ # You can determine whether the method will succeed by calling
626
+ # {Google::Cloud::Chronicle.feeds_service_available?}.
627
+ #
628
+ # ## About FeedsService
629
+ #
630
+ # FeedsService contains procedures for managing Chronicle third-party feeds.
631
+ #
632
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
633
+ # Defaults to `:v1`.
634
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
635
+ # @return [::Object] A client object for the specified version.
636
+ #
637
+ def self.feeds_service version: :v1, transport: :grpc, &block
638
+ require "google/cloud/chronicle/#{version.to_s.downcase}"
639
+
640
+ package_name = Google::Cloud::Chronicle
641
+ .constants
642
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
643
+ .first
644
+ service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:FeedsService)
645
+ service_module = service_module.const_get(:Rest) if transport == :rest
646
+ service_module.const_get(:Client).new(&block)
647
+ end
648
+
649
+ ##
650
+ # Determines whether the FeedsService service is supported by the current client.
651
+ # If true, you can retrieve a client object by calling {Google::Cloud::Chronicle.feeds_service}.
652
+ # If false, that method will raise an exception. This could happen if the given
653
+ # API version does not exist or does not support the FeedsService service,
654
+ # or if the versioned client gem needs an update to support the FeedsService service.
655
+ #
656
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
657
+ # Defaults to `:v1`.
658
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
659
+ # @return [boolean] Whether the service is available.
660
+ #
661
+ def self.feeds_service_available? version: :v1, transport: :grpc
662
+ require "google/cloud/chronicle/#{version.to_s.downcase}"
663
+ package_name = Google::Cloud::Chronicle
664
+ .constants
665
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
666
+ .first
667
+ return false unless package_name
668
+ service_module = Google::Cloud::Chronicle.const_get package_name
669
+ return false unless service_module.const_defined? :FeedsService
670
+ service_module = service_module.const_get :FeedsService
671
+ if transport == :rest
672
+ return false unless service_module.const_defined? :Rest
673
+ service_module = service_module.const_get :Rest
674
+ end
675
+ service_module.const_defined? :Client
676
+ rescue ::LoadError
677
+ false
678
+ end
679
+
610
680
  ##
611
681
  # Create a new client object for FindingsRefinementService.
612
682
  #
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: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC