spot-sdk-js
Version:
Develop applications and payloads for Spot using the unofficial Boston Dynamics Spot Node.js SDK.
2,201 lines • 70.1 kB
JavaScript
// source: bosdyn/api/network_compute_bridge.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('return this')();
var bosdyn_api_header_pb = require('../../bosdyn/api/header_pb.js');
goog.object.extend(proto, bosdyn_api_header_pb);
var bosdyn_api_image_pb = require('../../bosdyn/api/image_pb.js');
goog.object.extend(proto, bosdyn_api_image_pb);
var bosdyn_api_world_object_pb = require('../../bosdyn/api/world_object_pb.js');
goog.object.extend(proto, bosdyn_api_world_object_pb);
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
goog.exportSymbol('proto.bosdyn.api.ImageSourceAndService', null, global);
goog.exportSymbol('proto.bosdyn.api.ListAvailableModelsRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.ListAvailableModelsResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.ListAvailableModelsStatus', null, global);
goog.exportSymbol('proto.bosdyn.api.ModelLabels', null, global);
goog.exportSymbol('proto.bosdyn.api.NetworkComputeInputData', null, global);
goog.exportSymbol('proto.bosdyn.api.NetworkComputeInputData.InputCase', null, global);
goog.exportSymbol('proto.bosdyn.api.NetworkComputeInputData.RotateImage', null, global);
goog.exportSymbol('proto.bosdyn.api.NetworkComputeRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.NetworkComputeResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.NetworkComputeServerConfiguration', null, global);
goog.exportSymbol('proto.bosdyn.api.NetworkComputeStatus', 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.bosdyn.api.ListAvailableModelsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.ListAvailableModelsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ListAvailableModelsRequest.displayName = 'proto.bosdyn.api.ListAvailableModelsRequest';
}
/**
* 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.bosdyn.api.ListAvailableModelsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.ListAvailableModelsResponse.repeatedFields_, null);
};
goog.inherits(proto.bosdyn.api.ListAvailableModelsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ListAvailableModelsResponse.displayName = 'proto.bosdyn.api.ListAvailableModelsResponse';
}
/**
* 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.bosdyn.api.ModelLabels = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.ModelLabels.repeatedFields_, null);
};
goog.inherits(proto.bosdyn.api.ModelLabels, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ModelLabels.displayName = 'proto.bosdyn.api.ModelLabels';
}
/**
* 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.bosdyn.api.NetworkComputeRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.NetworkComputeRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.NetworkComputeRequest.displayName = 'proto.bosdyn.api.NetworkComputeRequest';
}
/**
* 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.bosdyn.api.ImageSourceAndService = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.ImageSourceAndService, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ImageSourceAndService.displayName = 'proto.bosdyn.api.ImageSourceAndService';
}
/**
* 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.bosdyn.api.NetworkComputeInputData = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.NetworkComputeInputData.oneofGroups_);
};
goog.inherits(proto.bosdyn.api.NetworkComputeInputData, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.NetworkComputeInputData.displayName = 'proto.bosdyn.api.NetworkComputeInputData';
}
/**
* 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.bosdyn.api.NetworkComputeServerConfiguration = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.NetworkComputeServerConfiguration, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.NetworkComputeServerConfiguration.displayName = 'proto.bosdyn.api.NetworkComputeServerConfiguration';
}
/**
* 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.bosdyn.api.NetworkComputeResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.NetworkComputeResponse.repeatedFields_, null);
};
goog.inherits(proto.bosdyn.api.NetworkComputeResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.NetworkComputeResponse.displayName = 'proto.bosdyn.api.NetworkComputeResponse';
}
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.bosdyn.api.ListAvailableModelsRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ListAvailableModelsRequest.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.bosdyn.api.ListAvailableModelsRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListAvailableModelsRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
serverConfig: (f = msg.getServerConfig()) && proto.bosdyn.api.NetworkComputeServerConfiguration.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.ListAvailableModelsRequest}
*/
proto.bosdyn.api.ListAvailableModelsRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ListAvailableModelsRequest;
return proto.bosdyn.api.ListAvailableModelsRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ListAvailableModelsRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ListAvailableModelsRequest}
*/
proto.bosdyn.api.ListAvailableModelsRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_header_pb.RequestHeader;
reader.readMessage(value,bosdyn_api_header_pb.RequestHeader.deserializeBinaryFromReader);
msg.setHeader(value);
break;
case 2:
var value = new proto.bosdyn.api.NetworkComputeServerConfiguration;
reader.readMessage(value,proto.bosdyn.api.NetworkComputeServerConfiguration.deserializeBinaryFromReader);
msg.setServerConfig(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.ListAvailableModelsRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ListAvailableModelsRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.ListAvailableModelsRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListAvailableModelsRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHeader();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_header_pb.RequestHeader.serializeBinaryToWriter
);
}
f = message.getServerConfig();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.NetworkComputeServerConfiguration.serializeBinaryToWriter
);
}
};
/**
* optional RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.ListAvailableModelsRequest.prototype.getHeader = function() {
return /** @type{?proto.bosdyn.api.RequestHeader} */ (
jspb.Message.getWrapperField(this, bosdyn_api_header_pb.RequestHeader, 1));
};
/**
* @param {?proto.bosdyn.api.RequestHeader|undefined} value
* @return {!proto.bosdyn.api.ListAvailableModelsRequest} returns this
*/
proto.bosdyn.api.ListAvailableModelsRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ListAvailableModelsRequest} returns this
*/
proto.bosdyn.api.ListAvailableModelsRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ListAvailableModelsRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional NetworkComputeServerConfiguration server_config = 2;
* @return {?proto.bosdyn.api.NetworkComputeServerConfiguration}
*/
proto.bosdyn.api.ListAvailableModelsRequest.prototype.getServerConfig = function() {
return /** @type{?proto.bosdyn.api.NetworkComputeServerConfiguration} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.NetworkComputeServerConfiguration, 2));
};
/**
* @param {?proto.bosdyn.api.NetworkComputeServerConfiguration|undefined} value
* @return {!proto.bosdyn.api.ListAvailableModelsRequest} returns this
*/
proto.bosdyn.api.ListAvailableModelsRequest.prototype.setServerConfig = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ListAvailableModelsRequest} returns this
*/
proto.bosdyn.api.ListAvailableModelsRequest.prototype.clearServerConfig = function() {
return this.setServerConfig(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ListAvailableModelsRequest.prototype.hasServerConfig = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.bosdyn.api.ListAvailableModelsResponse.repeatedFields_ = [2,6];
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.bosdyn.api.ListAvailableModelsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ListAvailableModelsResponse.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.bosdyn.api.ListAvailableModelsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListAvailableModelsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f),
availableModelsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
labelsList: jspb.Message.toObjectList(msg.getLabelsList(),
proto.bosdyn.api.ModelLabels.toObject, includeInstance),
status: jspb.Message.getFieldWithDefault(msg, 5, 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.bosdyn.api.ListAvailableModelsResponse}
*/
proto.bosdyn.api.ListAvailableModelsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ListAvailableModelsResponse;
return proto.bosdyn.api.ListAvailableModelsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ListAvailableModelsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ListAvailableModelsResponse}
*/
proto.bosdyn.api.ListAvailableModelsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_header_pb.ResponseHeader;
reader.readMessage(value,bosdyn_api_header_pb.ResponseHeader.deserializeBinaryFromReader);
msg.setHeader(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.addAvailableModels(value);
break;
case 6:
var value = new proto.bosdyn.api.ModelLabels;
reader.readMessage(value,proto.bosdyn.api.ModelLabels.deserializeBinaryFromReader);
msg.addLabels(value);
break;
case 5:
var value = /** @type {!proto.bosdyn.api.ListAvailableModelsStatus} */ (reader.readEnum());
msg.setStatus(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ListAvailableModelsResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.ListAvailableModelsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListAvailableModelsResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHeader();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_header_pb.ResponseHeader.serializeBinaryToWriter
);
}
f = message.getAvailableModelsList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = message.getLabelsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
6,
f,
proto.bosdyn.api.ModelLabels.serializeBinaryToWriter
);
}
f = message.getStatus();
if (f !== 0.0) {
writer.writeEnum(
5,
f
);
}
};
/**
* optional ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.getHeader = function() {
return /** @type{?proto.bosdyn.api.ResponseHeader} */ (
jspb.Message.getWrapperField(this, bosdyn_api_header_pb.ResponseHeader, 1));
};
/**
* @param {?proto.bosdyn.api.ResponseHeader|undefined} value
* @return {!proto.bosdyn.api.ListAvailableModelsResponse} returns this
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ListAvailableModelsResponse} returns this
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* repeated string available_models = 2;
* @return {!Array<string>}
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.getAvailableModelsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/**
* @param {!Array<string>} value
* @return {!proto.bosdyn.api.ListAvailableModelsResponse} returns this
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.setAvailableModelsList = function(value) {
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.ListAvailableModelsResponse} returns this
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.addAvailableModels = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.ListAvailableModelsResponse} returns this
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.clearAvailableModelsList = function() {
return this.setAvailableModelsList([]);
};
/**
* repeated ModelLabels labels = 6;
* @return {!Array<!proto.bosdyn.api.ModelLabels>}
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.getLabelsList = function() {
return /** @type{!Array<!proto.bosdyn.api.ModelLabels>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.bosdyn.api.ModelLabels, 6));
};
/**
* @param {!Array<!proto.bosdyn.api.ModelLabels>} value
* @return {!proto.bosdyn.api.ListAvailableModelsResponse} returns this
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.setLabelsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 6, value);
};
/**
* @param {!proto.bosdyn.api.ModelLabels=} opt_value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.ModelLabels}
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.addLabels = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.bosdyn.api.ModelLabels, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.ListAvailableModelsResponse} returns this
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.clearLabelsList = function() {
return this.setLabelsList([]);
};
/**
* optional ListAvailableModelsStatus status = 5;
* @return {!proto.bosdyn.api.ListAvailableModelsStatus}
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.getStatus = function() {
return /** @type {!proto.bosdyn.api.ListAvailableModelsStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {!proto.bosdyn.api.ListAvailableModelsStatus} value
* @return {!proto.bosdyn.api.ListAvailableModelsResponse} returns this
*/
proto.bosdyn.api.ListAvailableModelsResponse.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 5, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.bosdyn.api.ModelLabels.repeatedFields_ = [2];
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.bosdyn.api.ModelLabels.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ModelLabels.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.bosdyn.api.ModelLabels} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ModelLabels.toObject = function(includeInstance, msg) {
var f, obj = {
modelName: jspb.Message.getFieldWithDefault(msg, 1, ""),
availableLabelsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.ModelLabels}
*/
proto.bosdyn.api.ModelLabels.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ModelLabels;
return proto.bosdyn.api.ModelLabels.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ModelLabels} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ModelLabels}
*/
proto.bosdyn.api.ModelLabels.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.setModelName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.addAvailableLabels(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.ModelLabels.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ModelLabels.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.ModelLabels} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ModelLabels.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getModelName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getAvailableLabelsList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
};
/**
* optional string model_name = 1;
* @return {string}
*/
proto.bosdyn.api.ModelLabels.prototype.getModelName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.ModelLabels} returns this
*/
proto.bosdyn.api.ModelLabels.prototype.setModelName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* repeated string available_labels = 2;
* @return {!Array<string>}
*/
proto.bosdyn.api.ModelLabels.prototype.getAvailableLabelsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/**
* @param {!Array<string>} value
* @return {!proto.bosdyn.api.ModelLabels} returns this
*/
proto.bosdyn.api.ModelLabels.prototype.setAvailableLabelsList = function(value) {
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.ModelLabels} returns this
*/
proto.bosdyn.api.ModelLabels.prototype.addAvailableLabels = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.ModelLabels} returns this
*/
proto.bosdyn.api.ModelLabels.prototype.clearAvailableLabelsList = function() {
return this.setAvailableLabelsList([]);
};
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.bosdyn.api.NetworkComputeRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.NetworkComputeRequest.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.bosdyn.api.NetworkComputeRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.NetworkComputeRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
inputData: (f = msg.getInputData()) && proto.bosdyn.api.NetworkComputeInputData.toObject(includeInstance, f),
serverConfig: (f = msg.getServerConfig()) && proto.bosdyn.api.NetworkComputeServerConfiguration.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.NetworkComputeRequest}
*/
proto.bosdyn.api.NetworkComputeRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.NetworkComputeRequest;
return proto.bosdyn.api.NetworkComputeRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.NetworkComputeRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.NetworkComputeRequest}
*/
proto.bosdyn.api.NetworkComputeRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_header_pb.RequestHeader;
reader.readMessage(value,bosdyn_api_header_pb.RequestHeader.deserializeBinaryFromReader);
msg.setHeader(value);
break;
case 2:
var value = new proto.bosdyn.api.NetworkComputeInputData;
reader.readMessage(value,proto.bosdyn.api.NetworkComputeInputData.deserializeBinaryFromReader);
msg.setInputData(value);
break;
case 3:
var value = new proto.bosdyn.api.NetworkComputeServerConfiguration;
reader.readMessage(value,proto.bosdyn.api.NetworkComputeServerConfiguration.deserializeBinaryFromReader);
msg.setServerConfig(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.NetworkComputeRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.NetworkComputeRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.NetworkComputeRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHeader();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_header_pb.RequestHeader.serializeBinaryToWriter
);
}
f = message.getInputData();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.NetworkComputeInputData.serializeBinaryToWriter
);
}
f = message.getServerConfig();
if (f != null) {
writer.writeMessage(
3,
f,
proto.bosdyn.api.NetworkComputeServerConfiguration.serializeBinaryToWriter
);
}
};
/**
* optional RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.getHeader = function() {
return /** @type{?proto.bosdyn.api.RequestHeader} */ (
jspb.Message.getWrapperField(this, bosdyn_api_header_pb.RequestHeader, 1));
};
/**
* @param {?proto.bosdyn.api.RequestHeader|undefined} value
* @return {!proto.bosdyn.api.NetworkComputeRequest} returns this
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.NetworkComputeRequest} returns this
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional NetworkComputeInputData input_data = 2;
* @return {?proto.bosdyn.api.NetworkComputeInputData}
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.getInputData = function() {
return /** @type{?proto.bosdyn.api.NetworkComputeInputData} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.NetworkComputeInputData, 2));
};
/**
* @param {?proto.bosdyn.api.NetworkComputeInputData|undefined} value
* @return {!proto.bosdyn.api.NetworkComputeRequest} returns this
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.setInputData = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.NetworkComputeRequest} returns this
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.clearInputData = function() {
return this.setInputData(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.hasInputData = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional NetworkComputeServerConfiguration server_config = 3;
* @return {?proto.bosdyn.api.NetworkComputeServerConfiguration}
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.getServerConfig = function() {
return /** @type{?proto.bosdyn.api.NetworkComputeServerConfiguration} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.NetworkComputeServerConfiguration, 3));
};
/**
* @param {?proto.bosdyn.api.NetworkComputeServerConfiguration|undefined} value
* @return {!proto.bosdyn.api.NetworkComputeRequest} returns this
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.setServerConfig = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.NetworkComputeRequest} returns this
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.clearServerConfig = function() {
return this.setServerConfig(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.NetworkComputeRequest.prototype.hasServerConfig = function() {
return jspb.Message.getField(this, 3) != null;
};
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.bosdyn.api.ImageSourceAndService.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ImageSourceAndService.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.bosdyn.api.ImageSourceAndService} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ImageSourceAndService.toObject = function(includeInstance, msg) {
var f, obj = {
imageSource: jspb.Message.getFieldWithDefault(msg, 1, ""),
imageService: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.ImageSourceAndService}
*/
proto.bosdyn.api.ImageSourceAndService.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ImageSourceAndService;
return proto.bosdyn.api.ImageSourceAndService.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ImageSourceAndService} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ImageSourceAndService}
*/
proto.bosdyn.api.ImageSourceAndService.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.setImageSource(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setImageService(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.ImageSourceAndService.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ImageSourceAndService.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.ImageSourceAndService} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ImageSourceAndService.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getImageSource();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getImageService();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string image_source = 1;
* @return {string}
*/
proto.bosdyn.api.ImageSourceAndService.prototype.getImageSource = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.ImageSourceAndService} returns this
*/
proto.bosdyn.api.ImageSourceAndService.prototype.setImageSource = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string image_service = 2;
* @return {string}
*/
proto.bosdyn.api.ImageSourceAndService.prototype.getImageService = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.ImageSourceAndService} returns this
*/
proto.bosdyn.api.ImageSourceAndService.prototype.setImageService = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.bosdyn.api.NetworkComputeInputData.oneofGroups_ = [[7,2]];
/**
* @enum {number}
*/
proto.bosdyn.api.NetworkComputeInputData.InputCase = {
INPUT_NOT_SET: 0,
IMAGE_SOURCE_AND_SERVICE: 7,
IMAGE: 2
};
/**
* @return {proto.bosdyn.api.NetworkComputeInputData.InputCase}
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.getInputCase = function() {
return /** @type {proto.bosdyn.api.NetworkComputeInputData.InputCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.NetworkComputeInputData.oneofGroups_[0]));
};
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.bosdyn.api.NetworkComputeInputData.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.NetworkComputeInputData.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.bosdyn.api.NetworkComputeInputData} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.NetworkComputeInputData.toObject = function(includeInstance, msg) {
var f, obj = {
imageSourceAndService: (f = msg.getImageSourceAndService()) && proto.bosdyn.api.ImageSourceAndService.toObject(includeInstance, f),
image: (f = msg.getImage()) && bosdyn_api_image_pb.Image.toObject(includeInstance, f),
otherData: (f = msg.getOtherData()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
modelName: jspb.Message.getFieldWithDefault(msg, 4, ""),
minConfidence: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0),
rotateImage: jspb.Message.getFieldWithDefault(msg, 6, 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.bosdyn.api.NetworkComputeInputData}
*/
proto.bosdyn.api.NetworkComputeInputData.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.NetworkComputeInputData;
return proto.bosdyn.api.NetworkComputeInputData.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.NetworkComputeInputData} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.NetworkComputeInputData}
*/
proto.bosdyn.api.NetworkComputeInputData.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 7:
var value = new proto.bosdyn.api.ImageSourceAndService;
reader.readMessage(value,proto.bosdyn.api.ImageSourceAndService.deserializeBinaryFromReader);
msg.setImageSourceAndService(value);
break;
case 2:
var value = new bosdyn_api_image_pb.Image;
reader.readMessage(value,bosdyn_api_image_pb.Image.deserializeBinaryFromReader);
msg.setImage(value);
break;
case 3:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.setOtherData(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setModelName(value);
break;
case 5:
var value = /** @type {number} */ (reader.readFloat());
msg.setMinConfidence(value);
break;
case 6:
var value = /** @type {!proto.bosdyn.api.NetworkComputeInputData.RotateImage} */ (reader.readEnum());
msg.setRotateImage(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.NetworkComputeInputData.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.NetworkComputeInputData} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.NetworkComputeInputData.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getImageSourceAndService();
if (f != null) {
writer.writeMessage(
7,
f,
proto.bosdyn.api.ImageSourceAndService.serializeBinaryToWriter
);
}
f = message.getImage();
if (f != null) {
writer.writeMessage(
2,
f,
bosdyn_api_image_pb.Image.serializeBinaryToWriter
);
}
f = message.getOtherData();
if (f != null) {
writer.writeMessage(
3,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
f = message.getModelName();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getMinConfidence();
if (f !== 0.0) {
writer.writeFloat(
5,
f
);
}
f = message.getRotateImage();
if (f !== 0.0) {
writer.writeEnum(
6,
f
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.NetworkComputeInputData.RotateImage = {
ROTATE_IMAGE_UNKNOWN: 0,
ROTATE_IMAGE_NO_ROTATION: 3,
ROTATE_IMAGE_ALIGN_HORIZONTAL: 1,
ROTATE_IMAGE_ALIGN_WITH_BODY: 2
};
/**
* optional ImageSourceAndService image_source_and_service = 7;
* @return {?proto.bosdyn.api.ImageSourceAndService}
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.getImageSourceAndService = function() {
return /** @type{?proto.bosdyn.api.ImageSourceAndService} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.ImageSourceAndService, 7));
};
/**
* @param {?proto.bosdyn.api.ImageSourceAndService|undefined} value
* @return {!proto.bosdyn.api.NetworkComputeInputData} returns this
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.setImageSourceAndService = function(value) {
return jspb.Message.setOneofWrapperField(this, 7, proto.bosdyn.api.NetworkComputeInputData.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.NetworkComputeInputData} returns this
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.clearImageSourceAndService = function() {
return this.setImageSourceAndService(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.hasImageSourceAndService = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional Image image = 2;
* @return {?proto.bosdyn.api.Image}
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.getImage = function() {
return /** @type{?proto.bosdyn.api.Image} */ (
jspb.Message.getWrapperField(this, bosdyn_api_image_pb.Image, 2));
};
/**
* @param {?proto.bosdyn.api.Image|undefined} value
* @return {!proto.bosdyn.api.NetworkComputeInputData} returns this
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.setImage = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.bosdyn.api.NetworkComputeInputData.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.NetworkComputeInputData} returns this
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.clearImage = function() {
return this.setImage(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.hasImage = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional google.protobuf.Any other_data = 3;
* @return {?proto.google.protobuf.Any}
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.getOtherData = function() {
return /** @type{?proto.google.protobuf.Any} */ (
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3));
};
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.bosdyn.api.NetworkComputeInputData} returns this
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.setOtherData = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.NetworkComputeInputData} returns this
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.clearOtherData = function() {
return this.setOtherData(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.hasOtherData = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional string model_name = 4;
* @return {string}
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.getModelName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.NetworkComputeInputData} returns this
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.setModelName = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional float min_confidence = 5;
* @return {number}
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.getMinConfidence = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
};
/**
* @param {number} value
* @return {!proto.bosdyn.api.NetworkComputeInputData} returns this
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.setMinConfidence = function(value) {
return jspb.Message.setProto3FloatField(this, 5, value);
};
/**
* optional RotateImage rotate_image = 6;
* @return {!proto.bosdyn.api.NetworkComputeInputData.RotateImage}
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.getRotateImage = function() {
return /** @type {!proto.bosdyn.api.NetworkComputeInputData.RotateImage} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {!proto.bosdyn.api.NetworkComputeInputData.RotateImage} value
* @return {!proto.bosdyn.api.NetworkComputeInputData} returns this
*/
proto.bosdyn.api.NetworkComputeInputData.prototype.setRotateImage = function(value) {
return jspb.Message.setProto3EnumField(this, 6, value);
};
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.bosdyn.api.NetworkComputeServerConfiguration.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.NetworkComputeServerConfiguration.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.bosdyn.api.NetworkComputeServerConfiguration} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.NetworkComputeServerConfiguration.toObject = function(includeInstance, msg) {
var f, obj = {
serviceName: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.NetworkComputeServerConfiguration}
*/
proto.bosdyn.api.NetworkComputeServerConfiguration.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.NetworkComputeServerConfiguration;
return proto.bosdyn.api.NetworkComputeServerConfiguration.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.NetworkComputeServerConfiguration} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.NetworkComputeServerConfiguration}
*/
proto.bosdyn.api.NetworkComputeServerConfiguration.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setServiceName(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.NetworkComputeServerConfiguration.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.NetworkComputeServerConfiguration.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.NetworkComputeServerConfiguration} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.NetworkComputeServerConfiguration.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getServiceName();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string service_name = 3;
* @return {string}
*/
proto.bosdyn.api.NetworkComputeServerConfiguration.prototype.getServiceName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.NetworkComputeServerConfiguration} returns this
*/
proto.bosdyn.api.NetworkComputeServerConfiguration.prototype.setServiceName = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.bosdyn.api.NetworkComputeResponse.repeatedFields_ = [2];
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.bosdyn.api.NetworkComputeResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.NetworkComputeResponse.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.bosdyn.api.NetworkComputeResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.NetworkComputeResponse.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f),
objectInImageList: jspb.Message.toObjectList(msg.getObjectInImageList(),
bosdyn_api_world_object_pb.WorldObject.toObject, includeInstance),
imageResponse: (f = msg.getImageResponse()) && bosdyn_api_image_pb.ImageResponse.toObject(includeInstance, f),
imageRotationAngle: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0),
otherData: (f = msg.getOtherData()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
status: jspb.Message.getFieldWithDefault(msg, 5, 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.bosdyn.api.NetworkComputeResponse}
*/
proto.bosdyn.api.NetworkComputeResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.NetworkComputeResponse;
return proto.bosdyn.api.NetworkComputeResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.NetworkComputeResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.NetworkComputeResponse}
*/
proto.bosdyn.api.NetworkComputeResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_header_pb.ResponseHeader;
reader.readMessage(value,bosdyn_api_header_pb.ResponseHeader.deserializeBinaryFromReader);
msg.setHeader(value);
break;
case 2:
var value = new bosdyn_api_world_object_pb.WorldObject;
reader.readMessage(value,bosdyn_api_world_object_pb.WorldObject.deserializeBinaryFromReader);
msg.addObjectInImage(value);
break;
case 3:
var value = new bosdyn_api_image_pb.ImageResponse;
reader.readMessage(value,bosdyn_api_image_pb.ImageResponse.deserializeBinaryFromReader);
msg.setImageResponse(value);
break;
case 6:
var value = /** @type {number} */ (reader.readDouble());
msg.setImageRotationAngle(value);
break;
case 4:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.setOtherData(value);
break;
case 5:
var value = /** @type {!proto.bosdyn.api.NetworkComputeStatus} */ (reader.readEnum());
msg.setStatus(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.NetworkComputeResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.NetworkComputeResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.NetworkComputeResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHeader();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_header_pb.ResponseHeader.serializeBinaryToWriter
);
}
f = message.getObjectInImageList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
bosdyn_api_world_object_pb.WorldObject.serializeBinaryToWriter
);
}
f = message.getImageResponse();
if (f != null) {
writer.writeMessage(
3,
f,
bosdyn_api_image_pb.ImageResponse.serializeBinaryToWriter
);
}
f = message.getImageRotationAngle();
if (f !== 0.0) {
writer.writeDouble(
6,
f
);
}
f = message.getOtherData();
if (f != null) {
writer.writeMessage(
4,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
f = message.getStatus();
if (f !== 0.0) {
writer.writeEnum(
5,
f
);
}
};
/**
* optional ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.getHeader = function() {
return /** @type{?proto.bosdyn.api.ResponseHeader} */ (
jspb.Message.getWrapperField(this, bosdyn_api_header_pb.ResponseHeader, 1));
};
/**
* @param {?proto.bosdyn.api.ResponseHeader|undefined} value
* @return {!proto.bosdyn.api.NetworkComputeResponse} returns this
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.NetworkComputeResponse} returns this
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* repeated WorldObject object_in_image = 2;
* @return {!Array<!proto.bosdyn.api.WorldObject>}
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.getObjectInImageList = function() {
return /** @type{!Array<!proto.bosdyn.api.WorldObject>} */ (
jspb.Message.getRepeatedWrapperField(this, bosdyn_api_world_object_pb.WorldObject, 2));
};
/**
* @param {!Array<!proto.bosdyn.api.WorldObject>} value
* @return {!proto.bosdyn.api.NetworkComputeResponse} returns this
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.setObjectInImageList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.bosdyn.api.WorldObject=} opt_value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.WorldObject}
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.addObjectInImage = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.bosdyn.api.WorldObject, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.NetworkComputeResponse} returns this
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.clearObjectInImageList = function() {
return this.setObjectInImageList([]);
};
/**
* optional ImageResponse image_response = 3;
* @return {?proto.bosdyn.api.ImageResponse}
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.getImageResponse = function() {
return /** @type{?proto.bosdyn.api.ImageResponse} */ (
jspb.Message.getWrapperField(this, bosdyn_api_image_pb.ImageResponse, 3));
};
/**
* @param {?proto.bosdyn.api.ImageResponse|undefined} value
* @return {!proto.bosdyn.api.NetworkComputeResponse} returns this
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.setImageResponse = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.NetworkComputeResponse} returns this
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.clearImageResponse = function() {
return this.setImageResponse(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.hasImageResponse = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional double image_rotation_angle = 6;
* @return {number}
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.getImageRotationAngle = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0));
};
/**
* @param {number} value
* @return {!proto.bosdyn.api.NetworkComputeResponse} returns this
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.setImageRotationAngle = function(value) {
return jspb.Message.setProto3FloatField(this, 6, value);
};
/**
* optional google.protobuf.Any other_data = 4;
* @return {?proto.google.protobuf.Any}
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.getOtherData = function() {
return /** @type{?proto.google.protobuf.Any} */ (
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4));
};
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.bosdyn.api.NetworkComputeResponse} returns this
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.setOtherData = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.NetworkComputeResponse} returns this
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.clearOtherData = function() {
return this.setOtherData(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.hasOtherData = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional NetworkComputeStatus status = 5;
* @return {!proto.bosdyn.api.NetworkComputeStatus}
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.getStatus = function() {
return /** @type {!proto.bosdyn.api.NetworkComputeStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {!proto.bosdyn.api.NetworkComputeStatus} value
* @return {!proto.bosdyn.api.NetworkComputeResponse} returns this
*/
proto.bosdyn.api.NetworkComputeResponse.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 5, value);
};
/**
* @enum {number}
*/
proto.bosdyn.api.NetworkComputeStatus = {
NETWORK_COMPUTE_STATUS_UNKNOWN: 0,
NETWORK_COMPUTE_STATUS_SUCCESS: 1,
NETWORK_COMPUTE_STATUS_EXTERNAL_SERVICE_NOT_FOUND: 2,
NETWORK_COMPUTE_STATUS_EXTERNAL_SERVER_ERROR: 3,
NETWORK_COMPUTE_STATUS_ROTATION_ERROR: 4
};
/**
* @enum {number}
*/
proto.bosdyn.api.ListAvailableModelsStatus = {
LIST_AVAILABLE_MODELS_STATUS_UNKNOWN: 0,
LIST_AVAILABLE_MODELS_STATUS_SUCCESS: 1,
LIST_AVAILABLE_MODELS_STATUS_EXTERNAL_SERVICE_NOT_FOUND: 2,
LIST_AVAILABLE_MODELS_STATUS_EXTERNAL_SERVER_ERROR: 3
};
goog.object.extend(exports, proto.bosdyn.api);