UNPKG

spot-sdk-js

Version:

Develop applications and payloads for Spot using the unofficial Boston Dynamics Spot Node.js SDK.

473 lines (406 loc) 15.4 kB
// source: bosdyn/api/arm_surface_contact_service.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var bosdyn_api_header_pb = require('../../bosdyn/api/header_pb.js'); goog.object.extend(proto, bosdyn_api_header_pb); var bosdyn_api_lease_pb = require('../../bosdyn/api/lease_pb.js'); goog.object.extend(proto, bosdyn_api_lease_pb); var bosdyn_api_arm_surface_contact_pb = require('../../bosdyn/api/arm_surface_contact_pb.js'); goog.object.extend(proto, bosdyn_api_arm_surface_contact_pb); goog.exportSymbol('proto.bosdyn.api.ArmSurfaceContactCommand', null, global); goog.exportSymbol('proto.bosdyn.api.ArmSurfaceContactResponse', 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.ArmSurfaceContactCommand = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.ArmSurfaceContactCommand, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.ArmSurfaceContactCommand.displayName = 'proto.bosdyn.api.ArmSurfaceContactCommand'; } /** * 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.ArmSurfaceContactResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.ArmSurfaceContactResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.ArmSurfaceContactResponse.displayName = 'proto.bosdyn.api.ArmSurfaceContactResponse'; } 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.ArmSurfaceContactCommand.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.ArmSurfaceContactCommand.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.ArmSurfaceContactCommand} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.ArmSurfaceContactCommand.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), request: (f = msg.getRequest()) && bosdyn_api_arm_surface_contact_pb.ArmSurfaceContact.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.ArmSurfaceContactCommand} */ proto.bosdyn.api.ArmSurfaceContactCommand.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.ArmSurfaceContactCommand; return proto.bosdyn.api.ArmSurfaceContactCommand.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.ArmSurfaceContactCommand} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.ArmSurfaceContactCommand} */ proto.bosdyn.api.ArmSurfaceContactCommand.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 bosdyn_api_arm_surface_contact_pb.ArmSurfaceContact.Request; reader.readMessage(value,bosdyn_api_arm_surface_contact_pb.ArmSurfaceContact.Request.deserializeBinaryFromReader); msg.setRequest(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.ArmSurfaceContactCommand.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.ArmSurfaceContactCommand.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.ArmSurfaceContactCommand} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.ArmSurfaceContactCommand.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.getRequest(); if (f != null) { writer.writeMessage( 4, f, bosdyn_api_arm_surface_contact_pb.ArmSurfaceContact.Request.serializeBinaryToWriter ); } }; /** * optional RequestHeader header = 1; * @return {?proto.bosdyn.api.RequestHeader} */ proto.bosdyn.api.ArmSurfaceContactCommand.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.ArmSurfaceContactCommand} returns this */ proto.bosdyn.api.ArmSurfaceContactCommand.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.ArmSurfaceContactCommand} returns this */ proto.bosdyn.api.ArmSurfaceContactCommand.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.ArmSurfaceContactCommand.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional Lease lease = 2; * @return {?proto.bosdyn.api.Lease} */ proto.bosdyn.api.ArmSurfaceContactCommand.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.ArmSurfaceContactCommand} returns this */ proto.bosdyn.api.ArmSurfaceContactCommand.prototype.setLease = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.ArmSurfaceContactCommand} returns this */ proto.bosdyn.api.ArmSurfaceContactCommand.prototype.clearLease = function() { return this.setLease(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.ArmSurfaceContactCommand.prototype.hasLease = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional ArmSurfaceContact.Request request = 4; * @return {?proto.bosdyn.api.ArmSurfaceContact.Request} */ proto.bosdyn.api.ArmSurfaceContactCommand.prototype.getRequest = function() { return /** @type{?proto.bosdyn.api.ArmSurfaceContact.Request} */ ( jspb.Message.getWrapperField(this, bosdyn_api_arm_surface_contact_pb.ArmSurfaceContact.Request, 4)); }; /** * @param {?proto.bosdyn.api.ArmSurfaceContact.Request|undefined} value * @return {!proto.bosdyn.api.ArmSurfaceContactCommand} returns this */ proto.bosdyn.api.ArmSurfaceContactCommand.prototype.setRequest = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.ArmSurfaceContactCommand} returns this */ proto.bosdyn.api.ArmSurfaceContactCommand.prototype.clearRequest = function() { return this.setRequest(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.ArmSurfaceContactCommand.prototype.hasRequest = 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.ArmSurfaceContactResponse.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.ArmSurfaceContactResponse.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.ArmSurfaceContactResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.ArmSurfaceContactResponse.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.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.ArmSurfaceContactResponse} */ proto.bosdyn.api.ArmSurfaceContactResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.ArmSurfaceContactResponse; return proto.bosdyn.api.ArmSurfaceContactResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.ArmSurfaceContactResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.ArmSurfaceContactResponse} */ proto.bosdyn.api.ArmSurfaceContactResponse.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; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.ArmSurfaceContactResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.ArmSurfaceContactResponse.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.ArmSurfaceContactResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.ArmSurfaceContactResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getHeader(); if (f != null) { writer.writeMessage( 1, f, bosdyn_api_header_pb.ResponseHeader.serializeBinaryToWriter ); } }; /** * optional ResponseHeader header = 1; * @return {?proto.bosdyn.api.ResponseHeader} */ proto.bosdyn.api.ArmSurfaceContactResponse.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.ArmSurfaceContactResponse} returns this */ proto.bosdyn.api.ArmSurfaceContactResponse.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.ArmSurfaceContactResponse} returns this */ proto.bosdyn.api.ArmSurfaceContactResponse.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.ArmSurfaceContactResponse.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; goog.object.extend(exports, proto.bosdyn.api);