google-cloud-web_risk-v1beta1 0.5.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,219 @@
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/v1beta1/webrisk_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module WebRisk
24
+ module V1beta1
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::V1beta1::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::V1beta1::ComputeThreatListDiffResponse]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::WebRisk::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::SearchUrisResponse]
91
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
92
+ #
93
+ # @return [::Google::Cloud::WebRisk::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::SearchHashesResponse]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Cloud::WebRisk::V1beta1::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::V1beta1::SearchHashesResponse.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
157
+ ##
158
+ # @private
159
+ #
160
+ # GRPC transcoding helper method for the compute_threat_list_diff REST call
161
+ #
162
+ # @param request_pb [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest]
163
+ # A request object representing the call parameters. Required.
164
+ # @return [Array(String, [String, nil], Hash{String => String})]
165
+ # Uri, Body, Query string parameters
166
+ def self.transcode_compute_threat_list_diff_request request_pb
167
+ transcoder = Gapic::Rest::GrpcTranscoder.new
168
+ .with_bindings(
169
+ uri_method: :get,
170
+ uri_template: "/v1beta1/threatLists:computeDiff",
171
+ matches: []
172
+ )
173
+ transcoder.transcode request_pb
174
+ end
175
+
176
+ ##
177
+ # @private
178
+ #
179
+ # GRPC transcoding helper method for the search_uris REST call
180
+ #
181
+ # @param request_pb [::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest]
182
+ # A request object representing the call parameters. Required.
183
+ # @return [Array(String, [String, nil], Hash{String => String})]
184
+ # Uri, Body, Query string parameters
185
+ def self.transcode_search_uris_request request_pb
186
+ transcoder = Gapic::Rest::GrpcTranscoder.new
187
+ .with_bindings(
188
+ uri_method: :get,
189
+ uri_template: "/v1beta1/uris:search",
190
+ matches: []
191
+ )
192
+ transcoder.transcode request_pb
193
+ end
194
+
195
+ ##
196
+ # @private
197
+ #
198
+ # GRPC transcoding helper method for the search_hashes REST call
199
+ #
200
+ # @param request_pb [::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest]
201
+ # A request object representing the call parameters. Required.
202
+ # @return [Array(String, [String, nil], Hash{String => String})]
203
+ # Uri, Body, Query string parameters
204
+ def self.transcode_search_hashes_request request_pb
205
+ transcoder = Gapic::Rest::GrpcTranscoder.new
206
+ .with_bindings(
207
+ uri_method: :get,
208
+ uri_template: "/v1beta1/hashes:search",
209
+ matches: []
210
+ )
211
+ transcoder.transcode request_pb
212
+ end
213
+ end
214
+ end
215
+ end
216
+ end
217
+ end
218
+ end
219
+ end
@@ -0,0 +1,52 @@
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/v1beta1/version"
24
+
25
+ require "google/cloud/web_risk/v1beta1/web_risk_service/credentials"
26
+ require "google/cloud/web_risk/v1beta1/web_risk_service/rest/client"
27
+
28
+ module Google
29
+ module Cloud
30
+ module WebRisk
31
+ module V1beta1
32
+ ##
33
+ # Web Risk v1beta1 API defines an interface to detect malicious URLs on your
34
+ # website and in client applications.
35
+ #
36
+ # To load this service and instantiate a REST client:
37
+ #
38
+ # require "google/cloud/web_risk/v1beta1/web_risk_service/rest"
39
+ # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new
40
+ #
41
+ module WebRiskService
42
+ # Client for the REST transport
43
+ module Rest
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
52
+ require "google/cloud/web_risk/v1beta1/web_risk_service/rest/helpers" if ::File.file? helper_path
@@ -24,6 +24,7 @@ require "google/cloud/web_risk/v1beta1/version"
24
24
 
25
25
  require "google/cloud/web_risk/v1beta1/web_risk_service/credentials"
26
26
  require "google/cloud/web_risk/v1beta1/web_risk_service/client"
27
+ require "google/cloud/web_risk/v1beta1/web_risk_service/rest"
27
28
 
28
29
  module Google
29
30
  module Cloud
@@ -33,11 +34,16 @@ module Google
33
34
  # Web Risk v1beta1 API defines an interface to detect malicious URLs on your
34
35
  # website and in client applications.
35
36
  #
36
- # To load this service and instantiate a client:
37
+ # @example Load this service and instantiate a gRPC client
37
38
  #
38
39
  # require "google/cloud/web_risk/v1beta1/web_risk_service"
39
40
  # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
40
41
  #
42
+ # @example Load this service and instantiate a REST client
43
+ #
44
+ # require "google/cloud/web_risk/v1beta1/web_risk_service/rest"
45
+ # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new
46
+ #
41
47
  module WebRiskService
42
48
  end
43
49
  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/v1beta1"
31
31
  # client = ::Google::Cloud::WebRisk::V1beta1::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/v1beta1"
36
+ # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new
37
+ #
33
38
  module V1beta1
34
39
  end
35
40
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/webrisk/v1beta1/webrisk.proto
3
4
 
@@ -8,91 +9,32 @@ require 'google/api/client_pb'
8
9
  require 'google/api/field_behavior_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
 
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_file("google/cloud/webrisk/v1beta1/webrisk.proto", :syntax => :proto3) do
13
- add_message "google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest" do
14
- optional :threat_type, :enum, 1, "google.cloud.webrisk.v1beta1.ThreatType"
15
- optional :version_token, :bytes, 2
16
- optional :constraints, :message, 3, "google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints"
17
- end
18
- add_message "google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints" do
19
- optional :max_diff_entries, :int32, 1
20
- optional :max_database_entries, :int32, 2
21
- repeated :supported_compressions, :enum, 3, "google.cloud.webrisk.v1beta1.CompressionType"
22
- end
23
- add_message "google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse" do
24
- optional :response_type, :enum, 4, "google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType"
25
- optional :additions, :message, 5, "google.cloud.webrisk.v1beta1.ThreatEntryAdditions"
26
- optional :removals, :message, 6, "google.cloud.webrisk.v1beta1.ThreatEntryRemovals"
27
- optional :new_version_token, :bytes, 7
28
- optional :checksum, :message, 8, "google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum"
29
- optional :recommended_next_diff, :message, 2, "google.protobuf.Timestamp"
30
- end
31
- add_message "google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum" do
32
- optional :sha256, :bytes, 1
33
- end
34
- add_enum "google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType" do
35
- value :RESPONSE_TYPE_UNSPECIFIED, 0
36
- value :DIFF, 1
37
- value :RESET, 2
38
- end
39
- add_message "google.cloud.webrisk.v1beta1.SearchUrisRequest" do
40
- optional :uri, :string, 1
41
- repeated :threat_types, :enum, 2, "google.cloud.webrisk.v1beta1.ThreatType"
42
- end
43
- add_message "google.cloud.webrisk.v1beta1.SearchUrisResponse" do
44
- optional :threat, :message, 1, "google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri"
45
- end
46
- add_message "google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri" do
47
- repeated :threat_types, :enum, 1, "google.cloud.webrisk.v1beta1.ThreatType"
48
- optional :expire_time, :message, 2, "google.protobuf.Timestamp"
49
- end
50
- add_message "google.cloud.webrisk.v1beta1.SearchHashesRequest" do
51
- optional :hash_prefix, :bytes, 1
52
- repeated :threat_types, :enum, 2, "google.cloud.webrisk.v1beta1.ThreatType"
53
- end
54
- add_message "google.cloud.webrisk.v1beta1.SearchHashesResponse" do
55
- repeated :threats, :message, 1, "google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash"
56
- optional :negative_expire_time, :message, 2, "google.protobuf.Timestamp"
57
- end
58
- add_message "google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash" do
59
- repeated :threat_types, :enum, 1, "google.cloud.webrisk.v1beta1.ThreatType"
60
- optional :hash, :bytes, 2
61
- optional :expire_time, :message, 3, "google.protobuf.Timestamp"
62
- end
63
- add_message "google.cloud.webrisk.v1beta1.ThreatEntryAdditions" do
64
- repeated :raw_hashes, :message, 1, "google.cloud.webrisk.v1beta1.RawHashes"
65
- optional :rice_hashes, :message, 2, "google.cloud.webrisk.v1beta1.RiceDeltaEncoding"
66
- end
67
- add_message "google.cloud.webrisk.v1beta1.ThreatEntryRemovals" do
68
- optional :raw_indices, :message, 1, "google.cloud.webrisk.v1beta1.RawIndices"
69
- optional :rice_indices, :message, 2, "google.cloud.webrisk.v1beta1.RiceDeltaEncoding"
70
- end
71
- add_message "google.cloud.webrisk.v1beta1.RawIndices" do
72
- repeated :indices, :int32, 1
73
- end
74
- add_message "google.cloud.webrisk.v1beta1.RawHashes" do
75
- optional :prefix_size, :int32, 1
76
- optional :raw_hashes, :bytes, 2
77
- end
78
- add_message "google.cloud.webrisk.v1beta1.RiceDeltaEncoding" do
79
- optional :first_value, :int64, 1
80
- optional :rice_parameter, :int32, 2
81
- optional :entry_count, :int32, 3
82
- optional :encoded_data, :bytes, 4
83
- end
84
- add_enum "google.cloud.webrisk.v1beta1.ThreatType" do
85
- value :THREAT_TYPE_UNSPECIFIED, 0
86
- value :MALWARE, 1
87
- value :SOCIAL_ENGINEERING, 2
88
- value :UNWANTED_SOFTWARE, 3
89
- end
90
- add_enum "google.cloud.webrisk.v1beta1.CompressionType" do
91
- value :COMPRESSION_TYPE_UNSPECIFIED, 0
92
- value :RAW, 1
93
- value :RICE, 2
12
+
13
+ descriptor_data = "\n*google/cloud/webrisk/v1beta1/webrisk.proto\x12\x1cgoogle.cloud.webrisk.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf2\x02\n\x1c\x43omputeThreatListDiffRequest\x12\x42\n\x0bthreat_type\x18\x01 \x01(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatTypeB\x03\xe0\x41\x02\x12\x15\n\rversion_token\x18\x02 \x01(\x0c\x12`\n\x0b\x63onstraints\x18\x03 \x01(\x0b\x32\x46.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsB\x03\xe0\x41\x02\x1a\x94\x01\n\x0b\x43onstraints\x12\x18\n\x10max_diff_entries\x18\x01 \x01(\x05\x12\x1c\n\x14max_database_entries\x18\x02 \x01(\x05\x12M\n\x16supported_compressions\x18\x03 \x03(\x0e\x32-.google.cloud.webrisk.v1beta1.CompressionType\"\x9a\x04\n\x1d\x43omputeThreatListDiffResponse\x12_\n\rresponse_type\x18\x04 \x01(\x0e\x32H.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType\x12\x45\n\tadditions\x18\x05 \x01(\x0b\x32\x32.google.cloud.webrisk.v1beta1.ThreatEntryAdditions\x12\x43\n\x08removals\x18\x06 \x01(\x0b\x32\x31.google.cloud.webrisk.v1beta1.ThreatEntryRemovals\x12\x19\n\x11new_version_token\x18\x07 \x01(\x0c\x12V\n\x08\x63hecksum\x18\x08 \x01(\x0b\x32\x44.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum\x12\x39\n\x15recommended_next_diff\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x1a\n\x08\x43hecksum\x12\x0e\n\x06sha256\x18\x01 \x01(\x0c\"B\n\x0cResponseType\x12\x1d\n\x19RESPONSE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44IFF\x10\x01\x12\t\n\x05RESET\x10\x02\"j\n\x11SearchUrisRequest\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x0cthreat_types\x18\x02 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatTypeB\x03\xe0\x41\x02\"\xde\x01\n\x12SearchUrisResponse\x12J\n\x06threat\x18\x01 \x01(\x0b\x32:.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri\x1a|\n\tThreatUri\x12>\n\x0cthreat_types\x18\x01 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatType\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"o\n\x13SearchHashesRequest\x12\x13\n\x0bhash_prefix\x18\x01 \x01(\x0c\x12\x43\n\x0cthreat_types\x18\x02 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatTypeB\x03\xe0\x41\x02\"\xae\x02\n\x14SearchHashesResponse\x12N\n\x07threats\x18\x01 \x03(\x0b\x32=.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash\x12\x38\n\x14negative_expire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x8b\x01\n\nThreatHash\x12>\n\x0cthreat_types\x18\x01 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatType\x12\x0c\n\x04hash\x18\x02 \x01(\x0c\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x99\x01\n\x14ThreatEntryAdditions\x12;\n\nraw_hashes\x18\x01 \x03(\x0b\x32\'.google.cloud.webrisk.v1beta1.RawHashes\x12\x44\n\x0brice_hashes\x18\x02 \x01(\x0b\x32/.google.cloud.webrisk.v1beta1.RiceDeltaEncoding\"\x9b\x01\n\x13ThreatEntryRemovals\x12=\n\x0braw_indices\x18\x01 \x01(\x0b\x32(.google.cloud.webrisk.v1beta1.RawIndices\x12\x45\n\x0crice_indices\x18\x02 \x01(\x0b\x32/.google.cloud.webrisk.v1beta1.RiceDeltaEncoding\"\x1d\n\nRawIndices\x12\x0f\n\x07indices\x18\x01 \x03(\x05\"4\n\tRawHashes\x12\x13\n\x0bprefix_size\x18\x01 \x01(\x05\x12\x12\n\nraw_hashes\x18\x02 \x01(\x0c\"k\n\x11RiceDeltaEncoding\x12\x13\n\x0b\x66irst_value\x18\x01 \x01(\x03\x12\x16\n\x0erice_parameter\x18\x02 \x01(\x05\x12\x13\n\x0b\x65ntry_count\x18\x03 \x01(\x05\x12\x14\n\x0c\x65ncoded_data\x18\x04 \x01(\x0c*e\n\nThreatType\x12\x1b\n\x17THREAT_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07MALWARE\x10\x01\x12\x16\n\x12SOCIAL_ENGINEERING\x10\x02\x12\x15\n\x11UNWANTED_SOFTWARE\x10\x03*F\n\x0f\x43ompressionType\x12 \n\x1c\x43OMPRESSION_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x08\n\x04RICE\x10\x02\x32\x9e\x05\n\x15WebRiskServiceV1Beta1\x12\xe2\x01\n\x15\x43omputeThreatListDiff\x12:.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest\x1a;.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse\"P\x82\xd3\xe4\x93\x02\"\x12 /v1beta1/threatLists:computeDiff\xda\x41%threat_type,version_token,constraints\x12\xa0\x01\n\nSearchUris\x12/.google.cloud.webrisk.v1beta1.SearchUrisRequest\x1a\x30.google.cloud.webrisk.v1beta1.SearchUrisResponse\"/\x82\xd3\xe4\x93\x02\x16\x12\x14/v1beta1/uris:search\xda\x41\x10uri,threat_types\x12\xb0\x01\n\x0cSearchHashes\x12\x31.google.cloud.webrisk.v1beta1.SearchHashesRequest\x1a\x32.google.cloud.webrisk.v1beta1.SearchHashesResponse\"9\x82\xd3\xe4\x93\x02\x18\x12\x16/v1beta1/hashes:search\xda\x41\x18hash_prefix,threat_types\x1aJ\xca\x41\x16webrisk.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xcf\x01\n\x1a\x63om.google.webrisk.v1beta1B\x0cWebRiskProtoP\x01Z:cloud.google.com/go/webrisk/apiv1beta1/webriskpb;webriskpb\xa2\x02\x04GCWR\xaa\x02\x1cGoogle.Cloud.WebRisk.V1Beta1\xca\x02\x1cGoogle\\Cloud\\WebRisk\\V1beta1\xea\x02\x1fGoogle::Cloud::WebRisk::V1beta1b\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+
17
+ begin
18
+ pool.add_serialized_file(descriptor_data)
19
+ rescue TypeError => e
20
+ # Compatibility code: will be removed in the next major version.
21
+ require 'google/protobuf/descriptor_pb'
22
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
23
+ parsed.clear_dependency
24
+ serialized = parsed.class.encode(parsed)
25
+ file = pool.add_serialized_file(serialized)
26
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
+ imports = [
28
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
29
+ ]
30
+ imports.each do |type_name, expected_filename|
31
+ import_file = pool.lookup(type_name).file_descriptor
32
+ if import_file.name != expected_filename
33
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
94
34
  end
95
35
  end
36
+ warn "Each proto file must use a consistent fully-qualified name."
37
+ warn "This will become an error in the next major version."
96
38
  end
97
39
 
98
40
  module Google