google-cloud-web_risk-v1 0.6.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,339 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/webrisk/v1/webrisk_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module WebRisk
24
+ module V1
25
+ module WebRiskService
26
+ module Rest
27
+ ##
28
+ # REST service stub for the WebRiskService service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the compute_threat_list_diff REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse]
56
+ # A result object deserialized from the server's reply
57
+ def compute_threat_list_diff request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_compute_threat_list_diff_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split("=", 2) }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # Baseline implementation for the search_uris REST call
83
+ #
84
+ # @param request_pb [::Google::Cloud::WebRisk::V1::SearchUrisRequest]
85
+ # A request object representing the call parameters. Required.
86
+ # @param options [::Gapic::CallOptions]
87
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
88
+ #
89
+ # @yield [result, operation] Access the result along with the TransportOperation object
90
+ # @yieldparam result [::Google::Cloud::WebRisk::V1::SearchUrisResponse]
91
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
92
+ #
93
+ # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse]
94
+ # A result object deserialized from the server's reply
95
+ def search_uris request_pb, options = nil
96
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
97
+
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_search_uris_request request_pb
99
+ query_string_params = if query_string_params.any?
100
+ query_string_params.to_h { |p| p.split("=", 2) }
101
+ else
102
+ {}
103
+ end
104
+
105
+ response = @client_stub.make_http_request(
106
+ verb,
107
+ uri: uri,
108
+ body: body || "",
109
+ params: query_string_params,
110
+ options: options
111
+ )
112
+ operation = ::Gapic::Rest::TransportOperation.new response
113
+ result = ::Google::Cloud::WebRisk::V1::SearchUrisResponse.decode_json response.body, ignore_unknown_fields: true
114
+
115
+ yield result, operation if block_given?
116
+ result
117
+ end
118
+
119
+ ##
120
+ # Baseline implementation for the search_hashes REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::WebRisk::V1::SearchHashesRequest]
123
+ # A request object representing the call parameters. Required.
124
+ # @param options [::Gapic::CallOptions]
125
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
126
+ #
127
+ # @yield [result, operation] Access the result along with the TransportOperation object
128
+ # @yieldparam result [::Google::Cloud::WebRisk::V1::SearchHashesResponse]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Cloud::WebRisk::V1::SearchHashesResponse]
132
+ # A result object deserialized from the server's reply
133
+ def search_hashes request_pb, options = nil
134
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
135
+
136
+ verb, uri, query_string_params, body = ServiceStub.transcode_search_hashes_request request_pb
137
+ query_string_params = if query_string_params.any?
138
+ query_string_params.to_h { |p| p.split("=", 2) }
139
+ else
140
+ {}
141
+ end
142
+
143
+ response = @client_stub.make_http_request(
144
+ verb,
145
+ uri: uri,
146
+ body: body || "",
147
+ params: query_string_params,
148
+ options: options
149
+ )
150
+ operation = ::Gapic::Rest::TransportOperation.new response
151
+ result = ::Google::Cloud::WebRisk::V1::SearchHashesResponse.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
157
+ ##
158
+ # Baseline implementation for the create_submission REST call
159
+ #
160
+ # @param request_pb [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest]
161
+ # A request object representing the call parameters. Required.
162
+ # @param options [::Gapic::CallOptions]
163
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
164
+ #
165
+ # @yield [result, operation] Access the result along with the TransportOperation object
166
+ # @yieldparam result [::Google::Cloud::WebRisk::V1::Submission]
167
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
168
+ #
169
+ # @return [::Google::Cloud::WebRisk::V1::Submission]
170
+ # A result object deserialized from the server's reply
171
+ def create_submission request_pb, options = nil
172
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
173
+
174
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_submission_request request_pb
175
+ query_string_params = if query_string_params.any?
176
+ query_string_params.to_h { |p| p.split("=", 2) }
177
+ else
178
+ {}
179
+ end
180
+
181
+ response = @client_stub.make_http_request(
182
+ verb,
183
+ uri: uri,
184
+ body: body || "",
185
+ params: query_string_params,
186
+ options: options
187
+ )
188
+ operation = ::Gapic::Rest::TransportOperation.new response
189
+ result = ::Google::Cloud::WebRisk::V1::Submission.decode_json response.body, ignore_unknown_fields: true
190
+
191
+ yield result, operation if block_given?
192
+ result
193
+ end
194
+
195
+ ##
196
+ # Baseline implementation for the submit_uri REST call
197
+ #
198
+ # @param request_pb [::Google::Cloud::WebRisk::V1::SubmitUriRequest]
199
+ # A request object representing the call parameters. Required.
200
+ # @param options [::Gapic::CallOptions]
201
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
202
+ #
203
+ # @yield [result, operation] Access the result along with the TransportOperation object
204
+ # @yieldparam result [::Google::Longrunning::Operation]
205
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
206
+ #
207
+ # @return [::Google::Longrunning::Operation]
208
+ # A result object deserialized from the server's reply
209
+ def submit_uri request_pb, options = nil
210
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
211
+
212
+ verb, uri, query_string_params, body = ServiceStub.transcode_submit_uri_request request_pb
213
+ query_string_params = if query_string_params.any?
214
+ query_string_params.to_h { |p| p.split("=", 2) }
215
+ else
216
+ {}
217
+ end
218
+
219
+ response = @client_stub.make_http_request(
220
+ verb,
221
+ uri: uri,
222
+ body: body || "",
223
+ params: query_string_params,
224
+ options: options
225
+ )
226
+ operation = ::Gapic::Rest::TransportOperation.new response
227
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
228
+
229
+ yield result, operation if block_given?
230
+ result
231
+ end
232
+
233
+ ##
234
+ # @private
235
+ #
236
+ # GRPC transcoding helper method for the compute_threat_list_diff REST call
237
+ #
238
+ # @param request_pb [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest]
239
+ # A request object representing the call parameters. Required.
240
+ # @return [Array(String, [String, nil], Hash{String => String})]
241
+ # Uri, Body, Query string parameters
242
+ def self.transcode_compute_threat_list_diff_request request_pb
243
+ transcoder = Gapic::Rest::GrpcTranscoder.new
244
+ .with_bindings(
245
+ uri_method: :get,
246
+ uri_template: "/v1/threatLists:computeDiff",
247
+ matches: []
248
+ )
249
+ transcoder.transcode request_pb
250
+ end
251
+
252
+ ##
253
+ # @private
254
+ #
255
+ # GRPC transcoding helper method for the search_uris REST call
256
+ #
257
+ # @param request_pb [::Google::Cloud::WebRisk::V1::SearchUrisRequest]
258
+ # A request object representing the call parameters. Required.
259
+ # @return [Array(String, [String, nil], Hash{String => String})]
260
+ # Uri, Body, Query string parameters
261
+ def self.transcode_search_uris_request request_pb
262
+ transcoder = Gapic::Rest::GrpcTranscoder.new
263
+ .with_bindings(
264
+ uri_method: :get,
265
+ uri_template: "/v1/uris:search",
266
+ matches: []
267
+ )
268
+ transcoder.transcode request_pb
269
+ end
270
+
271
+ ##
272
+ # @private
273
+ #
274
+ # GRPC transcoding helper method for the search_hashes REST call
275
+ #
276
+ # @param request_pb [::Google::Cloud::WebRisk::V1::SearchHashesRequest]
277
+ # A request object representing the call parameters. Required.
278
+ # @return [Array(String, [String, nil], Hash{String => String})]
279
+ # Uri, Body, Query string parameters
280
+ def self.transcode_search_hashes_request request_pb
281
+ transcoder = Gapic::Rest::GrpcTranscoder.new
282
+ .with_bindings(
283
+ uri_method: :get,
284
+ uri_template: "/v1/hashes:search",
285
+ matches: []
286
+ )
287
+ transcoder.transcode request_pb
288
+ end
289
+
290
+ ##
291
+ # @private
292
+ #
293
+ # GRPC transcoding helper method for the create_submission REST call
294
+ #
295
+ # @param request_pb [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest]
296
+ # A request object representing the call parameters. Required.
297
+ # @return [Array(String, [String, nil], Hash{String => String})]
298
+ # Uri, Body, Query string parameters
299
+ def self.transcode_create_submission_request request_pb
300
+ transcoder = Gapic::Rest::GrpcTranscoder.new
301
+ .with_bindings(
302
+ uri_method: :post,
303
+ uri_template: "/v1/{parent}/submissions",
304
+ body: "submission",
305
+ matches: [
306
+ ["parent", %r{^projects/[^/]+/?$}, false]
307
+ ]
308
+ )
309
+ transcoder.transcode request_pb
310
+ end
311
+
312
+ ##
313
+ # @private
314
+ #
315
+ # GRPC transcoding helper method for the submit_uri REST call
316
+ #
317
+ # @param request_pb [::Google::Cloud::WebRisk::V1::SubmitUriRequest]
318
+ # A request object representing the call parameters. Required.
319
+ # @return [Array(String, [String, nil], Hash{String => String})]
320
+ # Uri, Body, Query string parameters
321
+ def self.transcode_submit_uri_request request_pb
322
+ transcoder = Gapic::Rest::GrpcTranscoder.new
323
+ .with_bindings(
324
+ uri_method: :post,
325
+ uri_template: "/v1/{parent}/uris:submit",
326
+ body: "*",
327
+ matches: [
328
+ ["parent", %r{^projects/[^/]+/?$}, false]
329
+ ]
330
+ )
331
+ transcoder.transcode request_pb
332
+ end
333
+ end
334
+ end
335
+ end
336
+ end
337
+ end
338
+ end
339
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/web_risk/v1/version"
24
+
25
+ require "google/cloud/web_risk/v1/web_risk_service/credentials"
26
+ require "google/cloud/web_risk/v1/web_risk_service/paths"
27
+ require "google/cloud/web_risk/v1/web_risk_service/rest/operations"
28
+ require "google/cloud/web_risk/v1/web_risk_service/rest/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module WebRisk
33
+ module V1
34
+ ##
35
+ # Web Risk API defines an interface to detect malicious URLs on your
36
+ # website and in client applications.
37
+ #
38
+ # To load this service and instantiate a REST client:
39
+ #
40
+ # require "google/cloud/web_risk/v1/web_risk_service/rest"
41
+ # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new
42
+ #
43
+ module WebRiskService
44
+ # Client for the REST transport
45
+ module Rest
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
54
+ require "google/cloud/web_risk/v1/web_risk_service/rest/helpers" if ::File.file? helper_path
@@ -24,7 +24,9 @@ require "google/cloud/web_risk/v1/version"
24
24
 
25
25
  require "google/cloud/web_risk/v1/web_risk_service/credentials"
26
26
  require "google/cloud/web_risk/v1/web_risk_service/paths"
27
+ require "google/cloud/web_risk/v1/web_risk_service/operations"
27
28
  require "google/cloud/web_risk/v1/web_risk_service/client"
29
+ require "google/cloud/web_risk/v1/web_risk_service/rest"
28
30
 
29
31
  module Google
30
32
  module Cloud
@@ -34,11 +36,16 @@ module Google
34
36
  # Web Risk API defines an interface to detect malicious URLs on your
35
37
  # website and in client applications.
36
38
  #
37
- # To load this service and instantiate a client:
39
+ # @example Load this service and instantiate a gRPC client
38
40
  #
39
41
  # require "google/cloud/web_risk/v1/web_risk_service"
40
42
  # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
41
43
  #
44
+ # @example Load this service and instantiate a REST client
45
+ #
46
+ # require "google/cloud/web_risk/v1/web_risk_service/rest"
47
+ # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new
48
+ #
42
49
  module WebRiskService
43
50
  end
44
51
  end
@@ -23,13 +23,18 @@ module Google
23
23
  module Cloud
24
24
  module WebRisk
25
25
  ##
26
- # To load this package, including all its services, and instantiate a client:
26
+ # API client module.
27
27
  #
28
- # @example
28
+ # @example Load this package, including all its services, and instantiate a gRPC client
29
29
  #
30
30
  # require "google/cloud/web_risk/v1"
31
31
  # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
32
32
  #
33
+ # @example Load this package, including all its services, and instantiate a REST client
34
+ #
35
+ # require "google/cloud/web_risk/v1"
36
+ # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new
37
+ #
33
38
  module V1
34
39
  end
35
40
  end
@@ -7,6 +7,7 @@ require 'google/api/annotations_pb'
7
7
  require 'google/api/client_pb'
8
8
  require 'google/api/field_behavior_pb'
9
9
  require 'google/api/resource_pb'
10
+ require 'google/longrunning/operations_pb'
10
11
  require 'google/protobuf/timestamp_pb'
11
12
 
12
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -84,11 +85,75 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
84
85
  end
85
86
  add_message "google.cloud.webrisk.v1.Submission" do
86
87
  optional :uri, :string, 1
88
+ repeated :threat_types, :enum, 2, "google.cloud.webrisk.v1.ThreatType"
89
+ end
90
+ add_message "google.cloud.webrisk.v1.ThreatInfo" do
91
+ optional :abuse_type, :enum, 1, "google.cloud.webrisk.v1.ThreatInfo.AbuseType"
92
+ optional :threat_confidence, :message, 2, "google.cloud.webrisk.v1.ThreatInfo.Confidence"
93
+ optional :threat_justification, :message, 3, "google.cloud.webrisk.v1.ThreatInfo.ThreatJustification"
94
+ end
95
+ add_message "google.cloud.webrisk.v1.ThreatInfo.Confidence" do
96
+ oneof :value do
97
+ optional :score, :float, 1
98
+ optional :level, :enum, 2, "google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel"
99
+ end
100
+ end
101
+ add_enum "google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel" do
102
+ value :CONFIDENCE_LEVEL_UNSPECIFIED, 0
103
+ value :LOW, 1
104
+ value :MEDIUM, 2
105
+ value :HIGH, 3
106
+ end
107
+ add_message "google.cloud.webrisk.v1.ThreatInfo.ThreatJustification" do
108
+ repeated :labels, :enum, 1, "google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel"
109
+ repeated :comments, :string, 2
110
+ end
111
+ add_enum "google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel" do
112
+ value :JUSTIFICATION_LABEL_UNSPECIFIED, 0
113
+ value :MANUAL_VERIFICATION, 1
114
+ value :USER_REPORT, 2
115
+ value :AUTOMATED_REPORT, 3
116
+ end
117
+ add_enum "google.cloud.webrisk.v1.ThreatInfo.AbuseType" do
118
+ value :ABUSE_TYPE_UNSPECIFIED, 0
119
+ value :MALWARE, 1
120
+ value :SOCIAL_ENGINEERING, 2
121
+ value :UNWANTED_SOFTWARE, 3
122
+ end
123
+ add_message "google.cloud.webrisk.v1.ThreatDiscovery" do
124
+ optional :platform, :enum, 1, "google.cloud.webrisk.v1.ThreatDiscovery.Platform"
125
+ repeated :region_codes, :string, 2
126
+ end
127
+ add_enum "google.cloud.webrisk.v1.ThreatDiscovery.Platform" do
128
+ value :PLATFORM_UNSPECIFIED, 0
129
+ value :ANDROID, 1
130
+ value :IOS, 2
131
+ value :MACOS, 3
132
+ value :WINDOWS, 4
87
133
  end
88
134
  add_message "google.cloud.webrisk.v1.CreateSubmissionRequest" do
89
135
  optional :parent, :string, 1
90
136
  optional :submission, :message, 2, "google.cloud.webrisk.v1.Submission"
91
137
  end
138
+ add_message "google.cloud.webrisk.v1.SubmitUriRequest" do
139
+ optional :parent, :string, 1
140
+ optional :submission, :message, 2, "google.cloud.webrisk.v1.Submission"
141
+ optional :threat_info, :message, 3, "google.cloud.webrisk.v1.ThreatInfo"
142
+ optional :threat_discovery, :message, 4, "google.cloud.webrisk.v1.ThreatDiscovery"
143
+ end
144
+ add_message "google.cloud.webrisk.v1.SubmitUriMetadata" do
145
+ optional :state, :enum, 1, "google.cloud.webrisk.v1.SubmitUriMetadata.State"
146
+ optional :create_time, :message, 2, "google.protobuf.Timestamp"
147
+ optional :update_time, :message, 3, "google.protobuf.Timestamp"
148
+ end
149
+ add_enum "google.cloud.webrisk.v1.SubmitUriMetadata.State" do
150
+ value :STATE_UNSPECIFIED, 0
151
+ value :RUNNING, 1
152
+ value :SUCCEEDED, 2
153
+ value :CANCELLED, 3
154
+ value :FAILED, 4
155
+ value :CLOSED, 5
156
+ end
92
157
  add_enum "google.cloud.webrisk.v1.ThreatType" do
93
158
  value :THREAT_TYPE_UNSPECIFIED, 0
94
159
  value :MALWARE, 1
@@ -125,7 +190,18 @@ module Google
125
190
  RawHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.RawHashes").msgclass
126
191
  RiceDeltaEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.RiceDeltaEncoding").msgclass
127
192
  Submission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.Submission").msgclass
193
+ ThreatInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo").msgclass
194
+ ThreatInfo::Confidence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.Confidence").msgclass
195
+ ThreatInfo::Confidence::ConfidenceLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel").enummodule
196
+ ThreatInfo::ThreatJustification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.ThreatJustification").msgclass
197
+ ThreatInfo::ThreatJustification::JustificationLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel").enummodule
198
+ ThreatInfo::AbuseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.AbuseType").enummodule
199
+ ThreatDiscovery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatDiscovery").msgclass
200
+ ThreatDiscovery::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatDiscovery.Platform").enummodule
128
201
  CreateSubmissionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.CreateSubmissionRequest").msgclass
202
+ SubmitUriRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SubmitUriRequest").msgclass
203
+ SubmitUriMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SubmitUriMetadata").msgclass
204
+ SubmitUriMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SubmitUriMetadata.State").enummodule
129
205
  ThreatType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatType").enummodule
130
206
  CompressionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.CompressionType").enummodule
131
207
  end
@@ -61,6 +61,17 @@ module Google
61
61
  # allowlisted projects can use this method during Early Access. Please reach
62
62
  # out to Sales or your customer engineer to obtain access.
63
63
  rpc :CreateSubmission, ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest, ::Google::Cloud::WebRisk::V1::Submission
64
+ # Submits a URI suspected of containing malicious content to be reviewed.
65
+ # Returns a google.longrunning.Operation which, once the review is complete,
66
+ # is updated with its result. You can use the [Pub/Sub API]
67
+ # (https://cloud.google.com/pubsub) to receive notifications for the returned
68
+ # Operation. If the result verifies the existence of malicious content, the
69
+ # site will be added to the [Google's Social Engineering lists]
70
+ # (https://support.google.com/webmasters/answer/6350487/) in order to
71
+ # protect users that could get exposed to this threat in the future. Only
72
+ # allowlisted projects can use this method during Early Access. Please reach
73
+ # out to Sales or your customer engineer to obtain access.
74
+ rpc :SubmitUri, ::Google::Cloud::WebRisk::V1::SubmitUriRequest, ::Google::Longrunning::Operation
64
75
  end
65
76
 
66
77
  Stub = Service.rpc_stub_class