UNPKG

spot-sdk-js

Version:

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

1,495 lines (1,292 loc) 58 kB
// source: bosdyn/api/spot_cam/streamquality.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 google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); goog.object.extend(proto, google_protobuf_wrappers_pb); goog.exportSymbol('proto.bosdyn.api.spot_cam.EnableCongestionControlRequest', null, global); goog.exportSymbol('proto.bosdyn.api.spot_cam.EnableCongestionControlResponse', null, global); goog.exportSymbol('proto.bosdyn.api.spot_cam.GetStreamParamsRequest', null, global); goog.exportSymbol('proto.bosdyn.api.spot_cam.GetStreamParamsResponse', null, global); goog.exportSymbol('proto.bosdyn.api.spot_cam.SetStreamParamsRequest', null, global); goog.exportSymbol('proto.bosdyn.api.spot_cam.SetStreamParamsResponse', null, global); goog.exportSymbol('proto.bosdyn.api.spot_cam.StreamParams', null, global); goog.exportSymbol('proto.bosdyn.api.spot_cam.StreamParams.AwbMode', null, global); goog.exportSymbol('proto.bosdyn.api.spot_cam.StreamParams.AwbModeEnum', 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.StreamParams = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.spot_cam.StreamParams, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.StreamParams.displayName = 'proto.bosdyn.api.spot_cam.StreamParams'; } /** * 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.StreamParams.AwbMode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.spot_cam.StreamParams.AwbMode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.StreamParams.AwbMode.displayName = 'proto.bosdyn.api.spot_cam.StreamParams.AwbMode'; } /** * 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.GetStreamParamsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.spot_cam.GetStreamParamsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.GetStreamParamsRequest.displayName = 'proto.bosdyn.api.spot_cam.GetStreamParamsRequest'; } /** * 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.GetStreamParamsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.spot_cam.GetStreamParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.displayName = 'proto.bosdyn.api.spot_cam.GetStreamParamsResponse'; } /** * 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.SetStreamParamsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.spot_cam.SetStreamParamsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.displayName = 'proto.bosdyn.api.spot_cam.SetStreamParamsRequest'; } /** * 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.SetStreamParamsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.spot_cam.SetStreamParamsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.displayName = 'proto.bosdyn.api.spot_cam.SetStreamParamsResponse'; } /** * 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.EnableCongestionControlRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.spot_cam.EnableCongestionControlRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.EnableCongestionControlRequest.displayName = 'proto.bosdyn.api.spot_cam.EnableCongestionControlRequest'; } /** * 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.EnableCongestionControlResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.spot_cam.EnableCongestionControlResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.spot_cam.EnableCongestionControlResponse.displayName = 'proto.bosdyn.api.spot_cam.EnableCongestionControlResponse'; } 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.StreamParams.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.spot_cam.StreamParams.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.StreamParams} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.StreamParams.toObject = function(includeInstance, msg) { var f, obj = { targetbitrate: (f = msg.getTargetbitrate()) && google_protobuf_wrappers_pb.Int64Value.toObject(includeInstance, f), refreshinterval: (f = msg.getRefreshinterval()) && google_protobuf_wrappers_pb.Int64Value.toObject(includeInstance, f), idrinterval: (f = msg.getIdrinterval()) && google_protobuf_wrappers_pb.Int64Value.toObject(includeInstance, f), awb: (f = msg.getAwb()) && proto.bosdyn.api.spot_cam.StreamParams.AwbMode.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.StreamParams} */ proto.bosdyn.api.spot_cam.StreamParams.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.spot_cam.StreamParams; return proto.bosdyn.api.spot_cam.StreamParams.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.StreamParams} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.spot_cam.StreamParams} */ proto.bosdyn.api.spot_cam.StreamParams.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_protobuf_wrappers_pb.Int64Value; reader.readMessage(value,google_protobuf_wrappers_pb.Int64Value.deserializeBinaryFromReader); msg.setTargetbitrate(value); break; case 2: var value = new google_protobuf_wrappers_pb.Int64Value; reader.readMessage(value,google_protobuf_wrappers_pb.Int64Value.deserializeBinaryFromReader); msg.setRefreshinterval(value); break; case 3: var value = new google_protobuf_wrappers_pb.Int64Value; reader.readMessage(value,google_protobuf_wrappers_pb.Int64Value.deserializeBinaryFromReader); msg.setIdrinterval(value); break; case 4: var value = new proto.bosdyn.api.spot_cam.StreamParams.AwbMode; reader.readMessage(value,proto.bosdyn.api.spot_cam.StreamParams.AwbMode.deserializeBinaryFromReader); msg.setAwb(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.StreamParams.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.spot_cam.StreamParams.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.StreamParams} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.StreamParams.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTargetbitrate(); if (f != null) { writer.writeMessage( 1, f, google_protobuf_wrappers_pb.Int64Value.serializeBinaryToWriter ); } f = message.getRefreshinterval(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_wrappers_pb.Int64Value.serializeBinaryToWriter ); } f = message.getIdrinterval(); if (f != null) { writer.writeMessage( 3, f, google_protobuf_wrappers_pb.Int64Value.serializeBinaryToWriter ); } f = message.getAwb(); if (f != null) { writer.writeMessage( 4, f, proto.bosdyn.api.spot_cam.StreamParams.AwbMode.serializeBinaryToWriter ); } }; /** * @enum {number} */ proto.bosdyn.api.spot_cam.StreamParams.AwbModeEnum = { OFF: 0, AUTO: 1, INCANDESCENT: 2, FLUORESCENT: 3, WARM_FLUORESCENT: 4, DAYLIGHT: 5, CLOUDY: 6, TWILIGHT: 7, SHADE: 8, DARK: 9 }; 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.StreamParams.AwbMode.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.spot_cam.StreamParams.AwbMode.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.StreamParams.AwbMode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.StreamParams.AwbMode.toObject = function(includeInstance, msg) { var f, obj = { awb: 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_cam.StreamParams.AwbMode} */ proto.bosdyn.api.spot_cam.StreamParams.AwbMode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.spot_cam.StreamParams.AwbMode; return proto.bosdyn.api.spot_cam.StreamParams.AwbMode.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.StreamParams.AwbMode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.spot_cam.StreamParams.AwbMode} */ proto.bosdyn.api.spot_cam.StreamParams.AwbMode.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_cam.StreamParams.AwbModeEnum} */ (reader.readEnum()); msg.setAwb(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.StreamParams.AwbMode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.spot_cam.StreamParams.AwbMode.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.StreamParams.AwbMode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.StreamParams.AwbMode.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAwb(); if (f !== 0.0) { writer.writeEnum( 1, f ); } }; /** * optional AwbModeEnum awb = 1; * @return {!proto.bosdyn.api.spot_cam.StreamParams.AwbModeEnum} */ proto.bosdyn.api.spot_cam.StreamParams.AwbMode.prototype.getAwb = function() { return /** @type {!proto.bosdyn.api.spot_cam.StreamParams.AwbModeEnum} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.bosdyn.api.spot_cam.StreamParams.AwbModeEnum} value * @return {!proto.bosdyn.api.spot_cam.StreamParams.AwbMode} returns this */ proto.bosdyn.api.spot_cam.StreamParams.AwbMode.prototype.setAwb = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional google.protobuf.Int64Value targetbitrate = 1; * @return {?proto.google.protobuf.Int64Value} */ proto.bosdyn.api.spot_cam.StreamParams.prototype.getTargetbitrate = function() { return /** @type{?proto.google.protobuf.Int64Value} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.Int64Value, 1)); }; /** * @param {?proto.google.protobuf.Int64Value|undefined} value * @return {!proto.bosdyn.api.spot_cam.StreamParams} returns this */ proto.bosdyn.api.spot_cam.StreamParams.prototype.setTargetbitrate = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.StreamParams} returns this */ proto.bosdyn.api.spot_cam.StreamParams.prototype.clearTargetbitrate = function() { return this.setTargetbitrate(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.StreamParams.prototype.hasTargetbitrate = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional google.protobuf.Int64Value refreshinterval = 2; * @return {?proto.google.protobuf.Int64Value} */ proto.bosdyn.api.spot_cam.StreamParams.prototype.getRefreshinterval = function() { return /** @type{?proto.google.protobuf.Int64Value} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.Int64Value, 2)); }; /** * @param {?proto.google.protobuf.Int64Value|undefined} value * @return {!proto.bosdyn.api.spot_cam.StreamParams} returns this */ proto.bosdyn.api.spot_cam.StreamParams.prototype.setRefreshinterval = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.StreamParams} returns this */ proto.bosdyn.api.spot_cam.StreamParams.prototype.clearRefreshinterval = function() { return this.setRefreshinterval(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.StreamParams.prototype.hasRefreshinterval = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional google.protobuf.Int64Value idrinterval = 3; * @return {?proto.google.protobuf.Int64Value} */ proto.bosdyn.api.spot_cam.StreamParams.prototype.getIdrinterval = function() { return /** @type{?proto.google.protobuf.Int64Value} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.Int64Value, 3)); }; /** * @param {?proto.google.protobuf.Int64Value|undefined} value * @return {!proto.bosdyn.api.spot_cam.StreamParams} returns this */ proto.bosdyn.api.spot_cam.StreamParams.prototype.setIdrinterval = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.StreamParams} returns this */ proto.bosdyn.api.spot_cam.StreamParams.prototype.clearIdrinterval = function() { return this.setIdrinterval(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.StreamParams.prototype.hasIdrinterval = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional AwbMode awb = 4; * @return {?proto.bosdyn.api.spot_cam.StreamParams.AwbMode} */ proto.bosdyn.api.spot_cam.StreamParams.prototype.getAwb = function() { return /** @type{?proto.bosdyn.api.spot_cam.StreamParams.AwbMode} */ ( jspb.Message.getWrapperField(this, proto.bosdyn.api.spot_cam.StreamParams.AwbMode, 4)); }; /** * @param {?proto.bosdyn.api.spot_cam.StreamParams.AwbMode|undefined} value * @return {!proto.bosdyn.api.spot_cam.StreamParams} returns this */ proto.bosdyn.api.spot_cam.StreamParams.prototype.setAwb = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.StreamParams} returns this */ proto.bosdyn.api.spot_cam.StreamParams.prototype.clearAwb = function() { return this.setAwb(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.StreamParams.prototype.hasAwb = 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_cam.GetStreamParamsRequest.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.spot_cam.GetStreamParamsRequest.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.GetStreamParamsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.GetStreamParamsRequest.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.GetStreamParamsRequest} */ proto.bosdyn.api.spot_cam.GetStreamParamsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.spot_cam.GetStreamParamsRequest; return proto.bosdyn.api.spot_cam.GetStreamParamsRequest.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.GetStreamParamsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.spot_cam.GetStreamParamsRequest} */ proto.bosdyn.api.spot_cam.GetStreamParamsRequest.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.GetStreamParamsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.spot_cam.GetStreamParamsRequest.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.GetStreamParamsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.GetStreamParamsRequest.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.GetStreamParamsRequest.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.GetStreamParamsRequest} returns this */ proto.bosdyn.api.spot_cam.GetStreamParamsRequest.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.GetStreamParamsRequest} returns this */ proto.bosdyn.api.spot_cam.GetStreamParamsRequest.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.GetStreamParamsRequest.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != 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_cam.GetStreamParamsResponse.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.spot_cam.GetStreamParamsResponse.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.GetStreamParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f), params: (f = msg.getParams()) && proto.bosdyn.api.spot_cam.StreamParams.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.GetStreamParamsResponse} */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.spot_cam.GetStreamParamsResponse; return proto.bosdyn.api.spot_cam.GetStreamParamsResponse.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.GetStreamParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.spot_cam.GetStreamParamsResponse} */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.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 proto.bosdyn.api.spot_cam.StreamParams; reader.readMessage(value,proto.bosdyn.api.spot_cam.StreamParams.deserializeBinaryFromReader); msg.setParams(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.GetStreamParamsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.spot_cam.GetStreamParamsResponse.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.GetStreamParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.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.getParams(); if (f != null) { writer.writeMessage( 2, f, proto.bosdyn.api.spot_cam.StreamParams.serializeBinaryToWriter ); } }; /** * optional bosdyn.api.ResponseHeader header = 1; * @return {?proto.bosdyn.api.ResponseHeader} */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.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.GetStreamParamsResponse} returns this */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.GetStreamParamsResponse} returns this */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional StreamParams params = 2; * @return {?proto.bosdyn.api.spot_cam.StreamParams} */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.prototype.getParams = function() { return /** @type{?proto.bosdyn.api.spot_cam.StreamParams} */ ( jspb.Message.getWrapperField(this, proto.bosdyn.api.spot_cam.StreamParams, 2)); }; /** * @param {?proto.bosdyn.api.spot_cam.StreamParams|undefined} value * @return {!proto.bosdyn.api.spot_cam.GetStreamParamsResponse} returns this */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.prototype.setParams = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.GetStreamParamsResponse} returns this */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.prototype.clearParams = function() { return this.setParams(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.GetStreamParamsResponse.prototype.hasParams = 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_cam.SetStreamParamsRequest.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.spot_cam.SetStreamParamsRequest.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.SetStreamParamsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f), params: (f = msg.getParams()) && proto.bosdyn.api.spot_cam.StreamParams.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.SetStreamParamsRequest} */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.spot_cam.SetStreamParamsRequest; return proto.bosdyn.api.spot_cam.SetStreamParamsRequest.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.SetStreamParamsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.spot_cam.SetStreamParamsRequest} */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new bosdyn_api_header_pb.RequestHeader; reader.readMessage(value,bosdyn_api_header_pb.RequestHeader.deserializeBinaryFromReader); msg.setHeader(value); break; case 2: var value = new proto.bosdyn.api.spot_cam.StreamParams; reader.readMessage(value,proto.bosdyn.api.spot_cam.StreamParams.deserializeBinaryFromReader); msg.setParams(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.SetStreamParamsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.spot_cam.SetStreamParamsRequest.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.SetStreamParamsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.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.getParams(); if (f != null) { writer.writeMessage( 2, f, proto.bosdyn.api.spot_cam.StreamParams.serializeBinaryToWriter ); } }; /** * optional bosdyn.api.RequestHeader header = 1; * @return {?proto.bosdyn.api.RequestHeader} */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.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.SetStreamParamsRequest} returns this */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.SetStreamParamsRequest} returns this */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional StreamParams params = 2; * @return {?proto.bosdyn.api.spot_cam.StreamParams} */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.prototype.getParams = function() { return /** @type{?proto.bosdyn.api.spot_cam.StreamParams} */ ( jspb.Message.getWrapperField(this, proto.bosdyn.api.spot_cam.StreamParams, 2)); }; /** * @param {?proto.bosdyn.api.spot_cam.StreamParams|undefined} value * @return {!proto.bosdyn.api.spot_cam.SetStreamParamsRequest} returns this */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.prototype.setParams = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.SetStreamParamsRequest} returns this */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.prototype.clearParams = function() { return this.setParams(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.SetStreamParamsRequest.prototype.hasParams = 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_cam.SetStreamParamsResponse.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.spot_cam.SetStreamParamsResponse.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.SetStreamParamsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f), params: (f = msg.getParams()) && proto.bosdyn.api.spot_cam.StreamParams.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.SetStreamParamsResponse} */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.spot_cam.SetStreamParamsResponse; return proto.bosdyn.api.spot_cam.SetStreamParamsResponse.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.SetStreamParamsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.spot_cam.SetStreamParamsResponse} */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.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 proto.bosdyn.api.spot_cam.StreamParams; reader.readMessage(value,proto.bosdyn.api.spot_cam.StreamParams.deserializeBinaryFromReader); msg.setParams(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.SetStreamParamsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.spot_cam.SetStreamParamsResponse.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.SetStreamParamsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.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.getParams(); if (f != null) { writer.writeMessage( 2, f, proto.bosdyn.api.spot_cam.StreamParams.serializeBinaryToWriter ); } }; /** * optional bosdyn.api.ResponseHeader header = 1; * @return {?proto.bosdyn.api.ResponseHeader} */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.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.SetStreamParamsResponse} returns this */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.SetStreamParamsResponse} returns this */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional StreamParams params = 2; * @return {?proto.bosdyn.api.spot_cam.StreamParams} */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.prototype.getParams = function() { return /** @type{?proto.bosdyn.api.spot_cam.StreamParams} */ ( jspb.Message.getWrapperField(this, proto.bosdyn.api.spot_cam.StreamParams, 2)); }; /** * @param {?proto.bosdyn.api.spot_cam.StreamParams|undefined} value * @return {!proto.bosdyn.api.spot_cam.SetStreamParamsResponse} returns this */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.prototype.setParams = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.spot_cam.SetStreamParamsResponse} returns this */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.prototype.clearParams = function() { return this.setParams(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.spot_cam.SetStreamParamsResponse.prototype.hasParams = 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_cam.EnableCongestionControlRequest.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.spot_cam.EnableCongestionControlRequest.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.EnableCongestionControlRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.spot_cam.EnableCongestionControlRequest.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f), enableCongestionControl: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; 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.EnableCongestionControlRequest} */ proto.bosdyn.api.spot_cam.EnableCongestionControlRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.spot_cam.EnableCongestionControlRequest; return proto.bosdyn.api.spot_cam.EnableCongestionControlRequest.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.EnableCongestionControlRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.spot_cam.EnableCongestionControlRequest} */ proto.bosdyn.api.spot_cam.EnableCongestionControlRequest.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 {boolean} */ (reader.readBool()); msg.setEnableCongestionControl(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data