Source: proto/spine/client/query_pb.js

// source: spine/client/query.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 google_protobuf_field_mask_pb = require('../../google/protobuf/field_mask_pb.js');
goog.object.extend(proto, google_protobuf_field_mask_pb);
var spine_core_user_id_pb = require('../../spine/core/user_id_pb.js');
goog.object.extend(proto, spine_core_user_id_pb);
var spine_core_actor_context_pb = require('../../spine/core/actor_context_pb.js');
goog.object.extend(proto, spine_core_actor_context_pb);
var spine_core_response_pb = require('../../spine/core/response_pb.js');
goog.object.extend(proto, spine_core_response_pb);
var spine_client_filters_pb = require('../../spine/client/filters_pb.js');
goog.object.extend(proto, spine_client_filters_pb);
var spine_core_version_pb = require('../../spine/core/version_pb.js');
goog.object.extend(proto, spine_core_version_pb);
goog.exportSymbol('proto.spine.client.EntityStateWithVersion', null, global);
goog.exportSymbol('proto.spine.client.OrderBy', null, global);
goog.exportSymbol('proto.spine.client.OrderBy.Direction', null, global);
goog.exportSymbol('proto.spine.client.Query', null, global);
goog.exportSymbol('proto.spine.client.QueryId', null, global);
goog.exportSymbol('proto.spine.client.QueryResponse', null, global);
goog.exportSymbol('proto.spine.client.QueryValidationError', null, global);
goog.exportSymbol('proto.spine.client.ResponseFormat', 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.QueryId = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.client.QueryId, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.QueryId.displayName = 'proto.spine.client.QueryId';
}
/**
 * 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.OrderBy = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.client.OrderBy, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.OrderBy.displayName = 'proto.spine.client.OrderBy';
}
/**
 * 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.Query = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.client.Query, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.Query.displayName = 'proto.spine.client.Query';
}
/**
 * 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.ResponseFormat = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.client.ResponseFormat, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.ResponseFormat.displayName = 'proto.spine.client.ResponseFormat';
}
/**
 * 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.QueryResponse = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.client.QueryResponse.repeatedFields_, null);
};
goog.inherits(proto.spine.client.QueryResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.QueryResponse.displayName = 'proto.spine.client.QueryResponse';
}
/**
 * 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.EntityStateWithVersion = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.client.EntityStateWithVersion, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.EntityStateWithVersion.displayName = 'proto.spine.client.EntityStateWithVersion';
}



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

  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.QueryId}
 */
proto.spine.client.QueryId.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.QueryId;
  return proto.spine.client.QueryId.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.QueryId} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.QueryId}
 */
proto.spine.client.QueryId.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.setValue(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.client.QueryId.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.client.QueryId.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.QueryId} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.QueryId.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getValue();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
};


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


/**
 * @param {string} value
 * @return {!proto.spine.client.QueryId} returns this
 */
proto.spine.client.QueryId.prototype.setValue = function(value) {
  return jspb.Message.setProto3StringField(this, 1, 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.OrderBy.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.OrderBy.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.OrderBy} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.OrderBy.toObject = function(includeInstance, msg) {
  var f, obj = {
    direction: jspb.Message.getFieldWithDefault(msg, 1, 0),
    column: 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.spine.client.OrderBy}
 */
proto.spine.client.OrderBy.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.OrderBy;
  return proto.spine.client.OrderBy.deserializeBinaryFromReader(msg, reader);
};


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


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.client.OrderBy.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.client.OrderBy.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.OrderBy} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.OrderBy.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getDirection();
  if (f !== 0.0) {
    writer.writeEnum(
      1,
      f
    );
  }
  f = message.getColumn();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
};


/**
 * @enum {number}
 */
proto.spine.client.OrderBy.Direction = {
  OD_UNKNOWN: 0,
  ASCENDING: 1,
  DESCENDING: 2
};

/**
 * optional Direction direction = 1;
 * @return {!proto.spine.client.OrderBy.Direction}
 */
proto.spine.client.OrderBy.prototype.getDirection = function() {
  return /** @type {!proto.spine.client.OrderBy.Direction} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {!proto.spine.client.OrderBy.Direction} value
 * @return {!proto.spine.client.OrderBy} returns this
 */
proto.spine.client.OrderBy.prototype.setDirection = function(value) {
  return jspb.Message.setProto3EnumField(this, 1, value);
};


/**
 * optional string column = 2;
 * @return {string}
 */
proto.spine.client.OrderBy.prototype.getColumn = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.spine.client.OrderBy} returns this
 */
proto.spine.client.OrderBy.prototype.setColumn = function(value) {
  return jspb.Message.setProto3StringField(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.Query.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.Query.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.Query} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.Query.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: (f = msg.getId()) && proto.spine.client.QueryId.toObject(includeInstance, f),
    target: (f = msg.getTarget()) && spine_client_filters_pb.Target.toObject(includeInstance, f),
    context: (f = msg.getContext()) && spine_core_actor_context_pb.ActorContext.toObject(includeInstance, f),
    format: (f = msg.getFormat()) && proto.spine.client.ResponseFormat.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.Query}
 */
proto.spine.client.Query.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.Query;
  return proto.spine.client.Query.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.Query} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.Query}
 */
proto.spine.client.Query.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.QueryId;
      reader.readMessage(value,proto.spine.client.QueryId.deserializeBinaryFromReader);
      msg.setId(value);
      break;
    case 2:
      var value = new spine_client_filters_pb.Target;
      reader.readMessage(value,spine_client_filters_pb.Target.deserializeBinaryFromReader);
      msg.setTarget(value);
      break;
    case 3:
      var value = new spine_core_actor_context_pb.ActorContext;
      reader.readMessage(value,spine_core_actor_context_pb.ActorContext.deserializeBinaryFromReader);
      msg.setContext(value);
      break;
    case 4:
      var value = new proto.spine.client.ResponseFormat;
      reader.readMessage(value,proto.spine.client.ResponseFormat.deserializeBinaryFromReader);
      msg.setFormat(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.client.Query.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.client.Query.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.Query} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.Query.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.spine.client.QueryId.serializeBinaryToWriter
    );
  }
  f = message.getTarget();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      spine_client_filters_pb.Target.serializeBinaryToWriter
    );
  }
  f = message.getContext();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      spine_core_actor_context_pb.ActorContext.serializeBinaryToWriter
    );
  }
  f = message.getFormat();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      proto.spine.client.ResponseFormat.serializeBinaryToWriter
    );
  }
};


/**
 * optional QueryId id = 1;
 * @return {?proto.spine.client.QueryId}
 */
proto.spine.client.Query.prototype.getId = function() {
  return /** @type{?proto.spine.client.QueryId} */ (
    jspb.Message.getWrapperField(this, proto.spine.client.QueryId, 1));
};


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


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


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


/**
 * optional Target target = 2;
 * @return {?proto.spine.client.Target}
 */
proto.spine.client.Query.prototype.getTarget = function() {
  return /** @type{?proto.spine.client.Target} */ (
    jspb.Message.getWrapperField(this, spine_client_filters_pb.Target, 2));
};


/**
 * @param {?proto.spine.client.Target|undefined} value
 * @return {!proto.spine.client.Query} returns this
*/
proto.spine.client.Query.prototype.setTarget = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


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


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


/**
 * optional spine.core.ActorContext context = 3;
 * @return {?proto.spine.core.ActorContext}
 */
proto.spine.client.Query.prototype.getContext = function() {
  return /** @type{?proto.spine.core.ActorContext} */ (
    jspb.Message.getWrapperField(this, spine_core_actor_context_pb.ActorContext, 3));
};


/**
 * @param {?proto.spine.core.ActorContext|undefined} value
 * @return {!proto.spine.client.Query} returns this
*/
proto.spine.client.Query.prototype.setContext = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


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


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


/**
 * optional ResponseFormat format = 4;
 * @return {?proto.spine.client.ResponseFormat}
 */
proto.spine.client.Query.prototype.getFormat = function() {
  return /** @type{?proto.spine.client.ResponseFormat} */ (
    jspb.Message.getWrapperField(this, proto.spine.client.ResponseFormat, 4));
};


/**
 * @param {?proto.spine.client.ResponseFormat|undefined} value
 * @return {!proto.spine.client.Query} returns this
*/
proto.spine.client.Query.prototype.setFormat = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


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


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





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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.ResponseFormat} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.ResponseFormat}
 */
proto.spine.client.ResponseFormat.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new google_protobuf_field_mask_pb.FieldMask;
      reader.readMessage(value,google_protobuf_field_mask_pb.FieldMask.deserializeBinaryFromReader);
      msg.setFieldMask(value);
      break;
    case 2:
      var value = new proto.spine.client.OrderBy;
      reader.readMessage(value,proto.spine.client.OrderBy.deserializeBinaryFromReader);
      msg.setOrderBy(value);
      break;
    case 3:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setLimit(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.client.ResponseFormat.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.client.ResponseFormat.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.ResponseFormat} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.ResponseFormat.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getFieldMask();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      google_protobuf_field_mask_pb.FieldMask.serializeBinaryToWriter
    );
  }
  f = message.getOrderBy();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.spine.client.OrderBy.serializeBinaryToWriter
    );
  }
  f = message.getLimit();
  if (f !== 0) {
    writer.writeUint32(
      3,
      f
    );
  }
};


/**
 * optional google.protobuf.FieldMask field_mask = 1;
 * @return {?proto.google.protobuf.FieldMask}
 */
proto.spine.client.ResponseFormat.prototype.getFieldMask = function() {
  return /** @type{?proto.google.protobuf.FieldMask} */ (
    jspb.Message.getWrapperField(this, google_protobuf_field_mask_pb.FieldMask, 1));
};


/**
 * @param {?proto.google.protobuf.FieldMask|undefined} value
 * @return {!proto.spine.client.ResponseFormat} returns this
*/
proto.spine.client.ResponseFormat.prototype.setFieldMask = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


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


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


/**
 * optional OrderBy order_by = 2;
 * @return {?proto.spine.client.OrderBy}
 */
proto.spine.client.ResponseFormat.prototype.getOrderBy = function() {
  return /** @type{?proto.spine.client.OrderBy} */ (
    jspb.Message.getWrapperField(this, proto.spine.client.OrderBy, 2));
};


/**
 * @param {?proto.spine.client.OrderBy|undefined} value
 * @return {!proto.spine.client.ResponseFormat} returns this
*/
proto.spine.client.ResponseFormat.prototype.setOrderBy = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


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


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


/**
 * optional uint32 limit = 3;
 * @return {number}
 */
proto.spine.client.ResponseFormat.prototype.getLimit = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
 * @param {number} value
 * @return {!proto.spine.client.ResponseFormat} returns this
 */
proto.spine.client.ResponseFormat.prototype.setLimit = function(value) {
  return jspb.Message.setProto3IntField(this, 3, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.spine.client.QueryResponse.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.QueryResponse.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.QueryResponse.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.QueryResponse} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.QueryResponse.toObject = function(includeInstance, msg) {
  var f, obj = {
    response: (f = msg.getResponse()) && spine_core_response_pb.Response.toObject(includeInstance, f),
    messageList: jspb.Message.toObjectList(msg.getMessageList(),
    proto.spine.client.EntityStateWithVersion.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.QueryResponse}
 */
proto.spine.client.QueryResponse.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.QueryResponse;
  return proto.spine.client.QueryResponse.deserializeBinaryFromReader(msg, reader);
};


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


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.client.QueryResponse.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.client.QueryResponse.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.QueryResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.QueryResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getResponse();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      spine_core_response_pb.Response.serializeBinaryToWriter
    );
  }
  f = message.getMessageList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      2,
      f,
      proto.spine.client.EntityStateWithVersion.serializeBinaryToWriter
    );
  }
};


/**
 * optional spine.core.Response response = 1;
 * @return {?proto.spine.core.Response}
 */
proto.spine.client.QueryResponse.prototype.getResponse = function() {
  return /** @type{?proto.spine.core.Response} */ (
    jspb.Message.getWrapperField(this, spine_core_response_pb.Response, 1));
};


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


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


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


/**
 * repeated EntityStateWithVersion message = 2;
 * @return {!Array<!proto.spine.client.EntityStateWithVersion>}
 */
proto.spine.client.QueryResponse.prototype.getMessageList = function() {
  return /** @type{!Array<!proto.spine.client.EntityStateWithVersion>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.spine.client.EntityStateWithVersion, 2));
};


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


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


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





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


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


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.client.EntityStateWithVersion.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.client.EntityStateWithVersion.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.EntityStateWithVersion} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.EntityStateWithVersion.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getState();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      google_protobuf_any_pb.Any.serializeBinaryToWriter
    );
  }
  f = message.getVersion();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      spine_core_version_pb.Version.serializeBinaryToWriter
    );
  }
};


/**
 * optional google.protobuf.Any state = 1;
 * @return {?proto.google.protobuf.Any}
 */
proto.spine.client.EntityStateWithVersion.prototype.getState = function() {
  return /** @type{?proto.google.protobuf.Any} */ (
    jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1));
};


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


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


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


/**
 * optional spine.core.Version version = 2;
 * @return {?proto.spine.core.Version}
 */
proto.spine.client.EntityStateWithVersion.prototype.getVersion = function() {
  return /** @type{?proto.spine.core.Version} */ (
    jspb.Message.getWrapperField(this, spine_core_version_pb.Version, 2));
};


/**
 * @param {?proto.spine.core.Version|undefined} value
 * @return {!proto.spine.client.EntityStateWithVersion} returns this
*/
proto.spine.client.EntityStateWithVersion.prototype.setVersion = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


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


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


/**
 * @enum {number}
 */
proto.spine.client.QueryValidationError = {
  QVE_UNKNOWN_REASON: 0,
  UNSUPPORTED_QUERY_TARGET: 1,
  INVALID_QUERY: 2
};

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.Query.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.Query.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.Query.Parser.prototype.constructor = proto.spine.client.Query.Parser;
proto.spine.client.Query.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.Query();
  
  if (obj.id !== undefined) {
    if (obj.id === null) {
      msg.setId(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.QueryId').fromObject(obj.id);
      msg.setId(value);
    }
  }
  
  if (obj.target !== undefined) {
    if (obj.target === null) {
      msg.setTarget(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.Target').fromObject(obj.target);
      msg.setTarget(value);
    }
  }
  
  if (obj.context !== undefined) {
    if (obj.context === null) {
      msg.setContext(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.core.ActorContext').fromObject(obj.context);
      msg.setContext(value);
    }
  }
  
  if (obj.format !== undefined) {
    if (obj.format === null) {
      msg.setFormat(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.ResponseFormat').fromObject(obj.format);
      msg.setFormat(value);
    }
  }
  return msg;
};

proto.spine.client.QueryId.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.QueryId.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.QueryId.Parser.prototype.constructor = proto.spine.client.QueryId.Parser;
proto.spine.client.QueryId.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.QueryId();
  
  if (obj.value !== undefined) {
    if (obj.value !== null) {
      let value = obj.value;
      msg.setValue(value);
    }
  }
  return msg;
};

proto.spine.client.ResponseFormat.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.ResponseFormat.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.ResponseFormat.Parser.prototype.constructor = proto.spine.client.ResponseFormat.Parser;
proto.spine.client.ResponseFormat.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.ResponseFormat();
  
  if (obj.fieldMask !== undefined) {
    if (obj.fieldMask === null) {
      msg.setFieldMask(null);
    } else {
      let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.FieldMask').fromObject(obj.fieldMask);
      msg.setFieldMask(value);
    }
  }
  
  if (obj.orderBy !== undefined) {
    if (obj.orderBy === null) {
      msg.setOrderBy(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.OrderBy').fromObject(obj.orderBy);
      msg.setOrderBy(value);
    }
  }
  
  if (obj.limit !== undefined) {
    if (obj.limit !== null) {
      let value = obj.limit;
      msg.setLimit(value);
    }
  }
  return msg;
};

proto.spine.client.OrderBy.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.OrderBy.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.OrderBy.Parser.prototype.constructor = proto.spine.client.OrderBy.Parser;
proto.spine.client.OrderBy.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.OrderBy();
  
  if (obj.direction !== undefined) {
    if (obj.direction !== null) {
      let value = proto.spine.client.OrderBy.Direction[obj.direction];
      msg.setDirection(value);
    }
  }
  
  if (obj.column !== undefined) {
    if (obj.column !== null) {
      let value = obj.column;
      msg.setColumn(value);
    }
  }
  return msg;
};

proto.spine.client.QueryResponse.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.QueryResponse.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.QueryResponse.Parser.prototype.constructor = proto.spine.client.QueryResponse.Parser;
proto.spine.client.QueryResponse.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.QueryResponse();
  
  if (obj.response !== undefined) {
    if (obj.response === null) {
      msg.setResponse(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.core.Response').fromObject(obj.response);
      msg.setResponse(value);
    }
  }
  
  if (obj.message !== undefined && obj.message !== null) {
    obj.message.forEach(
      (listItem, index, array) => {
        if (listItem === null) {
          msg.addMessage(null);
        } else {
          let value = TypeParsers.parserFor('type.spine.io/spine.client.EntityStateWithVersion').fromObject(listItem);
          msg.addMessage(value);
        }
      }
    );
  }
  return msg;
};

proto.spine.client.EntityStateWithVersion.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.EntityStateWithVersion.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.EntityStateWithVersion.Parser.prototype.constructor = proto.spine.client.EntityStateWithVersion.Parser;
proto.spine.client.EntityStateWithVersion.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.EntityStateWithVersion();
  
  if (obj.state !== undefined) {
    if (obj.state === null) {
      msg.setState(null);
    } else {
      let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.state);
      msg.setState(value);
    }
  }
  
  if (obj.version !== undefined) {
    if (obj.version === null) {
      msg.setVersion(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.core.Version').fromObject(obj.version);
      msg.setVersion(value);
    }
  }
  return msg;
};

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

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

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

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

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

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

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

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