spot-sdk-js
Version:
Develop applications and payloads for Spot using the unofficial Boston Dynamics Spot Node.js SDK.
1,335 lines (1,148 loc) • 41.1 kB
JavaScript
// source: bosdyn/api/mission/util.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 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.mission.ConstantValue', null, global);
goog.exportSymbol('proto.bosdyn.api.mission.ConstantValue.ValueCase', null, global);
goog.exportSymbol('proto.bosdyn.api.mission.KeyValue', null, global);
goog.exportSymbol('proto.bosdyn.api.mission.Result', null, global);
goog.exportSymbol('proto.bosdyn.api.mission.UserData', null, global);
goog.exportSymbol('proto.bosdyn.api.mission.Value', null, global);
goog.exportSymbol('proto.bosdyn.api.mission.Value.SourceCase', null, global);
goog.exportSymbol('proto.bosdyn.api.mission.VariableDeclaration', null, global);
goog.exportSymbol('proto.bosdyn.api.mission.VariableDeclaration.Type', 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.mission.KeyValue = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.mission.KeyValue, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.mission.KeyValue.displayName = 'proto.bosdyn.api.mission.KeyValue';
}
/**
* 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.mission.Value = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.mission.Value.oneofGroups_);
};
goog.inherits(proto.bosdyn.api.mission.Value, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.mission.Value.displayName = 'proto.bosdyn.api.mission.Value';
}
/**
* 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.mission.VariableDeclaration = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.mission.VariableDeclaration, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.mission.VariableDeclaration.displayName = 'proto.bosdyn.api.mission.VariableDeclaration';
}
/**
* 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.mission.ConstantValue = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.mission.ConstantValue.oneofGroups_);
};
goog.inherits(proto.bosdyn.api.mission.ConstantValue, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.mission.ConstantValue.displayName = 'proto.bosdyn.api.mission.ConstantValue';
}
/**
* 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.mission.UserData = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.mission.UserData, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.mission.UserData.displayName = 'proto.bosdyn.api.mission.UserData';
}
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.mission.KeyValue.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.mission.KeyValue.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.mission.KeyValue} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.mission.KeyValue.toObject = function(includeInstance, msg) {
var f, obj = {
key: jspb.Message.getFieldWithDefault(msg, 1, ""),
value: (f = msg.getValue()) && proto.bosdyn.api.mission.Value.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.mission.KeyValue}
*/
proto.bosdyn.api.mission.KeyValue.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.mission.KeyValue;
return proto.bosdyn.api.mission.KeyValue.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.mission.KeyValue} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.mission.KeyValue}
*/
proto.bosdyn.api.mission.KeyValue.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.setKey(value);
break;
case 2:
var value = new proto.bosdyn.api.mission.Value;
reader.readMessage(value,proto.bosdyn.api.mission.Value.deserializeBinaryFromReader);
msg.setValue(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.mission.KeyValue.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.mission.KeyValue.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.mission.KeyValue} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.mission.KeyValue.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getKey();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getValue();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.mission.Value.serializeBinaryToWriter
);
}
};
/**
* optional string key = 1;
* @return {string}
*/
proto.bosdyn.api.mission.KeyValue.prototype.getKey = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.mission.KeyValue} returns this
*/
proto.bosdyn.api.mission.KeyValue.prototype.setKey = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional Value value = 2;
* @return {?proto.bosdyn.api.mission.Value}
*/
proto.bosdyn.api.mission.KeyValue.prototype.getValue = function() {
return /** @type{?proto.bosdyn.api.mission.Value} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.mission.Value, 2));
};
/**
* @param {?proto.bosdyn.api.mission.Value|undefined} value
* @return {!proto.bosdyn.api.mission.KeyValue} returns this
*/
proto.bosdyn.api.mission.KeyValue.prototype.setValue = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.mission.KeyValue} returns this
*/
proto.bosdyn.api.mission.KeyValue.prototype.clearValue = function() {
return this.setValue(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.mission.KeyValue.prototype.hasValue = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* 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.mission.Value.oneofGroups_ = [[2,3,4]];
/**
* @enum {number}
*/
proto.bosdyn.api.mission.Value.SourceCase = {
SOURCE_NOT_SET: 0,
CONSTANT: 2,
RUNTIME_VAR: 3,
PARAMETER: 4
};
/**
* @return {proto.bosdyn.api.mission.Value.SourceCase}
*/
proto.bosdyn.api.mission.Value.prototype.getSourceCase = function() {
return /** @type {proto.bosdyn.api.mission.Value.SourceCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.mission.Value.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.mission.Value.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.mission.Value.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.mission.Value} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.mission.Value.toObject = function(includeInstance, msg) {
var f, obj = {
constant: (f = msg.getConstant()) && proto.bosdyn.api.mission.ConstantValue.toObject(includeInstance, f),
runtimeVar: (f = msg.getRuntimeVar()) && proto.bosdyn.api.mission.VariableDeclaration.toObject(includeInstance, f),
parameter: (f = msg.getParameter()) && proto.bosdyn.api.mission.VariableDeclaration.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.mission.Value}
*/
proto.bosdyn.api.mission.Value.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.mission.Value;
return proto.bosdyn.api.mission.Value.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.mission.Value} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.mission.Value}
*/
proto.bosdyn.api.mission.Value.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = new proto.bosdyn.api.mission.ConstantValue;
reader.readMessage(value,proto.bosdyn.api.mission.ConstantValue.deserializeBinaryFromReader);
msg.setConstant(value);
break;
case 3:
var value = new proto.bosdyn.api.mission.VariableDeclaration;
reader.readMessage(value,proto.bosdyn.api.mission.VariableDeclaration.deserializeBinaryFromReader);
msg.setRuntimeVar(value);
break;
case 4:
var value = new proto.bosdyn.api.mission.VariableDeclaration;
reader.readMessage(value,proto.bosdyn.api.mission.VariableDeclaration.deserializeBinaryFromReader);
msg.setParameter(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.mission.Value.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.mission.Value.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.mission.Value} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.mission.Value.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getConstant();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.mission.ConstantValue.serializeBinaryToWriter
);
}
f = message.getRuntimeVar();
if (f != null) {
writer.writeMessage(
3,
f,
proto.bosdyn.api.mission.VariableDeclaration.serializeBinaryToWriter
);
}
f = message.getParameter();
if (f != null) {
writer.writeMessage(
4,
f,
proto.bosdyn.api.mission.VariableDeclaration.serializeBinaryToWriter
);
}
};
/**
* optional ConstantValue constant = 2;
* @return {?proto.bosdyn.api.mission.ConstantValue}
*/
proto.bosdyn.api.mission.Value.prototype.getConstant = function() {
return /** @type{?proto.bosdyn.api.mission.ConstantValue} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.mission.ConstantValue, 2));
};
/**
* @param {?proto.bosdyn.api.mission.ConstantValue|undefined} value
* @return {!proto.bosdyn.api.mission.Value} returns this
*/
proto.bosdyn.api.mission.Value.prototype.setConstant = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.bosdyn.api.mission.Value.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.mission.Value} returns this
*/
proto.bosdyn.api.mission.Value.prototype.clearConstant = function() {
return this.setConstant(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.mission.Value.prototype.hasConstant = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional VariableDeclaration runtime_var = 3;
* @return {?proto.bosdyn.api.mission.VariableDeclaration}
*/
proto.bosdyn.api.mission.Value.prototype.getRuntimeVar = function() {
return /** @type{?proto.bosdyn.api.mission.VariableDeclaration} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.mission.VariableDeclaration, 3));
};
/**
* @param {?proto.bosdyn.api.mission.VariableDeclaration|undefined} value
* @return {!proto.bosdyn.api.mission.Value} returns this
*/
proto.bosdyn.api.mission.Value.prototype.setRuntimeVar = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.bosdyn.api.mission.Value.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.mission.Value} returns this
*/
proto.bosdyn.api.mission.Value.prototype.clearRuntimeVar = function() {
return this.setRuntimeVar(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.mission.Value.prototype.hasRuntimeVar = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional VariableDeclaration parameter = 4;
* @return {?proto.bosdyn.api.mission.VariableDeclaration}
*/
proto.bosdyn.api.mission.Value.prototype.getParameter = function() {
return /** @type{?proto.bosdyn.api.mission.VariableDeclaration} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.mission.VariableDeclaration, 4));
};
/**
* @param {?proto.bosdyn.api.mission.VariableDeclaration|undefined} value
* @return {!proto.bosdyn.api.mission.Value} returns this
*/
proto.bosdyn.api.mission.Value.prototype.setParameter = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.bosdyn.api.mission.Value.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.mission.Value} returns this
*/
proto.bosdyn.api.mission.Value.prototype.clearParameter = function() {
return this.setParameter(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.mission.Value.prototype.hasParameter = function() {
return jspb.Message.getField(this, 4) != 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.mission.VariableDeclaration.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.mission.VariableDeclaration.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.mission.VariableDeclaration} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.mission.VariableDeclaration.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
type: jspb.Message.getFieldWithDefault(msg, 2, 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.mission.VariableDeclaration}
*/
proto.bosdyn.api.mission.VariableDeclaration.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.mission.VariableDeclaration;
return proto.bosdyn.api.mission.VariableDeclaration.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.mission.VariableDeclaration} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.mission.VariableDeclaration}
*/
proto.bosdyn.api.mission.VariableDeclaration.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.bosdyn.api.mission.VariableDeclaration.Type} */ (reader.readEnum());
msg.setType(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.mission.VariableDeclaration.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.mission.VariableDeclaration.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.mission.VariableDeclaration} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.mission.VariableDeclaration.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.mission.VariableDeclaration.Type = {
TYPE_UNKNOWN: 0,
TYPE_FLOAT: 1,
TYPE_STRING: 2,
TYPE_INT: 3,
TYPE_BOOL: 4,
TYPE_MESSAGE: 5
};
/**
* optional string name = 1;
* @return {string}
*/
proto.bosdyn.api.mission.VariableDeclaration.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.mission.VariableDeclaration} returns this
*/
proto.bosdyn.api.mission.VariableDeclaration.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional Type type = 2;
* @return {!proto.bosdyn.api.mission.VariableDeclaration.Type}
*/
proto.bosdyn.api.mission.VariableDeclaration.prototype.getType = function() {
return /** @type {!proto.bosdyn.api.mission.VariableDeclaration.Type} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.bosdyn.api.mission.VariableDeclaration.Type} value
* @return {!proto.bosdyn.api.mission.VariableDeclaration} returns this
*/
proto.bosdyn.api.mission.VariableDeclaration.prototype.setType = function(value) {
return jspb.Message.setProto3EnumField(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.mission.ConstantValue.oneofGroups_ = [[1,2,3,4,5]];
/**
* @enum {number}
*/
proto.bosdyn.api.mission.ConstantValue.ValueCase = {
VALUE_NOT_SET: 0,
FLOAT_VALUE: 1,
STRING_VALUE: 2,
INT_VALUE: 3,
BOOL_VALUE: 4,
MSG_VALUE: 5
};
/**
* @return {proto.bosdyn.api.mission.ConstantValue.ValueCase}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.getValueCase = function() {
return /** @type {proto.bosdyn.api.mission.ConstantValue.ValueCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.mission.ConstantValue.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.mission.ConstantValue.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.mission.ConstantValue.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.mission.ConstantValue} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.mission.ConstantValue.toObject = function(includeInstance, msg) {
var f, obj = {
floatValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
stringValue: jspb.Message.getFieldWithDefault(msg, 2, ""),
intValue: jspb.Message.getFieldWithDefault(msg, 3, 0),
boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
msgValue: (f = msg.getMsgValue()) && google_protobuf_any_pb.Any.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.mission.ConstantValue}
*/
proto.bosdyn.api.mission.ConstantValue.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.mission.ConstantValue;
return proto.bosdyn.api.mission.ConstantValue.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.mission.ConstantValue} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.mission.ConstantValue}
*/
proto.bosdyn.api.mission.ConstantValue.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readDouble());
msg.setFloatValue(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setStringValue(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt64());
msg.setIntValue(value);
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
msg.setBoolValue(value);
break;
case 5:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.setMsgValue(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.mission.ConstantValue.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.mission.ConstantValue} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.mission.ConstantValue.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = /** @type {number} */ (jspb.Message.getField(message, 1));
if (f != null) {
writer.writeDouble(
1,
f
);
}
f = /** @type {string} */ (jspb.Message.getField(message, 2));
if (f != null) {
writer.writeString(
2,
f
);
}
f = /** @type {number} */ (jspb.Message.getField(message, 3));
if (f != null) {
writer.writeInt64(
3,
f
);
}
f = /** @type {boolean} */ (jspb.Message.getField(message, 4));
if (f != null) {
writer.writeBool(
4,
f
);
}
f = message.getMsgValue();
if (f != null) {
writer.writeMessage(
5,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
};
/**
* optional double float_value = 1;
* @return {number}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.getFloatValue = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
};
/**
* @param {number} value
* @return {!proto.bosdyn.api.mission.ConstantValue} returns this
*/
proto.bosdyn.api.mission.ConstantValue.prototype.setFloatValue = function(value) {
return jspb.Message.setOneofField(this, 1, proto.bosdyn.api.mission.ConstantValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bosdyn.api.mission.ConstantValue} returns this
*/
proto.bosdyn.api.mission.ConstantValue.prototype.clearFloatValue = function() {
return jspb.Message.setOneofField(this, 1, proto.bosdyn.api.mission.ConstantValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.hasFloatValue = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string string_value = 2;
* @return {string}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.getStringValue = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.mission.ConstantValue} returns this
*/
proto.bosdyn.api.mission.ConstantValue.prototype.setStringValue = function(value) {
return jspb.Message.setOneofField(this, 2, proto.bosdyn.api.mission.ConstantValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bosdyn.api.mission.ConstantValue} returns this
*/
proto.bosdyn.api.mission.ConstantValue.prototype.clearStringValue = function() {
return jspb.Message.setOneofField(this, 2, proto.bosdyn.api.mission.ConstantValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.hasStringValue = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional int64 int_value = 3;
* @return {number}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.getIntValue = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.bosdyn.api.mission.ConstantValue} returns this
*/
proto.bosdyn.api.mission.ConstantValue.prototype.setIntValue = function(value) {
return jspb.Message.setOneofField(this, 3, proto.bosdyn.api.mission.ConstantValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bosdyn.api.mission.ConstantValue} returns this
*/
proto.bosdyn.api.mission.ConstantValue.prototype.clearIntValue = function() {
return jspb.Message.setOneofField(this, 3, proto.bosdyn.api.mission.ConstantValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.hasIntValue = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional bool bool_value = 4;
* @return {boolean}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.getBoolValue = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.mission.ConstantValue} returns this
*/
proto.bosdyn.api.mission.ConstantValue.prototype.setBoolValue = function(value) {
return jspb.Message.setOneofField(this, 4, proto.bosdyn.api.mission.ConstantValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bosdyn.api.mission.ConstantValue} returns this
*/
proto.bosdyn.api.mission.ConstantValue.prototype.clearBoolValue = function() {
return jspb.Message.setOneofField(this, 4, proto.bosdyn.api.mission.ConstantValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.hasBoolValue = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional google.protobuf.Any msg_value = 5;
* @return {?proto.google.protobuf.Any}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.getMsgValue = function() {
return /** @type{?proto.google.protobuf.Any} */ (
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 5));
};
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.bosdyn.api.mission.ConstantValue} returns this
*/
proto.bosdyn.api.mission.ConstantValue.prototype.setMsgValue = function(value) {
return jspb.Message.setOneofWrapperField(this, 5, proto.bosdyn.api.mission.ConstantValue.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.mission.ConstantValue} returns this
*/
proto.bosdyn.api.mission.ConstantValue.prototype.clearMsgValue = function() {
return this.setMsgValue(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.mission.ConstantValue.prototype.hasMsgValue = function() {
return jspb.Message.getField(this, 5) != 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.mission.UserData.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.mission.UserData.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.mission.UserData} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.mission.UserData.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
bytestring: msg.getBytestring_asB64()
};
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.mission.UserData}
*/
proto.bosdyn.api.mission.UserData.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.mission.UserData;
return proto.bosdyn.api.mission.UserData.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.mission.UserData} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.mission.UserData}
*/
proto.bosdyn.api.mission.UserData.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.setId(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setBytestring(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.mission.UserData.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.mission.UserData.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.mission.UserData} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.mission.UserData.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getBytestring_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.bosdyn.api.mission.UserData.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.mission.UserData} returns this
*/
proto.bosdyn.api.mission.UserData.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional bytes bytestring = 3;
* @return {!(string|Uint8Array)}
*/
proto.bosdyn.api.mission.UserData.prototype.getBytestring = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes bytestring = 3;
* This is a type-conversion wrapper around `getBytestring()`
* @return {string}
*/
proto.bosdyn.api.mission.UserData.prototype.getBytestring_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getBytestring()));
};
/**
* optional bytes bytestring = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getBytestring()`
* @return {!Uint8Array}
*/
proto.bosdyn.api.mission.UserData.prototype.getBytestring_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getBytestring()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.bosdyn.api.mission.UserData} returns this
*/
proto.bosdyn.api.mission.UserData.prototype.setBytestring = function(value) {
return jspb.Message.setProto3BytesField(this, 3, value);
};
/**
* @enum {number}
*/
proto.bosdyn.api.mission.Result = {
RESULT_UNKNOWN: 0,
RESULT_FAILURE: 1,
RESULT_RUNNING: 2,
RESULT_SUCCESS: 3,
RESULT_ERROR: 4
};
goog.object.extend(exports, proto.bosdyn.api.mission);