// source: spine/core/command.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_timestamp_pb = require('../../google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
var google_protobuf_duration_pb = require('../../google/protobuf/duration_pb.js');
goog.object.extend(proto, google_protobuf_duration_pb);
var google_protobuf_any_pb = require('../../google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_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_diagnostics_pb = require('../../spine/core/diagnostics_pb.js');
goog.object.extend(proto, spine_core_diagnostics_pb);
goog.exportSymbol('proto.spine.core.Command', null, global);
goog.exportSymbol('proto.spine.core.Command.SystemProperties', null, global);
goog.exportSymbol('proto.spine.core.CommandContext', null, global);
goog.exportSymbol('proto.spine.core.CommandContext.Schedule', null, global);
goog.exportSymbol('proto.spine.core.CommandId', null, global);
goog.exportSymbol('proto.spine.core.CommandValidationError', 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.core.CommandId = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.core.CommandId, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.core.CommandId.displayName = 'proto.spine.core.CommandId';
}
/**
* 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.core.Command = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.core.Command, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.core.Command.displayName = 'proto.spine.core.Command';
}
/**
* 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.core.Command.SystemProperties = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.core.Command.SystemProperties, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.core.Command.SystemProperties.displayName = 'proto.spine.core.Command.SystemProperties';
}
/**
* 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.core.CommandContext = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.core.CommandContext, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.core.CommandContext.displayName = 'proto.spine.core.CommandContext';
}
/**
* 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.core.CommandContext.Schedule = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.core.CommandContext.Schedule, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.core.CommandContext.Schedule.displayName = 'proto.spine.core.CommandContext.Schedule';
}
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.core.CommandId.prototype.toObject = function(opt_includeInstance) {
return proto.spine.core.CommandId.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.core.CommandId} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.core.CommandId.toObject = function(includeInstance, msg) {
var f, obj = {
uuid: 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.core.CommandId}
*/
proto.spine.core.CommandId.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.core.CommandId;
return proto.spine.core.CommandId.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.core.CommandId} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.core.CommandId}
*/
proto.spine.core.CommandId.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.setUuid(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.core.CommandId.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.core.CommandId.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.core.CommandId} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.core.CommandId.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getUuid();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string uuid = 1;
* @return {string}
*/
proto.spine.core.CommandId.prototype.getUuid = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.spine.core.CommandId} returns this
*/
proto.spine.core.CommandId.prototype.setUuid = 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.core.Command.prototype.toObject = function(opt_includeInstance) {
return proto.spine.core.Command.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.core.Command} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.core.Command.toObject = function(includeInstance, msg) {
var f, obj = {
id: (f = msg.getId()) && proto.spine.core.CommandId.toObject(includeInstance, f),
message: (f = msg.getMessage()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
context: (f = msg.getContext()) && proto.spine.core.CommandContext.toObject(includeInstance, f),
systemProperties: (f = msg.getSystemProperties()) && proto.spine.core.Command.SystemProperties.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.core.Command}
*/
proto.spine.core.Command.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.core.Command;
return proto.spine.core.Command.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.core.Command} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.core.Command}
*/
proto.spine.core.Command.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.spine.core.CommandId;
reader.readMessage(value,proto.spine.core.CommandId.deserializeBinaryFromReader);
msg.setId(value);
break;
case 2:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.setMessage(value);
break;
case 3:
var value = new proto.spine.core.CommandContext;
reader.readMessage(value,proto.spine.core.CommandContext.deserializeBinaryFromReader);
msg.setContext(value);
break;
case 4:
var value = new proto.spine.core.Command.SystemProperties;
reader.readMessage(value,proto.spine.core.Command.SystemProperties.deserializeBinaryFromReader);
msg.setSystemProperties(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.core.Command.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.core.Command.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.core.Command} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.core.Command.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f != null) {
writer.writeMessage(
1,
f,
proto.spine.core.CommandId.serializeBinaryToWriter
);
}
f = message.getMessage();
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
f = message.getContext();
if (f != null) {
writer.writeMessage(
3,
f,
proto.spine.core.CommandContext.serializeBinaryToWriter
);
}
f = message.getSystemProperties();
if (f != null) {
writer.writeMessage(
4,
f,
proto.spine.core.Command.SystemProperties.serializeBinaryToWriter
);
}
};
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.core.Command.SystemProperties.prototype.toObject = function(opt_includeInstance) {
return proto.spine.core.Command.SystemProperties.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.core.Command.SystemProperties} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.core.Command.SystemProperties.toObject = function(includeInstance, msg) {
var f, obj = {
schedulingTime: (f = msg.getSchedulingTime()) && google_protobuf_timestamp_pb.Timestamp.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.core.Command.SystemProperties}
*/
proto.spine.core.Command.SystemProperties.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.core.Command.SystemProperties;
return proto.spine.core.Command.SystemProperties.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.core.Command.SystemProperties} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.core.Command.SystemProperties}
*/
proto.spine.core.Command.SystemProperties.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 11:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setSchedulingTime(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.core.Command.SystemProperties.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.core.Command.SystemProperties.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.core.Command.SystemProperties} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.core.Command.SystemProperties.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSchedulingTime();
if (f != null) {
writer.writeMessage(
11,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
};
/**
* optional google.protobuf.Timestamp scheduling_time = 11;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.spine.core.Command.SystemProperties.prototype.getSchedulingTime = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 11));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.spine.core.Command.SystemProperties} returns this
*/
proto.spine.core.Command.SystemProperties.prototype.setSchedulingTime = function(value) {
return jspb.Message.setWrapperField(this, 11, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.core.Command.SystemProperties} returns this
*/
proto.spine.core.Command.SystemProperties.prototype.clearSchedulingTime = function() {
return this.setSchedulingTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.core.Command.SystemProperties.prototype.hasSchedulingTime = function() {
return jspb.Message.getField(this, 11) != null;
};
/**
* optional CommandId id = 1;
* @return {?proto.spine.core.CommandId}
*/
proto.spine.core.Command.prototype.getId = function() {
return /** @type{?proto.spine.core.CommandId} */ (
jspb.Message.getWrapperField(this, proto.spine.core.CommandId, 1));
};
/**
* @param {?proto.spine.core.CommandId|undefined} value
* @return {!proto.spine.core.Command} returns this
*/
proto.spine.core.Command.prototype.setId = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.core.Command} returns this
*/
proto.spine.core.Command.prototype.clearId = function() {
return this.setId(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.core.Command.prototype.hasId = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional google.protobuf.Any message = 2;
* @return {?proto.google.protobuf.Any}
*/
proto.spine.core.Command.prototype.getMessage = 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.core.Command} returns this
*/
proto.spine.core.Command.prototype.setMessage = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.core.Command} returns this
*/
proto.spine.core.Command.prototype.clearMessage = function() {
return this.setMessage(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.core.Command.prototype.hasMessage = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional CommandContext context = 3;
* @return {?proto.spine.core.CommandContext}
*/
proto.spine.core.Command.prototype.getContext = function() {
return /** @type{?proto.spine.core.CommandContext} */ (
jspb.Message.getWrapperField(this, proto.spine.core.CommandContext, 3));
};
/**
* @param {?proto.spine.core.CommandContext|undefined} value
* @return {!proto.spine.core.Command} returns this
*/
proto.spine.core.Command.prototype.setContext = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.core.Command} returns this
*/
proto.spine.core.Command.prototype.clearContext = function() {
return this.setContext(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.core.Command.prototype.hasContext = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional SystemProperties system_properties = 4;
* @return {?proto.spine.core.Command.SystemProperties}
*/
proto.spine.core.Command.prototype.getSystemProperties = function() {
return /** @type{?proto.spine.core.Command.SystemProperties} */ (
jspb.Message.getWrapperField(this, proto.spine.core.Command.SystemProperties, 4));
};
/**
* @param {?proto.spine.core.Command.SystemProperties|undefined} value
* @return {!proto.spine.core.Command} returns this
*/
proto.spine.core.Command.prototype.setSystemProperties = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.core.Command} returns this
*/
proto.spine.core.Command.prototype.clearSystemProperties = function() {
return this.setSystemProperties(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.core.Command.prototype.hasSystemProperties = 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.core.CommandContext.prototype.toObject = function(opt_includeInstance) {
return proto.spine.core.CommandContext.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.core.CommandContext} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.core.CommandContext.toObject = function(includeInstance, msg) {
var f, obj = {
actorContext: (f = msg.getActorContext()) && spine_core_actor_context_pb.ActorContext.toObject(includeInstance, f),
targetVersion: jspb.Message.getFieldWithDefault(msg, 2, 0),
attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [],
schedule: (f = msg.getSchedule()) && proto.spine.core.CommandContext.Schedule.toObject(includeInstance, f),
origin: (f = msg.getOrigin()) && spine_core_diagnostics_pb.Origin.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.core.CommandContext}
*/
proto.spine.core.CommandContext.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.core.CommandContext;
return proto.spine.core.CommandContext.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.core.CommandContext} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.core.CommandContext}
*/
proto.spine.core.CommandContext.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new spine_core_actor_context_pb.ActorContext;
reader.readMessage(value,spine_core_actor_context_pb.ActorContext.deserializeBinaryFromReader);
msg.setActorContext(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt32());
msg.setTargetVersion(value);
break;
case 3:
var value = msg.getAttributesMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any());
});
break;
case 4:
var value = new proto.spine.core.CommandContext.Schedule;
reader.readMessage(value,proto.spine.core.CommandContext.Schedule.deserializeBinaryFromReader);
msg.setSchedule(value);
break;
case 5:
var value = new spine_core_diagnostics_pb.Origin;
reader.readMessage(value,spine_core_diagnostics_pb.Origin.deserializeBinaryFromReader);
msg.setOrigin(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.core.CommandContext.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.core.CommandContext.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.core.CommandContext} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.core.CommandContext.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getActorContext();
if (f != null) {
writer.writeMessage(
1,
f,
spine_core_actor_context_pb.ActorContext.serializeBinaryToWriter
);
}
f = message.getTargetVersion();
if (f !== 0) {
writer.writeInt32(
2,
f
);
}
f = message.getAttributesMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter);
}
f = message.getSchedule();
if (f != null) {
writer.writeMessage(
4,
f,
proto.spine.core.CommandContext.Schedule.serializeBinaryToWriter
);
}
f = message.getOrigin();
if (f != null) {
writer.writeMessage(
5,
f,
spine_core_diagnostics_pb.Origin.serializeBinaryToWriter
);
}
};
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.core.CommandContext.Schedule.prototype.toObject = function(opt_includeInstance) {
return proto.spine.core.CommandContext.Schedule.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.core.CommandContext.Schedule} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.core.CommandContext.Schedule.toObject = function(includeInstance, msg) {
var f, obj = {
delay: (f = msg.getDelay()) && google_protobuf_duration_pb.Duration.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.core.CommandContext.Schedule}
*/
proto.spine.core.CommandContext.Schedule.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.core.CommandContext.Schedule;
return proto.spine.core.CommandContext.Schedule.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.core.CommandContext.Schedule} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.core.CommandContext.Schedule}
*/
proto.spine.core.CommandContext.Schedule.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_duration_pb.Duration;
reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
msg.setDelay(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.core.CommandContext.Schedule.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.core.CommandContext.Schedule.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.core.CommandContext.Schedule} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.core.CommandContext.Schedule.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDelay();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_duration_pb.Duration.serializeBinaryToWriter
);
}
};
/**
* optional google.protobuf.Duration delay = 1;
* @return {?proto.google.protobuf.Duration}
*/
proto.spine.core.CommandContext.Schedule.prototype.getDelay = function() {
return /** @type{?proto.google.protobuf.Duration} */ (
jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1));
};
/**
* @param {?proto.google.protobuf.Duration|undefined} value
* @return {!proto.spine.core.CommandContext.Schedule} returns this
*/
proto.spine.core.CommandContext.Schedule.prototype.setDelay = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.core.CommandContext.Schedule} returns this
*/
proto.spine.core.CommandContext.Schedule.prototype.clearDelay = function() {
return this.setDelay(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.core.CommandContext.Schedule.prototype.hasDelay = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional ActorContext actor_context = 1;
* @return {?proto.spine.core.ActorContext}
*/
proto.spine.core.CommandContext.prototype.getActorContext = function() {
return /** @type{?proto.spine.core.ActorContext} */ (
jspb.Message.getWrapperField(this, spine_core_actor_context_pb.ActorContext, 1));
};
/**
* @param {?proto.spine.core.ActorContext|undefined} value
* @return {!proto.spine.core.CommandContext} returns this
*/
proto.spine.core.CommandContext.prototype.setActorContext = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.core.CommandContext} returns this
*/
proto.spine.core.CommandContext.prototype.clearActorContext = function() {
return this.setActorContext(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.core.CommandContext.prototype.hasActorContext = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional int32 target_version = 2;
* @return {number}
*/
proto.spine.core.CommandContext.prototype.getTargetVersion = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.spine.core.CommandContext} returns this
*/
proto.spine.core.CommandContext.prototype.setTargetVersion = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* map<string, google.protobuf.Any> attributes = 3;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,!proto.google.protobuf.Any>}
*/
proto.spine.core.CommandContext.prototype.getAttributesMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,!proto.google.protobuf.Any>} */ (
jspb.Message.getMapField(this, 3, opt_noLazyCreate,
proto.google.protobuf.Any));
};
/**
* Clears values from the map. The map will be non-null.
* @return {!proto.spine.core.CommandContext} returns this
*/
proto.spine.core.CommandContext.prototype.clearAttributesMap = function() {
this.getAttributesMap().clear();
return this;};
/**
* optional Schedule schedule = 4;
* @return {?proto.spine.core.CommandContext.Schedule}
*/
proto.spine.core.CommandContext.prototype.getSchedule = function() {
return /** @type{?proto.spine.core.CommandContext.Schedule} */ (
jspb.Message.getWrapperField(this, proto.spine.core.CommandContext.Schedule, 4));
};
/**
* @param {?proto.spine.core.CommandContext.Schedule|undefined} value
* @return {!proto.spine.core.CommandContext} returns this
*/
proto.spine.core.CommandContext.prototype.setSchedule = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.core.CommandContext} returns this
*/
proto.spine.core.CommandContext.prototype.clearSchedule = function() {
return this.setSchedule(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.core.CommandContext.prototype.hasSchedule = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional Origin origin = 5;
* @return {?proto.spine.core.Origin}
*/
proto.spine.core.CommandContext.prototype.getOrigin = function() {
return /** @type{?proto.spine.core.Origin} */ (
jspb.Message.getWrapperField(this, spine_core_diagnostics_pb.Origin, 5));
};
/**
* @param {?proto.spine.core.Origin|undefined} value
* @return {!proto.spine.core.CommandContext} returns this
*/
proto.spine.core.CommandContext.prototype.setOrigin = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.core.CommandContext} returns this
*/
proto.spine.core.CommandContext.prototype.clearOrigin = function() {
return this.setOrigin(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.core.CommandContext.prototype.hasOrigin = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* @enum {number}
*/
proto.spine.core.CommandValidationError = {
UNKNOWN: 0,
UNSUPPORTED_COMMAND: 1,
INVALID_COMMAND: 2,
TENANT_UNKNOWN: 3,
TENANT_INAPPLICABLE: 4,
EXPIRED: 5,
DUPLICATE_COMMAND: 6
};
goog.object.extend(exports, proto.spine.core);
// 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.core.Command.Parser = function() {
ObjectParser.call(this);
};
proto.spine.core.Command.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.core.Command.Parser.prototype.constructor = proto.spine.core.Command.Parser;
proto.spine.core.Command.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.core.Command();
if (obj.id !== undefined) {
if (obj.id === null) {
msg.setId(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.core.CommandId').fromObject(obj.id);
msg.setId(value);
}
}
if (obj.message !== undefined) {
if (obj.message === null) {
msg.setMessage(null);
} else {
let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.message);
msg.setMessage(value);
}
}
if (obj.context !== undefined) {
if (obj.context === null) {
msg.setContext(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.core.CommandContext').fromObject(obj.context);
msg.setContext(value);
}
}
if (obj.systemProperties !== undefined) {
if (obj.systemProperties === null) {
msg.setSystemProperties(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.core.Command.SystemProperties').fromObject(obj.systemProperties);
msg.setSystemProperties(value);
}
}
return msg;
};
proto.spine.core.CommandContext.Schedule.Parser = function() {
ObjectParser.call(this);
};
proto.spine.core.CommandContext.Schedule.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.core.CommandContext.Schedule.Parser.prototype.constructor = proto.spine.core.CommandContext.Schedule.Parser;
proto.spine.core.CommandContext.Schedule.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.core.CommandContext.Schedule();
if (obj.delay !== undefined) {
if (obj.delay === null) {
msg.setDelay(null);
} else {
let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Duration').fromObject(obj.delay);
msg.setDelay(value);
}
}
return msg;
};
proto.spine.core.CommandId.Parser = function() {
ObjectParser.call(this);
};
proto.spine.core.CommandId.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.core.CommandId.Parser.prototype.constructor = proto.spine.core.CommandId.Parser;
proto.spine.core.CommandId.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.core.CommandId();
if (obj.uuid !== undefined) {
if (obj.uuid !== null) {
let value = obj.uuid;
msg.setUuid(value);
}
}
return msg;
};
proto.spine.core.CommandContext.Parser = function() {
ObjectParser.call(this);
};
proto.spine.core.CommandContext.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.core.CommandContext.Parser.prototype.constructor = proto.spine.core.CommandContext.Parser;
proto.spine.core.CommandContext.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.core.CommandContext();
if (obj.actorContext !== undefined) {
if (obj.actorContext === null) {
msg.setActorContext(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.core.ActorContext').fromObject(obj.actorContext);
msg.setActorContext(value);
}
}
if (obj.targetVersion !== undefined) {
if (obj.targetVersion !== null) {
let value = obj.targetVersion;
msg.setTargetVersion(value);
}
}
if (obj.attributes !== undefined && obj.attributes !== null) {
for (let attribute in obj.attributes) {
if (obj.attributes.hasOwnProperty(attribute)) {
let mapKey = attribute;
if (obj.attributes[attribute] === null) {
msg.getAttributesMap().set(mapKey, null);
} else {
let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.attributes[attribute]);
msg.getAttributesMap().set(mapKey, value);
}
}
}
}
if (obj.schedule !== undefined) {
if (obj.schedule === null) {
msg.setSchedule(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.core.CommandContext.Schedule').fromObject(obj.schedule);
msg.setSchedule(value);
}
}
if (obj.origin !== undefined) {
if (obj.origin === null) {
msg.setOrigin(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.core.Origin').fromObject(obj.origin);
msg.setOrigin(value);
}
}
return msg;
};
proto.spine.core.Command.SystemProperties.Parser = function() {
ObjectParser.call(this);
};
proto.spine.core.Command.SystemProperties.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.core.Command.SystemProperties.Parser.prototype.constructor = proto.spine.core.Command.SystemProperties.Parser;
proto.spine.core.Command.SystemProperties.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.core.Command.SystemProperties();
if (obj.schedulingTime !== undefined) {
if (obj.schedulingTime === null) {
msg.setSchedulingTime(null);
} else {
let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Timestamp').fromObject(obj.schedulingTime);
msg.setSchedulingTime(value);
}
}
return msg;
};
// Generated by Spine ProtoJs Plugin
proto.spine.core.Command.typeUrl = function() {
return 'type.spine.io/spine.core.Command';
};
// Generated by Spine ProtoJs Plugin
proto.spine.core.CommandContext.Schedule.typeUrl = function() {
return 'type.spine.io/spine.core.CommandContext.Schedule';
};
// Generated by Spine ProtoJs Plugin
proto.spine.core.CommandId.typeUrl = function() {
return 'type.spine.io/spine.core.CommandId';
};
// Generated by Spine ProtoJs Plugin
proto.spine.core.CommandContext.typeUrl = function() {
return 'type.spine.io/spine.core.CommandContext';
};
// Generated by Spine ProtoJs Plugin
proto.spine.core.Command.SystemProperties.typeUrl = function() {
return 'type.spine.io/spine.core.Command.SystemProperties';
};
// Generated by Spine ProtoJs Plugin
proto.spine.core.CommandValidationError.typeUrl = function() {
return 'type.spine.io/spine.core.CommandValidationError';
};