/
dlp.pb.go
5610 lines (5069 loc) · 227 KB
/
dlp.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/privacy/dlp/v2beta1/dlp.proto
/*
Package dlp is a generated protocol buffer package.
It is generated from these files:
google/privacy/dlp/v2beta1/dlp.proto
google/privacy/dlp/v2beta1/storage.proto
It has these top-level messages:
InspectConfig
OperationConfig
ContentItem
Table
InspectResult
Finding
Location
TableLocation
Range
ImageLocation
RedactContentRequest
Color
RedactContentResponse
DeidentifyContentRequest
DeidentifyContentResponse
InspectContentRequest
InspectContentResponse
CreateInspectOperationRequest
OutputStorageConfig
InfoTypeStatistics
InspectOperationMetadata
InspectOperationResult
ListInspectFindingsRequest
ListInspectFindingsResponse
InfoTypeDescription
ListInfoTypesRequest
ListInfoTypesResponse
CategoryDescription
ListRootCategoriesRequest
ListRootCategoriesResponse
AnalyzeDataSourceRiskRequest
PrivacyMetric
RiskAnalysisOperationMetadata
RiskAnalysisOperationResult
ValueFrequency
Value
DeidentifyConfig
PrimitiveTransformation
TimePartConfig
CryptoHashConfig
ReplaceValueConfig
ReplaceWithInfoTypeConfig
RedactConfig
CharsToIgnore
CharacterMaskConfig
FixedSizeBucketingConfig
BucketingConfig
CryptoReplaceFfxFpeConfig
CryptoKey
TransientCryptoKey
UnwrappedCryptoKey
KmsWrappedCryptoKey
InfoTypeTransformations
FieldTransformation
RecordTransformations
RecordSuppression
RecordCondition
DeidentificationSummary
TransformationSummary
InfoType
CustomInfoType
FieldId
PartitionId
KindExpression
PropertyReference
Projection
DatastoreOptions
CloudStorageOptions
CloudStoragePath
BigQueryOptions
StorageConfig
CloudStorageKey
DatastoreKey
Key
RecordKey
BigQueryTable
EntityId
*/
package dlp
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_longrunning "google.golang.org/genproto/googleapis/longrunning"
import _ "github.com/golang/protobuf/ptypes/empty"
import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp"
import google_type "google.golang.org/genproto/googleapis/type/date"
import google_type1 "google.golang.org/genproto/googleapis/type/timeofday"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Categorization of results based on how likely they are to represent a match,
// based on the number of elements they contain which imply a match.
type Likelihood int32
const (
// Default value; information with all likelihoods is included.
Likelihood_LIKELIHOOD_UNSPECIFIED Likelihood = 0
// Few matching elements.
Likelihood_VERY_UNLIKELY Likelihood = 1
Likelihood_UNLIKELY Likelihood = 2
// Some matching elements.
Likelihood_POSSIBLE Likelihood = 3
Likelihood_LIKELY Likelihood = 4
// Many matching elements.
Likelihood_VERY_LIKELY Likelihood = 5
)
var Likelihood_name = map[int32]string{
0: "LIKELIHOOD_UNSPECIFIED",
1: "VERY_UNLIKELY",
2: "UNLIKELY",
3: "POSSIBLE",
4: "LIKELY",
5: "VERY_LIKELY",
}
var Likelihood_value = map[string]int32{
"LIKELIHOOD_UNSPECIFIED": 0,
"VERY_UNLIKELY": 1,
"UNLIKELY": 2,
"POSSIBLE": 3,
"LIKELY": 4,
"VERY_LIKELY": 5,
}
func (x Likelihood) String() string {
return proto.EnumName(Likelihood_name, int32(x))
}
func (Likelihood) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
// Operators available for comparing the value of fields.
type RelationalOperator int32
const (
RelationalOperator_RELATIONAL_OPERATOR_UNSPECIFIED RelationalOperator = 0
// Equal.
RelationalOperator_EQUAL_TO RelationalOperator = 1
// Not equal to.
RelationalOperator_NOT_EQUAL_TO RelationalOperator = 2
// Greater than.
RelationalOperator_GREATER_THAN RelationalOperator = 3
// Less than.
RelationalOperator_LESS_THAN RelationalOperator = 4
// Greater than or equals.
RelationalOperator_GREATER_THAN_OR_EQUALS RelationalOperator = 5
// Less than or equals.
RelationalOperator_LESS_THAN_OR_EQUALS RelationalOperator = 6
// Exists
RelationalOperator_EXISTS RelationalOperator = 7
)
var RelationalOperator_name = map[int32]string{
0: "RELATIONAL_OPERATOR_UNSPECIFIED",
1: "EQUAL_TO",
2: "NOT_EQUAL_TO",
3: "GREATER_THAN",
4: "LESS_THAN",
5: "GREATER_THAN_OR_EQUALS",
6: "LESS_THAN_OR_EQUALS",
7: "EXISTS",
}
var RelationalOperator_value = map[string]int32{
"RELATIONAL_OPERATOR_UNSPECIFIED": 0,
"EQUAL_TO": 1,
"NOT_EQUAL_TO": 2,
"GREATER_THAN": 3,
"LESS_THAN": 4,
"GREATER_THAN_OR_EQUALS": 5,
"LESS_THAN_OR_EQUALS": 6,
"EXISTS": 7,
}
func (x RelationalOperator) String() string {
return proto.EnumName(RelationalOperator_name, int32(x))
}
func (RelationalOperator) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
type TimePartConfig_TimePart int32
const (
TimePartConfig_TIME_PART_UNSPECIFIED TimePartConfig_TimePart = 0
// [000-9999]
TimePartConfig_YEAR TimePartConfig_TimePart = 1
// [1-12]
TimePartConfig_MONTH TimePartConfig_TimePart = 2
// [1-31]
TimePartConfig_DAY_OF_MONTH TimePartConfig_TimePart = 3
// [1-7]
TimePartConfig_DAY_OF_WEEK TimePartConfig_TimePart = 4
// [1-52]
TimePartConfig_WEEK_OF_YEAR TimePartConfig_TimePart = 5
// [0-24]
TimePartConfig_HOUR_OF_DAY TimePartConfig_TimePart = 6
)
var TimePartConfig_TimePart_name = map[int32]string{
0: "TIME_PART_UNSPECIFIED",
1: "YEAR",
2: "MONTH",
3: "DAY_OF_MONTH",
4: "DAY_OF_WEEK",
5: "WEEK_OF_YEAR",
6: "HOUR_OF_DAY",
}
var TimePartConfig_TimePart_value = map[string]int32{
"TIME_PART_UNSPECIFIED": 0,
"YEAR": 1,
"MONTH": 2,
"DAY_OF_MONTH": 3,
"DAY_OF_WEEK": 4,
"WEEK_OF_YEAR": 5,
"HOUR_OF_DAY": 6,
}
func (x TimePartConfig_TimePart) String() string {
return proto.EnumName(TimePartConfig_TimePart_name, int32(x))
}
func (TimePartConfig_TimePart) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{38, 0} }
type CharsToIgnore_CharacterGroup int32
const (
CharsToIgnore_CHARACTER_GROUP_UNSPECIFIED CharsToIgnore_CharacterGroup = 0
// 0-9
CharsToIgnore_NUMERIC CharsToIgnore_CharacterGroup = 1
// A-Z
CharsToIgnore_ALPHA_UPPER_CASE CharsToIgnore_CharacterGroup = 2
// a-z
CharsToIgnore_ALPHA_LOWER_CASE CharsToIgnore_CharacterGroup = 3
// US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
CharsToIgnore_PUNCTUATION CharsToIgnore_CharacterGroup = 4
// Whitespace character, one of [ \t\n\x0B\f\r]
CharsToIgnore_WHITESPACE CharsToIgnore_CharacterGroup = 5
)
var CharsToIgnore_CharacterGroup_name = map[int32]string{
0: "CHARACTER_GROUP_UNSPECIFIED",
1: "NUMERIC",
2: "ALPHA_UPPER_CASE",
3: "ALPHA_LOWER_CASE",
4: "PUNCTUATION",
5: "WHITESPACE",
}
var CharsToIgnore_CharacterGroup_value = map[string]int32{
"CHARACTER_GROUP_UNSPECIFIED": 0,
"NUMERIC": 1,
"ALPHA_UPPER_CASE": 2,
"ALPHA_LOWER_CASE": 3,
"PUNCTUATION": 4,
"WHITESPACE": 5,
}
func (x CharsToIgnore_CharacterGroup) String() string {
return proto.EnumName(CharsToIgnore_CharacterGroup_name, int32(x))
}
func (CharsToIgnore_CharacterGroup) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{43, 0}
}
// These are commonly used subsets of the alphabet that the FFX mode
// natively supports. In the algorithm, the alphabet is selected using
// the "radix". Therefore each corresponds to particular radix.
type CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet int32
const (
CryptoReplaceFfxFpeConfig_FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet = 0
// [0-9] (radix of 10)
CryptoReplaceFfxFpeConfig_NUMERIC CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet = 1
// [0-9A-F] (radix of 16)
CryptoReplaceFfxFpeConfig_HEXADECIMAL CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet = 2
// [0-9A-Z] (radix of 36)
CryptoReplaceFfxFpeConfig_UPPER_CASE_ALPHA_NUMERIC CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet = 3
// [0-9A-Za-z] (radix of 62)
CryptoReplaceFfxFpeConfig_ALPHA_NUMERIC CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet = 4
)
var CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet_name = map[int32]string{
0: "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED",
1: "NUMERIC",
2: "HEXADECIMAL",
3: "UPPER_CASE_ALPHA_NUMERIC",
4: "ALPHA_NUMERIC",
}
var CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet_value = map[string]int32{
"FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED": 0,
"NUMERIC": 1,
"HEXADECIMAL": 2,
"UPPER_CASE_ALPHA_NUMERIC": 3,
"ALPHA_NUMERIC": 4,
}
func (x CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet) String() string {
return proto.EnumName(CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet_name, int32(x))
}
func (CryptoReplaceFfxFpeConfig_FfxCommonNativeAlphabet) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{47, 0}
}
type RecordCondition_Expressions_LogicalOperator int32
const (
RecordCondition_Expressions_LOGICAL_OPERATOR_UNSPECIFIED RecordCondition_Expressions_LogicalOperator = 0
RecordCondition_Expressions_AND RecordCondition_Expressions_LogicalOperator = 1
)
var RecordCondition_Expressions_LogicalOperator_name = map[int32]string{
0: "LOGICAL_OPERATOR_UNSPECIFIED",
1: "AND",
}
var RecordCondition_Expressions_LogicalOperator_value = map[string]int32{
"LOGICAL_OPERATOR_UNSPECIFIED": 0,
"AND": 1,
}
func (x RecordCondition_Expressions_LogicalOperator) String() string {
return proto.EnumName(RecordCondition_Expressions_LogicalOperator_name, int32(x))
}
func (RecordCondition_Expressions_LogicalOperator) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{56, 2, 0}
}
// Possible outcomes of transformations.
type TransformationSummary_TransformationResultCode int32
const (
TransformationSummary_TRANSFORMATION_RESULT_CODE_UNSPECIFIED TransformationSummary_TransformationResultCode = 0
TransformationSummary_SUCCESS TransformationSummary_TransformationResultCode = 1
TransformationSummary_ERROR TransformationSummary_TransformationResultCode = 2
)
var TransformationSummary_TransformationResultCode_name = map[int32]string{
0: "TRANSFORMATION_RESULT_CODE_UNSPECIFIED",
1: "SUCCESS",
2: "ERROR",
}
var TransformationSummary_TransformationResultCode_value = map[string]int32{
"TRANSFORMATION_RESULT_CODE_UNSPECIFIED": 0,
"SUCCESS": 1,
"ERROR": 2,
}
func (x TransformationSummary_TransformationResultCode) String() string {
return proto.EnumName(TransformationSummary_TransformationResultCode_name, int32(x))
}
func (TransformationSummary_TransformationResultCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{58, 0}
}
// Configuration description of the scanning process.
// When used with redactContent only info_types and min_likelihood are currently
// used.
type InspectConfig struct {
// Restricts what info_types to look for. The values must correspond to
// InfoType values returned by ListInfoTypes or found in documentation.
// Empty info_types runs all enabled detectors.
InfoTypes []*InfoType `protobuf:"bytes,1,rep,name=info_types,json=infoTypes" json:"info_types,omitempty"`
// Only returns findings equal or above this threshold.
MinLikelihood Likelihood `protobuf:"varint,2,opt,name=min_likelihood,json=minLikelihood,enum=google.privacy.dlp.v2beta1.Likelihood" json:"min_likelihood,omitempty"`
// Limits the number of findings per content item or long running operation.
MaxFindings int32 `protobuf:"varint,3,opt,name=max_findings,json=maxFindings" json:"max_findings,omitempty"`
// When true, a contextual quote from the data that triggered a finding is
// included in the response; see Finding.quote.
IncludeQuote bool `protobuf:"varint,4,opt,name=include_quote,json=includeQuote" json:"include_quote,omitempty"`
// When true, excludes type information of the findings.
ExcludeTypes bool `protobuf:"varint,6,opt,name=exclude_types,json=excludeTypes" json:"exclude_types,omitempty"`
// Configuration of findings limit given for specified info types.
InfoTypeLimits []*InspectConfig_InfoTypeLimit `protobuf:"bytes,7,rep,name=info_type_limits,json=infoTypeLimits" json:"info_type_limits,omitempty"`
// Custom info types provided by the user.
CustomInfoTypes []*CustomInfoType `protobuf:"bytes,8,rep,name=custom_info_types,json=customInfoTypes" json:"custom_info_types,omitempty"`
}
func (m *InspectConfig) Reset() { *m = InspectConfig{} }
func (m *InspectConfig) String() string { return proto.CompactTextString(m) }
func (*InspectConfig) ProtoMessage() {}
func (*InspectConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *InspectConfig) GetInfoTypes() []*InfoType {
if m != nil {
return m.InfoTypes
}
return nil
}
func (m *InspectConfig) GetMinLikelihood() Likelihood {
if m != nil {
return m.MinLikelihood
}
return Likelihood_LIKELIHOOD_UNSPECIFIED
}
func (m *InspectConfig) GetMaxFindings() int32 {
if m != nil {
return m.MaxFindings
}
return 0
}
func (m *InspectConfig) GetIncludeQuote() bool {
if m != nil {
return m.IncludeQuote
}
return false
}
func (m *InspectConfig) GetExcludeTypes() bool {
if m != nil {
return m.ExcludeTypes
}
return false
}
func (m *InspectConfig) GetInfoTypeLimits() []*InspectConfig_InfoTypeLimit {
if m != nil {
return m.InfoTypeLimits
}
return nil
}
func (m *InspectConfig) GetCustomInfoTypes() []*CustomInfoType {
if m != nil {
return m.CustomInfoTypes
}
return nil
}
// Max findings configuration per info type, per content item or long running
// operation.
type InspectConfig_InfoTypeLimit struct {
// Type of information the findings limit applies to. Only one limit per
// info_type should be provided. If InfoTypeLimit does not have an
// info_type, the DLP API applies the limit against all info_types that are
// found but not specified in another InfoTypeLimit.
InfoType *InfoType `protobuf:"bytes,1,opt,name=info_type,json=infoType" json:"info_type,omitempty"`
// Max findings limit for the given infoType.
MaxFindings int32 `protobuf:"varint,2,opt,name=max_findings,json=maxFindings" json:"max_findings,omitempty"`
}
func (m *InspectConfig_InfoTypeLimit) Reset() { *m = InspectConfig_InfoTypeLimit{} }
func (m *InspectConfig_InfoTypeLimit) String() string { return proto.CompactTextString(m) }
func (*InspectConfig_InfoTypeLimit) ProtoMessage() {}
func (*InspectConfig_InfoTypeLimit) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
func (m *InspectConfig_InfoTypeLimit) GetInfoType() *InfoType {
if m != nil {
return m.InfoType
}
return nil
}
func (m *InspectConfig_InfoTypeLimit) GetMaxFindings() int32 {
if m != nil {
return m.MaxFindings
}
return 0
}
// Additional configuration for inspect long running operations.
type OperationConfig struct {
// Max number of findings per file, Datastore entity, or database row.
MaxItemFindings int64 `protobuf:"varint,1,opt,name=max_item_findings,json=maxItemFindings" json:"max_item_findings,omitempty"`
}
func (m *OperationConfig) Reset() { *m = OperationConfig{} }
func (m *OperationConfig) String() string { return proto.CompactTextString(m) }
func (*OperationConfig) ProtoMessage() {}
func (*OperationConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *OperationConfig) GetMaxItemFindings() int64 {
if m != nil {
return m.MaxItemFindings
}
return 0
}
// Container structure for the content to inspect.
type ContentItem struct {
// Type of the content, as defined in Content-Type HTTP header.
// Supported types are: all "text" types, octet streams, PNG images,
// JPEG images.
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
// Data of the item either in the byte array or UTF-8 string form.
//
// Types that are valid to be assigned to DataItem:
// *ContentItem_Data
// *ContentItem_Value
// *ContentItem_Table
DataItem isContentItem_DataItem `protobuf_oneof:"data_item"`
}
func (m *ContentItem) Reset() { *m = ContentItem{} }
func (m *ContentItem) String() string { return proto.CompactTextString(m) }
func (*ContentItem) ProtoMessage() {}
func (*ContentItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
type isContentItem_DataItem interface {
isContentItem_DataItem()
}
type ContentItem_Data struct {
Data []byte `protobuf:"bytes,2,opt,name=data,proto3,oneof"`
}
type ContentItem_Value struct {
Value string `protobuf:"bytes,3,opt,name=value,oneof"`
}
type ContentItem_Table struct {
Table *Table `protobuf:"bytes,4,opt,name=table,oneof"`
}
func (*ContentItem_Data) isContentItem_DataItem() {}
func (*ContentItem_Value) isContentItem_DataItem() {}
func (*ContentItem_Table) isContentItem_DataItem() {}
func (m *ContentItem) GetDataItem() isContentItem_DataItem {
if m != nil {
return m.DataItem
}
return nil
}
func (m *ContentItem) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *ContentItem) GetData() []byte {
if x, ok := m.GetDataItem().(*ContentItem_Data); ok {
return x.Data
}
return nil
}
func (m *ContentItem) GetValue() string {
if x, ok := m.GetDataItem().(*ContentItem_Value); ok {
return x.Value
}
return ""
}
func (m *ContentItem) GetTable() *Table {
if x, ok := m.GetDataItem().(*ContentItem_Table); ok {
return x.Table
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*ContentItem) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _ContentItem_OneofMarshaler, _ContentItem_OneofUnmarshaler, _ContentItem_OneofSizer, []interface{}{
(*ContentItem_Data)(nil),
(*ContentItem_Value)(nil),
(*ContentItem_Table)(nil),
}
}
func _ContentItem_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*ContentItem)
// data_item
switch x := m.DataItem.(type) {
case *ContentItem_Data:
b.EncodeVarint(2<<3 | proto.WireBytes)
b.EncodeRawBytes(x.Data)
case *ContentItem_Value:
b.EncodeVarint(3<<3 | proto.WireBytes)
b.EncodeStringBytes(x.Value)
case *ContentItem_Table:
b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Table); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("ContentItem.DataItem has unexpected type %T", x)
}
return nil
}
func _ContentItem_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*ContentItem)
switch tag {
case 2: // data_item.data
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeRawBytes(true)
m.DataItem = &ContentItem_Data{x}
return true, err
case 3: // data_item.value
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.DataItem = &ContentItem_Value{x}
return true, err
case 4: // data_item.table
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Table)
err := b.DecodeMessage(msg)
m.DataItem = &ContentItem_Table{msg}
return true, err
default:
return false, nil
}
}
func _ContentItem_OneofSizer(msg proto.Message) (n int) {
m := msg.(*ContentItem)
// data_item
switch x := m.DataItem.(type) {
case *ContentItem_Data:
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.Data)))
n += len(x.Data)
case *ContentItem_Value:
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.Value)))
n += len(x.Value)
case *ContentItem_Table:
s := proto.Size(x.Table)
n += proto.SizeVarint(4<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Structured content to inspect. Up to 50,000 `Value`s per request allowed.
type Table struct {
Headers []*FieldId `protobuf:"bytes,1,rep,name=headers" json:"headers,omitempty"`
Rows []*Table_Row `protobuf:"bytes,2,rep,name=rows" json:"rows,omitempty"`
}
func (m *Table) Reset() { *m = Table{} }
func (m *Table) String() string { return proto.CompactTextString(m) }
func (*Table) ProtoMessage() {}
func (*Table) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *Table) GetHeaders() []*FieldId {
if m != nil {
return m.Headers
}
return nil
}
func (m *Table) GetRows() []*Table_Row {
if m != nil {
return m.Rows
}
return nil
}
type Table_Row struct {
Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
}
func (m *Table_Row) Reset() { *m = Table_Row{} }
func (m *Table_Row) String() string { return proto.CompactTextString(m) }
func (*Table_Row) ProtoMessage() {}
func (*Table_Row) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} }
func (m *Table_Row) GetValues() []*Value {
if m != nil {
return m.Values
}
return nil
}
// All the findings for a single scanned item.
type InspectResult struct {
// List of findings for an item.
Findings []*Finding `protobuf:"bytes,1,rep,name=findings" json:"findings,omitempty"`
// If true, then this item might have more findings than were returned,
// and the findings returned are an arbitrary subset of all findings.
// The findings list might be truncated because the input items were too
// large, or because the server reached the maximum amount of resources
// allowed for a single API call. For best results, divide the input into
// smaller batches.
FindingsTruncated bool `protobuf:"varint,2,opt,name=findings_truncated,json=findingsTruncated" json:"findings_truncated,omitempty"`
}
func (m *InspectResult) Reset() { *m = InspectResult{} }
func (m *InspectResult) String() string { return proto.CompactTextString(m) }
func (*InspectResult) ProtoMessage() {}
func (*InspectResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *InspectResult) GetFindings() []*Finding {
if m != nil {
return m.Findings
}
return nil
}
func (m *InspectResult) GetFindingsTruncated() bool {
if m != nil {
return m.FindingsTruncated
}
return false
}
// Container structure describing a single finding within a string or image.
type Finding struct {
// The specific string that may be potentially sensitive info.
Quote string `protobuf:"bytes,1,opt,name=quote" json:"quote,omitempty"`
// The specific type of info the string might be.
InfoType *InfoType `protobuf:"bytes,2,opt,name=info_type,json=infoType" json:"info_type,omitempty"`
// Estimate of how likely it is that the info_type is correct.
Likelihood Likelihood `protobuf:"varint,3,opt,name=likelihood,enum=google.privacy.dlp.v2beta1.Likelihood" json:"likelihood,omitempty"`
// Location of the info found.
Location *Location `protobuf:"bytes,4,opt,name=location" json:"location,omitempty"`
// Timestamp when finding was detected.
CreateTime *google_protobuf3.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime" json:"create_time,omitempty"`
}
func (m *Finding) Reset() { *m = Finding{} }
func (m *Finding) String() string { return proto.CompactTextString(m) }
func (*Finding) ProtoMessage() {}
func (*Finding) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *Finding) GetQuote() string {
if m != nil {
return m.Quote
}
return ""
}
func (m *Finding) GetInfoType() *InfoType {
if m != nil {
return m.InfoType
}
return nil
}
func (m *Finding) GetLikelihood() Likelihood {
if m != nil {
return m.Likelihood
}
return Likelihood_LIKELIHOOD_UNSPECIFIED
}
func (m *Finding) GetLocation() *Location {
if m != nil {
return m.Location
}
return nil
}
func (m *Finding) GetCreateTime() *google_protobuf3.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
// Specifies the location of a finding within its source item.
type Location struct {
// Zero-based byte offsets within a content item.
ByteRange *Range `protobuf:"bytes,1,opt,name=byte_range,json=byteRange" json:"byte_range,omitempty"`
// Character offsets within a content item, included when content type
// is a text. Default charset assumed to be UTF-8.
CodepointRange *Range `protobuf:"bytes,2,opt,name=codepoint_range,json=codepointRange" json:"codepoint_range,omitempty"`
// Location within an image's pixels.
ImageBoxes []*ImageLocation `protobuf:"bytes,3,rep,name=image_boxes,json=imageBoxes" json:"image_boxes,omitempty"`
// Key of the finding.
RecordKey *RecordKey `protobuf:"bytes,4,opt,name=record_key,json=recordKey" json:"record_key,omitempty"`
// Field id of the field containing the finding.
FieldId *FieldId `protobuf:"bytes,5,opt,name=field_id,json=fieldId" json:"field_id,omitempty"`
// Location within a `ContentItem.Table`.
TableLocation *TableLocation `protobuf:"bytes,6,opt,name=table_location,json=tableLocation" json:"table_location,omitempty"`
}
func (m *Location) Reset() { *m = Location{} }
func (m *Location) String() string { return proto.CompactTextString(m) }
func (*Location) ProtoMessage() {}
func (*Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *Location) GetByteRange() *Range {
if m != nil {
return m.ByteRange
}
return nil
}
func (m *Location) GetCodepointRange() *Range {
if m != nil {
return m.CodepointRange
}
return nil
}
func (m *Location) GetImageBoxes() []*ImageLocation {
if m != nil {
return m.ImageBoxes
}
return nil
}
func (m *Location) GetRecordKey() *RecordKey {
if m != nil {
return m.RecordKey
}
return nil
}
func (m *Location) GetFieldId() *FieldId {
if m != nil {
return m.FieldId
}
return nil
}
func (m *Location) GetTableLocation() *TableLocation {
if m != nil {
return m.TableLocation
}
return nil
}
// Location of a finding within a `ContentItem.Table`.
type TableLocation struct {
// The zero-based index of the row where the finding is located.
RowIndex int64 `protobuf:"varint,1,opt,name=row_index,json=rowIndex" json:"row_index,omitempty"`
}
func (m *TableLocation) Reset() { *m = TableLocation{} }
func (m *TableLocation) String() string { return proto.CompactTextString(m) }
func (*TableLocation) ProtoMessage() {}
func (*TableLocation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *TableLocation) GetRowIndex() int64 {
if m != nil {
return m.RowIndex
}
return 0
}
// Generic half-open interval [start, end)
type Range struct {
// Index of the first character of the range (inclusive).
Start int64 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
// Index of the last character of the range (exclusive).
End int64 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
}
func (m *Range) Reset() { *m = Range{} }
func (m *Range) String() string { return proto.CompactTextString(m) }
func (*Range) ProtoMessage() {}
func (*Range) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *Range) GetStart() int64 {
if m != nil {
return m.Start
}
return 0
}
func (m *Range) GetEnd() int64 {
if m != nil {
return m.End
}
return 0
}
// Bounding box encompassing detected text within an image.
type ImageLocation struct {
// Top coordinate of the bounding box. (0,0) is upper left.
Top int32 `protobuf:"varint,1,opt,name=top" json:"top,omitempty"`
// Left coordinate of the bounding box. (0,0) is upper left.
Left int32 `protobuf:"varint,2,opt,name=left" json:"left,omitempty"`
// Width of the bounding box in pixels.
Width int32 `protobuf:"varint,3,opt,name=width" json:"width,omitempty"`
// Height of the bounding box in pixels.
Height int32 `protobuf:"varint,4,opt,name=height" json:"height,omitempty"`
}
func (m *ImageLocation) Reset() { *m = ImageLocation{} }
func (m *ImageLocation) String() string { return proto.CompactTextString(m) }
func (*ImageLocation) ProtoMessage() {}
func (*ImageLocation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *ImageLocation) GetTop() int32 {
if m != nil {
return m.Top
}
return 0
}
func (m *ImageLocation) GetLeft() int32 {
if m != nil {
return m.Left
}
return 0
}
func (m *ImageLocation) GetWidth() int32 {
if m != nil {
return m.Width
}
return 0
}
func (m *ImageLocation) GetHeight() int32 {
if m != nil {
return m.Height
}
return 0
}
// Request to search for potentially sensitive info in a list of items
// and replace it with a default or provided content.
type RedactContentRequest struct {
// Configuration for the inspector.
InspectConfig *InspectConfig `protobuf:"bytes,1,opt,name=inspect_config,json=inspectConfig" json:"inspect_config,omitempty"`
// The list of items to inspect. Up to 100 are allowed per request.
Items []*ContentItem `protobuf:"bytes,2,rep,name=items" json:"items,omitempty"`
// The strings to replace findings text findings with. Must specify at least
// one of these or one ImageRedactionConfig if redacting images.
ReplaceConfigs []*RedactContentRequest_ReplaceConfig `protobuf:"bytes,3,rep,name=replace_configs,json=replaceConfigs" json:"replace_configs,omitempty"`
// The configuration for specifying what content to redact from images.
ImageRedactionConfigs []*RedactContentRequest_ImageRedactionConfig `protobuf:"bytes,4,rep,name=image_redaction_configs,json=imageRedactionConfigs" json:"image_redaction_configs,omitempty"`
}
func (m *RedactContentRequest) Reset() { *m = RedactContentRequest{} }
func (m *RedactContentRequest) String() string { return proto.CompactTextString(m) }
func (*RedactContentRequest) ProtoMessage() {}
func (*RedactContentRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *RedactContentRequest) GetInspectConfig() *InspectConfig {
if m != nil {
return m.InspectConfig
}
return nil
}
func (m *RedactContentRequest) GetItems() []*ContentItem {
if m != nil {
return m.Items
}
return nil
}
func (m *RedactContentRequest) GetReplaceConfigs() []*RedactContentRequest_ReplaceConfig {
if m != nil {
return m.ReplaceConfigs
}
return nil
}
func (m *RedactContentRequest) GetImageRedactionConfigs() []*RedactContentRequest_ImageRedactionConfig {
if m != nil {
return m.ImageRedactionConfigs
}
return nil
}
type RedactContentRequest_ReplaceConfig struct {
// Type of information to replace. Only one ReplaceConfig per info_type
// should be provided. If ReplaceConfig does not have an info_type, the DLP
// API matches it against all info_types that are found but not specified in
// another ReplaceConfig.
InfoType *InfoType `protobuf:"bytes,1,opt,name=info_type,json=infoType" json:"info_type,omitempty"`
// Content replacing sensitive information of given type. Max 256 chars.
ReplaceWith string `protobuf:"bytes,2,opt,name=replace_with,json=replaceWith" json:"replace_with,omitempty"`
}
func (m *RedactContentRequest_ReplaceConfig) Reset() { *m = RedactContentRequest_ReplaceConfig{} }
func (m *RedactContentRequest_ReplaceConfig) String() string { return proto.CompactTextString(m) }
func (*RedactContentRequest_ReplaceConfig) ProtoMessage() {}
func (*RedactContentRequest_ReplaceConfig) Descriptor() ([]byte, []int) {