google-cloud-chronicle 0.1.1 → 0.3.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 +2 -2
- data/lib/google/cloud/chronicle/version.rb +1 -1
- data/lib/google/cloud/chronicle.rb +70 -0
- metadata +6 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b67cf867c44baa2839572aab76521897db3b843ed774d9826027c796016783bd
|
|
4
|
+
data.tar.gz: aa00be671bc5a818dd9ffc4df3cc2b41615cc4a7d8c9bbf0cb74c645078bb3fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d87a735d12ca017671d264999b10d32331cb0e3895de98f55149f001cc447549d1aea1bd92feea0bcc1ddec08ad8f58cdbbf1a11ffbe4ceefd67cdb93a748400
|
|
7
|
+
data.tar.gz: a91971effc5777980616927923b6579eca20105af3b42e0067d43295d761b59887495ddae3c01e7e12d54bb63d996603b171b9fd5922be0e438ae0b083542177
|
data/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Ruby Client for the Chronicle API
|
|
2
2
|
|
|
3
|
-
The Google Cloud Security Operations API
|
|
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
|
|
5
|
+
The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle.
|
|
6
6
|
|
|
7
7
|
Actual client classes for the various versions of this API are defined in
|
|
8
8
|
_versioned_ client gems, with names of the form `google-cloud-chronicle-v*`.
|
|
@@ -116,6 +116,76 @@ module Google
|
|
|
116
116
|
false
|
|
117
117
|
end
|
|
118
118
|
|
|
119
|
+
##
|
|
120
|
+
# Create a new client object for DataTableService.
|
|
121
|
+
#
|
|
122
|
+
# By default, this returns an instance of
|
|
123
|
+
# [Google::Cloud::Chronicle::V1::DataTableService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest/Google-Cloud-Chronicle-V1-DataTableService-Client)
|
|
124
|
+
# for a gRPC client for version V1 of the API.
|
|
125
|
+
# However, you can specify a different API version by passing it in the
|
|
126
|
+
# `version` parameter. If the DataTableService service is
|
|
127
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
128
|
+
# appropriate versioned client will be returned.
|
|
129
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
130
|
+
# the `transport` parameter.
|
|
131
|
+
#
|
|
132
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
133
|
+
# given API version does not support the given transport of the DataTableService service.
|
|
134
|
+
# You can determine whether the method will succeed by calling
|
|
135
|
+
# {Google::Cloud::Chronicle.data_table_service_available?}.
|
|
136
|
+
#
|
|
137
|
+
# ## About DataTableService
|
|
138
|
+
#
|
|
139
|
+
# DataTableManager provides an interface for managing data tables.
|
|
140
|
+
#
|
|
141
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
142
|
+
# Defaults to `:v1`.
|
|
143
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
144
|
+
# @return [::Object] A client object for the specified version.
|
|
145
|
+
#
|
|
146
|
+
def self.data_table_service version: :v1, transport: :grpc, &block
|
|
147
|
+
require "google/cloud/chronicle/#{version.to_s.downcase}"
|
|
148
|
+
|
|
149
|
+
package_name = Google::Cloud::Chronicle
|
|
150
|
+
.constants
|
|
151
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
152
|
+
.first
|
|
153
|
+
service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:DataTableService)
|
|
154
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
155
|
+
service_module.const_get(:Client).new(&block)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
##
|
|
159
|
+
# Determines whether the DataTableService service is supported by the current client.
|
|
160
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Chronicle.data_table_service}.
|
|
161
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
162
|
+
# API version does not exist or does not support the DataTableService service,
|
|
163
|
+
# or if the versioned client gem needs an update to support the DataTableService service.
|
|
164
|
+
#
|
|
165
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
166
|
+
# Defaults to `:v1`.
|
|
167
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
168
|
+
# @return [boolean] Whether the service is available.
|
|
169
|
+
#
|
|
170
|
+
def self.data_table_service_available? version: :v1, transport: :grpc
|
|
171
|
+
require "google/cloud/chronicle/#{version.to_s.downcase}"
|
|
172
|
+
package_name = Google::Cloud::Chronicle
|
|
173
|
+
.constants
|
|
174
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
175
|
+
.first
|
|
176
|
+
return false unless package_name
|
|
177
|
+
service_module = Google::Cloud::Chronicle.const_get package_name
|
|
178
|
+
return false unless service_module.const_defined? :DataTableService
|
|
179
|
+
service_module = service_module.const_get :DataTableService
|
|
180
|
+
if transport == :rest
|
|
181
|
+
return false unless service_module.const_defined? :Rest
|
|
182
|
+
service_module = service_module.const_get :Rest
|
|
183
|
+
end
|
|
184
|
+
service_module.const_defined? :Client
|
|
185
|
+
rescue ::LoadError
|
|
186
|
+
false
|
|
187
|
+
end
|
|
188
|
+
|
|
119
189
|
##
|
|
120
190
|
# Create a new client object for EntityService.
|
|
121
191
|
#
|
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.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -43,9 +43,8 @@ dependencies:
|
|
|
43
43
|
- - "~>"
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
45
|
version: '1.6'
|
|
46
|
-
description: The Google Cloud Security Operations API
|
|
47
|
-
|
|
48
|
-
threat throughout its lifecycle.
|
|
46
|
+
description: The Google Cloud Security Operations API (Chronicle API) provides endpoints
|
|
47
|
+
that help analysts investigate and mitigate security threats throughout their lifecycle.
|
|
49
48
|
email: googleapis-packages@google.com
|
|
50
49
|
executables: []
|
|
51
50
|
extensions: []
|
|
@@ -69,7 +68,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
69
68
|
requirements:
|
|
70
69
|
- - ">="
|
|
71
70
|
- !ruby/object:Gem::Version
|
|
72
|
-
version: '3.
|
|
71
|
+
version: '3.2'
|
|
73
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
73
|
requirements:
|
|
75
74
|
- - ">="
|
|
@@ -78,7 +77,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
78
77
|
requirements: []
|
|
79
78
|
rubygems_version: 3.6.9
|
|
80
79
|
specification_version: 4
|
|
81
|
-
summary: The Google Cloud Security Operations API
|
|
82
|
-
|
|
83
|
-
threat throughout its lifecycle.
|
|
80
|
+
summary: The Google Cloud Security Operations API (Chronicle API) provides endpoints
|
|
81
|
+
that help analysts investigate and mitigate security threats throughout their lifecycle.
|
|
84
82
|
test_files: []
|