1
0
Fork 0
leet/clients/switch/framebuffer/framebuffer_pb.js

779 lines
21 KiB
JavaScript

/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.DrawResponse', null, global);
goog.exportSymbol('proto.FrameBuffer', null, global);
goog.exportSymbol('proto.FrameData', null, global);
goog.exportSymbol('proto.FrameSequence', null, global);
goog.exportSymbol('proto.Layer', 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.FrameData = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.FrameData.repeatedFields_, null);
};
goog.inherits(proto.FrameData, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.FrameData.displayName = 'proto.FrameData';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.FrameData.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.FrameData.prototype.toObject = function(opt_includeInstance) {
return proto.FrameData.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.FrameData} msg The msg instance to transform.
* @return {!Object}
*/
proto.FrameData.toObject = function(includeInstance, msg) {
var f, obj = {
dotsList: jspb.Message.getField(msg, 1),
fill: msg.getFill()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.FrameData}
*/
proto.FrameData.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.FrameData;
return proto.FrameData.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.FrameData} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.FrameData}
*/
proto.FrameData.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Array.<number>} */ (reader.readPackedFixed32());
msg.setDotsList(value);
break;
case 2:
var value = /** @type {number} */ (reader.readFixed32());
msg.setFill(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.FrameData} message
* @param {!jspb.BinaryWriter} writer
*/
proto.FrameData.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.FrameData.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.FrameData.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getDotsList();
if (f.length > 0) {
writer.writePackedFixed32(
1,
f
);
}
f = this.getFill();
if (f !== 0) {
writer.writeFixed32(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.FrameData} The clone.
*/
proto.FrameData.prototype.cloneMessage = function() {
return /** @type {!proto.FrameData} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated fixed32 dots = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<number>}
*/
proto.FrameData.prototype.getDotsList = function() {
return /** @type {!Array.<number>} */ (jspb.Message.getField(this, 1));
};
/** @param {Array.<number>} value */
proto.FrameData.prototype.setDotsList = function(value) {
jspb.Message.setField(this, 1, value || []);
};
proto.FrameData.prototype.clearDotsList = function() {
jspb.Message.setField(this, 1, []);
};
/**
* optional fixed32 fill = 2;
* @return {number}
*/
proto.FrameData.prototype.getFill = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0));
};
/** @param {number} value */
proto.FrameData.prototype.setFill = function(value) {
jspb.Message.setField(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.FrameBuffer = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.FrameBuffer, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.FrameBuffer.displayName = 'proto.FrameBuffer';
}
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.FrameBuffer.prototype.toObject = function(opt_includeInstance) {
return proto.FrameBuffer.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.FrameBuffer} msg The msg instance to transform.
* @return {!Object}
*/
proto.FrameBuffer.toObject = function(includeInstance, msg) {
var f, obj = {
frame: (f = msg.getFrame()) && proto.FrameData.toObject(includeInstance, f),
timestamp: msg.getTimestamp(),
layer: msg.getLayer()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.FrameBuffer}
*/
proto.FrameBuffer.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.FrameBuffer;
return proto.FrameBuffer.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.FrameBuffer} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.FrameBuffer}
*/
proto.FrameBuffer.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.FrameData;
reader.readMessage(value,proto.FrameData.deserializeBinaryFromReader);
msg.setFrame(value);
break;
case 3:
var value = /** @type {number} */ (reader.readFixed32());
msg.setTimestamp(value);
break;
case 4:
var value = /** @type {!proto.Layer} */ (reader.readEnum());
msg.setLayer(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.FrameBuffer} message
* @param {!jspb.BinaryWriter} writer
*/
proto.FrameBuffer.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.FrameBuffer.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.FrameBuffer.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getFrame();
if (f != null) {
writer.writeMessage(
1,
f,
proto.FrameData.serializeBinaryToWriter
);
}
f = this.getTimestamp();
if (f !== 0) {
writer.writeFixed32(
3,
f
);
}
f = this.getLayer();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.FrameBuffer} The clone.
*/
proto.FrameBuffer.prototype.cloneMessage = function() {
return /** @type {!proto.FrameBuffer} */ (jspb.Message.cloneMessage(this));
};
/**
* optional FrameData frame = 1;
* @return {proto.FrameData}
*/
proto.FrameBuffer.prototype.getFrame = function() {
return /** @type{proto.FrameData} */ (
jspb.Message.getWrapperField(this, proto.FrameData, 1));
};
/** @param {proto.FrameData|undefined} value */
proto.FrameBuffer.prototype.setFrame = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.FrameBuffer.prototype.clearFrame = function() {
this.setFrame(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.FrameBuffer.prototype.hasFrame = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional fixed32 timestamp = 3;
* @return {number}
*/
proto.FrameBuffer.prototype.getTimestamp = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
};
/** @param {number} value */
proto.FrameBuffer.prototype.setTimestamp = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* optional Layer layer = 4;
* @return {!proto.Layer}
*/
proto.FrameBuffer.prototype.getLayer = function() {
return /** @type {!proto.Layer} */ (jspb.Message.getFieldProto3(this, 4, 0));
};
/** @param {!proto.Layer} value */
proto.FrameBuffer.prototype.setLayer = function(value) {
jspb.Message.setField(this, 4, 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.FrameSequence = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.FrameSequence.repeatedFields_, null);
};
goog.inherits(proto.FrameSequence, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.FrameSequence.displayName = 'proto.FrameSequence';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.FrameSequence.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.FrameSequence.prototype.toObject = function(opt_includeInstance) {
return proto.FrameSequence.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.FrameSequence} msg The msg instance to transform.
* @return {!Object}
*/
proto.FrameSequence.toObject = function(includeInstance, msg) {
var f, obj = {
framesList: jspb.Message.toObjectList(msg.getFramesList(),
proto.FrameBuffer.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.FrameSequence}
*/
proto.FrameSequence.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.FrameSequence;
return proto.FrameSequence.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.FrameSequence} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.FrameSequence}
*/
proto.FrameSequence.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.FrameBuffer;
reader.readMessage(value,proto.FrameBuffer.deserializeBinaryFromReader);
msg.getFramesList().push(value);
msg.setFramesList(msg.getFramesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.FrameSequence} message
* @param {!jspb.BinaryWriter} writer
*/
proto.FrameSequence.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.FrameSequence.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.FrameSequence.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getFramesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.FrameBuffer.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.FrameSequence} The clone.
*/
proto.FrameSequence.prototype.cloneMessage = function() {
return /** @type {!proto.FrameSequence} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated FrameBuffer frames = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.FrameBuffer>}
*/
proto.FrameSequence.prototype.getFramesList = function() {
return /** @type{!Array.<!proto.FrameBuffer>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.FrameBuffer, 1));
};
/** @param {Array.<!proto.FrameBuffer>} value */
proto.FrameSequence.prototype.setFramesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
proto.FrameSequence.prototype.clearFramesList = function() {
this.setFramesList([]);
};
/**
* 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.DrawResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.DrawResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.DrawResponse.displayName = 'proto.DrawResponse';
}
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.DrawResponse.prototype.toObject = function(opt_includeInstance) {
return proto.DrawResponse.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.DrawResponse} msg The msg instance to transform.
* @return {!Object}
*/
proto.DrawResponse.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.DrawResponse}
*/
proto.DrawResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.DrawResponse;
return proto.DrawResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.DrawResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.DrawResponse}
*/
proto.DrawResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.DrawResponse} message
* @param {!jspb.BinaryWriter} writer
*/
proto.DrawResponse.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.DrawResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.DrawResponse.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.DrawResponse} The clone.
*/
proto.DrawResponse.prototype.cloneMessage = function() {
return /** @type {!proto.DrawResponse} */ (jspb.Message.cloneMessage(this));
};
/**
* @enum {number}
*/
proto.Layer = {
NONE: 0,
LIGHT: 10,
COLOR: 20,
NOTIFICATIONS: 90,
GENERAL_0: 40,
GENERAL_1: 41,
GENERAL_2: 42,
GENERAL_3: 43,
GENERAL_4: 44,
GENERAL_5: 45,
GENERAL_6: 46,
GENERAL_7: 47,
GENERAL_8: 48,
GENERAL_9: 49
};
goog.object.extend(exports, proto);