spot-sdk-js
Version:
Develop applications and payloads for Spot using the unofficial Boston Dynamics Spot Node.js SDK.
1,461 lines (1,260 loc) • 44.7 kB
JavaScript
// source: bosdyn/api/directory.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.Endpoint', null, global);
goog.exportSymbol('proto.bosdyn.api.GetServiceEntryRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.GetServiceEntryResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.GetServiceEntryResponse.Status', null, global);
goog.exportSymbol('proto.bosdyn.api.ListServiceEntriesRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.ListServiceEntriesResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.ServiceEntry', 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.ServiceEntry = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.ServiceEntry, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ServiceEntry.displayName = 'proto.bosdyn.api.ServiceEntry';
}
/**
* 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.Endpoint = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.Endpoint, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.Endpoint.displayName = 'proto.bosdyn.api.Endpoint';
}
/**
* 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.GetServiceEntryRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.GetServiceEntryRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.GetServiceEntryRequest.displayName = 'proto.bosdyn.api.GetServiceEntryRequest';
}
/**
* 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.GetServiceEntryResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.GetServiceEntryResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.GetServiceEntryResponse.displayName = 'proto.bosdyn.api.GetServiceEntryResponse';
}
/**
* 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.ListServiceEntriesRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.ListServiceEntriesRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ListServiceEntriesRequest.displayName = 'proto.bosdyn.api.ListServiceEntriesRequest';
}
/**
* 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.ListServiceEntriesResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.ListServiceEntriesResponse.repeatedFields_, null);
};
goog.inherits(proto.bosdyn.api.ListServiceEntriesResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ListServiceEntriesResponse.displayName = 'proto.bosdyn.api.ListServiceEntriesResponse';
}
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.ServiceEntry.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ServiceEntry.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.ServiceEntry} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ServiceEntry.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
type: jspb.Message.getFieldWithDefault(msg, 2, ""),
authority: jspb.Message.getFieldWithDefault(msg, 3, ""),
lastUpdate: (f = msg.getLastUpdate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
userTokenRequired: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
permissionRequired: jspb.Message.getFieldWithDefault(msg, 7, ""),
livenessTimeoutSecs: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0),
hostPayloadGuid: jspb.Message.getFieldWithDefault(msg, 9, "")
};
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.ServiceEntry}
*/
proto.bosdyn.api.ServiceEntry.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ServiceEntry;
return proto.bosdyn.api.ServiceEntry.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ServiceEntry} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ServiceEntry}
*/
proto.bosdyn.api.ServiceEntry.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setAuthority(value);
break;
case 4:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setLastUpdate(value);
break;
case 5:
var value = /** @type {boolean} */ (reader.readBool());
msg.setUserTokenRequired(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setPermissionRequired(value);
break;
case 8:
var value = /** @type {number} */ (reader.readDouble());
msg.setLivenessTimeoutSecs(value);
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setHostPayloadGuid(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.ServiceEntry.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ServiceEntry.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.ServiceEntry} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ServiceEntry.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getType();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getAuthority();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getLastUpdate();
if (f != null) {
writer.writeMessage(
4,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getUserTokenRequired();
if (f) {
writer.writeBool(
5,
f
);
}
f = message.getPermissionRequired();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getLivenessTimeoutSecs();
if (f !== 0.0) {
writer.writeDouble(
8,
f
);
}
f = message.getHostPayloadGuid();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
};
/**
* optional string name = 1;
* @return {string}
*/
proto.bosdyn.api.ServiceEntry.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.ServiceEntry} returns this
*/
proto.bosdyn.api.ServiceEntry.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string type = 2;
* @return {string}
*/
proto.bosdyn.api.ServiceEntry.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.ServiceEntry} returns this
*/
proto.bosdyn.api.ServiceEntry.prototype.setType = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string authority = 3;
* @return {string}
*/
proto.bosdyn.api.ServiceEntry.prototype.getAuthority = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.ServiceEntry} returns this
*/
proto.bosdyn.api.ServiceEntry.prototype.setAuthority = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional google.protobuf.Timestamp last_update = 4;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.bosdyn.api.ServiceEntry.prototype.getLastUpdate = 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.ServiceEntry} returns this
*/
proto.bosdyn.api.ServiceEntry.prototype.setLastUpdate = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ServiceEntry} returns this
*/
proto.bosdyn.api.ServiceEntry.prototype.clearLastUpdate = function() {
return this.setLastUpdate(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ServiceEntry.prototype.hasLastUpdate = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional bool user_token_required = 5;
* @return {boolean}
*/
proto.bosdyn.api.ServiceEntry.prototype.getUserTokenRequired = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.ServiceEntry} returns this
*/
proto.bosdyn.api.ServiceEntry.prototype.setUserTokenRequired = function(value) {
return jspb.Message.setProto3BooleanField(this, 5, value);
};
/**
* optional string permission_required = 7;
* @return {string}
*/
proto.bosdyn.api.ServiceEntry.prototype.getPermissionRequired = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.ServiceEntry} returns this
*/
proto.bosdyn.api.ServiceEntry.prototype.setPermissionRequired = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional double liveness_timeout_secs = 8;
* @return {number}
*/
proto.bosdyn.api.ServiceEntry.prototype.getLivenessTimeoutSecs = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0));
};
/**
* @param {number} value
* @return {!proto.bosdyn.api.ServiceEntry} returns this
*/
proto.bosdyn.api.ServiceEntry.prototype.setLivenessTimeoutSecs = function(value) {
return jspb.Message.setProto3FloatField(this, 8, value);
};
/**
* optional string host_payload_guid = 9;
* @return {string}
*/
proto.bosdyn.api.ServiceEntry.prototype.getHostPayloadGuid = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.ServiceEntry} returns this
*/
proto.bosdyn.api.ServiceEntry.prototype.setHostPayloadGuid = function(value) {
return jspb.Message.setProto3StringField(this, 9, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.Endpoint.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.Endpoint.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.Endpoint} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.Endpoint.toObject = function(includeInstance, msg) {
var f, obj = {
hostIp: jspb.Message.getFieldWithDefault(msg, 1, ""),
port: jspb.Message.getFieldWithDefault(msg, 2, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.Endpoint}
*/
proto.bosdyn.api.Endpoint.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.Endpoint;
return proto.bosdyn.api.Endpoint.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.Endpoint} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.Endpoint}
*/
proto.bosdyn.api.Endpoint.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setHostIp(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt32());
msg.setPort(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.Endpoint.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.Endpoint.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.Endpoint} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.Endpoint.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHostIp();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getPort();
if (f !== 0) {
writer.writeInt32(
2,
f
);
}
};
/**
* optional string host_ip = 1;
* @return {string}
*/
proto.bosdyn.api.Endpoint.prototype.getHostIp = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.Endpoint} returns this
*/
proto.bosdyn.api.Endpoint.prototype.setHostIp = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional int32 port = 2;
* @return {number}
*/
proto.bosdyn.api.Endpoint.prototype.getPort = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.bosdyn.api.Endpoint} returns this
*/
proto.bosdyn.api.Endpoint.prototype.setPort = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.GetServiceEntryRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.GetServiceEntryRequest.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.GetServiceEntryRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.GetServiceEntryRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
serviceName: jspb.Message.getFieldWithDefault(msg, 2, "")
};
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.GetServiceEntryRequest}
*/
proto.bosdyn.api.GetServiceEntryRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.GetServiceEntryRequest;
return proto.bosdyn.api.GetServiceEntryRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.GetServiceEntryRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.GetServiceEntryRequest}
*/
proto.bosdyn.api.GetServiceEntryRequest.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.setServiceName(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.GetServiceEntryRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.GetServiceEntryRequest.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.GetServiceEntryRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.GetServiceEntryRequest.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.getServiceName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.GetServiceEntryRequest.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.GetServiceEntryRequest} returns this
*/
proto.bosdyn.api.GetServiceEntryRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.GetServiceEntryRequest} returns this
*/
proto.bosdyn.api.GetServiceEntryRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.GetServiceEntryRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string service_name = 2;
* @return {string}
*/
proto.bosdyn.api.GetServiceEntryRequest.prototype.getServiceName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.GetServiceEntryRequest} returns this
*/
proto.bosdyn.api.GetServiceEntryRequest.prototype.setServiceName = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.GetServiceEntryResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.GetServiceEntryResponse.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.GetServiceEntryResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.GetServiceEntryResponse.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f),
status: jspb.Message.getFieldWithDefault(msg, 2, 0),
serviceEntry: (f = msg.getServiceEntry()) && proto.bosdyn.api.ServiceEntry.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.GetServiceEntryResponse}
*/
proto.bosdyn.api.GetServiceEntryResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.GetServiceEntryResponse;
return proto.bosdyn.api.GetServiceEntryResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.GetServiceEntryResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.GetServiceEntryResponse}
*/
proto.bosdyn.api.GetServiceEntryResponse.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 = /** @type {!proto.bosdyn.api.GetServiceEntryResponse.Status} */ (reader.readEnum());
msg.setStatus(value);
break;
case 3:
var value = new proto.bosdyn.api.ServiceEntry;
reader.readMessage(value,proto.bosdyn.api.ServiceEntry.deserializeBinaryFromReader);
msg.setServiceEntry(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.GetServiceEntryResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.GetServiceEntryResponse.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.GetServiceEntryResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.GetServiceEntryResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHeader();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_header_pb.ResponseHeader.serializeBinaryToWriter
);
}
f = message.getStatus();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getServiceEntry();
if (f != null) {
writer.writeMessage(
3,
f,
proto.bosdyn.api.ServiceEntry.serializeBinaryToWriter
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.GetServiceEntryResponse.Status = {
STATUS_UNKNOWN: 0,
STATUS_OK: 1,
STATUS_NONEXISTENT_SERVICE: 2
};
/**
* optional ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.GetServiceEntryResponse.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.GetServiceEntryResponse} returns this
*/
proto.bosdyn.api.GetServiceEntryResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.GetServiceEntryResponse} returns this
*/
proto.bosdyn.api.GetServiceEntryResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.GetServiceEntryResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Status status = 2;
* @return {!proto.bosdyn.api.GetServiceEntryResponse.Status}
*/
proto.bosdyn.api.GetServiceEntryResponse.prototype.getStatus = function() {
return /** @type {!proto.bosdyn.api.GetServiceEntryResponse.Status} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.bosdyn.api.GetServiceEntryResponse.Status} value
* @return {!proto.bosdyn.api.GetServiceEntryResponse} returns this
*/
proto.bosdyn.api.GetServiceEntryResponse.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional ServiceEntry service_entry = 3;
* @return {?proto.bosdyn.api.ServiceEntry}
*/
proto.bosdyn.api.GetServiceEntryResponse.prototype.getServiceEntry = function() {
return /** @type{?proto.bosdyn.api.ServiceEntry} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.ServiceEntry, 3));
};
/**
* @param {?proto.bosdyn.api.ServiceEntry|undefined} value
* @return {!proto.bosdyn.api.GetServiceEntryResponse} returns this
*/
proto.bosdyn.api.GetServiceEntryResponse.prototype.setServiceEntry = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.GetServiceEntryResponse} returns this
*/
proto.bosdyn.api.GetServiceEntryResponse.prototype.clearServiceEntry = function() {
return this.setServiceEntry(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.GetServiceEntryResponse.prototype.hasServiceEntry = function() {
return jspb.Message.getField(this, 3) != 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.ListServiceEntriesRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ListServiceEntriesRequest.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.ListServiceEntriesRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListServiceEntriesRequest.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.ListServiceEntriesRequest}
*/
proto.bosdyn.api.ListServiceEntriesRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ListServiceEntriesRequest;
return proto.bosdyn.api.ListServiceEntriesRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ListServiceEntriesRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ListServiceEntriesRequest}
*/
proto.bosdyn.api.ListServiceEntriesRequest.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.ListServiceEntriesRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ListServiceEntriesRequest.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.ListServiceEntriesRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListServiceEntriesRequest.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.ListServiceEntriesRequest.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.ListServiceEntriesRequest} returns this
*/
proto.bosdyn.api.ListServiceEntriesRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ListServiceEntriesRequest} returns this
*/
proto.bosdyn.api.ListServiceEntriesRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ListServiceEntriesRequest.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.ListServiceEntriesResponse.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.ListServiceEntriesResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ListServiceEntriesResponse.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.ListServiceEntriesResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListServiceEntriesResponse.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f),
serviceEntriesList: jspb.Message.toObjectList(msg.getServiceEntriesList(),
proto.bosdyn.api.ServiceEntry.toObject, includeInstance)
};
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.ListServiceEntriesResponse}
*/
proto.bosdyn.api.ListServiceEntriesResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ListServiceEntriesResponse;
return proto.bosdyn.api.ListServiceEntriesResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ListServiceEntriesResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ListServiceEntriesResponse}
*/
proto.bosdyn.api.ListServiceEntriesResponse.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.ServiceEntry;
reader.readMessage(value,proto.bosdyn.api.ServiceEntry.deserializeBinaryFromReader);
msg.addServiceEntries(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.ListServiceEntriesResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ListServiceEntriesResponse.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.ListServiceEntriesResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListServiceEntriesResponse.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.getServiceEntriesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.bosdyn.api.ServiceEntry.serializeBinaryToWriter
);
}
};
/**
* optional ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.ListServiceEntriesResponse.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.ListServiceEntriesResponse} returns this
*/
proto.bosdyn.api.ListServiceEntriesResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ListServiceEntriesResponse} returns this
*/
proto.bosdyn.api.ListServiceEntriesResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ListServiceEntriesResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* repeated ServiceEntry service_entries = 2;
* @return {!Array<!proto.bosdyn.api.ServiceEntry>}
*/
proto.bosdyn.api.ListServiceEntriesResponse.prototype.getServiceEntriesList = function() {
return /** @type{!Array<!proto.bosdyn.api.ServiceEntry>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.bosdyn.api.ServiceEntry, 2));
};
/**
* @param {!Array<!proto.bosdyn.api.ServiceEntry>} value
* @return {!proto.bosdyn.api.ListServiceEntriesResponse} returns this
*/
proto.bosdyn.api.ListServiceEntriesResponse.prototype.setServiceEntriesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.bosdyn.api.ServiceEntry=} opt_value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.ServiceEntry}
*/
proto.bosdyn.api.ListServiceEntriesResponse.prototype.addServiceEntries = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.bosdyn.api.ServiceEntry, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.ListServiceEntriesResponse} returns this
*/
proto.bosdyn.api.ListServiceEntriesResponse.prototype.clearServiceEntriesList = function() {
return this.setServiceEntriesList([]);
};
goog.object.extend(exports, proto.bosdyn.api);