google-cloud-web_risk-v1 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -192,6 +192,44 @@ module Google
192
192
  result
193
193
  end
194
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
+
195
233
  ##
196
234
  # @private
197
235
  #
@@ -270,6 +308,28 @@ module Google
270
308
  )
271
309
  transcoder.transcode request_pb
272
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
273
333
  end
274
334
  end
275
335
  end
@@ -24,6 +24,7 @@ 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/rest/operations"
27
28
  require "google/cloud/web_risk/v1/web_risk_service/rest/client"
28
29
 
29
30
  module Google
@@ -24,6 +24,7 @@ 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"
28
29
  require "google/cloud/web_risk/v1/web_risk_service/rest"
29
30
 
@@ -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
@@ -35,7 +35,9 @@ module Google
35
35
  # Details about how and where to publish client libraries.
36
36
  # @!attribute [rw] version
37
37
  # @return [::String]
38
- # Version of the API to apply these settings to.
38
+ # Version of the API to apply these settings to. This is the full protobuf
39
+ # package for the API, ending in the version element.
40
+ # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
39
41
  # @!attribute [rw] launch_stage
40
42
  # @return [::Google::Api::LaunchStage]
41
43
  # Launch stage of this version of the API.
@@ -81,7 +83,7 @@ module Google
81
83
  # long-running operation pattern.
82
84
  # @!attribute [rw] new_issue_uri
83
85
  # @return [::String]
84
- # Link to a place that API users can report issues. Example:
86
+ # Link to a *public* URI where users can report issues. Example:
85
87
  # https://issuetracker.google.com/issues/new?component=190865&template=1161103
86
88
  # @!attribute [rw] documentation_uri
87
89
  # @return [::String]
@@ -111,6 +113,10 @@ module Google
111
113
  # Client library settings. If the same version string appears multiple
112
114
  # times in this list, then the last one wins. Settings from earlier
113
115
  # settings with the same version string are discarded.
116
+ # @!attribute [rw] proto_reference_documentation_uri
117
+ # @return [::String]
118
+ # Optional link to proto reference documentation. Example:
119
+ # https://cloud.google.com/pubsub/lite/docs/reference/rpc
114
120
  class Publishing
115
121
  include ::Google::Protobuf::MessageExts
116
122
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -203,9 +209,57 @@ module Google
203
209
  # @!attribute [rw] common
204
210
  # @return [::Google::Api::CommonLanguageSettings]
205
211
  # Some settings.
212
+ # @!attribute [rw] renamed_services
213
+ # @return [::Google::Protobuf::Map{::String => ::String}]
214
+ # Map from original service names to renamed versions.
215
+ # This is used when the default generated types
216
+ # would cause a naming conflict. (Neither name is
217
+ # fully-qualified.)
218
+ # Example: Subscriber to SubscriberServiceApi.
219
+ # @!attribute [rw] renamed_resources
220
+ # @return [::Google::Protobuf::Map{::String => ::String}]
221
+ # Map from full resource types to the effective short name
222
+ # for the resource. This is used when otherwise resource
223
+ # named from different services would cause naming collisions.
224
+ # Example entry:
225
+ # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
226
+ # @!attribute [rw] ignored_resources
227
+ # @return [::Array<::String>]
228
+ # List of full resource types to ignore during generation.
229
+ # This is typically used for API-specific Location resources,
230
+ # which should be handled by the generator as if they were actually
231
+ # the common Location resources.
232
+ # Example entry: "documentai.googleapis.com/Location"
233
+ # @!attribute [rw] forced_namespace_aliases
234
+ # @return [::Array<::String>]
235
+ # Namespaces which must be aliased in snippets due to
236
+ # a known (but non-generator-predictable) naming collision
237
+ # @!attribute [rw] handwritten_signatures
238
+ # @return [::Array<::String>]
239
+ # Method signatures (in the form "service.method(signature)")
240
+ # which are provided separately, so shouldn't be generated.
241
+ # Snippets *calling* these methods are still generated, however.
206
242
  class DotnetSettings
207
243
  include ::Google::Protobuf::MessageExts
208
244
  extend ::Google::Protobuf::MessageExts::ClassMethods
245
+
246
+ # @!attribute [rw] key
247
+ # @return [::String]
248
+ # @!attribute [rw] value
249
+ # @return [::String]
250
+ class RenamedServicesEntry
251
+ include ::Google::Protobuf::MessageExts
252
+ extend ::Google::Protobuf::MessageExts::ClassMethods
253
+ end
254
+
255
+ # @!attribute [rw] key
256
+ # @return [::String]
257
+ # @!attribute [rw] value
258
+ # @return [::String]
259
+ class RenamedResourcesEntry
260
+ include ::Google::Protobuf::MessageExts
261
+ extend ::Google::Protobuf::MessageExts::ClassMethods
262
+ end
209
263
  end
210
264
 
211
265
  # Settings for Ruby client libraries.
@@ -240,8 +294,8 @@ module Google
240
294
  # Example of a YAML configuration::
241
295
  #
242
296
  # publishing:
243
- # method_behavior:
244
- # - selector: CreateAdDomain
297
+ # method_settings:
298
+ # - selector: google.cloud.speech.v2.Speech.BatchRecognize
245
299
  # long_running:
246
300
  # initial_poll_delay:
247
301
  # seconds: 60 # 1 minute
@@ -299,6 +353,15 @@ module Google
299
353
 
300
354
  # Street View Org.
301
355
  STREET_VIEW = 4
356
+
357
+ # Shopping Org.
358
+ SHOPPING = 5
359
+
360
+ # Geo Org.
361
+ GEO = 6
362
+
363
+ # Generative AI - https://developers.generativeai.google
364
+ GENERATIVE_AI = 7
302
365
  end
303
366
 
304
367
  # To where should client libraries be published?
@@ -24,9 +24,9 @@ module Google
24
24
  # Describes an API diff request.
25
25
  # @!attribute [rw] threat_type
26
26
  # @return [::Google::Cloud::WebRisk::V1::ThreatType]
27
- # Required. The threat list to update. Only a single ThreatType should be specified
28
- # per request. If you want to handle multiple ThreatTypes, you must make one
29
- # request per ThreatType.
27
+ # Required. The threat list to update. Only a single ThreatType should be
28
+ # specified per request. If you want to handle multiple ThreatTypes, you must
29
+ # make one request per ThreatType.
30
30
  # @!attribute [rw] version_token
31
31
  # @return [::String]
32
32
  # The current version token of the client for the requested list (the
@@ -124,7 +124,8 @@ module Google
124
124
  # Required. The URI to be checked for matches.
125
125
  # @!attribute [rw] threat_types
126
126
  # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>]
127
- # Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
127
+ # Required. The ThreatLists to search in. Multiple ThreatLists may be
128
+ # specified.
128
129
  class SearchUrisRequest
129
130
  include ::Google::Protobuf::MessageExts
130
131
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -160,7 +161,8 @@ module Google
160
161
  # the web safe base64 variant (RFC 4648).
161
162
  # @!attribute [rw] threat_types
162
163
  # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>]
163
- # Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
164
+ # Required. The ThreatLists to search in. Multiple ThreatLists may be
165
+ # specified.
164
166
  class SearchHashesRequest
165
167
  include ::Google::Protobuf::MessageExts
166
168
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -287,17 +289,142 @@ module Google
287
289
  # Wraps a URI that might be displaying malicious content.
288
290
  # @!attribute [rw] uri
289
291
  # @return [::String]
290
- # Required. The URI that is being reported for malicious content to be analyzed.
292
+ # Required. The URI that is being reported for malicious content to be
293
+ # analyzed.
294
+ # @!attribute [r] threat_types
295
+ # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>]
296
+ # Output only. ThreatTypes found to be associated with the submitted URI
297
+ # after reviewing it. This might be empty if the URI was not added to any
298
+ # list.
291
299
  class Submission
292
300
  include ::Google::Protobuf::MessageExts
293
301
  extend ::Google::Protobuf::MessageExts::ClassMethods
294
302
  end
295
303
 
304
+ # Context about the submission including the type of abuse found on the URI and
305
+ # supporting details.
306
+ # option (google.api.message_visibility).restriction = "TRUSTED_TESTER";
307
+ # @!attribute [rw] abuse_type
308
+ # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::AbuseType]
309
+ # The type of abuse.
310
+ # @!attribute [rw] threat_confidence
311
+ # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::Confidence]
312
+ # Confidence that the URI is unsafe.
313
+ # @!attribute [rw] threat_justification
314
+ # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::ThreatJustification]
315
+ # Context about why the URI is unsafe.
316
+ class ThreatInfo
317
+ include ::Google::Protobuf::MessageExts
318
+ extend ::Google::Protobuf::MessageExts::ClassMethods
319
+
320
+ # Confidence that a URI is unsafe.
321
+ # @!attribute [rw] score
322
+ # @return [::Float]
323
+ # A decimal representation of confidence in the range of 0
324
+ # to 1 where 0 indicates no confidence and 1 indicates
325
+ # complete confidence.
326
+ # @!attribute [rw] level
327
+ # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::Confidence::ConfidenceLevel]
328
+ # Enum representation of confidence.
329
+ class Confidence
330
+ include ::Google::Protobuf::MessageExts
331
+ extend ::Google::Protobuf::MessageExts::ClassMethods
332
+
333
+ # Enum representation of confidence.
334
+ module ConfidenceLevel
335
+ # Default.
336
+ CONFIDENCE_LEVEL_UNSPECIFIED = 0
337
+
338
+ # Less than 60% confidence that the URI is unsafe.
339
+ LOW = 1
340
+
341
+ # Between 60% and 80% confidence that the URI is unsafe.
342
+ MEDIUM = 2
343
+
344
+ # Greater than 80% confidence that the URI is unsafe.
345
+ HIGH = 3
346
+ end
347
+ end
348
+
349
+ # Context about why the URI is unsafe.
350
+ # @!attribute [rw] labels
351
+ # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatInfo::ThreatJustification::JustificationLabel>]
352
+ # Labels associated with this URI that explain how it was classified.
353
+ # @!attribute [rw] comments
354
+ # @return [::Array<::String>]
355
+ # Free-form context on why this URI is unsafe.
356
+ class ThreatJustification
357
+ include ::Google::Protobuf::MessageExts
358
+ extend ::Google::Protobuf::MessageExts::ClassMethods
359
+
360
+ # Labels that explain how the URI was classified.
361
+ module JustificationLabel
362
+ # Default.
363
+ JUSTIFICATION_LABEL_UNSPECIFIED = 0
364
+
365
+ # The submitter manually verified that the submission is unsafe.
366
+ MANUAL_VERIFICATION = 1
367
+
368
+ # The submitter received the submission from an end user.
369
+ USER_REPORT = 2
370
+
371
+ # The submitter received the submission from an automated system.
372
+ AUTOMATED_REPORT = 3
373
+ end
374
+ end
375
+
376
+ # The abuse type found on the URI.
377
+ module AbuseType
378
+ # Default.
379
+ ABUSE_TYPE_UNSPECIFIED = 0
380
+
381
+ # The URI contains malware.
382
+ MALWARE = 1
383
+
384
+ # The URI contains social engineering.
385
+ SOCIAL_ENGINEERING = 2
386
+
387
+ # The URI contains unwanted software.
388
+ UNWANTED_SOFTWARE = 3
389
+ end
390
+ end
391
+
392
+ # Details about how the threat was discovered.
393
+ # @!attribute [rw] platform
394
+ # @return [::Google::Cloud::WebRisk::V1::ThreatDiscovery::Platform]
395
+ # Platform on which the threat was discovered.
396
+ # @!attribute [rw] region_codes
397
+ # @return [::Array<::String>]
398
+ # CLDR region code of the countries/regions the URI poses a threat ordered
399
+ # from most impact to least impact. Example: "US" for United States.
400
+ class ThreatDiscovery
401
+ include ::Google::Protobuf::MessageExts
402
+ extend ::Google::Protobuf::MessageExts::ClassMethods
403
+
404
+ # Platform types.
405
+ module Platform
406
+ # Default.
407
+ PLATFORM_UNSPECIFIED = 0
408
+
409
+ # General Android platform.
410
+ ANDROID = 1
411
+
412
+ # General iOS platform.
413
+ IOS = 2
414
+
415
+ # General macOS platform.
416
+ MACOS = 3
417
+
418
+ # General Windows platform.
419
+ WINDOWS = 4
420
+ end
421
+ end
422
+
296
423
  # Request to send a potentially phishy URI to WebRisk.
297
424
  # @!attribute [rw] parent
298
425
  # @return [::String]
299
- # Required. The name of the project that is making the submission. This string is in
300
- # the format "projects/\\{project_number}".
426
+ # Required. The name of the project that is making the submission. This
427
+ # string is in the format "projects/\\{project_number}".
301
428
  # @!attribute [rw] submission
302
429
  # @return [::Google::Cloud::WebRisk::V1::Submission]
303
430
  # Required. The submission that contains the content of the phishing report.
@@ -306,6 +433,62 @@ module Google
306
433
  extend ::Google::Protobuf::MessageExts::ClassMethods
307
434
  end
308
435
 
436
+ # Request to send a potentially malicious URI to WebRisk.
437
+ # @!attribute [rw] parent
438
+ # @return [::String]
439
+ # Required. The name of the project that is making the submission. This
440
+ # string is in the format "projects/\\{project_number}".
441
+ # @!attribute [rw] submission
442
+ # @return [::Google::Cloud::WebRisk::V1::Submission]
443
+ # Required. The submission that contains the URI to be scanned.
444
+ # @!attribute [rw] threat_info
445
+ # @return [::Google::Cloud::WebRisk::V1::ThreatInfo]
446
+ # Provides additional information about the submission.
447
+ # @!attribute [rw] threat_discovery
448
+ # @return [::Google::Cloud::WebRisk::V1::ThreatDiscovery]
449
+ # Provides additional information about how the submission was discovered.
450
+ class SubmitUriRequest
451
+ include ::Google::Protobuf::MessageExts
452
+ extend ::Google::Protobuf::MessageExts::ClassMethods
453
+ end
454
+
455
+ # Metadata for the Submit URI long-running operation.
456
+ # option (google.api.message_visibility).restriction = "TRUSTED_TESTER";
457
+ # @!attribute [rw] state
458
+ # @return [::Google::Cloud::WebRisk::V1::SubmitUriMetadata::State]
459
+ # The state of the operation.
460
+ # @!attribute [rw] create_time
461
+ # @return [::Google::Protobuf::Timestamp]
462
+ # Creation time of the operation.
463
+ # @!attribute [rw] update_time
464
+ # @return [::Google::Protobuf::Timestamp]
465
+ # Latest update time of the operation.
466
+ class SubmitUriMetadata
467
+ include ::Google::Protobuf::MessageExts
468
+ extend ::Google::Protobuf::MessageExts::ClassMethods
469
+
470
+ # Enum that represents the state of the long-running operation.
471
+ module State
472
+ # Default unspecified state.
473
+ STATE_UNSPECIFIED = 0
474
+
475
+ # The operation is currently running.
476
+ RUNNING = 1
477
+
478
+ # The operation finished with a success status.
479
+ SUCCEEDED = 2
480
+
481
+ # The operation was cancelled.
482
+ CANCELLED = 3
483
+
484
+ # The operation finished with a failure status.
485
+ FAILED = 4
486
+
487
+ # The operation was closed with no action taken.
488
+ CLOSED = 5
489
+ end
490
+ end
491
+
309
492
  # The type of threat. This maps directly to the threat list a threat may
310
493
  # belong to.
311
494
  module ThreatType