google-apis-safebrowsing_v4 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0163da1c30dc79e1b1c6419299316b420a0d3a1410d95bd3319571e073dcd50e
4
+ data.tar.gz: 23fdc502030cc75dead05f7591e4af1933976eac897d9b5edfaefdb216b7b738
5
+ SHA512:
6
+ metadata.gz: b3988d5b8fb6ff57e0d3d9e345e0504df8b8ff9b810d7d633c182a8a9a76c1c63dc76b9754ac19221404107dc0787eeed3a832d1be7b44a8f80c465fe926cbdd
7
+ data.tar.gz: 352fb9b66391312019e54776f5fc683e4dea45d9743695ac353c4730ae47e2345bc8112705bb4b4bb5a099e22d5f2ed0f661d43a6c8d0223741ad357121f2e1c
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-safebrowsing_v4
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/safebrowsing_v4/*.rb
9
+ lib/google/apis/safebrowsing_v4.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-safebrowsing_v4
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated from discovery document revision 20210105
6
+ * Regenerated using generator version 0.1.1
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V4 of the Safe Browsing API
2
+
3
+ This is a simple client library for version V4 of the Safe Browsing API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/safebrowsing.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-safebrowsing_v4', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-safebrowsing_v4
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/safebrowsing_v4"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::SafebrowsingV4::SafebrowsingService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Safebrowsing service in particular.)
67
+
68
+ For reference information on specific calls in the Safe Browsing API, see the {Google::Apis::SafebrowsingV4::SafebrowsingService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-safebrowsing_v4`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](https://developers.google.com/safe-browsing/) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
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/safebrowsing_v4"
@@ -0,0 +1,37 @@
1
+ # Copyright 2020 Google LLC
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/safebrowsing_v4/service.rb'
16
+ require 'google/apis/safebrowsing_v4/classes.rb'
17
+ require 'google/apis/safebrowsing_v4/representations.rb'
18
+ require 'google/apis/safebrowsing_v4/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Safe Browsing API
23
+ #
24
+ # Enables client applications to check web resources (most commonly URLs)
25
+ # against Google-generated lists of unsafe web resources. The Safe Browsing APIs
26
+ # are for non-commercial use only. If you need to use APIs to detect malicious
27
+ # URLs for commercial purposes – meaning “for sale or revenue-generating
28
+ # purposes” – please refer to the Web Risk API.
29
+ #
30
+ # @see https://developers.google.com/safe-browsing/
31
+ module SafebrowsingV4
32
+ # Version of the Safe Browsing API this client connects to.
33
+ # This is NOT the gem version.
34
+ VERSION = 'V4'
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,909 @@
1
+ # Copyright 2020 Google LLC
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
+ # A generic empty message that you can re-use to avoid defining duplicated empty
26
+ # messages in your APIs. A typical example is to use it as the request or the
27
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
28
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
29
+ # `Empty` is empty JSON object ````.
30
+ class GoogleProtobufEmpty
31
+ include Google::Apis::Core::Hashable
32
+
33
+ def initialize(**args)
34
+ update!(**args)
35
+ end
36
+
37
+ # Update properties of this object
38
+ def update!(**args)
39
+ end
40
+ end
41
+
42
+ # The expected state of a client's local database.
43
+ class GoogleSecuritySafebrowsingV4Checksum
44
+ include Google::Apis::Core::Hashable
45
+
46
+ # The SHA256 hash of the client state; that is, of the sorted list of all hashes
47
+ # present in the database.
48
+ # Corresponds to the JSON property `sha256`
49
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
50
+ # @return [String]
51
+ attr_accessor :sha256
52
+
53
+ def initialize(**args)
54
+ update!(**args)
55
+ end
56
+
57
+ # Update properties of this object
58
+ def update!(**args)
59
+ @sha256 = args[:sha256] if args.key?(:sha256)
60
+ end
61
+ end
62
+
63
+ # The client metadata associated with Safe Browsing API requests.
64
+ class GoogleSecuritySafebrowsingV4ClientInfo
65
+ include Google::Apis::Core::Hashable
66
+
67
+ # A client ID that (hopefully) uniquely identifies the client implementation of
68
+ # the Safe Browsing API.
69
+ # Corresponds to the JSON property `clientId`
70
+ # @return [String]
71
+ attr_accessor :client_id
72
+
73
+ # The version of the client implementation.
74
+ # Corresponds to the JSON property `clientVersion`
75
+ # @return [String]
76
+ attr_accessor :client_version
77
+
78
+ def initialize(**args)
79
+ update!(**args)
80
+ end
81
+
82
+ # Update properties of this object
83
+ def update!(**args)
84
+ @client_id = args[:client_id] if args.key?(:client_id)
85
+ @client_version = args[:client_version] if args.key?(:client_version)
86
+ end
87
+ end
88
+
89
+ # Describes a Safe Browsing API update request. Clients can request updates for
90
+ # multiple lists in a single request. NOTE: Field index 2 is unused. NEXT: 5
91
+ class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest
92
+ include Google::Apis::Core::Hashable
93
+
94
+ # The client metadata associated with Safe Browsing API requests.
95
+ # Corresponds to the JSON property `client`
96
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
97
+ attr_accessor :client
98
+
99
+ # The requested threat list updates.
100
+ # Corresponds to the JSON property `listUpdateRequests`
101
+ # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest>]
102
+ attr_accessor :list_update_requests
103
+
104
+ def initialize(**args)
105
+ update!(**args)
106
+ end
107
+
108
+ # Update properties of this object
109
+ def update!(**args)
110
+ @client = args[:client] if args.key?(:client)
111
+ @list_update_requests = args[:list_update_requests] if args.key?(:list_update_requests)
112
+ end
113
+ end
114
+
115
+ # A single list update request.
116
+ class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest
117
+ include Google::Apis::Core::Hashable
118
+
119
+ # The constraints for this update.
120
+ # Corresponds to the JSON property `constraints`
121
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints]
122
+ attr_accessor :constraints
123
+
124
+ # The type of platform at risk by entries present in the list.
125
+ # Corresponds to the JSON property `platformType`
126
+ # @return [String]
127
+ attr_accessor :platform_type
128
+
129
+ # The current state of the client for the requested list (the encrypted client
130
+ # state that was received from the last successful list update).
131
+ # Corresponds to the JSON property `state`
132
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
133
+ # @return [String]
134
+ attr_accessor :state
135
+
136
+ # The types of entries present in the list.
137
+ # Corresponds to the JSON property `threatEntryType`
138
+ # @return [String]
139
+ attr_accessor :threat_entry_type
140
+
141
+ # The type of threat posed by entries present in the list.
142
+ # Corresponds to the JSON property `threatType`
143
+ # @return [String]
144
+ attr_accessor :threat_type
145
+
146
+ def initialize(**args)
147
+ update!(**args)
148
+ end
149
+
150
+ # Update properties of this object
151
+ def update!(**args)
152
+ @constraints = args[:constraints] if args.key?(:constraints)
153
+ @platform_type = args[:platform_type] if args.key?(:platform_type)
154
+ @state = args[:state] if args.key?(:state)
155
+ @threat_entry_type = args[:threat_entry_type] if args.key?(:threat_entry_type)
156
+ @threat_type = args[:threat_type] if args.key?(:threat_type)
157
+ end
158
+ end
159
+
160
+ # The constraints for this update.
161
+ class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints
162
+ include Google::Apis::Core::Hashable
163
+
164
+ # A client's physical location, expressed as a ISO 31166-1 alpha-2 region code.
165
+ # Corresponds to the JSON property `deviceLocation`
166
+ # @return [String]
167
+ attr_accessor :device_location
168
+
169
+ # Requests the lists for a specific language. Expects ISO 639 alpha-2 format.
170
+ # Corresponds to the JSON property `language`
171
+ # @return [String]
172
+ attr_accessor :language
173
+
174
+ # Sets the maximum number of entries that the client is willing to have in the
175
+ # local database for the specified list. This should be a power of 2 between 2**
176
+ # 10 and 2**20. If zero, no database size limit is set.
177
+ # Corresponds to the JSON property `maxDatabaseEntries`
178
+ # @return [Fixnum]
179
+ attr_accessor :max_database_entries
180
+
181
+ # The maximum size in number of entries. The update will not contain more
182
+ # entries than this value. This should be a power of 2 between 2**10 and 2**20.
183
+ # If zero, no update size limit is set.
184
+ # Corresponds to the JSON property `maxUpdateEntries`
185
+ # @return [Fixnum]
186
+ attr_accessor :max_update_entries
187
+
188
+ # Requests the list for a specific geographic location. If not set the server
189
+ # may pick that value based on the user's IP address. Expects ISO 3166-1 alpha-2
190
+ # format.
191
+ # Corresponds to the JSON property `region`
192
+ # @return [String]
193
+ attr_accessor :region
194
+
195
+ # The compression types supported by the client.
196
+ # Corresponds to the JSON property `supportedCompressions`
197
+ # @return [Array<String>]
198
+ attr_accessor :supported_compressions
199
+
200
+ def initialize(**args)
201
+ update!(**args)
202
+ end
203
+
204
+ # Update properties of this object
205
+ def update!(**args)
206
+ @device_location = args[:device_location] if args.key?(:device_location)
207
+ @language = args[:language] if args.key?(:language)
208
+ @max_database_entries = args[:max_database_entries] if args.key?(:max_database_entries)
209
+ @max_update_entries = args[:max_update_entries] if args.key?(:max_update_entries)
210
+ @region = args[:region] if args.key?(:region)
211
+ @supported_compressions = args[:supported_compressions] if args.key?(:supported_compressions)
212
+ end
213
+ end
214
+
215
+ #
216
+ class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse
217
+ include Google::Apis::Core::Hashable
218
+
219
+ # The list updates requested by the clients.
220
+ # Corresponds to the JSON property `listUpdateResponses`
221
+ # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse>]
222
+ attr_accessor :list_update_responses
223
+
224
+ # The minimum duration the client must wait before issuing any update request.
225
+ # If this field is not set clients may update as soon as they want.
226
+ # Corresponds to the JSON property `minimumWaitDuration`
227
+ # @return [String]
228
+ attr_accessor :minimum_wait_duration
229
+
230
+ def initialize(**args)
231
+ update!(**args)
232
+ end
233
+
234
+ # Update properties of this object
235
+ def update!(**args)
236
+ @list_update_responses = args[:list_update_responses] if args.key?(:list_update_responses)
237
+ @minimum_wait_duration = args[:minimum_wait_duration] if args.key?(:minimum_wait_duration)
238
+ end
239
+ end
240
+
241
+ # An update to an individual list.
242
+ class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse
243
+ include Google::Apis::Core::Hashable
244
+
245
+ # A set of entries to add to a local threat type's list. Repeated to allow for a
246
+ # combination of compressed and raw data to be sent in a single response.
247
+ # Corresponds to the JSON property `additions`
248
+ # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntrySet>]
249
+ attr_accessor :additions
250
+
251
+ # The expected state of a client's local database.
252
+ # Corresponds to the JSON property `checksum`
253
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4Checksum]
254
+ attr_accessor :checksum
255
+
256
+ # The new client state, in encrypted format. Opaque to clients.
257
+ # Corresponds to the JSON property `newClientState`
258
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
259
+ # @return [String]
260
+ attr_accessor :new_client_state
261
+
262
+ # The platform type for which data is returned.
263
+ # Corresponds to the JSON property `platformType`
264
+ # @return [String]
265
+ attr_accessor :platform_type
266
+
267
+ # A set of entries to remove from a local threat type's list. In practice, this
268
+ # field is empty or contains exactly one ThreatEntrySet.
269
+ # Corresponds to the JSON property `removals`
270
+ # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntrySet>]
271
+ attr_accessor :removals
272
+
273
+ # The type of response. This may indicate that an action is required by the
274
+ # client when the response is received.
275
+ # Corresponds to the JSON property `responseType`
276
+ # @return [String]
277
+ attr_accessor :response_type
278
+
279
+ # The format of the threats.
280
+ # Corresponds to the JSON property `threatEntryType`
281
+ # @return [String]
282
+ attr_accessor :threat_entry_type
283
+
284
+ # The threat type for which data is returned.
285
+ # Corresponds to the JSON property `threatType`
286
+ # @return [String]
287
+ attr_accessor :threat_type
288
+
289
+ def initialize(**args)
290
+ update!(**args)
291
+ end
292
+
293
+ # Update properties of this object
294
+ def update!(**args)
295
+ @additions = args[:additions] if args.key?(:additions)
296
+ @checksum = args[:checksum] if args.key?(:checksum)
297
+ @new_client_state = args[:new_client_state] if args.key?(:new_client_state)
298
+ @platform_type = args[:platform_type] if args.key?(:platform_type)
299
+ @removals = args[:removals] if args.key?(:removals)
300
+ @response_type = args[:response_type] if args.key?(:response_type)
301
+ @threat_entry_type = args[:threat_entry_type] if args.key?(:threat_entry_type)
302
+ @threat_type = args[:threat_type] if args.key?(:threat_type)
303
+ end
304
+ end
305
+
306
+ # Request to return full hashes matched by the provided hash prefixes.
307
+ class GoogleSecuritySafebrowsingV4FindFullHashesRequest
308
+ include Google::Apis::Core::Hashable
309
+
310
+ # The client metadata associated with Safe Browsing API requests.
311
+ # Corresponds to the JSON property `apiClient`
312
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
313
+ attr_accessor :api_client
314
+
315
+ # The client metadata associated with Safe Browsing API requests.
316
+ # Corresponds to the JSON property `client`
317
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
318
+ attr_accessor :client
319
+
320
+ # The current client states for each of the client's local threat lists.
321
+ # Corresponds to the JSON property `clientStates`
322
+ # @return [Array<String>]
323
+ attr_accessor :client_states
324
+
325
+ # The information regarding one or more threats that a client submits when
326
+ # checking for matches in threat lists.
327
+ # Corresponds to the JSON property `threatInfo`
328
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatInfo]
329
+ attr_accessor :threat_info
330
+
331
+ def initialize(**args)
332
+ update!(**args)
333
+ end
334
+
335
+ # Update properties of this object
336
+ def update!(**args)
337
+ @api_client = args[:api_client] if args.key?(:api_client)
338
+ @client = args[:client] if args.key?(:client)
339
+ @client_states = args[:client_states] if args.key?(:client_states)
340
+ @threat_info = args[:threat_info] if args.key?(:threat_info)
341
+ end
342
+ end
343
+
344
+ #
345
+ class GoogleSecuritySafebrowsingV4FindFullHashesResponse
346
+ include Google::Apis::Core::Hashable
347
+
348
+ # The full hashes that matched the requested prefixes.
349
+ # Corresponds to the JSON property `matches`
350
+ # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatMatch>]
351
+ attr_accessor :matches
352
+
353
+ # The minimum duration the client must wait before issuing any find hashes
354
+ # request. If this field is not set, clients can issue a request as soon as they
355
+ # want.
356
+ # Corresponds to the JSON property `minimumWaitDuration`
357
+ # @return [String]
358
+ attr_accessor :minimum_wait_duration
359
+
360
+ # For requested entities that did not match the threat list, how long to cache
361
+ # the response.
362
+ # Corresponds to the JSON property `negativeCacheDuration`
363
+ # @return [String]
364
+ attr_accessor :negative_cache_duration
365
+
366
+ def initialize(**args)
367
+ update!(**args)
368
+ end
369
+
370
+ # Update properties of this object
371
+ def update!(**args)
372
+ @matches = args[:matches] if args.key?(:matches)
373
+ @minimum_wait_duration = args[:minimum_wait_duration] if args.key?(:minimum_wait_duration)
374
+ @negative_cache_duration = args[:negative_cache_duration] if args.key?(:negative_cache_duration)
375
+ end
376
+ end
377
+
378
+ # Request to check entries against lists.
379
+ class GoogleSecuritySafebrowsingV4FindThreatMatchesRequest
380
+ include Google::Apis::Core::Hashable
381
+
382
+ # The client metadata associated with Safe Browsing API requests.
383
+ # Corresponds to the JSON property `client`
384
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
385
+ attr_accessor :client
386
+
387
+ # The information regarding one or more threats that a client submits when
388
+ # checking for matches in threat lists.
389
+ # Corresponds to the JSON property `threatInfo`
390
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatInfo]
391
+ attr_accessor :threat_info
392
+
393
+ def initialize(**args)
394
+ update!(**args)
395
+ end
396
+
397
+ # Update properties of this object
398
+ def update!(**args)
399
+ @client = args[:client] if args.key?(:client)
400
+ @threat_info = args[:threat_info] if args.key?(:threat_info)
401
+ end
402
+ end
403
+
404
+ #
405
+ class GoogleSecuritySafebrowsingV4FindThreatMatchesResponse
406
+ include Google::Apis::Core::Hashable
407
+
408
+ # The threat list matches.
409
+ # Corresponds to the JSON property `matches`
410
+ # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatMatch>]
411
+ attr_accessor :matches
412
+
413
+ def initialize(**args)
414
+ update!(**args)
415
+ end
416
+
417
+ # Update properties of this object
418
+ def update!(**args)
419
+ @matches = args[:matches] if args.key?(:matches)
420
+ end
421
+ end
422
+
423
+ #
424
+ class GoogleSecuritySafebrowsingV4ListThreatListsResponse
425
+ include Google::Apis::Core::Hashable
426
+
427
+ # The lists available for download by the client.
428
+ # Corresponds to the JSON property `threatLists`
429
+ # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatListDescriptor>]
430
+ attr_accessor :threat_lists
431
+
432
+ def initialize(**args)
433
+ update!(**args)
434
+ end
435
+
436
+ # Update properties of this object
437
+ def update!(**args)
438
+ @threat_lists = args[:threat_lists] if args.key?(:threat_lists)
439
+ end
440
+ end
441
+
442
+ # The uncompressed threat entries in hash format of a particular prefix length.
443
+ # Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4
444
+ # bytes, but some hashes are lengthened if they collide with the hash of a
445
+ # popular URL. Used for sending ThreatEntrySet to clients that do not support
446
+ # compression, or when sending non-4-byte hashes to clients that do support
447
+ # compression.
448
+ class GoogleSecuritySafebrowsingV4RawHashes
449
+ include Google::Apis::Core::Hashable
450
+
451
+ # The number of bytes for each prefix encoded below. This field can be anywhere
452
+ # from 4 (shortest prefix) to 32 (full SHA256 hash).
453
+ # Corresponds to the JSON property `prefixSize`
454
+ # @return [Fixnum]
455
+ attr_accessor :prefix_size
456
+
457
+ # The hashes, in binary format, concatenated into one long string. Hashes are
458
+ # sorted in lexicographic order. For JSON API users, hashes are base64-encoded.
459
+ # Corresponds to the JSON property `rawHashes`
460
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
461
+ # @return [String]
462
+ attr_accessor :raw_hashes
463
+
464
+ def initialize(**args)
465
+ update!(**args)
466
+ end
467
+
468
+ # Update properties of this object
469
+ def update!(**args)
470
+ @prefix_size = args[:prefix_size] if args.key?(:prefix_size)
471
+ @raw_hashes = args[:raw_hashes] if args.key?(:raw_hashes)
472
+ end
473
+ end
474
+
475
+ # A set of raw indices to remove from a local list.
476
+ class GoogleSecuritySafebrowsingV4RawIndices
477
+ include Google::Apis::Core::Hashable
478
+
479
+ # The indices to remove from a lexicographically-sorted local list.
480
+ # Corresponds to the JSON property `indices`
481
+ # @return [Array<Fixnum>]
482
+ attr_accessor :indices
483
+
484
+ def initialize(**args)
485
+ update!(**args)
486
+ end
487
+
488
+ # Update properties of this object
489
+ def update!(**args)
490
+ @indices = args[:indices] if args.key?(:indices)
491
+ end
492
+ end
493
+
494
+ # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
495
+ # compressed removal indices.
496
+ class GoogleSecuritySafebrowsingV4RiceDeltaEncoding
497
+ include Google::Apis::Core::Hashable
498
+
499
+ # The encoded deltas that are encoded using the Golomb-Rice coder.
500
+ # Corresponds to the JSON property `encodedData`
501
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
502
+ # @return [String]
503
+ attr_accessor :encoded_data
504
+
505
+ # The offset of the first entry in the encoded data, or, if only a single
506
+ # integer was encoded, that single integer's value. If the field is empty or
507
+ # missing, assume zero.
508
+ # Corresponds to the JSON property `firstValue`
509
+ # @return [Fixnum]
510
+ attr_accessor :first_value
511
+
512
+ # The number of entries that are delta encoded in the encoded data. If only a
513
+ # single integer was encoded, this will be zero and the single value will be
514
+ # stored in `first_value`.
515
+ # Corresponds to the JSON property `numEntries`
516
+ # @return [Fixnum]
517
+ attr_accessor :num_entries
518
+
519
+ # The Golomb-Rice parameter, which is a number between 2 and 28. This field is
520
+ # missing (that is, zero) if `num_entries` is zero.
521
+ # Corresponds to the JSON property `riceParameter`
522
+ # @return [Fixnum]
523
+ attr_accessor :rice_parameter
524
+
525
+ def initialize(**args)
526
+ update!(**args)
527
+ end
528
+
529
+ # Update properties of this object
530
+ def update!(**args)
531
+ @encoded_data = args[:encoded_data] if args.key?(:encoded_data)
532
+ @first_value = args[:first_value] if args.key?(:first_value)
533
+ @num_entries = args[:num_entries] if args.key?(:num_entries)
534
+ @rice_parameter = args[:rice_parameter] if args.key?(:rice_parameter)
535
+ end
536
+ end
537
+
538
+ # An individual threat; for example, a malicious URL or its hash representation.
539
+ # Only one of these fields should be set.
540
+ class GoogleSecuritySafebrowsingV4ThreatEntry
541
+ include Google::Apis::Core::Hashable
542
+
543
+ # The digest of an executable in SHA256 format. The API supports both binary and
544
+ # hex digests. For JSON requests, digests are base64-encoded.
545
+ # Corresponds to the JSON property `digest`
546
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
547
+ # @return [String]
548
+ attr_accessor :digest
549
+
550
+ # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 hash.
551
+ # This field is in binary format. For JSON requests, hashes are base64-encoded.
552
+ # Corresponds to the JSON property `hash`
553
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
554
+ # @return [String]
555
+ attr_accessor :hash_prop
556
+
557
+ # A URL.
558
+ # Corresponds to the JSON property `url`
559
+ # @return [String]
560
+ attr_accessor :url
561
+
562
+ def initialize(**args)
563
+ update!(**args)
564
+ end
565
+
566
+ # Update properties of this object
567
+ def update!(**args)
568
+ @digest = args[:digest] if args.key?(:digest)
569
+ @hash_prop = args[:hash_prop] if args.key?(:hash_prop)
570
+ @url = args[:url] if args.key?(:url)
571
+ end
572
+ end
573
+
574
+ # The metadata associated with a specific threat entry. The client is expected
575
+ # to know the metadata key/value pairs associated with each threat type.
576
+ class GoogleSecuritySafebrowsingV4ThreatEntryMetadata
577
+ include Google::Apis::Core::Hashable
578
+
579
+ # The metadata entries.
580
+ # Corresponds to the JSON property `entries`
581
+ # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry>]
582
+ attr_accessor :entries
583
+
584
+ def initialize(**args)
585
+ update!(**args)
586
+ end
587
+
588
+ # Update properties of this object
589
+ def update!(**args)
590
+ @entries = args[:entries] if args.key?(:entries)
591
+ end
592
+ end
593
+
594
+ # A single metadata entry.
595
+ class GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry
596
+ include Google::Apis::Core::Hashable
597
+
598
+ # The metadata entry key. For JSON requests, the key is base64-encoded.
599
+ # Corresponds to the JSON property `key`
600
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
601
+ # @return [String]
602
+ attr_accessor :key
603
+
604
+ # The metadata entry value. For JSON requests, the value is base64-encoded.
605
+ # Corresponds to the JSON property `value`
606
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
607
+ # @return [String]
608
+ attr_accessor :value
609
+
610
+ def initialize(**args)
611
+ update!(**args)
612
+ end
613
+
614
+ # Update properties of this object
615
+ def update!(**args)
616
+ @key = args[:key] if args.key?(:key)
617
+ @value = args[:value] if args.key?(:value)
618
+ end
619
+ end
620
+
621
+ # A set of threats that should be added or removed from a client's local
622
+ # database.
623
+ class GoogleSecuritySafebrowsingV4ThreatEntrySet
624
+ include Google::Apis::Core::Hashable
625
+
626
+ # The compression type for the entries in this set.
627
+ # Corresponds to the JSON property `compressionType`
628
+ # @return [String]
629
+ attr_accessor :compression_type
630
+
631
+ # The uncompressed threat entries in hash format of a particular prefix length.
632
+ # Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4
633
+ # bytes, but some hashes are lengthened if they collide with the hash of a
634
+ # popular URL. Used for sending ThreatEntrySet to clients that do not support
635
+ # compression, or when sending non-4-byte hashes to clients that do support
636
+ # compression.
637
+ # Corresponds to the JSON property `rawHashes`
638
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4RawHashes]
639
+ attr_accessor :raw_hashes
640
+
641
+ # A set of raw indices to remove from a local list.
642
+ # Corresponds to the JSON property `rawIndices`
643
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4RawIndices]
644
+ attr_accessor :raw_indices
645
+
646
+ # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
647
+ # compressed removal indices.
648
+ # Corresponds to the JSON property `riceHashes`
649
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4RiceDeltaEncoding]
650
+ attr_accessor :rice_hashes
651
+
652
+ # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
653
+ # compressed removal indices.
654
+ # Corresponds to the JSON property `riceIndices`
655
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4RiceDeltaEncoding]
656
+ attr_accessor :rice_indices
657
+
658
+ def initialize(**args)
659
+ update!(**args)
660
+ end
661
+
662
+ # Update properties of this object
663
+ def update!(**args)
664
+ @compression_type = args[:compression_type] if args.key?(:compression_type)
665
+ @raw_hashes = args[:raw_hashes] if args.key?(:raw_hashes)
666
+ @raw_indices = args[:raw_indices] if args.key?(:raw_indices)
667
+ @rice_hashes = args[:rice_hashes] if args.key?(:rice_hashes)
668
+ @rice_indices = args[:rice_indices] if args.key?(:rice_indices)
669
+ end
670
+ end
671
+
672
+ #
673
+ class GoogleSecuritySafebrowsingV4ThreatHit
674
+ include Google::Apis::Core::Hashable
675
+
676
+ # The client metadata associated with Safe Browsing API requests.
677
+ # Corresponds to the JSON property `clientInfo`
678
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
679
+ attr_accessor :client_info
680
+
681
+ # An individual threat; for example, a malicious URL or its hash representation.
682
+ # Only one of these fields should be set.
683
+ # Corresponds to the JSON property `entry`
684
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntry]
685
+ attr_accessor :entry
686
+
687
+ # The platform type reported.
688
+ # Corresponds to the JSON property `platformType`
689
+ # @return [String]
690
+ attr_accessor :platform_type
691
+
692
+ # The resources related to the threat hit.
693
+ # Corresponds to the JSON property `resources`
694
+ # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatHitThreatSource>]
695
+ attr_accessor :resources
696
+
697
+ # The threat type reported.
698
+ # Corresponds to the JSON property `threatType`
699
+ # @return [String]
700
+ attr_accessor :threat_type
701
+
702
+ # Details about the user that encountered the threat.
703
+ # Corresponds to the JSON property `userInfo`
704
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatHitUserInfo]
705
+ attr_accessor :user_info
706
+
707
+ def initialize(**args)
708
+ update!(**args)
709
+ end
710
+
711
+ # Update properties of this object
712
+ def update!(**args)
713
+ @client_info = args[:client_info] if args.key?(:client_info)
714
+ @entry = args[:entry] if args.key?(:entry)
715
+ @platform_type = args[:platform_type] if args.key?(:platform_type)
716
+ @resources = args[:resources] if args.key?(:resources)
717
+ @threat_type = args[:threat_type] if args.key?(:threat_type)
718
+ @user_info = args[:user_info] if args.key?(:user_info)
719
+ end
720
+ end
721
+
722
+ # A single resource related to a threat hit.
723
+ class GoogleSecuritySafebrowsingV4ThreatHitThreatSource
724
+ include Google::Apis::Core::Hashable
725
+
726
+ # Referrer of the resource. Only set if the referrer is available.
727
+ # Corresponds to the JSON property `referrer`
728
+ # @return [String]
729
+ attr_accessor :referrer
730
+
731
+ # The remote IP of the resource in ASCII format. Either IPv4 or IPv6.
732
+ # Corresponds to the JSON property `remoteIp`
733
+ # @return [String]
734
+ attr_accessor :remote_ip
735
+
736
+ # The type of source reported.
737
+ # Corresponds to the JSON property `type`
738
+ # @return [String]
739
+ attr_accessor :type
740
+
741
+ # The URL of the resource.
742
+ # Corresponds to the JSON property `url`
743
+ # @return [String]
744
+ attr_accessor :url
745
+
746
+ def initialize(**args)
747
+ update!(**args)
748
+ end
749
+
750
+ # Update properties of this object
751
+ def update!(**args)
752
+ @referrer = args[:referrer] if args.key?(:referrer)
753
+ @remote_ip = args[:remote_ip] if args.key?(:remote_ip)
754
+ @type = args[:type] if args.key?(:type)
755
+ @url = args[:url] if args.key?(:url)
756
+ end
757
+ end
758
+
759
+ # Details about the user that encountered the threat.
760
+ class GoogleSecuritySafebrowsingV4ThreatHitUserInfo
761
+ include Google::Apis::Core::Hashable
762
+
763
+ # The UN M.49 region code associated with the user's location.
764
+ # Corresponds to the JSON property `regionCode`
765
+ # @return [String]
766
+ attr_accessor :region_code
767
+
768
+ # Unique user identifier defined by the client.
769
+ # Corresponds to the JSON property `userId`
770
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
771
+ # @return [String]
772
+ attr_accessor :user_id
773
+
774
+ def initialize(**args)
775
+ update!(**args)
776
+ end
777
+
778
+ # Update properties of this object
779
+ def update!(**args)
780
+ @region_code = args[:region_code] if args.key?(:region_code)
781
+ @user_id = args[:user_id] if args.key?(:user_id)
782
+ end
783
+ end
784
+
785
+ # The information regarding one or more threats that a client submits when
786
+ # checking for matches in threat lists.
787
+ class GoogleSecuritySafebrowsingV4ThreatInfo
788
+ include Google::Apis::Core::Hashable
789
+
790
+ # The platform types to be checked.
791
+ # Corresponds to the JSON property `platformTypes`
792
+ # @return [Array<String>]
793
+ attr_accessor :platform_types
794
+
795
+ # The threat entries to be checked.
796
+ # Corresponds to the JSON property `threatEntries`
797
+ # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntry>]
798
+ attr_accessor :threat_entries
799
+
800
+ # The entry types to be checked.
801
+ # Corresponds to the JSON property `threatEntryTypes`
802
+ # @return [Array<String>]
803
+ attr_accessor :threat_entry_types
804
+
805
+ # The threat types to be checked.
806
+ # Corresponds to the JSON property `threatTypes`
807
+ # @return [Array<String>]
808
+ attr_accessor :threat_types
809
+
810
+ def initialize(**args)
811
+ update!(**args)
812
+ end
813
+
814
+ # Update properties of this object
815
+ def update!(**args)
816
+ @platform_types = args[:platform_types] if args.key?(:platform_types)
817
+ @threat_entries = args[:threat_entries] if args.key?(:threat_entries)
818
+ @threat_entry_types = args[:threat_entry_types] if args.key?(:threat_entry_types)
819
+ @threat_types = args[:threat_types] if args.key?(:threat_types)
820
+ end
821
+ end
822
+
823
+ # Describes an individual threat list. A list is defined by three parameters:
824
+ # the type of threat posed, the type of platform targeted by the threat, and the
825
+ # type of entries in the list.
826
+ class GoogleSecuritySafebrowsingV4ThreatListDescriptor
827
+ include Google::Apis::Core::Hashable
828
+
829
+ # The platform type targeted by the list's entries.
830
+ # Corresponds to the JSON property `platformType`
831
+ # @return [String]
832
+ attr_accessor :platform_type
833
+
834
+ # The entry types contained in the list.
835
+ # Corresponds to the JSON property `threatEntryType`
836
+ # @return [String]
837
+ attr_accessor :threat_entry_type
838
+
839
+ # The threat type posed by the list's entries.
840
+ # Corresponds to the JSON property `threatType`
841
+ # @return [String]
842
+ attr_accessor :threat_type
843
+
844
+ def initialize(**args)
845
+ update!(**args)
846
+ end
847
+
848
+ # Update properties of this object
849
+ def update!(**args)
850
+ @platform_type = args[:platform_type] if args.key?(:platform_type)
851
+ @threat_entry_type = args[:threat_entry_type] if args.key?(:threat_entry_type)
852
+ @threat_type = args[:threat_type] if args.key?(:threat_type)
853
+ end
854
+ end
855
+
856
+ # A match when checking a threat entry in the Safe Browsing threat lists.
857
+ class GoogleSecuritySafebrowsingV4ThreatMatch
858
+ include Google::Apis::Core::Hashable
859
+
860
+ # The cache lifetime for the returned match. Clients must not cache this
861
+ # response for more than this duration to avoid false positives.
862
+ # Corresponds to the JSON property `cacheDuration`
863
+ # @return [String]
864
+ attr_accessor :cache_duration
865
+
866
+ # The platform type matching this threat.
867
+ # Corresponds to the JSON property `platformType`
868
+ # @return [String]
869
+ attr_accessor :platform_type
870
+
871
+ # An individual threat; for example, a malicious URL or its hash representation.
872
+ # Only one of these fields should be set.
873
+ # Corresponds to the JSON property `threat`
874
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntry]
875
+ attr_accessor :threat
876
+
877
+ # The metadata associated with a specific threat entry. The client is expected
878
+ # to know the metadata key/value pairs associated with each threat type.
879
+ # Corresponds to the JSON property `threatEntryMetadata`
880
+ # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntryMetadata]
881
+ attr_accessor :threat_entry_metadata
882
+
883
+ # The threat entry type matching this threat.
884
+ # Corresponds to the JSON property `threatEntryType`
885
+ # @return [String]
886
+ attr_accessor :threat_entry_type
887
+
888
+ # The threat type matching this threat.
889
+ # Corresponds to the JSON property `threatType`
890
+ # @return [String]
891
+ attr_accessor :threat_type
892
+
893
+ def initialize(**args)
894
+ update!(**args)
895
+ end
896
+
897
+ # Update properties of this object
898
+ def update!(**args)
899
+ @cache_duration = args[:cache_duration] if args.key?(:cache_duration)
900
+ @platform_type = args[:platform_type] if args.key?(:platform_type)
901
+ @threat = args[:threat] if args.key?(:threat)
902
+ @threat_entry_metadata = args[:threat_entry_metadata] if args.key?(:threat_entry_metadata)
903
+ @threat_entry_type = args[:threat_entry_type] if args.key?(:threat_entry_type)
904
+ @threat_type = args[:threat_type] if args.key?(:threat_type)
905
+ end
906
+ end
907
+ end
908
+ end
909
+ end