@ondewo/csi-client-nodejs
Version:
ONDEWO Communication System Integration (CSI) Client library for Nodejs
485 lines (420 loc) • 15.5 kB
JavaScript
// source: google/cloud/websecurityscanner/v1alpha/scan_run.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() {
if (this) { return this; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
if (typeof self !== 'undefined') { return self; }
return Function('return this')();
}.call(null));
var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js');
goog.object.extend(proto, google_api_annotations_pb);
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
goog.exportSymbol('proto.google.cloud.websecurityscanner.v1alpha.ScanRun', null, global);
goog.exportSymbol('proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState', null, global);
goog.exportSymbol('proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.websecurityscanner.v1alpha.ScanRun, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.displayName = 'proto.google.cloud.websecurityscanner.v1alpha.ScanRun';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.toObject = function(opt_includeInstance) {
return proto.google.cloud.websecurityscanner.v1alpha.ScanRun.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
executionState: jspb.Message.getFieldWithDefault(msg, 2, 0),
resultState: jspb.Message.getFieldWithDefault(msg, 3, 0),
startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
endTime: (f = msg.getEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
urlsCrawledCount: jspb.Message.getFieldWithDefault(msg, 6, 0),
urlsTestedCount: jspb.Message.getFieldWithDefault(msg, 7, 0),
hasVulnerabilities: jspb.Message.getBooleanFieldWithDefault(msg, 8, false),
progressPercent: jspb.Message.getFieldWithDefault(msg, 9, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.cloud.websecurityscanner.v1alpha.ScanRun;
return proto.google.cloud.websecurityscanner.v1alpha.ScanRun.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = /** @type {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState} */ (reader.readEnum());
msg.setExecutionState(value);
break;
case 3:
var value = /** @type {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState} */ (reader.readEnum());
msg.setResultState(value);
break;
case 4:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setStartTime(value);
break;
case 5:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setEndTime(value);
break;
case 6:
var value = /** @type {number} */ (reader.readInt64());
msg.setUrlsCrawledCount(value);
break;
case 7:
var value = /** @type {number} */ (reader.readInt64());
msg.setUrlsTestedCount(value);
break;
case 8:
var value = /** @type {boolean} */ (reader.readBool());
msg.setHasVulnerabilities(value);
break;
case 9:
var value = /** @type {number} */ (reader.readInt32());
msg.setProgressPercent(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getExecutionState();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getResultState();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
f = message.getStartTime();
if (f != null) {
writer.writeMessage(
4,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getEndTime();
if (f != null) {
writer.writeMessage(
5,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getUrlsCrawledCount();
if (f !== 0) {
writer.writeInt64(
6,
f
);
}
f = message.getUrlsTestedCount();
if (f !== 0) {
writer.writeInt64(
7,
f
);
}
f = message.getHasVulnerabilities();
if (f) {
writer.writeBool(
8,
f
);
}
f = message.getProgressPercent();
if (f !== 0) {
writer.writeInt32(
9,
f
);
}
};
/**
* @enum {number}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState = {
EXECUTION_STATE_UNSPECIFIED: 0,
QUEUED: 1,
SCANNING: 2,
FINISHED: 3
};
/**
* @enum {number}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState = {
RESULT_STATE_UNSPECIFIED: 0,
SUCCESS: 1,
ERROR: 2,
KILLED: 3
};
/**
* optional string name = 1;
* @return {string}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} returns this
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional ExecutionState execution_state = 2;
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.getExecutionState = function() {
return /** @type {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState} value
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} returns this
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.setExecutionState = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional ResultState result_state = 3;
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.getResultState = function() {
return /** @type {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState} value
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} returns this
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.setResultState = function(value) {
return jspb.Message.setProto3EnumField(this, 3, value);
};
/**
* optional google.protobuf.Timestamp start_time = 4;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.getStartTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} returns this
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.setStartTime = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} returns this
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.clearStartTime = function() {
return this.setStartTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.hasStartTime = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional google.protobuf.Timestamp end_time = 5;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.getEndTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} returns this
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.setEndTime = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} returns this
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.clearEndTime = function() {
return this.setEndTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.hasEndTime = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional int64 urls_crawled_count = 6;
* @return {number}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.getUrlsCrawledCount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {number} value
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} returns this
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.setUrlsCrawledCount = function(value) {
return jspb.Message.setProto3IntField(this, 6, value);
};
/**
* optional int64 urls_tested_count = 7;
* @return {number}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.getUrlsTestedCount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {number} value
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} returns this
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.setUrlsTestedCount = function(value) {
return jspb.Message.setProto3IntField(this, 7, value);
};
/**
* optional bool has_vulnerabilities = 8;
* @return {boolean}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.getHasVulnerabilities = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));
};
/**
* @param {boolean} value
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} returns this
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.setHasVulnerabilities = function(value) {
return jspb.Message.setProto3BooleanField(this, 8, value);
};
/**
* optional int32 progress_percent = 9;
* @return {number}
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.getProgressPercent = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
};
/**
* @param {number} value
* @return {!proto.google.cloud.websecurityscanner.v1alpha.ScanRun} returns this
*/
proto.google.cloud.websecurityscanner.v1alpha.ScanRun.prototype.setProgressPercent = function(value) {
return jspb.Message.setProto3IntField(this, 9, value);
};
goog.object.extend(exports, proto.google.cloud.websecurityscanner.v1alpha);