Debian Codegraph @

third_party/googleapis/google/privacy/dlp/v2beta1/storage.proto

raw
1 // Copyright 2017 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 syntax = "proto3";
16
17 package google.privacy.dlp.v2beta1;
18
19 import "google/api/annotations.proto";
20
21 option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2beta1;dlp";
22 option java_multiple_files = true;
23 option java_outer_classname = "DlpStorage";
24 option java_package = "com.google.privacy.dlp.v2beta1";
25
26
27 // Type of information detected by the API.
28 message InfoType {
29 // Name of the information type, provided by the API call ListInfoTypes.
30 string name = 1;
31 }
32
33 // General identifier of a data field in a storage service.
34 message FieldId {
35 // Column name describing the field.
36 string column_name = 1;
37 }
38
39 // Datastore partition ID.
40 // A partition ID identifies a grouping of entities. The grouping is always
41 // by project and namespace, however the namespace ID may be empty.
42 //
43 // A partition ID contains several dimensions:
44 // project ID and namespace ID.
45 message PartitionId {
46 // The ID of the project to which the entities belong.
47 string project_id = 2;
48
49 // If not empty, the ID of the namespace to which the entities belong.
50 string namespace_id = 4;
51 }
52
53 // A representation of a Datastore kind.
54 message KindExpression {
55 // The name of the kind.
56 string name = 1;
57 }
58
59 // A reference to a property relative to the Datastore kind expressions.
60 message PropertyReference {
61 // The name of the property.
62 // If name includes "."s, it may be interpreted as a property name path.
63 string name = 2;
64 }
65
66 // A representation of a Datastore property in a projection.
67 message Projection {
68 // The property to project.
69 PropertyReference property = 1;
70 }
71
72 // Options defining a data set within Google Cloud Datastore.
73 message DatastoreOptions {
74 // A partition ID identifies a grouping of entities. The grouping is always
75 // by project and namespace, however the namespace ID may be empty.
76 PartitionId partition_id = 1;
77
78 // The kind to process.
79 KindExpression kind = 2;
80
81 // Properties to scan. If none are specified, all properties will be scanned
82 // by default.
83 repeated Projection projection = 3;
84 }
85
86 // Options defining a file or a set of files (path ending with *) within
87 // a Google Cloud Storage bucket.
88 message CloudStorageOptions {
89 // Set of files to scan.
90 message FileSet {
91 // The url, in the format gs://<bucket>/<path>. Trailing wildcard in the
92 // path is allowed.
93 string url = 1;
94 }
95
96 FileSet file_set = 1;
97 }
98
99 // A location in Cloud Storage.
100 message CloudStoragePath {
101 // The url, in the format of gs://bucket/<path>.
102 string path = 1;
103 }
104
105 // Shared message indicating Cloud storage type.
106 message StorageConfig {
107 oneof type {
108 // Google Cloud Datastore options specification.
109 DatastoreOptions datastore_options = 2;
110
111 // Google Cloud Storage options specification.
112 CloudStorageOptions cloud_storage_options = 3;
113 }
114 }
115
116 // Record key for a finding in a Cloud Storage file.
117 message CloudStorageKey {
118 // Path to the file.
119 string file_path = 1;
120
121 // Byte offset of the referenced data in the file.
122 int64 start_offset = 2;
123 }
124
125 // Record key for a finding in Cloud Datastore.
126 message DatastoreKey {
127 // Datastore entity key.
128 Key entity_key = 1;
129 }
130
131 // A unique identifier for a Datastore entity.
132 // If a key's partition ID or any of its path kinds or names are
133 // reserved/read-only, the key is reserved/read-only.
134 // A reserved/read-only key is forbidden in certain documented contexts.
135 message Key {
136 // A (kind, ID/name) pair used to construct a key path.
137 //
138 // If either name or ID is set, the element is complete.
139 // If neither is set, the element is incomplete.
140 message PathElement {
141 // The kind of the entity.
142 // A kind matching regex `__.*__` is reserved/read-only.
143 // A kind must not contain more than 1500 bytes when UTF-8 encoded.
144 // Cannot be `""`.
145 string kind = 1;
146
147 // The type of ID.
148 oneof id_type {
149 // The auto-allocated ID of the entity.
150 // Never equal to zero. Values less than zero are discouraged and may not
151 // be supported in the future.
152 int64 id = 2;
153
154 // The name of the entity.
155 // A name matching regex `__.*__` is reserved/read-only.
156 // A name must not be more than 1500 bytes when UTF-8 encoded.
157 // Cannot be `""`.
158 string name = 3;
159 }
160 }
161
162 // Entities are partitioned into subsets, currently identified by a project
163 // ID and namespace ID.
164 // Queries are scoped to a single partition.
165 PartitionId partition_id = 1;
166
167 // The entity path.
168 // An entity path consists of one or more elements composed of a kind and a
169 // string or numerical identifier, which identify entities. The first
170 // element identifies a _root entity_, the second element identifies
171 // a _child_ of the root entity, the third element identifies a child of the
172 // second entity, and so forth. The entities identified by all prefixes of
173 // the path are called the element's _ancestors_.
174 //
175 // A path can never be empty, and a path can have at most 100 elements.
176 repeated PathElement path = 2;
177 }
178
179 // Message for a unique key indicating a record that contains a finding.
180 message RecordKey {
181 oneof type {
182 CloudStorageKey cloud_storage_key = 1;
183
184 DatastoreKey datastore_key = 2;
185 }
186 }