-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
webrisk.pb.go
1867 lines (1672 loc) · 80.1 KB
/
webrisk.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.21.9
// source: google/cloud/webrisk/v1beta1/webrisk.proto
package webriskpb
import (
context "context"
reflect "reflect"
sync "sync"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// The type of threat. This maps dirrectly to the threat list a threat may
// belong to.
type ThreatType int32
const (
// Unknown.
ThreatType_THREAT_TYPE_UNSPECIFIED ThreatType = 0
// Malware targeting any platform.
ThreatType_MALWARE ThreatType = 1
// Social engineering targeting any platform.
ThreatType_SOCIAL_ENGINEERING ThreatType = 2
// Unwanted software targeting any platform.
ThreatType_UNWANTED_SOFTWARE ThreatType = 3
)
// Enum value maps for ThreatType.
var (
ThreatType_name = map[int32]string{
0: "THREAT_TYPE_UNSPECIFIED",
1: "MALWARE",
2: "SOCIAL_ENGINEERING",
3: "UNWANTED_SOFTWARE",
}
ThreatType_value = map[string]int32{
"THREAT_TYPE_UNSPECIFIED": 0,
"MALWARE": 1,
"SOCIAL_ENGINEERING": 2,
"UNWANTED_SOFTWARE": 3,
}
)
func (x ThreatType) Enum() *ThreatType {
p := new(ThreatType)
*p = x
return p
}
func (x ThreatType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ThreatType) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_enumTypes[0].Descriptor()
}
func (ThreatType) Type() protoreflect.EnumType {
return &file_google_cloud_webrisk_v1beta1_webrisk_proto_enumTypes[0]
}
func (x ThreatType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ThreatType.Descriptor instead.
func (ThreatType) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{0}
}
// The ways in which threat entry sets can be compressed.
type CompressionType int32
const (
// Unknown.
CompressionType_COMPRESSION_TYPE_UNSPECIFIED CompressionType = 0
// Raw, uncompressed data.
CompressionType_RAW CompressionType = 1
// Rice-Golomb encoded data.
CompressionType_RICE CompressionType = 2
)
// Enum value maps for CompressionType.
var (
CompressionType_name = map[int32]string{
0: "COMPRESSION_TYPE_UNSPECIFIED",
1: "RAW",
2: "RICE",
}
CompressionType_value = map[string]int32{
"COMPRESSION_TYPE_UNSPECIFIED": 0,
"RAW": 1,
"RICE": 2,
}
)
func (x CompressionType) Enum() *CompressionType {
p := new(CompressionType)
*p = x
return p
}
func (x CompressionType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CompressionType) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_enumTypes[1].Descriptor()
}
func (CompressionType) Type() protoreflect.EnumType {
return &file_google_cloud_webrisk_v1beta1_webrisk_proto_enumTypes[1]
}
func (x CompressionType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CompressionType.Descriptor instead.
func (CompressionType) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{1}
}
// The type of response sent to the client.
type ComputeThreatListDiffResponse_ResponseType int32
const (
// Unknown.
ComputeThreatListDiffResponse_RESPONSE_TYPE_UNSPECIFIED ComputeThreatListDiffResponse_ResponseType = 0
// Partial updates are applied to the client's existing local database.
ComputeThreatListDiffResponse_DIFF ComputeThreatListDiffResponse_ResponseType = 1
// Full updates resets the client's entire local database. This means
// that either the client had no state, was seriously out-of-date,
// or the client is believed to be corrupt.
ComputeThreatListDiffResponse_RESET ComputeThreatListDiffResponse_ResponseType = 2
)
// Enum value maps for ComputeThreatListDiffResponse_ResponseType.
var (
ComputeThreatListDiffResponse_ResponseType_name = map[int32]string{
0: "RESPONSE_TYPE_UNSPECIFIED",
1: "DIFF",
2: "RESET",
}
ComputeThreatListDiffResponse_ResponseType_value = map[string]int32{
"RESPONSE_TYPE_UNSPECIFIED": 0,
"DIFF": 1,
"RESET": 2,
}
)
func (x ComputeThreatListDiffResponse_ResponseType) Enum() *ComputeThreatListDiffResponse_ResponseType {
p := new(ComputeThreatListDiffResponse_ResponseType)
*p = x
return p
}
func (x ComputeThreatListDiffResponse_ResponseType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ComputeThreatListDiffResponse_ResponseType) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_enumTypes[2].Descriptor()
}
func (ComputeThreatListDiffResponse_ResponseType) Type() protoreflect.EnumType {
return &file_google_cloud_webrisk_v1beta1_webrisk_proto_enumTypes[2]
}
func (x ComputeThreatListDiffResponse_ResponseType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ComputeThreatListDiffResponse_ResponseType.Descriptor instead.
func (ComputeThreatListDiffResponse_ResponseType) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{1, 0}
}
// Describes an API diff request.
type ComputeThreatListDiffRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The ThreatList to update.
ThreatType ThreatType `protobuf:"varint,1,opt,name=threat_type,json=threatType,proto3,enum=google.cloud.webrisk.v1beta1.ThreatType" json:"threat_type,omitempty"`
// The current version token of the client for the requested list (the
// client version that was received from the last successful diff).
VersionToken []byte `protobuf:"bytes,2,opt,name=version_token,json=versionToken,proto3" json:"version_token,omitempty"`
// Required. The constraints associated with this request.
Constraints *ComputeThreatListDiffRequest_Constraints `protobuf:"bytes,3,opt,name=constraints,proto3" json:"constraints,omitempty"`
}
func (x *ComputeThreatListDiffRequest) Reset() {
*x = ComputeThreatListDiffRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ComputeThreatListDiffRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComputeThreatListDiffRequest) ProtoMessage() {}
func (x *ComputeThreatListDiffRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComputeThreatListDiffRequest.ProtoReflect.Descriptor instead.
func (*ComputeThreatListDiffRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{0}
}
func (x *ComputeThreatListDiffRequest) GetThreatType() ThreatType {
if x != nil {
return x.ThreatType
}
return ThreatType_THREAT_TYPE_UNSPECIFIED
}
func (x *ComputeThreatListDiffRequest) GetVersionToken() []byte {
if x != nil {
return x.VersionToken
}
return nil
}
func (x *ComputeThreatListDiffRequest) GetConstraints() *ComputeThreatListDiffRequest_Constraints {
if x != nil {
return x.Constraints
}
return nil
}
type ComputeThreatListDiffResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The type of response. This may indicate that an action must be taken by the
// client when the response is received.
ResponseType ComputeThreatListDiffResponse_ResponseType `protobuf:"varint,4,opt,name=response_type,json=responseType,proto3,enum=google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse_ResponseType" json:"response_type,omitempty"`
// A set of entries to add to a local threat type's list.
Additions *ThreatEntryAdditions `protobuf:"bytes,5,opt,name=additions,proto3" json:"additions,omitempty"`
// A set of entries to remove from a local threat type's list.
// This field may be empty.
Removals *ThreatEntryRemovals `protobuf:"bytes,6,opt,name=removals,proto3" json:"removals,omitempty"`
// The new opaque client version token.
NewVersionToken []byte `protobuf:"bytes,7,opt,name=new_version_token,json=newVersionToken,proto3" json:"new_version_token,omitempty"`
// The expected SHA256 hash of the client state; that is, of the sorted list
// of all hashes present in the database after applying the provided diff.
// If the client state doesn't match the expected state, the client must
// disregard this diff and retry later.
Checksum *ComputeThreatListDiffResponse_Checksum `protobuf:"bytes,8,opt,name=checksum,proto3" json:"checksum,omitempty"`
// The soonest the client should wait before issuing any diff
// request. Querying sooner is unlikely to produce a meaningful diff.
// Waiting longer is acceptable considering the use case.
// If this field is not set clients may update as soon as they want.
RecommendedNextDiff *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=recommended_next_diff,json=recommendedNextDiff,proto3" json:"recommended_next_diff,omitempty"`
}
func (x *ComputeThreatListDiffResponse) Reset() {
*x = ComputeThreatListDiffResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ComputeThreatListDiffResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComputeThreatListDiffResponse) ProtoMessage() {}
func (x *ComputeThreatListDiffResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComputeThreatListDiffResponse.ProtoReflect.Descriptor instead.
func (*ComputeThreatListDiffResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{1}
}
func (x *ComputeThreatListDiffResponse) GetResponseType() ComputeThreatListDiffResponse_ResponseType {
if x != nil {
return x.ResponseType
}
return ComputeThreatListDiffResponse_RESPONSE_TYPE_UNSPECIFIED
}
func (x *ComputeThreatListDiffResponse) GetAdditions() *ThreatEntryAdditions {
if x != nil {
return x.Additions
}
return nil
}
func (x *ComputeThreatListDiffResponse) GetRemovals() *ThreatEntryRemovals {
if x != nil {
return x.Removals
}
return nil
}
func (x *ComputeThreatListDiffResponse) GetNewVersionToken() []byte {
if x != nil {
return x.NewVersionToken
}
return nil
}
func (x *ComputeThreatListDiffResponse) GetChecksum() *ComputeThreatListDiffResponse_Checksum {
if x != nil {
return x.Checksum
}
return nil
}
func (x *ComputeThreatListDiffResponse) GetRecommendedNextDiff() *timestamppb.Timestamp {
if x != nil {
return x.RecommendedNextDiff
}
return nil
}
// Request to check URI entries against threatLists.
type SearchUrisRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The URI to be checked for matches.
Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
// Required. The ThreatLists to search in.
ThreatTypes []ThreatType `protobuf:"varint,2,rep,packed,name=threat_types,json=threatTypes,proto3,enum=google.cloud.webrisk.v1beta1.ThreatType" json:"threat_types,omitempty"`
}
func (x *SearchUrisRequest) Reset() {
*x = SearchUrisRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SearchUrisRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SearchUrisRequest) ProtoMessage() {}
func (x *SearchUrisRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SearchUrisRequest.ProtoReflect.Descriptor instead.
func (*SearchUrisRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{2}
}
func (x *SearchUrisRequest) GetUri() string {
if x != nil {
return x.Uri
}
return ""
}
func (x *SearchUrisRequest) GetThreatTypes() []ThreatType {
if x != nil {
return x.ThreatTypes
}
return nil
}
type SearchUrisResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The threat list matches. This may be empty if the URI is on no list.
Threat *SearchUrisResponse_ThreatUri `protobuf:"bytes,1,opt,name=threat,proto3" json:"threat,omitempty"`
}
func (x *SearchUrisResponse) Reset() {
*x = SearchUrisResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SearchUrisResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SearchUrisResponse) ProtoMessage() {}
func (x *SearchUrisResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SearchUrisResponse.ProtoReflect.Descriptor instead.
func (*SearchUrisResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{3}
}
func (x *SearchUrisResponse) GetThreat() *SearchUrisResponse_ThreatUri {
if x != nil {
return x.Threat
}
return nil
}
// Request to return full hashes matched by the provided hash prefixes.
type SearchHashesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
// hash. For JSON requests, this field is base64-encoded.
HashPrefix []byte `protobuf:"bytes,1,opt,name=hash_prefix,json=hashPrefix,proto3" json:"hash_prefix,omitempty"`
// Required. The ThreatLists to search in.
ThreatTypes []ThreatType `protobuf:"varint,2,rep,packed,name=threat_types,json=threatTypes,proto3,enum=google.cloud.webrisk.v1beta1.ThreatType" json:"threat_types,omitempty"`
}
func (x *SearchHashesRequest) Reset() {
*x = SearchHashesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SearchHashesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SearchHashesRequest) ProtoMessage() {}
func (x *SearchHashesRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SearchHashesRequest.ProtoReflect.Descriptor instead.
func (*SearchHashesRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{4}
}
func (x *SearchHashesRequest) GetHashPrefix() []byte {
if x != nil {
return x.HashPrefix
}
return nil
}
func (x *SearchHashesRequest) GetThreatTypes() []ThreatType {
if x != nil {
return x.ThreatTypes
}
return nil
}
type SearchHashesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The full hashes that matched the requested prefixes.
// The hash will be populated in the key.
Threats []*SearchHashesResponse_ThreatHash `protobuf:"bytes,1,rep,name=threats,proto3" json:"threats,omitempty"`
// For requested entities that did not match the threat list, how long to
// cache the response until.
NegativeExpireTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=negative_expire_time,json=negativeExpireTime,proto3" json:"negative_expire_time,omitempty"`
}
func (x *SearchHashesResponse) Reset() {
*x = SearchHashesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SearchHashesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SearchHashesResponse) ProtoMessage() {}
func (x *SearchHashesResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SearchHashesResponse.ProtoReflect.Descriptor instead.
func (*SearchHashesResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{5}
}
func (x *SearchHashesResponse) GetThreats() []*SearchHashesResponse_ThreatHash {
if x != nil {
return x.Threats
}
return nil
}
func (x *SearchHashesResponse) GetNegativeExpireTime() *timestamppb.Timestamp {
if x != nil {
return x.NegativeExpireTime
}
return nil
}
// Contains the set of entries to add to a local database.
// May contain a combination of compressed and raw data in a single response.
type ThreatEntryAdditions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The raw SHA256-formatted entries.
// Repeated to allow returning sets of hashes with different prefix sizes.
RawHashes []*RawHashes `protobuf:"bytes,1,rep,name=raw_hashes,json=rawHashes,proto3" json:"raw_hashes,omitempty"`
// The encoded 4-byte prefixes of SHA256-formatted entries, using a
// Golomb-Rice encoding. The hashes are converted to uint32, sorted in
// ascending order, then delta encoded and stored as encoded_data.
RiceHashes *RiceDeltaEncoding `protobuf:"bytes,2,opt,name=rice_hashes,json=riceHashes,proto3" json:"rice_hashes,omitempty"`
}
func (x *ThreatEntryAdditions) Reset() {
*x = ThreatEntryAdditions{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ThreatEntryAdditions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ThreatEntryAdditions) ProtoMessage() {}
func (x *ThreatEntryAdditions) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ThreatEntryAdditions.ProtoReflect.Descriptor instead.
func (*ThreatEntryAdditions) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{6}
}
func (x *ThreatEntryAdditions) GetRawHashes() []*RawHashes {
if x != nil {
return x.RawHashes
}
return nil
}
func (x *ThreatEntryAdditions) GetRiceHashes() *RiceDeltaEncoding {
if x != nil {
return x.RiceHashes
}
return nil
}
// Contains the set of entries to remove from a local database.
type ThreatEntryRemovals struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The raw removal indices for a local list.
RawIndices *RawIndices `protobuf:"bytes,1,opt,name=raw_indices,json=rawIndices,proto3" json:"raw_indices,omitempty"`
// The encoded local, lexicographically-sorted list indices, using a
// Golomb-Rice encoding. Used for sending compressed removal indices. The
// removal indices (uint32) are sorted in ascending order, then delta encoded
// and stored as encoded_data.
RiceIndices *RiceDeltaEncoding `protobuf:"bytes,2,opt,name=rice_indices,json=riceIndices,proto3" json:"rice_indices,omitempty"`
}
func (x *ThreatEntryRemovals) Reset() {
*x = ThreatEntryRemovals{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ThreatEntryRemovals) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ThreatEntryRemovals) ProtoMessage() {}
func (x *ThreatEntryRemovals) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ThreatEntryRemovals.ProtoReflect.Descriptor instead.
func (*ThreatEntryRemovals) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{7}
}
func (x *ThreatEntryRemovals) GetRawIndices() *RawIndices {
if x != nil {
return x.RawIndices
}
return nil
}
func (x *ThreatEntryRemovals) GetRiceIndices() *RiceDeltaEncoding {
if x != nil {
return x.RiceIndices
}
return nil
}
// A set of raw indices to remove from a local list.
type RawIndices struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The indices to remove from a lexicographically-sorted local list.
Indices []int32 `protobuf:"varint,1,rep,packed,name=indices,proto3" json:"indices,omitempty"`
}
func (x *RawIndices) Reset() {
*x = RawIndices{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RawIndices) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RawIndices) ProtoMessage() {}
func (x *RawIndices) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RawIndices.ProtoReflect.Descriptor instead.
func (*RawIndices) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{8}
}
func (x *RawIndices) GetIndices() []int32 {
if x != nil {
return x.Indices
}
return nil
}
// The uncompressed threat entries in hash format.
// Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4
// bytes, but some hashes are lengthened if they collide with the hash of a
// popular URI.
//
// Used for sending ThreatEntryAdditons to clients that do not support
// compression, or when sending non-4-byte hashes to clients that do support
// compression.
type RawHashes struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The number of bytes for each prefix encoded below. This field can be
// anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
PrefixSize int32 `protobuf:"varint,1,opt,name=prefix_size,json=prefixSize,proto3" json:"prefix_size,omitempty"`
// The hashes, in binary format, concatenated into one long string. Hashes are
// sorted in lexicographic order. For JSON API users, hashes are
// base64-encoded.
RawHashes []byte `protobuf:"bytes,2,opt,name=raw_hashes,json=rawHashes,proto3" json:"raw_hashes,omitempty"`
}
func (x *RawHashes) Reset() {
*x = RawHashes{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RawHashes) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RawHashes) ProtoMessage() {}
func (x *RawHashes) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RawHashes.ProtoReflect.Descriptor instead.
func (*RawHashes) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{9}
}
func (x *RawHashes) GetPrefixSize() int32 {
if x != nil {
return x.PrefixSize
}
return 0
}
func (x *RawHashes) GetRawHashes() []byte {
if x != nil {
return x.RawHashes
}
return nil
}
// The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
// compressed removal indices.
type RiceDeltaEncoding struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The offset of the first entry in the encoded data, or, if only a single
// integer was encoded, that single integer's value. If the field is empty or
// missing, assume zero.
FirstValue int64 `protobuf:"varint,1,opt,name=first_value,json=firstValue,proto3" json:"first_value,omitempty"`
// The Golomb-Rice parameter, which is a number between 2 and 28. This field
// is missing (that is, zero) if `num_entries` is zero.
RiceParameter int32 `protobuf:"varint,2,opt,name=rice_parameter,json=riceParameter,proto3" json:"rice_parameter,omitempty"`
// The number of entries that are delta encoded in the encoded data. If only a
// single integer was encoded, this will be zero and the single value will be
// stored in `first_value`.
EntryCount int32 `protobuf:"varint,3,opt,name=entry_count,json=entryCount,proto3" json:"entry_count,omitempty"`
// The encoded deltas that are encoded using the Golomb-Rice coder.
EncodedData []byte `protobuf:"bytes,4,opt,name=encoded_data,json=encodedData,proto3" json:"encoded_data,omitempty"`
}
func (x *RiceDeltaEncoding) Reset() {
*x = RiceDeltaEncoding{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RiceDeltaEncoding) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RiceDeltaEncoding) ProtoMessage() {}
func (x *RiceDeltaEncoding) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RiceDeltaEncoding.ProtoReflect.Descriptor instead.
func (*RiceDeltaEncoding) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{10}
}
func (x *RiceDeltaEncoding) GetFirstValue() int64 {
if x != nil {
return x.FirstValue
}
return 0
}
func (x *RiceDeltaEncoding) GetRiceParameter() int32 {
if x != nil {
return x.RiceParameter
}
return 0
}
func (x *RiceDeltaEncoding) GetEntryCount() int32 {
if x != nil {
return x.EntryCount
}
return 0
}
func (x *RiceDeltaEncoding) GetEncodedData() []byte {
if x != nil {
return x.EncodedData
}
return nil
}
// The constraints for this diff.
type ComputeThreatListDiffRequest_Constraints struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The maximum size in number of entries. The diff will not contain more
// entries than this value. This should be a power of 2 between 2**10 and
// 2**20. If zero, no diff size limit is set.
MaxDiffEntries int32 `protobuf:"varint,1,opt,name=max_diff_entries,json=maxDiffEntries,proto3" json:"max_diff_entries,omitempty"`
// Sets the maximum number of entries that the client is willing to have
// in the local database. This should be a power of 2 between 2**10 and
// 2**20. If zero, no database size limit is set.
MaxDatabaseEntries int32 `protobuf:"varint,2,opt,name=max_database_entries,json=maxDatabaseEntries,proto3" json:"max_database_entries,omitempty"`
// The compression types supported by the client.
SupportedCompressions []CompressionType `protobuf:"varint,3,rep,packed,name=supported_compressions,json=supportedCompressions,proto3,enum=google.cloud.webrisk.v1beta1.CompressionType" json:"supported_compressions,omitempty"`
}
func (x *ComputeThreatListDiffRequest_Constraints) Reset() {
*x = ComputeThreatListDiffRequest_Constraints{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ComputeThreatListDiffRequest_Constraints) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComputeThreatListDiffRequest_Constraints) ProtoMessage() {}
func (x *ComputeThreatListDiffRequest_Constraints) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComputeThreatListDiffRequest_Constraints.ProtoReflect.Descriptor instead.
func (*ComputeThreatListDiffRequest_Constraints) Descriptor() ([]byte, []int) {
return file_google_cloud_webrisk_v1beta1_webrisk_proto_rawDescGZIP(), []int{0, 0}
}
func (x *ComputeThreatListDiffRequest_Constraints) GetMaxDiffEntries() int32 {
if x != nil {
return x.MaxDiffEntries
}
return 0
}
func (x *ComputeThreatListDiffRequest_Constraints) GetMaxDatabaseEntries() int32 {
if x != nil {
return x.MaxDatabaseEntries
}
return 0
}
func (x *ComputeThreatListDiffRequest_Constraints) GetSupportedCompressions() []CompressionType {
if x != nil {
return x.SupportedCompressions
}
return nil
}
// The expected state of a client's local database.
type ComputeThreatListDiffResponse_Checksum struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache