weave-typescript 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/google/api/annotations.pb.d.ts +1 -0
- package/dist/google/api/annotations.pb.js +10 -0
- package/dist/google/api/http.pb.d.ts +371 -0
- package/dist/google/api/http.pb.js +360 -0
- package/dist/google/protobuf/descriptor.pb.d.ts +1285 -0
- package/dist/google/protobuf/descriptor.pb.js +5217 -0
- package/dist/google/protobuf/struct.pb.d.ts +107 -0
- package/dist/google/protobuf/struct.pb.js +461 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +54 -0
- package/dist/weave/datamanagement/generate/v1/configuration.pb.d.ts +123 -0
- package/dist/weave/datamanagement/generate/v1/configuration.pb.js +799 -0
- package/dist/weave/datamanagement/generate/v1/generate.pb.d.ts +30 -0
- package/dist/weave/datamanagement/generate/v1/generate.pb.js +119 -0
- package/dist/weave/datamanagement/generate/v1/service.pb.d.ts +126 -0
- package/dist/weave/datamanagement/generate/v1/service.pb.js +578 -0
- package/dist/weave/datamanagement/storage/v1/auth.pb.d.ts +27 -0
- package/dist/weave/datamanagement/storage/v1/auth.pb.js +98 -0
- package/dist/weave/datamanagement/storage/v1/nosql_database.pb.d.ts +91 -0
- package/dist/weave/datamanagement/storage/v1/nosql_database.pb.js +1030 -0
- package/dist/weave/datamanagement/storage/v1/object_store.pb.d.ts +49 -0
- package/dist/weave/datamanagement/storage/v1/object_store.pb.js +405 -0
- package/dist/weave/datamanagement/storage/v1/service.pb.d.ts +257 -0
- package/dist/weave/datamanagement/storage/v1/service.pb.js +1188 -0
- package/dist/weave/datamanagement/storage/v1/sql_database.pb.d.ts +98 -0
- package/dist/weave/datamanagement/storage/v1/sql_database.pb.js +1142 -0
- package/dist/weave/datamanagement/storage/v1/storage.pb.d.ts +33 -0
- package/dist/weave/datamanagement/storage/v1/storage.pb.js +159 -0
- package/dist/weave/datamanagement/synthesize/v1/dataset.pb.d.ts +68 -0
- package/dist/weave/datamanagement/synthesize/v1/dataset.pb.js +439 -0
- package/dist/weave/datamanagement/synthesize/v1/inline_data.pb.d.ts +45 -0
- package/dist/weave/datamanagement/synthesize/v1/inline_data.pb.js +166 -0
- package/dist/weave/datamanagement/synthesize/v1/relationship.pb.d.ts +58 -0
- package/dist/weave/datamanagement/synthesize/v1/relationship.pb.js +241 -0
- package/dist/weave/datamanagement/synthesize/v1/service.pb.d.ts +133 -0
- package/dist/weave/datamanagement/synthesize/v1/service.pb.js +705 -0
- package/dist/weave/datamanagement/synthesize/v1/training.pb.d.ts +58 -0
- package/dist/weave/datamanagement/synthesize/v1/training.pb.js +353 -0
- package/package.json +27 -0
|
@@ -0,0 +1,799 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.6.1
|
|
5
|
+
// protoc unknown
|
|
6
|
+
// source: weave/datamanagement/generate/v1/configuration.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ModelConfig_CustomParametersEntry = exports.ModelConfig = exports.PrivacyConfig = exports.ColumnConstraint = exports.DataQualityConfig = exports.Configuration = exports.ModelType = exports.protobufPackage = void 0;
|
|
9
|
+
exports.modelTypeFromJSON = modelTypeFromJSON;
|
|
10
|
+
exports.modelTypeToJSON = modelTypeToJSON;
|
|
11
|
+
/* eslint-disable */
|
|
12
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
13
|
+
exports.protobufPackage = "weave.datamanagement.generate.v1";
|
|
14
|
+
/** ModelType defines the available synthetic data generation models */
|
|
15
|
+
var ModelType;
|
|
16
|
+
(function (ModelType) {
|
|
17
|
+
ModelType[ModelType["MODEL_TYPE_UNSPECIFIED"] = 0] = "MODEL_TYPE_UNSPECIFIED";
|
|
18
|
+
/** MODEL_TYPE_CTGAN - Conditional Tabular GAN */
|
|
19
|
+
ModelType[ModelType["MODEL_TYPE_CTGAN"] = 1] = "MODEL_TYPE_CTGAN";
|
|
20
|
+
/** MODEL_TYPE_TVAE - Tabular Variational Autoencoder */
|
|
21
|
+
ModelType[ModelType["MODEL_TYPE_TVAE"] = 2] = "MODEL_TYPE_TVAE";
|
|
22
|
+
/** MODEL_TYPE_COPULA - Gaussian Copula */
|
|
23
|
+
ModelType[ModelType["MODEL_TYPE_COPULA"] = 3] = "MODEL_TYPE_COPULA";
|
|
24
|
+
/** MODEL_TYPE_FAST - Fast mode (less accurate but quicker) */
|
|
25
|
+
ModelType[ModelType["MODEL_TYPE_FAST"] = 4] = "MODEL_TYPE_FAST";
|
|
26
|
+
/** MODEL_TYPE_GAN - Generic GAN implementation */
|
|
27
|
+
ModelType[ModelType["MODEL_TYPE_GAN"] = 5] = "MODEL_TYPE_GAN";
|
|
28
|
+
/** MODEL_TYPE_WGAN - Wasserstein GAN */
|
|
29
|
+
ModelType[ModelType["MODEL_TYPE_WGAN"] = 6] = "MODEL_TYPE_WGAN";
|
|
30
|
+
/** MODEL_TYPE_SMOTE - Synthetic Minority Over-sampling Technique */
|
|
31
|
+
ModelType[ModelType["MODEL_TYPE_SMOTE"] = 7] = "MODEL_TYPE_SMOTE";
|
|
32
|
+
/** MODEL_TYPE_BAYESIAN - Bayesian Network */
|
|
33
|
+
ModelType[ModelType["MODEL_TYPE_BAYESIAN"] = 8] = "MODEL_TYPE_BAYESIAN";
|
|
34
|
+
/** MODEL_TYPE_HMA - Hierarchical Modeling Algorithm */
|
|
35
|
+
ModelType[ModelType["MODEL_TYPE_HMA"] = 9] = "MODEL_TYPE_HMA";
|
|
36
|
+
ModelType[ModelType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
37
|
+
})(ModelType || (exports.ModelType = ModelType = {}));
|
|
38
|
+
function modelTypeFromJSON(object) {
|
|
39
|
+
switch (object) {
|
|
40
|
+
case 0:
|
|
41
|
+
case "MODEL_TYPE_UNSPECIFIED":
|
|
42
|
+
return ModelType.MODEL_TYPE_UNSPECIFIED;
|
|
43
|
+
case 1:
|
|
44
|
+
case "MODEL_TYPE_CTGAN":
|
|
45
|
+
return ModelType.MODEL_TYPE_CTGAN;
|
|
46
|
+
case 2:
|
|
47
|
+
case "MODEL_TYPE_TVAE":
|
|
48
|
+
return ModelType.MODEL_TYPE_TVAE;
|
|
49
|
+
case 3:
|
|
50
|
+
case "MODEL_TYPE_COPULA":
|
|
51
|
+
return ModelType.MODEL_TYPE_COPULA;
|
|
52
|
+
case 4:
|
|
53
|
+
case "MODEL_TYPE_FAST":
|
|
54
|
+
return ModelType.MODEL_TYPE_FAST;
|
|
55
|
+
case 5:
|
|
56
|
+
case "MODEL_TYPE_GAN":
|
|
57
|
+
return ModelType.MODEL_TYPE_GAN;
|
|
58
|
+
case 6:
|
|
59
|
+
case "MODEL_TYPE_WGAN":
|
|
60
|
+
return ModelType.MODEL_TYPE_WGAN;
|
|
61
|
+
case 7:
|
|
62
|
+
case "MODEL_TYPE_SMOTE":
|
|
63
|
+
return ModelType.MODEL_TYPE_SMOTE;
|
|
64
|
+
case 8:
|
|
65
|
+
case "MODEL_TYPE_BAYESIAN":
|
|
66
|
+
return ModelType.MODEL_TYPE_BAYESIAN;
|
|
67
|
+
case 9:
|
|
68
|
+
case "MODEL_TYPE_HMA":
|
|
69
|
+
return ModelType.MODEL_TYPE_HMA;
|
|
70
|
+
case -1:
|
|
71
|
+
case "UNRECOGNIZED":
|
|
72
|
+
default:
|
|
73
|
+
return ModelType.UNRECOGNIZED;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function modelTypeToJSON(object) {
|
|
77
|
+
switch (object) {
|
|
78
|
+
case ModelType.MODEL_TYPE_UNSPECIFIED:
|
|
79
|
+
return "MODEL_TYPE_UNSPECIFIED";
|
|
80
|
+
case ModelType.MODEL_TYPE_CTGAN:
|
|
81
|
+
return "MODEL_TYPE_CTGAN";
|
|
82
|
+
case ModelType.MODEL_TYPE_TVAE:
|
|
83
|
+
return "MODEL_TYPE_TVAE";
|
|
84
|
+
case ModelType.MODEL_TYPE_COPULA:
|
|
85
|
+
return "MODEL_TYPE_COPULA";
|
|
86
|
+
case ModelType.MODEL_TYPE_FAST:
|
|
87
|
+
return "MODEL_TYPE_FAST";
|
|
88
|
+
case ModelType.MODEL_TYPE_GAN:
|
|
89
|
+
return "MODEL_TYPE_GAN";
|
|
90
|
+
case ModelType.MODEL_TYPE_WGAN:
|
|
91
|
+
return "MODEL_TYPE_WGAN";
|
|
92
|
+
case ModelType.MODEL_TYPE_SMOTE:
|
|
93
|
+
return "MODEL_TYPE_SMOTE";
|
|
94
|
+
case ModelType.MODEL_TYPE_BAYESIAN:
|
|
95
|
+
return "MODEL_TYPE_BAYESIAN";
|
|
96
|
+
case ModelType.MODEL_TYPE_HMA:
|
|
97
|
+
return "MODEL_TYPE_HMA";
|
|
98
|
+
case ModelType.UNRECOGNIZED:
|
|
99
|
+
default:
|
|
100
|
+
return "UNRECOGNIZED";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function createBaseConfiguration() {
|
|
104
|
+
return { numRecords: 0, dataQuality: undefined, privacy: undefined, model: undefined };
|
|
105
|
+
}
|
|
106
|
+
exports.Configuration = {
|
|
107
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
108
|
+
if (message.numRecords !== 0) {
|
|
109
|
+
writer.uint32(8).int64(message.numRecords);
|
|
110
|
+
}
|
|
111
|
+
if (message.dataQuality !== undefined) {
|
|
112
|
+
exports.DataQualityConfig.encode(message.dataQuality, writer.uint32(26).fork()).join();
|
|
113
|
+
}
|
|
114
|
+
if (message.privacy !== undefined) {
|
|
115
|
+
exports.PrivacyConfig.encode(message.privacy, writer.uint32(34).fork()).join();
|
|
116
|
+
}
|
|
117
|
+
if (message.model !== undefined) {
|
|
118
|
+
exports.ModelConfig.encode(message.model, writer.uint32(42).fork()).join();
|
|
119
|
+
}
|
|
120
|
+
return writer;
|
|
121
|
+
},
|
|
122
|
+
decode(input, length) {
|
|
123
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
124
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
125
|
+
const message = createBaseConfiguration();
|
|
126
|
+
while (reader.pos < end) {
|
|
127
|
+
const tag = reader.uint32();
|
|
128
|
+
switch (tag >>> 3) {
|
|
129
|
+
case 1: {
|
|
130
|
+
if (tag !== 8) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
message.numRecords = longToNumber(reader.int64());
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
case 3: {
|
|
137
|
+
if (tag !== 26) {
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
message.dataQuality = exports.DataQualityConfig.decode(reader, reader.uint32());
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
case 4: {
|
|
144
|
+
if (tag !== 34) {
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
message.privacy = exports.PrivacyConfig.decode(reader, reader.uint32());
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
case 5: {
|
|
151
|
+
if (tag !== 42) {
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
message.model = exports.ModelConfig.decode(reader, reader.uint32());
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
reader.skip(tag & 7);
|
|
162
|
+
}
|
|
163
|
+
return message;
|
|
164
|
+
},
|
|
165
|
+
fromJSON(object) {
|
|
166
|
+
return {
|
|
167
|
+
numRecords: isSet(object.numRecords) ? globalThis.Number(object.numRecords) : 0,
|
|
168
|
+
dataQuality: isSet(object.dataQuality) ? exports.DataQualityConfig.fromJSON(object.dataQuality) : undefined,
|
|
169
|
+
privacy: isSet(object.privacy) ? exports.PrivacyConfig.fromJSON(object.privacy) : undefined,
|
|
170
|
+
model: isSet(object.model) ? exports.ModelConfig.fromJSON(object.model) : undefined,
|
|
171
|
+
};
|
|
172
|
+
},
|
|
173
|
+
toJSON(message) {
|
|
174
|
+
const obj = {};
|
|
175
|
+
if (message.numRecords !== 0) {
|
|
176
|
+
obj.numRecords = Math.round(message.numRecords);
|
|
177
|
+
}
|
|
178
|
+
if (message.dataQuality !== undefined) {
|
|
179
|
+
obj.dataQuality = exports.DataQualityConfig.toJSON(message.dataQuality);
|
|
180
|
+
}
|
|
181
|
+
if (message.privacy !== undefined) {
|
|
182
|
+
obj.privacy = exports.PrivacyConfig.toJSON(message.privacy);
|
|
183
|
+
}
|
|
184
|
+
if (message.model !== undefined) {
|
|
185
|
+
obj.model = exports.ModelConfig.toJSON(message.model);
|
|
186
|
+
}
|
|
187
|
+
return obj;
|
|
188
|
+
},
|
|
189
|
+
create(base) {
|
|
190
|
+
return exports.Configuration.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
191
|
+
},
|
|
192
|
+
fromPartial(object) {
|
|
193
|
+
var _a;
|
|
194
|
+
const message = createBaseConfiguration();
|
|
195
|
+
message.numRecords = (_a = object.numRecords) !== null && _a !== void 0 ? _a : 0;
|
|
196
|
+
message.dataQuality = (object.dataQuality !== undefined && object.dataQuality !== null)
|
|
197
|
+
? exports.DataQualityConfig.fromPartial(object.dataQuality)
|
|
198
|
+
: undefined;
|
|
199
|
+
message.privacy = (object.privacy !== undefined && object.privacy !== null)
|
|
200
|
+
? exports.PrivacyConfig.fromPartial(object.privacy)
|
|
201
|
+
: undefined;
|
|
202
|
+
message.model = (object.model !== undefined && object.model !== null)
|
|
203
|
+
? exports.ModelConfig.fromPartial(object.model)
|
|
204
|
+
: undefined;
|
|
205
|
+
return message;
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
function createBaseDataQualityConfig() {
|
|
209
|
+
return {
|
|
210
|
+
correlationAccuracy: 0,
|
|
211
|
+
statisticalSimilarity: 0,
|
|
212
|
+
preserveOutliers: false,
|
|
213
|
+
enforceConstraints: false,
|
|
214
|
+
constraints: [],
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
exports.DataQualityConfig = {
|
|
218
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
219
|
+
if (message.correlationAccuracy !== 0) {
|
|
220
|
+
writer.uint32(13).float(message.correlationAccuracy);
|
|
221
|
+
}
|
|
222
|
+
if (message.statisticalSimilarity !== 0) {
|
|
223
|
+
writer.uint32(21).float(message.statisticalSimilarity);
|
|
224
|
+
}
|
|
225
|
+
if (message.preserveOutliers !== false) {
|
|
226
|
+
writer.uint32(24).bool(message.preserveOutliers);
|
|
227
|
+
}
|
|
228
|
+
if (message.enforceConstraints !== false) {
|
|
229
|
+
writer.uint32(32).bool(message.enforceConstraints);
|
|
230
|
+
}
|
|
231
|
+
for (const v of message.constraints) {
|
|
232
|
+
exports.ColumnConstraint.encode(v, writer.uint32(42).fork()).join();
|
|
233
|
+
}
|
|
234
|
+
return writer;
|
|
235
|
+
},
|
|
236
|
+
decode(input, length) {
|
|
237
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
238
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
239
|
+
const message = createBaseDataQualityConfig();
|
|
240
|
+
while (reader.pos < end) {
|
|
241
|
+
const tag = reader.uint32();
|
|
242
|
+
switch (tag >>> 3) {
|
|
243
|
+
case 1: {
|
|
244
|
+
if (tag !== 13) {
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
message.correlationAccuracy = reader.float();
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
case 2: {
|
|
251
|
+
if (tag !== 21) {
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
message.statisticalSimilarity = reader.float();
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
case 3: {
|
|
258
|
+
if (tag !== 24) {
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
message.preserveOutliers = reader.bool();
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
case 4: {
|
|
265
|
+
if (tag !== 32) {
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
message.enforceConstraints = reader.bool();
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
case 5: {
|
|
272
|
+
if (tag !== 42) {
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
message.constraints.push(exports.ColumnConstraint.decode(reader, reader.uint32()));
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
reader.skip(tag & 7);
|
|
283
|
+
}
|
|
284
|
+
return message;
|
|
285
|
+
},
|
|
286
|
+
fromJSON(object) {
|
|
287
|
+
return {
|
|
288
|
+
correlationAccuracy: isSet(object.correlationAccuracy) ? globalThis.Number(object.correlationAccuracy) : 0,
|
|
289
|
+
statisticalSimilarity: isSet(object.statisticalSimilarity) ? globalThis.Number(object.statisticalSimilarity) : 0,
|
|
290
|
+
preserveOutliers: isSet(object.preserveOutliers) ? globalThis.Boolean(object.preserveOutliers) : false,
|
|
291
|
+
enforceConstraints: isSet(object.enforceConstraints) ? globalThis.Boolean(object.enforceConstraints) : false,
|
|
292
|
+
constraints: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.constraints)
|
|
293
|
+
? object.constraints.map((e) => exports.ColumnConstraint.fromJSON(e))
|
|
294
|
+
: [],
|
|
295
|
+
};
|
|
296
|
+
},
|
|
297
|
+
toJSON(message) {
|
|
298
|
+
var _a;
|
|
299
|
+
const obj = {};
|
|
300
|
+
if (message.correlationAccuracy !== 0) {
|
|
301
|
+
obj.correlationAccuracy = message.correlationAccuracy;
|
|
302
|
+
}
|
|
303
|
+
if (message.statisticalSimilarity !== 0) {
|
|
304
|
+
obj.statisticalSimilarity = message.statisticalSimilarity;
|
|
305
|
+
}
|
|
306
|
+
if (message.preserveOutliers !== false) {
|
|
307
|
+
obj.preserveOutliers = message.preserveOutliers;
|
|
308
|
+
}
|
|
309
|
+
if (message.enforceConstraints !== false) {
|
|
310
|
+
obj.enforceConstraints = message.enforceConstraints;
|
|
311
|
+
}
|
|
312
|
+
if ((_a = message.constraints) === null || _a === void 0 ? void 0 : _a.length) {
|
|
313
|
+
obj.constraints = message.constraints.map((e) => exports.ColumnConstraint.toJSON(e));
|
|
314
|
+
}
|
|
315
|
+
return obj;
|
|
316
|
+
},
|
|
317
|
+
create(base) {
|
|
318
|
+
return exports.DataQualityConfig.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
319
|
+
},
|
|
320
|
+
fromPartial(object) {
|
|
321
|
+
var _a, _b, _c, _d, _e;
|
|
322
|
+
const message = createBaseDataQualityConfig();
|
|
323
|
+
message.correlationAccuracy = (_a = object.correlationAccuracy) !== null && _a !== void 0 ? _a : 0;
|
|
324
|
+
message.statisticalSimilarity = (_b = object.statisticalSimilarity) !== null && _b !== void 0 ? _b : 0;
|
|
325
|
+
message.preserveOutliers = (_c = object.preserveOutliers) !== null && _c !== void 0 ? _c : false;
|
|
326
|
+
message.enforceConstraints = (_d = object.enforceConstraints) !== null && _d !== void 0 ? _d : false;
|
|
327
|
+
message.constraints = ((_e = object.constraints) === null || _e === void 0 ? void 0 : _e.map((e) => exports.ColumnConstraint.fromPartial(e))) || [];
|
|
328
|
+
return message;
|
|
329
|
+
},
|
|
330
|
+
};
|
|
331
|
+
function createBaseColumnConstraint() {
|
|
332
|
+
return { columnName: "", constraintType: "", minValue: "", maxValue: "", regexPattern: "", allowedValues: [] };
|
|
333
|
+
}
|
|
334
|
+
exports.ColumnConstraint = {
|
|
335
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
336
|
+
if (message.columnName !== "") {
|
|
337
|
+
writer.uint32(10).string(message.columnName);
|
|
338
|
+
}
|
|
339
|
+
if (message.constraintType !== "") {
|
|
340
|
+
writer.uint32(18).string(message.constraintType);
|
|
341
|
+
}
|
|
342
|
+
if (message.minValue !== "") {
|
|
343
|
+
writer.uint32(26).string(message.minValue);
|
|
344
|
+
}
|
|
345
|
+
if (message.maxValue !== "") {
|
|
346
|
+
writer.uint32(34).string(message.maxValue);
|
|
347
|
+
}
|
|
348
|
+
if (message.regexPattern !== "") {
|
|
349
|
+
writer.uint32(42).string(message.regexPattern);
|
|
350
|
+
}
|
|
351
|
+
for (const v of message.allowedValues) {
|
|
352
|
+
writer.uint32(50).string(v);
|
|
353
|
+
}
|
|
354
|
+
return writer;
|
|
355
|
+
},
|
|
356
|
+
decode(input, length) {
|
|
357
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
358
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
359
|
+
const message = createBaseColumnConstraint();
|
|
360
|
+
while (reader.pos < end) {
|
|
361
|
+
const tag = reader.uint32();
|
|
362
|
+
switch (tag >>> 3) {
|
|
363
|
+
case 1: {
|
|
364
|
+
if (tag !== 10) {
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
message.columnName = reader.string();
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
case 2: {
|
|
371
|
+
if (tag !== 18) {
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
message.constraintType = reader.string();
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
case 3: {
|
|
378
|
+
if (tag !== 26) {
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
message.minValue = reader.string();
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
384
|
+
case 4: {
|
|
385
|
+
if (tag !== 34) {
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
message.maxValue = reader.string();
|
|
389
|
+
continue;
|
|
390
|
+
}
|
|
391
|
+
case 5: {
|
|
392
|
+
if (tag !== 42) {
|
|
393
|
+
break;
|
|
394
|
+
}
|
|
395
|
+
message.regexPattern = reader.string();
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
398
|
+
case 6: {
|
|
399
|
+
if (tag !== 50) {
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
message.allowedValues.push(reader.string());
|
|
403
|
+
continue;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
407
|
+
break;
|
|
408
|
+
}
|
|
409
|
+
reader.skip(tag & 7);
|
|
410
|
+
}
|
|
411
|
+
return message;
|
|
412
|
+
},
|
|
413
|
+
fromJSON(object) {
|
|
414
|
+
return {
|
|
415
|
+
columnName: isSet(object.columnName) ? globalThis.String(object.columnName) : "",
|
|
416
|
+
constraintType: isSet(object.constraintType) ? globalThis.String(object.constraintType) : "",
|
|
417
|
+
minValue: isSet(object.minValue) ? globalThis.String(object.minValue) : "",
|
|
418
|
+
maxValue: isSet(object.maxValue) ? globalThis.String(object.maxValue) : "",
|
|
419
|
+
regexPattern: isSet(object.regexPattern) ? globalThis.String(object.regexPattern) : "",
|
|
420
|
+
allowedValues: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.allowedValues)
|
|
421
|
+
? object.allowedValues.map((e) => globalThis.String(e))
|
|
422
|
+
: [],
|
|
423
|
+
};
|
|
424
|
+
},
|
|
425
|
+
toJSON(message) {
|
|
426
|
+
var _a;
|
|
427
|
+
const obj = {};
|
|
428
|
+
if (message.columnName !== "") {
|
|
429
|
+
obj.columnName = message.columnName;
|
|
430
|
+
}
|
|
431
|
+
if (message.constraintType !== "") {
|
|
432
|
+
obj.constraintType = message.constraintType;
|
|
433
|
+
}
|
|
434
|
+
if (message.minValue !== "") {
|
|
435
|
+
obj.minValue = message.minValue;
|
|
436
|
+
}
|
|
437
|
+
if (message.maxValue !== "") {
|
|
438
|
+
obj.maxValue = message.maxValue;
|
|
439
|
+
}
|
|
440
|
+
if (message.regexPattern !== "") {
|
|
441
|
+
obj.regexPattern = message.regexPattern;
|
|
442
|
+
}
|
|
443
|
+
if ((_a = message.allowedValues) === null || _a === void 0 ? void 0 : _a.length) {
|
|
444
|
+
obj.allowedValues = message.allowedValues;
|
|
445
|
+
}
|
|
446
|
+
return obj;
|
|
447
|
+
},
|
|
448
|
+
create(base) {
|
|
449
|
+
return exports.ColumnConstraint.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
450
|
+
},
|
|
451
|
+
fromPartial(object) {
|
|
452
|
+
var _a, _b, _c, _d, _e, _f;
|
|
453
|
+
const message = createBaseColumnConstraint();
|
|
454
|
+
message.columnName = (_a = object.columnName) !== null && _a !== void 0 ? _a : "";
|
|
455
|
+
message.constraintType = (_b = object.constraintType) !== null && _b !== void 0 ? _b : "";
|
|
456
|
+
message.minValue = (_c = object.minValue) !== null && _c !== void 0 ? _c : "";
|
|
457
|
+
message.maxValue = (_d = object.maxValue) !== null && _d !== void 0 ? _d : "";
|
|
458
|
+
message.regexPattern = (_e = object.regexPattern) !== null && _e !== void 0 ? _e : "";
|
|
459
|
+
message.allowedValues = ((_f = object.allowedValues) === null || _f === void 0 ? void 0 : _f.map((e) => e)) || [];
|
|
460
|
+
return message;
|
|
461
|
+
},
|
|
462
|
+
};
|
|
463
|
+
function createBasePrivacyConfig() {
|
|
464
|
+
return { epsilon: 0, kAnonymityCheck: false, kValue: 0, sensitiveColumns: [], enablePrivacyMetrics: false };
|
|
465
|
+
}
|
|
466
|
+
exports.PrivacyConfig = {
|
|
467
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
468
|
+
if (message.epsilon !== 0) {
|
|
469
|
+
writer.uint32(13).float(message.epsilon);
|
|
470
|
+
}
|
|
471
|
+
if (message.kAnonymityCheck !== false) {
|
|
472
|
+
writer.uint32(16).bool(message.kAnonymityCheck);
|
|
473
|
+
}
|
|
474
|
+
if (message.kValue !== 0) {
|
|
475
|
+
writer.uint32(24).int32(message.kValue);
|
|
476
|
+
}
|
|
477
|
+
for (const v of message.sensitiveColumns) {
|
|
478
|
+
writer.uint32(34).string(v);
|
|
479
|
+
}
|
|
480
|
+
if (message.enablePrivacyMetrics !== false) {
|
|
481
|
+
writer.uint32(40).bool(message.enablePrivacyMetrics);
|
|
482
|
+
}
|
|
483
|
+
return writer;
|
|
484
|
+
},
|
|
485
|
+
decode(input, length) {
|
|
486
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
487
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
488
|
+
const message = createBasePrivacyConfig();
|
|
489
|
+
while (reader.pos < end) {
|
|
490
|
+
const tag = reader.uint32();
|
|
491
|
+
switch (tag >>> 3) {
|
|
492
|
+
case 1: {
|
|
493
|
+
if (tag !== 13) {
|
|
494
|
+
break;
|
|
495
|
+
}
|
|
496
|
+
message.epsilon = reader.float();
|
|
497
|
+
continue;
|
|
498
|
+
}
|
|
499
|
+
case 2: {
|
|
500
|
+
if (tag !== 16) {
|
|
501
|
+
break;
|
|
502
|
+
}
|
|
503
|
+
message.kAnonymityCheck = reader.bool();
|
|
504
|
+
continue;
|
|
505
|
+
}
|
|
506
|
+
case 3: {
|
|
507
|
+
if (tag !== 24) {
|
|
508
|
+
break;
|
|
509
|
+
}
|
|
510
|
+
message.kValue = reader.int32();
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
513
|
+
case 4: {
|
|
514
|
+
if (tag !== 34) {
|
|
515
|
+
break;
|
|
516
|
+
}
|
|
517
|
+
message.sensitiveColumns.push(reader.string());
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
case 5: {
|
|
521
|
+
if (tag !== 40) {
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
524
|
+
message.enablePrivacyMetrics = reader.bool();
|
|
525
|
+
continue;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
529
|
+
break;
|
|
530
|
+
}
|
|
531
|
+
reader.skip(tag & 7);
|
|
532
|
+
}
|
|
533
|
+
return message;
|
|
534
|
+
},
|
|
535
|
+
fromJSON(object) {
|
|
536
|
+
return {
|
|
537
|
+
epsilon: isSet(object.epsilon) ? globalThis.Number(object.epsilon) : 0,
|
|
538
|
+
kAnonymityCheck: isSet(object.kAnonymityCheck) ? globalThis.Boolean(object.kAnonymityCheck) : false,
|
|
539
|
+
kValue: isSet(object.kValue) ? globalThis.Number(object.kValue) : 0,
|
|
540
|
+
sensitiveColumns: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.sensitiveColumns)
|
|
541
|
+
? object.sensitiveColumns.map((e) => globalThis.String(e))
|
|
542
|
+
: [],
|
|
543
|
+
enablePrivacyMetrics: isSet(object.enablePrivacyMetrics)
|
|
544
|
+
? globalThis.Boolean(object.enablePrivacyMetrics)
|
|
545
|
+
: false,
|
|
546
|
+
};
|
|
547
|
+
},
|
|
548
|
+
toJSON(message) {
|
|
549
|
+
var _a;
|
|
550
|
+
const obj = {};
|
|
551
|
+
if (message.epsilon !== 0) {
|
|
552
|
+
obj.epsilon = message.epsilon;
|
|
553
|
+
}
|
|
554
|
+
if (message.kAnonymityCheck !== false) {
|
|
555
|
+
obj.kAnonymityCheck = message.kAnonymityCheck;
|
|
556
|
+
}
|
|
557
|
+
if (message.kValue !== 0) {
|
|
558
|
+
obj.kValue = Math.round(message.kValue);
|
|
559
|
+
}
|
|
560
|
+
if ((_a = message.sensitiveColumns) === null || _a === void 0 ? void 0 : _a.length) {
|
|
561
|
+
obj.sensitiveColumns = message.sensitiveColumns;
|
|
562
|
+
}
|
|
563
|
+
if (message.enablePrivacyMetrics !== false) {
|
|
564
|
+
obj.enablePrivacyMetrics = message.enablePrivacyMetrics;
|
|
565
|
+
}
|
|
566
|
+
return obj;
|
|
567
|
+
},
|
|
568
|
+
create(base) {
|
|
569
|
+
return exports.PrivacyConfig.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
570
|
+
},
|
|
571
|
+
fromPartial(object) {
|
|
572
|
+
var _a, _b, _c, _d, _e;
|
|
573
|
+
const message = createBasePrivacyConfig();
|
|
574
|
+
message.epsilon = (_a = object.epsilon) !== null && _a !== void 0 ? _a : 0;
|
|
575
|
+
message.kAnonymityCheck = (_b = object.kAnonymityCheck) !== null && _b !== void 0 ? _b : false;
|
|
576
|
+
message.kValue = (_c = object.kValue) !== null && _c !== void 0 ? _c : 0;
|
|
577
|
+
message.sensitiveColumns = ((_d = object.sensitiveColumns) === null || _d === void 0 ? void 0 : _d.map((e) => e)) || [];
|
|
578
|
+
message.enablePrivacyMetrics = (_e = object.enablePrivacyMetrics) !== null && _e !== void 0 ? _e : false;
|
|
579
|
+
return message;
|
|
580
|
+
},
|
|
581
|
+
};
|
|
582
|
+
function createBaseModelConfig() {
|
|
583
|
+
return { modelType: 0, epochs: 0, learningRate: 0, batchSize: 0, customParameters: {} };
|
|
584
|
+
}
|
|
585
|
+
exports.ModelConfig = {
|
|
586
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
587
|
+
if (message.modelType !== 0) {
|
|
588
|
+
writer.uint32(8).int32(message.modelType);
|
|
589
|
+
}
|
|
590
|
+
if (message.epochs !== 0) {
|
|
591
|
+
writer.uint32(16).int32(message.epochs);
|
|
592
|
+
}
|
|
593
|
+
if (message.learningRate !== 0) {
|
|
594
|
+
writer.uint32(29).float(message.learningRate);
|
|
595
|
+
}
|
|
596
|
+
if (message.batchSize !== 0) {
|
|
597
|
+
writer.uint32(32).int32(message.batchSize);
|
|
598
|
+
}
|
|
599
|
+
Object.entries(message.customParameters).forEach(([key, value]) => {
|
|
600
|
+
exports.ModelConfig_CustomParametersEntry.encode({ key: key, value }, writer.uint32(42).fork()).join();
|
|
601
|
+
});
|
|
602
|
+
return writer;
|
|
603
|
+
},
|
|
604
|
+
decode(input, length) {
|
|
605
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
606
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
607
|
+
const message = createBaseModelConfig();
|
|
608
|
+
while (reader.pos < end) {
|
|
609
|
+
const tag = reader.uint32();
|
|
610
|
+
switch (tag >>> 3) {
|
|
611
|
+
case 1: {
|
|
612
|
+
if (tag !== 8) {
|
|
613
|
+
break;
|
|
614
|
+
}
|
|
615
|
+
message.modelType = reader.int32();
|
|
616
|
+
continue;
|
|
617
|
+
}
|
|
618
|
+
case 2: {
|
|
619
|
+
if (tag !== 16) {
|
|
620
|
+
break;
|
|
621
|
+
}
|
|
622
|
+
message.epochs = reader.int32();
|
|
623
|
+
continue;
|
|
624
|
+
}
|
|
625
|
+
case 3: {
|
|
626
|
+
if (tag !== 29) {
|
|
627
|
+
break;
|
|
628
|
+
}
|
|
629
|
+
message.learningRate = reader.float();
|
|
630
|
+
continue;
|
|
631
|
+
}
|
|
632
|
+
case 4: {
|
|
633
|
+
if (tag !== 32) {
|
|
634
|
+
break;
|
|
635
|
+
}
|
|
636
|
+
message.batchSize = reader.int32();
|
|
637
|
+
continue;
|
|
638
|
+
}
|
|
639
|
+
case 5: {
|
|
640
|
+
if (tag !== 42) {
|
|
641
|
+
break;
|
|
642
|
+
}
|
|
643
|
+
const entry5 = exports.ModelConfig_CustomParametersEntry.decode(reader, reader.uint32());
|
|
644
|
+
if (entry5.value !== undefined) {
|
|
645
|
+
message.customParameters[entry5.key] = entry5.value;
|
|
646
|
+
}
|
|
647
|
+
continue;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
651
|
+
break;
|
|
652
|
+
}
|
|
653
|
+
reader.skip(tag & 7);
|
|
654
|
+
}
|
|
655
|
+
return message;
|
|
656
|
+
},
|
|
657
|
+
fromJSON(object) {
|
|
658
|
+
return {
|
|
659
|
+
modelType: isSet(object.modelType) ? modelTypeFromJSON(object.modelType) : 0,
|
|
660
|
+
epochs: isSet(object.epochs) ? globalThis.Number(object.epochs) : 0,
|
|
661
|
+
learningRate: isSet(object.learningRate) ? globalThis.Number(object.learningRate) : 0,
|
|
662
|
+
batchSize: isSet(object.batchSize) ? globalThis.Number(object.batchSize) : 0,
|
|
663
|
+
customParameters: isObject(object.customParameters)
|
|
664
|
+
? Object.entries(object.customParameters).reduce((acc, [key, value]) => {
|
|
665
|
+
acc[key] = String(value);
|
|
666
|
+
return acc;
|
|
667
|
+
}, {})
|
|
668
|
+
: {},
|
|
669
|
+
};
|
|
670
|
+
},
|
|
671
|
+
toJSON(message) {
|
|
672
|
+
const obj = {};
|
|
673
|
+
if (message.modelType !== 0) {
|
|
674
|
+
obj.modelType = modelTypeToJSON(message.modelType);
|
|
675
|
+
}
|
|
676
|
+
if (message.epochs !== 0) {
|
|
677
|
+
obj.epochs = Math.round(message.epochs);
|
|
678
|
+
}
|
|
679
|
+
if (message.learningRate !== 0) {
|
|
680
|
+
obj.learningRate = message.learningRate;
|
|
681
|
+
}
|
|
682
|
+
if (message.batchSize !== 0) {
|
|
683
|
+
obj.batchSize = Math.round(message.batchSize);
|
|
684
|
+
}
|
|
685
|
+
if (message.customParameters) {
|
|
686
|
+
const entries = Object.entries(message.customParameters);
|
|
687
|
+
if (entries.length > 0) {
|
|
688
|
+
obj.customParameters = {};
|
|
689
|
+
entries.forEach(([k, v]) => {
|
|
690
|
+
obj.customParameters[k] = v;
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
return obj;
|
|
695
|
+
},
|
|
696
|
+
create(base) {
|
|
697
|
+
return exports.ModelConfig.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
698
|
+
},
|
|
699
|
+
fromPartial(object) {
|
|
700
|
+
var _a, _b, _c, _d, _e;
|
|
701
|
+
const message = createBaseModelConfig();
|
|
702
|
+
message.modelType = (_a = object.modelType) !== null && _a !== void 0 ? _a : 0;
|
|
703
|
+
message.epochs = (_b = object.epochs) !== null && _b !== void 0 ? _b : 0;
|
|
704
|
+
message.learningRate = (_c = object.learningRate) !== null && _c !== void 0 ? _c : 0;
|
|
705
|
+
message.batchSize = (_d = object.batchSize) !== null && _d !== void 0 ? _d : 0;
|
|
706
|
+
message.customParameters = Object.entries((_e = object.customParameters) !== null && _e !== void 0 ? _e : {}).reduce((acc, [key, value]) => {
|
|
707
|
+
if (value !== undefined) {
|
|
708
|
+
acc[key] = globalThis.String(value);
|
|
709
|
+
}
|
|
710
|
+
return acc;
|
|
711
|
+
}, {});
|
|
712
|
+
return message;
|
|
713
|
+
},
|
|
714
|
+
};
|
|
715
|
+
function createBaseModelConfig_CustomParametersEntry() {
|
|
716
|
+
return { key: "", value: "" };
|
|
717
|
+
}
|
|
718
|
+
exports.ModelConfig_CustomParametersEntry = {
|
|
719
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
720
|
+
if (message.key !== "") {
|
|
721
|
+
writer.uint32(10).string(message.key);
|
|
722
|
+
}
|
|
723
|
+
if (message.value !== "") {
|
|
724
|
+
writer.uint32(18).string(message.value);
|
|
725
|
+
}
|
|
726
|
+
return writer;
|
|
727
|
+
},
|
|
728
|
+
decode(input, length) {
|
|
729
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
730
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
731
|
+
const message = createBaseModelConfig_CustomParametersEntry();
|
|
732
|
+
while (reader.pos < end) {
|
|
733
|
+
const tag = reader.uint32();
|
|
734
|
+
switch (tag >>> 3) {
|
|
735
|
+
case 1: {
|
|
736
|
+
if (tag !== 10) {
|
|
737
|
+
break;
|
|
738
|
+
}
|
|
739
|
+
message.key = reader.string();
|
|
740
|
+
continue;
|
|
741
|
+
}
|
|
742
|
+
case 2: {
|
|
743
|
+
if (tag !== 18) {
|
|
744
|
+
break;
|
|
745
|
+
}
|
|
746
|
+
message.value = reader.string();
|
|
747
|
+
continue;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
751
|
+
break;
|
|
752
|
+
}
|
|
753
|
+
reader.skip(tag & 7);
|
|
754
|
+
}
|
|
755
|
+
return message;
|
|
756
|
+
},
|
|
757
|
+
fromJSON(object) {
|
|
758
|
+
return {
|
|
759
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
760
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
761
|
+
};
|
|
762
|
+
},
|
|
763
|
+
toJSON(message) {
|
|
764
|
+
const obj = {};
|
|
765
|
+
if (message.key !== "") {
|
|
766
|
+
obj.key = message.key;
|
|
767
|
+
}
|
|
768
|
+
if (message.value !== "") {
|
|
769
|
+
obj.value = message.value;
|
|
770
|
+
}
|
|
771
|
+
return obj;
|
|
772
|
+
},
|
|
773
|
+
create(base) {
|
|
774
|
+
return exports.ModelConfig_CustomParametersEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
775
|
+
},
|
|
776
|
+
fromPartial(object) {
|
|
777
|
+
var _a, _b;
|
|
778
|
+
const message = createBaseModelConfig_CustomParametersEntry();
|
|
779
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
780
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
|
|
781
|
+
return message;
|
|
782
|
+
},
|
|
783
|
+
};
|
|
784
|
+
function longToNumber(int64) {
|
|
785
|
+
const num = globalThis.Number(int64.toString());
|
|
786
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
787
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
788
|
+
}
|
|
789
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
790
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
791
|
+
}
|
|
792
|
+
return num;
|
|
793
|
+
}
|
|
794
|
+
function isObject(value) {
|
|
795
|
+
return typeof value === "object" && value !== null;
|
|
796
|
+
}
|
|
797
|
+
function isSet(value) {
|
|
798
|
+
return value !== null && value !== undefined;
|
|
799
|
+
}
|