UNPKG

spot-sdk-js

Version:

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

1,239 lines (1,065 loc) 38.7 kB
// source: bosdyn/api/license.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_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.bosdyn.api.GetFeatureEnabledRequest', null, global); goog.exportSymbol('proto.bosdyn.api.GetFeatureEnabledResponse', null, global); goog.exportSymbol('proto.bosdyn.api.GetLicenseInfoRequest', null, global); goog.exportSymbol('proto.bosdyn.api.GetLicenseInfoResponse', null, global); goog.exportSymbol('proto.bosdyn.api.LicenseInfo', null, global); goog.exportSymbol('proto.bosdyn.api.LicenseInfo.Status', 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.LicenseInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.LicenseInfo.repeatedFields_, null); }; goog.inherits(proto.bosdyn.api.LicenseInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.LicenseInfo.displayName = 'proto.bosdyn.api.LicenseInfo'; } /** * 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.GetLicenseInfoRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.GetLicenseInfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.GetLicenseInfoRequest.displayName = 'proto.bosdyn.api.GetLicenseInfoRequest'; } /** * 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.GetLicenseInfoResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.GetLicenseInfoResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.GetLicenseInfoResponse.displayName = 'proto.bosdyn.api.GetLicenseInfoResponse'; } /** * 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.GetFeatureEnabledRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.GetFeatureEnabledRequest.repeatedFields_, null); }; goog.inherits(proto.bosdyn.api.GetFeatureEnabledRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.GetFeatureEnabledRequest.displayName = 'proto.bosdyn.api.GetFeatureEnabledRequest'; } /** * 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.GetFeatureEnabledResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.GetFeatureEnabledResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.GetFeatureEnabledResponse.displayName = 'proto.bosdyn.api.GetFeatureEnabledResponse'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.bosdyn.api.LicenseInfo.repeatedFields_ = [6]; 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.LicenseInfo.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.LicenseInfo.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.LicenseInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.LicenseInfo.toObject = function(includeInstance, msg) { var f, obj = { status: jspb.Message.getFieldWithDefault(msg, 1, 0), id: jspb.Message.getFieldWithDefault(msg, 2, ""), robotSerial: jspb.Message.getFieldWithDefault(msg, 3, ""), notValidBefore: (f = msg.getNotValidBefore()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), notValidAfter: (f = msg.getNotValidAfter()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), licensedFeaturesList: (f = jspb.Message.getRepeatedField(msg, 6)) == 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.LicenseInfo} */ proto.bosdyn.api.LicenseInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.LicenseInfo; return proto.bosdyn.api.LicenseInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.LicenseInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.LicenseInfo} */ proto.bosdyn.api.LicenseInfo.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.LicenseInfo.Status} */ (reader.readEnum()); msg.setStatus(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setRobotSerial(value); break; case 4: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setNotValidBefore(value); break; case 5: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setNotValidAfter(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.addLicensedFeatures(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.LicenseInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.LicenseInfo.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.LicenseInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.LicenseInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getStatus(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getId(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getRobotSerial(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getNotValidBefore(); if (f != null) { writer.writeMessage( 4, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getNotValidAfter(); if (f != null) { writer.writeMessage( 5, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getLicensedFeaturesList(); if (f.length > 0) { writer.writeRepeatedString( 6, f ); } }; /** * @enum {number} */ proto.bosdyn.api.LicenseInfo.Status = { STATUS_UNKNOWN: 0, STATUS_VALID: 1, STATUS_EXPIRED: 2, STATUS_NOT_YET_VALID: 3, STATUS_MALFORMED: 4, STATUS_SERIAL_MISMATCH: 5, STATUS_NO_LICENSE: 6 }; /** * optional Status status = 1; * @return {!proto.bosdyn.api.LicenseInfo.Status} */ proto.bosdyn.api.LicenseInfo.prototype.getStatus = function() { return /** @type {!proto.bosdyn.api.LicenseInfo.Status} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.bosdyn.api.LicenseInfo.Status} value * @return {!proto.bosdyn.api.LicenseInfo} returns this */ proto.bosdyn.api.LicenseInfo.prototype.setStatus = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional string id = 2; * @return {string} */ proto.bosdyn.api.LicenseInfo.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.bosdyn.api.LicenseInfo} returns this */ proto.bosdyn.api.LicenseInfo.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string robot_serial = 3; * @return {string} */ proto.bosdyn.api.LicenseInfo.prototype.getRobotSerial = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.bosdyn.api.LicenseInfo} returns this */ proto.bosdyn.api.LicenseInfo.prototype.setRobotSerial = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional google.protobuf.Timestamp not_valid_before = 4; * @return {?proto.google.protobuf.Timestamp} */ proto.bosdyn.api.LicenseInfo.prototype.getNotValidBefore = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.bosdyn.api.LicenseInfo} returns this */ proto.bosdyn.api.LicenseInfo.prototype.setNotValidBefore = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.LicenseInfo} returns this */ proto.bosdyn.api.LicenseInfo.prototype.clearNotValidBefore = function() { return this.setNotValidBefore(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.LicenseInfo.prototype.hasNotValidBefore = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional google.protobuf.Timestamp not_valid_after = 5; * @return {?proto.google.protobuf.Timestamp} */ proto.bosdyn.api.LicenseInfo.prototype.getNotValidAfter = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.bosdyn.api.LicenseInfo} returns this */ proto.bosdyn.api.LicenseInfo.prototype.setNotValidAfter = function(value) { return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.LicenseInfo} returns this */ proto.bosdyn.api.LicenseInfo.prototype.clearNotValidAfter = function() { return this.setNotValidAfter(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.LicenseInfo.prototype.hasNotValidAfter = function() { return jspb.Message.getField(this, 5) != null; }; /** * repeated string licensed_features = 6; * @return {!Array<string>} */ proto.bosdyn.api.LicenseInfo.prototype.getLicensedFeaturesList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 6)); }; /** * @param {!Array<string>} value * @return {!proto.bosdyn.api.LicenseInfo} returns this */ proto.bosdyn.api.LicenseInfo.prototype.setLicensedFeaturesList = function(value) { return jspb.Message.setField(this, 6, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.bosdyn.api.LicenseInfo} returns this */ proto.bosdyn.api.LicenseInfo.prototype.addLicensedFeatures = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.bosdyn.api.LicenseInfo} returns this */ proto.bosdyn.api.LicenseInfo.prototype.clearLicensedFeaturesList = function() { return this.setLicensedFeaturesList([]); }; 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.GetLicenseInfoRequest.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.GetLicenseInfoRequest.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.GetLicenseInfoRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GetLicenseInfoRequest.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.GetLicenseInfoRequest} */ proto.bosdyn.api.GetLicenseInfoRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.GetLicenseInfoRequest; return proto.bosdyn.api.GetLicenseInfoRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.GetLicenseInfoRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.GetLicenseInfoRequest} */ proto.bosdyn.api.GetLicenseInfoRequest.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.GetLicenseInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.GetLicenseInfoRequest.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.GetLicenseInfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GetLicenseInfoRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getHeader(); if (f != null) { writer.writeMessage( 1, f, bosdyn_api_header_pb.RequestHeader.serializeBinaryToWriter ); } }; /** * optional RequestHeader header = 1; * @return {?proto.bosdyn.api.RequestHeader} */ proto.bosdyn.api.GetLicenseInfoRequest.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.GetLicenseInfoRequest} returns this */ proto.bosdyn.api.GetLicenseInfoRequest.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.GetLicenseInfoRequest} returns this */ proto.bosdyn.api.GetLicenseInfoRequest.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.GetLicenseInfoRequest.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.GetLicenseInfoResponse.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.GetLicenseInfoResponse.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.GetLicenseInfoResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GetLicenseInfoResponse.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f), license: (f = msg.getLicense()) && proto.bosdyn.api.LicenseInfo.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.GetLicenseInfoResponse} */ proto.bosdyn.api.GetLicenseInfoResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.GetLicenseInfoResponse; return proto.bosdyn.api.GetLicenseInfoResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.GetLicenseInfoResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.GetLicenseInfoResponse} */ proto.bosdyn.api.GetLicenseInfoResponse.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.LicenseInfo; reader.readMessage(value,proto.bosdyn.api.LicenseInfo.deserializeBinaryFromReader); msg.setLicense(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.GetLicenseInfoResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.GetLicenseInfoResponse.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.GetLicenseInfoResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GetLicenseInfoResponse.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.getLicense(); if (f != null) { writer.writeMessage( 2, f, proto.bosdyn.api.LicenseInfo.serializeBinaryToWriter ); } }; /** * optional ResponseHeader header = 1; * @return {?proto.bosdyn.api.ResponseHeader} */ proto.bosdyn.api.GetLicenseInfoResponse.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.GetLicenseInfoResponse} returns this */ proto.bosdyn.api.GetLicenseInfoResponse.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.GetLicenseInfoResponse} returns this */ proto.bosdyn.api.GetLicenseInfoResponse.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.GetLicenseInfoResponse.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional LicenseInfo license = 2; * @return {?proto.bosdyn.api.LicenseInfo} */ proto.bosdyn.api.GetLicenseInfoResponse.prototype.getLicense = function() { return /** @type{?proto.bosdyn.api.LicenseInfo} */ ( jspb.Message.getWrapperField(this, proto.bosdyn.api.LicenseInfo, 2)); }; /** * @param {?proto.bosdyn.api.LicenseInfo|undefined} value * @return {!proto.bosdyn.api.GetLicenseInfoResponse} returns this */ proto.bosdyn.api.GetLicenseInfoResponse.prototype.setLicense = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.GetLicenseInfoResponse} returns this */ proto.bosdyn.api.GetLicenseInfoResponse.prototype.clearLicense = function() { return this.setLicense(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.GetLicenseInfoResponse.prototype.hasLicense = function() { return jspb.Message.getField(this, 2) != null; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.bosdyn.api.GetFeatureEnabledRequest.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.GetFeatureEnabledRequest.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.GetFeatureEnabledRequest.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.GetFeatureEnabledRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GetFeatureEnabledRequest.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f), featureCodesList: (f = jspb.Message.getRepeatedField(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.GetFeatureEnabledRequest} */ proto.bosdyn.api.GetFeatureEnabledRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.GetFeatureEnabledRequest; return proto.bosdyn.api.GetFeatureEnabledRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.GetFeatureEnabledRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.GetFeatureEnabledRequest} */ proto.bosdyn.api.GetFeatureEnabledRequest.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 {string} */ (reader.readString()); msg.addFeatureCodes(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.GetFeatureEnabledRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.GetFeatureEnabledRequest.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.GetFeatureEnabledRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GetFeatureEnabledRequest.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.getFeatureCodesList(); if (f.length > 0) { writer.writeRepeatedString( 2, f ); } }; /** * optional RequestHeader header = 1; * @return {?proto.bosdyn.api.RequestHeader} */ proto.bosdyn.api.GetFeatureEnabledRequest.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.GetFeatureEnabledRequest} returns this */ proto.bosdyn.api.GetFeatureEnabledRequest.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.GetFeatureEnabledRequest} returns this */ proto.bosdyn.api.GetFeatureEnabledRequest.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.GetFeatureEnabledRequest.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * repeated string feature_codes = 2; * @return {!Array<string>} */ proto.bosdyn.api.GetFeatureEnabledRequest.prototype.getFeatureCodesList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2)); }; /** * @param {!Array<string>} value * @return {!proto.bosdyn.api.GetFeatureEnabledRequest} returns this */ proto.bosdyn.api.GetFeatureEnabledRequest.prototype.setFeatureCodesList = function(value) { return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.bosdyn.api.GetFeatureEnabledRequest} returns this */ proto.bosdyn.api.GetFeatureEnabledRequest.prototype.addFeatureCodes = 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.GetFeatureEnabledRequest} returns this */ proto.bosdyn.api.GetFeatureEnabledRequest.prototype.clearFeatureCodesList = function() { return this.setFeatureCodesList([]); }; 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.GetFeatureEnabledResponse.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.GetFeatureEnabledResponse.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.GetFeatureEnabledResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GetFeatureEnabledResponse.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f), featureEnabledMap: (f = msg.getFeatureEnabledMap()) ? 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.GetFeatureEnabledResponse} */ proto.bosdyn.api.GetFeatureEnabledResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.GetFeatureEnabledResponse; return proto.bosdyn.api.GetFeatureEnabledResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.GetFeatureEnabledResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.GetFeatureEnabledResponse} */ proto.bosdyn.api.GetFeatureEnabledResponse.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 = msg.getFeatureEnabledMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBool, null, "", false); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.GetFeatureEnabledResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.GetFeatureEnabledResponse.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.GetFeatureEnabledResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GetFeatureEnabledResponse.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.getFeatureEnabledMap(true); if (f && f.getLength() > 0) { f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBool); } }; /** * optional ResponseHeader header = 1; * @return {?proto.bosdyn.api.ResponseHeader} */ proto.bosdyn.api.GetFeatureEnabledResponse.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.GetFeatureEnabledResponse} returns this */ proto.bosdyn.api.GetFeatureEnabledResponse.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.GetFeatureEnabledResponse} returns this */ proto.bosdyn.api.GetFeatureEnabledResponse.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.GetFeatureEnabledResponse.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * map<string, bool> feature_enabled = 2; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<string,boolean>} */ proto.bosdyn.api.GetFeatureEnabledResponse.prototype.getFeatureEnabledMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<string,boolean>} */ ( jspb.Message.getMapField(this, 2, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.bosdyn.api.GetFeatureEnabledResponse} returns this */ proto.bosdyn.api.GetFeatureEnabledResponse.prototype.clearFeatureEnabledMap = function() { this.getFeatureEnabledMap().clear(); return this;}; goog.object.extend(exports, proto.bosdyn.api);