UNPKG

spot-sdk-js

Version:

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

804 lines (692 loc) 27.3 kB
// source: bosdyn/api/spot_cam/LED.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); goog.exportSymbol('proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest', null, global); goog.exportSymbol('proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse', null, global); goog.exportSymbol('proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest', null, global); goog.exportSymbol('proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse', 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_cam.GetLEDBrightnessRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.displayName = 'proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest'; } /** * 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_cam.GetLEDBrightnessResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.repeatedFields_, null); }; goog.inherits(proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.displayName = 'proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse'; } /** * 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_cam.SetLEDBrightnessRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.displayName = 'proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest'; } /** * 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_cam.SetLEDBrightnessResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.displayName = 'proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse'; } 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_cam.GetLEDBrightnessRequest.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.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_cam.GetLEDBrightnessRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.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_cam.GetLEDBrightnessRequest} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest; return proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.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; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.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_cam.GetLEDBrightnessRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getHeader(); if (f != null) { writer.writeMessage( 1, f, bosdyn_api_header_pb.RequestHeader.serializeBinaryToWriter ); } }; /** * optional bosdyn.api.RequestHeader header = 1; * @return {?proto.bosdyn.api.RequestHeader} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.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_cam.GetLEDBrightnessRequest} returns this */ proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest} returns this */ proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessRequest.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.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_cam.GetLEDBrightnessResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f), brightnessesList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 2)) == null ? undefined : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse; return proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.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 values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]); for (var i = 0; i < values.length; i++) { msg.addBrightnesses(values[i]); } break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.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_cam.GetLEDBrightnessResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.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.getBrightnessesList(); if (f.length > 0) { writer.writePackedFloat( 2, f ); } }; /** * optional bosdyn.api.ResponseHeader header = 1; * @return {?proto.bosdyn.api.ResponseHeader} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.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_cam.GetLEDBrightnessResponse} returns this */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse} returns this */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * repeated float brightnesses = 2; * @return {!Array<number>} */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.prototype.getBrightnessesList = function() { return /** @type {!Array<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 2)); }; /** * @param {!Array<number>} value * @return {!proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse} returns this */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.prototype.setBrightnessesList = function(value) { return jspb.Message.setField(this, 2, value || []); }; /** * @param {number} value * @param {number=} opt_index * @return {!proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse} returns this */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.prototype.addBrightnesses = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse} returns this */ proto.bosdyn.api.spot_cam.GetLEDBrightnessResponse.prototype.clearBrightnessesList = function() { return this.setBrightnessesList([]); }; 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_cam.SetLEDBrightnessRequest.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.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_cam.SetLEDBrightnessRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f), brightnessesMap: (f = msg.getBrightnessesMap()) ? f.toObject(includeInstance, undefined) : [] }; 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_cam.SetLEDBrightnessRequest} */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest; return proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest} */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.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 = msg.getBrightnessesMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readFloat, null, 0, 0.0); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.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_cam.SetLEDBrightnessRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.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.getBrightnessesMap(true); if (f && f.getLength() > 0) { f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeFloat); } }; /** * optional bosdyn.api.RequestHeader header = 1; * @return {?proto.bosdyn.api.RequestHeader} */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.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_cam.SetLEDBrightnessRequest} returns this */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest} returns this */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * map<int32, float> brightnesses = 2; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<number,number>} */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.prototype.getBrightnessesMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<number,number>} */ ( jspb.Message.getMapField(this, 2, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest} returns this */ proto.bosdyn.api.spot_cam.SetLEDBrightnessRequest.prototype.clearBrightnessesMap = function() { this.getBrightnessesMap().clear(); return this;}; 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_cam.SetLEDBrightnessResponse.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.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_cam.SetLEDBrightnessResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.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.spot_cam.SetLEDBrightnessResponse} */ proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse; return proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse} */ proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.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.spot_cam.SetLEDBrightnessResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.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_cam.SetLEDBrightnessResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getHeader(); if (f != null) { writer.writeMessage( 1, f, bosdyn_api_header_pb.ResponseHeader.serializeBinaryToWriter ); } }; /** * optional bosdyn.api.ResponseHeader header = 1; * @return {?proto.bosdyn.api.ResponseHeader} */ proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.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_cam.SetLEDBrightnessResponse} returns this */ proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse} returns this */ proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.SetLEDBrightnessResponse.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; goog.object.extend(exports, proto.bosdyn.api.spot_cam);