Source: proto/spine/client/filters_pb.js

// source: spine/client/filters.proto
/**
 * @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 spine_options_pb = require('../../spine/options_pb.js');
goog.object.extend(proto, spine_options_pb);
var google_protobuf_any_pb = require('../../google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
var spine_base_field_path_pb = require('../../spine/base/field_path_pb.js');
goog.object.extend(proto, spine_base_field_path_pb);
goog.exportSymbol('proto.spine.client.CompositeFilter', null, global);
goog.exportSymbol('proto.spine.client.CompositeFilter.CompositeOperator', null, global);
goog.exportSymbol('proto.spine.client.Filter', null, global);
goog.exportSymbol('proto.spine.client.Filter.Operator', null, global);
goog.exportSymbol('proto.spine.client.IdFilter', null, global);
goog.exportSymbol('proto.spine.client.Target', null, global);
goog.exportSymbol('proto.spine.client.Target.CriterionCase', null, global);
goog.exportSymbol('proto.spine.client.TargetFilters', 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.spine.client.Target = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.spine.client.Target.oneofGroups_);
};
goog.inherits(proto.spine.client.Target, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.Target.displayName = 'proto.spine.client.Target';
}
/**
 * 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.spine.client.TargetFilters = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.client.TargetFilters.repeatedFields_, null);
};
goog.inherits(proto.spine.client.TargetFilters, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.TargetFilters.displayName = 'proto.spine.client.TargetFilters';
}
/**
 * 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.spine.client.CompositeFilter = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.client.CompositeFilter.repeatedFields_, null);
};
goog.inherits(proto.spine.client.CompositeFilter, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.CompositeFilter.displayName = 'proto.spine.client.CompositeFilter';
}
/**
 * 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.spine.client.Filter = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.client.Filter, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.Filter.displayName = 'proto.spine.client.Filter';
}
/**
 * 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.spine.client.IdFilter = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.client.IdFilter.repeatedFields_, null);
};
goog.inherits(proto.spine.client.IdFilter, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.IdFilter.displayName = 'proto.spine.client.IdFilter';
}

/**
 * Oneof group definitions for this message. Each group defines the field
 * numbers belonging to that group. When of these fields' value is set, all
 * other fields in the group are cleared. During deserialization, if multiple
 * fields are encountered for a group, only the last value seen will be kept.
 * @private {!Array<!Array<number>>}
 * @const
 */
proto.spine.client.Target.oneofGroups_ = [[2,3]];

/**
 * @enum {number}
 */
proto.spine.client.Target.CriterionCase = {
  CRITERION_NOT_SET: 0,
  INCLUDE_ALL: 2,
  FILTERS: 3
};

/**
 * @return {proto.spine.client.Target.CriterionCase}
 */
proto.spine.client.Target.prototype.getCriterionCase = function() {
  return /** @type {proto.spine.client.Target.CriterionCase} */(jspb.Message.computeOneofCase(this, proto.spine.client.Target.oneofGroups_[0]));
};



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.spine.client.Target.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.Target.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.spine.client.Target} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.Target.toObject = function(includeInstance, msg) {
  var f, obj = {
    type: jspb.Message.getFieldWithDefault(msg, 1, ""),
    includeAll: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
    filters: (f = msg.getFilters()) && proto.spine.client.TargetFilters.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.spine.client.Target}
 */
proto.spine.client.Target.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.Target;
  return proto.spine.client.Target.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.Target} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.Target}
 */
proto.spine.client.Target.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.setType(value);
      break;
    case 2:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setIncludeAll(value);
      break;
    case 3:
      var value = new proto.spine.client.TargetFilters;
      reader.readMessage(value,proto.spine.client.TargetFilters.deserializeBinaryFromReader);
      msg.setFilters(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.client.Target.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.client.Target.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.spine.client.Target} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.Target.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getType();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = /** @type {boolean} */ (jspb.Message.getField(message, 2));
  if (f != null) {
    writer.writeBool(
      2,
      f
    );
  }
  f = message.getFilters();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.spine.client.TargetFilters.serializeBinaryToWriter
    );
  }
};


/**
 * optional string type = 1;
 * @return {string}
 */
proto.spine.client.Target.prototype.getType = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.spine.client.Target} returns this
 */
proto.spine.client.Target.prototype.setType = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional bool include_all = 2;
 * @return {boolean}
 */
proto.spine.client.Target.prototype.getIncludeAll = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
};


/**
 * @param {boolean} value
 * @return {!proto.spine.client.Target} returns this
 */
proto.spine.client.Target.prototype.setIncludeAll = function(value) {
  return jspb.Message.setOneofField(this, 2, proto.spine.client.Target.oneofGroups_[0], value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.spine.client.Target} returns this
 */
proto.spine.client.Target.prototype.clearIncludeAll = function() {
  return jspb.Message.setOneofField(this, 2, proto.spine.client.Target.oneofGroups_[0], undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.client.Target.prototype.hasIncludeAll = function() {
  return jspb.Message.getField(this, 2) != null;
};


/**
 * optional TargetFilters filters = 3;
 * @return {?proto.spine.client.TargetFilters}
 */
proto.spine.client.Target.prototype.getFilters = function() {
  return /** @type{?proto.spine.client.TargetFilters} */ (
    jspb.Message.getWrapperField(this, proto.spine.client.TargetFilters, 3));
};


/**
 * @param {?proto.spine.client.TargetFilters|undefined} value
 * @return {!proto.spine.client.Target} returns this
*/
proto.spine.client.Target.prototype.setFilters = function(value) {
  return jspb.Message.setOneofWrapperField(this, 3, proto.spine.client.Target.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.Target} returns this
 */
proto.spine.client.Target.prototype.clearFilters = function() {
  return this.setFilters(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.client.Target.prototype.hasFilters = function() {
  return jspb.Message.getField(this, 3) != null;
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.spine.client.TargetFilters.repeatedFields_ = [2];



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.spine.client.TargetFilters.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.TargetFilters.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.spine.client.TargetFilters} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.TargetFilters.toObject = function(includeInstance, msg) {
  var f, obj = {
    idFilter: (f = msg.getIdFilter()) && proto.spine.client.IdFilter.toObject(includeInstance, f),
    filterList: jspb.Message.toObjectList(msg.getFilterList(),
    proto.spine.client.CompositeFilter.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.spine.client.TargetFilters}
 */
proto.spine.client.TargetFilters.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.TargetFilters;
  return proto.spine.client.TargetFilters.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.TargetFilters} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.TargetFilters}
 */
proto.spine.client.TargetFilters.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.spine.client.IdFilter;
      reader.readMessage(value,proto.spine.client.IdFilter.deserializeBinaryFromReader);
      msg.setIdFilter(value);
      break;
    case 2:
      var value = new proto.spine.client.CompositeFilter;
      reader.readMessage(value,proto.spine.client.CompositeFilter.deserializeBinaryFromReader);
      msg.addFilter(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.client.TargetFilters.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.client.TargetFilters.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.spine.client.TargetFilters} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.TargetFilters.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getIdFilter();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.spine.client.IdFilter.serializeBinaryToWriter
    );
  }
  f = message.getFilterList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      2,
      f,
      proto.spine.client.CompositeFilter.serializeBinaryToWriter
    );
  }
};


/**
 * optional IdFilter id_filter = 1;
 * @return {?proto.spine.client.IdFilter}
 */
proto.spine.client.TargetFilters.prototype.getIdFilter = function() {
  return /** @type{?proto.spine.client.IdFilter} */ (
    jspb.Message.getWrapperField(this, proto.spine.client.IdFilter, 1));
};


/**
 * @param {?proto.spine.client.IdFilter|undefined} value
 * @return {!proto.spine.client.TargetFilters} returns this
*/
proto.spine.client.TargetFilters.prototype.setIdFilter = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.TargetFilters} returns this
 */
proto.spine.client.TargetFilters.prototype.clearIdFilter = function() {
  return this.setIdFilter(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.client.TargetFilters.prototype.hasIdFilter = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * repeated CompositeFilter filter = 2;
 * @return {!Array<!proto.spine.client.CompositeFilter>}
 */
proto.spine.client.TargetFilters.prototype.getFilterList = function() {
  return /** @type{!Array<!proto.spine.client.CompositeFilter>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.spine.client.CompositeFilter, 2));
};


/**
 * @param {!Array<!proto.spine.client.CompositeFilter>} value
 * @return {!proto.spine.client.TargetFilters} returns this
*/
proto.spine.client.TargetFilters.prototype.setFilterList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 2, value);
};


/**
 * @param {!proto.spine.client.CompositeFilter=} opt_value
 * @param {number=} opt_index
 * @return {!proto.spine.client.CompositeFilter}
 */
proto.spine.client.TargetFilters.prototype.addFilter = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spine.client.CompositeFilter, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.spine.client.TargetFilters} returns this
 */
proto.spine.client.TargetFilters.prototype.clearFilterList = function() {
  return this.setFilterList([]);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.spine.client.CompositeFilter.repeatedFields_ = [1];



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.spine.client.CompositeFilter.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.CompositeFilter.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.spine.client.CompositeFilter} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.CompositeFilter.toObject = function(includeInstance, msg) {
  var f, obj = {
    filterList: jspb.Message.toObjectList(msg.getFilterList(),
    proto.spine.client.Filter.toObject, includeInstance),
    operator: jspb.Message.getFieldWithDefault(msg, 2, 0)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.spine.client.CompositeFilter}
 */
proto.spine.client.CompositeFilter.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.CompositeFilter;
  return proto.spine.client.CompositeFilter.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.CompositeFilter} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.CompositeFilter}
 */
proto.spine.client.CompositeFilter.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.spine.client.Filter;
      reader.readMessage(value,proto.spine.client.Filter.deserializeBinaryFromReader);
      msg.addFilter(value);
      break;
    case 2:
      var value = /** @type {!proto.spine.client.CompositeFilter.CompositeOperator} */ (reader.readEnum());
      msg.setOperator(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.client.CompositeFilter.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.client.CompositeFilter.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.spine.client.CompositeFilter} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.CompositeFilter.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getFilterList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      1,
      f,
      proto.spine.client.Filter.serializeBinaryToWriter
    );
  }
  f = message.getOperator();
  if (f !== 0.0) {
    writer.writeEnum(
      2,
      f
    );
  }
};


/**
 * @enum {number}
 */
proto.spine.client.CompositeFilter.CompositeOperator = {
  CCF_CO_UNDEFINED: 0,
  ALL: 1,
  EITHER: 2
};

/**
 * repeated Filter filter = 1;
 * @return {!Array<!proto.spine.client.Filter>}
 */
proto.spine.client.CompositeFilter.prototype.getFilterList = function() {
  return /** @type{!Array<!proto.spine.client.Filter>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.spine.client.Filter, 1));
};


/**
 * @param {!Array<!proto.spine.client.Filter>} value
 * @return {!proto.spine.client.CompositeFilter} returns this
*/
proto.spine.client.CompositeFilter.prototype.setFilterList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.spine.client.Filter=} opt_value
 * @param {number=} opt_index
 * @return {!proto.spine.client.Filter}
 */
proto.spine.client.CompositeFilter.prototype.addFilter = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spine.client.Filter, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.spine.client.CompositeFilter} returns this
 */
proto.spine.client.CompositeFilter.prototype.clearFilterList = function() {
  return this.setFilterList([]);
};


/**
 * optional CompositeOperator operator = 2;
 * @return {!proto.spine.client.CompositeFilter.CompositeOperator}
 */
proto.spine.client.CompositeFilter.prototype.getOperator = function() {
  return /** @type {!proto.spine.client.CompositeFilter.CompositeOperator} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {!proto.spine.client.CompositeFilter.CompositeOperator} value
 * @return {!proto.spine.client.CompositeFilter} returns this
 */
proto.spine.client.CompositeFilter.prototype.setOperator = function(value) {
  return jspb.Message.setProto3EnumField(this, 2, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.spine.client.Filter.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.Filter.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.spine.client.Filter} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.Filter.toObject = function(includeInstance, msg) {
  var f, obj = {
    fieldPath: (f = msg.getFieldPath()) && spine_base_field_path_pb.FieldPath.toObject(includeInstance, f),
    value: (f = msg.getValue()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
    operator: jspb.Message.getFieldWithDefault(msg, 3, 0)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.spine.client.Filter}
 */
proto.spine.client.Filter.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.Filter;
  return proto.spine.client.Filter.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.Filter} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.Filter}
 */
proto.spine.client.Filter.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new spine_base_field_path_pb.FieldPath;
      reader.readMessage(value,spine_base_field_path_pb.FieldPath.deserializeBinaryFromReader);
      msg.setFieldPath(value);
      break;
    case 2:
      var value = new google_protobuf_any_pb.Any;
      reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
      msg.setValue(value);
      break;
    case 3:
      var value = /** @type {!proto.spine.client.Filter.Operator} */ (reader.readEnum());
      msg.setOperator(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.client.Filter.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.client.Filter.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.spine.client.Filter} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.Filter.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getFieldPath();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      spine_base_field_path_pb.FieldPath.serializeBinaryToWriter
    );
  }
  f = message.getValue();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_any_pb.Any.serializeBinaryToWriter
    );
  }
  f = message.getOperator();
  if (f !== 0.0) {
    writer.writeEnum(
      3,
      f
    );
  }
};


/**
 * @enum {number}
 */
proto.spine.client.Filter.Operator = {
  CFO_UNDEFINED: 0,
  EQUAL: 1,
  GREATER_THAN: 2,
  LESS_THAN: 4,
  GREATER_OR_EQUAL: 5,
  LESS_OR_EQUAL: 6
};

/**
 * optional spine.base.FieldPath field_path = 1;
 * @return {?proto.spine.base.FieldPath}
 */
proto.spine.client.Filter.prototype.getFieldPath = function() {
  return /** @type{?proto.spine.base.FieldPath} */ (
    jspb.Message.getWrapperField(this, spine_base_field_path_pb.FieldPath, 1));
};


/**
 * @param {?proto.spine.base.FieldPath|undefined} value
 * @return {!proto.spine.client.Filter} returns this
*/
proto.spine.client.Filter.prototype.setFieldPath = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.Filter} returns this
 */
proto.spine.client.Filter.prototype.clearFieldPath = function() {
  return this.setFieldPath(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.client.Filter.prototype.hasFieldPath = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional google.protobuf.Any value = 2;
 * @return {?proto.google.protobuf.Any}
 */
proto.spine.client.Filter.prototype.getValue = function() {
  return /** @type{?proto.google.protobuf.Any} */ (
    jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2));
};


/**
 * @param {?proto.google.protobuf.Any|undefined} value
 * @return {!proto.spine.client.Filter} returns this
*/
proto.spine.client.Filter.prototype.setValue = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.Filter} returns this
 */
proto.spine.client.Filter.prototype.clearValue = function() {
  return this.setValue(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.client.Filter.prototype.hasValue = function() {
  return jspb.Message.getField(this, 2) != null;
};


/**
 * optional Operator operator = 3;
 * @return {!proto.spine.client.Filter.Operator}
 */
proto.spine.client.Filter.prototype.getOperator = function() {
  return /** @type {!proto.spine.client.Filter.Operator} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
 * @param {!proto.spine.client.Filter.Operator} value
 * @return {!proto.spine.client.Filter} returns this
 */
proto.spine.client.Filter.prototype.setOperator = function(value) {
  return jspb.Message.setProto3EnumField(this, 3, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.spine.client.IdFilter.repeatedFields_ = [1];



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.spine.client.IdFilter.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.IdFilter.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.spine.client.IdFilter} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.IdFilter.toObject = function(includeInstance, msg) {
  var f, obj = {
    idList: jspb.Message.toObjectList(msg.getIdList(),
    google_protobuf_any_pb.Any.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.spine.client.IdFilter}
 */
proto.spine.client.IdFilter.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.IdFilter;
  return proto.spine.client.IdFilter.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.IdFilter} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.IdFilter}
 */
proto.spine.client.IdFilter.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new google_protobuf_any_pb.Any;
      reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
      msg.addId(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.client.IdFilter.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.client.IdFilter.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.spine.client.IdFilter} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.IdFilter.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getIdList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      1,
      f,
      google_protobuf_any_pb.Any.serializeBinaryToWriter
    );
  }
};


/**
 * repeated google.protobuf.Any id = 1;
 * @return {!Array<!proto.google.protobuf.Any>}
 */
proto.spine.client.IdFilter.prototype.getIdList = function() {
  return /** @type{!Array<!proto.google.protobuf.Any>} */ (
    jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1));
};


/**
 * @param {!Array<!proto.google.protobuf.Any>} value
 * @return {!proto.spine.client.IdFilter} returns this
*/
proto.spine.client.IdFilter.prototype.setIdList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.google.protobuf.Any=} opt_value
 * @param {number=} opt_index
 * @return {!proto.google.protobuf.Any}
 */
proto.spine.client.IdFilter.prototype.addId = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Any, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.spine.client.IdFilter} returns this
 */
proto.spine.client.IdFilter.prototype.clearIdList = function() {
  return this.setIdList([]);
};


goog.object.extend(exports, proto.spine.client);

// Generated by Spine ProtoJs Plugin

let ObjectParser = require('../../../client/parser/object-parser.js').default;
let TypeParsers = require('../../../client/parser/type-parsers.js').default;

proto.spine.client.IdFilter.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.IdFilter.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.IdFilter.Parser.prototype.constructor = proto.spine.client.IdFilter.Parser;
proto.spine.client.IdFilter.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.IdFilter();
  
  if (obj.id !== undefined && obj.id !== null) {
    obj.id.forEach(
      (listItem, index, array) => {
        if (listItem === null) {
          msg.addId(null);
        } else {
          let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(listItem);
          msg.addId(value);
        }
      }
    );
  }
  return msg;
};

proto.spine.client.CompositeFilter.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.CompositeFilter.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.CompositeFilter.Parser.prototype.constructor = proto.spine.client.CompositeFilter.Parser;
proto.spine.client.CompositeFilter.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.CompositeFilter();
  
  if (obj.filter !== undefined && obj.filter !== null) {
    obj.filter.forEach(
      (listItem, index, array) => {
        if (listItem === null) {
          msg.addFilter(null);
        } else {
          let value = TypeParsers.parserFor('type.spine.io/spine.client.Filter').fromObject(listItem);
          msg.addFilter(value);
        }
      }
    );
  }
  
  if (obj.operator !== undefined) {
    if (obj.operator !== null) {
      let value = proto.spine.client.CompositeFilter.CompositeOperator[obj.operator];
      msg.setOperator(value);
    }
  }
  return msg;
};

proto.spine.client.TargetFilters.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.TargetFilters.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.TargetFilters.Parser.prototype.constructor = proto.spine.client.TargetFilters.Parser;
proto.spine.client.TargetFilters.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.TargetFilters();
  
  if (obj.idFilter !== undefined) {
    if (obj.idFilter === null) {
      msg.setIdFilter(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.IdFilter').fromObject(obj.idFilter);
      msg.setIdFilter(value);
    }
  }
  
  if (obj.filter !== undefined && obj.filter !== null) {
    obj.filter.forEach(
      (listItem, index, array) => {
        if (listItem === null) {
          msg.addFilter(null);
        } else {
          let value = TypeParsers.parserFor('type.spine.io/spine.client.CompositeFilter').fromObject(listItem);
          msg.addFilter(value);
        }
      }
    );
  }
  return msg;
};

proto.spine.client.Filter.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.Filter.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.Filter.Parser.prototype.constructor = proto.spine.client.Filter.Parser;
proto.spine.client.Filter.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.Filter();
  
  if (obj.fieldPath !== undefined) {
    if (obj.fieldPath === null) {
      msg.setFieldPath(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.base.FieldPath').fromObject(obj.fieldPath);
      msg.setFieldPath(value);
    }
  }
  
  if (obj.value !== undefined) {
    if (obj.value === null) {
      msg.setValue(null);
    } else {
      let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.value);
      msg.setValue(value);
    }
  }
  
  if (obj.operator !== undefined) {
    if (obj.operator !== null) {
      let value = proto.spine.client.Filter.Operator[obj.operator];
      msg.setOperator(value);
    }
  }
  return msg;
};

proto.spine.client.Target.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.Target.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.Target.Parser.prototype.constructor = proto.spine.client.Target.Parser;
proto.spine.client.Target.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.Target();
  
  if (obj.type !== undefined) {
    if (obj.type !== null) {
      let value = obj.type;
      msg.setType(value);
    }
  }
  
  if (obj.includeAll !== undefined) {
    if (obj.includeAll !== null) {
      let value = obj.includeAll;
      msg.setIncludeAll(value);
    }
  }
  
  if (obj.filters !== undefined) {
    if (obj.filters === null) {
      msg.setFilters(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.TargetFilters').fromObject(obj.filters);
      msg.setFilters(value);
    }
  }
  return msg;
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.IdFilter.typeUrl = function() {
  return 'type.spine.io/spine.client.IdFilter';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.CompositeFilter.typeUrl = function() {
  return 'type.spine.io/spine.client.CompositeFilter';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.TargetFilters.typeUrl = function() {
  return 'type.spine.io/spine.client.TargetFilters';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.Filter.typeUrl = function() {
  return 'type.spine.io/spine.client.Filter';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.Target.typeUrl = function() {
  return 'type.spine.io/spine.client.Target';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.CompositeFilter.CompositeOperator.typeUrl = function() {
  return 'type.spine.io/spine.client.CompositeFilter.CompositeOperator';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.Filter.Operator.typeUrl = function() {
  return 'type.spine.io/spine.client.Filter.Operator';
};