google-cloud-chronicle 0.2.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f545f0e7924cf78b4c12f4a593450391e328a9b12fc547e299dd931ae4208a8e
4
- data.tar.gz: aa571631907dbf4d65bc9eb33695e1203da14cd6400ef25b52d808a29724024d
3
+ metadata.gz: b67cf867c44baa2839572aab76521897db3b843ed774d9826027c796016783bd
4
+ data.tar.gz: aa00be671bc5a818dd9ffc4df3cc2b41615cc4a7d8c9bbf0cb74c645078bb3fc
5
5
  SHA512:
6
- metadata.gz: 49136559cc75582c2f16d2efcee966798d801ffaf96a42f3f5b4ac5b87bbee6fca5129c877503e1842eead0876ae54b1248c6cedeeafd660cfccde32d23d8af8
7
- data.tar.gz: b9772fcec746d47bdd22091ca84739b15f3f7cafee58d44db15c562161d6a6367e98f4bfd1c33e66a373d1966eabb6b55510ce08ff5160585d9e35267195cdf1
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, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle.
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, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle.
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*`.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Chronicle
23
- VERSION = "0.2.0"
23
+ VERSION = "0.3.0"
24
24
  end
25
25
  end
26
26
  end
@@ -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.2.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, popularly known as the Chronicle
47
- API, serves endpoints that enable security analysts to analyze and mitigate a security
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: []
@@ -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, popularly known as the Chronicle
82
- API, serves endpoints that enable security analysts to analyze and mitigate a security
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: []