google-cloud-web_risk-v1beta1 0.1.0 → 0.2.3

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: 987dc9164f65d8778e04e91e45bb22655a11eba0b19a39c34277463870eb647d
4
- data.tar.gz: d7fc49b89a41f0b7062978ae3101dcdd961cfd6737ef5813073bfd255cac47b2
3
+ metadata.gz: ababcbf7d735c5c0f0dc070965c52cfee038f7acd9770cf15ed7ea5d9f15a3d0
4
+ data.tar.gz: 04d6e613df6f7e5ea41b6a2f72208c2450f6095191ecde886fcf52aed9575acd
5
5
  SHA512:
6
- metadata.gz: ae197d8be8a168b37631abb9e93cd3ca5e23e11d6826f20b0dad4ab41ff021703fc8f8e8520afb52c6529574150b977eac92714cf76ae2f2bfceaedf66349dc9
7
- data.tar.gz: 19297494e5840a9cc04dd93f3fe740d5facf182bd008f50046590622a5a00e5e0eb2fbc456c4a357bd4b6bb82267ed161b5d77be148e9b257734ebfc214ec272
6
+ metadata.gz: f1924e6ca4e2d91abec81c9ec285b340269dccc6bbe065a58fc3194b1707f8bdc7e8524c8fdb0672b61d19a91588bdd15064368fb77b435a5375d199faefe39a
7
+ data.tar.gz: c6a220ca7b790427a0da460375d5b626dc3363d1ac884a1d1d60c61c52ee3d23e8e85691df2433363c621bd73e577880b965ec4e9c43783032219a0d13675554
@@ -27,7 +27,7 @@ export WEBRISK_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/web_risk/v1beta1"
29
29
 
30
- client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
30
+ client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
31
31
  ```
32
32
 
33
33
  ## Credential Lookup
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
64
64
 
65
65
  The environment variables that google-cloud-web_risk-v1beta1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- {Google::Cloud::WebRisk::V1beta1::WebRiskService::Credentials}):
67
+ {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Credentials}):
68
68
 
69
69
  1. `WEBRISK_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  2. `WEBRISK_KEYFILE` - Path to JSON file, or JSON contents
@@ -77,7 +77,7 @@ require "google/cloud/web_risk/v1beta1"
77
77
 
78
78
  ENV["WEBRISK_CREDENTIALS"] = "path/to/keyfile.json"
79
79
 
80
- client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
80
+ client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
81
81
  ```
82
82
 
83
83
  ### Configuration
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
88
88
  ```ruby
89
89
  require "google/cloud/web_risk/v1beta1"
90
90
 
91
- client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
91
+ client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
92
92
  config.credentials = "path/to/keyfile.json"
93
93
  end
94
94
  ```
@@ -98,11 +98,11 @@ Or configured globally for all clients:
98
98
  ```ruby
99
99
  require "google/cloud/web_risk/v1beta1"
100
100
 
101
- Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
101
+ ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
102
102
  config.credentials = "path/to/keyfile.json"
103
103
  end
104
104
 
105
- client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
105
+ client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
106
106
  ```
107
107
 
108
108
  ### Cloud SDK
data/README.md CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
18
18
 
19
19
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
20
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/webrisk.googleapis.com)
21
22
  1. {file:AUTHENTICATION.md Set up authentication.}
22
23
 
23
24
  ## Quick Start
@@ -25,7 +26,7 @@ In order to use this library, you first need to go through the following steps:
25
26
  ```ruby
26
27
  require "google/cloud/web_risk/v1beta1"
27
28
 
28
- client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
29
+ client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
29
30
  request = my_create_request
30
31
  response = client.compute_threat_list_diff request
31
32
  ```
@@ -33,6 +34,9 @@ response = client.compute_threat_list_diff request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-web_risk-v1beta1/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/web-risk)
38
+ for general usage information.
39
+
36
40
  ## Enabling Logging
37
41
 
38
42
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -26,7 +26,7 @@ module Google
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
28
  # require "google/cloud/web_risk/v1beta1"
29
- # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
29
+ # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
30
30
  #
31
31
  module V1beta1
32
32
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module WebRisk
23
23
  module V1beta1
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.3"
25
25
  end
26
26
  end
27
27
  end
@@ -36,7 +36,7 @@ module Google
36
36
  # To load this service and instantiate a client:
37
37
  #
38
38
  # require "google/cloud/web_risk/v1beta1/web_risk_service"
39
- # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
39
+ # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
40
40
  #
41
41
  module WebRiskService
42
42
  end
@@ -25,27 +25,27 @@ module Google
25
25
  module V1beta1
26
26
  module WebRiskService
27
27
  ##
28
- # Client for the WebRiskServiceV1Beta1 service.
28
+ # Client for the WebRiskService service.
29
29
  #
30
30
  # Web Risk v1beta1 API defines an interface to detect malicious URLs on your
31
31
  # website and in client applications.
32
32
  #
33
33
  class Client
34
34
  # @private
35
- attr_reader :web_risk_service_v1_beta1_stub
35
+ attr_reader :web_risk_service_stub
36
36
 
37
37
  ##
38
- # Configure the WebRiskServiceV1Beta1 Client class.
38
+ # Configure the WebRiskService Client class.
39
39
  #
40
- # See {Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration}
40
+ # See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration}
41
41
  # for a description of the configuration fields.
42
42
  #
43
43
  # ## Example
44
44
  #
45
- # To modify the configuration for all WebRiskServiceV1Beta1 clients:
45
+ # To modify the configuration for all WebRiskService clients:
46
46
  #
47
- # Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
48
- # config.timeout = 10_000
47
+ # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
48
+ # config.timeout = 10.0
49
49
  # end
50
50
  #
51
51
  # @yield [config] Configure the Client client.
@@ -95,13 +95,13 @@ module Google
95
95
  end
96
96
 
97
97
  ##
98
- # Configure the WebRiskServiceV1Beta1 Client instance.
98
+ # Configure the WebRiskService Client instance.
99
99
  #
100
100
  # The configuration is set to the derived mode, meaning that values can be changed,
101
101
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
102
102
  # should be made on {Client.configure}.
103
103
  #
104
- # See {Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration}
104
+ # See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration}
105
105
  # for a description of the configuration fields.
106
106
  #
107
107
  # @yield [config] Configure the Client client.
@@ -115,23 +115,23 @@ module Google
115
115
  end
116
116
 
117
117
  ##
118
- # Create a new WebRiskServiceV1Beta1 client object.
118
+ # Create a new WebRiskService client object.
119
119
  #
120
120
  # ## Examples
121
121
  #
122
- # To create a new WebRiskServiceV1Beta1 client with the default
122
+ # To create a new WebRiskService client with the default
123
123
  # configuration:
124
124
  #
125
- # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
125
+ # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
126
126
  #
127
- # To create a new WebRiskServiceV1Beta1 client with a custom
127
+ # To create a new WebRiskService client with a custom
128
128
  # configuration:
129
129
  #
130
- # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
131
- # config.timeout = 10_000
130
+ # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
131
+ # config.timeout = 10.0
132
132
  # end
133
133
  #
134
- # @yield [config] Configure the WebRiskServiceV1Beta1 client.
134
+ # @yield [config] Configure the WebRiskService client.
135
135
  # @yieldparam config [Client::Configuration]
136
136
  #
137
137
  def initialize
@@ -153,10 +153,11 @@ module Google
153
153
  if credentials.is_a?(String) || credentials.is_a?(Hash)
154
154
  credentials = Credentials.new credentials, scope: @config.scope
155
155
  end
156
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
156
+ @quota_project_id = @config.quota_project
157
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
157
158
 
158
- @web_risk_service_v1_beta1_stub = Gapic::ServiceStub.new(
159
- Google::Cloud::WebRisk::V1beta1::WebRiskServiceV1Beta1::Stub,
159
+ @web_risk_service_stub = ::Gapic::ServiceStub.new(
160
+ ::Google::Cloud::WebRisk::V1beta1::WebRiskServiceV1Beta1::Stub,
160
161
  credentials: credentials,
161
162
  endpoint: @config.endpoint,
162
163
  channel_args: @config.channel_args,
@@ -171,12 +172,12 @@ module Google
171
172
  #
172
173
  # @overload compute_threat_list_diff(request, options = nil)
173
174
  # Pass arguments to `compute_threat_list_diff` via a request object, either of type
174
- # {Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest} or an equivalent Hash.
175
+ # {::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest} or an equivalent Hash.
175
176
  #
176
- # @param request [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, Hash]
177
+ # @param request [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, ::Hash]
177
178
  # A request object representing the call parameters. Required. To specify no
178
179
  # parameters, or to keep all the default parameter values, pass an empty Hash.
179
- # @param options [Gapic::CallOptions, Hash]
180
+ # @param options [::Gapic::CallOptions, ::Hash]
180
181
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
181
182
  #
182
183
  # @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil)
@@ -184,35 +185,35 @@ module Google
184
185
  # least one keyword argument is required. To specify no parameters, or to keep all
185
186
  # the default parameter values, pass an empty Hash as a request object (see above).
186
187
  #
187
- # @param threat_type [Google::Cloud::WebRisk::V1beta1::ThreatType]
188
+ # @param threat_type [::Google::Cloud::WebRisk::V1beta1::ThreatType]
188
189
  # The ThreatList to update.
189
- # @param version_token [String]
190
+ # @param version_token [::String]
190
191
  # The current version token of the client for the requested list (the
191
192
  # client version that was received from the last successful diff).
192
- # @param constraints [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints, Hash]
193
+ # @param constraints [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints, ::Hash]
193
194
  # Required. The constraints associated with this request.
194
195
  #
195
196
  # @yield [response, operation] Access the result along with the RPC operation
196
- # @yieldparam response [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse]
197
- # @yieldparam operation [GRPC::ActiveCall::Operation]
197
+ # @yieldparam response [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse]
198
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
198
199
  #
199
- # @return [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse]
200
+ # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse]
200
201
  #
201
- # @raise [Google::Cloud::Error] if the RPC is aborted.
202
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
202
203
  #
203
204
  def compute_threat_list_diff request, options = nil
204
- raise ArgumentError, "request must be provided" if request.nil?
205
+ raise ::ArgumentError, "request must be provided" if request.nil?
205
206
 
206
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest
207
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest
207
208
 
208
209
  # Converts hash and nil to an options object
209
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
210
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
210
211
 
211
212
  # Customize the options with defaults
212
213
  metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h
213
214
 
214
215
  # Set x-goog-api-client and x-goog-user-project headers
215
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
216
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
216
217
  lib_name: @config.lib_name, lib_version: @config.lib_version,
217
218
  gapic_version: ::Google::Cloud::WebRisk::V1beta1::VERSION
218
219
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -223,12 +224,12 @@ module Google
223
224
  options.apply_defaults metadata: @config.metadata,
224
225
  retry_policy: @config.retry_policy
225
226
 
226
- @web_risk_service_v1_beta1_stub.call_rpc :compute_threat_list_diff, request, options: options do |response, operation|
227
+ @web_risk_service_stub.call_rpc :compute_threat_list_diff, request, options: options do |response, operation|
227
228
  yield response, operation if block_given?
228
229
  return response
229
230
  end
230
- rescue GRPC::BadStatus => e
231
- raise Google::Cloud::Error.from_error(e)
231
+ rescue ::GRPC::BadStatus => e
232
+ raise ::Google::Cloud::Error.from_error(e)
232
233
  end
233
234
 
234
235
  ##
@@ -236,12 +237,12 @@ module Google
236
237
  #
237
238
  # @overload search_uris(request, options = nil)
238
239
  # Pass arguments to `search_uris` via a request object, either of type
239
- # {Google::Cloud::WebRisk::V1beta1::SearchUrisRequest} or an equivalent Hash.
240
+ # {::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest} or an equivalent Hash.
240
241
  #
241
- # @param request [Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, Hash]
242
+ # @param request [::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, ::Hash]
242
243
  # A request object representing the call parameters. Required. To specify no
243
244
  # parameters, or to keep all the default parameter values, pass an empty Hash.
244
- # @param options [Gapic::CallOptions, Hash]
245
+ # @param options [::Gapic::CallOptions, ::Hash]
245
246
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
246
247
  #
247
248
  # @overload search_uris(uri: nil, threat_types: nil)
@@ -249,32 +250,32 @@ module Google
249
250
  # least one keyword argument is required. To specify no parameters, or to keep all
250
251
  # the default parameter values, pass an empty Hash as a request object (see above).
251
252
  #
252
- # @param uri [String]
253
+ # @param uri [::String]
253
254
  # Required. The URI to be checked for matches.
254
- # @param threat_types [Array<Google::Cloud::WebRisk::V1beta1::ThreatType>]
255
+ # @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
255
256
  # Required. The ThreatLists to search in.
256
257
  #
257
258
  # @yield [response, operation] Access the result along with the RPC operation
258
- # @yieldparam response [Google::Cloud::WebRisk::V1beta1::SearchUrisResponse]
259
- # @yieldparam operation [GRPC::ActiveCall::Operation]
259
+ # @yieldparam response [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse]
260
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
260
261
  #
261
- # @return [Google::Cloud::WebRisk::V1beta1::SearchUrisResponse]
262
+ # @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse]
262
263
  #
263
- # @raise [Google::Cloud::Error] if the RPC is aborted.
264
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
264
265
  #
265
266
  def search_uris request, options = nil
266
- raise ArgumentError, "request must be provided" if request.nil?
267
+ raise ::ArgumentError, "request must be provided" if request.nil?
267
268
 
268
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1beta1::SearchUrisRequest
269
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest
269
270
 
270
271
  # Converts hash and nil to an options object
271
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
272
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
272
273
 
273
274
  # Customize the options with defaults
274
275
  metadata = @config.rpcs.search_uris.metadata.to_h
275
276
 
276
277
  # Set x-goog-api-client and x-goog-user-project headers
277
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
278
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
278
279
  lib_name: @config.lib_name, lib_version: @config.lib_version,
279
280
  gapic_version: ::Google::Cloud::WebRisk::V1beta1::VERSION
280
281
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -285,12 +286,12 @@ module Google
285
286
  options.apply_defaults metadata: @config.metadata,
286
287
  retry_policy: @config.retry_policy
287
288
 
288
- @web_risk_service_v1_beta1_stub.call_rpc :search_uris, request, options: options do |response, operation|
289
+ @web_risk_service_stub.call_rpc :search_uris, request, options: options do |response, operation|
289
290
  yield response, operation if block_given?
290
291
  return response
291
292
  end
292
- rescue GRPC::BadStatus => e
293
- raise Google::Cloud::Error.from_error(e)
293
+ rescue ::GRPC::BadStatus => e
294
+ raise ::Google::Cloud::Error.from_error(e)
294
295
  end
295
296
 
296
297
  ##
@@ -302,12 +303,12 @@ module Google
302
303
  #
303
304
  # @overload search_hashes(request, options = nil)
304
305
  # Pass arguments to `search_hashes` via a request object, either of type
305
- # {Google::Cloud::WebRisk::V1beta1::SearchHashesRequest} or an equivalent Hash.
306
+ # {::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest} or an equivalent Hash.
306
307
  #
307
- # @param request [Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, Hash]
308
+ # @param request [::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, ::Hash]
308
309
  # A request object representing the call parameters. Required. To specify no
309
310
  # parameters, or to keep all the default parameter values, pass an empty Hash.
310
- # @param options [Gapic::CallOptions, Hash]
311
+ # @param options [::Gapic::CallOptions, ::Hash]
311
312
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
312
313
  #
313
314
  # @overload search_hashes(hash_prefix: nil, threat_types: nil)
@@ -315,33 +316,33 @@ module Google
315
316
  # least one keyword argument is required. To specify no parameters, or to keep all
316
317
  # the default parameter values, pass an empty Hash as a request object (see above).
317
318
  #
318
- # @param hash_prefix [String]
319
+ # @param hash_prefix [::String]
319
320
  # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
320
321
  # hash. For JSON requests, this field is base64-encoded.
321
- # @param threat_types [Array<Google::Cloud::WebRisk::V1beta1::ThreatType>]
322
+ # @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
322
323
  # Required. The ThreatLists to search in.
323
324
  #
324
325
  # @yield [response, operation] Access the result along with the RPC operation
325
- # @yieldparam response [Google::Cloud::WebRisk::V1beta1::SearchHashesResponse]
326
- # @yieldparam operation [GRPC::ActiveCall::Operation]
326
+ # @yieldparam response [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse]
327
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
327
328
  #
328
- # @return [Google::Cloud::WebRisk::V1beta1::SearchHashesResponse]
329
+ # @return [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse]
329
330
  #
330
- # @raise [Google::Cloud::Error] if the RPC is aborted.
331
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
331
332
  #
332
333
  def search_hashes request, options = nil
333
- raise ArgumentError, "request must be provided" if request.nil?
334
+ raise ::ArgumentError, "request must be provided" if request.nil?
334
335
 
335
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1beta1::SearchHashesRequest
336
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest
336
337
 
337
338
  # Converts hash and nil to an options object
338
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
339
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
339
340
 
340
341
  # Customize the options with defaults
341
342
  metadata = @config.rpcs.search_hashes.metadata.to_h
342
343
 
343
344
  # Set x-goog-api-client and x-goog-user-project headers
344
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
345
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
345
346
  lib_name: @config.lib_name, lib_version: @config.lib_version,
346
347
  gapic_version: ::Google::Cloud::WebRisk::V1beta1::VERSION
347
348
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -352,22 +353,22 @@ module Google
352
353
  options.apply_defaults metadata: @config.metadata,
353
354
  retry_policy: @config.retry_policy
354
355
 
355
- @web_risk_service_v1_beta1_stub.call_rpc :search_hashes, request, options: options do |response, operation|
356
+ @web_risk_service_stub.call_rpc :search_hashes, request, options: options do |response, operation|
356
357
  yield response, operation if block_given?
357
358
  return response
358
359
  end
359
- rescue GRPC::BadStatus => e
360
- raise Google::Cloud::Error.from_error(e)
360
+ rescue ::GRPC::BadStatus => e
361
+ raise ::Google::Cloud::Error.from_error(e)
361
362
  end
362
363
 
363
364
  ##
364
- # Configuration class for the WebRiskServiceV1Beta1 API.
365
+ # Configuration class for the WebRiskService API.
365
366
  #
366
- # This class represents the configuration for WebRiskServiceV1Beta1,
367
+ # This class represents the configuration for WebRiskService,
367
368
  # providing control over timeouts, retry behavior, logging, transport
368
369
  # parameters, and other low-level controls. Certain parameters can also be
369
370
  # applied individually to specific RPCs. See
370
- # {Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration::Rpcs}
371
+ # {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration::Rpcs}
371
372
  # for a list of RPCs that can be configured independently.
372
373
  #
373
374
  # Configuration can be applied globally to all clients, or to a single client
@@ -378,22 +379,22 @@ module Google
378
379
  # To modify the global config, setting the timeout for compute_threat_list_diff
379
380
  # to 20 seconds, and all remaining timeouts to 10 seconds:
380
381
  #
381
- # Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
382
- # config.timeout = 10_000
383
- # config.rpcs.compute_threat_list_diff.timeout = 20_000
382
+ # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
383
+ # config.timeout = 10.0
384
+ # config.rpcs.compute_threat_list_diff.timeout = 20.0
384
385
  # end
385
386
  #
386
387
  # To apply the above configuration only to a new client:
387
388
  #
388
- # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
389
- # config.timeout = 10_000
390
- # config.rpcs.compute_threat_list_diff.timeout = 20_000
389
+ # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
390
+ # config.timeout = 10.0
391
+ # config.rpcs.compute_threat_list_diff.timeout = 20.0
391
392
  # end
392
393
  #
393
394
  # @!attribute [rw] endpoint
394
395
  # The hostname or hostname:port of the service endpoint.
395
396
  # Defaults to `"webrisk.googleapis.com"`.
396
- # @return [String]
397
+ # @return [::String]
397
398
  # @!attribute [rw] credentials
398
399
  # Credentials to send with calls. You may provide any of the following types:
399
400
  # * (`String`) The path to a service account key file in JSON format
@@ -405,29 +406,29 @@ module Google
405
406
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
406
407
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
407
408
  # * (`nil`) indicating no credentials
408
- # @return [Object]
409
+ # @return [::Object]
409
410
  # @!attribute [rw] scope
410
411
  # The OAuth scopes
411
- # @return [Array<String>]
412
+ # @return [::Array<::String>]
412
413
  # @!attribute [rw] lib_name
413
414
  # The library name as recorded in instrumentation and logging
414
- # @return [String]
415
+ # @return [::String]
415
416
  # @!attribute [rw] lib_version
416
417
  # The library version as recorded in instrumentation and logging
417
- # @return [String]
418
+ # @return [::String]
418
419
  # @!attribute [rw] channel_args
419
420
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
420
421
  # `GRPC::Core::Channel` object is provided as the credential.
421
- # @return [Hash]
422
+ # @return [::Hash]
422
423
  # @!attribute [rw] interceptors
423
424
  # An array of interceptors that are run before calls are executed.
424
- # @return [Array<GRPC::ClientInterceptor>]
425
+ # @return [::Array<::GRPC::ClientInterceptor>]
425
426
  # @!attribute [rw] timeout
426
- # The call timeout in milliseconds.
427
- # @return [Numeric]
427
+ # The call timeout in seconds.
428
+ # @return [::Numeric]
428
429
  # @!attribute [rw] metadata
429
430
  # Additional gRPC headers to be sent with the call.
430
- # @return [Hash{Symbol=>String}]
431
+ # @return [::Hash{::Symbol=>::String}]
431
432
  # @!attribute [rw] retry_policy
432
433
  # The retry policy. The value is a hash with the following keys:
433
434
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -435,25 +436,29 @@ module Google
435
436
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
436
437
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
437
438
  # trigger a retry.
438
- # @return [Hash]
439
+ # @return [::Hash]
440
+ # @!attribute [rw] quota_project
441
+ # A separate project against which to charge quota.
442
+ # @return [::String]
439
443
  #
440
444
  class Configuration
441
- extend Gapic::Config
445
+ extend ::Gapic::Config
442
446
 
443
- config_attr :endpoint, "webrisk.googleapis.com", String
444
- config_attr :credentials, nil do |value|
447
+ config_attr :endpoint, "webrisk.googleapis.com", ::String
448
+ config_attr :credentials, nil do |value|
445
449
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
446
450
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
447
451
  allowed.any? { |klass| klass === value }
448
452
  end
449
- config_attr :scope, nil, String, Array, nil
450
- config_attr :lib_name, nil, String, nil
451
- config_attr :lib_version, nil, String, nil
452
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
453
- config_attr :interceptors, nil, Array, nil
454
- config_attr :timeout, nil, Numeric, nil
455
- config_attr :metadata, nil, Hash, nil
456
- config_attr :retry_policy, nil, Hash, Proc, nil
453
+ config_attr :scope, nil, ::String, ::Array, nil
454
+ config_attr :lib_name, nil, ::String, nil
455
+ config_attr :lib_version, nil, ::String, nil
456
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
457
+ config_attr :interceptors, nil, ::Array, nil
458
+ config_attr :timeout, nil, ::Numeric, nil
459
+ config_attr :metadata, nil, ::Hash, nil
460
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
461
+ config_attr :quota_project, nil, ::String, nil
457
462
 
458
463
  # @private
459
464
  def initialize parent_config = nil
@@ -469,13 +474,13 @@ module Google
469
474
  def rpcs
470
475
  @rpcs ||= begin
471
476
  parent_rpcs = nil
472
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
477
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
473
478
  Rpcs.new parent_rpcs
474
479
  end
475
480
  end
476
481
 
477
482
  ##
478
- # Configuration RPC class for the WebRiskServiceV1Beta1 API.
483
+ # Configuration RPC class for the WebRiskService API.
479
484
  #
480
485
  # Includes fields providing the configuration for each RPC in this service.
481
486
  # Each configuration object is of type `Gapic::Config::Method` and includes
@@ -494,28 +499,28 @@ module Google
494
499
  class Rpcs
495
500
  ##
496
501
  # RPC-specific configuration for `compute_threat_list_diff`
497
- # @return [Gapic::Config::Method]
502
+ # @return [::Gapic::Config::Method]
498
503
  #
499
504
  attr_reader :compute_threat_list_diff
500
505
  ##
501
506
  # RPC-specific configuration for `search_uris`
502
- # @return [Gapic::Config::Method]
507
+ # @return [::Gapic::Config::Method]
503
508
  #
504
509
  attr_reader :search_uris
505
510
  ##
506
511
  # RPC-specific configuration for `search_hashes`
507
- # @return [Gapic::Config::Method]
512
+ # @return [::Gapic::Config::Method]
508
513
  #
509
514
  attr_reader :search_hashes
510
515
 
511
516
  # @private
512
517
  def initialize parent_rpcs = nil
513
518
  compute_threat_list_diff_config = parent_rpcs&.compute_threat_list_diff if parent_rpcs&.respond_to? :compute_threat_list_diff
514
- @compute_threat_list_diff = Gapic::Config::Method.new compute_threat_list_diff_config
519
+ @compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config
515
520
  search_uris_config = parent_rpcs&.search_uris if parent_rpcs&.respond_to? :search_uris
516
- @search_uris = Gapic::Config::Method.new search_uris_config
521
+ @search_uris = ::Gapic::Config::Method.new search_uris_config
517
522
  search_hashes_config = parent_rpcs&.search_hashes if parent_rpcs&.respond_to? :search_hashes
518
- @search_hashes = Gapic::Config::Method.new search_hashes_config
523
+ @search_hashes = ::Gapic::Config::Method.new search_hashes_config
519
524
 
520
525
  yield self if block_given?
521
526
  end
@@ -23,8 +23,8 @@ module Google
23
23
  module WebRisk
24
24
  module V1beta1
25
25
  module WebRiskService
26
- # Credentials for the WebRiskServiceV1Beta1 API.
27
- class Credentials < Google::Auth::Credentials
26
+ # Credentials for the WebRiskService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
28
  self.scope = [
29
29
  "https://www.googleapis.com/auth/cloud-platform"
30
30
  ]
@@ -128,7 +128,7 @@ module Google
128
128
  # - pattern: "shelves/{shelf}"
129
129
  # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
130
  # @!attribute [rw] type
131
- # @return [String]
131
+ # @return [::String]
132
132
  # The resource type. It must be in the format of
133
133
  # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
134
  # singular and must not include version numbers.
@@ -140,7 +140,7 @@ module Google
140
140
  # should use PascalCase (UpperCamelCase). The maximum number of
141
141
  # characters allowed for the `resource_type_kind` is 100.
142
142
  # @!attribute [rw] pattern
143
- # @return [Array<String>]
143
+ # @return [::Array<::String>]
144
144
  # Optional. The relative resource name pattern associated with this resource
145
145
  # type. The DNS prefix of the full resource name shouldn't be specified here.
146
146
  #
@@ -161,11 +161,11 @@ module Google
161
161
  # the same component name (e.g. "project") refers to IDs of the same
162
162
  # type of resource.
163
163
  # @!attribute [rw] name_field
164
- # @return [String]
164
+ # @return [::String]
165
165
  # Optional. The field on the resource that designates the resource name
166
166
  # field. If omitted, this is assumed to be "name".
167
167
  # @!attribute [rw] history
168
- # @return [Google::Api::ResourceDescriptor::History]
168
+ # @return [::Google::Api::ResourceDescriptor::History]
169
169
  # Optional. The historical or future-looking state of the resource pattern.
170
170
  #
171
171
  # Example:
@@ -182,19 +182,19 @@ module Google
182
182
  # };
183
183
  # }
184
184
  # @!attribute [rw] plural
185
- # @return [String]
185
+ # @return [::String]
186
186
  # The plural name used in the resource name, such as 'projects' for
187
187
  # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
188
  # field in k8s CRD spec
189
189
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
190
190
  # @!attribute [rw] singular
191
- # @return [String]
191
+ # @return [::String]
192
192
  # The same concept of the `singular` field in k8s CRD spec
193
193
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
194
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
195
195
  class ResourceDescriptor
196
- include Google::Protobuf::MessageExts
197
- extend Google::Protobuf::MessageExts::ClassMethods
196
+ include ::Google::Protobuf::MessageExts
197
+ extend ::Google::Protobuf::MessageExts::ClassMethods
198
198
 
199
199
  # A description of the historical or future-looking state of the
200
200
  # resource pattern.
@@ -216,7 +216,7 @@ module Google
216
216
  # Defines a proto annotation that describes a string field that refers to
217
217
  # an API resource.
218
218
  # @!attribute [rw] type
219
- # @return [String]
219
+ # @return [::String]
220
220
  # The resource type that the annotated field references.
221
221
  #
222
222
  # Example:
@@ -227,7 +227,7 @@ module Google
227
227
  # }];
228
228
  # }
229
229
  # @!attribute [rw] child_type
230
- # @return [String]
230
+ # @return [::String]
231
231
  # The resource type of a child collection that the annotated field
232
232
  # references. This is useful for annotating the `parent` field that
233
233
  # doesn't have a fixed resource type.
@@ -240,8 +240,8 @@ module Google
240
240
  # };
241
241
  # }
242
242
  class ResourceReference
243
- include Google::Protobuf::MessageExts
244
- extend Google::Protobuf::MessageExts::ClassMethods
243
+ include ::Google::Protobuf::MessageExts
244
+ extend ::Google::Protobuf::MessageExts::ClassMethods
245
245
  end
246
246
  end
247
247
  end
@@ -23,77 +23,77 @@ module Google
23
23
  module V1beta1
24
24
  # Describes an API diff request.
25
25
  # @!attribute [rw] threat_type
26
- # @return [Google::Cloud::WebRisk::V1beta1::ThreatType]
26
+ # @return [::Google::Cloud::WebRisk::V1beta1::ThreatType]
27
27
  # The ThreatList to update.
28
28
  # @!attribute [rw] version_token
29
- # @return [String]
29
+ # @return [::String]
30
30
  # The current version token of the client for the requested list (the
31
31
  # client version that was received from the last successful diff).
32
32
  # @!attribute [rw] constraints
33
- # @return [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints]
33
+ # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints]
34
34
  # Required. The constraints associated with this request.
35
35
  class ComputeThreatListDiffRequest
36
- include Google::Protobuf::MessageExts
37
- extend Google::Protobuf::MessageExts::ClassMethods
36
+ include ::Google::Protobuf::MessageExts
37
+ extend ::Google::Protobuf::MessageExts::ClassMethods
38
38
 
39
39
  # The constraints for this diff.
40
40
  # @!attribute [rw] max_diff_entries
41
- # @return [Integer]
41
+ # @return [::Integer]
42
42
  # The maximum size in number of entries. The diff will not contain more
43
43
  # entries than this value. This should be a power of 2 between 2**10 and
44
44
  # 2**20. If zero, no diff size limit is set.
45
45
  # @!attribute [rw] max_database_entries
46
- # @return [Integer]
46
+ # @return [::Integer]
47
47
  # Sets the maximum number of entries that the client is willing to have
48
48
  # in the local database. This should be a power of 2 between 2**10 and
49
49
  # 2**20. If zero, no database size limit is set.
50
50
  # @!attribute [rw] supported_compressions
51
- # @return [Array<Google::Cloud::WebRisk::V1beta1::CompressionType>]
51
+ # @return [::Array<::Google::Cloud::WebRisk::V1beta1::CompressionType>]
52
52
  # The compression types supported by the client.
53
53
  class Constraints
54
- include Google::Protobuf::MessageExts
55
- extend Google::Protobuf::MessageExts::ClassMethods
54
+ include ::Google::Protobuf::MessageExts
55
+ extend ::Google::Protobuf::MessageExts::ClassMethods
56
56
  end
57
57
  end
58
58
 
59
59
  # @!attribute [rw] response_type
60
- # @return [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::ResponseType]
60
+ # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::ResponseType]
61
61
  # The type of response. This may indicate that an action must be taken by the
62
62
  # client when the response is received.
63
63
  # @!attribute [rw] additions
64
- # @return [Google::Cloud::WebRisk::V1beta1::ThreatEntryAdditions]
64
+ # @return [::Google::Cloud::WebRisk::V1beta1::ThreatEntryAdditions]
65
65
  # A set of entries to add to a local threat type's list.
66
66
  # @!attribute [rw] removals
67
- # @return [Google::Cloud::WebRisk::V1beta1::ThreatEntryRemovals]
67
+ # @return [::Google::Cloud::WebRisk::V1beta1::ThreatEntryRemovals]
68
68
  # A set of entries to remove from a local threat type's list.
69
69
  # This field may be empty.
70
70
  # @!attribute [rw] new_version_token
71
- # @return [String]
71
+ # @return [::String]
72
72
  # The new opaque client version token.
73
73
  # @!attribute [rw] checksum
74
- # @return [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::Checksum]
74
+ # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::Checksum]
75
75
  # The expected SHA256 hash of the client state; that is, of the sorted list
76
76
  # of all hashes present in the database after applying the provided diff.
77
77
  # If the client state doesn't match the expected state, the client must
78
78
  # disregard this diff and retry later.
79
79
  # @!attribute [rw] recommended_next_diff
80
- # @return [Google::Protobuf::Timestamp]
80
+ # @return [::Google::Protobuf::Timestamp]
81
81
  # The soonest the client should wait before issuing any diff
82
82
  # request. Querying sooner is unlikely to produce a meaningful diff.
83
83
  # Waiting longer is acceptable considering the use case.
84
84
  # If this field is not set clients may update as soon as they want.
85
85
  class ComputeThreatListDiffResponse
86
- include Google::Protobuf::MessageExts
87
- extend Google::Protobuf::MessageExts::ClassMethods
86
+ include ::Google::Protobuf::MessageExts
87
+ extend ::Google::Protobuf::MessageExts::ClassMethods
88
88
 
89
89
  # The expected state of a client's local database.
90
90
  # @!attribute [rw] sha256
91
- # @return [String]
91
+ # @return [::String]
92
92
  # The SHA256 hash of the client state; that is, of the sorted list of all
93
93
  # hashes present in the database.
94
94
  class Checksum
95
- include Google::Protobuf::MessageExts
96
- extend Google::Protobuf::MessageExts::ClassMethods
95
+ include ::Google::Protobuf::MessageExts
96
+ extend ::Google::Protobuf::MessageExts::ClassMethods
97
97
  end
98
98
 
99
99
  # The type of response sent to the client.
@@ -113,119 +113,119 @@ module Google
113
113
 
114
114
  # Request to check URI entries against threatLists.
115
115
  # @!attribute [rw] uri
116
- # @return [String]
116
+ # @return [::String]
117
117
  # Required. The URI to be checked for matches.
118
118
  # @!attribute [rw] threat_types
119
- # @return [Array<Google::Cloud::WebRisk::V1beta1::ThreatType>]
119
+ # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
120
120
  # Required. The ThreatLists to search in.
121
121
  class SearchUrisRequest
122
- include Google::Protobuf::MessageExts
123
- extend Google::Protobuf::MessageExts::ClassMethods
122
+ include ::Google::Protobuf::MessageExts
123
+ extend ::Google::Protobuf::MessageExts::ClassMethods
124
124
  end
125
125
 
126
126
  # @!attribute [rw] threat
127
- # @return [Google::Cloud::WebRisk::V1beta1::SearchUrisResponse::ThreatUri]
127
+ # @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse::ThreatUri]
128
128
  # The threat list matches. This may be empty if the URI is on no list.
129
129
  class SearchUrisResponse
130
- include Google::Protobuf::MessageExts
131
- extend Google::Protobuf::MessageExts::ClassMethods
130
+ include ::Google::Protobuf::MessageExts
131
+ extend ::Google::Protobuf::MessageExts::ClassMethods
132
132
 
133
133
  # Contains threat information on a matching uri.
134
134
  # @!attribute [rw] threat_types
135
- # @return [Array<Google::Cloud::WebRisk::V1beta1::ThreatType>]
135
+ # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
136
136
  # The ThreatList this threat belongs to.
137
137
  # @!attribute [rw] expire_time
138
- # @return [Google::Protobuf::Timestamp]
138
+ # @return [::Google::Protobuf::Timestamp]
139
139
  # The cache lifetime for the returned match. Clients must not cache this
140
140
  # response past this timestamp to avoid false positives.
141
141
  class ThreatUri
142
- include Google::Protobuf::MessageExts
143
- extend Google::Protobuf::MessageExts::ClassMethods
142
+ include ::Google::Protobuf::MessageExts
143
+ extend ::Google::Protobuf::MessageExts::ClassMethods
144
144
  end
145
145
  end
146
146
 
147
147
  # Request to return full hashes matched by the provided hash prefixes.
148
148
  # @!attribute [rw] hash_prefix
149
- # @return [String]
149
+ # @return [::String]
150
150
  # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
151
151
  # hash. For JSON requests, this field is base64-encoded.
152
152
  # @!attribute [rw] threat_types
153
- # @return [Array<Google::Cloud::WebRisk::V1beta1::ThreatType>]
153
+ # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
154
154
  # Required. The ThreatLists to search in.
155
155
  class SearchHashesRequest
156
- include Google::Protobuf::MessageExts
157
- extend Google::Protobuf::MessageExts::ClassMethods
156
+ include ::Google::Protobuf::MessageExts
157
+ extend ::Google::Protobuf::MessageExts::ClassMethods
158
158
  end
159
159
 
160
160
  # @!attribute [rw] threats
161
- # @return [Array<Google::Cloud::WebRisk::V1beta1::SearchHashesResponse::ThreatHash>]
161
+ # @return [::Array<::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse::ThreatHash>]
162
162
  # The full hashes that matched the requested prefixes.
163
163
  # The hash will be populated in the key.
164
164
  # @!attribute [rw] negative_expire_time
165
- # @return [Google::Protobuf::Timestamp]
165
+ # @return [::Google::Protobuf::Timestamp]
166
166
  # For requested entities that did not match the threat list, how long to
167
167
  # cache the response until.
168
168
  class SearchHashesResponse
169
- include Google::Protobuf::MessageExts
170
- extend Google::Protobuf::MessageExts::ClassMethods
169
+ include ::Google::Protobuf::MessageExts
170
+ extend ::Google::Protobuf::MessageExts::ClassMethods
171
171
 
172
172
  # Contains threat information on a matching hash.
173
173
  # @!attribute [rw] threat_types
174
- # @return [Array<Google::Cloud::WebRisk::V1beta1::ThreatType>]
174
+ # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
175
175
  # The ThreatList this threat belongs to.
176
176
  # This must contain at least one entry.
177
177
  # @!attribute [rw] hash
178
- # @return [String]
178
+ # @return [::String]
179
179
  # A 32 byte SHA256 hash. This field is in binary format. For JSON
180
180
  # requests, hashes are base64-encoded.
181
181
  # @!attribute [rw] expire_time
182
- # @return [Google::Protobuf::Timestamp]
182
+ # @return [::Google::Protobuf::Timestamp]
183
183
  # The cache lifetime for the returned match. Clients must not cache this
184
184
  # response past this timestamp to avoid false positives.
185
185
  class ThreatHash
186
- include Google::Protobuf::MessageExts
187
- extend Google::Protobuf::MessageExts::ClassMethods
186
+ include ::Google::Protobuf::MessageExts
187
+ extend ::Google::Protobuf::MessageExts::ClassMethods
188
188
  end
189
189
  end
190
190
 
191
191
  # Contains the set of entries to add to a local database.
192
192
  # May contain a combination of compressed and raw data in a single response.
193
193
  # @!attribute [rw] raw_hashes
194
- # @return [Array<Google::Cloud::WebRisk::V1beta1::RawHashes>]
194
+ # @return [::Array<::Google::Cloud::WebRisk::V1beta1::RawHashes>]
195
195
  # The raw SHA256-formatted entries.
196
196
  # Repeated to allow returning sets of hashes with different prefix sizes.
197
197
  # @!attribute [rw] rice_hashes
198
- # @return [Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding]
198
+ # @return [::Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding]
199
199
  # The encoded 4-byte prefixes of SHA256-formatted entries, using a
200
200
  # Golomb-Rice encoding. The hashes are converted to uint32, sorted in
201
201
  # ascending order, then delta encoded and stored as encoded_data.
202
202
  class ThreatEntryAdditions
203
- include Google::Protobuf::MessageExts
204
- extend Google::Protobuf::MessageExts::ClassMethods
203
+ include ::Google::Protobuf::MessageExts
204
+ extend ::Google::Protobuf::MessageExts::ClassMethods
205
205
  end
206
206
 
207
207
  # Contains the set of entries to remove from a local database.
208
208
  # @!attribute [rw] raw_indices
209
- # @return [Google::Cloud::WebRisk::V1beta1::RawIndices]
209
+ # @return [::Google::Cloud::WebRisk::V1beta1::RawIndices]
210
210
  # The raw removal indices for a local list.
211
211
  # @!attribute [rw] rice_indices
212
- # @return [Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding]
212
+ # @return [::Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding]
213
213
  # The encoded local, lexicographically-sorted list indices, using a
214
214
  # Golomb-Rice encoding. Used for sending compressed removal indices. The
215
215
  # removal indices (uint32) are sorted in ascending order, then delta encoded
216
216
  # and stored as encoded_data.
217
217
  class ThreatEntryRemovals
218
- include Google::Protobuf::MessageExts
219
- extend Google::Protobuf::MessageExts::ClassMethods
218
+ include ::Google::Protobuf::MessageExts
219
+ extend ::Google::Protobuf::MessageExts::ClassMethods
220
220
  end
221
221
 
222
222
  # A set of raw indices to remove from a local list.
223
223
  # @!attribute [rw] indices
224
- # @return [Array<Integer>]
224
+ # @return [::Array<::Integer>]
225
225
  # The indices to remove from a lexicographically-sorted local list.
226
226
  class RawIndices
227
- include Google::Protobuf::MessageExts
228
- extend Google::Protobuf::MessageExts::ClassMethods
227
+ include ::Google::Protobuf::MessageExts
228
+ extend ::Google::Protobuf::MessageExts::ClassMethods
229
229
  end
230
230
 
231
231
  # The uncompressed threat entries in hash format.
@@ -237,41 +237,41 @@ module Google
237
237
  # compression, or when sending non-4-byte hashes to clients that do support
238
238
  # compression.
239
239
  # @!attribute [rw] prefix_size
240
- # @return [Integer]
240
+ # @return [::Integer]
241
241
  # The number of bytes for each prefix encoded below. This field can be
242
242
  # anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
243
243
  # @!attribute [rw] raw_hashes
244
- # @return [String]
244
+ # @return [::String]
245
245
  # The hashes, in binary format, concatenated into one long string. Hashes are
246
246
  # sorted in lexicographic order. For JSON API users, hashes are
247
247
  # base64-encoded.
248
248
  class RawHashes
249
- include Google::Protobuf::MessageExts
250
- extend Google::Protobuf::MessageExts::ClassMethods
249
+ include ::Google::Protobuf::MessageExts
250
+ extend ::Google::Protobuf::MessageExts::ClassMethods
251
251
  end
252
252
 
253
253
  # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
254
254
  # compressed removal indices.
255
255
  # @!attribute [rw] first_value
256
- # @return [Integer]
256
+ # @return [::Integer]
257
257
  # The offset of the first entry in the encoded data, or, if only a single
258
258
  # integer was encoded, that single integer's value. If the field is empty or
259
259
  # missing, assume zero.
260
260
  # @!attribute [rw] rice_parameter
261
- # @return [Integer]
261
+ # @return [::Integer]
262
262
  # The Golomb-Rice parameter, which is a number between 2 and 28. This field
263
263
  # is missing (that is, zero) if `num_entries` is zero.
264
264
  # @!attribute [rw] entry_count
265
- # @return [Integer]
265
+ # @return [::Integer]
266
266
  # The number of entries that are delta encoded in the encoded data. If only a
267
267
  # single integer was encoded, this will be zero and the single value will be
268
268
  # stored in `first_value`.
269
269
  # @!attribute [rw] encoded_data
270
- # @return [String]
270
+ # @return [::String]
271
271
  # The encoded deltas that are encoded using the Golomb-Rice coder.
272
272
  class RiceDeltaEncoding
273
- include Google::Protobuf::MessageExts
274
- extend Google::Protobuf::MessageExts::ClassMethods
273
+ include ::Google::Protobuf::MessageExts
274
+ extend ::Google::Protobuf::MessageExts::ClassMethods
275
275
  end
276
276
 
277
277
  # The type of threat. This maps dirrectly to the threat list a threat may
@@ -102,19 +102,19 @@ module Google
102
102
  # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
103
103
  # ) to obtain a formatter capable of generating timestamps in this format.
104
104
  # @!attribute [rw] seconds
105
- # @return [Integer]
105
+ # @return [::Integer]
106
106
  # Represents seconds of UTC time since Unix epoch
107
107
  # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
108
108
  # 9999-12-31T23:59:59Z inclusive.
109
109
  # @!attribute [rw] nanos
110
- # @return [Integer]
110
+ # @return [::Integer]
111
111
  # Non-negative fractions of a second at nanosecond resolution. Negative
112
112
  # second values with fractions must still have non-negative nanos values
113
113
  # that count forward in time. Must be from 0 to 999,999,999
114
114
  # inclusive.
115
115
  class Timestamp
116
- include Google::Protobuf::MessageExts
117
- extend Google::Protobuf::MessageExts::ClassMethods
116
+ include ::Google::Protobuf::MessageExts
117
+ extend ::Google::Protobuf::MessageExts::ClassMethods
118
118
  end
119
119
  end
120
120
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-web_risk-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-24 00:00:00.000000000 Z
11
+ date: 2020-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -58,14 +58,42 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.10'
61
+ version: '5.14'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '5.10'
68
+ version: '5.14'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest-focus
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.1'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest-rg
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '5.2'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '5.2'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: rake
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -165,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
193
  - !ruby/object:Gem::Version
166
194
  version: '0'
167
195
  requirements: []
168
- rubygems_version: 3.0.6
196
+ rubygems_version: 3.1.3
169
197
  signing_key:
170
198
  specification_version: 4
171
199
  summary: API Client library for the Web Risk V1beta1 API