google-apis-safebrowsing_v4 0.16.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,6 +36,8 @@ module Google
36
36
  #
37
37
  # @see https://developers.google.com/safe-browsing/
38
38
  class SafebrowsingService < Google::Apis::Core::BaseService
39
+ DEFAULT_ENDPOINT_TEMPLATE = "https://safebrowsing.$UNIVERSE_DOMAIN$/"
40
+
39
41
  # @return [String]
40
42
  # API key. Your API key identifies your project and provides you with API access,
41
43
  # quota, and reports. Required unless you provide an OAuth 2.0 token.
@@ -47,7 +49,7 @@ module Google
47
49
  attr_accessor :quota_user
48
50
 
49
51
  def initialize
50
- super('https://safebrowsing.googleapis.com/', '',
52
+ super(DEFAULT_ENDPOINT_TEMPLATE, '',
51
53
  client_name: 'google-apis-safebrowsing_v4',
52
54
  client_version: Google::Apis::SafebrowsingV4::GEM_VERSION)
53
55
  @batch_path = 'batch'
@@ -70,18 +72,18 @@ module Google
70
72
  # Request-specific options
71
73
  #
72
74
  # @yield [result, err] Result & error if block supplied
73
- # @yieldparam result [Google::Apis::SafebrowsingV4::FindFullHashesResponse] parsed result object
75
+ # @yieldparam result [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindFullHashesResponse] parsed result object
74
76
  # @yieldparam err [StandardError] error object if request failed
75
77
  #
76
- # @return [Google::Apis::SafebrowsingV4::FindFullHashesResponse]
78
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindFullHashesResponse]
77
79
  #
78
80
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
79
81
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
80
82
  # @raise [Google::Apis::AuthorizationError] Authorization is required
81
83
  def get_encoded_full_hash(encoded_request, client_id: nil, client_version: nil, fields: nil, quota_user: nil, options: nil, &block)
82
84
  command = make_simple_command(:get, 'v4/encodedFullHashes/{encodedRequest}', options)
83
- command.response_representation = Google::Apis::SafebrowsingV4::FindFullHashesResponse::Representation
84
- command.response_class = Google::Apis::SafebrowsingV4::FindFullHashesResponse
85
+ command.response_representation = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindFullHashesResponse::Representation
86
+ command.response_class = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindFullHashesResponse
85
87
  command.params['encodedRequest'] = encoded_request unless encoded_request.nil?
86
88
  command.query['clientId'] = client_id unless client_id.nil?
87
89
  command.query['clientVersion'] = client_version unless client_version.nil?
@@ -107,18 +109,18 @@ module Google
107
109
  # Request-specific options
108
110
  #
109
111
  # @yield [result, err] Result & error if block supplied
110
- # @yieldparam result [Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse] parsed result object
112
+ # @yieldparam result [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse] parsed result object
111
113
  # @yieldparam err [StandardError] error object if request failed
112
114
  #
113
- # @return [Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse]
115
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse]
114
116
  #
115
117
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
116
118
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
117
119
  # @raise [Google::Apis::AuthorizationError] Authorization is required
118
120
  def get_encoded_update(encoded_request, client_id: nil, client_version: nil, fields: nil, quota_user: nil, options: nil, &block)
119
121
  command = make_simple_command(:get, 'v4/encodedUpdates/{encodedRequest}', options)
120
- command.response_representation = Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse::Representation
121
- command.response_class = Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse
122
+ command.response_representation = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse::Representation
123
+ command.response_class = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse
122
124
  command.params['encodedRequest'] = encoded_request unless encoded_request.nil?
123
125
  command.query['clientId'] = client_id unless client_id.nil?
124
126
  command.query['clientVersion'] = client_version unless client_version.nil?
@@ -128,7 +130,7 @@ module Google
128
130
  end
129
131
 
130
132
  # Finds the full hashes that match the requested hash prefixes.
131
- # @param [Google::Apis::SafebrowsingV4::FindFullHashesRequest] find_full_hashes_request_object
133
+ # @param [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindFullHashesRequest] google_security_safebrowsing_v4_find_full_hashes_request_object
132
134
  # @param [String] fields
133
135
  # Selector specifying which fields to include in a partial response.
134
136
  # @param [String] quota_user
@@ -138,20 +140,20 @@ module Google
138
140
  # Request-specific options
139
141
  #
140
142
  # @yield [result, err] Result & error if block supplied
141
- # @yieldparam result [Google::Apis::SafebrowsingV4::FindFullHashesResponse] parsed result object
143
+ # @yieldparam result [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindFullHashesResponse] parsed result object
142
144
  # @yieldparam err [StandardError] error object if request failed
143
145
  #
144
- # @return [Google::Apis::SafebrowsingV4::FindFullHashesResponse]
146
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindFullHashesResponse]
145
147
  #
146
148
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
147
149
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
148
150
  # @raise [Google::Apis::AuthorizationError] Authorization is required
149
- def find_full_hashes(find_full_hashes_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
151
+ def find_full_hashes(google_security_safebrowsing_v4_find_full_hashes_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
150
152
  command = make_simple_command(:post, 'v4/fullHashes:find', options)
151
- command.request_representation = Google::Apis::SafebrowsingV4::FindFullHashesRequest::Representation
152
- command.request_object = find_full_hashes_request_object
153
- command.response_representation = Google::Apis::SafebrowsingV4::FindFullHashesResponse::Representation
154
- command.response_class = Google::Apis::SafebrowsingV4::FindFullHashesResponse
153
+ command.request_representation = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindFullHashesRequest::Representation
154
+ command.request_object = google_security_safebrowsing_v4_find_full_hashes_request_object
155
+ command.response_representation = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindFullHashesResponse::Representation
156
+ command.response_class = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindFullHashesResponse
155
157
  command.query['fields'] = fields unless fields.nil?
156
158
  command.query['quotaUser'] = quota_user unless quota_user.nil?
157
159
  execute_or_queue_command(command, &block)
@@ -159,7 +161,7 @@ module Google
159
161
 
160
162
  # Reports a Safe Browsing threat list hit to Google. Only projects with
161
163
  # TRUSTED_REPORTER visibility can use this method.
162
- # @param [Google::Apis::SafebrowsingV4::ThreatHit] threat_hit_object
164
+ # @param [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatHit] google_security_safebrowsing_v4_threat_hit_object
163
165
  # @param [String] fields
164
166
  # Selector specifying which fields to include in a partial response.
165
167
  # @param [String] quota_user
@@ -169,20 +171,20 @@ module Google
169
171
  # Request-specific options
170
172
  #
171
173
  # @yield [result, err] Result & error if block supplied
172
- # @yieldparam result [Google::Apis::SafebrowsingV4::Empty] parsed result object
174
+ # @yieldparam result [Google::Apis::SafebrowsingV4::GoogleProtobufEmpty] parsed result object
173
175
  # @yieldparam err [StandardError] error object if request failed
174
176
  #
175
- # @return [Google::Apis::SafebrowsingV4::Empty]
177
+ # @return [Google::Apis::SafebrowsingV4::GoogleProtobufEmpty]
176
178
  #
177
179
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
178
180
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
179
181
  # @raise [Google::Apis::AuthorizationError] Authorization is required
180
- def create_threat_hit(threat_hit_object = nil, fields: nil, quota_user: nil, options: nil, &block)
182
+ def create_threat_hit(google_security_safebrowsing_v4_threat_hit_object = nil, fields: nil, quota_user: nil, options: nil, &block)
181
183
  command = make_simple_command(:post, 'v4/threatHits', options)
182
- command.request_representation = Google::Apis::SafebrowsingV4::ThreatHit::Representation
183
- command.request_object = threat_hit_object
184
- command.response_representation = Google::Apis::SafebrowsingV4::Empty::Representation
185
- command.response_class = Google::Apis::SafebrowsingV4::Empty
184
+ command.request_representation = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatHit::Representation
185
+ command.request_object = google_security_safebrowsing_v4_threat_hit_object
186
+ command.response_representation = Google::Apis::SafebrowsingV4::GoogleProtobufEmpty::Representation
187
+ command.response_class = Google::Apis::SafebrowsingV4::GoogleProtobufEmpty
186
188
  command.query['fields'] = fields unless fields.nil?
187
189
  command.query['quotaUser'] = quota_user unless quota_user.nil?
188
190
  execute_or_queue_command(command, &block)
@@ -190,7 +192,7 @@ module Google
190
192
 
191
193
  # Fetches the most recent threat list updates. A client can request updates for
192
194
  # multiple lists at once.
193
- # @param [Google::Apis::SafebrowsingV4::FetchThreatListUpdatesRequest] fetch_threat_list_updates_request_object
195
+ # @param [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest] google_security_safebrowsing_v4_fetch_threat_list_updates_request_object
194
196
  # @param [String] fields
195
197
  # Selector specifying which fields to include in a partial response.
196
198
  # @param [String] quota_user
@@ -200,20 +202,20 @@ module Google
200
202
  # Request-specific options
201
203
  #
202
204
  # @yield [result, err] Result & error if block supplied
203
- # @yieldparam result [Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse] parsed result object
205
+ # @yieldparam result [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse] parsed result object
204
206
  # @yieldparam err [StandardError] error object if request failed
205
207
  #
206
- # @return [Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse]
208
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse]
207
209
  #
208
210
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
209
211
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
210
212
  # @raise [Google::Apis::AuthorizationError] Authorization is required
211
- def fetch_threat_list_updates(fetch_threat_list_updates_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
213
+ def fetch_threat_list_updates(google_security_safebrowsing_v4_fetch_threat_list_updates_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
212
214
  command = make_simple_command(:post, 'v4/threatListUpdates:fetch', options)
213
- command.request_representation = Google::Apis::SafebrowsingV4::FetchThreatListUpdatesRequest::Representation
214
- command.request_object = fetch_threat_list_updates_request_object
215
- command.response_representation = Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse::Representation
216
- command.response_class = Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse
215
+ command.request_representation = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest::Representation
216
+ command.request_object = google_security_safebrowsing_v4_fetch_threat_list_updates_request_object
217
+ command.response_representation = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse::Representation
218
+ command.response_class = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse
217
219
  command.query['fields'] = fields unless fields.nil?
218
220
  command.query['quotaUser'] = quota_user unless quota_user.nil?
219
221
  execute_or_queue_command(command, &block)
@@ -229,25 +231,25 @@ module Google
229
231
  # Request-specific options
230
232
  #
231
233
  # @yield [result, err] Result & error if block supplied
232
- # @yieldparam result [Google::Apis::SafebrowsingV4::ListThreatListsResponse] parsed result object
234
+ # @yieldparam result [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ListThreatListsResponse] parsed result object
233
235
  # @yieldparam err [StandardError] error object if request failed
234
236
  #
235
- # @return [Google::Apis::SafebrowsingV4::ListThreatListsResponse]
237
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ListThreatListsResponse]
236
238
  #
237
239
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
238
240
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
239
241
  # @raise [Google::Apis::AuthorizationError] Authorization is required
240
242
  def list_threat_lists(fields: nil, quota_user: nil, options: nil, &block)
241
243
  command = make_simple_command(:get, 'v4/threatLists', options)
242
- command.response_representation = Google::Apis::SafebrowsingV4::ListThreatListsResponse::Representation
243
- command.response_class = Google::Apis::SafebrowsingV4::ListThreatListsResponse
244
+ command.response_representation = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ListThreatListsResponse::Representation
245
+ command.response_class = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ListThreatListsResponse
244
246
  command.query['fields'] = fields unless fields.nil?
245
247
  command.query['quotaUser'] = quota_user unless quota_user.nil?
246
248
  execute_or_queue_command(command, &block)
247
249
  end
248
250
 
249
251
  # Finds the threat entries that match the Safe Browsing lists.
250
- # @param [Google::Apis::SafebrowsingV4::FindThreatMatchesRequest] find_threat_matches_request_object
252
+ # @param [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindThreatMatchesRequest] google_security_safebrowsing_v4_find_threat_matches_request_object
251
253
  # @param [String] fields
252
254
  # Selector specifying which fields to include in a partial response.
253
255
  # @param [String] quota_user
@@ -257,20 +259,20 @@ module Google
257
259
  # Request-specific options
258
260
  #
259
261
  # @yield [result, err] Result & error if block supplied
260
- # @yieldparam result [Google::Apis::SafebrowsingV4::FindThreatMatchesResponse] parsed result object
262
+ # @yieldparam result [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindThreatMatchesResponse] parsed result object
261
263
  # @yieldparam err [StandardError] error object if request failed
262
264
  #
263
- # @return [Google::Apis::SafebrowsingV4::FindThreatMatchesResponse]
265
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindThreatMatchesResponse]
264
266
  #
265
267
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
266
268
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
267
269
  # @raise [Google::Apis::AuthorizationError] Authorization is required
268
- def find_threat_matches(find_threat_matches_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
270
+ def find_threat_matches(google_security_safebrowsing_v4_find_threat_matches_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
269
271
  command = make_simple_command(:post, 'v4/threatMatches:find', options)
270
- command.request_representation = Google::Apis::SafebrowsingV4::FindThreatMatchesRequest::Representation
271
- command.request_object = find_threat_matches_request_object
272
- command.response_representation = Google::Apis::SafebrowsingV4::FindThreatMatchesResponse::Representation
273
- command.response_class = Google::Apis::SafebrowsingV4::FindThreatMatchesResponse
272
+ command.request_representation = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindThreatMatchesRequest::Representation
273
+ command.request_object = google_security_safebrowsing_v4_find_threat_matches_request_object
274
+ command.response_representation = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindThreatMatchesResponse::Representation
275
+ command.response_class = Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FindThreatMatchesResponse
274
276
  command.query['fields'] = fields unless fields.nil?
275
277
  command.query['quotaUser'] = quota_user unless quota_user.nil?
276
278
  execute_or_queue_command(command, &block)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-safebrowsing_v4
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-12 00:00:00.000000000 Z
11
+ date: 2024-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.1
19
+ version: 0.12.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.9.1
29
+ version: 0.12.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-safebrowsing_v4/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-safebrowsing_v4/v0.16.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-safebrowsing_v4/v0.18.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-safebrowsing_v4
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.4.2
78
+ rubygems_version: 3.5.3
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Safe Browsing API V4