// source: flatData.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
goog.provide('proto.Rows');
goog.require('jspb.BinaryReader');
goog.require('jspb.BinaryWriter');
goog.require('jspb.Message');
goog.require('proto.Entry');
/**
* 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.Rows = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.Rows.repeatedFields_, null);
};
goog.inherits(proto.Rows, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.Rows.displayName = 'proto.Rows';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.Rows.repeatedFields_ = [1,2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.Rows.prototype.toObject = function(opt_includeInstance) {
return proto.Rows.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.Rows} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.Rows.toObject = function(includeInstance, msg) {
var f, obj = {
datesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
rowList: jspb.Message.toObjectList(msg.getRowList(),
proto.Entry.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.Rows}
*/
proto.Rows.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.Rows;
return proto.Rows.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.Rows} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.Rows}
*/
proto.Rows.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.addDates(value);
break;
case 2:
var value = new proto.Entry;
reader.readMessage(value,proto.Entry.deserializeBinaryFromReader);
msg.addRow(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.Rows.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.Rows.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.Rows} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.Rows.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDatesList();
if (f.length > 0) {
writer.writeRepeatedString(
1,
f
);
}
f = message.getRowList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.Entry.serializeBinaryToWriter
);
}
};
/**
* repeated string dates = 1;
* @return {!Array<string>}
*/
proto.Rows.prototype.getDatesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
};
/**
* @param {!Array<string>} value
* @return {!proto.Rows} returns this
*/
proto.Rows.prototype.setDatesList = function(value) {
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.Rows} returns this
*/
proto.Rows.prototype.addDates = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.Rows} returns this
*/
proto.Rows.prototype.clearDatesList = function() {
return this.setDatesList([]);
};
/**
* repeated Entry row = 2;
* @return {!Array<!proto.Entry>}
*/
proto.Rows.prototype.getRowList = function() {
return /** @type{!Array<!proto.Entry>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.Entry, 2));
};
/**
* @param {!Array<!proto.Entry>} value
* @return {!proto.Rows} returns this
*/
proto.Rows.prototype.setRowList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.Entry=} opt_value
* @param {number=} opt_index
* @return {!proto.Entry}
*/
proto.Rows.prototype.addRow = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.Entry, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.Rows} returns this
*/
proto.Rows.prototype.clearRowList = function() {
return this.setRowList([]);
};
Source