@lansweeper/scanningconfig-grpc 0.3.5 → 0.3.6

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.
@@ -148,10 +148,14 @@ export class Exclusion extends jspb.Message {
148
148
  setId(value: string): Exclusion;
149
149
  getReason(): string;
150
150
  setReason(value: string): Exclusion;
151
- getType(): Exclusion.ExclusionType;
152
- setType(value: Exclusion.ExclusionType): Exclusion;
153
- getValue(): string;
154
- setValue(value: string): Exclusion;
151
+ clearSensorIdsList(): void;
152
+ getSensorIdsList(): Array<string>;
153
+ setSensorIdsList(value: Array<string>): Exclusion;
154
+ addSensorIds(value: string, index?: number): string;
155
+ clearTargetsList(): void;
156
+ getTargetsList(): Array<Target>;
157
+ setTargetsList(value: Array<Target>): Exclusion;
158
+ addTargets(value?: Target, index?: number): Target;
155
159
 
156
160
  serializeBinary(): Uint8Array;
157
161
  toObject(includeInstance?: boolean): Exclusion.AsObject;
@@ -167,13 +171,42 @@ export namespace Exclusion {
167
171
  export type AsObject = {
168
172
  id: string,
169
173
  reason: string,
170
- type: Exclusion.ExclusionType,
171
- value: string,
174
+ sensorIdsList: Array<string>,
175
+ targetsList: Array<Target.AsObject>,
176
+ }
177
+ }
178
+
179
+ export class Target extends jspb.Message {
180
+ getType(): Target.ExclusionType;
181
+ setType(value: Target.ExclusionType): Target;
182
+ clearValuesList(): void;
183
+ getValuesList(): Array<string>;
184
+ setValuesList(value: Array<string>): Target;
185
+ addValues(value: string, index?: number): string;
186
+
187
+ serializeBinary(): Uint8Array;
188
+ toObject(includeInstance?: boolean): Target.AsObject;
189
+ static toObject(includeInstance: boolean, msg: Target): Target.AsObject;
190
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
191
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
192
+ static serializeBinaryToWriter(message: Target, writer: jspb.BinaryWriter): void;
193
+ static deserializeBinary(bytes: Uint8Array): Target;
194
+ static deserializeBinaryFromReader(message: Target, reader: jspb.BinaryReader): Target;
195
+ }
196
+
197
+ export namespace Target {
198
+ export type AsObject = {
199
+ type: Target.ExclusionType,
200
+ valuesList: Array<string>,
172
201
  }
173
202
 
174
203
  export enum ExclusionType {
175
204
  UNSPECIFIED = 0,
176
205
  IP_ADDR_RANGE = 1,
206
+ MAC_ADDR = 2,
207
+ ASSET_TYPE = 3,
208
+ FQDN = 4,
209
+ DOMAIN = 5,
177
210
  }
178
211
 
179
212
  }
@@ -45,7 +45,6 @@ goog.exportSymbol('proto.lansweeper.scanningconfig.v1.DeleteActionRequest', null
45
45
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.DeleteActionResponse', null, global);
46
46
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.DownloadSettings', null, global);
47
47
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.Exclusion', null, global);
48
- goog.exportSymbol('proto.lansweeper.scanningconfig.v1.Exclusion.ExclusionType', null, global);
49
48
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.ExclusionSettings', null, global);
50
49
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.FeatureFlagSettings', null, global);
51
50
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.GetConfigurationsBySourceRequest', null, global);
@@ -75,6 +74,8 @@ goog.exportSymbol('proto.lansweeper.scanningconfig.v1.ProtocolDetailSettings', n
75
74
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.RetentionPolicySettings', null, global);
76
75
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.SCCMData', null, global);
77
76
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.ScanConfigurationSettings', null, global);
77
+ goog.exportSymbol('proto.lansweeper.scanningconfig.v1.Target', null, global);
78
+ goog.exportSymbol('proto.lansweeper.scanningconfig.v1.Target.ExclusionType', null, global);
78
79
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.TargetData', null, global);
79
80
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.TargetData.InfoCase', null, global);
80
81
  goog.exportSymbol('proto.lansweeper.scanningconfig.v1.TargetData.TargetType', null, global);
@@ -219,7 +220,7 @@ if (goog.DEBUG && !COMPILED) {
219
220
  * @constructor
220
221
  */
221
222
  proto.lansweeper.scanningconfig.v1.Exclusion = function(opt_data) {
222
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
223
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.lansweeper.scanningconfig.v1.Exclusion.repeatedFields_, null);
223
224
  };
224
225
  goog.inherits(proto.lansweeper.scanningconfig.v1.Exclusion, jspb.Message);
225
226
  if (goog.DEBUG && !COMPILED) {
@@ -229,6 +230,27 @@ if (goog.DEBUG && !COMPILED) {
229
230
  */
230
231
  proto.lansweeper.scanningconfig.v1.Exclusion.displayName = 'proto.lansweeper.scanningconfig.v1.Exclusion';
231
232
  }
233
+ /**
234
+ * Generated by JsPbCodeGenerator.
235
+ * @param {Array=} opt_data Optional initial data array, typically from a
236
+ * server response, or constructed directly in Javascript. The array is used
237
+ * in place and becomes part of the constructed object. It is not cloned.
238
+ * If no data is provided, the constructed object will be empty, but still
239
+ * valid.
240
+ * @extends {jspb.Message}
241
+ * @constructor
242
+ */
243
+ proto.lansweeper.scanningconfig.v1.Target = function(opt_data) {
244
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.lansweeper.scanningconfig.v1.Target.repeatedFields_, null);
245
+ };
246
+ goog.inherits(proto.lansweeper.scanningconfig.v1.Target, jspb.Message);
247
+ if (goog.DEBUG && !COMPILED) {
248
+ /**
249
+ * @public
250
+ * @override
251
+ */
252
+ proto.lansweeper.scanningconfig.v1.Target.displayName = 'proto.lansweeper.scanningconfig.v1.Target';
253
+ }
232
254
  /**
233
255
  * Generated by JsPbCodeGenerator.
234
256
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -2030,6 +2052,13 @@ proto.lansweeper.scanningconfig.v1.GetExclusionsBySourceResponse.prototype.clear
2030
2052
 
2031
2053
 
2032
2054
 
2055
+ /**
2056
+ * List of repeated fields within this message type.
2057
+ * @private {!Array<number>}
2058
+ * @const
2059
+ */
2060
+ proto.lansweeper.scanningconfig.v1.Exclusion.repeatedFields_ = [3,4];
2061
+
2033
2062
 
2034
2063
 
2035
2064
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -2063,8 +2092,9 @@ proto.lansweeper.scanningconfig.v1.Exclusion.toObject = function(includeInstance
2063
2092
  var f, obj = {
2064
2093
  id: jspb.Message.getFieldWithDefault(msg, 1, ""),
2065
2094
  reason: jspb.Message.getFieldWithDefault(msg, 2, ""),
2066
- type: jspb.Message.getFieldWithDefault(msg, 3, 0),
2067
- value: jspb.Message.getFieldWithDefault(msg, 4, "")
2095
+ sensorIdsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
2096
+ targetsList: jspb.Message.toObjectList(msg.getTargetsList(),
2097
+ proto.lansweeper.scanningconfig.v1.Target.toObject, includeInstance)
2068
2098
  };
2069
2099
 
2070
2100
  if (includeInstance) {
@@ -2110,12 +2140,13 @@ proto.lansweeper.scanningconfig.v1.Exclusion.deserializeBinaryFromReader = funct
2110
2140
  msg.setReason(value);
2111
2141
  break;
2112
2142
  case 3:
2113
- var value = /** @type {!proto.lansweeper.scanningconfig.v1.Exclusion.ExclusionType} */ (reader.readEnum());
2114
- msg.setType(value);
2143
+ var value = /** @type {string} */ (reader.readString());
2144
+ msg.addSensorIds(value);
2115
2145
  break;
2116
2146
  case 4:
2117
- var value = /** @type {string} */ (reader.readString());
2118
- msg.setValue(value);
2147
+ var value = new proto.lansweeper.scanningconfig.v1.Target;
2148
+ reader.readMessage(value,proto.lansweeper.scanningconfig.v1.Target.deserializeBinaryFromReader);
2149
+ msg.addTargets(value);
2119
2150
  break;
2120
2151
  default:
2121
2152
  reader.skipField();
@@ -2160,31 +2191,24 @@ proto.lansweeper.scanningconfig.v1.Exclusion.serializeBinaryToWriter = function(
2160
2191
  f
2161
2192
  );
2162
2193
  }
2163
- f = message.getType();
2164
- if (f !== 0.0) {
2165
- writer.writeEnum(
2194
+ f = message.getSensorIdsList();
2195
+ if (f.length > 0) {
2196
+ writer.writeRepeatedString(
2166
2197
  3,
2167
2198
  f
2168
2199
  );
2169
2200
  }
2170
- f = message.getValue();
2201
+ f = message.getTargetsList();
2171
2202
  if (f.length > 0) {
2172
- writer.writeString(
2203
+ writer.writeRepeatedMessage(
2173
2204
  4,
2174
- f
2205
+ f,
2206
+ proto.lansweeper.scanningconfig.v1.Target.serializeBinaryToWriter
2175
2207
  );
2176
2208
  }
2177
2209
  };
2178
2210
 
2179
2211
 
2180
- /**
2181
- * @enum {number}
2182
- */
2183
- proto.lansweeper.scanningconfig.v1.Exclusion.ExclusionType = {
2184
- UNSPECIFIED: 0,
2185
- IP_ADDR_RANGE: 1
2186
- };
2187
-
2188
2212
  /**
2189
2213
  * optional string id = 1;
2190
2214
  * @return {string}
@@ -2222,38 +2246,275 @@ proto.lansweeper.scanningconfig.v1.Exclusion.prototype.setReason = function(valu
2222
2246
 
2223
2247
 
2224
2248
  /**
2225
- * optional ExclusionType type = 3;
2226
- * @return {!proto.lansweeper.scanningconfig.v1.Exclusion.ExclusionType}
2249
+ * repeated string sensor_ids = 3;
2250
+ * @return {!Array<string>}
2227
2251
  */
2228
- proto.lansweeper.scanningconfig.v1.Exclusion.prototype.getType = function() {
2229
- return /** @type {!proto.lansweeper.scanningconfig.v1.Exclusion.ExclusionType} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2252
+ proto.lansweeper.scanningconfig.v1.Exclusion.prototype.getSensorIdsList = function() {
2253
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
2230
2254
  };
2231
2255
 
2232
2256
 
2233
2257
  /**
2234
- * @param {!proto.lansweeper.scanningconfig.v1.Exclusion.ExclusionType} value
2258
+ * @param {!Array<string>} value
2235
2259
  * @return {!proto.lansweeper.scanningconfig.v1.Exclusion} returns this
2236
2260
  */
2237
- proto.lansweeper.scanningconfig.v1.Exclusion.prototype.setType = function(value) {
2238
- return jspb.Message.setProto3EnumField(this, 3, value);
2261
+ proto.lansweeper.scanningconfig.v1.Exclusion.prototype.setSensorIdsList = function(value) {
2262
+ return jspb.Message.setField(this, 3, value || []);
2239
2263
  };
2240
2264
 
2241
2265
 
2242
2266
  /**
2243
- * optional string value = 4;
2244
- * @return {string}
2267
+ * @param {string} value
2268
+ * @param {number=} opt_index
2269
+ * @return {!proto.lansweeper.scanningconfig.v1.Exclusion} returns this
2245
2270
  */
2246
- proto.lansweeper.scanningconfig.v1.Exclusion.prototype.getValue = function() {
2247
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2271
+ proto.lansweeper.scanningconfig.v1.Exclusion.prototype.addSensorIds = function(value, opt_index) {
2272
+ return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
2248
2273
  };
2249
2274
 
2250
2275
 
2251
2276
  /**
2252
- * @param {string} value
2277
+ * Clears the list making it empty but non-null.
2253
2278
  * @return {!proto.lansweeper.scanningconfig.v1.Exclusion} returns this
2254
2279
  */
2255
- proto.lansweeper.scanningconfig.v1.Exclusion.prototype.setValue = function(value) {
2256
- return jspb.Message.setProto3StringField(this, 4, value);
2280
+ proto.lansweeper.scanningconfig.v1.Exclusion.prototype.clearSensorIdsList = function() {
2281
+ return this.setSensorIdsList([]);
2282
+ };
2283
+
2284
+
2285
+ /**
2286
+ * repeated Target targets = 4;
2287
+ * @return {!Array<!proto.lansweeper.scanningconfig.v1.Target>}
2288
+ */
2289
+ proto.lansweeper.scanningconfig.v1.Exclusion.prototype.getTargetsList = function() {
2290
+ return /** @type{!Array<!proto.lansweeper.scanningconfig.v1.Target>} */ (
2291
+ jspb.Message.getRepeatedWrapperField(this, proto.lansweeper.scanningconfig.v1.Target, 4));
2292
+ };
2293
+
2294
+
2295
+ /**
2296
+ * @param {!Array<!proto.lansweeper.scanningconfig.v1.Target>} value
2297
+ * @return {!proto.lansweeper.scanningconfig.v1.Exclusion} returns this
2298
+ */
2299
+ proto.lansweeper.scanningconfig.v1.Exclusion.prototype.setTargetsList = function(value) {
2300
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
2301
+ };
2302
+
2303
+
2304
+ /**
2305
+ * @param {!proto.lansweeper.scanningconfig.v1.Target=} opt_value
2306
+ * @param {number=} opt_index
2307
+ * @return {!proto.lansweeper.scanningconfig.v1.Target}
2308
+ */
2309
+ proto.lansweeper.scanningconfig.v1.Exclusion.prototype.addTargets = function(opt_value, opt_index) {
2310
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lansweeper.scanningconfig.v1.Target, opt_index);
2311
+ };
2312
+
2313
+
2314
+ /**
2315
+ * Clears the list making it empty but non-null.
2316
+ * @return {!proto.lansweeper.scanningconfig.v1.Exclusion} returns this
2317
+ */
2318
+ proto.lansweeper.scanningconfig.v1.Exclusion.prototype.clearTargetsList = function() {
2319
+ return this.setTargetsList([]);
2320
+ };
2321
+
2322
+
2323
+
2324
+ /**
2325
+ * List of repeated fields within this message type.
2326
+ * @private {!Array<number>}
2327
+ * @const
2328
+ */
2329
+ proto.lansweeper.scanningconfig.v1.Target.repeatedFields_ = [2];
2330
+
2331
+
2332
+
2333
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2334
+ /**
2335
+ * Creates an object representation of this proto.
2336
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2337
+ * Optional fields that are not set will be set to undefined.
2338
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2339
+ * For the list of reserved names please see:
2340
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2341
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2342
+ * JSPB instance for transitional soy proto support:
2343
+ * http://goto/soy-param-migration
2344
+ * @return {!Object}
2345
+ */
2346
+ proto.lansweeper.scanningconfig.v1.Target.prototype.toObject = function(opt_includeInstance) {
2347
+ return proto.lansweeper.scanningconfig.v1.Target.toObject(opt_includeInstance, this);
2348
+ };
2349
+
2350
+
2351
+ /**
2352
+ * Static version of the {@see toObject} method.
2353
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2354
+ * the JSPB instance for transitional soy proto support:
2355
+ * http://goto/soy-param-migration
2356
+ * @param {!proto.lansweeper.scanningconfig.v1.Target} msg The msg instance to transform.
2357
+ * @return {!Object}
2358
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2359
+ */
2360
+ proto.lansweeper.scanningconfig.v1.Target.toObject = function(includeInstance, msg) {
2361
+ var f, obj = {
2362
+ type: jspb.Message.getFieldWithDefault(msg, 1, 0),
2363
+ valuesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
2364
+ };
2365
+
2366
+ if (includeInstance) {
2367
+ obj.$jspbMessageInstance = msg;
2368
+ }
2369
+ return obj;
2370
+ };
2371
+ }
2372
+
2373
+
2374
+ /**
2375
+ * Deserializes binary data (in protobuf wire format).
2376
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2377
+ * @return {!proto.lansweeper.scanningconfig.v1.Target}
2378
+ */
2379
+ proto.lansweeper.scanningconfig.v1.Target.deserializeBinary = function(bytes) {
2380
+ var reader = new jspb.BinaryReader(bytes);
2381
+ var msg = new proto.lansweeper.scanningconfig.v1.Target;
2382
+ return proto.lansweeper.scanningconfig.v1.Target.deserializeBinaryFromReader(msg, reader);
2383
+ };
2384
+
2385
+
2386
+ /**
2387
+ * Deserializes binary data (in protobuf wire format) from the
2388
+ * given reader into the given message object.
2389
+ * @param {!proto.lansweeper.scanningconfig.v1.Target} msg The message object to deserialize into.
2390
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2391
+ * @return {!proto.lansweeper.scanningconfig.v1.Target}
2392
+ */
2393
+ proto.lansweeper.scanningconfig.v1.Target.deserializeBinaryFromReader = function(msg, reader) {
2394
+ while (reader.nextField()) {
2395
+ if (reader.isEndGroup()) {
2396
+ break;
2397
+ }
2398
+ var field = reader.getFieldNumber();
2399
+ switch (field) {
2400
+ case 1:
2401
+ var value = /** @type {!proto.lansweeper.scanningconfig.v1.Target.ExclusionType} */ (reader.readEnum());
2402
+ msg.setType(value);
2403
+ break;
2404
+ case 2:
2405
+ var value = /** @type {string} */ (reader.readString());
2406
+ msg.addValues(value);
2407
+ break;
2408
+ default:
2409
+ reader.skipField();
2410
+ break;
2411
+ }
2412
+ }
2413
+ return msg;
2414
+ };
2415
+
2416
+
2417
+ /**
2418
+ * Serializes the message to binary data (in protobuf wire format).
2419
+ * @return {!Uint8Array}
2420
+ */
2421
+ proto.lansweeper.scanningconfig.v1.Target.prototype.serializeBinary = function() {
2422
+ var writer = new jspb.BinaryWriter();
2423
+ proto.lansweeper.scanningconfig.v1.Target.serializeBinaryToWriter(this, writer);
2424
+ return writer.getResultBuffer();
2425
+ };
2426
+
2427
+
2428
+ /**
2429
+ * Serializes the given message to binary data (in protobuf wire
2430
+ * format), writing to the given BinaryWriter.
2431
+ * @param {!proto.lansweeper.scanningconfig.v1.Target} message
2432
+ * @param {!jspb.BinaryWriter} writer
2433
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2434
+ */
2435
+ proto.lansweeper.scanningconfig.v1.Target.serializeBinaryToWriter = function(message, writer) {
2436
+ var f = undefined;
2437
+ f = message.getType();
2438
+ if (f !== 0.0) {
2439
+ writer.writeEnum(
2440
+ 1,
2441
+ f
2442
+ );
2443
+ }
2444
+ f = message.getValuesList();
2445
+ if (f.length > 0) {
2446
+ writer.writeRepeatedString(
2447
+ 2,
2448
+ f
2449
+ );
2450
+ }
2451
+ };
2452
+
2453
+
2454
+ /**
2455
+ * @enum {number}
2456
+ */
2457
+ proto.lansweeper.scanningconfig.v1.Target.ExclusionType = {
2458
+ UNSPECIFIED: 0,
2459
+ IP_ADDR_RANGE: 1,
2460
+ MAC_ADDR: 2,
2461
+ ASSET_TYPE: 3,
2462
+ FQDN: 4,
2463
+ DOMAIN: 5
2464
+ };
2465
+
2466
+ /**
2467
+ * optional ExclusionType type = 1;
2468
+ * @return {!proto.lansweeper.scanningconfig.v1.Target.ExclusionType}
2469
+ */
2470
+ proto.lansweeper.scanningconfig.v1.Target.prototype.getType = function() {
2471
+ return /** @type {!proto.lansweeper.scanningconfig.v1.Target.ExclusionType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2472
+ };
2473
+
2474
+
2475
+ /**
2476
+ * @param {!proto.lansweeper.scanningconfig.v1.Target.ExclusionType} value
2477
+ * @return {!proto.lansweeper.scanningconfig.v1.Target} returns this
2478
+ */
2479
+ proto.lansweeper.scanningconfig.v1.Target.prototype.setType = function(value) {
2480
+ return jspb.Message.setProto3EnumField(this, 1, value);
2481
+ };
2482
+
2483
+
2484
+ /**
2485
+ * repeated string values = 2;
2486
+ * @return {!Array<string>}
2487
+ */
2488
+ proto.lansweeper.scanningconfig.v1.Target.prototype.getValuesList = function() {
2489
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
2490
+ };
2491
+
2492
+
2493
+ /**
2494
+ * @param {!Array<string>} value
2495
+ * @return {!proto.lansweeper.scanningconfig.v1.Target} returns this
2496
+ */
2497
+ proto.lansweeper.scanningconfig.v1.Target.prototype.setValuesList = function(value) {
2498
+ return jspb.Message.setField(this, 2, value || []);
2499
+ };
2500
+
2501
+
2502
+ /**
2503
+ * @param {string} value
2504
+ * @param {number=} opt_index
2505
+ * @return {!proto.lansweeper.scanningconfig.v1.Target} returns this
2506
+ */
2507
+ proto.lansweeper.scanningconfig.v1.Target.prototype.addValues = function(value, opt_index) {
2508
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
2509
+ };
2510
+
2511
+
2512
+ /**
2513
+ * Clears the list making it empty but non-null.
2514
+ * @return {!proto.lansweeper.scanningconfig.v1.Target} returns this
2515
+ */
2516
+ proto.lansweeper.scanningconfig.v1.Target.prototype.clearValuesList = function() {
2517
+ return this.setValuesList([]);
2257
2518
  };
2258
2519
 
2259
2520