@huddly/camera-switch-proto
Version:
An npm package describing the protobuf api the huddly camera switch service
1,301 lines (1,111 loc) • 38.7 kB
JavaScript
/**
* @fileoverview
* @enhanceable
* @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!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
goog.exportSymbol('proto.huddly.AvailableCameras', null, global);
goog.exportSymbol('proto.huddly.CameraInfo', null, global);
goog.exportSymbol('proto.huddly.CameraInfoWrite', null, global);
goog.exportSymbol('proto.huddly.CameraPairingState', null, global);
goog.exportSymbol('proto.huddly.FwUpdateSchedule', null, global);
goog.exportSymbol('proto.huddly.FwUpdateScheduleStatus', null, global);
goog.exportSymbol('proto.huddly.FwUpdateScheduleStatusCodes', null, global);
goog.exportSymbol('proto.huddly.UserPtz', null, global);
goog.exportSymbol('proto.huddly.VersionState', 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.huddly.UserPtz = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.huddly.UserPtz, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.huddly.UserPtz.displayName = 'proto.huddly.UserPtz';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.huddly.UserPtz.prototype.toObject = function(opt_includeInstance) {
return proto.huddly.UserPtz.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.huddly.UserPtz} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.UserPtz.toObject = function(includeInstance, msg) {
var f, obj = {
enabled: jspb.Message.getFieldWithDefault(msg, 1, 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.huddly.UserPtz}
*/
proto.huddly.UserPtz.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.huddly.UserPtz;
return proto.huddly.UserPtz.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.huddly.UserPtz} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.huddly.UserPtz}
*/
proto.huddly.UserPtz.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {boolean} */ (reader.readBool());
msg.setEnabled(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.huddly.UserPtz.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.huddly.UserPtz.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.huddly.UserPtz} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.UserPtz.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getEnabled();
if (f) {
writer.writeBool(
1,
f
);
}
};
/**
* optional bool enabled = 1;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.huddly.UserPtz.prototype.getEnabled = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false));
};
/** @param {boolean} value */
proto.huddly.UserPtz.prototype.setEnabled = function(value) {
jspb.Message.setProto3BooleanField(this, 1, value);
};
/**
* 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.huddly.CameraInfoWrite = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.huddly.CameraInfoWrite, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.huddly.CameraInfoWrite.displayName = 'proto.huddly.CameraInfoWrite';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.huddly.CameraInfoWrite.prototype.toObject = function(opt_includeInstance) {
return proto.huddly.CameraInfoWrite.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.huddly.CameraInfoWrite} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.CameraInfoWrite.toObject = function(includeInstance, msg) {
var f, obj = {
ip: jspb.Message.getFieldWithDefault(msg, 1, ""),
name: 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.huddly.CameraInfoWrite}
*/
proto.huddly.CameraInfoWrite.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.huddly.CameraInfoWrite;
return proto.huddly.CameraInfoWrite.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.huddly.CameraInfoWrite} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.huddly.CameraInfoWrite}
*/
proto.huddly.CameraInfoWrite.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.setIp(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.huddly.CameraInfoWrite.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.huddly.CameraInfoWrite.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.huddly.CameraInfoWrite} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.CameraInfoWrite.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getIp();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string ip = 1;
* @return {string}
*/
proto.huddly.CameraInfoWrite.prototype.getIp = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.huddly.CameraInfoWrite.prototype.setIp = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string name = 2;
* @return {string}
*/
proto.huddly.CameraInfoWrite.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.huddly.CameraInfoWrite.prototype.setName = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* 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.huddly.CameraInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.huddly.CameraInfo.repeatedFields_, null);
};
goog.inherits(proto.huddly.CameraInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.huddly.CameraInfo.displayName = 'proto.huddly.CameraInfo';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.huddly.CameraInfo.repeatedFields_ = [6];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.huddly.CameraInfo.prototype.toObject = function(opt_includeInstance) {
return proto.huddly.CameraInfo.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.huddly.CameraInfo} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.CameraInfo.toObject = function(includeInstance, msg) {
var f, obj = {
ip: jspb.Message.getFieldWithDefault(msg, 2, ""),
name: jspb.Message.getFieldWithDefault(msg, 3, ""),
version: jspb.Message.getFieldWithDefault(msg, 4, ""),
versionState: jspb.Message.getFieldWithDefault(msg, 5, 0),
pairingStatesList: jspb.Message.getRepeatedField(msg, 6)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.huddly.CameraInfo}
*/
proto.huddly.CameraInfo.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.huddly.CameraInfo;
return proto.huddly.CameraInfo.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.huddly.CameraInfo} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.huddly.CameraInfo}
*/
proto.huddly.CameraInfo.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setIp(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setVersion(value);
break;
case 5:
var value = /** @type {!proto.huddly.VersionState} */ (reader.readEnum());
msg.setVersionState(value);
break;
case 6:
var value = /** @type {!Array<!proto.huddly.CameraPairingState>} */ (reader.readPackedEnum());
msg.setPairingStatesList(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.huddly.CameraInfo.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.huddly.CameraInfo.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.huddly.CameraInfo} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.CameraInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getIp();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getVersion();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getVersionState();
if (f !== 0.0) {
writer.writeEnum(
5,
f
);
}
f = message.getPairingStatesList();
if (f.length > 0) {
writer.writePackedEnum(
6,
f
);
}
};
/**
* optional string ip = 2;
* @return {string}
*/
proto.huddly.CameraInfo.prototype.getIp = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.huddly.CameraInfo.prototype.setIp = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string name = 3;
* @return {string}
*/
proto.huddly.CameraInfo.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.huddly.CameraInfo.prototype.setName = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string version = 4;
* @return {string}
*/
proto.huddly.CameraInfo.prototype.getVersion = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/** @param {string} value */
proto.huddly.CameraInfo.prototype.setVersion = function(value) {
jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional VersionState version_state = 5;
* @return {!proto.huddly.VersionState}
*/
proto.huddly.CameraInfo.prototype.getVersionState = function() {
return /** @type {!proto.huddly.VersionState} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/** @param {!proto.huddly.VersionState} value */
proto.huddly.CameraInfo.prototype.setVersionState = function(value) {
jspb.Message.setProto3EnumField(this, 5, value);
};
/**
* repeated CameraPairingState pairing_states = 6;
* @return {!Array<!proto.huddly.CameraPairingState>}
*/
proto.huddly.CameraInfo.prototype.getPairingStatesList = function() {
return /** @type {!Array<!proto.huddly.CameraPairingState>} */ (jspb.Message.getRepeatedField(this, 6));
};
/** @param {!Array<!proto.huddly.CameraPairingState>} value */
proto.huddly.CameraInfo.prototype.setPairingStatesList = function(value) {
jspb.Message.setField(this, 6, value || []);
};
/**
* @param {!proto.huddly.CameraPairingState} value
* @param {number=} opt_index
*/
proto.huddly.CameraInfo.prototype.addPairingStates = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 6, value, opt_index);
};
proto.huddly.CameraInfo.prototype.clearPairingStatesList = function() {
this.setPairingStatesList([]);
};
/**
* 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.huddly.AvailableCameras = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.huddly.AvailableCameras.repeatedFields_, null);
};
goog.inherits(proto.huddly.AvailableCameras, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.huddly.AvailableCameras.displayName = 'proto.huddly.AvailableCameras';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.huddly.AvailableCameras.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.huddly.AvailableCameras.prototype.toObject = function(opt_includeInstance) {
return proto.huddly.AvailableCameras.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.huddly.AvailableCameras} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.AvailableCameras.toObject = function(includeInstance, msg) {
var f, obj = {
cameraListList: jspb.Message.toObjectList(msg.getCameraListList(),
proto.huddly.CameraInfo.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.huddly.AvailableCameras}
*/
proto.huddly.AvailableCameras.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.huddly.AvailableCameras;
return proto.huddly.AvailableCameras.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.huddly.AvailableCameras} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.huddly.AvailableCameras}
*/
proto.huddly.AvailableCameras.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.huddly.CameraInfo;
reader.readMessage(value,proto.huddly.CameraInfo.deserializeBinaryFromReader);
msg.addCameraList(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.huddly.AvailableCameras.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.huddly.AvailableCameras.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.huddly.AvailableCameras} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.AvailableCameras.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCameraListList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.huddly.CameraInfo.serializeBinaryToWriter
);
}
};
/**
* repeated CameraInfo camera_list = 1;
* @return {!Array<!proto.huddly.CameraInfo>}
*/
proto.huddly.AvailableCameras.prototype.getCameraListList = function() {
return /** @type{!Array<!proto.huddly.CameraInfo>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.huddly.CameraInfo, 1));
};
/** @param {!Array<!proto.huddly.CameraInfo>} value */
proto.huddly.AvailableCameras.prototype.setCameraListList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.huddly.CameraInfo=} opt_value
* @param {number=} opt_index
* @return {!proto.huddly.CameraInfo}
*/
proto.huddly.AvailableCameras.prototype.addCameraList = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.huddly.CameraInfo, opt_index);
};
proto.huddly.AvailableCameras.prototype.clearCameraListList = function() {
this.setCameraListList([]);
};
/**
* 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.huddly.FwUpdateSchedule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.huddly.FwUpdateSchedule.repeatedFields_, null);
};
goog.inherits(proto.huddly.FwUpdateSchedule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.huddly.FwUpdateSchedule.displayName = 'proto.huddly.FwUpdateSchedule';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.huddly.FwUpdateSchedule.repeatedFields_ = [4];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.huddly.FwUpdateSchedule.prototype.toObject = function(opt_includeInstance) {
return proto.huddly.FwUpdateSchedule.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.huddly.FwUpdateSchedule} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.FwUpdateSchedule.toObject = function(includeInstance, msg) {
var f, obj = {
daysOfWeek: jspb.Message.getFieldWithDefault(msg, 1, ""),
hourOfDay: jspb.Message.getFieldWithDefault(msg, 2, 0),
startDelayMaxSeconds: jspb.Message.getFieldWithDefault(msg, 3, 0),
validPairingStatesList: jspb.Message.getRepeatedField(msg, 4),
disabled: jspb.Message.getFieldWithDefault(msg, 5, 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.huddly.FwUpdateSchedule}
*/
proto.huddly.FwUpdateSchedule.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.huddly.FwUpdateSchedule;
return proto.huddly.FwUpdateSchedule.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.huddly.FwUpdateSchedule} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.huddly.FwUpdateSchedule}
*/
proto.huddly.FwUpdateSchedule.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.setDaysOfWeek(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint32());
msg.setHourOfDay(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint32());
msg.setStartDelayMaxSeconds(value);
break;
case 4:
var value = /** @type {!Array<!proto.huddly.CameraPairingState>} */ (reader.readPackedEnum());
msg.setValidPairingStatesList(value);
break;
case 5:
var value = /** @type {boolean} */ (reader.readBool());
msg.setDisabled(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.huddly.FwUpdateSchedule.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.huddly.FwUpdateSchedule.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.huddly.FwUpdateSchedule} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.FwUpdateSchedule.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDaysOfWeek();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getHourOfDay();
if (f !== 0) {
writer.writeUint32(
2,
f
);
}
f = message.getStartDelayMaxSeconds();
if (f !== 0) {
writer.writeUint32(
3,
f
);
}
f = message.getValidPairingStatesList();
if (f.length > 0) {
writer.writePackedEnum(
4,
f
);
}
f = message.getDisabled();
if (f) {
writer.writeBool(
5,
f
);
}
};
/**
* optional string days_of_week = 1;
* @return {string}
*/
proto.huddly.FwUpdateSchedule.prototype.getDaysOfWeek = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.huddly.FwUpdateSchedule.prototype.setDaysOfWeek = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional uint32 hour_of_day = 2;
* @return {number}
*/
proto.huddly.FwUpdateSchedule.prototype.getHourOfDay = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.huddly.FwUpdateSchedule.prototype.setHourOfDay = function(value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional uint32 start_delay_max_seconds = 3;
* @return {number}
*/
proto.huddly.FwUpdateSchedule.prototype.getStartDelayMaxSeconds = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.huddly.FwUpdateSchedule.prototype.setStartDelayMaxSeconds = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* repeated CameraPairingState valid_pairing_states = 4;
* @return {!Array<!proto.huddly.CameraPairingState>}
*/
proto.huddly.FwUpdateSchedule.prototype.getValidPairingStatesList = function() {
return /** @type {!Array<!proto.huddly.CameraPairingState>} */ (jspb.Message.getRepeatedField(this, 4));
};
/** @param {!Array<!proto.huddly.CameraPairingState>} value */
proto.huddly.FwUpdateSchedule.prototype.setValidPairingStatesList = function(value) {
jspb.Message.setField(this, 4, value || []);
};
/**
* @param {!proto.huddly.CameraPairingState} value
* @param {number=} opt_index
*/
proto.huddly.FwUpdateSchedule.prototype.addValidPairingStates = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 4, value, opt_index);
};
proto.huddly.FwUpdateSchedule.prototype.clearValidPairingStatesList = function() {
this.setValidPairingStatesList([]);
};
/**
* optional bool disabled = 5;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.huddly.FwUpdateSchedule.prototype.getDisabled = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false));
};
/** @param {boolean} value */
proto.huddly.FwUpdateSchedule.prototype.setDisabled = function(value) {
jspb.Message.setProto3BooleanField(this, 5, value);
};
/**
* 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.huddly.FwUpdateScheduleStatus = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.huddly.FwUpdateScheduleStatus.repeatedFields_, null);
};
goog.inherits(proto.huddly.FwUpdateScheduleStatus, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.huddly.FwUpdateScheduleStatus.displayName = 'proto.huddly.FwUpdateScheduleStatus';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.huddly.FwUpdateScheduleStatus.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.huddly.FwUpdateScheduleStatus.prototype.toObject = function(opt_includeInstance) {
return proto.huddly.FwUpdateScheduleStatus.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.huddly.FwUpdateScheduleStatus} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.FwUpdateScheduleStatus.toObject = function(includeInstance, msg) {
var f, obj = {
message: jspb.Message.getFieldWithDefault(msg, 1, ""),
code: jspb.Message.getFieldWithDefault(msg, 2, 0),
affectedCamerasList: jspb.Message.toObjectList(msg.getAffectedCamerasList(),
proto.huddly.CameraInfo.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.huddly.FwUpdateScheduleStatus}
*/
proto.huddly.FwUpdateScheduleStatus.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.huddly.FwUpdateScheduleStatus;
return proto.huddly.FwUpdateScheduleStatus.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.huddly.FwUpdateScheduleStatus} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.huddly.FwUpdateScheduleStatus}
*/
proto.huddly.FwUpdateScheduleStatus.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.setMessage(value);
break;
case 2:
var value = /** @type {!proto.huddly.FwUpdateScheduleStatusCodes} */ (reader.readEnum());
msg.setCode(value);
break;
case 3:
var value = new proto.huddly.CameraInfo;
reader.readMessage(value,proto.huddly.CameraInfo.deserializeBinaryFromReader);
msg.addAffectedCameras(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.huddly.FwUpdateScheduleStatus.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.huddly.FwUpdateScheduleStatus.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.huddly.FwUpdateScheduleStatus} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.huddly.FwUpdateScheduleStatus.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMessage();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getCode();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getAffectedCamerasList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.huddly.CameraInfo.serializeBinaryToWriter
);
}
};
/**
* optional string message = 1;
* @return {string}
*/
proto.huddly.FwUpdateScheduleStatus.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.huddly.FwUpdateScheduleStatus.prototype.setMessage = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional FwUpdateScheduleStatusCodes code = 2;
* @return {!proto.huddly.FwUpdateScheduleStatusCodes}
*/
proto.huddly.FwUpdateScheduleStatus.prototype.getCode = function() {
return /** @type {!proto.huddly.FwUpdateScheduleStatusCodes} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {!proto.huddly.FwUpdateScheduleStatusCodes} value */
proto.huddly.FwUpdateScheduleStatus.prototype.setCode = function(value) {
jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* repeated CameraInfo affected_cameras = 3;
* @return {!Array<!proto.huddly.CameraInfo>}
*/
proto.huddly.FwUpdateScheduleStatus.prototype.getAffectedCamerasList = function() {
return /** @type{!Array<!proto.huddly.CameraInfo>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.huddly.CameraInfo, 3));
};
/** @param {!Array<!proto.huddly.CameraInfo>} value */
proto.huddly.FwUpdateScheduleStatus.prototype.setAffectedCamerasList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.huddly.CameraInfo=} opt_value
* @param {number=} opt_index
* @return {!proto.huddly.CameraInfo}
*/
proto.huddly.FwUpdateScheduleStatus.prototype.addAffectedCameras = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.huddly.CameraInfo, opt_index);
};
proto.huddly.FwUpdateScheduleStatus.prototype.clearAffectedCamerasList = function() {
this.setAffectedCamerasList([]);
};
/**
* @enum {number}
*/
proto.huddly.VersionState = {
UNKNOWNVERSIONSTATE: 0,
VERIFIED: 1,
UNVERIFIED: 2,
RECOVERY: 3
};
/**
* @enum {number}
*/
proto.huddly.CameraPairingState = {
UNKNOWNPAIRINGSTATE: 0,
DEFAULT: 1,
ACTIVE: 2,
PAIRED: 3
};
/**
* @enum {number}
*/
proto.huddly.FwUpdateScheduleStatusCodes = {
UNKNOWN: 0,
SUCCESS: 1,
FAILED: 2
};
goog.object.extend(exports, proto.huddly);