google-cloud-chronicle 1.0.0 → 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 +4 -4
- data/README.md +0 -1
- data/lib/google/cloud/chronicle/version.rb +1 -1
- data/lib/google/cloud/chronicle.rb +71 -1
- data/lib/google-cloud-chronicle.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fafa7b5b5c5dc4f973df1defdd4f2e6ab9d4cf45258150288b2a438c3f040ed7
|
|
4
|
+
data.tar.gz: '026795e9385bd4428a32bb16aeaac8967fd445fe25dc4d01790942461ad0876b'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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*`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -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
|
#
|