spot-sdk-js
Version:
Develop applications and payloads for Spot using the unofficial Boston Dynamics Spot Node.js SDK.
3,801 lines • 115 kB
JavaScript
// source: bosdyn/api/lease.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var bosdyn_api_header_pb = require('../../bosdyn/api/header_pb.js');
goog.object.extend(proto, bosdyn_api_header_pb);
goog.exportSymbol('proto.bosdyn.api.AcquireLeaseRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.AcquireLeaseResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.AcquireLeaseResponse.Status', null, global);
goog.exportSymbol('proto.bosdyn.api.Lease', null, global);
goog.exportSymbol('proto.bosdyn.api.LeaseOwner', null, global);
goog.exportSymbol('proto.bosdyn.api.LeaseResource', null, global);
goog.exportSymbol('proto.bosdyn.api.LeaseUseResult', null, global);
goog.exportSymbol('proto.bosdyn.api.LeaseUseResult.Status', null, global);
goog.exportSymbol('proto.bosdyn.api.ListLeasesRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.ListLeasesResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.ResourceTree', null, global);
goog.exportSymbol('proto.bosdyn.api.RetainLeaseRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.RetainLeaseResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.ReturnLeaseRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.ReturnLeaseResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.ReturnLeaseResponse.Status', null, global);
goog.exportSymbol('proto.bosdyn.api.TakeLeaseRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.TakeLeaseResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.TakeLeaseResponse.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.Lease = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.Lease.repeatedFields_, null);
};
goog.inherits(proto.bosdyn.api.Lease, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.Lease.displayName = 'proto.bosdyn.api.Lease';
}
/**
* 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.ResourceTree = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.ResourceTree.repeatedFields_, null);
};
goog.inherits(proto.bosdyn.api.ResourceTree, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ResourceTree.displayName = 'proto.bosdyn.api.ResourceTree';
}
/**
* 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.LeaseOwner = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.LeaseOwner, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.LeaseOwner.displayName = 'proto.bosdyn.api.LeaseOwner';
}
/**
* 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.LeaseUseResult = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.LeaseUseResult.repeatedFields_, null);
};
goog.inherits(proto.bosdyn.api.LeaseUseResult, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.LeaseUseResult.displayName = 'proto.bosdyn.api.LeaseUseResult';
}
/**
* 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.AcquireLeaseRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.AcquireLeaseRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.AcquireLeaseRequest.displayName = 'proto.bosdyn.api.AcquireLeaseRequest';
}
/**
* 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.AcquireLeaseResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.AcquireLeaseResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.AcquireLeaseResponse.displayName = 'proto.bosdyn.api.AcquireLeaseResponse';
}
/**
* 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.TakeLeaseRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.TakeLeaseRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.TakeLeaseRequest.displayName = 'proto.bosdyn.api.TakeLeaseRequest';
}
/**
* 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.TakeLeaseResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.TakeLeaseResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.TakeLeaseResponse.displayName = 'proto.bosdyn.api.TakeLeaseResponse';
}
/**
* 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.ReturnLeaseRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.ReturnLeaseRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ReturnLeaseRequest.displayName = 'proto.bosdyn.api.ReturnLeaseRequest';
}
/**
* 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.ReturnLeaseResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.ReturnLeaseResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ReturnLeaseResponse.displayName = 'proto.bosdyn.api.ReturnLeaseResponse';
}
/**
* 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.ListLeasesRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.ListLeasesRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ListLeasesRequest.displayName = 'proto.bosdyn.api.ListLeasesRequest';
}
/**
* 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.LeaseResource = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.LeaseResource, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.LeaseResource.displayName = 'proto.bosdyn.api.LeaseResource';
}
/**
* 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.ListLeasesResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.ListLeasesResponse.repeatedFields_, null);
};
goog.inherits(proto.bosdyn.api.ListLeasesResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.ListLeasesResponse.displayName = 'proto.bosdyn.api.ListLeasesResponse';
}
/**
* 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.RetainLeaseRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.RetainLeaseRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.RetainLeaseRequest.displayName = 'proto.bosdyn.api.RetainLeaseRequest';
}
/**
* 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.RetainLeaseResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.RetainLeaseResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.RetainLeaseResponse.displayName = 'proto.bosdyn.api.RetainLeaseResponse';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.bosdyn.api.Lease.repeatedFields_ = [3,4];
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.Lease.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.Lease.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.Lease} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.Lease.toObject = function(includeInstance, msg) {
var f, obj = {
resource: jspb.Message.getFieldWithDefault(msg, 1, ""),
epoch: jspb.Message.getFieldWithDefault(msg, 2, ""),
sequenceList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
clientNamesList: (f = jspb.Message.getRepeatedField(msg, 4)) == 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.Lease}
*/
proto.bosdyn.api.Lease.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.Lease;
return proto.bosdyn.api.Lease.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.Lease} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.Lease}
*/
proto.bosdyn.api.Lease.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.setResource(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setEpoch(value);
break;
case 3:
var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]);
for (var i = 0; i < values.length; i++) {
msg.addSequence(values[i]);
}
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.addClientNames(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.Lease.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.Lease.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.Lease} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.Lease.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getResource();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getEpoch();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSequenceList();
if (f.length > 0) {
writer.writePackedUint32(
3,
f
);
}
f = message.getClientNamesList();
if (f.length > 0) {
writer.writeRepeatedString(
4,
f
);
}
};
/**
* optional string resource = 1;
* @return {string}
*/
proto.bosdyn.api.Lease.prototype.getResource = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.Lease} returns this
*/
proto.bosdyn.api.Lease.prototype.setResource = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string epoch = 2;
* @return {string}
*/
proto.bosdyn.api.Lease.prototype.getEpoch = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.Lease} returns this
*/
proto.bosdyn.api.Lease.prototype.setEpoch = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* repeated uint32 sequence = 3;
* @return {!Array<number>}
*/
proto.bosdyn.api.Lease.prototype.getSequenceList = function() {
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 3));
};
/**
* @param {!Array<number>} value
* @return {!proto.bosdyn.api.Lease} returns this
*/
proto.bosdyn.api.Lease.prototype.setSequenceList = function(value) {
return jspb.Message.setField(this, 3, value || []);
};
/**
* @param {number} value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.Lease} returns this
*/
proto.bosdyn.api.Lease.prototype.addSequence = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.Lease} returns this
*/
proto.bosdyn.api.Lease.prototype.clearSequenceList = function() {
return this.setSequenceList([]);
};
/**
* repeated string client_names = 4;
* @return {!Array<string>}
*/
proto.bosdyn.api.Lease.prototype.getClientNamesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
};
/**
* @param {!Array<string>} value
* @return {!proto.bosdyn.api.Lease} returns this
*/
proto.bosdyn.api.Lease.prototype.setClientNamesList = function(value) {
return jspb.Message.setField(this, 4, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.Lease} returns this
*/
proto.bosdyn.api.Lease.prototype.addClientNames = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.Lease} returns this
*/
proto.bosdyn.api.Lease.prototype.clearClientNamesList = function() {
return this.setClientNamesList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.bosdyn.api.ResourceTree.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.ResourceTree.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ResourceTree.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.ResourceTree} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ResourceTree.toObject = function(includeInstance, msg) {
var f, obj = {
resource: jspb.Message.getFieldWithDefault(msg, 1, ""),
subResourcesList: jspb.Message.toObjectList(msg.getSubResourcesList(),
proto.bosdyn.api.ResourceTree.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.ResourceTree}
*/
proto.bosdyn.api.ResourceTree.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ResourceTree;
return proto.bosdyn.api.ResourceTree.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ResourceTree} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ResourceTree}
*/
proto.bosdyn.api.ResourceTree.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.setResource(value);
break;
case 2:
var value = new proto.bosdyn.api.ResourceTree;
reader.readMessage(value,proto.bosdyn.api.ResourceTree.deserializeBinaryFromReader);
msg.addSubResources(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.ResourceTree.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ResourceTree.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.ResourceTree} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ResourceTree.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getResource();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getSubResourcesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.bosdyn.api.ResourceTree.serializeBinaryToWriter
);
}
};
/**
* optional string resource = 1;
* @return {string}
*/
proto.bosdyn.api.ResourceTree.prototype.getResource = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.ResourceTree} returns this
*/
proto.bosdyn.api.ResourceTree.prototype.setResource = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* repeated ResourceTree sub_resources = 2;
* @return {!Array<!proto.bosdyn.api.ResourceTree>}
*/
proto.bosdyn.api.ResourceTree.prototype.getSubResourcesList = function() {
return /** @type{!Array<!proto.bosdyn.api.ResourceTree>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.bosdyn.api.ResourceTree, 2));
};
/**
* @param {!Array<!proto.bosdyn.api.ResourceTree>} value
* @return {!proto.bosdyn.api.ResourceTree} returns this
*/
proto.bosdyn.api.ResourceTree.prototype.setSubResourcesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.bosdyn.api.ResourceTree=} opt_value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.ResourceTree}
*/
proto.bosdyn.api.ResourceTree.prototype.addSubResources = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.bosdyn.api.ResourceTree, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.ResourceTree} returns this
*/
proto.bosdyn.api.ResourceTree.prototype.clearSubResourcesList = function() {
return this.setSubResourcesList([]);
};
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.LeaseOwner.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.LeaseOwner.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.LeaseOwner} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.LeaseOwner.toObject = function(includeInstance, msg) {
var f, obj = {
clientName: jspb.Message.getFieldWithDefault(msg, 1, ""),
userName: 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.LeaseOwner}
*/
proto.bosdyn.api.LeaseOwner.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.LeaseOwner;
return proto.bosdyn.api.LeaseOwner.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.LeaseOwner} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.LeaseOwner}
*/
proto.bosdyn.api.LeaseOwner.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.setClientName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setUserName(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.LeaseOwner.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.LeaseOwner.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.LeaseOwner} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.LeaseOwner.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getClientName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getUserName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string client_name = 1;
* @return {string}
*/
proto.bosdyn.api.LeaseOwner.prototype.getClientName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.LeaseOwner} returns this
*/
proto.bosdyn.api.LeaseOwner.prototype.setClientName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string user_name = 2;
* @return {string}
*/
proto.bosdyn.api.LeaseOwner.prototype.getUserName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.LeaseOwner} returns this
*/
proto.bosdyn.api.LeaseOwner.prototype.setUserName = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.bosdyn.api.LeaseUseResult.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.LeaseUseResult.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.LeaseUseResult.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.LeaseUseResult} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.LeaseUseResult.toObject = function(includeInstance, msg) {
var f, obj = {
status: jspb.Message.getFieldWithDefault(msg, 1, 0),
owner: (f = msg.getOwner()) && proto.bosdyn.api.LeaseOwner.toObject(includeInstance, f),
attemptedLease: (f = msg.getAttemptedLease()) && proto.bosdyn.api.Lease.toObject(includeInstance, f),
previousLease: (f = msg.getPreviousLease()) && proto.bosdyn.api.Lease.toObject(includeInstance, f),
latestKnownLease: (f = msg.getLatestKnownLease()) && proto.bosdyn.api.Lease.toObject(includeInstance, f),
latestResourcesList: jspb.Message.toObjectList(msg.getLatestResourcesList(),
proto.bosdyn.api.Lease.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.LeaseUseResult}
*/
proto.bosdyn.api.LeaseUseResult.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.LeaseUseResult;
return proto.bosdyn.api.LeaseUseResult.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.LeaseUseResult} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.LeaseUseResult}
*/
proto.bosdyn.api.LeaseUseResult.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.LeaseUseResult.Status} */ (reader.readEnum());
msg.setStatus(value);
break;
case 2:
var value = new proto.bosdyn.api.LeaseOwner;
reader.readMessage(value,proto.bosdyn.api.LeaseOwner.deserializeBinaryFromReader);
msg.setOwner(value);
break;
case 3:
var value = new proto.bosdyn.api.Lease;
reader.readMessage(value,proto.bosdyn.api.Lease.deserializeBinaryFromReader);
msg.setAttemptedLease(value);
break;
case 4:
var value = new proto.bosdyn.api.Lease;
reader.readMessage(value,proto.bosdyn.api.Lease.deserializeBinaryFromReader);
msg.setPreviousLease(value);
break;
case 5:
var value = new proto.bosdyn.api.Lease;
reader.readMessage(value,proto.bosdyn.api.Lease.deserializeBinaryFromReader);
msg.setLatestKnownLease(value);
break;
case 6:
var value = new proto.bosdyn.api.Lease;
reader.readMessage(value,proto.bosdyn.api.Lease.deserializeBinaryFromReader);
msg.addLatestResources(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.LeaseUseResult.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.LeaseUseResult.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.LeaseUseResult} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.LeaseUseResult.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getStatus();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getOwner();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.LeaseOwner.serializeBinaryToWriter
);
}
f = message.getAttemptedLease();
if (f != null) {
writer.writeMessage(
3,
f,
proto.bosdyn.api.Lease.serializeBinaryToWriter
);
}
f = message.getPreviousLease();
if (f != null) {
writer.writeMessage(
4,
f,
proto.bosdyn.api.Lease.serializeBinaryToWriter
);
}
f = message.getLatestKnownLease();
if (f != null) {
writer.writeMessage(
5,
f,
proto.bosdyn.api.Lease.serializeBinaryToWriter
);
}
f = message.getLatestResourcesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
6,
f,
proto.bosdyn.api.Lease.serializeBinaryToWriter
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.LeaseUseResult.Status = {
STATUS_UNKNOWN: 0,
STATUS_OK: 1,
STATUS_INVALID_LEASE: 2,
STATUS_OLDER: 3,
STATUS_REVOKED: 4,
STATUS_UNMANAGED: 5,
STATUS_WRONG_EPOCH: 6
};
/**
* optional Status status = 1;
* @return {!proto.bosdyn.api.LeaseUseResult.Status}
*/
proto.bosdyn.api.LeaseUseResult.prototype.getStatus = function() {
return /** @type {!proto.bosdyn.api.LeaseUseResult.Status} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.bosdyn.api.LeaseUseResult.Status} value
* @return {!proto.bosdyn.api.LeaseUseResult} returns this
*/
proto.bosdyn.api.LeaseUseResult.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional LeaseOwner owner = 2;
* @return {?proto.bosdyn.api.LeaseOwner}
*/
proto.bosdyn.api.LeaseUseResult.prototype.getOwner = function() {
return /** @type{?proto.bosdyn.api.LeaseOwner} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.LeaseOwner, 2));
};
/**
* @param {?proto.bosdyn.api.LeaseOwner|undefined} value
* @return {!proto.bosdyn.api.LeaseUseResult} returns this
*/
proto.bosdyn.api.LeaseUseResult.prototype.setOwner = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.LeaseUseResult} returns this
*/
proto.bosdyn.api.LeaseUseResult.prototype.clearOwner = function() {
return this.setOwner(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.LeaseUseResult.prototype.hasOwner = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional Lease attempted_lease = 3;
* @return {?proto.bosdyn.api.Lease}
*/
proto.bosdyn.api.LeaseUseResult.prototype.getAttemptedLease = function() {
return /** @type{?proto.bosdyn.api.Lease} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.Lease, 3));
};
/**
* @param {?proto.bosdyn.api.Lease|undefined} value
* @return {!proto.bosdyn.api.LeaseUseResult} returns this
*/
proto.bosdyn.api.LeaseUseResult.prototype.setAttemptedLease = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.LeaseUseResult} returns this
*/
proto.bosdyn.api.LeaseUseResult.prototype.clearAttemptedLease = function() {
return this.setAttemptedLease(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.LeaseUseResult.prototype.hasAttemptedLease = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional Lease previous_lease = 4;
* @return {?proto.bosdyn.api.Lease}
*/
proto.bosdyn.api.LeaseUseResult.prototype.getPreviousLease = function() {
return /** @type{?proto.bosdyn.api.Lease} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.Lease, 4));
};
/**
* @param {?proto.bosdyn.api.Lease|undefined} value
* @return {!proto.bosdyn.api.LeaseUseResult} returns this
*/
proto.bosdyn.api.LeaseUseResult.prototype.setPreviousLease = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.LeaseUseResult} returns this
*/
proto.bosdyn.api.LeaseUseResult.prototype.clearPreviousLease = function() {
return this.setPreviousLease(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.LeaseUseResult.prototype.hasPreviousLease = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional Lease latest_known_lease = 5;
* @return {?proto.bosdyn.api.Lease}
*/
proto.bosdyn.api.LeaseUseResult.prototype.getLatestKnownLease = function() {
return /** @type{?proto.bosdyn.api.Lease} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.Lease, 5));
};
/**
* @param {?proto.bosdyn.api.Lease|undefined} value
* @return {!proto.bosdyn.api.LeaseUseResult} returns this
*/
proto.bosdyn.api.LeaseUseResult.prototype.setLatestKnownLease = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.LeaseUseResult} returns this
*/
proto.bosdyn.api.LeaseUseResult.prototype.clearLatestKnownLease = function() {
return this.setLatestKnownLease(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.LeaseUseResult.prototype.hasLatestKnownLease = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* repeated Lease latest_resources = 6;
* @return {!Array<!proto.bosdyn.api.Lease>}
*/
proto.bosdyn.api.LeaseUseResult.prototype.getLatestResourcesList = function() {
return /** @type{!Array<!proto.bosdyn.api.Lease>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.bosdyn.api.Lease, 6));
};
/**
* @param {!Array<!proto.bosdyn.api.Lease>} value
* @return {!proto.bosdyn.api.LeaseUseResult} returns this
*/
proto.bosdyn.api.LeaseUseResult.prototype.setLatestResourcesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 6, value);
};
/**
* @param {!proto.bosdyn.api.Lease=} opt_value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.Lease}
*/
proto.bosdyn.api.LeaseUseResult.prototype.addLatestResources = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.bosdyn.api.Lease, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.LeaseUseResult} returns this
*/
proto.bosdyn.api.LeaseUseResult.prototype.clearLatestResourcesList = function() {
return this.setLatestResourcesList([]);
};
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.AcquireLeaseRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.AcquireLeaseRequest.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.AcquireLeaseRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.AcquireLeaseRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
resource: 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.AcquireLeaseRequest}
*/
proto.bosdyn.api.AcquireLeaseRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.AcquireLeaseRequest;
return proto.bosdyn.api.AcquireLeaseRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.AcquireLeaseRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.AcquireLeaseRequest}
*/
proto.bosdyn.api.AcquireLeaseRequest.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.setResource(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.AcquireLeaseRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.AcquireLeaseRequest.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.AcquireLeaseRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.AcquireLeaseRequest.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.getResource();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.AcquireLeaseRequest.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.AcquireLeaseRequest} returns this
*/
proto.bosdyn.api.AcquireLeaseRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.AcquireLeaseRequest} returns this
*/
proto.bosdyn.api.AcquireLeaseRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.AcquireLeaseRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string resource = 2;
* @return {string}
*/
proto.bosdyn.api.AcquireLeaseRequest.prototype.getResource = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.AcquireLeaseRequest} returns this
*/
proto.bosdyn.api.AcquireLeaseRequest.prototype.setResource = 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.AcquireLeaseResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.AcquireLeaseResponse.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.AcquireLeaseResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.AcquireLeaseResponse.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),
lease: (f = msg.getLease()) && proto.bosdyn.api.Lease.toObject(includeInstance, f),
leaseOwner: (f = msg.getLeaseOwner()) && proto.bosdyn.api.LeaseOwner.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.AcquireLeaseResponse}
*/
proto.bosdyn.api.AcquireLeaseResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.AcquireLeaseResponse;
return proto.bosdyn.api.AcquireLeaseResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.AcquireLeaseResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.AcquireLeaseResponse}
*/
proto.bosdyn.api.AcquireLeaseResponse.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.AcquireLeaseResponse.Status} */ (reader.readEnum());
msg.setStatus(value);
break;
case 3:
var value = new proto.bosdyn.api.Lease;
reader.readMessage(value,proto.bosdyn.api.Lease.deserializeBinaryFromReader);
msg.setLease(value);
break;
case 4:
var value = new proto.bosdyn.api.LeaseOwner;
reader.readMessage(value,proto.bosdyn.api.LeaseOwner.deserializeBinaryFromReader);
msg.setLeaseOwner(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.AcquireLeaseResponse.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.AcquireLeaseResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.AcquireLeaseResponse.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.getLease();
if (f != null) {
writer.writeMessage(
3,
f,
proto.bosdyn.api.Lease.serializeBinaryToWriter
);
}
f = message.getLeaseOwner();
if (f != null) {
writer.writeMessage(
4,
f,
proto.bosdyn.api.LeaseOwner.serializeBinaryToWriter
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.AcquireLeaseResponse.Status = {
STATUS_UNKNOWN: 0,
STATUS_OK: 1,
STATUS_RESOURCE_ALREADY_CLAIMED: 2,
STATUS_INVALID_RESOURCE: 3,
STATUS_NOT_AUTHORITATIVE_SERVICE: 4
};
/**
* optional ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.AcquireLeaseResponse.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.AcquireLeaseResponse} returns this
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.AcquireLeaseResponse} returns this
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Status status = 2;
* @return {!proto.bosdyn.api.AcquireLeaseResponse.Status}
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.getStatus = function() {
return /** @type {!proto.bosdyn.api.AcquireLeaseResponse.Status} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.bosdyn.api.AcquireLeaseResponse.Status} value
* @return {!proto.bosdyn.api.AcquireLeaseResponse} returns this
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional Lease lease = 3;
* @return {?proto.bosdyn.api.Lease}
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.getLease = function() {
return /** @type{?proto.bosdyn.api.Lease} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.Lease, 3));
};
/**
* @param {?proto.bosdyn.api.Lease|undefined} value
* @return {!proto.bosdyn.api.AcquireLeaseResponse} returns this
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.setLease = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.AcquireLeaseResponse} returns this
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.clearLease = function() {
return this.setLease(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.hasLease = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional LeaseOwner lease_owner = 4;
* @return {?proto.bosdyn.api.LeaseOwner}
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.getLeaseOwner = function() {
return /** @type{?proto.bosdyn.api.LeaseOwner} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.LeaseOwner, 4));
};
/**
* @param {?proto.bosdyn.api.LeaseOwner|undefined} value
* @return {!proto.bosdyn.api.AcquireLeaseResponse} returns this
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.setLeaseOwner = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.AcquireLeaseResponse} returns this
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.clearLeaseOwner = function() {
return this.setLeaseOwner(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.AcquireLeaseResponse.prototype.hasLeaseOwner = 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.TakeLeaseRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.TakeLeaseRequest.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.TakeLeaseRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.TakeLeaseRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
resource: 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.TakeLeaseRequest}
*/
proto.bosdyn.api.TakeLeaseRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.TakeLeaseRequest;
return proto.bosdyn.api.TakeLeaseRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.TakeLeaseRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.TakeLeaseRequest}
*/
proto.bosdyn.api.TakeLeaseRequest.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.setResource(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.TakeLeaseRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.TakeLeaseRequest.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.TakeLeaseRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.TakeLeaseRequest.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.getResource();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.TakeLeaseRequest.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.TakeLeaseRequest} returns this
*/
proto.bosdyn.api.TakeLeaseRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.TakeLeaseRequest} returns this
*/
proto.bosdyn.api.TakeLeaseRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.TakeLeaseRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string resource = 2;
* @return {string}
*/
proto.bosdyn.api.TakeLeaseRequest.prototype.getResource = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.TakeLeaseRequest} returns this
*/
proto.bosdyn.api.TakeLeaseRequest.prototype.setResource = 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.TakeLeaseResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.TakeLeaseResponse.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.TakeLeaseResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.TakeLeaseResponse.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),
lease: (f = msg.getLease()) && proto.bosdyn.api.Lease.toObject(includeInstance, f),
leaseOwner: (f = msg.getLeaseOwner()) && proto.bosdyn.api.LeaseOwner.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.TakeLeaseResponse}
*/
proto.bosdyn.api.TakeLeaseResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.TakeLeaseResponse;
return proto.bosdyn.api.TakeLeaseResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.TakeLeaseResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.TakeLeaseResponse}
*/
proto.bosdyn.api.TakeLeaseResponse.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.TakeLeaseResponse.Status} */ (reader.readEnum());
msg.setStatus(value);
break;
case 3:
var value = new proto.bosdyn.api.Lease;
reader.readMessage(value,proto.bosdyn.api.Lease.deserializeBinaryFromReader);
msg.setLease(value);
break;
case 4:
var value = new proto.bosdyn.api.LeaseOwner;
reader.readMessage(value,proto.bosdyn.api.LeaseOwner.deserializeBinaryFromReader);
msg.setLeaseOwner(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.TakeLeaseResponse.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.TakeLeaseResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.TakeLeaseResponse.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.getLease();
if (f != null) {
writer.writeMessage(
3,
f,
proto.bosdyn.api.Lease.serializeBinaryToWriter
);
}
f = message.getLeaseOwner();
if (f != null) {
writer.writeMessage(
4,
f,
proto.bosdyn.api.LeaseOwner.serializeBinaryToWriter
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.TakeLeaseResponse.Status = {
STATUS_UNKNOWN: 0,
STATUS_OK: 1,
STATUS_INVALID_RESOURCE: 2,
STATUS_NOT_AUTHORITATIVE_SERVICE: 3
};
/**
* optional ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.TakeLeaseResponse.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.TakeLeaseResponse} returns this
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.TakeLeaseResponse} returns this
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Status status = 2;
* @return {!proto.bosdyn.api.TakeLeaseResponse.Status}
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.getStatus = function() {
return /** @type {!proto.bosdyn.api.TakeLeaseResponse.Status} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.bosdyn.api.TakeLeaseResponse.Status} value
* @return {!proto.bosdyn.api.TakeLeaseResponse} returns this
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional Lease lease = 3;
* @return {?proto.bosdyn.api.Lease}
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.getLease = function() {
return /** @type{?proto.bosdyn.api.Lease} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.Lease, 3));
};
/**
* @param {?proto.bosdyn.api.Lease|undefined} value
* @return {!proto.bosdyn.api.TakeLeaseResponse} returns this
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.setLease = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.TakeLeaseResponse} returns this
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.clearLease = function() {
return this.setLease(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.hasLease = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional LeaseOwner lease_owner = 4;
* @return {?proto.bosdyn.api.LeaseOwner}
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.getLeaseOwner = function() {
return /** @type{?proto.bosdyn.api.LeaseOwner} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.LeaseOwner, 4));
};
/**
* @param {?proto.bosdyn.api.LeaseOwner|undefined} value
* @return {!proto.bosdyn.api.TakeLeaseResponse} returns this
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.setLeaseOwner = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.TakeLeaseResponse} returns this
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.clearLeaseOwner = function() {
return this.setLeaseOwner(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.TakeLeaseResponse.prototype.hasLeaseOwner = 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.ReturnLeaseRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ReturnLeaseRequest.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.ReturnLeaseRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ReturnLeaseRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
lease: (f = msg.getLease()) && proto.bosdyn.api.Lease.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.ReturnLeaseRequest}
*/
proto.bosdyn.api.ReturnLeaseRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ReturnLeaseRequest;
return proto.bosdyn.api.ReturnLeaseRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ReturnLeaseRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ReturnLeaseRequest}
*/
proto.bosdyn.api.ReturnLeaseRequest.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.Lease;
reader.readMessage(value,proto.bosdyn.api.Lease.deserializeBinaryFromReader);
msg.setLease(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.ReturnLeaseRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ReturnLeaseRequest.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.ReturnLeaseRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ReturnLeaseRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHeader();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_header_pb.RequestHeader.serializeBinaryToWriter
);
}
f = message.getLease();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.Lease.serializeBinaryToWriter
);
}
};
/**
* optional RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.ReturnLeaseRequest.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.ReturnLeaseRequest} returns this
*/
proto.bosdyn.api.ReturnLeaseRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ReturnLeaseRequest} returns this
*/
proto.bosdyn.api.ReturnLeaseRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ReturnLeaseRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Lease lease = 2;
* @return {?proto.bosdyn.api.Lease}
*/
proto.bosdyn.api.ReturnLeaseRequest.prototype.getLease = function() {
return /** @type{?proto.bosdyn.api.Lease} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.Lease, 2));
};
/**
* @param {?proto.bosdyn.api.Lease|undefined} value
* @return {!proto.bosdyn.api.ReturnLeaseRequest} returns this
*/
proto.bosdyn.api.ReturnLeaseRequest.prototype.setLease = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ReturnLeaseRequest} returns this
*/
proto.bosdyn.api.ReturnLeaseRequest.prototype.clearLease = function() {
return this.setLease(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ReturnLeaseRequest.prototype.hasLease = 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.ReturnLeaseResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ReturnLeaseResponse.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.ReturnLeaseResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ReturnLeaseResponse.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)
};
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.ReturnLeaseResponse}
*/
proto.bosdyn.api.ReturnLeaseResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ReturnLeaseResponse;
return proto.bosdyn.api.ReturnLeaseResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ReturnLeaseResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ReturnLeaseResponse}
*/
proto.bosdyn.api.ReturnLeaseResponse.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.ReturnLeaseResponse.Status} */ (reader.readEnum());
msg.setStatus(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.ReturnLeaseResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ReturnLeaseResponse.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.ReturnLeaseResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ReturnLeaseResponse.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
);
}
};
/**
* @enum {number}
*/
proto.bosdyn.api.ReturnLeaseResponse.Status = {
STATUS_UNKNOWN: 0,
STATUS_OK: 1,
STATUS_INVALID_RESOURCE: 2,
STATUS_NOT_ACTIVE_LEASE: 3,
STATUS_NOT_AUTHORITATIVE_SERVICE: 4
};
/**
* optional ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.ReturnLeaseResponse.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.ReturnLeaseResponse} returns this
*/
proto.bosdyn.api.ReturnLeaseResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ReturnLeaseResponse} returns this
*/
proto.bosdyn.api.ReturnLeaseResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ReturnLeaseResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Status status = 2;
* @return {!proto.bosdyn.api.ReturnLeaseResponse.Status}
*/
proto.bosdyn.api.ReturnLeaseResponse.prototype.getStatus = function() {
return /** @type {!proto.bosdyn.api.ReturnLeaseResponse.Status} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.bosdyn.api.ReturnLeaseResponse.Status} value
* @return {!proto.bosdyn.api.ReturnLeaseResponse} returns this
*/
proto.bosdyn.api.ReturnLeaseResponse.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(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.ListLeasesRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ListLeasesRequest.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.ListLeasesRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListLeasesRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
includeFullLeaseInfo: 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.ListLeasesRequest}
*/
proto.bosdyn.api.ListLeasesRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ListLeasesRequest;
return proto.bosdyn.api.ListLeasesRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ListLeasesRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ListLeasesRequest}
*/
proto.bosdyn.api.ListLeasesRequest.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.setIncludeFullLeaseInfo(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.ListLeasesRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ListLeasesRequest.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.ListLeasesRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListLeasesRequest.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.getIncludeFullLeaseInfo();
if (f) {
writer.writeBool(
2,
f
);
}
};
/**
* optional RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.ListLeasesRequest.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.ListLeasesRequest} returns this
*/
proto.bosdyn.api.ListLeasesRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ListLeasesRequest} returns this
*/
proto.bosdyn.api.ListLeasesRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ListLeasesRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional bool include_full_lease_info = 2;
* @return {boolean}
*/
proto.bosdyn.api.ListLeasesRequest.prototype.getIncludeFullLeaseInfo = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
};
/**
* @param {boolean} value
* @return {!proto.bosdyn.api.ListLeasesRequest} returns this
*/
proto.bosdyn.api.ListLeasesRequest.prototype.setIncludeFullLeaseInfo = function(value) {
return jspb.Message.setProto3BooleanField(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.LeaseResource.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.LeaseResource.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.LeaseResource} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.LeaseResource.toObject = function(includeInstance, msg) {
var f, obj = {
resource: jspb.Message.getFieldWithDefault(msg, 1, ""),
lease: (f = msg.getLease()) && proto.bosdyn.api.Lease.toObject(includeInstance, f),
leaseOwner: (f = msg.getLeaseOwner()) && proto.bosdyn.api.LeaseOwner.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.LeaseResource}
*/
proto.bosdyn.api.LeaseResource.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.LeaseResource;
return proto.bosdyn.api.LeaseResource.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.LeaseResource} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.LeaseResource}
*/
proto.bosdyn.api.LeaseResource.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.setResource(value);
break;
case 2:
var value = new proto.bosdyn.api.Lease;
reader.readMessage(value,proto.bosdyn.api.Lease.deserializeBinaryFromReader);
msg.setLease(value);
break;
case 3:
var value = new proto.bosdyn.api.LeaseOwner;
reader.readMessage(value,proto.bosdyn.api.LeaseOwner.deserializeBinaryFromReader);
msg.setLeaseOwner(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.LeaseResource.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.LeaseResource.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.LeaseResource} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.LeaseResource.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getResource();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getLease();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.Lease.serializeBinaryToWriter
);
}
f = message.getLeaseOwner();
if (f != null) {
writer.writeMessage(
3,
f,
proto.bosdyn.api.LeaseOwner.serializeBinaryToWriter
);
}
};
/**
* optional string resource = 1;
* @return {string}
*/
proto.bosdyn.api.LeaseResource.prototype.getResource = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bosdyn.api.LeaseResource} returns this
*/
proto.bosdyn.api.LeaseResource.prototype.setResource = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional Lease lease = 2;
* @return {?proto.bosdyn.api.Lease}
*/
proto.bosdyn.api.LeaseResource.prototype.getLease = function() {
return /** @type{?proto.bosdyn.api.Lease} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.Lease, 2));
};
/**
* @param {?proto.bosdyn.api.Lease|undefined} value
* @return {!proto.bosdyn.api.LeaseResource} returns this
*/
proto.bosdyn.api.LeaseResource.prototype.setLease = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.LeaseResource} returns this
*/
proto.bosdyn.api.LeaseResource.prototype.clearLease = function() {
return this.setLease(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.LeaseResource.prototype.hasLease = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional LeaseOwner lease_owner = 3;
* @return {?proto.bosdyn.api.LeaseOwner}
*/
proto.bosdyn.api.LeaseResource.prototype.getLeaseOwner = function() {
return /** @type{?proto.bosdyn.api.LeaseOwner} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.LeaseOwner, 3));
};
/**
* @param {?proto.bosdyn.api.LeaseOwner|undefined} value
* @return {!proto.bosdyn.api.LeaseResource} returns this
*/
proto.bosdyn.api.LeaseResource.prototype.setLeaseOwner = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.LeaseResource} returns this
*/
proto.bosdyn.api.LeaseResource.prototype.clearLeaseOwner = function() {
return this.setLeaseOwner(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.LeaseResource.prototype.hasLeaseOwner = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.bosdyn.api.ListLeasesResponse.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.ListLeasesResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.ListLeasesResponse.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.ListLeasesResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListLeasesResponse.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f),
resourcesList: jspb.Message.toObjectList(msg.getResourcesList(),
proto.bosdyn.api.LeaseResource.toObject, includeInstance),
resourceTree: (f = msg.getResourceTree()) && proto.bosdyn.api.ResourceTree.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.ListLeasesResponse}
*/
proto.bosdyn.api.ListLeasesResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.ListLeasesResponse;
return proto.bosdyn.api.ListLeasesResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.ListLeasesResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.ListLeasesResponse}
*/
proto.bosdyn.api.ListLeasesResponse.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.LeaseResource;
reader.readMessage(value,proto.bosdyn.api.LeaseResource.deserializeBinaryFromReader);
msg.addResources(value);
break;
case 3:
var value = new proto.bosdyn.api.ResourceTree;
reader.readMessage(value,proto.bosdyn.api.ResourceTree.deserializeBinaryFromReader);
msg.setResourceTree(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.ListLeasesResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.ListLeasesResponse.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.ListLeasesResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.ListLeasesResponse.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.getResourcesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.bosdyn.api.LeaseResource.serializeBinaryToWriter
);
}
f = message.getResourceTree();
if (f != null) {
writer.writeMessage(
3,
f,
proto.bosdyn.api.ResourceTree.serializeBinaryToWriter
);
}
};
/**
* optional ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.ListLeasesResponse.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.ListLeasesResponse} returns this
*/
proto.bosdyn.api.ListLeasesResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ListLeasesResponse} returns this
*/
proto.bosdyn.api.ListLeasesResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ListLeasesResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* repeated LeaseResource resources = 2;
* @return {!Array<!proto.bosdyn.api.LeaseResource>}
*/
proto.bosdyn.api.ListLeasesResponse.prototype.getResourcesList = function() {
return /** @type{!Array<!proto.bosdyn.api.LeaseResource>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.bosdyn.api.LeaseResource, 2));
};
/**
* @param {!Array<!proto.bosdyn.api.LeaseResource>} value
* @return {!proto.bosdyn.api.ListLeasesResponse} returns this
*/
proto.bosdyn.api.ListLeasesResponse.prototype.setResourcesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.bosdyn.api.LeaseResource=} opt_value
* @param {number=} opt_index
* @return {!proto.bosdyn.api.LeaseResource}
*/
proto.bosdyn.api.ListLeasesResponse.prototype.addResources = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.bosdyn.api.LeaseResource, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bosdyn.api.ListLeasesResponse} returns this
*/
proto.bosdyn.api.ListLeasesResponse.prototype.clearResourcesList = function() {
return this.setResourcesList([]);
};
/**
* optional ResourceTree resource_tree = 3;
* @return {?proto.bosdyn.api.ResourceTree}
*/
proto.bosdyn.api.ListLeasesResponse.prototype.getResourceTree = function() {
return /** @type{?proto.bosdyn.api.ResourceTree} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.ResourceTree, 3));
};
/**
* @param {?proto.bosdyn.api.ResourceTree|undefined} value
* @return {!proto.bosdyn.api.ListLeasesResponse} returns this
*/
proto.bosdyn.api.ListLeasesResponse.prototype.setResourceTree = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.ListLeasesResponse} returns this
*/
proto.bosdyn.api.ListLeasesResponse.prototype.clearResourceTree = function() {
return this.setResourceTree(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.ListLeasesResponse.prototype.hasResourceTree = 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.RetainLeaseRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.RetainLeaseRequest.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.RetainLeaseRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.RetainLeaseRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
lease: (f = msg.getLease()) && proto.bosdyn.api.Lease.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.RetainLeaseRequest}
*/
proto.bosdyn.api.RetainLeaseRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.RetainLeaseRequest;
return proto.bosdyn.api.RetainLeaseRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.RetainLeaseRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.RetainLeaseRequest}
*/
proto.bosdyn.api.RetainLeaseRequest.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.Lease;
reader.readMessage(value,proto.bosdyn.api.Lease.deserializeBinaryFromReader);
msg.setLease(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.RetainLeaseRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.RetainLeaseRequest.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.RetainLeaseRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.RetainLeaseRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHeader();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_header_pb.RequestHeader.serializeBinaryToWriter
);
}
f = message.getLease();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.Lease.serializeBinaryToWriter
);
}
};
/**
* optional RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.RetainLeaseRequest.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.RetainLeaseRequest} returns this
*/
proto.bosdyn.api.RetainLeaseRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.RetainLeaseRequest} returns this
*/
proto.bosdyn.api.RetainLeaseRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.RetainLeaseRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Lease lease = 2;
* @return {?proto.bosdyn.api.Lease}
*/
proto.bosdyn.api.RetainLeaseRequest.prototype.getLease = function() {
return /** @type{?proto.bosdyn.api.Lease} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.Lease, 2));
};
/**
* @param {?proto.bosdyn.api.Lease|undefined} value
* @return {!proto.bosdyn.api.RetainLeaseRequest} returns this
*/
proto.bosdyn.api.RetainLeaseRequest.prototype.setLease = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.RetainLeaseRequest} returns this
*/
proto.bosdyn.api.RetainLeaseRequest.prototype.clearLease = function() {
return this.setLease(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.RetainLeaseRequest.prototype.hasLease = 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.RetainLeaseResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.RetainLeaseResponse.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.RetainLeaseResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.RetainLeaseResponse.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f),
leaseUseResult: (f = msg.getLeaseUseResult()) && proto.bosdyn.api.LeaseUseResult.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.RetainLeaseResponse}
*/
proto.bosdyn.api.RetainLeaseResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.RetainLeaseResponse;
return proto.bosdyn.api.RetainLeaseResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.RetainLeaseResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.RetainLeaseResponse}
*/
proto.bosdyn.api.RetainLeaseResponse.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.LeaseUseResult;
reader.readMessage(value,proto.bosdyn.api.LeaseUseResult.deserializeBinaryFromReader);
msg.setLeaseUseResult(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.RetainLeaseResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.RetainLeaseResponse.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.RetainLeaseResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.RetainLeaseResponse.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.getLeaseUseResult();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.LeaseUseResult.serializeBinaryToWriter
);
}
};
/**
* optional ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.RetainLeaseResponse.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.RetainLeaseResponse} returns this
*/
proto.bosdyn.api.RetainLeaseResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.RetainLeaseResponse} returns this
*/
proto.bosdyn.api.RetainLeaseResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.RetainLeaseResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional LeaseUseResult lease_use_result = 2;
* @return {?proto.bosdyn.api.LeaseUseResult}
*/
proto.bosdyn.api.RetainLeaseResponse.prototype.getLeaseUseResult = function() {
return /** @type{?proto.bosdyn.api.LeaseUseResult} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.LeaseUseResult, 2));
};
/**
* @param {?proto.bosdyn.api.LeaseUseResult|undefined} value
* @return {!proto.bosdyn.api.RetainLeaseResponse} returns this
*/
proto.bosdyn.api.RetainLeaseResponse.prototype.setLeaseUseResult = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.RetainLeaseResponse} returns this
*/
proto.bosdyn.api.RetainLeaseResponse.prototype.clearLeaseUseResult = function() {
return this.setLeaseUseResult(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.RetainLeaseResponse.prototype.hasLeaseUseResult = function() {
return jspb.Message.getField(this, 2) != null;
};
goog.object.extend(exports, proto.bosdyn.api);