1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package safebrowsing provides access to the Safe Browsing API.
8//
9// For product documentation, see: https://developers.google.com/safe-browsing/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/safebrowsing/v4"
16//   ...
17//   ctx := context.Background()
18//   safebrowsingService, err := safebrowsing.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   safebrowsingService, err := safebrowsing.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   safebrowsingService, err := safebrowsing.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package safebrowsing // import "google.golang.org/api/safebrowsing/v4"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "safebrowsing:v4"
75const apiName = "safebrowsing"
76const apiVersion = "v4"
77const basePath = "https://safebrowsing.googleapis.com/"
78const mtlsBasePath = "https://safebrowsing.mtls.googleapis.com/"
79
80// NewService creates a new Service.
81func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
82	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
83	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
84	client, endpoint, err := htransport.NewClient(ctx, opts...)
85	if err != nil {
86		return nil, err
87	}
88	s, err := New(client)
89	if err != nil {
90		return nil, err
91	}
92	if endpoint != "" {
93		s.BasePath = endpoint
94	}
95	return s, nil
96}
97
98// New creates a new Service. It uses the provided http.Client for requests.
99//
100// Deprecated: please use NewService instead.
101// To provide a custom HTTP client, use option.WithHTTPClient.
102// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
103func New(client *http.Client) (*Service, error) {
104	if client == nil {
105		return nil, errors.New("client is nil")
106	}
107	s := &Service{client: client, BasePath: basePath}
108	s.EncodedFullHashes = NewEncodedFullHashesService(s)
109	s.EncodedUpdates = NewEncodedUpdatesService(s)
110	s.FullHashes = NewFullHashesService(s)
111	s.ThreatHits = NewThreatHitsService(s)
112	s.ThreatListUpdates = NewThreatListUpdatesService(s)
113	s.ThreatLists = NewThreatListsService(s)
114	s.ThreatMatches = NewThreatMatchesService(s)
115	return s, nil
116}
117
118type Service struct {
119	client    *http.Client
120	BasePath  string // API endpoint base URL
121	UserAgent string // optional additional User-Agent fragment
122
123	EncodedFullHashes *EncodedFullHashesService
124
125	EncodedUpdates *EncodedUpdatesService
126
127	FullHashes *FullHashesService
128
129	ThreatHits *ThreatHitsService
130
131	ThreatListUpdates *ThreatListUpdatesService
132
133	ThreatLists *ThreatListsService
134
135	ThreatMatches *ThreatMatchesService
136}
137
138func (s *Service) userAgent() string {
139	if s.UserAgent == "" {
140		return googleapi.UserAgent
141	}
142	return googleapi.UserAgent + " " + s.UserAgent
143}
144
145func NewEncodedFullHashesService(s *Service) *EncodedFullHashesService {
146	rs := &EncodedFullHashesService{s: s}
147	return rs
148}
149
150type EncodedFullHashesService struct {
151	s *Service
152}
153
154func NewEncodedUpdatesService(s *Service) *EncodedUpdatesService {
155	rs := &EncodedUpdatesService{s: s}
156	return rs
157}
158
159type EncodedUpdatesService struct {
160	s *Service
161}
162
163func NewFullHashesService(s *Service) *FullHashesService {
164	rs := &FullHashesService{s: s}
165	return rs
166}
167
168type FullHashesService struct {
169	s *Service
170}
171
172func NewThreatHitsService(s *Service) *ThreatHitsService {
173	rs := &ThreatHitsService{s: s}
174	return rs
175}
176
177type ThreatHitsService struct {
178	s *Service
179}
180
181func NewThreatListUpdatesService(s *Service) *ThreatListUpdatesService {
182	rs := &ThreatListUpdatesService{s: s}
183	return rs
184}
185
186type ThreatListUpdatesService struct {
187	s *Service
188}
189
190func NewThreatListsService(s *Service) *ThreatListsService {
191	rs := &ThreatListsService{s: s}
192	return rs
193}
194
195type ThreatListsService struct {
196	s *Service
197}
198
199func NewThreatMatchesService(s *Service) *ThreatMatchesService {
200	rs := &ThreatMatchesService{s: s}
201	return rs
202}
203
204type ThreatMatchesService struct {
205	s *Service
206}
207
208// GoogleProtobufEmpty: A generic empty message that you can re-use to
209// avoid defining duplicated empty messages in your APIs. A typical
210// example is to use it as the request or the response type of an API
211// method. For instance: service Foo { rpc Bar(google.protobuf.Empty)
212// returns (google.protobuf.Empty); } The JSON representation for
213// `Empty` is empty JSON object `{}`.
214type GoogleProtobufEmpty struct {
215	// ServerResponse contains the HTTP response code and headers from the
216	// server.
217	googleapi.ServerResponse `json:"-"`
218}
219
220// GoogleSecuritySafebrowsingV4Checksum: The expected state of a
221// client's local database.
222type GoogleSecuritySafebrowsingV4Checksum struct {
223	// Sha256: The SHA256 hash of the client state; that is, of the sorted
224	// list of all hashes present in the database.
225	Sha256 string `json:"sha256,omitempty"`
226
227	// ForceSendFields is a list of field names (e.g. "Sha256") to
228	// unconditionally include in API requests. By default, fields with
229	// empty or default values are omitted from API requests. However, any
230	// non-pointer, non-interface field appearing in ForceSendFields will be
231	// sent to the server regardless of whether the field is empty or not.
232	// This may be used to include empty fields in Patch requests.
233	ForceSendFields []string `json:"-"`
234
235	// NullFields is a list of field names (e.g. "Sha256") to include in API
236	// requests with the JSON null value. By default, fields with empty
237	// values are omitted from API requests. However, any field with an
238	// empty value appearing in NullFields will be sent to the server as
239	// null. It is an error if a field in this list has a non-empty value.
240	// This may be used to include null fields in Patch requests.
241	NullFields []string `json:"-"`
242}
243
244func (s *GoogleSecuritySafebrowsingV4Checksum) MarshalJSON() ([]byte, error) {
245	type NoMethod GoogleSecuritySafebrowsingV4Checksum
246	raw := NoMethod(*s)
247	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
248}
249
250// GoogleSecuritySafebrowsingV4ClientInfo: The client metadata
251// associated with Safe Browsing API requests.
252type GoogleSecuritySafebrowsingV4ClientInfo struct {
253	// ClientId: A client ID that (hopefully) uniquely identifies the client
254	// implementation of the Safe Browsing API.
255	ClientId string `json:"clientId,omitempty"`
256
257	// ClientVersion: The version of the client implementation.
258	ClientVersion string `json:"clientVersion,omitempty"`
259
260	// ForceSendFields is a list of field names (e.g. "ClientId") to
261	// unconditionally include in API requests. By default, fields with
262	// empty or default values are omitted from API requests. However, any
263	// non-pointer, non-interface field appearing in ForceSendFields will be
264	// sent to the server regardless of whether the field is empty or not.
265	// This may be used to include empty fields in Patch requests.
266	ForceSendFields []string `json:"-"`
267
268	// NullFields is a list of field names (e.g. "ClientId") to include in
269	// API requests with the JSON null value. By default, fields with empty
270	// values are omitted from API requests. However, any field with an
271	// empty value appearing in NullFields will be sent to the server as
272	// null. It is an error if a field in this list has a non-empty value.
273	// This may be used to include null fields in Patch requests.
274	NullFields []string `json:"-"`
275}
276
277func (s *GoogleSecuritySafebrowsingV4ClientInfo) MarshalJSON() ([]byte, error) {
278	type NoMethod GoogleSecuritySafebrowsingV4ClientInfo
279	raw := NoMethod(*s)
280	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
281}
282
283// GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest: Describes
284// a Safe Browsing API update request. Clients can request updates for
285// multiple lists in a single request. The server may not respond to all
286// requests, if the server has no updates for that list. NOTE: Field
287// index 2 is unused. NEXT: 5
288type GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest struct {
289	// Client: The client metadata.
290	Client *GoogleSecuritySafebrowsingV4ClientInfo `json:"client,omitempty"`
291
292	// ListUpdateRequests: The requested threat list updates.
293	ListUpdateRequests []*GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest `json:"listUpdateRequests,omitempty"`
294
295	// ForceSendFields is a list of field names (e.g. "Client") to
296	// unconditionally include in API requests. By default, fields with
297	// empty or default values are omitted from API requests. However, any
298	// non-pointer, non-interface field appearing in ForceSendFields will be
299	// sent to the server regardless of whether the field is empty or not.
300	// This may be used to include empty fields in Patch requests.
301	ForceSendFields []string `json:"-"`
302
303	// NullFields is a list of field names (e.g. "Client") to include in API
304	// requests with the JSON null value. By default, fields with empty
305	// values are omitted from API requests. However, any field with an
306	// empty value appearing in NullFields will be sent to the server as
307	// null. It is an error if a field in this list has a non-empty value.
308	// This may be used to include null fields in Patch requests.
309	NullFields []string `json:"-"`
310}
311
312func (s *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest) MarshalJSON() ([]byte, error) {
313	type NoMethod GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest
314	raw := NoMethod(*s)
315	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
316}
317
318// GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateReq
319// uest: A single list update request.
320type GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest struct {
321	// Constraints: The constraints associated with this request.
322	Constraints *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints `json:"constraints,omitempty"`
323
324	// PlatformType: The type of platform at risk by entries present in the
325	// list.
326	//
327	// Possible values:
328	//   "PLATFORM_TYPE_UNSPECIFIED" - Unknown platform.
329	//   "WINDOWS" - Threat posed to Windows.
330	//   "LINUX" - Threat posed to Linux.
331	//   "ANDROID" - Threat posed to Android.
332	//   "OSX" - Threat posed to OS X.
333	//   "IOS" - Threat posed to iOS.
334	//   "ANY_PLATFORM" - Threat posed to at least one of the defined
335	// platforms.
336	//   "ALL_PLATFORMS" - Threat posed to all defined platforms.
337	//   "CHROME" - Threat posed to Chrome.
338	PlatformType string `json:"platformType,omitempty"`
339
340	// State: The current state of the client for the requested list (the
341	// encrypted client state that was received from the last successful
342	// list update).
343	State string `json:"state,omitempty"`
344
345	// ThreatEntryType: The types of entries present in the list.
346	//
347	// Possible values:
348	//   "THREAT_ENTRY_TYPE_UNSPECIFIED" - Unspecified.
349	//   "URL" - A URL.
350	//   "EXECUTABLE" - An executable program.
351	//   "IP_RANGE" - An IP range.
352	//   "CHROME_EXTENSION" - Chrome extension.
353	//   "FILENAME" - Filename.
354	//   "CERT" - CERT
355	ThreatEntryType string `json:"threatEntryType,omitempty"`
356
357	// ThreatType: The type of threat posed by entries present in the list.
358	//
359	// Possible values:
360	//   "THREAT_TYPE_UNSPECIFIED" - Unknown.
361	//   "MALWARE" - Malware threat type.
362	//   "SOCIAL_ENGINEERING" - Social engineering threat type.
363	//   "UNWANTED_SOFTWARE" - Unwanted software threat type.
364	//   "POTENTIALLY_HARMFUL_APPLICATION" - Potentially harmful application
365	// threat type.
366	//   "SOCIAL_ENGINEERING_INTERNAL" - Social engineering threat type for
367	// internal use.
368	//   "API_ABUSE" - API abuse threat type.
369	//   "MALICIOUS_BINARY" - Malicious binary threat type.
370	//   "CSD_WHITELIST" - Client side detection whitelist threat type.
371	//   "CSD_DOWNLOAD_WHITELIST" - Client side download detection whitelist
372	// threat type.
373	//   "CLIENT_INCIDENT" - Client incident threat type.
374	//   "CLIENT_INCIDENT_WHITELIST" - Whitelist used when detecting client
375	// incident threats. This enum was never launched and should be re-used
376	// for the next list.
377	//   "APK_MALWARE_OFFLINE" - List used for offline APK checks in PAM.
378	//   "SUBRESOURCE_FILTER" - Patterns to be used for activating the
379	// subresource filter. Interstitial will not be shown for patterns from
380	// this list.
381	//   "SUSPICIOUS" - Entities that are suspected to present a threat.
382	//   "TRICK_TO_BILL" - Trick-to-bill threat list.
383	//   "HIGH_CONFIDENCE_ALLOWLIST" - Safe list to ship hashes of known
384	// safe URL expressions.
385	//   "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips
386	// in Chrome. See go/sb-accuracytips.
387	ThreatType string `json:"threatType,omitempty"`
388
389	// ForceSendFields is a list of field names (e.g. "Constraints") to
390	// unconditionally include in API requests. By default, fields with
391	// empty or default values are omitted from API requests. However, any
392	// non-pointer, non-interface field appearing in ForceSendFields will be
393	// sent to the server regardless of whether the field is empty or not.
394	// This may be used to include empty fields in Patch requests.
395	ForceSendFields []string `json:"-"`
396
397	// NullFields is a list of field names (e.g. "Constraints") to include
398	// in API requests with the JSON null value. By default, fields with
399	// empty values are omitted from API requests. However, any field with
400	// an empty value appearing in NullFields will be sent to the server as
401	// null. It is an error if a field in this list has a non-empty value.
402	// This may be used to include null fields in Patch requests.
403	NullFields []string `json:"-"`
404}
405
406func (s *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest) MarshalJSON() ([]byte, error) {
407	type NoMethod GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest
408	raw := NoMethod(*s)
409	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
410}
411
412// GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateReq
413// uestConstraints: The constraints for this update.
414type GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints struct {
415	// DeviceLocation: A client's physical location, expressed as a ISO
416	// 31166-1 alpha-2 region code.
417	DeviceLocation string `json:"deviceLocation,omitempty"`
418
419	// Language: Requests the lists for a specific language. Expects ISO 639
420	// alpha-2 format.
421	Language string `json:"language,omitempty"`
422
423	// MaxDatabaseEntries: Sets the maximum number of entries that the
424	// client is willing to have in the local database for the specified
425	// list. This should be a power of 2 between 2**10 and 2**20. If zero,
426	// no database size limit is set.
427	MaxDatabaseEntries int64 `json:"maxDatabaseEntries,omitempty"`
428
429	// MaxUpdateEntries: The maximum size in number of entries. The update
430	// will not contain more entries than this value. This should be a power
431	// of 2 between 2**10 and 2**20. If zero, no update size limit is set.
432	MaxUpdateEntries int64 `json:"maxUpdateEntries,omitempty"`
433
434	// Region: Requests the list for a specific geographic location. If not
435	// set the server may pick that value based on the user's IP address.
436	// Expects ISO 3166-1 alpha-2 format.
437	Region string `json:"region,omitempty"`
438
439	// SupportedCompressions: The compression types supported by the client.
440	//
441	// Possible values:
442	//   "COMPRESSION_TYPE_UNSPECIFIED" - Unknown.
443	//   "RAW" - Raw, uncompressed data.
444	//   "RICE" - Rice-Golomb encoded data.
445	SupportedCompressions []string `json:"supportedCompressions,omitempty"`
446
447	// ForceSendFields is a list of field names (e.g. "DeviceLocation") to
448	// unconditionally include in API requests. By default, fields with
449	// empty or default values are omitted from API requests. However, any
450	// non-pointer, non-interface field appearing in ForceSendFields will be
451	// sent to the server regardless of whether the field is empty or not.
452	// This may be used to include empty fields in Patch requests.
453	ForceSendFields []string `json:"-"`
454
455	// NullFields is a list of field names (e.g. "DeviceLocation") to
456	// include in API requests with the JSON null value. By default, fields
457	// with empty values are omitted from API requests. However, any field
458	// with an empty value appearing in NullFields will be sent to the
459	// server as null. It is an error if a field in this list has a
460	// non-empty value. This may be used to include null fields in Patch
461	// requests.
462	NullFields []string `json:"-"`
463}
464
465func (s *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints) MarshalJSON() ([]byte, error) {
466	type NoMethod GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints
467	raw := NoMethod(*s)
468	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
469}
470
471type GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse struct {
472	// ListUpdateResponses: The list updates requested by the clients. The
473	// number of responses here may be less than the number of requests sent
474	// by clients. This is the case, for example, if the server has no
475	// updates for a particular list.
476	ListUpdateResponses []*GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse `json:"listUpdateResponses,omitempty"`
477
478	// MinimumWaitDuration: The minimum duration the client must wait before
479	// issuing any update request. If this field is not set clients may
480	// update as soon as they want.
481	MinimumWaitDuration string `json:"minimumWaitDuration,omitempty"`
482
483	// ServerResponse contains the HTTP response code and headers from the
484	// server.
485	googleapi.ServerResponse `json:"-"`
486
487	// ForceSendFields is a list of field names (e.g. "ListUpdateResponses")
488	// to unconditionally include in API requests. By default, fields with
489	// empty or default values are omitted from API requests. However, any
490	// non-pointer, non-interface field appearing in ForceSendFields will be
491	// sent to the server regardless of whether the field is empty or not.
492	// This may be used to include empty fields in Patch requests.
493	ForceSendFields []string `json:"-"`
494
495	// NullFields is a list of field names (e.g. "ListUpdateResponses") to
496	// include in API requests with the JSON null value. By default, fields
497	// with empty values are omitted from API requests. However, any field
498	// with an empty value appearing in NullFields will be sent to the
499	// server as null. It is an error if a field in this list has a
500	// non-empty value. This may be used to include null fields in Patch
501	// requests.
502	NullFields []string `json:"-"`
503}
504
505func (s *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse) MarshalJSON() ([]byte, error) {
506	type NoMethod GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse
507	raw := NoMethod(*s)
508	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
509}
510
511// GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateRe
512// sponse: An update to an individual list.
513type GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse struct {
514	// Additions: A set of entries to add to a local threat type's list.
515	// Repeated to allow for a combination of compressed and raw data to be
516	// sent in a single response.
517	Additions []*GoogleSecuritySafebrowsingV4ThreatEntrySet `json:"additions,omitempty"`
518
519	// Checksum: The expected SHA256 hash of the client state; that is, of
520	// the sorted list of all hashes present in the database after applying
521	// the provided update. If the client state doesn't match the expected
522	// state, the client must disregard this update and retry later.
523	Checksum *GoogleSecuritySafebrowsingV4Checksum `json:"checksum,omitempty"`
524
525	// NewClientState: The new client state, in encrypted format. Opaque to
526	// clients.
527	NewClientState string `json:"newClientState,omitempty"`
528
529	// PlatformType: The platform type for which data is returned.
530	//
531	// Possible values:
532	//   "PLATFORM_TYPE_UNSPECIFIED" - Unknown platform.
533	//   "WINDOWS" - Threat posed to Windows.
534	//   "LINUX" - Threat posed to Linux.
535	//   "ANDROID" - Threat posed to Android.
536	//   "OSX" - Threat posed to OS X.
537	//   "IOS" - Threat posed to iOS.
538	//   "ANY_PLATFORM" - Threat posed to at least one of the defined
539	// platforms.
540	//   "ALL_PLATFORMS" - Threat posed to all defined platforms.
541	//   "CHROME" - Threat posed to Chrome.
542	PlatformType string `json:"platformType,omitempty"`
543
544	// Removals: A set of entries to remove from a local threat type's list.
545	// In practice, this field is empty or contains exactly one
546	// ThreatEntrySet.
547	Removals []*GoogleSecuritySafebrowsingV4ThreatEntrySet `json:"removals,omitempty"`
548
549	// ResponseType: The type of response. This may indicate that an action
550	// is required by the client when the response is received.
551	//
552	// Possible values:
553	//   "RESPONSE_TYPE_UNSPECIFIED" - Unknown.
554	//   "PARTIAL_UPDATE" - Partial updates are applied to the client's
555	// existing local database.
556	//   "FULL_UPDATE" - Full updates replace the client's entire local
557	// database. This means that either the client was seriously out-of-date
558	// or the client is believed to be corrupt.
559	ResponseType string `json:"responseType,omitempty"`
560
561	// ThreatEntryType: The format of the threats.
562	//
563	// Possible values:
564	//   "THREAT_ENTRY_TYPE_UNSPECIFIED" - Unspecified.
565	//   "URL" - A URL.
566	//   "EXECUTABLE" - An executable program.
567	//   "IP_RANGE" - An IP range.
568	//   "CHROME_EXTENSION" - Chrome extension.
569	//   "FILENAME" - Filename.
570	//   "CERT" - CERT
571	ThreatEntryType string `json:"threatEntryType,omitempty"`
572
573	// ThreatType: The threat type for which data is returned.
574	//
575	// Possible values:
576	//   "THREAT_TYPE_UNSPECIFIED" - Unknown.
577	//   "MALWARE" - Malware threat type.
578	//   "SOCIAL_ENGINEERING" - Social engineering threat type.
579	//   "UNWANTED_SOFTWARE" - Unwanted software threat type.
580	//   "POTENTIALLY_HARMFUL_APPLICATION" - Potentially harmful application
581	// threat type.
582	//   "SOCIAL_ENGINEERING_INTERNAL" - Social engineering threat type for
583	// internal use.
584	//   "API_ABUSE" - API abuse threat type.
585	//   "MALICIOUS_BINARY" - Malicious binary threat type.
586	//   "CSD_WHITELIST" - Client side detection whitelist threat type.
587	//   "CSD_DOWNLOAD_WHITELIST" - Client side download detection whitelist
588	// threat type.
589	//   "CLIENT_INCIDENT" - Client incident threat type.
590	//   "CLIENT_INCIDENT_WHITELIST" - Whitelist used when detecting client
591	// incident threats. This enum was never launched and should be re-used
592	// for the next list.
593	//   "APK_MALWARE_OFFLINE" - List used for offline APK checks in PAM.
594	//   "SUBRESOURCE_FILTER" - Patterns to be used for activating the
595	// subresource filter. Interstitial will not be shown for patterns from
596	// this list.
597	//   "SUSPICIOUS" - Entities that are suspected to present a threat.
598	//   "TRICK_TO_BILL" - Trick-to-bill threat list.
599	//   "HIGH_CONFIDENCE_ALLOWLIST" - Safe list to ship hashes of known
600	// safe URL expressions.
601	//   "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips
602	// in Chrome. See go/sb-accuracytips.
603	ThreatType string `json:"threatType,omitempty"`
604
605	// ForceSendFields is a list of field names (e.g. "Additions") to
606	// unconditionally include in API requests. By default, fields with
607	// empty or default values are omitted from API requests. However, any
608	// non-pointer, non-interface field appearing in ForceSendFields will be
609	// sent to the server regardless of whether the field is empty or not.
610	// This may be used to include empty fields in Patch requests.
611	ForceSendFields []string `json:"-"`
612
613	// NullFields is a list of field names (e.g. "Additions") to include in
614	// API requests with the JSON null value. By default, fields with empty
615	// values are omitted from API requests. However, any field with an
616	// empty value appearing in NullFields will be sent to the server as
617	// null. It is an error if a field in this list has a non-empty value.
618	// This may be used to include null fields in Patch requests.
619	NullFields []string `json:"-"`
620}
621
622func (s *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse) MarshalJSON() ([]byte, error) {
623	type NoMethod GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse
624	raw := NoMethod(*s)
625	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
626}
627
628// GoogleSecuritySafebrowsingV4FindFullHashesRequest: Request to return
629// full hashes matched by the provided hash prefixes.
630type GoogleSecuritySafebrowsingV4FindFullHashesRequest struct {
631	// ApiClient: Client metadata associated with callers of higher-level
632	// APIs built on top of the client's implementation.
633	ApiClient *GoogleSecuritySafebrowsingV4ClientInfo `json:"apiClient,omitempty"`
634
635	// Client: The client metadata.
636	Client *GoogleSecuritySafebrowsingV4ClientInfo `json:"client,omitempty"`
637
638	// ClientStates: The current client states for each of the client's
639	// local threat lists.
640	ClientStates []string `json:"clientStates,omitempty"`
641
642	// ThreatInfo: The lists and hashes to be checked.
643	ThreatInfo *GoogleSecuritySafebrowsingV4ThreatInfo `json:"threatInfo,omitempty"`
644
645	// ForceSendFields is a list of field names (e.g. "ApiClient") to
646	// unconditionally include in API requests. By default, fields with
647	// empty or default values are omitted from API requests. However, any
648	// non-pointer, non-interface field appearing in ForceSendFields will be
649	// sent to the server regardless of whether the field is empty or not.
650	// This may be used to include empty fields in Patch requests.
651	ForceSendFields []string `json:"-"`
652
653	// NullFields is a list of field names (e.g. "ApiClient") to include in
654	// API requests with the JSON null value. By default, fields with empty
655	// values are omitted from API requests. However, any field with an
656	// empty value appearing in NullFields will be sent to the server as
657	// null. It is an error if a field in this list has a non-empty value.
658	// This may be used to include null fields in Patch requests.
659	NullFields []string `json:"-"`
660}
661
662func (s *GoogleSecuritySafebrowsingV4FindFullHashesRequest) MarshalJSON() ([]byte, error) {
663	type NoMethod GoogleSecuritySafebrowsingV4FindFullHashesRequest
664	raw := NoMethod(*s)
665	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
666}
667
668type GoogleSecuritySafebrowsingV4FindFullHashesResponse struct {
669	// Matches: The full hashes that matched the requested prefixes.
670	Matches []*GoogleSecuritySafebrowsingV4ThreatMatch `json:"matches,omitempty"`
671
672	// MinimumWaitDuration: The minimum duration the client must wait before
673	// issuing any find hashes request. If this field is not set, clients
674	// can issue a request as soon as they want.
675	MinimumWaitDuration string `json:"minimumWaitDuration,omitempty"`
676
677	// NegativeCacheDuration: For requested entities that did not match the
678	// threat list, how long to cache the response.
679	NegativeCacheDuration string `json:"negativeCacheDuration,omitempty"`
680
681	// ServerResponse contains the HTTP response code and headers from the
682	// server.
683	googleapi.ServerResponse `json:"-"`
684
685	// ForceSendFields is a list of field names (e.g. "Matches") to
686	// unconditionally include in API requests. By default, fields with
687	// empty or default values are omitted from API requests. However, any
688	// non-pointer, non-interface field appearing in ForceSendFields will be
689	// sent to the server regardless of whether the field is empty or not.
690	// This may be used to include empty fields in Patch requests.
691	ForceSendFields []string `json:"-"`
692
693	// NullFields is a list of field names (e.g. "Matches") to include in
694	// API requests with the JSON null value. By default, fields with empty
695	// values are omitted from API requests. However, any field with an
696	// empty value appearing in NullFields will be sent to the server as
697	// null. It is an error if a field in this list has a non-empty value.
698	// This may be used to include null fields in Patch requests.
699	NullFields []string `json:"-"`
700}
701
702func (s *GoogleSecuritySafebrowsingV4FindFullHashesResponse) MarshalJSON() ([]byte, error) {
703	type NoMethod GoogleSecuritySafebrowsingV4FindFullHashesResponse
704	raw := NoMethod(*s)
705	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
706}
707
708// GoogleSecuritySafebrowsingV4FindThreatMatchesRequest: Request to
709// check entries against lists.
710type GoogleSecuritySafebrowsingV4FindThreatMatchesRequest struct {
711	// Client: The client metadata.
712	Client *GoogleSecuritySafebrowsingV4ClientInfo `json:"client,omitempty"`
713
714	// ThreatInfo: The lists and entries to be checked for matches.
715	ThreatInfo *GoogleSecuritySafebrowsingV4ThreatInfo `json:"threatInfo,omitempty"`
716
717	// ForceSendFields is a list of field names (e.g. "Client") to
718	// unconditionally include in API requests. By default, fields with
719	// empty or default values are omitted from API requests. However, any
720	// non-pointer, non-interface field appearing in ForceSendFields will be
721	// sent to the server regardless of whether the field is empty or not.
722	// This may be used to include empty fields in Patch requests.
723	ForceSendFields []string `json:"-"`
724
725	// NullFields is a list of field names (e.g. "Client") to include in API
726	// requests with the JSON null value. By default, fields with empty
727	// values are omitted from API requests. However, any field with an
728	// empty value appearing in NullFields will be sent to the server as
729	// null. It is an error if a field in this list has a non-empty value.
730	// This may be used to include null fields in Patch requests.
731	NullFields []string `json:"-"`
732}
733
734func (s *GoogleSecuritySafebrowsingV4FindThreatMatchesRequest) MarshalJSON() ([]byte, error) {
735	type NoMethod GoogleSecuritySafebrowsingV4FindThreatMatchesRequest
736	raw := NoMethod(*s)
737	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
738}
739
740type GoogleSecuritySafebrowsingV4FindThreatMatchesResponse struct {
741	// Matches: The threat list matches.
742	Matches []*GoogleSecuritySafebrowsingV4ThreatMatch `json:"matches,omitempty"`
743
744	// ServerResponse contains the HTTP response code and headers from the
745	// server.
746	googleapi.ServerResponse `json:"-"`
747
748	// ForceSendFields is a list of field names (e.g. "Matches") to
749	// unconditionally include in API requests. By default, fields with
750	// empty or default values are omitted from API requests. However, any
751	// non-pointer, non-interface field appearing in ForceSendFields will be
752	// sent to the server regardless of whether the field is empty or not.
753	// This may be used to include empty fields in Patch requests.
754	ForceSendFields []string `json:"-"`
755
756	// NullFields is a list of field names (e.g. "Matches") to include in
757	// API requests with the JSON null value. By default, fields with empty
758	// values are omitted from API requests. However, any field with an
759	// empty value appearing in NullFields will be sent to the server as
760	// null. It is an error if a field in this list has a non-empty value.
761	// This may be used to include null fields in Patch requests.
762	NullFields []string `json:"-"`
763}
764
765func (s *GoogleSecuritySafebrowsingV4FindThreatMatchesResponse) MarshalJSON() ([]byte, error) {
766	type NoMethod GoogleSecuritySafebrowsingV4FindThreatMatchesResponse
767	raw := NoMethod(*s)
768	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
769}
770
771type GoogleSecuritySafebrowsingV4ListThreatListsResponse struct {
772	// ThreatLists: The lists available for download by the client.
773	ThreatLists []*GoogleSecuritySafebrowsingV4ThreatListDescriptor `json:"threatLists,omitempty"`
774
775	// ServerResponse contains the HTTP response code and headers from the
776	// server.
777	googleapi.ServerResponse `json:"-"`
778
779	// ForceSendFields is a list of field names (e.g. "ThreatLists") to
780	// unconditionally include in API requests. By default, fields with
781	// empty or default values are omitted from API requests. However, any
782	// non-pointer, non-interface field appearing in ForceSendFields will be
783	// sent to the server regardless of whether the field is empty or not.
784	// This may be used to include empty fields in Patch requests.
785	ForceSendFields []string `json:"-"`
786
787	// NullFields is a list of field names (e.g. "ThreatLists") to include
788	// in API requests with the JSON null value. By default, fields with
789	// empty values are omitted from API requests. However, any field with
790	// an empty value appearing in NullFields will be sent to the server as
791	// null. It is an error if a field in this list has a non-empty value.
792	// This may be used to include null fields in Patch requests.
793	NullFields []string `json:"-"`
794}
795
796func (s *GoogleSecuritySafebrowsingV4ListThreatListsResponse) MarshalJSON() ([]byte, error) {
797	type NoMethod GoogleSecuritySafebrowsingV4ListThreatListsResponse
798	raw := NoMethod(*s)
799	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
800}
801
802// GoogleSecuritySafebrowsingV4RawHashes: The uncompressed threat
803// entries in hash format of a particular prefix length. Hashes can be
804// anywhere from 4 to 32 bytes in size. A large majority are 4 bytes,
805// but some hashes are lengthened if they collide with the hash of a
806// popular URL. Used for sending ThreatEntrySet to clients that do not
807// support compression, or when sending non-4-byte hashes to clients
808// that do support compression.
809type GoogleSecuritySafebrowsingV4RawHashes struct {
810	// PrefixSize: The number of bytes for each prefix encoded below. This
811	// field can be anywhere from 4 (shortest prefix) to 32 (full SHA256
812	// hash).
813	PrefixSize int64 `json:"prefixSize,omitempty"`
814
815	// RawHashes: The hashes, in binary format, concatenated into one long
816	// string. Hashes are sorted in lexicographic order. For JSON API users,
817	// hashes are base64-encoded.
818	RawHashes string `json:"rawHashes,omitempty"`
819
820	// ForceSendFields is a list of field names (e.g. "PrefixSize") to
821	// unconditionally include in API requests. By default, fields with
822	// empty or default values are omitted from API requests. However, any
823	// non-pointer, non-interface field appearing in ForceSendFields will be
824	// sent to the server regardless of whether the field is empty or not.
825	// This may be used to include empty fields in Patch requests.
826	ForceSendFields []string `json:"-"`
827
828	// NullFields is a list of field names (e.g. "PrefixSize") to include in
829	// API requests with the JSON null value. By default, fields with empty
830	// values are omitted from API requests. However, any field with an
831	// empty value appearing in NullFields will be sent to the server as
832	// null. It is an error if a field in this list has a non-empty value.
833	// This may be used to include null fields in Patch requests.
834	NullFields []string `json:"-"`
835}
836
837func (s *GoogleSecuritySafebrowsingV4RawHashes) MarshalJSON() ([]byte, error) {
838	type NoMethod GoogleSecuritySafebrowsingV4RawHashes
839	raw := NoMethod(*s)
840	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
841}
842
843// GoogleSecuritySafebrowsingV4RawIndices: A set of raw indices to
844// remove from a local list.
845type GoogleSecuritySafebrowsingV4RawIndices struct {
846	// Indices: The indices to remove from a lexicographically-sorted local
847	// list.
848	Indices []int64 `json:"indices,omitempty"`
849
850	// ForceSendFields is a list of field names (e.g. "Indices") to
851	// unconditionally include in API requests. By default, fields with
852	// empty or default values are omitted from API requests. However, any
853	// non-pointer, non-interface field appearing in ForceSendFields will be
854	// sent to the server regardless of whether the field is empty or not.
855	// This may be used to include empty fields in Patch requests.
856	ForceSendFields []string `json:"-"`
857
858	// NullFields is a list of field names (e.g. "Indices") to include in
859	// API requests with the JSON null value. By default, fields with empty
860	// values are omitted from API requests. However, any field with an
861	// empty value appearing in NullFields will be sent to the server as
862	// null. It is an error if a field in this list has a non-empty value.
863	// This may be used to include null fields in Patch requests.
864	NullFields []string `json:"-"`
865}
866
867func (s *GoogleSecuritySafebrowsingV4RawIndices) MarshalJSON() ([]byte, error) {
868	type NoMethod GoogleSecuritySafebrowsingV4RawIndices
869	raw := NoMethod(*s)
870	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
871}
872
873// GoogleSecuritySafebrowsingV4RiceDeltaEncoding: The Rice-Golomb
874// encoded data. Used for sending compressed 4-byte hashes or compressed
875// removal indices.
876type GoogleSecuritySafebrowsingV4RiceDeltaEncoding struct {
877	// EncodedData: The encoded deltas that are encoded using the
878	// Golomb-Rice coder.
879	EncodedData string `json:"encodedData,omitempty"`
880
881	// FirstValue: The offset of the first entry in the encoded data, or, if
882	// only a single integer was encoded, that single integer's value. If
883	// the field is empty or missing, assume zero.
884	FirstValue int64 `json:"firstValue,omitempty,string"`
885
886	// NumEntries: The number of entries that are delta encoded in the
887	// encoded data. If only a single integer was encoded, this will be zero
888	// and the single value will be stored in `first_value`.
889	NumEntries int64 `json:"numEntries,omitempty"`
890
891	// RiceParameter: The Golomb-Rice parameter, which is a number between 2
892	// and 28. This field is missing (that is, zero) if `num_entries` is
893	// zero.
894	RiceParameter int64 `json:"riceParameter,omitempty"`
895
896	// ForceSendFields is a list of field names (e.g. "EncodedData") to
897	// unconditionally include in API requests. By default, fields with
898	// empty or default values are omitted from API requests. However, any
899	// non-pointer, non-interface field appearing in ForceSendFields will be
900	// sent to the server regardless of whether the field is empty or not.
901	// This may be used to include empty fields in Patch requests.
902	ForceSendFields []string `json:"-"`
903
904	// NullFields is a list of field names (e.g. "EncodedData") to include
905	// in API requests with the JSON null value. By default, fields with
906	// empty values are omitted from API requests. However, any field with
907	// an empty value appearing in NullFields will be sent to the server as
908	// null. It is an error if a field in this list has a non-empty value.
909	// This may be used to include null fields in Patch requests.
910	NullFields []string `json:"-"`
911}
912
913func (s *GoogleSecuritySafebrowsingV4RiceDeltaEncoding) MarshalJSON() ([]byte, error) {
914	type NoMethod GoogleSecuritySafebrowsingV4RiceDeltaEncoding
915	raw := NoMethod(*s)
916	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
917}
918
919// GoogleSecuritySafebrowsingV4ThreatEntry: An individual threat; for
920// example, a malicious URL or its hash representation. Only one of
921// these fields should be set.
922type GoogleSecuritySafebrowsingV4ThreatEntry struct {
923	// Digest: The digest of an executable in SHA256 format. The API
924	// supports both binary and hex digests. For JSON requests, digests are
925	// base64-encoded.
926	Digest string `json:"digest,omitempty"`
927
928	// Hash: A hash prefix, consisting of the most significant 4-32 bytes of
929	// a SHA256 hash. This field is in binary format. For JSON requests,
930	// hashes are base64-encoded.
931	Hash string `json:"hash,omitempty"`
932
933	// Url: A URL.
934	Url string `json:"url,omitempty"`
935
936	// ForceSendFields is a list of field names (e.g. "Digest") to
937	// unconditionally include in API requests. By default, fields with
938	// empty or default values are omitted from API requests. However, any
939	// non-pointer, non-interface field appearing in ForceSendFields will be
940	// sent to the server regardless of whether the field is empty or not.
941	// This may be used to include empty fields in Patch requests.
942	ForceSendFields []string `json:"-"`
943
944	// NullFields is a list of field names (e.g. "Digest") to include in API
945	// requests with the JSON null value. By default, fields with empty
946	// values are omitted from API requests. However, any field with an
947	// empty value appearing in NullFields will be sent to the server as
948	// null. It is an error if a field in this list has a non-empty value.
949	// This may be used to include null fields in Patch requests.
950	NullFields []string `json:"-"`
951}
952
953func (s *GoogleSecuritySafebrowsingV4ThreatEntry) MarshalJSON() ([]byte, error) {
954	type NoMethod GoogleSecuritySafebrowsingV4ThreatEntry
955	raw := NoMethod(*s)
956	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
957}
958
959// GoogleSecuritySafebrowsingV4ThreatEntryMetadata: The metadata
960// associated with a specific threat entry. The client is expected to
961// know the metadata key/value pairs associated with each threat type.
962type GoogleSecuritySafebrowsingV4ThreatEntryMetadata struct {
963	// Entries: The metadata entries.
964	Entries []*GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry `json:"entries,omitempty"`
965
966	// ForceSendFields is a list of field names (e.g. "Entries") to
967	// unconditionally include in API requests. By default, fields with
968	// empty or default values are omitted from API requests. However, any
969	// non-pointer, non-interface field appearing in ForceSendFields will be
970	// sent to the server regardless of whether the field is empty or not.
971	// This may be used to include empty fields in Patch requests.
972	ForceSendFields []string `json:"-"`
973
974	// NullFields is a list of field names (e.g. "Entries") to include in
975	// API requests with the JSON null value. By default, fields with empty
976	// values are omitted from API requests. However, any field with an
977	// empty value appearing in NullFields will be sent to the server as
978	// null. It is an error if a field in this list has a non-empty value.
979	// This may be used to include null fields in Patch requests.
980	NullFields []string `json:"-"`
981}
982
983func (s *GoogleSecuritySafebrowsingV4ThreatEntryMetadata) MarshalJSON() ([]byte, error) {
984	type NoMethod GoogleSecuritySafebrowsingV4ThreatEntryMetadata
985	raw := NoMethod(*s)
986	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
987}
988
989// GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry: A
990// single metadata entry.
991type GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry struct {
992	// Key: The metadata entry key. For JSON requests, the key is
993	// base64-encoded.
994	Key string `json:"key,omitempty"`
995
996	// Value: The metadata entry value. For JSON requests, the value is
997	// base64-encoded.
998	Value string `json:"value,omitempty"`
999
1000	// ForceSendFields is a list of field names (e.g. "Key") to
1001	// unconditionally include in API requests. By default, fields with
1002	// empty or default values are omitted from API requests. However, any
1003	// non-pointer, non-interface field appearing in ForceSendFields will be
1004	// sent to the server regardless of whether the field is empty or not.
1005	// This may be used to include empty fields in Patch requests.
1006	ForceSendFields []string `json:"-"`
1007
1008	// NullFields is a list of field names (e.g. "Key") to include in API
1009	// requests with the JSON null value. By default, fields with empty
1010	// values are omitted from API requests. However, any field with an
1011	// empty value appearing in NullFields will be sent to the server as
1012	// null. It is an error if a field in this list has a non-empty value.
1013	// This may be used to include null fields in Patch requests.
1014	NullFields []string `json:"-"`
1015}
1016
1017func (s *GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry) MarshalJSON() ([]byte, error) {
1018	type NoMethod GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry
1019	raw := NoMethod(*s)
1020	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1021}
1022
1023// GoogleSecuritySafebrowsingV4ThreatEntrySet: A set of threats that
1024// should be added or removed from a client's local database.
1025type GoogleSecuritySafebrowsingV4ThreatEntrySet struct {
1026	// CompressionType: The compression type for the entries in this set.
1027	//
1028	// Possible values:
1029	//   "COMPRESSION_TYPE_UNSPECIFIED" - Unknown.
1030	//   "RAW" - Raw, uncompressed data.
1031	//   "RICE" - Rice-Golomb encoded data.
1032	CompressionType string `json:"compressionType,omitempty"`
1033
1034	// RawHashes: The raw SHA256-formatted entries.
1035	RawHashes *GoogleSecuritySafebrowsingV4RawHashes `json:"rawHashes,omitempty"`
1036
1037	// RawIndices: The raw removal indices for a local list.
1038	RawIndices *GoogleSecuritySafebrowsingV4RawIndices `json:"rawIndices,omitempty"`
1039
1040	// RiceHashes: The encoded 4-byte prefixes of SHA256-formatted entries,
1041	// using a Golomb-Rice encoding. The hashes are converted to uint32,
1042	// sorted in ascending order, then delta encoded and stored as
1043	// encoded_data.
1044	RiceHashes *GoogleSecuritySafebrowsingV4RiceDeltaEncoding `json:"riceHashes,omitempty"`
1045
1046	// RiceIndices: The encoded local, lexicographically-sorted list
1047	// indices, using a Golomb-Rice encoding. Used for sending compressed
1048	// removal indices. The removal indices (uint32) are sorted in ascending
1049	// order, then delta encoded and stored as encoded_data.
1050	RiceIndices *GoogleSecuritySafebrowsingV4RiceDeltaEncoding `json:"riceIndices,omitempty"`
1051
1052	// ForceSendFields is a list of field names (e.g. "CompressionType") to
1053	// unconditionally include in API requests. By default, fields with
1054	// empty or default values are omitted from API requests. However, any
1055	// non-pointer, non-interface field appearing in ForceSendFields will be
1056	// sent to the server regardless of whether the field is empty or not.
1057	// This may be used to include empty fields in Patch requests.
1058	ForceSendFields []string `json:"-"`
1059
1060	// NullFields is a list of field names (e.g. "CompressionType") to
1061	// include in API requests with the JSON null value. By default, fields
1062	// with empty values are omitted from API requests. However, any field
1063	// with an empty value appearing in NullFields will be sent to the
1064	// server as null. It is an error if a field in this list has a
1065	// non-empty value. This may be used to include null fields in Patch
1066	// requests.
1067	NullFields []string `json:"-"`
1068}
1069
1070func (s *GoogleSecuritySafebrowsingV4ThreatEntrySet) MarshalJSON() ([]byte, error) {
1071	type NoMethod GoogleSecuritySafebrowsingV4ThreatEntrySet
1072	raw := NoMethod(*s)
1073	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1074}
1075
1076type GoogleSecuritySafebrowsingV4ThreatHit struct {
1077	// ClientInfo: Client-reported identification.
1078	ClientInfo *GoogleSecuritySafebrowsingV4ClientInfo `json:"clientInfo,omitempty"`
1079
1080	// Entry: The threat entry responsible for the hit. Full hash should be
1081	// reported for hash-based hits.
1082	Entry *GoogleSecuritySafebrowsingV4ThreatEntry `json:"entry,omitempty"`
1083
1084	// PlatformType: The platform type reported.
1085	//
1086	// Possible values:
1087	//   "PLATFORM_TYPE_UNSPECIFIED" - Unknown platform.
1088	//   "WINDOWS" - Threat posed to Windows.
1089	//   "LINUX" - Threat posed to Linux.
1090	//   "ANDROID" - Threat posed to Android.
1091	//   "OSX" - Threat posed to OS X.
1092	//   "IOS" - Threat posed to iOS.
1093	//   "ANY_PLATFORM" - Threat posed to at least one of the defined
1094	// platforms.
1095	//   "ALL_PLATFORMS" - Threat posed to all defined platforms.
1096	//   "CHROME" - Threat posed to Chrome.
1097	PlatformType string `json:"platformType,omitempty"`
1098
1099	// Resources: The resources related to the threat hit.
1100	Resources []*GoogleSecuritySafebrowsingV4ThreatHitThreatSource `json:"resources,omitempty"`
1101
1102	// ThreatType: The threat type reported.
1103	//
1104	// Possible values:
1105	//   "THREAT_TYPE_UNSPECIFIED" - Unknown.
1106	//   "MALWARE" - Malware threat type.
1107	//   "SOCIAL_ENGINEERING" - Social engineering threat type.
1108	//   "UNWANTED_SOFTWARE" - Unwanted software threat type.
1109	//   "POTENTIALLY_HARMFUL_APPLICATION" - Potentially harmful application
1110	// threat type.
1111	//   "SOCIAL_ENGINEERING_INTERNAL" - Social engineering threat type for
1112	// internal use.
1113	//   "API_ABUSE" - API abuse threat type.
1114	//   "MALICIOUS_BINARY" - Malicious binary threat type.
1115	//   "CSD_WHITELIST" - Client side detection whitelist threat type.
1116	//   "CSD_DOWNLOAD_WHITELIST" - Client side download detection whitelist
1117	// threat type.
1118	//   "CLIENT_INCIDENT" - Client incident threat type.
1119	//   "CLIENT_INCIDENT_WHITELIST" - Whitelist used when detecting client
1120	// incident threats. This enum was never launched and should be re-used
1121	// for the next list.
1122	//   "APK_MALWARE_OFFLINE" - List used for offline APK checks in PAM.
1123	//   "SUBRESOURCE_FILTER" - Patterns to be used for activating the
1124	// subresource filter. Interstitial will not be shown for patterns from
1125	// this list.
1126	//   "SUSPICIOUS" - Entities that are suspected to present a threat.
1127	//   "TRICK_TO_BILL" - Trick-to-bill threat list.
1128	//   "HIGH_CONFIDENCE_ALLOWLIST" - Safe list to ship hashes of known
1129	// safe URL expressions.
1130	//   "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips
1131	// in Chrome. See go/sb-accuracytips.
1132	ThreatType string `json:"threatType,omitempty"`
1133
1134	// UserInfo: Details about the user that encountered the threat.
1135	UserInfo *GoogleSecuritySafebrowsingV4ThreatHitUserInfo `json:"userInfo,omitempty"`
1136
1137	// ForceSendFields is a list of field names (e.g. "ClientInfo") to
1138	// unconditionally include in API requests. By default, fields with
1139	// empty or default values are omitted from API requests. However, any
1140	// non-pointer, non-interface field appearing in ForceSendFields will be
1141	// sent to the server regardless of whether the field is empty or not.
1142	// This may be used to include empty fields in Patch requests.
1143	ForceSendFields []string `json:"-"`
1144
1145	// NullFields is a list of field names (e.g. "ClientInfo") to include in
1146	// API requests with the JSON null value. By default, fields with empty
1147	// values are omitted from API requests. However, any field with an
1148	// empty value appearing in NullFields will be sent to the server as
1149	// null. It is an error if a field in this list has a non-empty value.
1150	// This may be used to include null fields in Patch requests.
1151	NullFields []string `json:"-"`
1152}
1153
1154func (s *GoogleSecuritySafebrowsingV4ThreatHit) MarshalJSON() ([]byte, error) {
1155	type NoMethod GoogleSecuritySafebrowsingV4ThreatHit
1156	raw := NoMethod(*s)
1157	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1158}
1159
1160// GoogleSecuritySafebrowsingV4ThreatHitThreatSource: A single resource
1161// related to a threat hit.
1162type GoogleSecuritySafebrowsingV4ThreatHitThreatSource struct {
1163	// Referrer: Referrer of the resource. Only set if the referrer is
1164	// available.
1165	Referrer string `json:"referrer,omitempty"`
1166
1167	// RemoteIp: The remote IP of the resource in ASCII format. Either IPv4
1168	// or IPv6.
1169	RemoteIp string `json:"remoteIp,omitempty"`
1170
1171	// Type: The type of source reported.
1172	//
1173	// Possible values:
1174	//   "THREAT_SOURCE_TYPE_UNSPECIFIED" - Unknown.
1175	//   "MATCHING_URL" - The URL that matched the threat list (for which
1176	// GetFullHash returned a valid hash).
1177	//   "TAB_URL" - The final top-level URL of the tab that the client was
1178	// browsing when the match occurred.
1179	//   "TAB_REDIRECT" - A redirect URL that was fetched before hitting the
1180	// final TAB_URL.
1181	//   "TAB_RESOURCE" - A resource loaded within the final TAB_URL.
1182	Type string `json:"type,omitempty"`
1183
1184	// Url: The URL of the resource.
1185	Url string `json:"url,omitempty"`
1186
1187	// ForceSendFields is a list of field names (e.g. "Referrer") to
1188	// unconditionally include in API requests. By default, fields with
1189	// empty or default values are omitted from API requests. However, any
1190	// non-pointer, non-interface field appearing in ForceSendFields will be
1191	// sent to the server regardless of whether the field is empty or not.
1192	// This may be used to include empty fields in Patch requests.
1193	ForceSendFields []string `json:"-"`
1194
1195	// NullFields is a list of field names (e.g. "Referrer") to include in
1196	// API requests with the JSON null value. By default, fields with empty
1197	// values are omitted from API requests. However, any field with an
1198	// empty value appearing in NullFields will be sent to the server as
1199	// null. It is an error if a field in this list has a non-empty value.
1200	// This may be used to include null fields in Patch requests.
1201	NullFields []string `json:"-"`
1202}
1203
1204func (s *GoogleSecuritySafebrowsingV4ThreatHitThreatSource) MarshalJSON() ([]byte, error) {
1205	type NoMethod GoogleSecuritySafebrowsingV4ThreatHitThreatSource
1206	raw := NoMethod(*s)
1207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1208}
1209
1210// GoogleSecuritySafebrowsingV4ThreatHitUserInfo: Details about the user
1211// that encountered the threat.
1212type GoogleSecuritySafebrowsingV4ThreatHitUserInfo struct {
1213	// RegionCode: The UN M.49 region code associated with the user's
1214	// location.
1215	RegionCode string `json:"regionCode,omitempty"`
1216
1217	// UserId: Unique user identifier defined by the client.
1218	UserId string `json:"userId,omitempty"`
1219
1220	// ForceSendFields is a list of field names (e.g. "RegionCode") to
1221	// unconditionally include in API requests. By default, fields with
1222	// empty or default values are omitted from API requests. However, any
1223	// non-pointer, non-interface field appearing in ForceSendFields will be
1224	// sent to the server regardless of whether the field is empty or not.
1225	// This may be used to include empty fields in Patch requests.
1226	ForceSendFields []string `json:"-"`
1227
1228	// NullFields is a list of field names (e.g. "RegionCode") to include in
1229	// API requests with the JSON null value. By default, fields with empty
1230	// values are omitted from API requests. However, any field with an
1231	// empty value appearing in NullFields will be sent to the server as
1232	// null. It is an error if a field in this list has a non-empty value.
1233	// This may be used to include null fields in Patch requests.
1234	NullFields []string `json:"-"`
1235}
1236
1237func (s *GoogleSecuritySafebrowsingV4ThreatHitUserInfo) MarshalJSON() ([]byte, error) {
1238	type NoMethod GoogleSecuritySafebrowsingV4ThreatHitUserInfo
1239	raw := NoMethod(*s)
1240	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1241}
1242
1243// GoogleSecuritySafebrowsingV4ThreatInfo: The information regarding one
1244// or more threats that a client submits when checking for matches in
1245// threat lists.
1246type GoogleSecuritySafebrowsingV4ThreatInfo struct {
1247	// PlatformTypes: The platform types to be checked.
1248	//
1249	// Possible values:
1250	//   "PLATFORM_TYPE_UNSPECIFIED" - Unknown platform.
1251	//   "WINDOWS" - Threat posed to Windows.
1252	//   "LINUX" - Threat posed to Linux.
1253	//   "ANDROID" - Threat posed to Android.
1254	//   "OSX" - Threat posed to OS X.
1255	//   "IOS" - Threat posed to iOS.
1256	//   "ANY_PLATFORM" - Threat posed to at least one of the defined
1257	// platforms.
1258	//   "ALL_PLATFORMS" - Threat posed to all defined platforms.
1259	//   "CHROME" - Threat posed to Chrome.
1260	PlatformTypes []string `json:"platformTypes,omitempty"`
1261
1262	// ThreatEntries: The threat entries to be checked.
1263	ThreatEntries []*GoogleSecuritySafebrowsingV4ThreatEntry `json:"threatEntries,omitempty"`
1264
1265	// ThreatEntryTypes: The entry types to be checked.
1266	//
1267	// Possible values:
1268	//   "THREAT_ENTRY_TYPE_UNSPECIFIED" - Unspecified.
1269	//   "URL" - A URL.
1270	//   "EXECUTABLE" - An executable program.
1271	//   "IP_RANGE" - An IP range.
1272	//   "CHROME_EXTENSION" - Chrome extension.
1273	//   "FILENAME" - Filename.
1274	//   "CERT" - CERT
1275	ThreatEntryTypes []string `json:"threatEntryTypes,omitempty"`
1276
1277	// ThreatTypes: The threat types to be checked.
1278	//
1279	// Possible values:
1280	//   "THREAT_TYPE_UNSPECIFIED" - Unknown.
1281	//   "MALWARE" - Malware threat type.
1282	//   "SOCIAL_ENGINEERING" - Social engineering threat type.
1283	//   "UNWANTED_SOFTWARE" - Unwanted software threat type.
1284	//   "POTENTIALLY_HARMFUL_APPLICATION" - Potentially harmful application
1285	// threat type.
1286	//   "SOCIAL_ENGINEERING_INTERNAL" - Social engineering threat type for
1287	// internal use.
1288	//   "API_ABUSE" - API abuse threat type.
1289	//   "MALICIOUS_BINARY" - Malicious binary threat type.
1290	//   "CSD_WHITELIST" - Client side detection whitelist threat type.
1291	//   "CSD_DOWNLOAD_WHITELIST" - Client side download detection whitelist
1292	// threat type.
1293	//   "CLIENT_INCIDENT" - Client incident threat type.
1294	//   "CLIENT_INCIDENT_WHITELIST" - Whitelist used when detecting client
1295	// incident threats. This enum was never launched and should be re-used
1296	// for the next list.
1297	//   "APK_MALWARE_OFFLINE" - List used for offline APK checks in PAM.
1298	//   "SUBRESOURCE_FILTER" - Patterns to be used for activating the
1299	// subresource filter. Interstitial will not be shown for patterns from
1300	// this list.
1301	//   "SUSPICIOUS" - Entities that are suspected to present a threat.
1302	//   "TRICK_TO_BILL" - Trick-to-bill threat list.
1303	//   "HIGH_CONFIDENCE_ALLOWLIST" - Safe list to ship hashes of known
1304	// safe URL expressions.
1305	//   "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips
1306	// in Chrome. See go/sb-accuracytips.
1307	ThreatTypes []string `json:"threatTypes,omitempty"`
1308
1309	// ForceSendFields is a list of field names (e.g. "PlatformTypes") to
1310	// unconditionally include in API requests. By default, fields with
1311	// empty or default values are omitted from API requests. However, any
1312	// non-pointer, non-interface field appearing in ForceSendFields will be
1313	// sent to the server regardless of whether the field is empty or not.
1314	// This may be used to include empty fields in Patch requests.
1315	ForceSendFields []string `json:"-"`
1316
1317	// NullFields is a list of field names (e.g. "PlatformTypes") to include
1318	// in API requests with the JSON null value. By default, fields with
1319	// empty values are omitted from API requests. However, any field with
1320	// an empty value appearing in NullFields will be sent to the server as
1321	// null. It is an error if a field in this list has a non-empty value.
1322	// This may be used to include null fields in Patch requests.
1323	NullFields []string `json:"-"`
1324}
1325
1326func (s *GoogleSecuritySafebrowsingV4ThreatInfo) MarshalJSON() ([]byte, error) {
1327	type NoMethod GoogleSecuritySafebrowsingV4ThreatInfo
1328	raw := NoMethod(*s)
1329	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1330}
1331
1332// GoogleSecuritySafebrowsingV4ThreatListDescriptor: Describes an
1333// individual threat list. A list is defined by three parameters: the
1334// type of threat posed, the type of platform targeted by the threat,
1335// and the type of entries in the list.
1336type GoogleSecuritySafebrowsingV4ThreatListDescriptor struct {
1337	// PlatformType: The platform type targeted by the list's entries.
1338	//
1339	// Possible values:
1340	//   "PLATFORM_TYPE_UNSPECIFIED" - Unknown platform.
1341	//   "WINDOWS" - Threat posed to Windows.
1342	//   "LINUX" - Threat posed to Linux.
1343	//   "ANDROID" - Threat posed to Android.
1344	//   "OSX" - Threat posed to OS X.
1345	//   "IOS" - Threat posed to iOS.
1346	//   "ANY_PLATFORM" - Threat posed to at least one of the defined
1347	// platforms.
1348	//   "ALL_PLATFORMS" - Threat posed to all defined platforms.
1349	//   "CHROME" - Threat posed to Chrome.
1350	PlatformType string `json:"platformType,omitempty"`
1351
1352	// ThreatEntryType: The entry types contained in the list.
1353	//
1354	// Possible values:
1355	//   "THREAT_ENTRY_TYPE_UNSPECIFIED" - Unspecified.
1356	//   "URL" - A URL.
1357	//   "EXECUTABLE" - An executable program.
1358	//   "IP_RANGE" - An IP range.
1359	//   "CHROME_EXTENSION" - Chrome extension.
1360	//   "FILENAME" - Filename.
1361	//   "CERT" - CERT
1362	ThreatEntryType string `json:"threatEntryType,omitempty"`
1363
1364	// ThreatType: The threat type posed by the list's entries.
1365	//
1366	// Possible values:
1367	//   "THREAT_TYPE_UNSPECIFIED" - Unknown.
1368	//   "MALWARE" - Malware threat type.
1369	//   "SOCIAL_ENGINEERING" - Social engineering threat type.
1370	//   "UNWANTED_SOFTWARE" - Unwanted software threat type.
1371	//   "POTENTIALLY_HARMFUL_APPLICATION" - Potentially harmful application
1372	// threat type.
1373	//   "SOCIAL_ENGINEERING_INTERNAL" - Social engineering threat type for
1374	// internal use.
1375	//   "API_ABUSE" - API abuse threat type.
1376	//   "MALICIOUS_BINARY" - Malicious binary threat type.
1377	//   "CSD_WHITELIST" - Client side detection whitelist threat type.
1378	//   "CSD_DOWNLOAD_WHITELIST" - Client side download detection whitelist
1379	// threat type.
1380	//   "CLIENT_INCIDENT" - Client incident threat type.
1381	//   "CLIENT_INCIDENT_WHITELIST" - Whitelist used when detecting client
1382	// incident threats. This enum was never launched and should be re-used
1383	// for the next list.
1384	//   "APK_MALWARE_OFFLINE" - List used for offline APK checks in PAM.
1385	//   "SUBRESOURCE_FILTER" - Patterns to be used for activating the
1386	// subresource filter. Interstitial will not be shown for patterns from
1387	// this list.
1388	//   "SUSPICIOUS" - Entities that are suspected to present a threat.
1389	//   "TRICK_TO_BILL" - Trick-to-bill threat list.
1390	//   "HIGH_CONFIDENCE_ALLOWLIST" - Safe list to ship hashes of known
1391	// safe URL expressions.
1392	//   "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips
1393	// in Chrome. See go/sb-accuracytips.
1394	ThreatType string `json:"threatType,omitempty"`
1395
1396	// ForceSendFields is a list of field names (e.g. "PlatformType") to
1397	// unconditionally include in API requests. By default, fields with
1398	// empty or default values are omitted from API requests. However, any
1399	// non-pointer, non-interface field appearing in ForceSendFields will be
1400	// sent to the server regardless of whether the field is empty or not.
1401	// This may be used to include empty fields in Patch requests.
1402	ForceSendFields []string `json:"-"`
1403
1404	// NullFields is a list of field names (e.g. "PlatformType") to include
1405	// in API requests with the JSON null value. By default, fields with
1406	// empty values are omitted from API requests. However, any field with
1407	// an empty value appearing in NullFields will be sent to the server as
1408	// null. It is an error if a field in this list has a non-empty value.
1409	// This may be used to include null fields in Patch requests.
1410	NullFields []string `json:"-"`
1411}
1412
1413func (s *GoogleSecuritySafebrowsingV4ThreatListDescriptor) MarshalJSON() ([]byte, error) {
1414	type NoMethod GoogleSecuritySafebrowsingV4ThreatListDescriptor
1415	raw := NoMethod(*s)
1416	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1417}
1418
1419// GoogleSecuritySafebrowsingV4ThreatMatch: A match when checking a
1420// threat entry in the Safe Browsing threat lists.
1421type GoogleSecuritySafebrowsingV4ThreatMatch struct {
1422	// CacheDuration: The cache lifetime for the returned match. Clients
1423	// must not cache this response for more than this duration to avoid
1424	// false positives.
1425	CacheDuration string `json:"cacheDuration,omitempty"`
1426
1427	// PlatformType: The platform type matching this threat.
1428	//
1429	// Possible values:
1430	//   "PLATFORM_TYPE_UNSPECIFIED" - Unknown platform.
1431	//   "WINDOWS" - Threat posed to Windows.
1432	//   "LINUX" - Threat posed to Linux.
1433	//   "ANDROID" - Threat posed to Android.
1434	//   "OSX" - Threat posed to OS X.
1435	//   "IOS" - Threat posed to iOS.
1436	//   "ANY_PLATFORM" - Threat posed to at least one of the defined
1437	// platforms.
1438	//   "ALL_PLATFORMS" - Threat posed to all defined platforms.
1439	//   "CHROME" - Threat posed to Chrome.
1440	PlatformType string `json:"platformType,omitempty"`
1441
1442	// Threat: The threat matching this threat.
1443	Threat *GoogleSecuritySafebrowsingV4ThreatEntry `json:"threat,omitempty"`
1444
1445	// ThreatEntryMetadata: Optional metadata associated with this threat.
1446	ThreatEntryMetadata *GoogleSecuritySafebrowsingV4ThreatEntryMetadata `json:"threatEntryMetadata,omitempty"`
1447
1448	// ThreatEntryType: The threat entry type matching this threat.
1449	//
1450	// Possible values:
1451	//   "THREAT_ENTRY_TYPE_UNSPECIFIED" - Unspecified.
1452	//   "URL" - A URL.
1453	//   "EXECUTABLE" - An executable program.
1454	//   "IP_RANGE" - An IP range.
1455	//   "CHROME_EXTENSION" - Chrome extension.
1456	//   "FILENAME" - Filename.
1457	//   "CERT" - CERT
1458	ThreatEntryType string `json:"threatEntryType,omitempty"`
1459
1460	// ThreatType: The threat type matching this threat.
1461	//
1462	// Possible values:
1463	//   "THREAT_TYPE_UNSPECIFIED" - Unknown.
1464	//   "MALWARE" - Malware threat type.
1465	//   "SOCIAL_ENGINEERING" - Social engineering threat type.
1466	//   "UNWANTED_SOFTWARE" - Unwanted software threat type.
1467	//   "POTENTIALLY_HARMFUL_APPLICATION" - Potentially harmful application
1468	// threat type.
1469	//   "SOCIAL_ENGINEERING_INTERNAL" - Social engineering threat type for
1470	// internal use.
1471	//   "API_ABUSE" - API abuse threat type.
1472	//   "MALICIOUS_BINARY" - Malicious binary threat type.
1473	//   "CSD_WHITELIST" - Client side detection whitelist threat type.
1474	//   "CSD_DOWNLOAD_WHITELIST" - Client side download detection whitelist
1475	// threat type.
1476	//   "CLIENT_INCIDENT" - Client incident threat type.
1477	//   "CLIENT_INCIDENT_WHITELIST" - Whitelist used when detecting client
1478	// incident threats. This enum was never launched and should be re-used
1479	// for the next list.
1480	//   "APK_MALWARE_OFFLINE" - List used for offline APK checks in PAM.
1481	//   "SUBRESOURCE_FILTER" - Patterns to be used for activating the
1482	// subresource filter. Interstitial will not be shown for patterns from
1483	// this list.
1484	//   "SUSPICIOUS" - Entities that are suspected to present a threat.
1485	//   "TRICK_TO_BILL" - Trick-to-bill threat list.
1486	//   "HIGH_CONFIDENCE_ALLOWLIST" - Safe list to ship hashes of known
1487	// safe URL expressions.
1488	//   "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips
1489	// in Chrome. See go/sb-accuracytips.
1490	ThreatType string `json:"threatType,omitempty"`
1491
1492	// ForceSendFields is a list of field names (e.g. "CacheDuration") to
1493	// unconditionally include in API requests. By default, fields with
1494	// empty or default values are omitted from API requests. However, any
1495	// non-pointer, non-interface field appearing in ForceSendFields will be
1496	// sent to the server regardless of whether the field is empty or not.
1497	// This may be used to include empty fields in Patch requests.
1498	ForceSendFields []string `json:"-"`
1499
1500	// NullFields is a list of field names (e.g. "CacheDuration") to include
1501	// in API requests with the JSON null value. By default, fields with
1502	// empty values are omitted from API requests. However, any field with
1503	// an empty value appearing in NullFields will be sent to the server as
1504	// null. It is an error if a field in this list has a non-empty value.
1505	// This may be used to include null fields in Patch requests.
1506	NullFields []string `json:"-"`
1507}
1508
1509func (s *GoogleSecuritySafebrowsingV4ThreatMatch) MarshalJSON() ([]byte, error) {
1510	type NoMethod GoogleSecuritySafebrowsingV4ThreatMatch
1511	raw := NoMethod(*s)
1512	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1513}
1514
1515// method id "safebrowsing.encodedFullHashes.get":
1516
1517type EncodedFullHashesGetCall struct {
1518	s              *Service
1519	encodedRequest string
1520	urlParams_     gensupport.URLParams
1521	ifNoneMatch_   string
1522	ctx_           context.Context
1523	header_        http.Header
1524}
1525
1526// Get:
1527//
1528// - encodedRequest: A serialized FindFullHashesRequest proto.
1529func (r *EncodedFullHashesService) Get(encodedRequest string) *EncodedFullHashesGetCall {
1530	c := &EncodedFullHashesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1531	c.encodedRequest = encodedRequest
1532	return c
1533}
1534
1535// ClientId sets the optional parameter "clientId": A client ID that
1536// (hopefully) uniquely identifies the client implementation of the Safe
1537// Browsing API.
1538func (c *EncodedFullHashesGetCall) ClientId(clientId string) *EncodedFullHashesGetCall {
1539	c.urlParams_.Set("clientId", clientId)
1540	return c
1541}
1542
1543// ClientVersion sets the optional parameter "clientVersion": The
1544// version of the client implementation.
1545func (c *EncodedFullHashesGetCall) ClientVersion(clientVersion string) *EncodedFullHashesGetCall {
1546	c.urlParams_.Set("clientVersion", clientVersion)
1547	return c
1548}
1549
1550// Fields allows partial responses to be retrieved. See
1551// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1552// for more information.
1553func (c *EncodedFullHashesGetCall) Fields(s ...googleapi.Field) *EncodedFullHashesGetCall {
1554	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1555	return c
1556}
1557
1558// IfNoneMatch sets the optional parameter which makes the operation
1559// fail if the object's ETag matches the given value. This is useful for
1560// getting updates only after the object has changed since the last
1561// request. Use googleapi.IsNotModified to check whether the response
1562// error from Do is the result of In-None-Match.
1563func (c *EncodedFullHashesGetCall) IfNoneMatch(entityTag string) *EncodedFullHashesGetCall {
1564	c.ifNoneMatch_ = entityTag
1565	return c
1566}
1567
1568// Context sets the context to be used in this call's Do method. Any
1569// pending HTTP request will be aborted if the provided context is
1570// canceled.
1571func (c *EncodedFullHashesGetCall) Context(ctx context.Context) *EncodedFullHashesGetCall {
1572	c.ctx_ = ctx
1573	return c
1574}
1575
1576// Header returns an http.Header that can be modified by the caller to
1577// add HTTP headers to the request.
1578func (c *EncodedFullHashesGetCall) Header() http.Header {
1579	if c.header_ == nil {
1580		c.header_ = make(http.Header)
1581	}
1582	return c.header_
1583}
1584
1585func (c *EncodedFullHashesGetCall) doRequest(alt string) (*http.Response, error) {
1586	reqHeaders := make(http.Header)
1587	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
1588	for k, v := range c.header_ {
1589		reqHeaders[k] = v
1590	}
1591	reqHeaders.Set("User-Agent", c.s.userAgent())
1592	if c.ifNoneMatch_ != "" {
1593		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1594	}
1595	var body io.Reader = nil
1596	c.urlParams_.Set("alt", alt)
1597	c.urlParams_.Set("prettyPrint", "false")
1598	urls := googleapi.ResolveRelative(c.s.BasePath, "v4/encodedFullHashes/{encodedRequest}")
1599	urls += "?" + c.urlParams_.Encode()
1600	req, err := http.NewRequest("GET", urls, body)
1601	if err != nil {
1602		return nil, err
1603	}
1604	req.Header = reqHeaders
1605	googleapi.Expand(req.URL, map[string]string{
1606		"encodedRequest": c.encodedRequest,
1607	})
1608	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1609}
1610
1611// Do executes the "safebrowsing.encodedFullHashes.get" call.
1612// Exactly one of *GoogleSecuritySafebrowsingV4FindFullHashesResponse or
1613// error will be non-nil. Any non-2xx status code is an error. Response
1614// headers are in either
1615// *GoogleSecuritySafebrowsingV4FindFullHashesResponse.ServerResponse.Hea
1616// der or (if a response was returned at all) in
1617// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
1618// whether the returned error was because http.StatusNotModified was
1619// returned.
1620func (c *EncodedFullHashesGetCall) Do(opts ...googleapi.CallOption) (*GoogleSecuritySafebrowsingV4FindFullHashesResponse, error) {
1621	gensupport.SetOptions(c.urlParams_, opts...)
1622	res, err := c.doRequest("json")
1623	if res != nil && res.StatusCode == http.StatusNotModified {
1624		if res.Body != nil {
1625			res.Body.Close()
1626		}
1627		return nil, &googleapi.Error{
1628			Code:   res.StatusCode,
1629			Header: res.Header,
1630		}
1631	}
1632	if err != nil {
1633		return nil, err
1634	}
1635	defer googleapi.CloseBody(res)
1636	if err := googleapi.CheckResponse(res); err != nil {
1637		return nil, err
1638	}
1639	ret := &GoogleSecuritySafebrowsingV4FindFullHashesResponse{
1640		ServerResponse: googleapi.ServerResponse{
1641			Header:         res.Header,
1642			HTTPStatusCode: res.StatusCode,
1643		},
1644	}
1645	target := &ret
1646	if err := gensupport.DecodeResponse(target, res); err != nil {
1647		return nil, err
1648	}
1649	return ret, nil
1650	// {
1651	//   "description": "",
1652	//   "flatPath": "v4/encodedFullHashes/{encodedRequest}",
1653	//   "httpMethod": "GET",
1654	//   "id": "safebrowsing.encodedFullHashes.get",
1655	//   "parameterOrder": [
1656	//     "encodedRequest"
1657	//   ],
1658	//   "parameters": {
1659	//     "clientId": {
1660	//       "description": "A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API.",
1661	//       "location": "query",
1662	//       "type": "string"
1663	//     },
1664	//     "clientVersion": {
1665	//       "description": "The version of the client implementation.",
1666	//       "location": "query",
1667	//       "type": "string"
1668	//     },
1669	//     "encodedRequest": {
1670	//       "description": "A serialized FindFullHashesRequest proto.",
1671	//       "format": "byte",
1672	//       "location": "path",
1673	//       "required": true,
1674	//       "type": "string"
1675	//     }
1676	//   },
1677	//   "path": "v4/encodedFullHashes/{encodedRequest}",
1678	//   "response": {
1679	//     "$ref": "GoogleSecuritySafebrowsingV4FindFullHashesResponse"
1680	//   }
1681	// }
1682
1683}
1684
1685// method id "safebrowsing.encodedUpdates.get":
1686
1687type EncodedUpdatesGetCall struct {
1688	s              *Service
1689	encodedRequest string
1690	urlParams_     gensupport.URLParams
1691	ifNoneMatch_   string
1692	ctx_           context.Context
1693	header_        http.Header
1694}
1695
1696// Get:
1697//
1698// - encodedRequest: A serialized FetchThreatListUpdatesRequest proto.
1699func (r *EncodedUpdatesService) Get(encodedRequest string) *EncodedUpdatesGetCall {
1700	c := &EncodedUpdatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1701	c.encodedRequest = encodedRequest
1702	return c
1703}
1704
1705// ClientId sets the optional parameter "clientId": A client ID that
1706// uniquely identifies the client implementation of the Safe Browsing
1707// API.
1708func (c *EncodedUpdatesGetCall) ClientId(clientId string) *EncodedUpdatesGetCall {
1709	c.urlParams_.Set("clientId", clientId)
1710	return c
1711}
1712
1713// ClientVersion sets the optional parameter "clientVersion": The
1714// version of the client implementation.
1715func (c *EncodedUpdatesGetCall) ClientVersion(clientVersion string) *EncodedUpdatesGetCall {
1716	c.urlParams_.Set("clientVersion", clientVersion)
1717	return c
1718}
1719
1720// Fields allows partial responses to be retrieved. See
1721// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1722// for more information.
1723func (c *EncodedUpdatesGetCall) Fields(s ...googleapi.Field) *EncodedUpdatesGetCall {
1724	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1725	return c
1726}
1727
1728// IfNoneMatch sets the optional parameter which makes the operation
1729// fail if the object's ETag matches the given value. This is useful for
1730// getting updates only after the object has changed since the last
1731// request. Use googleapi.IsNotModified to check whether the response
1732// error from Do is the result of In-None-Match.
1733func (c *EncodedUpdatesGetCall) IfNoneMatch(entityTag string) *EncodedUpdatesGetCall {
1734	c.ifNoneMatch_ = entityTag
1735	return c
1736}
1737
1738// Context sets the context to be used in this call's Do method. Any
1739// pending HTTP request will be aborted if the provided context is
1740// canceled.
1741func (c *EncodedUpdatesGetCall) Context(ctx context.Context) *EncodedUpdatesGetCall {
1742	c.ctx_ = ctx
1743	return c
1744}
1745
1746// Header returns an http.Header that can be modified by the caller to
1747// add HTTP headers to the request.
1748func (c *EncodedUpdatesGetCall) Header() http.Header {
1749	if c.header_ == nil {
1750		c.header_ = make(http.Header)
1751	}
1752	return c.header_
1753}
1754
1755func (c *EncodedUpdatesGetCall) doRequest(alt string) (*http.Response, error) {
1756	reqHeaders := make(http.Header)
1757	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
1758	for k, v := range c.header_ {
1759		reqHeaders[k] = v
1760	}
1761	reqHeaders.Set("User-Agent", c.s.userAgent())
1762	if c.ifNoneMatch_ != "" {
1763		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1764	}
1765	var body io.Reader = nil
1766	c.urlParams_.Set("alt", alt)
1767	c.urlParams_.Set("prettyPrint", "false")
1768	urls := googleapi.ResolveRelative(c.s.BasePath, "v4/encodedUpdates/{encodedRequest}")
1769	urls += "?" + c.urlParams_.Encode()
1770	req, err := http.NewRequest("GET", urls, body)
1771	if err != nil {
1772		return nil, err
1773	}
1774	req.Header = reqHeaders
1775	googleapi.Expand(req.URL, map[string]string{
1776		"encodedRequest": c.encodedRequest,
1777	})
1778	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1779}
1780
1781// Do executes the "safebrowsing.encodedUpdates.get" call.
1782// Exactly one of
1783// *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse or error
1784// will be non-nil. Any non-2xx status code is an error. Response
1785// headers are in either
1786// *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse.ServerResp
1787// onse.Header or (if a response was returned at all) in
1788// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
1789// whether the returned error was because http.StatusNotModified was
1790// returned.
1791func (c *EncodedUpdatesGetCall) Do(opts ...googleapi.CallOption) (*GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse, error) {
1792	gensupport.SetOptions(c.urlParams_, opts...)
1793	res, err := c.doRequest("json")
1794	if res != nil && res.StatusCode == http.StatusNotModified {
1795		if res.Body != nil {
1796			res.Body.Close()
1797		}
1798		return nil, &googleapi.Error{
1799			Code:   res.StatusCode,
1800			Header: res.Header,
1801		}
1802	}
1803	if err != nil {
1804		return nil, err
1805	}
1806	defer googleapi.CloseBody(res)
1807	if err := googleapi.CheckResponse(res); err != nil {
1808		return nil, err
1809	}
1810	ret := &GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse{
1811		ServerResponse: googleapi.ServerResponse{
1812			Header:         res.Header,
1813			HTTPStatusCode: res.StatusCode,
1814		},
1815	}
1816	target := &ret
1817	if err := gensupport.DecodeResponse(target, res); err != nil {
1818		return nil, err
1819	}
1820	return ret, nil
1821	// {
1822	//   "description": "",
1823	//   "flatPath": "v4/encodedUpdates/{encodedRequest}",
1824	//   "httpMethod": "GET",
1825	//   "id": "safebrowsing.encodedUpdates.get",
1826	//   "parameterOrder": [
1827	//     "encodedRequest"
1828	//   ],
1829	//   "parameters": {
1830	//     "clientId": {
1831	//       "description": "A client ID that uniquely identifies the client implementation of the Safe Browsing API.",
1832	//       "location": "query",
1833	//       "type": "string"
1834	//     },
1835	//     "clientVersion": {
1836	//       "description": "The version of the client implementation.",
1837	//       "location": "query",
1838	//       "type": "string"
1839	//     },
1840	//     "encodedRequest": {
1841	//       "description": "A serialized FetchThreatListUpdatesRequest proto.",
1842	//       "format": "byte",
1843	//       "location": "path",
1844	//       "required": true,
1845	//       "type": "string"
1846	//     }
1847	//   },
1848	//   "path": "v4/encodedUpdates/{encodedRequest}",
1849	//   "response": {
1850	//     "$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse"
1851	//   }
1852	// }
1853
1854}
1855
1856// method id "safebrowsing.fullHashes.find":
1857
1858type FullHashesFindCall struct {
1859	s                                                 *Service
1860	googlesecuritysafebrowsingv4findfullhashesrequest *GoogleSecuritySafebrowsingV4FindFullHashesRequest
1861	urlParams_                                        gensupport.URLParams
1862	ctx_                                              context.Context
1863	header_                                           http.Header
1864}
1865
1866// Find: Finds the full hashes that match the requested hash prefixes.
1867func (r *FullHashesService) Find(googlesecuritysafebrowsingv4findfullhashesrequest *GoogleSecuritySafebrowsingV4FindFullHashesRequest) *FullHashesFindCall {
1868	c := &FullHashesFindCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1869	c.googlesecuritysafebrowsingv4findfullhashesrequest = googlesecuritysafebrowsingv4findfullhashesrequest
1870	return c
1871}
1872
1873// Fields allows partial responses to be retrieved. See
1874// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1875// for more information.
1876func (c *FullHashesFindCall) Fields(s ...googleapi.Field) *FullHashesFindCall {
1877	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1878	return c
1879}
1880
1881// Context sets the context to be used in this call's Do method. Any
1882// pending HTTP request will be aborted if the provided context is
1883// canceled.
1884func (c *FullHashesFindCall) Context(ctx context.Context) *FullHashesFindCall {
1885	c.ctx_ = ctx
1886	return c
1887}
1888
1889// Header returns an http.Header that can be modified by the caller to
1890// add HTTP headers to the request.
1891func (c *FullHashesFindCall) Header() http.Header {
1892	if c.header_ == nil {
1893		c.header_ = make(http.Header)
1894	}
1895	return c.header_
1896}
1897
1898func (c *FullHashesFindCall) doRequest(alt string) (*http.Response, error) {
1899	reqHeaders := make(http.Header)
1900	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
1901	for k, v := range c.header_ {
1902		reqHeaders[k] = v
1903	}
1904	reqHeaders.Set("User-Agent", c.s.userAgent())
1905	var body io.Reader = nil
1906	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlesecuritysafebrowsingv4findfullhashesrequest)
1907	if err != nil {
1908		return nil, err
1909	}
1910	reqHeaders.Set("Content-Type", "application/json")
1911	c.urlParams_.Set("alt", alt)
1912	c.urlParams_.Set("prettyPrint", "false")
1913	urls := googleapi.ResolveRelative(c.s.BasePath, "v4/fullHashes:find")
1914	urls += "?" + c.urlParams_.Encode()
1915	req, err := http.NewRequest("POST", urls, body)
1916	if err != nil {
1917		return nil, err
1918	}
1919	req.Header = reqHeaders
1920	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1921}
1922
1923// Do executes the "safebrowsing.fullHashes.find" call.
1924// Exactly one of *GoogleSecuritySafebrowsingV4FindFullHashesResponse or
1925// error will be non-nil. Any non-2xx status code is an error. Response
1926// headers are in either
1927// *GoogleSecuritySafebrowsingV4FindFullHashesResponse.ServerResponse.Hea
1928// der or (if a response was returned at all) in
1929// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
1930// whether the returned error was because http.StatusNotModified was
1931// returned.
1932func (c *FullHashesFindCall) Do(opts ...googleapi.CallOption) (*GoogleSecuritySafebrowsingV4FindFullHashesResponse, error) {
1933	gensupport.SetOptions(c.urlParams_, opts...)
1934	res, err := c.doRequest("json")
1935	if res != nil && res.StatusCode == http.StatusNotModified {
1936		if res.Body != nil {
1937			res.Body.Close()
1938		}
1939		return nil, &googleapi.Error{
1940			Code:   res.StatusCode,
1941			Header: res.Header,
1942		}
1943	}
1944	if err != nil {
1945		return nil, err
1946	}
1947	defer googleapi.CloseBody(res)
1948	if err := googleapi.CheckResponse(res); err != nil {
1949		return nil, err
1950	}
1951	ret := &GoogleSecuritySafebrowsingV4FindFullHashesResponse{
1952		ServerResponse: googleapi.ServerResponse{
1953			Header:         res.Header,
1954			HTTPStatusCode: res.StatusCode,
1955		},
1956	}
1957	target := &ret
1958	if err := gensupport.DecodeResponse(target, res); err != nil {
1959		return nil, err
1960	}
1961	return ret, nil
1962	// {
1963	//   "description": "Finds the full hashes that match the requested hash prefixes.",
1964	//   "flatPath": "v4/fullHashes:find",
1965	//   "httpMethod": "POST",
1966	//   "id": "safebrowsing.fullHashes.find",
1967	//   "parameterOrder": [],
1968	//   "parameters": {},
1969	//   "path": "v4/fullHashes:find",
1970	//   "request": {
1971	//     "$ref": "GoogleSecuritySafebrowsingV4FindFullHashesRequest"
1972	//   },
1973	//   "response": {
1974	//     "$ref": "GoogleSecuritySafebrowsingV4FindFullHashesResponse"
1975	//   }
1976	// }
1977
1978}
1979
1980// method id "safebrowsing.threatHits.create":
1981
1982type ThreatHitsCreateCall struct {
1983	s                                     *Service
1984	googlesecuritysafebrowsingv4threathit *GoogleSecuritySafebrowsingV4ThreatHit
1985	urlParams_                            gensupport.URLParams
1986	ctx_                                  context.Context
1987	header_                               http.Header
1988}
1989
1990// Create: Reports a Safe Browsing threat list hit to Google. Only
1991// projects with TRUSTED_REPORTER visibility can use this method.
1992func (r *ThreatHitsService) Create(googlesecuritysafebrowsingv4threathit *GoogleSecuritySafebrowsingV4ThreatHit) *ThreatHitsCreateCall {
1993	c := &ThreatHitsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1994	c.googlesecuritysafebrowsingv4threathit = googlesecuritysafebrowsingv4threathit
1995	return c
1996}
1997
1998// Fields allows partial responses to be retrieved. See
1999// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2000// for more information.
2001func (c *ThreatHitsCreateCall) Fields(s ...googleapi.Field) *ThreatHitsCreateCall {
2002	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2003	return c
2004}
2005
2006// Context sets the context to be used in this call's Do method. Any
2007// pending HTTP request will be aborted if the provided context is
2008// canceled.
2009func (c *ThreatHitsCreateCall) Context(ctx context.Context) *ThreatHitsCreateCall {
2010	c.ctx_ = ctx
2011	return c
2012}
2013
2014// Header returns an http.Header that can be modified by the caller to
2015// add HTTP headers to the request.
2016func (c *ThreatHitsCreateCall) Header() http.Header {
2017	if c.header_ == nil {
2018		c.header_ = make(http.Header)
2019	}
2020	return c.header_
2021}
2022
2023func (c *ThreatHitsCreateCall) doRequest(alt string) (*http.Response, error) {
2024	reqHeaders := make(http.Header)
2025	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
2026	for k, v := range c.header_ {
2027		reqHeaders[k] = v
2028	}
2029	reqHeaders.Set("User-Agent", c.s.userAgent())
2030	var body io.Reader = nil
2031	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlesecuritysafebrowsingv4threathit)
2032	if err != nil {
2033		return nil, err
2034	}
2035	reqHeaders.Set("Content-Type", "application/json")
2036	c.urlParams_.Set("alt", alt)
2037	c.urlParams_.Set("prettyPrint", "false")
2038	urls := googleapi.ResolveRelative(c.s.BasePath, "v4/threatHits")
2039	urls += "?" + c.urlParams_.Encode()
2040	req, err := http.NewRequest("POST", urls, body)
2041	if err != nil {
2042		return nil, err
2043	}
2044	req.Header = reqHeaders
2045	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2046}
2047
2048// Do executes the "safebrowsing.threatHits.create" call.
2049// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
2050// non-2xx status code is an error. Response headers are in either
2051// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
2052// returned at all) in error.(*googleapi.Error).Header. Use
2053// googleapi.IsNotModified to check whether the returned error was
2054// because http.StatusNotModified was returned.
2055func (c *ThreatHitsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
2056	gensupport.SetOptions(c.urlParams_, opts...)
2057	res, err := c.doRequest("json")
2058	if res != nil && res.StatusCode == http.StatusNotModified {
2059		if res.Body != nil {
2060			res.Body.Close()
2061		}
2062		return nil, &googleapi.Error{
2063			Code:   res.StatusCode,
2064			Header: res.Header,
2065		}
2066	}
2067	if err != nil {
2068		return nil, err
2069	}
2070	defer googleapi.CloseBody(res)
2071	if err := googleapi.CheckResponse(res); err != nil {
2072		return nil, err
2073	}
2074	ret := &GoogleProtobufEmpty{
2075		ServerResponse: googleapi.ServerResponse{
2076			Header:         res.Header,
2077			HTTPStatusCode: res.StatusCode,
2078		},
2079	}
2080	target := &ret
2081	if err := gensupport.DecodeResponse(target, res); err != nil {
2082		return nil, err
2083	}
2084	return ret, nil
2085	// {
2086	//   "description": "Reports a Safe Browsing threat list hit to Google. Only projects with TRUSTED_REPORTER visibility can use this method.",
2087	//   "flatPath": "v4/threatHits",
2088	//   "httpMethod": "POST",
2089	//   "id": "safebrowsing.threatHits.create",
2090	//   "parameterOrder": [],
2091	//   "parameters": {},
2092	//   "path": "v4/threatHits",
2093	//   "request": {
2094	//     "$ref": "GoogleSecuritySafebrowsingV4ThreatHit"
2095	//   },
2096	//   "response": {
2097	//     "$ref": "GoogleProtobufEmpty"
2098	//   }
2099	// }
2100
2101}
2102
2103// method id "safebrowsing.threatListUpdates.fetch":
2104
2105type ThreatListUpdatesFetchCall struct {
2106	s                                                         *Service
2107	googlesecuritysafebrowsingv4fetchthreatlistupdatesrequest *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest
2108	urlParams_                                                gensupport.URLParams
2109	ctx_                                                      context.Context
2110	header_                                                   http.Header
2111}
2112
2113// Fetch: Fetches the most recent threat list updates. A client can
2114// request updates for multiple lists at once.
2115func (r *ThreatListUpdatesService) Fetch(googlesecuritysafebrowsingv4fetchthreatlistupdatesrequest *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest) *ThreatListUpdatesFetchCall {
2116	c := &ThreatListUpdatesFetchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2117	c.googlesecuritysafebrowsingv4fetchthreatlistupdatesrequest = googlesecuritysafebrowsingv4fetchthreatlistupdatesrequest
2118	return c
2119}
2120
2121// Fields allows partial responses to be retrieved. See
2122// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2123// for more information.
2124func (c *ThreatListUpdatesFetchCall) Fields(s ...googleapi.Field) *ThreatListUpdatesFetchCall {
2125	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2126	return c
2127}
2128
2129// Context sets the context to be used in this call's Do method. Any
2130// pending HTTP request will be aborted if the provided context is
2131// canceled.
2132func (c *ThreatListUpdatesFetchCall) Context(ctx context.Context) *ThreatListUpdatesFetchCall {
2133	c.ctx_ = ctx
2134	return c
2135}
2136
2137// Header returns an http.Header that can be modified by the caller to
2138// add HTTP headers to the request.
2139func (c *ThreatListUpdatesFetchCall) Header() http.Header {
2140	if c.header_ == nil {
2141		c.header_ = make(http.Header)
2142	}
2143	return c.header_
2144}
2145
2146func (c *ThreatListUpdatesFetchCall) doRequest(alt string) (*http.Response, error) {
2147	reqHeaders := make(http.Header)
2148	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
2149	for k, v := range c.header_ {
2150		reqHeaders[k] = v
2151	}
2152	reqHeaders.Set("User-Agent", c.s.userAgent())
2153	var body io.Reader = nil
2154	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlesecuritysafebrowsingv4fetchthreatlistupdatesrequest)
2155	if err != nil {
2156		return nil, err
2157	}
2158	reqHeaders.Set("Content-Type", "application/json")
2159	c.urlParams_.Set("alt", alt)
2160	c.urlParams_.Set("prettyPrint", "false")
2161	urls := googleapi.ResolveRelative(c.s.BasePath, "v4/threatListUpdates:fetch")
2162	urls += "?" + c.urlParams_.Encode()
2163	req, err := http.NewRequest("POST", urls, body)
2164	if err != nil {
2165		return nil, err
2166	}
2167	req.Header = reqHeaders
2168	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2169}
2170
2171// Do executes the "safebrowsing.threatListUpdates.fetch" call.
2172// Exactly one of
2173// *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse or error
2174// will be non-nil. Any non-2xx status code is an error. Response
2175// headers are in either
2176// *GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse.ServerResp
2177// onse.Header or (if a response was returned at all) in
2178// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2179// whether the returned error was because http.StatusNotModified was
2180// returned.
2181func (c *ThreatListUpdatesFetchCall) Do(opts ...googleapi.CallOption) (*GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse, error) {
2182	gensupport.SetOptions(c.urlParams_, opts...)
2183	res, err := c.doRequest("json")
2184	if res != nil && res.StatusCode == http.StatusNotModified {
2185		if res.Body != nil {
2186			res.Body.Close()
2187		}
2188		return nil, &googleapi.Error{
2189			Code:   res.StatusCode,
2190			Header: res.Header,
2191		}
2192	}
2193	if err != nil {
2194		return nil, err
2195	}
2196	defer googleapi.CloseBody(res)
2197	if err := googleapi.CheckResponse(res); err != nil {
2198		return nil, err
2199	}
2200	ret := &GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse{
2201		ServerResponse: googleapi.ServerResponse{
2202			Header:         res.Header,
2203			HTTPStatusCode: res.StatusCode,
2204		},
2205	}
2206	target := &ret
2207	if err := gensupport.DecodeResponse(target, res); err != nil {
2208		return nil, err
2209	}
2210	return ret, nil
2211	// {
2212	//   "description": "Fetches the most recent threat list updates. A client can request updates for multiple lists at once.",
2213	//   "flatPath": "v4/threatListUpdates:fetch",
2214	//   "httpMethod": "POST",
2215	//   "id": "safebrowsing.threatListUpdates.fetch",
2216	//   "parameterOrder": [],
2217	//   "parameters": {},
2218	//   "path": "v4/threatListUpdates:fetch",
2219	//   "request": {
2220	//     "$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest"
2221	//   },
2222	//   "response": {
2223	//     "$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse"
2224	//   }
2225	// }
2226
2227}
2228
2229// method id "safebrowsing.threatLists.list":
2230
2231type ThreatListsListCall struct {
2232	s            *Service
2233	urlParams_   gensupport.URLParams
2234	ifNoneMatch_ string
2235	ctx_         context.Context
2236	header_      http.Header
2237}
2238
2239// List: Lists the Safe Browsing threat lists available for download.
2240func (r *ThreatListsService) List() *ThreatListsListCall {
2241	c := &ThreatListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2242	return c
2243}
2244
2245// Fields allows partial responses to be retrieved. See
2246// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2247// for more information.
2248func (c *ThreatListsListCall) Fields(s ...googleapi.Field) *ThreatListsListCall {
2249	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2250	return c
2251}
2252
2253// IfNoneMatch sets the optional parameter which makes the operation
2254// fail if the object's ETag matches the given value. This is useful for
2255// getting updates only after the object has changed since the last
2256// request. Use googleapi.IsNotModified to check whether the response
2257// error from Do is the result of In-None-Match.
2258func (c *ThreatListsListCall) IfNoneMatch(entityTag string) *ThreatListsListCall {
2259	c.ifNoneMatch_ = entityTag
2260	return c
2261}
2262
2263// Context sets the context to be used in this call's Do method. Any
2264// pending HTTP request will be aborted if the provided context is
2265// canceled.
2266func (c *ThreatListsListCall) Context(ctx context.Context) *ThreatListsListCall {
2267	c.ctx_ = ctx
2268	return c
2269}
2270
2271// Header returns an http.Header that can be modified by the caller to
2272// add HTTP headers to the request.
2273func (c *ThreatListsListCall) Header() http.Header {
2274	if c.header_ == nil {
2275		c.header_ = make(http.Header)
2276	}
2277	return c.header_
2278}
2279
2280func (c *ThreatListsListCall) doRequest(alt string) (*http.Response, error) {
2281	reqHeaders := make(http.Header)
2282	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
2283	for k, v := range c.header_ {
2284		reqHeaders[k] = v
2285	}
2286	reqHeaders.Set("User-Agent", c.s.userAgent())
2287	if c.ifNoneMatch_ != "" {
2288		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2289	}
2290	var body io.Reader = nil
2291	c.urlParams_.Set("alt", alt)
2292	c.urlParams_.Set("prettyPrint", "false")
2293	urls := googleapi.ResolveRelative(c.s.BasePath, "v4/threatLists")
2294	urls += "?" + c.urlParams_.Encode()
2295	req, err := http.NewRequest("GET", urls, body)
2296	if err != nil {
2297		return nil, err
2298	}
2299	req.Header = reqHeaders
2300	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2301}
2302
2303// Do executes the "safebrowsing.threatLists.list" call.
2304// Exactly one of *GoogleSecuritySafebrowsingV4ListThreatListsResponse
2305// or error will be non-nil. Any non-2xx status code is an error.
2306// Response headers are in either
2307// *GoogleSecuritySafebrowsingV4ListThreatListsResponse.ServerResponse.He
2308// ader or (if a response was returned at all) in
2309// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2310// whether the returned error was because http.StatusNotModified was
2311// returned.
2312func (c *ThreatListsListCall) Do(opts ...googleapi.CallOption) (*GoogleSecuritySafebrowsingV4ListThreatListsResponse, error) {
2313	gensupport.SetOptions(c.urlParams_, opts...)
2314	res, err := c.doRequest("json")
2315	if res != nil && res.StatusCode == http.StatusNotModified {
2316		if res.Body != nil {
2317			res.Body.Close()
2318		}
2319		return nil, &googleapi.Error{
2320			Code:   res.StatusCode,
2321			Header: res.Header,
2322		}
2323	}
2324	if err != nil {
2325		return nil, err
2326	}
2327	defer googleapi.CloseBody(res)
2328	if err := googleapi.CheckResponse(res); err != nil {
2329		return nil, err
2330	}
2331	ret := &GoogleSecuritySafebrowsingV4ListThreatListsResponse{
2332		ServerResponse: googleapi.ServerResponse{
2333			Header:         res.Header,
2334			HTTPStatusCode: res.StatusCode,
2335		},
2336	}
2337	target := &ret
2338	if err := gensupport.DecodeResponse(target, res); err != nil {
2339		return nil, err
2340	}
2341	return ret, nil
2342	// {
2343	//   "description": "Lists the Safe Browsing threat lists available for download.",
2344	//   "flatPath": "v4/threatLists",
2345	//   "httpMethod": "GET",
2346	//   "id": "safebrowsing.threatLists.list",
2347	//   "parameterOrder": [],
2348	//   "parameters": {},
2349	//   "path": "v4/threatLists",
2350	//   "response": {
2351	//     "$ref": "GoogleSecuritySafebrowsingV4ListThreatListsResponse"
2352	//   }
2353	// }
2354
2355}
2356
2357// method id "safebrowsing.threatMatches.find":
2358
2359type ThreatMatchesFindCall struct {
2360	s                                                    *Service
2361	googlesecuritysafebrowsingv4findthreatmatchesrequest *GoogleSecuritySafebrowsingV4FindThreatMatchesRequest
2362	urlParams_                                           gensupport.URLParams
2363	ctx_                                                 context.Context
2364	header_                                              http.Header
2365}
2366
2367// Find: Finds the threat entries that match the Safe Browsing lists.
2368func (r *ThreatMatchesService) Find(googlesecuritysafebrowsingv4findthreatmatchesrequest *GoogleSecuritySafebrowsingV4FindThreatMatchesRequest) *ThreatMatchesFindCall {
2369	c := &ThreatMatchesFindCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2370	c.googlesecuritysafebrowsingv4findthreatmatchesrequest = googlesecuritysafebrowsingv4findthreatmatchesrequest
2371	return c
2372}
2373
2374// Fields allows partial responses to be retrieved. See
2375// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2376// for more information.
2377func (c *ThreatMatchesFindCall) Fields(s ...googleapi.Field) *ThreatMatchesFindCall {
2378	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2379	return c
2380}
2381
2382// Context sets the context to be used in this call's Do method. Any
2383// pending HTTP request will be aborted if the provided context is
2384// canceled.
2385func (c *ThreatMatchesFindCall) Context(ctx context.Context) *ThreatMatchesFindCall {
2386	c.ctx_ = ctx
2387	return c
2388}
2389
2390// Header returns an http.Header that can be modified by the caller to
2391// add HTTP headers to the request.
2392func (c *ThreatMatchesFindCall) Header() http.Header {
2393	if c.header_ == nil {
2394		c.header_ = make(http.Header)
2395	}
2396	return c.header_
2397}
2398
2399func (c *ThreatMatchesFindCall) doRequest(alt string) (*http.Response, error) {
2400	reqHeaders := make(http.Header)
2401	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
2402	for k, v := range c.header_ {
2403		reqHeaders[k] = v
2404	}
2405	reqHeaders.Set("User-Agent", c.s.userAgent())
2406	var body io.Reader = nil
2407	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlesecuritysafebrowsingv4findthreatmatchesrequest)
2408	if err != nil {
2409		return nil, err
2410	}
2411	reqHeaders.Set("Content-Type", "application/json")
2412	c.urlParams_.Set("alt", alt)
2413	c.urlParams_.Set("prettyPrint", "false")
2414	urls := googleapi.ResolveRelative(c.s.BasePath, "v4/threatMatches:find")
2415	urls += "?" + c.urlParams_.Encode()
2416	req, err := http.NewRequest("POST", urls, body)
2417	if err != nil {
2418		return nil, err
2419	}
2420	req.Header = reqHeaders
2421	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2422}
2423
2424// Do executes the "safebrowsing.threatMatches.find" call.
2425// Exactly one of *GoogleSecuritySafebrowsingV4FindThreatMatchesResponse
2426// or error will be non-nil. Any non-2xx status code is an error.
2427// Response headers are in either
2428// *GoogleSecuritySafebrowsingV4FindThreatMatchesResponse.ServerResponse.
2429// Header or (if a response was returned at all) in
2430// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2431// whether the returned error was because http.StatusNotModified was
2432// returned.
2433func (c *ThreatMatchesFindCall) Do(opts ...googleapi.CallOption) (*GoogleSecuritySafebrowsingV4FindThreatMatchesResponse, error) {
2434	gensupport.SetOptions(c.urlParams_, opts...)
2435	res, err := c.doRequest("json")
2436	if res != nil && res.StatusCode == http.StatusNotModified {
2437		if res.Body != nil {
2438			res.Body.Close()
2439		}
2440		return nil, &googleapi.Error{
2441			Code:   res.StatusCode,
2442			Header: res.Header,
2443		}
2444	}
2445	if err != nil {
2446		return nil, err
2447	}
2448	defer googleapi.CloseBody(res)
2449	if err := googleapi.CheckResponse(res); err != nil {
2450		return nil, err
2451	}
2452	ret := &GoogleSecuritySafebrowsingV4FindThreatMatchesResponse{
2453		ServerResponse: googleapi.ServerResponse{
2454			Header:         res.Header,
2455			HTTPStatusCode: res.StatusCode,
2456		},
2457	}
2458	target := &ret
2459	if err := gensupport.DecodeResponse(target, res); err != nil {
2460		return nil, err
2461	}
2462	return ret, nil
2463	// {
2464	//   "description": "Finds the threat entries that match the Safe Browsing lists.",
2465	//   "flatPath": "v4/threatMatches:find",
2466	//   "httpMethod": "POST",
2467	//   "id": "safebrowsing.threatMatches.find",
2468	//   "parameterOrder": [],
2469	//   "parameters": {},
2470	//   "path": "v4/threatMatches:find",
2471	//   "request": {
2472	//     "$ref": "GoogleSecuritySafebrowsingV4FindThreatMatchesRequest"
2473	//   },
2474	//   "response": {
2475	//     "$ref": "GoogleSecuritySafebrowsingV4FindThreatMatchesResponse"
2476	//   }
2477	// }
2478
2479}
2480