spot-sdk-js
Version:
Develop applications and payloads for Spot using the unofficial Boston Dynamics Spot Node.js SDK.
2,461 lines • 80.8 kB
JavaScript
// source: bosdyn/api/spot/door.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_basic_command_pb = require('../../../bosdyn/api/basic_command_pb.js');
goog.object.extend(proto, bosdyn_api_basic_command_pb);
var bosdyn_api_geometry_pb = require('../../../bosdyn/api/geometry_pb.js');
goog.object.extend(proto, bosdyn_api_geometry_pb);
var bosdyn_api_header_pb = require('../../../bosdyn/api/header_pb.js');
goog.object.extend(proto, bosdyn_api_header_pb);
var bosdyn_api_lease_pb = require('../../../bosdyn/api/lease_pb.js');
goog.object.extend(proto, bosdyn_api_lease_pb);
goog.exportSymbol('proto.bosdyn.api.spot.DoorCommand', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.DoorCommand.AutoPushCommand', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.DoorCommand.Feedback', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.DoorCommand.Feedback.Status', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.DoorCommand.HandleType', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.DoorCommand.HingeSide', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.DoorCommand.Request', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.DoorCommand.Request.CommandCase', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.DoorCommand.SwingDirection', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.DoorCommand.WarmstartCommand', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.OpenDoorCommandRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.OpenDoorCommandResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.OpenDoorCommandResponse.Status', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.OpenDoorFeedbackRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.spot.OpenDoorFeedbackResponse', 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.spot.OpenDoorCommandRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.OpenDoorCommandRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.displayName = 'proto.bosdyn.api.spot.OpenDoorCommandRequest';
}
/**
* 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.spot.OpenDoorCommandResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.OpenDoorCommandResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.displayName = 'proto.bosdyn.api.spot.OpenDoorCommandResponse';
}
/**
* 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.spot.OpenDoorFeedbackRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.OpenDoorFeedbackRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.displayName = 'proto.bosdyn.api.spot.OpenDoorFeedbackRequest';
}
/**
* 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.spot.OpenDoorFeedbackResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.OpenDoorFeedbackResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.displayName = 'proto.bosdyn.api.spot.OpenDoorFeedbackResponse';
}
/**
* 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.spot.DoorCommand = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.DoorCommand, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.DoorCommand.displayName = 'proto.bosdyn.api.spot.DoorCommand';
}
/**
* 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.spot.DoorCommand.AutoGraspCommand = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.displayName = 'proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand';
}
/**
* 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.spot.DoorCommand.WarmstartCommand = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.DoorCommand.WarmstartCommand, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.displayName = 'proto.bosdyn.api.spot.DoorCommand.WarmstartCommand';
}
/**
* 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.spot.DoorCommand.AutoPushCommand = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.DoorCommand.AutoPushCommand, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.displayName = 'proto.bosdyn.api.spot.DoorCommand.AutoPushCommand';
}
/**
* 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.spot.DoorCommand.Request = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.spot.DoorCommand.Request.oneofGroups_);
};
goog.inherits(proto.bosdyn.api.spot.DoorCommand.Request, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.DoorCommand.Request.displayName = 'proto.bosdyn.api.spot.DoorCommand.Request';
}
/**
* 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.spot.DoorCommand.Feedback = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot.DoorCommand.Feedback, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot.DoorCommand.Feedback.displayName = 'proto.bosdyn.api.spot.DoorCommand.Feedback';
}
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.spot.OpenDoorCommandRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.OpenDoorCommandRequest.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.spot.OpenDoorCommandRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
lease: (f = msg.getLease()) && bosdyn_api_lease_pb.Lease.toObject(includeInstance, f),
doorCommand: (f = msg.getDoorCommand()) && proto.bosdyn.api.spot.DoorCommand.Request.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.spot.OpenDoorCommandRequest}
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.OpenDoorCommandRequest;
return proto.bosdyn.api.spot.OpenDoorCommandRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.OpenDoorCommandRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.OpenDoorCommandRequest}
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.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 bosdyn_api_lease_pb.Lease;
reader.readMessage(value,bosdyn_api_lease_pb.Lease.deserializeBinaryFromReader);
msg.setLease(value);
break;
case 4:
var value = new proto.bosdyn.api.spot.DoorCommand.Request;
reader.readMessage(value,proto.bosdyn.api.spot.DoorCommand.Request.deserializeBinaryFromReader);
msg.setDoorCommand(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.OpenDoorCommandRequest.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.spot.OpenDoorCommandRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.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.getLease();
if (f != null) {
writer.writeMessage(
2,
f,
bosdyn_api_lease_pb.Lease.serializeBinaryToWriter
);
}
f = message.getDoorCommand();
if (f != null) {
writer.writeMessage(
4,
f,
proto.bosdyn.api.spot.DoorCommand.Request.serializeBinaryToWriter
);
}
};
/**
* optional bosdyn.api.RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.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.spot.OpenDoorCommandRequest} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.OpenDoorCommandRequest} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional bosdyn.api.Lease lease = 2;
* @return {?proto.bosdyn.api.Lease}
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.getLease = function() {
return /** @type{?proto.bosdyn.api.Lease} */ (
jspb.Message.getWrapperField(this, bosdyn_api_lease_pb.Lease, 2));
};
/**
* @param {?proto.bosdyn.api.Lease|undefined} value
* @return {!proto.bosdyn.api.spot.OpenDoorCommandRequest} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.setLease = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.OpenDoorCommandRequest} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.clearLease = function() {
return this.setLease(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.hasLease = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional DoorCommand.Request door_command = 4;
* @return {?proto.bosdyn.api.spot.DoorCommand.Request}
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.getDoorCommand = function() {
return /** @type{?proto.bosdyn.api.spot.DoorCommand.Request} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot.DoorCommand.Request, 4));
};
/**
* @param {?proto.bosdyn.api.spot.DoorCommand.Request|undefined} value
* @return {!proto.bosdyn.api.spot.OpenDoorCommandRequest} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.setDoorCommand = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.OpenDoorCommandRequest} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.clearDoorCommand = function() {
return this.setDoorCommand(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.OpenDoorCommandRequest.prototype.hasDoorCommand = 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.spot.OpenDoorCommandResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.OpenDoorCommandResponse.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.spot.OpenDoorCommandResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f),
leaseUseResult: (f = msg.getLeaseUseResult()) && bosdyn_api_lease_pb.LeaseUseResult.toObject(includeInstance, f),
status: jspb.Message.getFieldWithDefault(msg, 3, 0),
message: jspb.Message.getFieldWithDefault(msg, 4, ""),
doorCommandId: 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.spot.OpenDoorCommandResponse}
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.OpenDoorCommandResponse;
return proto.bosdyn.api.spot.OpenDoorCommandResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.OpenDoorCommandResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.OpenDoorCommandResponse}
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.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_lease_pb.LeaseUseResult;
reader.readMessage(value,bosdyn_api_lease_pb.LeaseUseResult.deserializeBinaryFromReader);
msg.setLeaseUseResult(value);
break;
case 3:
var value = /** @type {!proto.bosdyn.api.spot.OpenDoorCommandResponse.Status} */ (reader.readEnum());
msg.setStatus(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setMessage(value);
break;
case 5:
var value = /** @type {number} */ (reader.readUint32());
msg.setDoorCommandId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.OpenDoorCommandResponse.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.spot.OpenDoorCommandResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.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.getLeaseUseResult();
if (f != null) {
writer.writeMessage(
2,
f,
bosdyn_api_lease_pb.LeaseUseResult.serializeBinaryToWriter
);
}
f = message.getStatus();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
f = message.getMessage();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getDoorCommandId();
if (f !== 0) {
writer.writeUint32(
5,
f
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.Status = {
STATUS_UNKNOWN: 0,
STATUS_OK: 1,
STATUS_ROBOT_COMMAND_ERROR: 2
};
/**
* optional bosdyn.api.ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.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.spot.OpenDoorCommandResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.OpenDoorCommandResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional bosdyn.api.LeaseUseResult lease_use_result = 2;
* @return {?proto.bosdyn.api.LeaseUseResult}
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.getLeaseUseResult = function() {
return /** @type{?proto.bosdyn.api.LeaseUseResult} */ (
jspb.Message.getWrapperField(this, bosdyn_api_lease_pb.LeaseUseResult, 2));
};
/**
* @param {?proto.bosdyn.api.LeaseUseResult|undefined} value
* @return {!proto.bosdyn.api.spot.OpenDoorCommandResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.setLeaseUseResult = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.OpenDoorCommandResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.clearLeaseUseResult = function() {
return this.setLeaseUseResult(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.hasLeaseUseResult = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional Status status = 3;
* @return {!proto.bosdyn.api.spot.OpenDoorCommandResponse.Status}
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.getStatus = function() {
return /** @type {!proto.bosdyn.api.spot.OpenDoorCommandResponse.Status} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {!proto.bosdyn.api.spot.OpenDoorCommandResponse.Status} value
* @return {!proto.bosdyn.api.spot.OpenDoorCommandResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 3, value);
};
/**
* optional string message = 4;
* @return {string}
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.spot.OpenDoorCommandResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.setMessage = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional uint32 door_command_id = 5;
* @return {number}
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.getDoorCommandId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {number} value
* @return {!proto.bosdyn.api.spot.OpenDoorCommandResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorCommandResponse.prototype.setDoorCommandId = function(value) {
return jspb.Message.setProto3IntField(this, 5, 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.spot.OpenDoorFeedbackRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.OpenDoorFeedbackRequest.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.spot.OpenDoorFeedbackRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
doorCommandId: 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.spot.OpenDoorFeedbackRequest}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.OpenDoorFeedbackRequest;
return proto.bosdyn.api.spot.OpenDoorFeedbackRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.OpenDoorFeedbackRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.OpenDoorFeedbackRequest}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.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 = /** @type {number} */ (reader.readUint32());
msg.setDoorCommandId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.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.spot.OpenDoorFeedbackRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.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.getDoorCommandId();
if (f !== 0) {
writer.writeUint32(
2,
f
);
}
};
/**
* optional bosdyn.api.RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.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.spot.OpenDoorFeedbackRequest} returns this
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.OpenDoorFeedbackRequest} returns this
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional uint32 door_command_id = 2;
* @return {number}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.prototype.getDoorCommandId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.bosdyn.api.spot.OpenDoorFeedbackRequest} returns this
*/
proto.bosdyn.api.spot.OpenDoorFeedbackRequest.prototype.setDoorCommandId = function(value) {
return jspb.Message.setProto3IntField(this, 2, 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.spot.OpenDoorFeedbackResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.OpenDoorFeedbackResponse.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.spot.OpenDoorFeedbackResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f),
status: jspb.Message.getFieldWithDefault(msg, 100, 0),
feedback: (f = msg.getFeedback()) && proto.bosdyn.api.spot.DoorCommand.Feedback.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.spot.OpenDoorFeedbackResponse}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.OpenDoorFeedbackResponse;
return proto.bosdyn.api.spot.OpenDoorFeedbackResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.OpenDoorFeedbackResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.OpenDoorFeedbackResponse}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.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 100:
var value = /** @type {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status} */ (reader.readEnum());
msg.setStatus(value);
break;
case 2:
var value = new proto.bosdyn.api.spot.DoorCommand.Feedback;
reader.readMessage(value,proto.bosdyn.api.spot.DoorCommand.Feedback.deserializeBinaryFromReader);
msg.setFeedback(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.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.spot.OpenDoorFeedbackResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.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.getStatus();
if (f !== 0.0) {
writer.writeEnum(
100,
f
);
}
f = message.getFeedback();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.spot.DoorCommand.Feedback.serializeBinaryToWriter
);
}
};
/**
* optional bosdyn.api.ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.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.spot.OpenDoorFeedbackResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.OpenDoorFeedbackResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional bosdyn.api.RobotCommandFeedbackStatus.Status status = 100;
* @return {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.prototype.getStatus = function() {
return /** @type {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status} */ (jspb.Message.getFieldWithDefault(this, 100, 0));
};
/**
* @param {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status} value
* @return {!proto.bosdyn.api.spot.OpenDoorFeedbackResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 100, value);
};
/**
* optional DoorCommand.Feedback feedback = 2;
* @return {?proto.bosdyn.api.spot.DoorCommand.Feedback}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.prototype.getFeedback = function() {
return /** @type{?proto.bosdyn.api.spot.DoorCommand.Feedback} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot.DoorCommand.Feedback, 2));
};
/**
* @param {?proto.bosdyn.api.spot.DoorCommand.Feedback|undefined} value
* @return {!proto.bosdyn.api.spot.OpenDoorFeedbackResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.prototype.setFeedback = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.OpenDoorFeedbackResponse} returns this
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.prototype.clearFeedback = function() {
return this.setFeedback(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.OpenDoorFeedbackResponse.prototype.hasFeedback = function() {
return jspb.Message.getField(this, 2) != 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.spot.DoorCommand.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.DoorCommand.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.spot.DoorCommand} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.toObject = function(includeInstance, msg) {
var f, obj = {
};
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.spot.DoorCommand}
*/
proto.bosdyn.api.spot.DoorCommand.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.DoorCommand;
return proto.bosdyn.api.spot.DoorCommand.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.DoorCommand} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.DoorCommand}
*/
proto.bosdyn.api.spot.DoorCommand.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.DoorCommand.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.DoorCommand.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.spot.DoorCommand} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* @enum {number}
*/
proto.bosdyn.api.spot.DoorCommand.HingeSide = {
HINGE_SIDE_UNKNOWN: 0,
HINGE_SIDE_LEFT: 1,
HINGE_SIDE_RIGHT: 2
};
/**
* @enum {number}
*/
proto.bosdyn.api.spot.DoorCommand.SwingDirection = {
SWING_DIRECTION_UNKNOWN: 0,
SWING_DIRECTION_INSWING: 1,
SWING_DIRECTION_OUTSWING: 2
};
/**
* @enum {number}
*/
proto.bosdyn.api.spot.DoorCommand.HandleType = {
HANDLE_TYPE_UNKNOWN: 0,
HANDLE_TYPE_LEVER: 1,
HANDLE_TYPE_KNOB: 2,
HANDLE_TYPE_FIXED_GRASP: 3
};
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.spot.DoorCommand.AutoGraspCommand.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.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.spot.DoorCommand.AutoGraspCommand} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.toObject = function(includeInstance, msg) {
var f, obj = {
frameName: jspb.Message.getFieldWithDefault(msg, 1, ""),
searchRayStartInFrame: (f = msg.getSearchRayStartInFrame()) && bosdyn_api_geometry_pb.Vec3.toObject(includeInstance, f),
searchRayEndInFrame: (f = msg.getSearchRayEndInFrame()) && bosdyn_api_geometry_pb.Vec3.toObject(includeInstance, f),
hingeSide: jspb.Message.getFieldWithDefault(msg, 4, 0),
swingDirection: 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.spot.DoorCommand.AutoGraspCommand}
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand;
return proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand}
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.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.setFrameName(value);
break;
case 2:
var value = new bosdyn_api_geometry_pb.Vec3;
reader.readMessage(value,bosdyn_api_geometry_pb.Vec3.deserializeBinaryFromReader);
msg.setSearchRayStartInFrame(value);
break;
case 3:
var value = new bosdyn_api_geometry_pb.Vec3;
reader.readMessage(value,bosdyn_api_geometry_pb.Vec3.deserializeBinaryFromReader);
msg.setSearchRayEndInFrame(value);
break;
case 4:
var value = /** @type {!proto.bosdyn.api.spot.DoorCommand.HingeSide} */ (reader.readEnum());
msg.setHingeSide(value);
break;
case 5:
var value = /** @type {!proto.bosdyn.api.spot.DoorCommand.SwingDirection} */ (reader.readEnum());
msg.setSwingDirection(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.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.spot.DoorCommand.AutoGraspCommand} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFrameName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getSearchRayStartInFrame();
if (f != null) {
writer.writeMessage(
2,
f,
bosdyn_api_geometry_pb.Vec3.serializeBinaryToWriter
);
}
f = message.getSearchRayEndInFrame();
if (f != null) {
writer.writeMessage(
3,
f,
bosdyn_api_geometry_pb.Vec3.serializeBinaryToWriter
);
}
f = message.getHingeSide();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
f = message.getSwingDirection();
if (f !== 0.0) {
writer.writeEnum(
5,
f
);
}
};
/**
* optional string frame_name = 1;
* @return {string}
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.getFrameName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.setFrameName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional bosdyn.api.Vec3 search_ray_start_in_frame = 2;
* @return {?proto.bosdyn.api.Vec3}
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.getSearchRayStartInFrame = function() {
return /** @type{?proto.bosdyn.api.Vec3} */ (
jspb.Message.getWrapperField(this, bosdyn_api_geometry_pb.Vec3, 2));
};
/**
* @param {?proto.bosdyn.api.Vec3|undefined} value
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.setSearchRayStartInFrame = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.clearSearchRayStartInFrame = function() {
return this.setSearchRayStartInFrame(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.hasSearchRayStartInFrame = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional bosdyn.api.Vec3 search_ray_end_in_frame = 3;
* @return {?proto.bosdyn.api.Vec3}
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.getSearchRayEndInFrame = function() {
return /** @type{?proto.bosdyn.api.Vec3} */ (
jspb.Message.getWrapperField(this, bosdyn_api_geometry_pb.Vec3, 3));
};
/**
* @param {?proto.bosdyn.api.Vec3|undefined} value
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.setSearchRayEndInFrame = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.clearSearchRayEndInFrame = function() {
return this.setSearchRayEndInFrame(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.hasSearchRayEndInFrame = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional HingeSide hinge_side = 4;
* @return {!proto.bosdyn.api.spot.DoorCommand.HingeSide}
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.getHingeSide = function() {
return /** @type {!proto.bosdyn.api.spot.DoorCommand.HingeSide} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {!proto.bosdyn.api.spot.DoorCommand.HingeSide} value
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.setHingeSide = function(value) {
return jspb.Message.setProto3EnumField(this, 4, value);
};
/**
* optional SwingDirection swing_direction = 5;
* @return {!proto.bosdyn.api.spot.DoorCommand.SwingDirection}
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.getSwingDirection = function() {
return /** @type {!proto.bosdyn.api.spot.DoorCommand.SwingDirection} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {!proto.bosdyn.api.spot.DoorCommand.SwingDirection} value
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.prototype.setSwingDirection = function(value) {
return jspb.Message.setProto3EnumField(this, 5, 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.spot.DoorCommand.WarmstartCommand.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.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.spot.DoorCommand.WarmstartCommand} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.toObject = function(includeInstance, msg) {
var f, obj = {
hingeSide: jspb.Message.getFieldWithDefault(msg, 1, 0),
swingDirection: jspb.Message.getFieldWithDefault(msg, 2, 0),
handleType: jspb.Message.getFieldWithDefault(msg, 3, 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.spot.DoorCommand.WarmstartCommand}
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.DoorCommand.WarmstartCommand;
return proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.DoorCommand.WarmstartCommand} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.DoorCommand.WarmstartCommand}
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.bosdyn.api.spot.DoorCommand.HingeSide} */ (reader.readEnum());
msg.setHingeSide(value);
break;
case 2:
var value = /** @type {!proto.bosdyn.api.spot.DoorCommand.SwingDirection} */ (reader.readEnum());
msg.setSwingDirection(value);
break;
case 3:
var value = /** @type {!proto.bosdyn.api.spot.DoorCommand.HandleType} */ (reader.readEnum());
msg.setHandleType(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.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.spot.DoorCommand.WarmstartCommand} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHingeSide();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getSwingDirection();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getHandleType();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
};
/**
* optional HingeSide hinge_side = 1;
* @return {!proto.bosdyn.api.spot.DoorCommand.HingeSide}
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.prototype.getHingeSide = function() {
return /** @type {!proto.bosdyn.api.spot.DoorCommand.HingeSide} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.bosdyn.api.spot.DoorCommand.HingeSide} value
* @return {!proto.bosdyn.api.spot.DoorCommand.WarmstartCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.prototype.setHingeSide = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional SwingDirection swing_direction = 2;
* @return {!proto.bosdyn.api.spot.DoorCommand.SwingDirection}
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.prototype.getSwingDirection = function() {
return /** @type {!proto.bosdyn.api.spot.DoorCommand.SwingDirection} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.bosdyn.api.spot.DoorCommand.SwingDirection} value
* @return {!proto.bosdyn.api.spot.DoorCommand.WarmstartCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.prototype.setSwingDirection = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional HandleType handle_type = 3;
* @return {!proto.bosdyn.api.spot.DoorCommand.HandleType}
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.prototype.getHandleType = function() {
return /** @type {!proto.bosdyn.api.spot.DoorCommand.HandleType} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {!proto.bosdyn.api.spot.DoorCommand.HandleType} value
* @return {!proto.bosdyn.api.spot.DoorCommand.WarmstartCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.prototype.setHandleType = function(value) {
return jspb.Message.setProto3EnumField(this, 3, 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.spot.DoorCommand.AutoPushCommand.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.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.spot.DoorCommand.AutoPushCommand} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.toObject = function(includeInstance, msg) {
var f, obj = {
frameName: jspb.Message.getFieldWithDefault(msg, 1, ""),
pushPointInFrame: (f = msg.getPushPointInFrame()) && bosdyn_api_geometry_pb.Vec3.toObject(includeInstance, f),
hingeSide: jspb.Message.getFieldWithDefault(msg, 3, 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.spot.DoorCommand.AutoPushCommand}
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.DoorCommand.AutoPushCommand;
return proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.DoorCommand.AutoPushCommand} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoPushCommand}
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.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.setFrameName(value);
break;
case 2:
var value = new bosdyn_api_geometry_pb.Vec3;
reader.readMessage(value,bosdyn_api_geometry_pb.Vec3.deserializeBinaryFromReader);
msg.setPushPointInFrame(value);
break;
case 3:
var value = /** @type {!proto.bosdyn.api.spot.DoorCommand.HingeSide} */ (reader.readEnum());
msg.setHingeSide(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.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.spot.DoorCommand.AutoPushCommand} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFrameName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getPushPointInFrame();
if (f != null) {
writer.writeMessage(
2,
f,
bosdyn_api_geometry_pb.Vec3.serializeBinaryToWriter
);
}
f = message.getHingeSide();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
};
/**
* optional string frame_name = 1;
* @return {string}
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.prototype.getFrameName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoPushCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.prototype.setFrameName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional bosdyn.api.Vec3 push_point_in_frame = 2;
* @return {?proto.bosdyn.api.Vec3}
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.prototype.getPushPointInFrame = function() {
return /** @type{?proto.bosdyn.api.Vec3} */ (
jspb.Message.getWrapperField(this, bosdyn_api_geometry_pb.Vec3, 2));
};
/**
* @param {?proto.bosdyn.api.Vec3|undefined} value
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoPushCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.prototype.setPushPointInFrame = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoPushCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.prototype.clearPushPointInFrame = function() {
return this.setPushPointInFrame(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.prototype.hasPushPointInFrame = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional HingeSide hinge_side = 3;
* @return {!proto.bosdyn.api.spot.DoorCommand.HingeSide}
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.prototype.getHingeSide = function() {
return /** @type {!proto.bosdyn.api.spot.DoorCommand.HingeSide} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {!proto.bosdyn.api.spot.DoorCommand.HingeSide} value
* @return {!proto.bosdyn.api.spot.DoorCommand.AutoPushCommand} returns this
*/
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.prototype.setHingeSide = function(value) {
return jspb.Message.setProto3EnumField(this, 3, 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.spot.DoorCommand.Request.oneofGroups_ = [[10,11,12]];
/**
* @enum {number}
*/
proto.bosdyn.api.spot.DoorCommand.Request.CommandCase = {
COMMAND_NOT_SET: 0,
AUTO_GRASP_COMMAND: 10,
WARMSTART_COMMAND: 11,
AUTO_PUSH_COMMAND: 12
};
/**
* @return {proto.bosdyn.api.spot.DoorCommand.Request.CommandCase}
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.getCommandCase = function() {
return /** @type {proto.bosdyn.api.spot.DoorCommand.Request.CommandCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.spot.DoorCommand.Request.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.spot.DoorCommand.Request.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.DoorCommand.Request.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.spot.DoorCommand.Request} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.Request.toObject = function(includeInstance, msg) {
var f, obj = {
autoGraspCommand: (f = msg.getAutoGraspCommand()) && proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.toObject(includeInstance, f),
warmstartCommand: (f = msg.getWarmstartCommand()) && proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.toObject(includeInstance, f),
autoPushCommand: (f = msg.getAutoPushCommand()) && proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.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.spot.DoorCommand.Request}
*/
proto.bosdyn.api.spot.DoorCommand.Request.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.DoorCommand.Request;
return proto.bosdyn.api.spot.DoorCommand.Request.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.DoorCommand.Request} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.DoorCommand.Request}
*/
proto.bosdyn.api.spot.DoorCommand.Request.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 10:
var value = new proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand;
reader.readMessage(value,proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.deserializeBinaryFromReader);
msg.setAutoGraspCommand(value);
break;
case 11:
var value = new proto.bosdyn.api.spot.DoorCommand.WarmstartCommand;
reader.readMessage(value,proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.deserializeBinaryFromReader);
msg.setWarmstartCommand(value);
break;
case 12:
var value = new proto.bosdyn.api.spot.DoorCommand.AutoPushCommand;
reader.readMessage(value,proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.deserializeBinaryFromReader);
msg.setAutoPushCommand(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.DoorCommand.Request.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.spot.DoorCommand.Request} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.Request.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAutoGraspCommand();
if (f != null) {
writer.writeMessage(
10,
f,
proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand.serializeBinaryToWriter
);
}
f = message.getWarmstartCommand();
if (f != null) {
writer.writeMessage(
11,
f,
proto.bosdyn.api.spot.DoorCommand.WarmstartCommand.serializeBinaryToWriter
);
}
f = message.getAutoPushCommand();
if (f != null) {
writer.writeMessage(
12,
f,
proto.bosdyn.api.spot.DoorCommand.AutoPushCommand.serializeBinaryToWriter
);
}
};
/**
* optional AutoGraspCommand auto_grasp_command = 10;
* @return {?proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand}
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.getAutoGraspCommand = function() {
return /** @type{?proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand, 10));
};
/**
* @param {?proto.bosdyn.api.spot.DoorCommand.AutoGraspCommand|undefined} value
* @return {!proto.bosdyn.api.spot.DoorCommand.Request} returns this
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.setAutoGraspCommand = function(value) {
return jspb.Message.setOneofWrapperField(this, 10, proto.bosdyn.api.spot.DoorCommand.Request.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.DoorCommand.Request} returns this
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.clearAutoGraspCommand = function() {
return this.setAutoGraspCommand(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.hasAutoGraspCommand = function() {
return jspb.Message.getField(this, 10) != null;
};
/**
* optional WarmstartCommand warmstart_command = 11;
* @return {?proto.bosdyn.api.spot.DoorCommand.WarmstartCommand}
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.getWarmstartCommand = function() {
return /** @type{?proto.bosdyn.api.spot.DoorCommand.WarmstartCommand} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot.DoorCommand.WarmstartCommand, 11));
};
/**
* @param {?proto.bosdyn.api.spot.DoorCommand.WarmstartCommand|undefined} value
* @return {!proto.bosdyn.api.spot.DoorCommand.Request} returns this
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.setWarmstartCommand = function(value) {
return jspb.Message.setOneofWrapperField(this, 11, proto.bosdyn.api.spot.DoorCommand.Request.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.DoorCommand.Request} returns this
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.clearWarmstartCommand = function() {
return this.setWarmstartCommand(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.hasWarmstartCommand = function() {
return jspb.Message.getField(this, 11) != null;
};
/**
* optional AutoPushCommand auto_push_command = 12;
* @return {?proto.bosdyn.api.spot.DoorCommand.AutoPushCommand}
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.getAutoPushCommand = function() {
return /** @type{?proto.bosdyn.api.spot.DoorCommand.AutoPushCommand} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot.DoorCommand.AutoPushCommand, 12));
};
/**
* @param {?proto.bosdyn.api.spot.DoorCommand.AutoPushCommand|undefined} value
* @return {!proto.bosdyn.api.spot.DoorCommand.Request} returns this
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.setAutoPushCommand = function(value) {
return jspb.Message.setOneofWrapperField(this, 12, proto.bosdyn.api.spot.DoorCommand.Request.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot.DoorCommand.Request} returns this
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.clearAutoPushCommand = function() {
return this.setAutoPushCommand(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot.DoorCommand.Request.prototype.hasAutoPushCommand = function() {
return jspb.Message.getField(this, 12) != 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.spot.DoorCommand.Feedback.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot.DoorCommand.Feedback.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.spot.DoorCommand.Feedback} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.Feedback.toObject = function(includeInstance, msg) {
var f, obj = {
status: jspb.Message.getFieldWithDefault(msg, 1, 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.spot.DoorCommand.Feedback}
*/
proto.bosdyn.api.spot.DoorCommand.Feedback.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot.DoorCommand.Feedback;
return proto.bosdyn.api.spot.DoorCommand.Feedback.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot.DoorCommand.Feedback} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot.DoorCommand.Feedback}
*/
proto.bosdyn.api.spot.DoorCommand.Feedback.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.bosdyn.api.spot.DoorCommand.Feedback.Status} */ (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.spot.DoorCommand.Feedback.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot.DoorCommand.Feedback.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.spot.DoorCommand.Feedback} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot.DoorCommand.Feedback.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getStatus();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.spot.DoorCommand.Feedback.Status = {
STATUS_UNKNOWN: 0,
STATUS_COMPLETED: 1,
STATUS_IN_PROGRESS: 2
};
/**
* optional Status status = 1;
* @return {!proto.bosdyn.api.spot.DoorCommand.Feedback.Status}
*/
proto.bosdyn.api.spot.DoorCommand.Feedback.prototype.getStatus = function() {
return /** @type {!proto.bosdyn.api.spot.DoorCommand.Feedback.Status} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.bosdyn.api.spot.DoorCommand.Feedback.Status} value
* @return {!proto.bosdyn.api.spot.DoorCommand.Feedback} returns this
*/
proto.bosdyn.api.spot.DoorCommand.Feedback.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
goog.object.extend(exports, proto.bosdyn.api.spot);