google-api-client 0.47.0 → 0.48.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release-please.yml +77 -0
- data/CHANGELOG.md +64 -0
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/service.rb +1 -1
- data/generated/google/apis/billingbudgets_v1.rb +1 -1
- data/generated/google/apis/billingbudgets_v1/classes.rb +11 -0
- data/generated/google/apis/billingbudgets_v1/representations.rb +1 -0
- data/generated/google/apis/billingbudgets_v1beta1.rb +1 -1
- data/generated/google/apis/billingbudgets_v1beta1/classes.rb +11 -0
- data/generated/google/apis/billingbudgets_v1beta1/representations.rb +1 -0
- data/generated/google/apis/cloudasset_v1.rb +1 -1
- data/generated/google/apis/cloudasset_v1/classes.rb +697 -0
- data/generated/google/apis/cloudasset_v1/representations.rb +304 -0
- data/generated/google/apis/cloudasset_v1/service.rb +171 -0
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +238 -14
- data/generated/google/apis/compute_v1/representations.rb +41 -0
- data/generated/google/apis/compute_v1/service.rb +2 -0
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/service.rb +7 -7
- data/generated/google/apis/content_v2_1.rb +3 -4
- data/generated/google/apis/content_v2_1/classes.rb +899 -1054
- data/generated/google/apis/content_v2_1/representations.rb +206 -0
- data/generated/google/apis/content_v2_1/service.rb +912 -808
- data/generated/google/apis/datacatalog_v1beta1.rb +1 -1
- data/generated/google/apis/datacatalog_v1beta1/classes.rb +24 -0
- data/generated/google/apis/datacatalog_v1beta1/representations.rb +5 -0
- data/generated/google/apis/dataflow_v1b3.rb +1 -1
- data/generated/google/apis/dataflow_v1b3/classes.rb +12 -0
- data/generated/google/apis/dataflow_v1b3/representations.rb +3 -0
- data/generated/google/apis/datalabeling_v1beta1.rb +34 -0
- data/generated/google/apis/datalabeling_v1beta1/classes.rb +6207 -0
- data/generated/google/apis/datalabeling_v1beta1/representations.rb +3156 -0
- data/generated/google/apis/datalabeling_v1beta1/service.rb +1762 -0
- data/generated/google/apis/datastore_v1.rb +1 -1
- data/generated/google/apis/datastore_v1/classes.rb +4 -4
- data/generated/google/apis/datastore_v1beta3.rb +1 -1
- data/generated/google/apis/datastore_v1beta3/classes.rb +4 -4
- data/generated/google/apis/deploymentmanager_v2.rb +6 -4
- data/generated/google/apis/deploymentmanager_v2/classes.rb +203 -558
- data/generated/google/apis/deploymentmanager_v2/representations.rb +0 -132
- data/generated/google/apis/deploymentmanager_v2/service.rb +169 -213
- data/generated/google/apis/deploymentmanager_v2beta.rb +6 -5
- data/generated/google/apis/deploymentmanager_v2beta/classes.rb +247 -609
- data/generated/google/apis/deploymentmanager_v2beta/representations.rb +0 -132
- data/generated/google/apis/deploymentmanager_v2beta/service.rb +278 -359
- data/generated/google/apis/dialogflow_v2.rb +1 -1
- data/generated/google/apis/dialogflow_v2/classes.rb +20 -2
- data/generated/google/apis/dialogflow_v2/representations.rb +5 -2
- data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
- data/generated/google/apis/dialogflow_v2beta1/classes.rb +20 -2
- data/generated/google/apis/dialogflow_v2beta1/representations.rb +5 -2
- data/generated/google/apis/dialogflow_v3beta1.rb +1 -1
- data/generated/google/apis/dialogflow_v3beta1/classes.rb +40 -2
- data/generated/google/apis/dialogflow_v3beta1/representations.rb +7 -2
- data/generated/google/apis/displayvideo_v1.rb +1 -1
- data/generated/google/apis/displayvideo_v1/classes.rb +178 -0
- data/generated/google/apis/displayvideo_v1/representations.rb +77 -0
- data/generated/google/apis/displayvideo_v1/service.rb +249 -9
- data/generated/google/apis/domains_v1alpha2.rb +1 -1
- data/generated/google/apis/domains_v1alpha2/classes.rb +6 -0
- data/generated/google/apis/domains_v1alpha2/representations.rb +1 -0
- data/generated/google/apis/domains_v1beta1.rb +1 -1
- data/generated/google/apis/domains_v1beta1/classes.rb +6 -0
- data/generated/google/apis/domains_v1beta1/representations.rb +1 -0
- data/generated/google/apis/eventarc_v1beta1.rb +1 -1
- data/generated/google/apis/eventarc_v1beta1/classes.rb +1 -3
- data/generated/google/apis/firebase_v1beta1.rb +1 -1
- data/generated/google/apis/firebase_v1beta1/service.rb +17 -4
- data/generated/google/apis/firebasehosting_v1beta1.rb +1 -1
- data/generated/google/apis/firebasehosting_v1beta1/classes.rb +2 -0
- data/generated/google/apis/firestore_v1.rb +1 -1
- data/generated/google/apis/firestore_v1/classes.rb +4 -4
- data/generated/google/apis/firestore_v1beta1.rb +1 -1
- data/generated/google/apis/firestore_v1beta1/classes.rb +4 -4
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/games_v1/classes.rb +300 -0
- data/generated/google/apis/games_v1/representations.rb +116 -0
- data/generated/google/apis/games_v1/service.rb +34 -0
- data/generated/google/apis/gameservices_v1.rb +1 -1
- data/generated/google/apis/gameservices_v1beta.rb +1 -1
- data/generated/google/apis/iam_v1.rb +2 -5
- data/generated/google/apis/iam_v1/service.rb +1 -4
- data/generated/google/apis/iamcredentials_v1.rb +3 -4
- data/generated/google/apis/iamcredentials_v1/service.rb +2 -3
- data/generated/google/apis/logging_v2.rb +1 -1
- data/generated/google/apis/logging_v2/classes.rb +72 -0
- data/generated/google/apis/logging_v2/representations.rb +32 -0
- data/generated/google/apis/logging_v2/service.rb +345 -0
- data/generated/google/apis/people_v1.rb +1 -1
- data/generated/google/apis/people_v1/classes.rb +4 -4
- data/generated/google/apis/people_v1/service.rb +12 -12
- data/generated/google/apis/privateca_v1beta1.rb +34 -0
- data/generated/google/apis/privateca_v1beta1/classes.rb +2466 -0
- data/generated/google/apis/privateca_v1beta1/representations.rb +996 -0
- data/generated/google/apis/privateca_v1beta1/service.rb +1487 -0
- data/generated/google/apis/recommendationengine_v1beta1.rb +1 -1
- data/generated/google/apis/recommendationengine_v1beta1/classes.rb +32 -0
- data/generated/google/apis/recommendationengine_v1beta1/representations.rb +25 -0
- data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
- data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +1 -2
- data/generated/google/apis/safebrowsing_v4.rb +35 -0
- data/generated/google/apis/safebrowsing_v4/classes.rb +909 -0
- data/generated/google/apis/safebrowsing_v4/representations.rb +445 -0
- data/generated/google/apis/safebrowsing_v4/service.rb +286 -0
- data/generated/google/apis/secretmanager_v1.rb +1 -1
- data/generated/google/apis/secretmanager_v1/classes.rb +1 -2
- data/generated/google/apis/secretmanager_v1beta1.rb +1 -1
- data/generated/google/apis/secretmanager_v1beta1/classes.rb +1 -2
- data/generated/google/apis/servicecontrol_v1.rb +1 -1
- data/generated/google/apis/servicecontrol_v1/classes.rb +45 -0
- data/generated/google/apis/servicecontrol_v1/representations.rb +6 -0
- data/generated/google/apis/servicecontrol_v2.rb +1 -1
- data/generated/google/apis/servicecontrol_v2/classes.rb +45 -0
- data/generated/google/apis/servicecontrol_v2/representations.rb +6 -0
- data/generated/google/apis/servicemanagement_v1.rb +1 -1
- data/generated/google/apis/servicemanagement_v1/classes.rb +1 -60
- data/generated/google/apis/servicemanagement_v1/representations.rb +0 -18
- data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
- data/generated/google/apis/serviceusage_v1beta1/classes.rb +30 -0
- data/generated/google/apis/serviceusage_v1beta1/representations.rb +15 -0
- data/generated/google/apis/serviceusage_v1beta1/service.rb +36 -0
- data/generated/google/apis/smartdevicemanagement_v1.rb +1 -1
- data/generated/google/apis/smartdevicemanagement_v1/classes.rb +0 -34
- data/generated/google/apis/smartdevicemanagement_v1/representations.rb +0 -16
- data/generated/google/apis/smartdevicemanagement_v1/service.rb +3 -8
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +28 -4
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +3 -0
- data/generated/google/apis/storagetransfer_v1.rb +1 -1
- data/generated/google/apis/storagetransfer_v1/classes.rb +14 -5
- data/generated/google/apis/toolresults_v1beta3.rb +1 -1
- data/generated/google/apis/toolresults_v1beta3/classes.rb +13 -0
- data/generated/google/apis/toolresults_v1beta3/representations.rb +12 -0
- data/generated/google/apis/translate_v3.rb +1 -1
- data/generated/google/apis/translate_v3/classes.rb +2 -1
- data/generated/google/apis/translate_v3beta1.rb +1 -1
- data/generated/google/apis/translate_v3beta1/classes.rb +2 -1
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +16 -16
- data/generated/google/apis/vision_v1p1beta1.rb +1 -1
- data/generated/google/apis/vision_v1p1beta1/classes.rb +16 -16
- data/generated/google/apis/vision_v1p2beta1.rb +1 -1
- data/generated/google/apis/vision_v1p2beta1/classes.rb +16 -16
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/service.rb +2 -2
- data/lib/google/apis/version.rb +1 -1
- metadata +16 -3
@@ -0,0 +1,445 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module SafebrowsingV4
|
24
|
+
|
25
|
+
class Checksum
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class ClientInfo
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class Constraints
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class Empty
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class FetchThreatListUpdatesRequest
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class FetchThreatListUpdatesResponse
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class FindFullHashesRequest
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class FindFullHashesResponse
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class FindThreatMatchesRequest
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class FindThreatMatchesResponse
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class ListThreatListsResponse
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class ListUpdateRequest
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class ListUpdateResponse
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class MetadataEntry
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class RawHashes
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
115
|
+
class RawIndices
|
116
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
117
|
+
|
118
|
+
include Google::Apis::Core::JsonObjectSupport
|
119
|
+
end
|
120
|
+
|
121
|
+
class RiceDeltaEncoding
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
|
+
|
124
|
+
include Google::Apis::Core::JsonObjectSupport
|
125
|
+
end
|
126
|
+
|
127
|
+
class ThreatEntry
|
128
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
129
|
+
|
130
|
+
include Google::Apis::Core::JsonObjectSupport
|
131
|
+
end
|
132
|
+
|
133
|
+
class ThreatEntryMetadata
|
134
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
135
|
+
|
136
|
+
include Google::Apis::Core::JsonObjectSupport
|
137
|
+
end
|
138
|
+
|
139
|
+
class ThreatEntrySet
|
140
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
141
|
+
|
142
|
+
include Google::Apis::Core::JsonObjectSupport
|
143
|
+
end
|
144
|
+
|
145
|
+
class ThreatHit
|
146
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
147
|
+
|
148
|
+
include Google::Apis::Core::JsonObjectSupport
|
149
|
+
end
|
150
|
+
|
151
|
+
class ThreatInfo
|
152
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
153
|
+
|
154
|
+
include Google::Apis::Core::JsonObjectSupport
|
155
|
+
end
|
156
|
+
|
157
|
+
class ThreatListDescriptor
|
158
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
159
|
+
|
160
|
+
include Google::Apis::Core::JsonObjectSupport
|
161
|
+
end
|
162
|
+
|
163
|
+
class ThreatMatch
|
164
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
165
|
+
|
166
|
+
include Google::Apis::Core::JsonObjectSupport
|
167
|
+
end
|
168
|
+
|
169
|
+
class ThreatSource
|
170
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
171
|
+
|
172
|
+
include Google::Apis::Core::JsonObjectSupport
|
173
|
+
end
|
174
|
+
|
175
|
+
class UserInfo
|
176
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
177
|
+
|
178
|
+
include Google::Apis::Core::JsonObjectSupport
|
179
|
+
end
|
180
|
+
|
181
|
+
class Checksum
|
182
|
+
# @private
|
183
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
184
|
+
property :sha256, :base64 => true, as: 'sha256'
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
class ClientInfo
|
189
|
+
# @private
|
190
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
191
|
+
property :client_id, as: 'clientId'
|
192
|
+
property :client_version, as: 'clientVersion'
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
class Constraints
|
197
|
+
# @private
|
198
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
199
|
+
property :device_location, as: 'deviceLocation'
|
200
|
+
property :language, as: 'language'
|
201
|
+
property :max_database_entries, as: 'maxDatabaseEntries'
|
202
|
+
property :max_update_entries, as: 'maxUpdateEntries'
|
203
|
+
property :region, as: 'region'
|
204
|
+
collection :supported_compressions, as: 'supportedCompressions'
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
class Empty
|
209
|
+
# @private
|
210
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
class FetchThreatListUpdatesRequest
|
215
|
+
# @private
|
216
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
217
|
+
property :client, as: 'client', class: Google::Apis::SafebrowsingV4::ClientInfo, decorator: Google::Apis::SafebrowsingV4::ClientInfo::Representation
|
218
|
+
|
219
|
+
collection :list_update_requests, as: 'listUpdateRequests', class: Google::Apis::SafebrowsingV4::ListUpdateRequest, decorator: Google::Apis::SafebrowsingV4::ListUpdateRequest::Representation
|
220
|
+
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
class FetchThreatListUpdatesResponse
|
225
|
+
# @private
|
226
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
227
|
+
collection :list_update_responses, as: 'listUpdateResponses', class: Google::Apis::SafebrowsingV4::ListUpdateResponse, decorator: Google::Apis::SafebrowsingV4::ListUpdateResponse::Representation
|
228
|
+
|
229
|
+
property :minimum_wait_duration, as: 'minimumWaitDuration'
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
class FindFullHashesRequest
|
234
|
+
# @private
|
235
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
236
|
+
property :api_client, as: 'apiClient', class: Google::Apis::SafebrowsingV4::ClientInfo, decorator: Google::Apis::SafebrowsingV4::ClientInfo::Representation
|
237
|
+
|
238
|
+
property :client, as: 'client', class: Google::Apis::SafebrowsingV4::ClientInfo, decorator: Google::Apis::SafebrowsingV4::ClientInfo::Representation
|
239
|
+
|
240
|
+
collection :client_states, as: 'clientStates'
|
241
|
+
property :threat_info, as: 'threatInfo', class: Google::Apis::SafebrowsingV4::ThreatInfo, decorator: Google::Apis::SafebrowsingV4::ThreatInfo::Representation
|
242
|
+
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
class FindFullHashesResponse
|
247
|
+
# @private
|
248
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
249
|
+
collection :matches, as: 'matches', class: Google::Apis::SafebrowsingV4::ThreatMatch, decorator: Google::Apis::SafebrowsingV4::ThreatMatch::Representation
|
250
|
+
|
251
|
+
property :minimum_wait_duration, as: 'minimumWaitDuration'
|
252
|
+
property :negative_cache_duration, as: 'negativeCacheDuration'
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
class FindThreatMatchesRequest
|
257
|
+
# @private
|
258
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
259
|
+
property :client, as: 'client', class: Google::Apis::SafebrowsingV4::ClientInfo, decorator: Google::Apis::SafebrowsingV4::ClientInfo::Representation
|
260
|
+
|
261
|
+
property :threat_info, as: 'threatInfo', class: Google::Apis::SafebrowsingV4::ThreatInfo, decorator: Google::Apis::SafebrowsingV4::ThreatInfo::Representation
|
262
|
+
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
class FindThreatMatchesResponse
|
267
|
+
# @private
|
268
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
269
|
+
collection :matches, as: 'matches', class: Google::Apis::SafebrowsingV4::ThreatMatch, decorator: Google::Apis::SafebrowsingV4::ThreatMatch::Representation
|
270
|
+
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
class ListThreatListsResponse
|
275
|
+
# @private
|
276
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
277
|
+
collection :threat_lists, as: 'threatLists', class: Google::Apis::SafebrowsingV4::ThreatListDescriptor, decorator: Google::Apis::SafebrowsingV4::ThreatListDescriptor::Representation
|
278
|
+
|
279
|
+
end
|
280
|
+
end
|
281
|
+
|
282
|
+
class ListUpdateRequest
|
283
|
+
# @private
|
284
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
285
|
+
property :constraints, as: 'constraints', class: Google::Apis::SafebrowsingV4::Constraints, decorator: Google::Apis::SafebrowsingV4::Constraints::Representation
|
286
|
+
|
287
|
+
property :platform_type, as: 'platformType'
|
288
|
+
property :state, :base64 => true, as: 'state'
|
289
|
+
property :threat_entry_type, as: 'threatEntryType'
|
290
|
+
property :threat_type, as: 'threatType'
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
class ListUpdateResponse
|
295
|
+
# @private
|
296
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
297
|
+
collection :additions, as: 'additions', class: Google::Apis::SafebrowsingV4::ThreatEntrySet, decorator: Google::Apis::SafebrowsingV4::ThreatEntrySet::Representation
|
298
|
+
|
299
|
+
property :checksum, as: 'checksum', class: Google::Apis::SafebrowsingV4::Checksum, decorator: Google::Apis::SafebrowsingV4::Checksum::Representation
|
300
|
+
|
301
|
+
property :new_client_state, :base64 => true, as: 'newClientState'
|
302
|
+
property :platform_type, as: 'platformType'
|
303
|
+
collection :removals, as: 'removals', class: Google::Apis::SafebrowsingV4::ThreatEntrySet, decorator: Google::Apis::SafebrowsingV4::ThreatEntrySet::Representation
|
304
|
+
|
305
|
+
property :response_type, as: 'responseType'
|
306
|
+
property :threat_entry_type, as: 'threatEntryType'
|
307
|
+
property :threat_type, as: 'threatType'
|
308
|
+
end
|
309
|
+
end
|
310
|
+
|
311
|
+
class MetadataEntry
|
312
|
+
# @private
|
313
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
314
|
+
property :key, :base64 => true, as: 'key'
|
315
|
+
property :value, :base64 => true, as: 'value'
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
319
|
+
class RawHashes
|
320
|
+
# @private
|
321
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
322
|
+
property :prefix_size, as: 'prefixSize'
|
323
|
+
property :raw_hashes, :base64 => true, as: 'rawHashes'
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
class RawIndices
|
328
|
+
# @private
|
329
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
330
|
+
collection :indices, as: 'indices'
|
331
|
+
end
|
332
|
+
end
|
333
|
+
|
334
|
+
class RiceDeltaEncoding
|
335
|
+
# @private
|
336
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
337
|
+
property :encoded_data, :base64 => true, as: 'encodedData'
|
338
|
+
property :first_value, :numeric_string => true, as: 'firstValue'
|
339
|
+
property :num_entries, as: 'numEntries'
|
340
|
+
property :rice_parameter, as: 'riceParameter'
|
341
|
+
end
|
342
|
+
end
|
343
|
+
|
344
|
+
class ThreatEntry
|
345
|
+
# @private
|
346
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
347
|
+
property :digest, :base64 => true, as: 'digest'
|
348
|
+
property :hash_prop, :base64 => true, as: 'hash'
|
349
|
+
property :url, as: 'url'
|
350
|
+
end
|
351
|
+
end
|
352
|
+
|
353
|
+
class ThreatEntryMetadata
|
354
|
+
# @private
|
355
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
356
|
+
collection :entries, as: 'entries', class: Google::Apis::SafebrowsingV4::MetadataEntry, decorator: Google::Apis::SafebrowsingV4::MetadataEntry::Representation
|
357
|
+
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
361
|
+
class ThreatEntrySet
|
362
|
+
# @private
|
363
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
364
|
+
property :compression_type, as: 'compressionType'
|
365
|
+
property :raw_hashes, as: 'rawHashes', class: Google::Apis::SafebrowsingV4::RawHashes, decorator: Google::Apis::SafebrowsingV4::RawHashes::Representation
|
366
|
+
|
367
|
+
property :raw_indices, as: 'rawIndices', class: Google::Apis::SafebrowsingV4::RawIndices, decorator: Google::Apis::SafebrowsingV4::RawIndices::Representation
|
368
|
+
|
369
|
+
property :rice_hashes, as: 'riceHashes', class: Google::Apis::SafebrowsingV4::RiceDeltaEncoding, decorator: Google::Apis::SafebrowsingV4::RiceDeltaEncoding::Representation
|
370
|
+
|
371
|
+
property :rice_indices, as: 'riceIndices', class: Google::Apis::SafebrowsingV4::RiceDeltaEncoding, decorator: Google::Apis::SafebrowsingV4::RiceDeltaEncoding::Representation
|
372
|
+
|
373
|
+
end
|
374
|
+
end
|
375
|
+
|
376
|
+
class ThreatHit
|
377
|
+
# @private
|
378
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
379
|
+
property :client_info, as: 'clientInfo', class: Google::Apis::SafebrowsingV4::ClientInfo, decorator: Google::Apis::SafebrowsingV4::ClientInfo::Representation
|
380
|
+
|
381
|
+
property :entry, as: 'entry', class: Google::Apis::SafebrowsingV4::ThreatEntry, decorator: Google::Apis::SafebrowsingV4::ThreatEntry::Representation
|
382
|
+
|
383
|
+
property :platform_type, as: 'platformType'
|
384
|
+
collection :resources, as: 'resources', class: Google::Apis::SafebrowsingV4::ThreatSource, decorator: Google::Apis::SafebrowsingV4::ThreatSource::Representation
|
385
|
+
|
386
|
+
property :threat_type, as: 'threatType'
|
387
|
+
property :user_info, as: 'userInfo', class: Google::Apis::SafebrowsingV4::UserInfo, decorator: Google::Apis::SafebrowsingV4::UserInfo::Representation
|
388
|
+
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
class ThreatInfo
|
393
|
+
# @private
|
394
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
395
|
+
collection :platform_types, as: 'platformTypes'
|
396
|
+
collection :threat_entries, as: 'threatEntries', class: Google::Apis::SafebrowsingV4::ThreatEntry, decorator: Google::Apis::SafebrowsingV4::ThreatEntry::Representation
|
397
|
+
|
398
|
+
collection :threat_entry_types, as: 'threatEntryTypes'
|
399
|
+
collection :threat_types, as: 'threatTypes'
|
400
|
+
end
|
401
|
+
end
|
402
|
+
|
403
|
+
class ThreatListDescriptor
|
404
|
+
# @private
|
405
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
406
|
+
property :platform_type, as: 'platformType'
|
407
|
+
property :threat_entry_type, as: 'threatEntryType'
|
408
|
+
property :threat_type, as: 'threatType'
|
409
|
+
end
|
410
|
+
end
|
411
|
+
|
412
|
+
class ThreatMatch
|
413
|
+
# @private
|
414
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
415
|
+
property :cache_duration, as: 'cacheDuration'
|
416
|
+
property :platform_type, as: 'platformType'
|
417
|
+
property :threat, as: 'threat', class: Google::Apis::SafebrowsingV4::ThreatEntry, decorator: Google::Apis::SafebrowsingV4::ThreatEntry::Representation
|
418
|
+
|
419
|
+
property :threat_entry_metadata, as: 'threatEntryMetadata', class: Google::Apis::SafebrowsingV4::ThreatEntryMetadata, decorator: Google::Apis::SafebrowsingV4::ThreatEntryMetadata::Representation
|
420
|
+
|
421
|
+
property :threat_entry_type, as: 'threatEntryType'
|
422
|
+
property :threat_type, as: 'threatType'
|
423
|
+
end
|
424
|
+
end
|
425
|
+
|
426
|
+
class ThreatSource
|
427
|
+
# @private
|
428
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
429
|
+
property :referrer, as: 'referrer'
|
430
|
+
property :remote_ip, as: 'remoteIp'
|
431
|
+
property :type, as: 'type'
|
432
|
+
property :url, as: 'url'
|
433
|
+
end
|
434
|
+
end
|
435
|
+
|
436
|
+
class UserInfo
|
437
|
+
# @private
|
438
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
439
|
+
property :region_code, as: 'regionCode'
|
440
|
+
property :user_id, :base64 => true, as: 'userId'
|
441
|
+
end
|
442
|
+
end
|
443
|
+
end
|
444
|
+
end
|
445
|
+
end
|
@@ -0,0 +1,286 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module SafebrowsingV4
|
23
|
+
# Safe Browsing API
|
24
|
+
#
|
25
|
+
# Enables client applications to check web resources (most commonly URLs)
|
26
|
+
# against Google-generated lists of unsafe web resources. The Safe Browsing APIs
|
27
|
+
# are for non-commercial use only. If you need to use APIs to detect malicious
|
28
|
+
# URLs for commercial purposes – meaning “for sale or revenue-generating
|
29
|
+
# purposes” – please refer to the Web Risk API.
|
30
|
+
#
|
31
|
+
# @example
|
32
|
+
# require 'google/apis/safebrowsing_v4'
|
33
|
+
#
|
34
|
+
# Safebrowsing = Google::Apis::SafebrowsingV4 # Alias the module
|
35
|
+
# service = Safebrowsing::SafebrowsingService.new
|
36
|
+
#
|
37
|
+
# @see https://developers.google.com/safe-browsing/
|
38
|
+
class SafebrowsingService < Google::Apis::Core::BaseService
|
39
|
+
# @return [String]
|
40
|
+
# API key. Your API key identifies your project and provides you with API access,
|
41
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
42
|
+
attr_accessor :key
|
43
|
+
|
44
|
+
# @return [String]
|
45
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
46
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
47
|
+
attr_accessor :quota_user
|
48
|
+
|
49
|
+
def initialize
|
50
|
+
super('https://safebrowsing.googleapis.com/', '')
|
51
|
+
@batch_path = 'batch'
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# @param [String] encoded_request
|
56
|
+
# A serialized FindFullHashesRequest proto.
|
57
|
+
# @param [String] client_id
|
58
|
+
# A client ID that (hopefully) uniquely identifies the client implementation of
|
59
|
+
# the Safe Browsing API.
|
60
|
+
# @param [String] client_version
|
61
|
+
# The version of the client implementation.
|
62
|
+
# @param [String] fields
|
63
|
+
# Selector specifying which fields to include in a partial response.
|
64
|
+
# @param [String] quota_user
|
65
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
66
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
67
|
+
# @param [Google::Apis::RequestOptions] options
|
68
|
+
# Request-specific options
|
69
|
+
#
|
70
|
+
# @yield [result, err] Result & error if block supplied
|
71
|
+
# @yieldparam result [Google::Apis::SafebrowsingV4::FindFullHashesResponse] parsed result object
|
72
|
+
# @yieldparam err [StandardError] error object if request failed
|
73
|
+
#
|
74
|
+
# @return [Google::Apis::SafebrowsingV4::FindFullHashesResponse]
|
75
|
+
#
|
76
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
77
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
78
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
79
|
+
def get_encoded_full_hash(encoded_request, client_id: nil, client_version: nil, fields: nil, quota_user: nil, options: nil, &block)
|
80
|
+
command = make_simple_command(:get, 'v4/encodedFullHashes/{encodedRequest}', options)
|
81
|
+
command.response_representation = Google::Apis::SafebrowsingV4::FindFullHashesResponse::Representation
|
82
|
+
command.response_class = Google::Apis::SafebrowsingV4::FindFullHashesResponse
|
83
|
+
command.params['encodedRequest'] = encoded_request unless encoded_request.nil?
|
84
|
+
command.query['clientId'] = client_id unless client_id.nil?
|
85
|
+
command.query['clientVersion'] = client_version unless client_version.nil?
|
86
|
+
command.query['fields'] = fields unless fields.nil?
|
87
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
88
|
+
execute_or_queue_command(command, &block)
|
89
|
+
end
|
90
|
+
|
91
|
+
#
|
92
|
+
# @param [String] encoded_request
|
93
|
+
# A serialized FetchThreatListUpdatesRequest proto.
|
94
|
+
# @param [String] client_id
|
95
|
+
# A client ID that uniquely identifies the client implementation of the Safe
|
96
|
+
# Browsing API.
|
97
|
+
# @param [String] client_version
|
98
|
+
# The version of the client implementation.
|
99
|
+
# @param [String] fields
|
100
|
+
# Selector specifying which fields to include in a partial response.
|
101
|
+
# @param [String] quota_user
|
102
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
103
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
104
|
+
# @param [Google::Apis::RequestOptions] options
|
105
|
+
# Request-specific options
|
106
|
+
#
|
107
|
+
# @yield [result, err] Result & error if block supplied
|
108
|
+
# @yieldparam result [Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse] parsed result object
|
109
|
+
# @yieldparam err [StandardError] error object if request failed
|
110
|
+
#
|
111
|
+
# @return [Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse]
|
112
|
+
#
|
113
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
114
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
115
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
116
|
+
def get_encoded_update(encoded_request, client_id: nil, client_version: nil, fields: nil, quota_user: nil, options: nil, &block)
|
117
|
+
command = make_simple_command(:get, 'v4/encodedUpdates/{encodedRequest}', options)
|
118
|
+
command.response_representation = Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse::Representation
|
119
|
+
command.response_class = Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse
|
120
|
+
command.params['encodedRequest'] = encoded_request unless encoded_request.nil?
|
121
|
+
command.query['clientId'] = client_id unless client_id.nil?
|
122
|
+
command.query['clientVersion'] = client_version unless client_version.nil?
|
123
|
+
command.query['fields'] = fields unless fields.nil?
|
124
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
125
|
+
execute_or_queue_command(command, &block)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Finds the full hashes that match the requested hash prefixes.
|
129
|
+
# @param [Google::Apis::SafebrowsingV4::FindFullHashesRequest] find_full_hashes_request_object
|
130
|
+
# @param [String] fields
|
131
|
+
# Selector specifying which fields to include in a partial response.
|
132
|
+
# @param [String] quota_user
|
133
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
134
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
135
|
+
# @param [Google::Apis::RequestOptions] options
|
136
|
+
# Request-specific options
|
137
|
+
#
|
138
|
+
# @yield [result, err] Result & error if block supplied
|
139
|
+
# @yieldparam result [Google::Apis::SafebrowsingV4::FindFullHashesResponse] parsed result object
|
140
|
+
# @yieldparam err [StandardError] error object if request failed
|
141
|
+
#
|
142
|
+
# @return [Google::Apis::SafebrowsingV4::FindFullHashesResponse]
|
143
|
+
#
|
144
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
145
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
146
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
147
|
+
def find_full_hashes(find_full_hashes_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
148
|
+
command = make_simple_command(:post, 'v4/fullHashes:find', options)
|
149
|
+
command.request_representation = Google::Apis::SafebrowsingV4::FindFullHashesRequest::Representation
|
150
|
+
command.request_object = find_full_hashes_request_object
|
151
|
+
command.response_representation = Google::Apis::SafebrowsingV4::FindFullHashesResponse::Representation
|
152
|
+
command.response_class = Google::Apis::SafebrowsingV4::FindFullHashesResponse
|
153
|
+
command.query['fields'] = fields unless fields.nil?
|
154
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
155
|
+
execute_or_queue_command(command, &block)
|
156
|
+
end
|
157
|
+
|
158
|
+
# Reports a Safe Browsing threat list hit to Google. Only projects with
|
159
|
+
# TRUSTED_REPORTER visibility can use this method.
|
160
|
+
# @param [Google::Apis::SafebrowsingV4::ThreatHit] threat_hit_object
|
161
|
+
# @param [String] fields
|
162
|
+
# Selector specifying which fields to include in a partial response.
|
163
|
+
# @param [String] quota_user
|
164
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
165
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
166
|
+
# @param [Google::Apis::RequestOptions] options
|
167
|
+
# Request-specific options
|
168
|
+
#
|
169
|
+
# @yield [result, err] Result & error if block supplied
|
170
|
+
# @yieldparam result [Google::Apis::SafebrowsingV4::Empty] parsed result object
|
171
|
+
# @yieldparam err [StandardError] error object if request failed
|
172
|
+
#
|
173
|
+
# @return [Google::Apis::SafebrowsingV4::Empty]
|
174
|
+
#
|
175
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
176
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
177
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
178
|
+
def create_threat_hit(threat_hit_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
179
|
+
command = make_simple_command(:post, 'v4/threatHits', options)
|
180
|
+
command.request_representation = Google::Apis::SafebrowsingV4::ThreatHit::Representation
|
181
|
+
command.request_object = threat_hit_object
|
182
|
+
command.response_representation = Google::Apis::SafebrowsingV4::Empty::Representation
|
183
|
+
command.response_class = Google::Apis::SafebrowsingV4::Empty
|
184
|
+
command.query['fields'] = fields unless fields.nil?
|
185
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
186
|
+
execute_or_queue_command(command, &block)
|
187
|
+
end
|
188
|
+
|
189
|
+
# Fetches the most recent threat list updates. A client can request updates for
|
190
|
+
# multiple lists at once.
|
191
|
+
# @param [Google::Apis::SafebrowsingV4::FetchThreatListUpdatesRequest] fetch_threat_list_updates_request_object
|
192
|
+
# @param [String] fields
|
193
|
+
# Selector specifying which fields to include in a partial response.
|
194
|
+
# @param [String] quota_user
|
195
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
196
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
197
|
+
# @param [Google::Apis::RequestOptions] options
|
198
|
+
# Request-specific options
|
199
|
+
#
|
200
|
+
# @yield [result, err] Result & error if block supplied
|
201
|
+
# @yieldparam result [Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse] parsed result object
|
202
|
+
# @yieldparam err [StandardError] error object if request failed
|
203
|
+
#
|
204
|
+
# @return [Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse]
|
205
|
+
#
|
206
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
207
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
208
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
209
|
+
def fetch_threat_list_updates(fetch_threat_list_updates_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
210
|
+
command = make_simple_command(:post, 'v4/threatListUpdates:fetch', options)
|
211
|
+
command.request_representation = Google::Apis::SafebrowsingV4::FetchThreatListUpdatesRequest::Representation
|
212
|
+
command.request_object = fetch_threat_list_updates_request_object
|
213
|
+
command.response_representation = Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse::Representation
|
214
|
+
command.response_class = Google::Apis::SafebrowsingV4::FetchThreatListUpdatesResponse
|
215
|
+
command.query['fields'] = fields unless fields.nil?
|
216
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
217
|
+
execute_or_queue_command(command, &block)
|
218
|
+
end
|
219
|
+
|
220
|
+
# Lists the Safe Browsing threat lists available for download.
|
221
|
+
# @param [String] fields
|
222
|
+
# Selector specifying which fields to include in a partial response.
|
223
|
+
# @param [String] quota_user
|
224
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
225
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
226
|
+
# @param [Google::Apis::RequestOptions] options
|
227
|
+
# Request-specific options
|
228
|
+
#
|
229
|
+
# @yield [result, err] Result & error if block supplied
|
230
|
+
# @yieldparam result [Google::Apis::SafebrowsingV4::ListThreatListsResponse] parsed result object
|
231
|
+
# @yieldparam err [StandardError] error object if request failed
|
232
|
+
#
|
233
|
+
# @return [Google::Apis::SafebrowsingV4::ListThreatListsResponse]
|
234
|
+
#
|
235
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
236
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
237
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
238
|
+
def list_threat_lists(fields: nil, quota_user: nil, options: nil, &block)
|
239
|
+
command = make_simple_command(:get, 'v4/threatLists', options)
|
240
|
+
command.response_representation = Google::Apis::SafebrowsingV4::ListThreatListsResponse::Representation
|
241
|
+
command.response_class = Google::Apis::SafebrowsingV4::ListThreatListsResponse
|
242
|
+
command.query['fields'] = fields unless fields.nil?
|
243
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
244
|
+
execute_or_queue_command(command, &block)
|
245
|
+
end
|
246
|
+
|
247
|
+
# Finds the threat entries that match the Safe Browsing lists.
|
248
|
+
# @param [Google::Apis::SafebrowsingV4::FindThreatMatchesRequest] find_threat_matches_request_object
|
249
|
+
# @param [String] fields
|
250
|
+
# Selector specifying which fields to include in a partial response.
|
251
|
+
# @param [String] quota_user
|
252
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
253
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
254
|
+
# @param [Google::Apis::RequestOptions] options
|
255
|
+
# Request-specific options
|
256
|
+
#
|
257
|
+
# @yield [result, err] Result & error if block supplied
|
258
|
+
# @yieldparam result [Google::Apis::SafebrowsingV4::FindThreatMatchesResponse] parsed result object
|
259
|
+
# @yieldparam err [StandardError] error object if request failed
|
260
|
+
#
|
261
|
+
# @return [Google::Apis::SafebrowsingV4::FindThreatMatchesResponse]
|
262
|
+
#
|
263
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
264
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
265
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
266
|
+
def find_threat_matches(find_threat_matches_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
267
|
+
command = make_simple_command(:post, 'v4/threatMatches:find', options)
|
268
|
+
command.request_representation = Google::Apis::SafebrowsingV4::FindThreatMatchesRequest::Representation
|
269
|
+
command.request_object = find_threat_matches_request_object
|
270
|
+
command.response_representation = Google::Apis::SafebrowsingV4::FindThreatMatchesResponse::Representation
|
271
|
+
command.response_class = Google::Apis::SafebrowsingV4::FindThreatMatchesResponse
|
272
|
+
command.query['fields'] = fields unless fields.nil?
|
273
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
274
|
+
execute_or_queue_command(command, &block)
|
275
|
+
end
|
276
|
+
|
277
|
+
protected
|
278
|
+
|
279
|
+
def apply_command_defaults(command)
|
280
|
+
command.query['key'] = key unless key.nil?
|
281
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
282
|
+
end
|
283
|
+
end
|
284
|
+
end
|
285
|
+
end
|
286
|
+
end
|