spot-sdk-js
Version:
Develop applications and payloads for Spot using the unofficial Boston Dynamics Spot Node.js SDK.
1,515 lines (1,303 loc) • 53.5 kB
JavaScript
// source: bosdyn/api/spot_cam/power.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 google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
goog.object.extend(proto, google_protobuf_wrappers_pb);
var bosdyn_api_header_pb = require('../../../bosdyn/api/header_pb.js');
goog.object.extend(proto, bosdyn_api_header_pb);
goog.exportSymbol('proto.bosdyn.api.spot_cam.CyclePowerRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.spot_cam.CyclePowerResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.spot_cam.GetPowerStatusRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.spot_cam.GetPowerStatusResponse', null, global);
goog.exportSymbol('proto.bosdyn.api.spot_cam.PowerStatus', null, global);
goog.exportSymbol('proto.bosdyn.api.spot_cam.SetPowerStatusRequest', null, global);
goog.exportSymbol('proto.bosdyn.api.spot_cam.SetPowerStatusResponse', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot_cam.PowerStatus = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot_cam.PowerStatus, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot_cam.PowerStatus.displayName = 'proto.bosdyn.api.spot_cam.PowerStatus';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot_cam.GetPowerStatusRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.displayName = 'proto.bosdyn.api.spot_cam.GetPowerStatusRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot_cam.GetPowerStatusResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.displayName = 'proto.bosdyn.api.spot_cam.GetPowerStatusResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot_cam.SetPowerStatusRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.displayName = 'proto.bosdyn.api.spot_cam.SetPowerStatusRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot_cam.SetPowerStatusResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.displayName = 'proto.bosdyn.api.spot_cam.SetPowerStatusResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot_cam.CyclePowerRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.displayName = 'proto.bosdyn.api.spot_cam.CyclePowerRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bosdyn.api.spot_cam.CyclePowerResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.spot_cam.CyclePowerResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.spot_cam.CyclePowerResponse.displayName = 'proto.bosdyn.api.spot_cam.CyclePowerResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot_cam.PowerStatus.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot_cam.PowerStatus} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.PowerStatus.toObject = function(includeInstance, msg) {
var f, obj = {
ptz: (f = msg.getPtz()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f),
aux1: (f = msg.getAux1()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f),
aux2: (f = msg.getAux2()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f),
externalMic: (f = msg.getExternalMic()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot_cam.PowerStatus}
*/
proto.bosdyn.api.spot_cam.PowerStatus.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot_cam.PowerStatus;
return proto.bosdyn.api.spot_cam.PowerStatus.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot_cam.PowerStatus} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot_cam.PowerStatus}
*/
proto.bosdyn.api.spot_cam.PowerStatus.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = new google_protobuf_wrappers_pb.BoolValue;
reader.readMessage(value,google_protobuf_wrappers_pb.BoolValue.deserializeBinaryFromReader);
msg.setPtz(value);
break;
case 3:
var value = new google_protobuf_wrappers_pb.BoolValue;
reader.readMessage(value,google_protobuf_wrappers_pb.BoolValue.deserializeBinaryFromReader);
msg.setAux1(value);
break;
case 4:
var value = new google_protobuf_wrappers_pb.BoolValue;
reader.readMessage(value,google_protobuf_wrappers_pb.BoolValue.deserializeBinaryFromReader);
msg.setAux2(value);
break;
case 5:
var value = new google_protobuf_wrappers_pb.BoolValue;
reader.readMessage(value,google_protobuf_wrappers_pb.BoolValue.deserializeBinaryFromReader);
msg.setExternalMic(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot_cam.PowerStatus.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.spot_cam.PowerStatus} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.PowerStatus.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPtz();
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_wrappers_pb.BoolValue.serializeBinaryToWriter
);
}
f = message.getAux1();
if (f != null) {
writer.writeMessage(
3,
f,
google_protobuf_wrappers_pb.BoolValue.serializeBinaryToWriter
);
}
f = message.getAux2();
if (f != null) {
writer.writeMessage(
4,
f,
google_protobuf_wrappers_pb.BoolValue.serializeBinaryToWriter
);
}
f = message.getExternalMic();
if (f != null) {
writer.writeMessage(
5,
f,
google_protobuf_wrappers_pb.BoolValue.serializeBinaryToWriter
);
}
};
/**
* optional google.protobuf.BoolValue ptz = 2;
* @return {?proto.google.protobuf.BoolValue}
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.getPtz = function() {
return /** @type{?proto.google.protobuf.BoolValue} */ (
jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BoolValue, 2));
};
/**
* @param {?proto.google.protobuf.BoolValue|undefined} value
* @return {!proto.bosdyn.api.spot_cam.PowerStatus} returns this
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.setPtz = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.PowerStatus} returns this
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.clearPtz = function() {
return this.setPtz(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.hasPtz = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional google.protobuf.BoolValue aux1 = 3;
* @return {?proto.google.protobuf.BoolValue}
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.getAux1 = function() {
return /** @type{?proto.google.protobuf.BoolValue} */ (
jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BoolValue, 3));
};
/**
* @param {?proto.google.protobuf.BoolValue|undefined} value
* @return {!proto.bosdyn.api.spot_cam.PowerStatus} returns this
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.setAux1 = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.PowerStatus} returns this
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.clearAux1 = function() {
return this.setAux1(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.hasAux1 = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional google.protobuf.BoolValue aux2 = 4;
* @return {?proto.google.protobuf.BoolValue}
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.getAux2 = function() {
return /** @type{?proto.google.protobuf.BoolValue} */ (
jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BoolValue, 4));
};
/**
* @param {?proto.google.protobuf.BoolValue|undefined} value
* @return {!proto.bosdyn.api.spot_cam.PowerStatus} returns this
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.setAux2 = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.PowerStatus} returns this
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.clearAux2 = function() {
return this.setAux2(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.hasAux2 = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional google.protobuf.BoolValue external_mic = 5;
* @return {?proto.google.protobuf.BoolValue}
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.getExternalMic = function() {
return /** @type{?proto.google.protobuf.BoolValue} */ (
jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BoolValue, 5));
};
/**
* @param {?proto.google.protobuf.BoolValue|undefined} value
* @return {!proto.bosdyn.api.spot_cam.PowerStatus} returns this
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.setExternalMic = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.PowerStatus} returns this
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.clearExternalMic = function() {
return this.setExternalMic(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.PowerStatus.prototype.hasExternalMic = function() {
return jspb.Message.getField(this, 5) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot_cam.GetPowerStatusRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot_cam.GetPowerStatusRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot_cam.GetPowerStatusRequest}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot_cam.GetPowerStatusRequest;
return proto.bosdyn.api.spot_cam.GetPowerStatusRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot_cam.GetPowerStatusRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot_cam.GetPowerStatusRequest}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_header_pb.RequestHeader;
reader.readMessage(value,bosdyn_api_header_pb.RequestHeader.deserializeBinaryFromReader);
msg.setHeader(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.spot_cam.GetPowerStatusRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHeader();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_header_pb.RequestHeader.serializeBinaryToWriter
);
}
};
/**
* optional bosdyn.api.RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.prototype.getHeader = function() {
return /** @type{?proto.bosdyn.api.RequestHeader} */ (
jspb.Message.getWrapperField(this, bosdyn_api_header_pb.RequestHeader, 1));
};
/**
* @param {?proto.bosdyn.api.RequestHeader|undefined} value
* @return {!proto.bosdyn.api.spot_cam.GetPowerStatusRequest} returns this
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.GetPowerStatusRequest} returns this
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot_cam.GetPowerStatusResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot_cam.GetPowerStatusResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f),
status: (f = msg.getStatus()) && proto.bosdyn.api.spot_cam.PowerStatus.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot_cam.GetPowerStatusResponse}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot_cam.GetPowerStatusResponse;
return proto.bosdyn.api.spot_cam.GetPowerStatusResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot_cam.GetPowerStatusResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot_cam.GetPowerStatusResponse}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_header_pb.ResponseHeader;
reader.readMessage(value,bosdyn_api_header_pb.ResponseHeader.deserializeBinaryFromReader);
msg.setHeader(value);
break;
case 2:
var value = new proto.bosdyn.api.spot_cam.PowerStatus;
reader.readMessage(value,proto.bosdyn.api.spot_cam.PowerStatus.deserializeBinaryFromReader);
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.spot_cam.GetPowerStatusResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.spot_cam.GetPowerStatusResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.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 != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.spot_cam.PowerStatus.serializeBinaryToWriter
);
}
};
/**
* optional bosdyn.api.ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.prototype.getHeader = function() {
return /** @type{?proto.bosdyn.api.ResponseHeader} */ (
jspb.Message.getWrapperField(this, bosdyn_api_header_pb.ResponseHeader, 1));
};
/**
* @param {?proto.bosdyn.api.ResponseHeader|undefined} value
* @return {!proto.bosdyn.api.spot_cam.GetPowerStatusResponse} returns this
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.GetPowerStatusResponse} returns this
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional PowerStatus status = 2;
* @return {?proto.bosdyn.api.spot_cam.PowerStatus}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.prototype.getStatus = function() {
return /** @type{?proto.bosdyn.api.spot_cam.PowerStatus} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot_cam.PowerStatus, 2));
};
/**
* @param {?proto.bosdyn.api.spot_cam.PowerStatus|undefined} value
* @return {!proto.bosdyn.api.spot_cam.GetPowerStatusResponse} returns this
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.prototype.setStatus = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.GetPowerStatusResponse} returns this
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.prototype.clearStatus = function() {
return this.setStatus(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.GetPowerStatusResponse.prototype.hasStatus = function() {
return jspb.Message.getField(this, 2) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot_cam.SetPowerStatusRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot_cam.SetPowerStatusRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
status: (f = msg.getStatus()) && proto.bosdyn.api.spot_cam.PowerStatus.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusRequest}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot_cam.SetPowerStatusRequest;
return proto.bosdyn.api.spot_cam.SetPowerStatusRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot_cam.SetPowerStatusRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusRequest}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_header_pb.RequestHeader;
reader.readMessage(value,bosdyn_api_header_pb.RequestHeader.deserializeBinaryFromReader);
msg.setHeader(value);
break;
case 2:
var value = new proto.bosdyn.api.spot_cam.PowerStatus;
reader.readMessage(value,proto.bosdyn.api.spot_cam.PowerStatus.deserializeBinaryFromReader);
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.spot_cam.SetPowerStatusRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.spot_cam.SetPowerStatusRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.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.getStatus();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.spot_cam.PowerStatus.serializeBinaryToWriter
);
}
};
/**
* optional bosdyn.api.RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.prototype.getHeader = function() {
return /** @type{?proto.bosdyn.api.RequestHeader} */ (
jspb.Message.getWrapperField(this, bosdyn_api_header_pb.RequestHeader, 1));
};
/**
* @param {?proto.bosdyn.api.RequestHeader|undefined} value
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusRequest} returns this
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusRequest} returns this
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional PowerStatus status = 2;
* @return {?proto.bosdyn.api.spot_cam.PowerStatus}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.prototype.getStatus = function() {
return /** @type{?proto.bosdyn.api.spot_cam.PowerStatus} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot_cam.PowerStatus, 2));
};
/**
* @param {?proto.bosdyn.api.spot_cam.PowerStatus|undefined} value
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusRequest} returns this
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.prototype.setStatus = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusRequest} returns this
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.prototype.clearStatus = function() {
return this.setStatus(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusRequest.prototype.hasStatus = function() {
return jspb.Message.getField(this, 2) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot_cam.SetPowerStatusResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot_cam.SetPowerStatusResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f),
status: (f = msg.getStatus()) && proto.bosdyn.api.spot_cam.PowerStatus.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusResponse}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot_cam.SetPowerStatusResponse;
return proto.bosdyn.api.spot_cam.SetPowerStatusResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot_cam.SetPowerStatusResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusResponse}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_header_pb.ResponseHeader;
reader.readMessage(value,bosdyn_api_header_pb.ResponseHeader.deserializeBinaryFromReader);
msg.setHeader(value);
break;
case 2:
var value = new proto.bosdyn.api.spot_cam.PowerStatus;
reader.readMessage(value,proto.bosdyn.api.spot_cam.PowerStatus.deserializeBinaryFromReader);
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.spot_cam.SetPowerStatusResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.spot_cam.SetPowerStatusResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.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 != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.spot_cam.PowerStatus.serializeBinaryToWriter
);
}
};
/**
* optional bosdyn.api.ResponseHeader header = 1;
* @return {?proto.bosdyn.api.ResponseHeader}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.prototype.getHeader = function() {
return /** @type{?proto.bosdyn.api.ResponseHeader} */ (
jspb.Message.getWrapperField(this, bosdyn_api_header_pb.ResponseHeader, 1));
};
/**
* @param {?proto.bosdyn.api.ResponseHeader|undefined} value
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusResponse} returns this
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusResponse} returns this
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional PowerStatus status = 2;
* @return {?proto.bosdyn.api.spot_cam.PowerStatus}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.prototype.getStatus = function() {
return /** @type{?proto.bosdyn.api.spot_cam.PowerStatus} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot_cam.PowerStatus, 2));
};
/**
* @param {?proto.bosdyn.api.spot_cam.PowerStatus|undefined} value
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusResponse} returns this
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.prototype.setStatus = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.SetPowerStatusResponse} returns this
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.prototype.clearStatus = function() {
return this.setStatus(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.SetPowerStatusResponse.prototype.hasStatus = function() {
return jspb.Message.getField(this, 2) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot_cam.CyclePowerRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot_cam.CyclePowerRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f),
status: (f = msg.getStatus()) && proto.bosdyn.api.spot_cam.PowerStatus.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot_cam.CyclePowerRequest}
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot_cam.CyclePowerRequest;
return proto.bosdyn.api.spot_cam.CyclePowerRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot_cam.CyclePowerRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot_cam.CyclePowerRequest}
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_header_pb.RequestHeader;
reader.readMessage(value,bosdyn_api_header_pb.RequestHeader.deserializeBinaryFromReader);
msg.setHeader(value);
break;
case 2:
var value = new proto.bosdyn.api.spot_cam.PowerStatus;
reader.readMessage(value,proto.bosdyn.api.spot_cam.PowerStatus.deserializeBinaryFromReader);
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.spot_cam.CyclePowerRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.spot_cam.CyclePowerRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bosdyn.api.spot_cam.CyclePowerRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.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.getStatus();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bosdyn.api.spot_cam.PowerStatus.serializeBinaryToWriter
);
}
};
/**
* optional bosdyn.api.RequestHeader header = 1;
* @return {?proto.bosdyn.api.RequestHeader}
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.prototype.getHeader = function() {
return /** @type{?proto.bosdyn.api.RequestHeader} */ (
jspb.Message.getWrapperField(this, bosdyn_api_header_pb.RequestHeader, 1));
};
/**
* @param {?proto.bosdyn.api.RequestHeader|undefined} value
* @return {!proto.bosdyn.api.spot_cam.CyclePowerRequest} returns this
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.prototype.setHeader = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.CyclePowerRequest} returns this
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.prototype.clearHeader = function() {
return this.setHeader(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.prototype.hasHeader = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional PowerStatus status = 2;
* @return {?proto.bosdyn.api.spot_cam.PowerStatus}
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.prototype.getStatus = function() {
return /** @type{?proto.bosdyn.api.spot_cam.PowerStatus} */ (
jspb.Message.getWrapperField(this, proto.bosdyn.api.spot_cam.PowerStatus, 2));
};
/**
* @param {?proto.bosdyn.api.spot_cam.PowerStatus|undefined} value
* @return {!proto.bosdyn.api.spot_cam.CyclePowerRequest} returns this
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.prototype.setStatus = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.spot_cam.CyclePowerRequest} returns this
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.prototype.clearStatus = function() {
return this.setStatus(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.spot_cam.CyclePowerRequest.prototype.hasStatus = function() {
return jspb.Message.getField(this, 2) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bosdyn.api.spot_cam.CyclePowerResponse.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.spot_cam.CyclePowerResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bosdyn.api.spot_cam.CyclePowerResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.spot_cam.CyclePowerResponse.toObject = function(includeInstance, msg) {
var f, obj = {
header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f),
status: (f = msg.getStatus()) && proto.bosdyn.api.spot_cam.PowerStatus.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bosdyn.api.spot_cam.CyclePowerResponse}
*/
proto.bosdyn.api.spot_cam.CyclePowerResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.spot_cam.CyclePowerResponse;
return proto.bosdyn.api.spot_cam.CyclePowerResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.spot_cam.CyclePowerResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.spot_cam.CyclePowerResponse}
*/
proto.bosdyn.api.spot_cam.CyclePowerResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new bosdyn_api_header_pb.ResponseHeader;
reader.readMessage(value,bosdyn_api_header_pb.ResponseHeader.deserializeBinaryFromReader);
msg.setHeader(value);
break;
case 2:
var value = new proto.bosdyn.api.spot_cam.PowerStatu